摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1015题目输入多组数据第组包括:一个整数n和一个字符串,要求从字符串中,选五个字串且满足v - w^2 + x^3 - y^4 + z^5 = n;c++#include <stdio.h>#include<string.h>#include<math.h>#include <iostream>#include <deque>using namespace std;double n,q[28],ans;char p[15];int num,len;b 阅读全文
posted @ 2011-03-23 22:12 CoderZhuang 阅读(205) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3752#include<stdio.h>#include<stdlib.h>main(){ int t,m,n; scanf("%d",&t); while(t--) { scanf("%d%d",&m,&n); if(m%2==1||n>m/2) printf("NO\n"); else printf("YES\n"); } // system("pause&quo 阅读全文
posted @ 2011-03-23 21:59 CoderZhuang 阅读(126) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3750#include<stdio.h>#include<stdlib.h>main(){ double i,j,ans,n,num; while(scanf("%lf",&n)!=EOF) { j=1;i=1;ans=0;num=1; while(num<=n) { ans=ans+i*j*1.0/n; i++; j=j*2; num=num+j; //j=j*2; } if(num>n) ans=ans+i*(j-num+n)*1.0/n; 阅读全文
posted @ 2011-03-23 21:57 CoderZhuang 阅读(123) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3747 #include #include#includeusing namespace std;main(){ int n,min,ans[4],i; char p[55],q[55]; while(scanf("%d",&n)!=EOF) { for(i... 阅读全文
posted @ 2011-03-23 21:55 CoderZhuang 阅读(113) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3744#include<stdio.h>#include<stdlib.h>main(){ long i,j,flag,t,m,n; scanf("%ld",&t); struct stud { long a,b; }p[300]; while(t--) { scanf("%ld%ld",&n,&m); for(i=1;i<=n;i++) scanf("%ld%ld",&p[i].a,&a 阅读全文
posted @ 2011-03-23 21:52 CoderZhuang 阅读(182) 评论(0) 推荐(0) 编辑