12 2011 档案
摘要:1 #include<stdio.h> 2 #include<string.h> 3 #define maxn 40005//10000阶乘后的位数大约为40000一开始开得太大结果超时了,最后数组开销了之后便AC 4 5 int main() 6 { 7 int i, j, c, s, n, f[maxn]; 8 9 while(scanf("%d",&n)!= EOF)10 { 11 memset(f,0,sizeof(f));12 f[0] = 1; 13 for(i=2; i<=n; i++)14 ...
阅读全文
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 int main() 6 { 7 int i, T, length_a, length_b, j, k; 8 char a[1000], b[1000],c[1000]; 9 scanf("%d", &T);10 for (i=0; i<T; i++)11 {12 scanf("%s%s",a,b);13 length_a = strlen(a);14 length_b =
阅读全文
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 int main() 6 { 7 int i, T, length_a, length_b, j, k; 8 char a[1000], b[1000],c[1000]; 9 scanf("%d", &T);10 for (i=0; i<T; i++)11 {12 scanf("%s%s",a,b);13 length_a = strlen(a);14 length_b =
阅读全文
摘要:1 #include<stdio.h> 2 #include<math.h> 3 int Prime(int x) 4 { 5 int i=2, flag=1; 6 if(x==1) return 0; 7 while(i<=sqrt(x)) 8 { 9 if(x%i == 0) flag = 0;10 i++;11 }12 return flag;13 }14 15 int main()16 {17 int ncases,m,i,j,distl,distr,temp1,temp2;18 scanf("%d", &ncases);19
阅读全文
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<math.h> 4 5 int prime(int x) 6 { 7 int i, flag=1; 8 for(i=2; i<=sqrt(x); i++) 9 {10 if(x%i == 0) flag=0;11 } 12 return flag; 13 } 14 15 int main()16 {17 int ncases, n, i, m, sum;18 19 scanf("%d",&ncases);20 for(i=
阅读全文
摘要:相比大一时的啥也不懂,大二确实比大一有了点提高。可是这点提高并没有实际的变化,比赛让我看到了与别人的差距。自己的做题经验太少,遇到错误不会处理以及算法的熟练程度不够等等。这些都给我敲响了警钟,让我认识到了自己与别人的差距,哎!技不如人无话可说,只求以后多多训练让自己有个提高期待明年的校赛!在以后的道路上还有很长的路要走,各位亲们一起努力吧!
阅读全文
摘要:1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 5 int gcd(int n,int m) 6 { 7 return m==0 ? n : gcd(m,n%m); 8 } 9 10 int main()11 {12 int n, num_u, i, h, k;13 char ch[65536];14 double m; 15 16 scanf("%d",&n);17 num_u = 0; k = 0;18 scanf("%...
阅读全文
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<math.h> 4 5 int main() 6 { 7 int i, ncases; double l, d, r,n, num, k; 9 10 while(scanf("%d",&ncases) != EOF)11 {12 for(i=0; i<ncases; i++) 13 {14 scanf("%d%d%d",&l, &d, &r); ...
阅读全文

浙公网安备 33010602011771号