2016年3月4日
摘要:
Ps:WA了无数次,,简直成了心病..今天终于AC了..先取整数部分,去零,判断位数相等否,再比较.如果相等,再取小数部分,去零,比较,输出....好烦... 代码; #include "stdio.h" #include "string.h" void swi(char a[],char b[]) 阅读全文
posted @ 2016-03-04 20:46
庸人自扰扰
阅读(148)
推荐(0)
摘要:
ps:长度长到我不想说....WA了无数次...25的阶乘就爆炸... 代码: #include "stdio.h" #define LL long long LL fac(long long a); LL dp[25]; LL fac1(LL a,LL b); int main(){ LL i,n 阅读全文
posted @ 2016-03-04 18:00
庸人自扰扰
阅读(328)
推荐(0)
摘要:
ps:WA了两次好像....Sky数是三个进制下的各位数之和相等...而不是都等于22...我傻逼了... 代码: #include "stdio.h" int inp(int a,int n); int main(){ int n,k; while(~scanf("%d",&n) && n){ i 阅读全文
posted @ 2016-03-04 16:10
庸人自扰扰
阅读(134)
推荐(0)
摘要:
ps:天了噜...WA了无数次...结果就是粗心了...先是YES和Yes的错,再后来是运算的错....想死 题意:先给出N,接下来是N个数据,给出a,b,c,分别是桌面剩下的球数,p的分数,q的分数,P先打,一杆清.问能不能追上... 代码: #include "stdio.h" int main 阅读全文
posted @ 2016-03-04 15:39
庸人自扰扰
阅读(185)
推荐(0)
摘要:
ps:超水题....(a+b)^2>=a^2+b^2。。。刚开始还想了好久...真佩服自己.. #include "stdio.h" #define min1(a,b) a>b?b:a int main(){ int T,n,i,j,m,min,a; scanf("%d",&T); for(i=0; 阅读全文
posted @ 2016-03-04 11:47
庸人自扰扰
阅读(178)
推荐(0)
摘要:
ps:...递推..还是给出公式那种... 代码: #include "stdio.h" #define LL long long LL dp[55]; int main(){ int i,n; dp[0]=0; dp[1]=1; for(i=2;i<55;i++) dp[i]=dp[i-1]+dp 阅读全文
posted @ 2016-03-04 02:18
庸人自扰扰
阅读(204)
推荐(0)
摘要:
Ps:输出n个数里最大的 #include "stdio.h" int main(){ double a[110],max; int i,j,n,t; while(~scanf("%d",&n)){ for(j=0;j<n;j++){ scanf("%d",&t); for(i=0;i<t;i++) 阅读全文
posted @ 2016-03-04 02:11
庸人自扰扰
阅读(268)
推荐(0)
摘要:
ps:TLE一次....因为判断素数的时候没开方...作死.. 代码: #include "stdio.h" #include "math.h" int inp(int a); int main(){ int i,s,n,a,num; while(~scanf("%d",&a) && a){ num 阅读全文
posted @ 2016-03-04 01:53
庸人自扰扰
阅读(314)
推荐(0)
摘要:
PS:...找到好多水题.... #include "stdio.h" int main(){ char a[15]; int i,j,n,N; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%s",&a); printf("6"); for(j=6;j<11;j 阅读全文
posted @ 2016-03-04 01:32
庸人自扰扰
阅读(155)
推荐(0)
摘要:
PS:因为还是不爽...继续水题...感觉这道题就是考输出.. 代码: #include "stdio.h" void cal(int a,int b); int main(){ int a,b,i; while(~scanf("%d%d",&a,&b) && (a || b)){ a*=100; 阅读全文
posted @ 2016-03-04 01:19
庸人自扰扰
阅读(156)
推荐(0)
摘要:
PS:做不出前面几道题...很不爽..扒拉了几下找了简单题来做.... #include "stdio.h" int cal(int a); int main(){ int a,b,i,T,sum; scanf("%d",&T); for(i=0;i<T;i++){ scanf("%d%d",&a, 阅读全文
posted @ 2016-03-04 01:00
庸人自扰扰
阅读(314)
推荐(0)
|
|