BZOJ 1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
来源:互联网 发布:python argsort 编辑:程序博客网 时间:2024/06/06 19:12
。。按照题目做就好了。。
我原以为还有什么神奇的算法
结果我想多了
7行代码
#include<iostream>using namespace std;int main(){int n,ans;cin>>n;for(ans=0;n!=1;++ans)n=n%2?n*3+1:n/2;cout<<ans<<endl;}
0 0
- BZOJ 1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
- 1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
- [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏 记忆化搜索
- bzoj1666[Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
- BZOJ_P1666 [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏(hhhhhh)
- 【bzoj1666】 [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
- bzoj 1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛 暴力
- bzoj 1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛
- BZOJ 1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛|动态规划
- 【BZOJ】1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛 最长上升子序列
- bzoj 1667: [Usaco2006 Oct]Cows on Skates滑旱冰的奶牛(BFS)
- bzoj 1668: [Usaco2006 Oct]Cow Pie Treasures 馅饼里的财富(DP)
- BZOJ 1654: [Usaco2006 Jan]The Cow Prom 奶牛舞会
- BZOJ 1648: [Usaco2006 Dec]Cow Picnic 奶牛野餐
- 【BZOJ】1654: [Usaco2006 Jan]The Cow Prom 奶牛舞会
- BZOJ 1635: [Usaco2006 Jan]The Cow Prom 奶牛舞会 tarjan
- |BZOJ 1648|DFS|[Usaco2006 Dec]Cow Picnic 奶牛野餐
- BZOJ 1648: [Usaco2006 Dec]Cow Picnic 奶牛野餐 题解
- 记不住就存下来---- HTML 5 新增常用属性 之 文档结构元素
- KMP算法
- ___71__OleDbDataReader读取Access数据库
- zookeeper的实用场景—
- (四)activiti的几个核心类
- BZOJ 1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏
- JavaEE中的事务
- shell检验日期格式
- iOS网络编程
- 在CentOS & RHEL环境中使用RVM安装Ruby 2.1.8
- Ubuntu 14.04lts安装vncserver
- 在 Rails 中使用 Webpack
- 怎样理解阻塞非阻塞与同步异步的区别?
- i++和++i是否为原子操作