摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1709View Code 1 /* 2 砝码称重 3 */ 4 5 6 #include<stdio.h> 7 #include<string.h> 8 int f(int x,int y) 9 {10 if(x>y) return x-y;11 else return y-x;12 }13 int main()14 {15 16 17 int n;18 int p[10010];19 int sum[10010];20 int temp[100...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1028and the Princess IIITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7214Accepted Submission(s): 5118Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1398View Code 1 #include<stdio.h> 2 int main() 3 { 4 int n,i,j,k; 5 int sum[305]; 6 int temp[305]; 7 while(~scanf("%d",&n),n) 8 { 9 10 11 for(i=0;i<=n;i++)12 {13 sum[i]=1;14 temp[i]...
阅读全文
摘要:http://www.wutianqi.com/?p=596
阅读全文