上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 34 下一页

2012年10月14日

hdu 1982 Kaitou Kid - The Phantom Thief (1) (水。。)

摘要: 点击打开链接 #include"stdio.h"int main(){ int t,i; int n; char str[11111]; scanf("%d",&t); getchar(); while(t--) { gets(str); for(i=0;str[i];i++) { ... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(98) 评论(0) 推荐(0) 编辑

hdu 1871 无题 (水。。)

摘要: 点击打开链接 注意一点:当一个小组选择好一个旅馆时,此旅馆的房间数要对应减去小组人数。。。 #include"stdio.h"#include"stdlib.h"struct fun{ int num,count,price;}a[111];int cmp(const void*a,cons... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(87) 评论(0) 推荐(0) 编辑

hdu 1017 A Mathematical Curiosity (水。。)

摘要: 点击打开链接 题目意思描述不清。。。 1)第一个数字是blocks的个数,但注意后面不用输出换行符(输入样例是有个空白行的,莫名其妙)。 2)每个block都以0 0结束,然后重新从Case 1开始输出。 3)两个相邻的block之间输出空行,最后一块后面不用 #include "... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(110) 评论(0) 推荐(0) 编辑

hdu 1165 Eddy's research II (DP)

摘要: 点击打开链接 当m=1时: A(1,n) = A(0,A(1,n-1)) = A(1,n-1)+1 = A(0,A(1,n-2))+1 = A(1,n-2)+2..... = A(1,n-n)+n = A(0,1)+n=n+2; 当m=2时: A(2,n) = A(1,A(2,n-1))... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(97) 评论(0) 推荐(0) 编辑

hdu 2519 新生晚会 (DP)

摘要: 点击打开链接 ps: c(n,m) = n!/(m!*(n-m)!) 如果n和m比较大时 可能会导致中间超过数据范围,不过我们可以直接用递推也就是 c(n,m) = c(n-1,m)+c(n-1,m-1) 不过下面我们要用另外一种方法来计算这个组合 把分子和分母约掉之后就变成了 (n*... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(71) 评论(0) 推荐(0) 编辑

hdu 1039 Easier Done Than Said? (DP)

摘要: 点击打开链接 ps: 题目要求,给你一个字符串,要求: 1:至少有1个元音字母 2:不能有3个或以上连续的元音字母或,其他非元音字母一起 3:不能有连续的两个字符相同,“ee”和“oo”除外 #include#includeint main(){ char s[1000]=""... 阅读全文

posted @ 2012-10-14 17:39 Slege 阅读(84) 评论(0) 推荐(0) 编辑

hdu 1097 A hard puzzle (递推)

摘要: 点击打开链接 找规律,1~9周期为4,2^1=2 2^2=4 2^3=8 2^4=2 #include"stdio.h"int main(){ int a,b; int e,f,g,h; while(scanf("%d%d",&a,&b)!=EOF) { a%=10; e=(a*a)... 阅读全文

posted @ 2012-10-14 17:38 Slege 阅读(105) 评论(0) 推荐(0) 编辑

hdu 1009 FatMouse' Trade(DP)

摘要: 点击打开链接 类似01背包,小猫总共有价值m的食物,去和小狗换,小狗有j磅的食物,需要小猫用价值f的食物换, 则p=j/f代表每磅需要的食物,即单价 #include"stdio.h"int main(){ int j[1111],f[1111],t,m,n,i; double p... 阅读全文

posted @ 2012-10-14 17:38 Slege 阅读(73) 评论(0) 推荐(0) 编辑

hdu 1013 Digital Roots (找规律)

摘要: 点击打开链接 ps: n=0 1 2 3 4 5 6 7 8 9 10 11 12 13 ......... 100 101 102 103 .... roots=0 1 2 3 4 5 6 7 8 9 1 2 3 4 .......1 2 3 4.... 原来是以1.....9为循环... 阅读全文

posted @ 2012-10-14 17:38 Slege 阅读(81) 评论(0) 推荐(0) 编辑

hdu1266 Reverse Number (模拟)

摘要: 点击打开链接 ps:按题目意思进行处理#include"stdio.h"#include"string.h" int main() { char str1[111],str2[111]; int t,n,m,len,i,j; scanf("%d",&t); ... 阅读全文

posted @ 2012-10-14 17:38 Slege 阅读(109) 评论(0) 推荐(0) 编辑

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 34 下一页

导航