hdu水题
普通网友
这个作者很懒,什么都没留下…
展开
-
1038 Biker's Trip Odometer
//单位换算 给定直径(inches),转数(inche),时间(s) //求出总路程(mile)和速度(mile/hour) //1foot(一英尺) = 12inches(英寸) //1mile(英里) = 5280feet(英寸) = 5280*12inche(英寸) //换算坑爹啊,只要是比赛不知道干脆就别做了 #include #include using names原创 2013-04-02 20:19:49 · 539 阅读 · 0 评论 -
hdu1032 The3n+1problem
#include using namespace std; int Function(int x,int nums) { if(x == 1)return nums; if(x % 2 == 1) { Function(3*x + 1,nums+1); } else { Function(x / 2,nums+1); } } int main() { int原创 2013-03-23 14:20:02 · 438 阅读 · 0 评论 -
字符全排列产生器
#include using namespace std; /* 算法: a ( b c d e 的全排列) b ( a c d e 的全排列) c ( a b d e 的全排列) d ( a b c e 的全排列) e ( a b c d 的全排列) */ int iCount = 0; void Perm(char cArr[],int k,int n) {原创 2013-10-29 22:40:43 · 938 阅读 · 0 评论