diff --git "a/valid.jsonl" "b/valid.jsonl" new file mode 100644--- /dev/null +++ "b/valid.jsonl" @@ -0,0 +1,8000 @@ +{"label": "65", "index": "32000", "code": "int main()\n{\n int n,i,a,b,as,bs,tie;\n as=0;\n bs=0;\n tie=0;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++){\n scanf(\"%d%d\",&a,&b);\n if(a==0&&b==1){\n as++;}\n else if(a==0&&b==0){\n tie++;}\n else if(a==1&&b==1){\n tie++;}\n else if(a==1&&b==2){\n as++;}\n else if(a==2&&b==0){\n as++;}\n else if(a==2&&b==2){\n tie++;}\n }\n bs=n-as-tie;\n if(as>bs){printf(\"A\");}\n else if(as-bs==0){printf(\"Tie\");}\n else if(asx)\n\t\tprintf(\"A\");\n\tif(z0){\n printf(\"A\");}\n if(s<0){\n printf(\"B\");}\n return 0;\n} "} +{"label": "65", "index": "32003", "code": "int main(){\n int n,p[2],s=0,q;\n\tdouble j;\n\tscanf(\"%d\",&n);\n\tq=n;\n\t\n\tfor(int i=0;ij){printf(\"A\");}\n\telse if(sk){printf(\"A\");}\nif(mq)\n\t\t{\n\t\t\tprintf(\"A\");\n\t\t}\n\t\tif(p==q)\n\t\t{\n\t\t\tprintf(\"Tie\");\n\t\t}\n\t\tif(p0){\n printf(\"A\");\n }\n if(j==0){\n printf(\"Tie\");\n }\n if(j<0){\n printf(\"B\");\n }\n return 0;\n}"} +{"label": "65", "index": "32007", "code": "int main(){\n int n,i,e=0;\n int a[201],b[201];\n scanf(\"%d\",&n);\n for(i=0;i0){\n printf(\"A\");\n }\n if(e<0){\n printf(\"B\");\n }\n if(e==0){\n printf(\"Tie\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32008", "code": "int main()\n{\n\tint n,i,a,b,s,j;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib)\n\t\tprintf(\"A\");\n\telse if(asb)printf(\"A\\n\");\n else if(sa==sb)printf(\"Tie\\n\");\n else printf(\"B\\n\");\n}"} +{"label": "65", "index": "32010", "code": "\n\nint main () {\n\tint num;\n\tcin >> num;\n\tint aWinCount = 0;\n\tint bWinCount = 0;\n\tfor (int i = 0; i < num; i++) {\n\t\tint a, b;\n\t\tcin >> a >> b;\n\t\tif (a == 0) {\n\t\t\tif (b == 1) {\n\t\t\t\taWinCount++;\n\t\t\t} else if (b == 2) {\n\t\t\t\tbWinCount++;\n\t\t\t}\n\t\t}\n\t\tif (a == 1) {\n\t\t\tif (b == 0) {\n\t\t\t\tbWinCount++;\n\t\t\t} else if (b == 2) {\n\t\t\t\taWinCount++;\n\t\t\t}\n\t\t}\n\t\tif (a == 2) {\n\t\t\tif (b == 1) {\n\t\t\t\tbWinCount++;\n\t\t\t} else if (b == 0) {\n\t\t\t\taWinCount++;\n\t\t\t}\n\t\t}\n\t}\n\tif (aWinCount == bWinCount) {\n\t\tcout << \"Tie\" << endl;\n\t} else if (aWinCount > bWinCount) {\n\t\tcout << \"A\" << endl;\n\t} else {\n\t\tcout << \"B\" << endl;\n\t}\n}\n\n"} +{"label": "65", "index": "32011", "code": "int main(){\n\tint a,b;\n\tint n,c=0;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;i0){printf(\"A\");}\n\telse if(c<0){printf(\"B\");}\n\telse{printf(\"Tie\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32012", "code": "main()\n{\n int n,i,a=0,b=0,x,y;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%d%d\",&x,&y);\n if(y-x==0) continue;\n if(x-y==-1||x-y==2) a++;\n else b++;\n }\n if(a>b) printf(\"A\\n\");\n if(ak)printf(\"A\");\n if(jsumb)printf(\"A\");\n if(sumaz){\n printf(\"A\");\n }else if(x==z){\n printf(\"Tie\");\n }else{\n printf(\"B\");\n }\n return 0;\n}\n\n"} +{"label": "65", "index": "32016", "code": "int main(){\nint n,i,x,y,f=0;\nscanf(\"%d\",&n);\nfor(i=0;i0)\nprintf(\"A\");\nelse if(f<0)\nprintf(\"B\");\nelse if(f==0)\nprintf(\"Tie\");\nreturn 0;\n}"} +{"label": "65", "index": "32017", "code": "int main(){\n\tint n,i,as=0,bs=0,p=0;\n\tint a[200],b[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ibs){\n\t printf(\"A\");\n\t}else if(bs>as){\n\t\tprintf(\"B\");\n\t}else{\n\t printf(\"Tie\");\n\t}\n return 0;\n}\n"} +{"label": "65", "index": "32018", "code": "int main(){\n int n,m;\n m=0;\n int sz[2000][2];\n scanf(\"%d\",&n);\n for(int i=0;i0){printf(\"A\");}\nelse if(m<0){printf(\"B\");}\n return 0;\n}\n\n"} +{"label": "65", "index": "32019", "code": "int main(){\nint n,i,c=0,d=0;\nint a[1000],b[1000];\nscanf(\"%d\",&n);\nfor(i=0;id) printf(\"A\");\nelse if(cd)\n\t\tprintf(\"A\");\n\tif(d>c)\n\t\tprintf(\"B\");\n\tif(c==d)\n\t\tprintf(\"Tie\");\n\treturn 0;\n\t\n}"} +{"label": "65", "index": "32021", "code": "int main()\n{\n int n,i,c=0,d=0;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=0;ib[i]){\n if(b[i]==0&&a[i]==2){\n c=c+1;\n }\n else{\n d=d+1;\n }\n }\n }\n \n if(c>d){printf(\"A\");}\n else if(d>c){printf(\"B\");}\n else{printf(\"Tie\");}\n \n \n \n \n return 0;\n }"} +{"label": "65", "index": "32022", "code": "int main(){\n\tint n,i;\n\tint aa=0;\n\tint bb=0;\n\tint a[200],b[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ibb){\n\t\tprintf(\"A\");\n\t}else if(aak){\nprintf(\"A\");\n}else printf(\"B\");\nreturn 0;\n}\n"} +{"label": "65", "index": "32024", "code": "int main(){\n int n,i,num1=0,num2=0;\n int a[200],b[200];\n scanf(\"%d\\n\",&n);\n for(i=0;inum2){\n\t printf(\"A\");\n }\n if(num2>num1){\n\t printf(\"B\");\n }\n if(num1==num2){\n\t printf(\"Tie\");\n }\n\n\treturn 0;\n}"} +{"label": "65", "index": "32025", "code": "int main(){\n int a,b,n,i,c=0,d=0;\n scanf(\"%d\",&n);\n for(i=0;id){printf(\"A\");}\n if(cb)\n\t\tprintf(\"A\");\n\telse if(ab){\n\t printf(\"A\");\n\t}\nreturn 0;\n}"} +{"label": "65", "index": "32028", "code": "int main()\n{\n int n,i,q,a,b;\n a=0;\n b=0;\n scanf(\"%d\",&n);\n int sz[n][2];\n for(i=0;ib)\n {\n printf(\"A\");\n }\n else\n {\n if(a==b)\n {\n printf(\"Tie\");\n }\n else\n {\n printf(\"B\");\n }\n }\n return 0;\n}"} +{"label": "65", "index": "32029", "code": "int main()\n{\n int n,a[200],b[200],i,A=0,B=0;\n scanf(\"%d\\n\",&n);\n for(i=0;iB)\n printf(\"A\");\n else\n printf(\"Tie\");\n }\n return 0;\n}\n\n"} +{"label": "65", "index": "32030", "code": "int main()\n{\n int n,x,y;\n\tint a[201];\n\t\tint b[201];\n a[201]=0;\n\tb[201]=0;\n\tx=0;\n\ty=0;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;iy)\n\t\tprintf(\"A\");\n\telse if(xb){\n\t\tprintf(\"A\");\n\t}else if(b>a){\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32032", "code": "int main()\n{\n int n,a[200],b[200],i,c=0,d=0;\n scanf(\"%d\\n\",&n);\n for(i=0;id){\n printf(\"A\");\n }\n else if(cy)\n printf(\"A\\n\");\n if(xb[i]&&a[i]!=2){\n\t\tc+=1;\n\t}\n\tif(b[i]==2&&a[i]==0){\n\t\tc+=1;\n\t}\nif(a[i]==2&&b[i]==1){\n c+=1;\n}\n\n}\nif(s>c){\n\tprintf(\"A\");\n}\nif(ssum2)\n\t\tprintf(\"A\\n\");\n\tif(sum2>sum1)\n\t\tprintf(\"B\\n\");\n\treturn 0;\n}\n\n\t"} +{"label": "65", "index": "32036", "code": "int main(){\nint A[200],b=0,a=0,B[200],c=0;\nint i,n;\nscanf(\"%d\",&n);\nfor(i=0;ib){\nprintf(\"A\");\n}else if(a==b){\nprintf(\"Tie\");\n}else if(a0.5)printf(\"A\");\n\telse if(w==0.5)printf(\"Tie\");\n\telse printf(\"B\");\n\n\n\t\treturn 0;\n}"} +{"label": "65", "index": "32038", "code": "\nint main()\n{int n;\ncin>>n;\nint i,a,b,ca=0,cb=0;\nfor(i=0;i>a>>b;\n \n if(a==0&&b==1)\n ca++;\n else if(a==1&&b==2)\n ca++;\n else if(a==2&&b==0)\n ca++;\n else if(b==0&&a==1)\n cb++;\n else if(b==1&&a==2)\n cb++;\n else if(b==2&&a==0)\n cb++;\n }\nif(ca>cb)\ncout<<\"A\";\nif(ca==cb)\ncout<<\"Tie\";\nif(cb>ca)\ncout<<\"B\";\n\n return 0;\n}\n"} +{"label": "65", "index": "32039", "code": "int main(){\nint a[400];\nint i,j,n,m,s,p,q;\nscanf(\"%d\",&n);\nm=2*n;\np=n/2;\nfor(i=0;iq)\n printf(\"A\");\n else if(sy)\n\t{\n\t\tprintf(\"A\");\n\t}else if(xy)\nprintf(\"A\");\nif(x==y)\nprintf(\"Tie\");\nif(x0)\n\t{\n\t\tprintf(\"A\");\n\t}\n\telse if(k==0)\n\t{\n\t\tprintf(\"Tie\");\n\t}\n\telse if(k<0)\n\t{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32043", "code": "int main()\n{\n int a,b,A=0,B=0,n,i,j;\n\n scanf(\"%d\",&n);\n for(i=0;iB)\n printf(\"A\");\n if(Ab){\n\t\tprintf(\"A\\n\");\n\t\treturn 0;\n\t}\n\tif(a==b){\n\t\tprintf(\"Tie\\n\");\n\t\treturn 0;\n\t}\n\tif(aB)\n {printf(\"A\");}\n else\n {printf(\"B\");}\n return 0;\n}\n"} +{"label": "65", "index": "32046", "code": "int main()\n{\n int n,i,e,f;\n int a[200], b[200];\n\tscanf(\"%d\",&n);\n\ti=0;\n\te=0;\n\tf=0;\n\t\n\tfor (i=0;if){\n\t\t\tprintf(\"A\");\n\t\t}\n\t\tif(eb) printf(\"A\\n\");\nelse if(aa) {\n\t\tprintf(\"B\");}\n\telse {\n\t\tif(bb) printf(\"A\");\nelse\n{\n if(a0)printf(\"A\\n\");\n\tif(res<0)printf(\"B\\n\");\n\tif(res==0)printf(\"Tie\\n\");\n\treturn 0;\n}"} +{"label": "65", "index": "32051", "code": "int main(){\n\tint sz[200][2];\n\tint n,i,j,a,b;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib){\n\tprintf(\"A\");\n\t}else if(ad){printf(\"A\");}\nreturn 0;\n}\n"} +{"label": "65", "index": "32053", "code": "int main(){\n\tint n,a,b,A=0,B=0,tile=0,i;\n\tscanf(\"%d\",&n);\n\tfor (i=0;iB) printf(\"A\");\n\telse printf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32054", "code": "int main(){\nint n,i,sz[200][2],a=0,b=0;\nscanf(\"%d\",&n);\nfor(i=0;ib){\n\tprintf(\"A\");\n}else if(a0)\n\tprintf(\"A\");\nif(s<0)\n\tprintf(\"B\");\nif(s==0)\n\tprintf(\"Tie\");\nreturn 0;\n}\n"} +{"label": "65", "index": "32056", "code": "\nint j(int a,int b)\n{\n if(a>b)return -j(b,a);\n if(b-a==1) return 1;\n if(b==a) return 0;\n if(b-a==2) return -1;\n}\nint main()\n{\n int n,s=0,i,a,b;\n scanf(\"%d\",&n);\n for(i=0;ib){\n\t\tprintf(\"A\");\n\t}\n\telse if(ay){\n\t\tprintf(\"A\");\n\t}else if(x==y){\n\t\tprintf(\"Tie\");\n\t}else{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32059", "code": "int main(){\n\tint n,a=0,b=0,i,j;\n\tint sz[300][2];\n\tscanf(\"%d\",&n);\nfor(i=0;ib)\n{ printf(\"A\");\n}\nelse if(a==b)\n{\n\tprintf(\"Tie\");\n}\nelse {\n\tprintf(\"B\");\n}\n\n\treturn 0;\n}\n"} +{"label": "65", "index": "32060", "code": "int main()\n{\nint i,j,n,s=0,m=0;\nint b[201]; \n int a[201][201];\n\nscanf(\"%d\",&n);\nfor(i=0;im)\n{printf(\"B\");}\nelse{\nprintf(\"A\");}\nreturn 0;}}\n\n\n"} +{"label": "65", "index": "32061", "code": "int main(){\n\tint i,j,k,num,a[200],b[200],m=0,n=0;\n\tscanf(\"%d\",&num);\n\tfor(i=0;in)\n\t\tprintf(\"A\");\n\telse if(m0){printf(\"A\");}\n else if(p<0){printf(\"B\");}\n else if(p==0){printf(\"Tie\");}\n \n \n \n return 0;\n}"} +{"label": "65", "index": "32063", "code": "int jg(int a,int b);\nint main(){\n\tint n,i;\n\tint ay=0,by=0,pj=0;\n\tint sza[max],szb[max];\n\tscanf(\"%d\",&n);\n\tfor(i=0;iby){\n\t\t\tprintf(\"A\");\n\t\t}else{\n\t\t\tprintf(\"B\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n\n\nint jg(int a,int b){\n\tif((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2)){\n\t\treturn 0;\n\t}else{\n\t\tif((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 2;\n\t\t}\n\t}\n}\n"} +{"label": "65", "index": "32064", "code": "int main(){\n int a[200],b[200];\n int n,i,s=0,t=0;\n scanf(\"%d\",&n);\n for(i=0;it){\n printf(\"A\");\n }else if(sp1) printf(\"A\\n\");\n else if(p1>o1) printf(\"B\\n\");\n else printf(\"Tie\\n\");\n}"} +{"label": "65", "index": "32066", "code": "int main(){\n int n;\n int a[200],b[200];\n int A,B;\n A=0;\n B=0;\n scanf(\"%d\",&n);\n for(int i=0;iB)printf(\"A\");\n if(B>A)printf(\"B\");\n if(B==A)printf(\"Tie\");\n return 0;}"} +{"label": "65", "index": "32067", "code": "int main()\n{\n\tint sz[100][2];\n\tint a=0,b=0;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n for(i=0;ib)\n\t\tprintf(\"A\");\n\telse if(aB){\n printf(\"A\");\n }else if(Ab)\n\t\tprintf(\"A\\n\");\n\telse\n\t\tif(aB)\n\t\tprintf(\"A\");\n\telse if(B>A)\n\t\tprintf(\"B\");\n\telse if(A==B)\n\t\tprintf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32071", "code": "int main()\n{\n\tint n,i,a[200],b[200],x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy)\n\t\tprintf(\"A\");\n\tif(xcountB)\n {\n\t printf(\"A\");\n }\n else if(countB>countA)\n {\n printf(\"B\");\n }\n else\n {\n\t printf(\"Tie\");\n }\n \n \n\t\n\t\n\t\n\treturn 0;\n}\n"} +{"label": "65", "index": "32073", "code": "int main(){\n int n,a=0,b=0,c=0,i,j;\n scanf(\"%d\",&n);\n int sz[201][3];\n for(i=0;ib){\n printf(\"A\");\n \n }else\n if(b>a){\n printf(\"B\");\n }else\n if(b=a){\n printf(\"Tie\");\n }\n return 0;\n}\n \n \n \n"} +{"label": "65", "index": "32074", "code": "int main(){\n int a[1000],b[1000],i,n,x=0;\n scanf(\"%d\",&n);\n for(i=0;i0){\n printf(\"A\");\n }\n else if(x<0){\n printf(\"B\");\n }\n else{printf(\"Tie\");}\n\n}\n"} +{"label": "65", "index": "32075", "code": "int main(){\n\tint n,sz[100][2],i,a,b;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib){\n\t\tprintf(\"A\"); \n\t}else if(aB)\n printf(\"A\\n\");\n else if(A(n-f-c)) printf(\"A\");\nelse if(c<(n-f-c)) printf(\"B\");\n\nelse printf(\"Tie\");\n\n\nreturn 0;}\n"} +{"label": "65", "index": "32078", "code": "int main()\n{\n\tint n,a[200],b[200],i,x=0,y=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy){\n\t\tprintf(\"A\");\n\t}else if(xd){\n\t\tprintf(\"A\");\n\t}else if(cB)\n printf(\"A\");\n else if(B>A)\n printf(\"B\");\n else if(A==B)\n printf(\"Tie\");\n}\n"} +{"label": "65", "index": "32081", "code": "int main(){\n int n,i,a=0,b=0,c=0,m,p,r;\n \n scanf(\"%d\",&n);\n \n \n for(i=0;ib) printf(\"A\");\n if(ab){\n\t\tprintf(\"A\");\n\t}else if(abi)\n printf(\"A\");\n else ;\n if (ai==bi)\n printf(\"Tie\");\n else ;\n if (ai0){\n printf(\"A\");\n }else if(j==0){\n printf(\"Tie\");\n }else if(j<0){\n printf(\"B\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32085", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct suoyou{\n\t\tint qian;\n\t\tint hou;\n\t\tint jg;\n\t}suoyous[202];\n\tint i;\n\tfor(i=0;im){\n\t\tprintf(\"A\");\n\t}else if(sd){printf(\"A\\n\");}\n\t\tif(cy){printf(\"A\");}\n if(xe){printf(\"A\");}\n\telse{if(c==e){\n\t\tprintf(\"Tie\");}\n\t\telse{printf(\"B\");}}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32089", "code": "int main(){\nint n,a,b,i,m=0;\nscanf(\"%d\",&n);\nfor(i=0;i0)printf(\"A\");\nelse if(m<0)printf(\"B\");\nreturn 0;\n}"} +{"label": "65", "index": "32090", "code": "int main(){\n\tint sz[1000][3];\n\tint n,a,b;\n\tint i;\n\tint j;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib){\n\t\tprintf(\"A\");\n\t}else if(asb)\nprintf(\"A\");\nif(sa0)\n\t\tprintf(\"A\");\n\tif(m<0)\n\t\tprintf(\"B\");\n\tif(m==0)\n\t\tprintf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32093", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\t\tint a[MAX],b[MAX];\n\tfor(int i=0;isum2){\n\t\tprintf(\"A\");\n\t}else if(sum1s2)printf(\"A\");\n if(s1d)\n printf(\"A\");\n else\n {\n if(c==d)\n printf(\"Tie\");\n else\n printf(\"B\");\n }\n }\n"} +{"label": "65", "index": "32096", "code": "int main(){\n\nint n,a,b,x=0,y=0;\nscanf(\"%d\\n\",&n);\nfor(int i=0;iy){\n\tprintf(\"A\");\n}\nif(x0)printf(\"A\");\n if(j<0)printf(\"B\");\n if(j==0)printf(\"Tie\");\n return 0;\n}\n"} +{"label": "65", "index": "32098", "code": "int main() {\nint n,i;\nint c=0;\nint d=0;\nscanf(\"%d\",&n);\nint a[n],b[n];\nfor(i=0;id) printf(\"A\");\nif(cBw){\n\t\tprintf(\"A\\n\");\n\t}else if(Awy){\n printf(\"A\");}\n\t if(xsumB)\n\t\tprintf(\"A\");\n\tif(sumB>sumA)\n\t\tprintf(\"B\");\n\telse if(sumA==sumB)\n\t\tprintf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32102", "code": "int main(){\n\tint i,n,l=0,m=0;\n\tint a[max],b[max];\n\tscanf(\"%d\",&n);\n\tfor(i=0;il){\n\t\tprintf(\"A\");\n\t}else if(m==l){\n\t\tprintf(\"Tie\");\n\t}else if(ms[1])\tprintf(\"A\\n\");\n \telse\tprintf(\"B\\n\");\n\t}\n"} +{"label": "65", "index": "32104", "code": "int main(){\nint n,sz[2],a=0,b=0,i;\nscanf(\"%d\\n\",&n);\nfor(i=0;ib){\nprintf(\"A\");\n}\nelse if(ab){\nprintf(\"A\");\n}\nif(a0){printf(\"A\");}\nelse if(count<0){printf(\"B\");}\nelse if(count==0){printf(\"Tie\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32107", "code": "\nmain()\n{\n int n,i;\n scanf(\"%d\",&n);\n int a[200][2],t=0,r=0;\n int f(int a,int b);\n for(i=0;ir)\n printf(\"A\");\n else if(t==r)\n printf(\"Tie\");\n else\n printf(\"B\");\n }\n\nint f(int a,int b)\n{\n \n if(a-b==-1||a-b==2)\n return 1;\n else if(a==b)\n return 0;\n else\n return -1;\n} \n"} +{"label": "65", "index": "32108", "code": "int main(){\n\tint n,i,a,b,total=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0){\n\t\tprintf(\"A\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32109", "code": "int main()\n{\n\tint n,i,sz1[200],sz2[200],a=0,b=0;\n\tscanf(\"%d\\n\",&n);\n\tfor(i=0;ib){\n\t\tprintf(\"A\");\n\t}\n\tif(a+200){\n\t\treturn 0;\n\t}\n\telse {\n\t\tfor(i=0;iy){\n\t\t\tprintf(\"A\");\n\t\t}\n\t\tif(xd){\n printf(\"A\\n\");\n }else if(c==d){\n printf(\"Tie\\n\");\n }else{printf(\"B\\n\");}\n return 0;\n}\n"} +{"label": "65", "index": "32112", "code": "int main(){\n int n,i,sz[200][2],a,b;\n scanf(\"%d\",&n);\n for(i=0;ib){\n printf(\"A\");\n }\n if(a==b){\n printf(\"Tie\");\n }\n if(ay){printf(\"A\");return 0;}\nif(xk){\n\t\tprintf(\"A\");\n\t}else if(h==k){\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32115", "code": "int main()\n{\n int n,i,s,t,p,q;\n scanf(\"%d\",&n);\n p=0;\n q=0;\n for(i=1;i<=n;i++){\n scanf(\"%d%d\",&s,&t);\n if(s==0&&t==0){\n ;\n }else if(s==0&&t==1){\n p=p+1;\n }else if(s==0&&t==2){\n q=q+1;\n }else if(s==1&&t==0){\n q=q+1;\n }else if(s==1&&t==1){\n ;\n }else if(s==1&&t==2){\n p=p+1;\n }else if(s==2&&t==0){\n p=p+1;\n }else if(s==2&&t==1){\n q=q+1;\n }else if(s==2&&t==2){\n ;\n }\n }\n if(p>q){\n printf(\"A\");\n }else if(p0){printf(\"A\");}\n\t\telse if(c<0){printf(\"B\");}\n\t\telse{printf(\"Tie\");}\n\treturn 0;\n\t}\n"} +{"label": "65", "index": "32117", "code": "int main(){\nint m,i,k=0;\nint a,b;\nscanf(\"%d\",&m);\nfor(i=0;i0)\n\tprintf(\"A\");\nif(\tk==0)\nprintf(\"Tie\");\nif(k<0)\nprintf(\"B\");\nreturn 0;\n}"} +{"label": "65", "index": "32118", "code": "int main(){\n\nint n;\nscanf(\"%d\",&n);\nint a=0;\nint b=0;\nint i;\nfor(i=0;ib){\n\nprintf(\"A\");\n\n}\n\nelse{\nprintf(\"B\");\n\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nreturn 0;\n}"} +{"label": "65", "index": "32119", "code": "int main(){\n\tint n,i,a,b,x,y;\n x=0,y=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy){printf(\"A\");}\n\telse if(xB){\n\tprintf(\"A\\n\");\n}\nelse if(A==B){\n\tprintf(\"Tie\\n\");\n}\nelse{\n\tprintf(\"B\\n\");\n}\n\treturn 0;\n}"} +{"label": "65", "index": "32121", "code": "int main(){\n int n;\n int a[200],b[200];\n int s1=0,s2=0;\n scanf(\"%d\\n\",&n);\n int i;\n for(i=0;ib[i])\n\t {s2++;}\n\t else{\n\t\t s1++;s2++;}\n }}\n if(s1>s2)\n {printf(\"A\");}\n else if(s1t) printf(\"A\");\n else if(stb) printf(\"A\\n\");\n\telse if (tay){\n\t\tprintf (\"A\");\n\t}else if (xk){printf(\"A\");}else{\n if(jm)\n\t\tprintf(\"A\");\n\tif(kbw){printf(\"A\");}\n\telse if(aws)\n\t\tprintf(\"A\");\n\telse if(s>t)\n\t\tprintf(\"B\");\n\telse\n\t\tprintf(\"Tie\");\n\treturn 0;\n}\n"} +{"label": "65", "index": "32129", "code": "int main(){\n int n,a,b,x=0,y=0,i;\n scanf(\"%d\",&n);\n for(i=0;iy){\n printf(\"A\");}else if(xt){\n printf(\"A\");\n }\n else if(sp) printf(\"A\");\n if(qj)\nprintf(\"A\");\nif(ib){\n\t\tprintf(\"A\\n\");\n\t}else if(at)\n\t{\n\t\tprintf(\"A\");\n\t}\n\tif(t>r)\n\t{\n\t\tprintf(\"B\");\n\t}\n\tif(r==t)\n\t{\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32135", "code": "int main()\n{\n\tint n,a[200][3],i,A=0,B=0,t=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iB)\n{\n\tprintf(\"A\");\n}\nelse if(Ab){printf(\"A\");}\n else if(am) {printf(\"A\");}\n else if(kb)\n printf(\"A\");\n if(a==b)\n printf(\"Tie\");\n if(ab)\n\t\tprintf(\"A\");\n\telse if(b>a)\n\tprintf(\"B\");\n else\n\t\tprintf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32140", "code": " int main(){\n int n,c=0,d=0,a,b,e=0;\n scanf(\"%d\",&n);\n for(int i=0;id){\n printf(\"A\");\n }\n else if(cq)\nprintf(\"A\");\nelse if(md){\nprintf(\"A\");\n}else if(cb){\nprintf(\"A\");\n}else{\nprintf(\"B\");\n}\nreturn 0;\n}"} +{"label": "65", "index": "32144", "code": "int main (){\n int n,i,a,b,aa=0,bb=0,pp=0;\n scanf(\"%d\",&n);\n for(i=0;ibb){\n printf(\"A\");\n }else{\n if(aa==bb){\n printf(\"Tie\");\n }else{\n printf(\"B\");\n }\n }\n return 0;\n}\n"} +{"label": "65", "index": "32145", "code": "int main()\n{\n int a=0,b=0,j,k,n;\n scanf(\"%d\",&n);\n while(n>0){\n scanf(\"%d%d\",&j,&k);\n if(j==k)\n {\n a++;\n b++;\n } \n else{\n if((j==0&&k==1)||(j==1&&k==2)||(j==2&&k==0))\n a++;\n else\n b++;\n }\n n--;\n }\n if(a>b)\n printf(\"A\");\n if(aa[j]){c++;}\n if(a[j]==2&&b[j]==0){c++;}\n if(b[j]==0&&a[j]==1){d++;}\n if(b[j]==1&&a[j]>b[j]){d++;}\n if(b[j]==2&&a[j]==0){d++;}\n }\n if(c>d){printf(\"A\");}\n if(cb){\n\t\tprintf(\"A\");\n\t}\n\telse if(b>a){\n\t\tprintf(\"B\");\n\t}\n\telse if(b=a){\n\t\tprintf(\"Tie\");\n\t}\n\n\treturn 0;\n}"} +{"label": "65", "index": "32148", "code": "int main(){\nint n,a[100],b[100],i,x=0,y=0;\nscanf(\"%d\",&n);\nfor(i=0;iy){printf(\"A\");}\nelse if(x0){\n\tprintf(\"A\");\n\t}else if(c==0){\n\tprintf(\"Tie\");\n\t}else{\n\tprintf(\"B\");\n\t}\n\n\n\n\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32150", "code": "int main(){\n\tint n, i;\n\tscanf(\"%d\", &n);\n\tint a[1000], b[1000];\n\tfor(i=0;iy){\n\tprintf(\"A\");\n }\n if(x==y){\n\tprintf(\"Tie\");\n }\n if(xB)\n\t\tprintf(\"A\");\n\telse if(A0){\n\t\tprintf(\"A\");\n\t}else if(k==0){\n\t\tprintf(\"Tie\");\n\t}else if(k<0){\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32153", "code": "int main(){\n int n,i,a,b;\n int sum=0;\n scanf(\"%d\",&n);\n for(i=0;i0){\n printf(\"A\");\n }else if(sum<0){\n printf(\"B\");\n }else if(sum==0){\n printf(\"Tie\");\n }return 0;\n}"} +{"label": "65", "index": "32154", "code": "int main(){\n int n,a,b,s[200][2],i,j;\n scanf(\"%d\",&n);\n a=0;b=0;\n for(i=0;ib){printf(\"A\");}\n if(a==b){printf(\"Tie\");}\n if(al){\n printf(\"A\");\n }\n if(sd){\n\t\tprintf(\"A\");\n\t}\n\tif(c==d){\n\t\tprintf(\"Tie\");\n\t}\n\tif(cb){\n\t\tprintf(\"A\");}\n\tif(a=0)\n\t\tprintf(\"A\");\n\telse \n\t\tprintf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32159", "code": "int main()\n{\n\tint a[300],b[300];\n\tint n;\n\tint i;\n\tint x=0,y=0;\n\tcin>>n;\n\tfor(i=0 ; i>a[i]>>b[i];\n if(a[i]==0 && b[i]==1)\n\t\t\tx++;\n\t\telse if(a[i]==1 && b[i]==2)\n\t\t\tx++;\n\t\telse if(a[i]==2 && b[i]==0)\n\t\t\tx++;\n\t\telse if(a[i]!=b[i])\n\t\t\ty++;\n\t}\n\tif(x>y)\n\t\tcout<<\"A\";\n\telse if(x==y)\n\t\tcout<<\"Tie\";\n\telse \n\t\tcout<<\"B\";\n\treturn 0;\n}"} +{"label": "65", "index": "32160", "code": "int main()\n{\n\tint n,i,as,bs,pj;\n\tint a[200],b[200];\n\tscanf(\"%d\",&n);\n\tas=0,bs=0,pj=0;\n\tfor(i=0;ibs){\n\t\tprintf(\"A\");\n\t}\n\tif(asB)\n printf (\"A\\n\");\n if (B>A)\n printf (\"B\\n\");\n if (A==B)\n printf (\"Tie\\n\"); \n}"} +{"label": "65", "index": "32162", "code": "\n\nint main()\n{ \n\n int n,a,b,i,c,k=0,j=0;\n scanf(\"%d\",&n);\n \n for(i=0;ij) printf(\"A\");\n else if(k==j) printf(\"Tie\");\n else printf(\"B\");\nreturn 0;\n}"} +{"label": "65", "index": "32163", "code": "main()\n{\n int n;\n int i;\n scanf(\"%d\",&n);\n int a[n],b[n];\n int s=0,t=0;\n for(i=0;it)\n printf(\"A\\n\");\n else if (s==t)\n printf(\"Tie\\n\");\n else\n printf(\"B\\n\");\n \n \n}"} +{"label": "65", "index": "32164", "code": "int main(){\n int n,i,result;\n result=0;\n scanf(\"%d\\n\",&n);\n int a[200][2];\n for(i=0;i0){\n printf(\"A\");\n }else if(result<0){\n printf(\"B\");\n }else if(result==0){\n printf(\"Tie\");\n }\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32165", "code": "\nint main(){\n int n,i;\n double jieguo=0.00;\n scanf(\"%d\\n\",&n);\n int a[n],b[n];\n for (i=0;i0.00){printf(\"A\");}\n else {printf(\"B\");}\n return 0;\n}"} +{"label": "65", "index": "32166", "code": "int main()\n{\nint n,a,b,i,a1=0,b1=0,c1=0;\nscanf(\"%d\",&n);\nfor(i=0;ib&&(a-b)==2))\n a1++;\n else if(a==b) c1++;\n else b1++;\n }\n if(a1>b1)\n printf(\"A\");\n else if(a1d)\n\t\tprintf(\"A\");\n\telse if(c0)printf(\"A\");\t\nif(z<0)printf(\"B\");\t\nif(z==0)printf(\"Tie\");\t\nreturn 0;\n\n}"} +{"label": "65", "index": "32169", "code": "int a[210],b[210],n;\nint pd(int a,int b)\n{\n if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))\n return 1;\n else if(a==b)\n return 0;\n else\n return -1;\n} \nmain()\n{\n scanf(\"%d\",&n);\n int i;\n for(i=0;i0)\n printf(\"A\");\n else if(s==0)\n printf(\"Tie\");\n else\n printf(\"B\");\n \n} \n"} +{"label": "65", "index": "32170", "code": "int main(){\nint a=0,b=0;\nint x,y;\nint n,i;\nscanf(\"%d\",&n);\nfor(i=0;ib){printf(\"A\");\n}\nelse if(ab[i]){\n\t\t\t\t\tp++;\n\t\t\t\t}else{\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t}else if(a[i]+b[i]==3){\n\t\t\t\tif(a[i]>b[i]){\n\t\t\t\t\tp++;\n\t\t\t\t}else{\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t}else if(a[i]+b[i]==2){\n\t\t\t\tif(a[i]>b[i]){\n\t\t\t\t\tm++;\n\t\t\t\t}else{\n\t\t\t\t\tp++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\tif(m>p){\n\t\t\tprintf(\"A\");\n\t\t}else if(mt){\n printf(\"A\");\n }\n if(s1.0*(n-p)/2){printf(\"A\");}\n else if(k<1.0*(n-p)/2){printf(\"B\");}\n else{printf(\"Tie\");}\n return 0;\n}\n"} +{"label": "65", "index": "32174", "code": "int main (){\n\tint n,i,c=0,d=0;\n\tint a[200],b[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;id){\n\t\tprintf(\"A\");\n\t}\n\tif(c==d){\n\t\tprintf(\"Tie\");\n\t}\n\tif(cb){printf(\"A\");};\n\tif(at){\n\t\tprintf(\"A\");\n\t}else{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32177", "code": "int main(){\n\tint n,a[100],b[100],i,sy[100],P=0,A=0,B=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iB){\n\t\t\tprintf(\"A\\n\");break;}\n\t\telse if(Ay){\n printf(\"A\");\n }else if(xy){printf(\"A\");}\nelse if(x==y){printf(\"Tie\");}\nelse{printf(\"B\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32180", "code": "int main(){\n int n,a[200],b[200],sa=0,sb=0,i;\n scanf(\"%d\",&n);\n for(i=0;isb){printf(\"A\");}\n else{printf(\"B\");}\n return 0;\n} "} +{"label": "65", "index": "32181", "code": "int main()\n{\n\tint i,n,s=0,m=0;\n\tint a[200],b[200];\n\tscanf (\"%d\\n\",&n);\n\tfor (i=0;im)\n\t{\n\t\tprintf (\"A\");\n\t}\n\telse if (ssumb) {printf(\"A\");}\n else if (suma==sumb) {printf(\"Tie\");}\n else {printf(\"B\");}\n return 0;\n}\n"} +{"label": "65", "index": "32183", "code": "int main(){\n\tint n,i;\n\tint p=0,q=0;\n\tint a[101],b[101];\n\tscanf(\"%d\",&n);\n\tfor(i=0;iq){\n\t\tprintf(\"A\");\n\t}else if(pb){\n printf(\"A\");\n }\n else if(ab){\n printf(\"A\");\n } \n if(aB)\n printf(\"A\");\n else if(Aq){printf(\"A\");}\n else if (pd){\n\tprintf(\"A\");\n} \nif(cbi){\n\tprintf(\"A\");\n\t}else if(ai==bi){\n\tprintf(\"Tie\");\n\t}else{\n\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32190", "code": "int main(){\n int n,i,o=0 ,p=0,q=0;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=o;iq){\n printf(\"A\");\n }else if(ob){\n\tprintf(\"A\");}\nelse if(a0){\n\t\tprintf(\"A\\n\");\n\t}else{\n\t\tprintf(\"B\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32193", "code": "int main (){\n int n,i,k,l;\n scanf(\"%d\\n\",&n);\n int sz[n][2];\n for (i=0;i0){\n printf(\"A\");\n }else if(l==0){\n printf(\"Tie\");}\n else {\n printf(\"B\");\n } \n return 0;\n}"} +{"label": "65", "index": "32194", "code": "int main(){\n\tint a[300],b[300],n,i,k=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0)\n\t\tprintf(\"A\");\n\telse if(k<0)\n\t\tprintf(\"B\");\n\telse\n\t\tprintf(\"Tie\");\n\treturn 0;\n\n}\n"} +{"label": "65", "index": "32195", "code": "int main(){\n\tint n,i,a[201],b[201],x=0,y=0,t=0;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t\tif(a[i]==0){\n\t\t\tif(b[i]==1)x=x+1;\n\t\t\telse if(b[i]==2)y=y+1;\n\t\t\telse if(b[i]==0)t=t+1;\n\t\t}\n\t\telse if(a[i]==1){\n\t\t\tif(b[i]==1)t=t+1;\n\t\t\telse if(b[i]==2)x=x+1;\n\t\t\telse if(b[i]==0)y=y+1;\n\t\t}\n\t\n\t\telse if(a[i]==2){\n\t\t\tif(b[i]==1)y=y+1;\n\t\t\telse if(b[i]==2)t=t+1;\n\t\t\telse if(b[i]==0)x=x+1;\n\t\t}\n\t}\n\tif(x>y)printf(\"A\");\n\telse if(x0){printf(\"A\");}\n\tif(i<0){printf(\"B\");}\n\tif(i==0){printf(\"Tie\");}\n\treturn 0;\n}"} +{"label": "65", "index": "32197", "code": "int main(){\n\tint n,i,x,y;\n\tint a[3]={0};\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[2])\n\t\tprintf(\"A\");\n\telse if(a[1]0){\n\t\tprintf(\"B\\n\");\n\t}\n\telse if(x==0){\n\t\tprintf(\"Tie\\n\");\n\t}\n\telse if(x<0){\n\t\tprintf(\"A\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32199", "code": " int main()\n{\n\t int a,b,n,i;\n\t int p=0,q=0;\n\t scanf(\"%d\",&n);\n\t for(i=0;iq)\n\t\t {printf(\"A\");}\n\t\t else if(py){printf(\"A\");}\n return 0;\n}"} +{"label": "65", "index": "32201", "code": "int main(){\n int n,p=0,q=0,a[200],b[200],i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iq)\n\t\tprintf(\"A\");\n\telse if(py){\n printf(\"A\");\n }\n if(xb){\n\t\tprintf(\"A\");\n\t}\n\tif(a==b){\n\t\tprintf(\"Tie\");}\n\tif(ab)printf(\"A\\n\");\n if(aBw)\n printf(\"A\");\n else if(Awsb)\n\t{\n\t\tprintf(\"A\\n\");\n\t}else if(saB){printf(\"A\");}\nelse if(A==B){printf(\"Tie\");}\nelse{printf(\"B\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32208", "code": "int main()\n{\n\tint i,awin,bwin,n;\n\tint a[220],b[220];\n\tscanf(\"%d\",&n);\n\tawin=0;\n\tbwin=0;\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t\tif(a[i]==0&&b[i]==2){\n\t\t\tbwin++;\n\t\t}else{\n\t\t\tif(a[i]==2&&b[i]==0){\n\t\t\t\tawin++;\n\t\t\t}else{\n\t\t\t\tif(a[i]>b[i]){\n\t\t\t\t\tbwin++;\n\t\t\t\t}else{\n\t\t\t\t\tif(b[i]>a[i]){\n\t\t\t\t\t\tawin++;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(awin>bwin){\n\t\tprintf(\"A\");\n\t}else{\n\t\tif(bwin>awin){\n\t\t\tprintf(\"B\");\n\t\t}else{\n\t\t\tprintf(\"Tie\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32209", "code": "int main(){\n int n,i,a,b,s,t;\n s=0;t=0;\n scanf(\"%d\",&n);\n for(i=0;it){printf(\"A\");}\n else if(sb) printf(\"A\");\n\telse if(a==b) printf(\"Tie\");\n\telse printf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32211", "code": "int main(){\n\tint n,a,b;\n\tint as=0,bs=0;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;ibs)\n\t\tprintf(\"A\");\n\telse if(as>n;\n for(i=0;i>a[i]>>b[i];\n for(i=0;i0) cout<<\"A\";\n if(m<0) cout<<\"B\";\n if(m==0) cout<<\"Tie\";\n return 0;\n}\n"} +{"label": "65", "index": "32213", "code": "int main()\n{\nint n,i,g,j;\nint a[200],b[200];\nscanf(\"%d\",&n);\nfor(i=0;i0){\nprintf(\"A\");\n}\nif(g==0){\nprintf(\"Tie\");\n}\nif(g<0){\nprintf(\"B\");\n}\nreturn 0;\n}"} +{"label": "65", "index": "32214", "code": "int main() {\n\tint n,A=0,B=0,a[200],b[200],i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iB){printf(\"A\");}\n\telse if(Ab){\n\tprintf(\"A\");\n\t}else if(a==b){\n\t\tprintf(\"Tie\");\n\t}else {\n\tprintf(\"B\");\n\t}\n\n\t\treturn 0;\n}\n"} +{"label": "65", "index": "32216", "code": "\n\n\nint main()\n{\n\tint n,a,b,i,j;\n\tint c[200][2];\n\tscanf (\"%d\",&n);\n\ta=0;\n\tb=0;\n\tfor(i=0;ib){\n\t\tprintf(\"A\");\n\t}if(b>a){\n\t\tprintf(\"B\");\n\t\t}if(a==b){\n\t\t\tprintf(\"Tie\");\n\t\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32217", "code": "\n\nint main(int argc, char *argv[])\n{\n int n,i;\n scanf(\"%d\",&n);\n int a[200],b[200];\n int t=0,j=0;\n for(i=0;ij){\n printf(\"A\");\n }\n else if(tbb)printf(\"A\");\nelse printf(\"Tie\");\nreturn 0;\n}"} +{"label": "65", "index": "32219", "code": "int main()\n{\n\tint n,a,b,sa=0,sb=0;\n\tint i;\n\tscanf(\"%d\",&n);\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d%d\",&a,&b);\n\t\tif (a==b) continue;\n\t\telse if\t(a==0&&b==1) sa++;\n\t\telse if (a==1&&b==0) sb++;\n\t\telse if (a==1&&b==2) sa++;\n\t\telse if (a==2&&b==1) sb++;\n\t\telse if (a==2&&b==0) sa++;\n\t\telse if (a==0&&b==2) sb++;\n\t}\n\tif (sa>sb) printf(\"A\\n\");\n\telse if (sb>sa) printf(\"B\\n\");\n\telse printf(\"Tie\\n\");\n}\n\t"} +{"label": "65", "index": "32220", "code": "int main()\n{\n\tint a[200],b[200];\n\tint i,c=0,d=0,n;\n\tscanf(\"%d\",&n);\n for(i=0;id){\n\t\tprintf(\"A\");}\n\tif(c==d){\n\t\t\tprintf(\"Tie\");}\n\tif(cb)\n\t\tprintf(\"A\");\n\tif(ab)\n\t{printf(\"A\");}\n if(b>a)\n {printf(\"B\");}\n if(a==b)\n {printf(\"Tie\");}\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32223", "code": "int main(){\n int n,a,b,k,t=0,i=0,o=0;\n scanf(\"%d\",&n);\n for(k=0;ko){\n\t\t printf(\"A\");\n\t }\n\t else if(ip)\n\t\tprintf(\"A\");\n\telse if(my){\n\t\t\tprintf(\"A\");\n\t\t}else if(x2*d){\n\t\tprintf(\"B\");\n\t}\n\telse{\n\t\tprintf(\"Tie\");\n\t}\n\n\n\n\treturn 0;\n}"} +{"label": "65", "index": "32227", "code": "int main(){\n int n;\n scanf(\"%d\",&n);\n int a[n];\n int b[n];\n for(int i=1;i<=n;i++){scanf(\"%d %d\\n\",&a[i-1],&b[i-1]);}\n int c=0;\n int d=0;\n for(int i=1;i<=n;i++){\n if((a[i-1]==0&&b[i-1]==1)||(a[i-1]==1&&b[i-1]==2)||(a[i-1]==2&&b[i-1]==0)){c++;}\n if((b[i-1]==0&&a[i-1]==1)||(b[i-1]==1&&a[i-1]==2)||(b[i-1]==2&&a[i-1]==0)){d++;}\n }\n if(c>d){printf(\"A\");}\n if(cd){\n printf(\"A\");\n }\n else if(d>c){\n printf(\"B\");\n }\n else \n printf(\"Tie\");\n return 0;\n}\n"} +{"label": "65", "index": "32229", "code": "int main()\n{\n\tint n,i,a[200],b[200],sum=0;\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0)\n\t\tprintf(\"A\");\n\t \n else if(sum==0)\n printf(\"Tie\"); \n else if(sum<0)\n printf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32230", "code": "int main()\n{\n\tint n, a = 0, b = 0;\n\tscanf(\"%d\", &n);\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\tint x, y;\n\t\tscanf(\"%d %d\", &x, &y);\n\t\tif (x == y)\n\t\t\tcontinue;\n\t\telse\n\t\t{\n\t\t\tif (x == 0)\n\t\t\t{\n\t\t\t\tif (y == 1)\n\t\t\t\t\ta++;\n\t\t\t\telse\n\t\t\t\t\tb++;\n\t\t\t}\n\t\t\telse if (x == 1)\n\t\t\t{\n\t\t\t\tif (y == 2)\n\t\t\t\t\ta++;\n\t\t\t\telse\n\t\t\t\t\tb++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (y == 0)\n\t\t\t\t\ta++;\n\t\t\t\telse\n\t\t\t\t\tb++;\n\t\t\t}\n\t\t}\n\t}\n\tif (a == b)\n\t\tprintf(\"Tie\");\n\telse if (a > b)\n\t\tprintf(\"A\");\n\telse\n\t\tprintf(\"B\");\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32231", "code": "int main()\n{\n int n,i,A=0,B=0;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=0;iB)\n printf(\"A\");\n else if(B>A)\n printf(\"B\");\n else\n printf(\"Tie\");\n}\n"} +{"label": "65", "index": "32232", "code": "\nint main(){\n int q,i,a=0,b=0,m,n;\n\n\tscanf(\"%d\",&q);\n\n\tfor(i=0;ib) printf(\"A\");\n\telse if(at){\n\t\tprintf(\"A\");\n\t}else if(s bc)\n printf(\"A\");\n else if (bc > ac)\n printf(\"B\");\n else\n printf(\"Tie\");\n return 0;\n}"} +{"label": "65", "index": "32235", "code": "int main(){\n\tint n,a=0,b=0,x[200],y[200];\n\tscanf(\"%d\",&n);\n\n\tfor(int i=0;ib){\n\t\tprintf(\"A\");\n\t}else if(ay){printf(\"A\");}\n\telse if(xB){\n\t\tprintf(\"A\");\n\t}else if(Az){\n printf(\"A\");\n }else if(yj)printf(\"A\");\n else if(j>i)printf(\"B\");\n else if(i==j)printf(\"Tie\");\n return 0;\n}\n\n"} +{"label": "65", "index": "32240", "code": "int panduan(int a,int b){\n\tif(a==b)\n\t\treturn 0;\n\telse if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))\n\t\treturn 1;\n\telse\n\t\treturn -1;\n}\nint main(){\n\tint n,a,b,x=0;\n\tscanf(\"%d\",&n);\n\n\twhile(n--){\n\t\tscanf(\"%d%d\",&a,&b);\n\t\tx+=panduan(a,b);\n\t}\n\n\tif(x>0)\n\t\tprintf(\"A\\n\");\n\telse if(x==0)\n\t\tprintf(\"Tie\\n\");\n\telse\n\t\tprintf(\"B\\n\");\n\t\n\treturn 0;\n}"} +{"label": "65", "index": "32241", "code": "int main()\n{\n int n,i,a=0,b=0;\n scanf(\"%d\",&n);\n int q[n],p[n];\n for(i=0;ib)printf(\"A\");\n if(ab)\n\t\tprintf(\"A\");\n\telse{\n\t\tprintf(\"B\");\n\t}\n\n\n\t\n\n\t\n\n\treturn 0;\n}\n"} +{"label": "65", "index": "32243", "code": "int main()\n{\n int a,b,i,n=0,m=0,l;\n scanf(\"%d\\n\",&l);\n for(i=0;in){printf(\"A\");}\n if(msb){\n\t\tprintf(\"A\");\n\t}else if(sanb)\n printf(\"A\");\n if(na==nb)\n printf(\"Tie\");\n if(nab)\n\t\t\ts++;\n\t\tif(a0)\n\t\tprintf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32247", "code": "int main(){\n\tint n,a=0,b=0,c,d,i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0)\n\t\t\tb++;\n\t}\n\tif(a>b)\n\t\tprintf(\"A\");\n\tif(a==b)\n\t\tprintf(\"Tie\");\n\tif(ak) printf(\"A\\n\");\n if(hj){printf(\"A\");}\n\t if(iB)\n\tprintf(\"A\");\n if(Aa[i]){\n k=k+1;\n\t\t\t }\n\t\t }\n if(a[i]==2){\n\t\t\t if(b[i]==0){\n\t\t\t\t k=k+1;\n\t\t\t }\n\t\t\t else if(b[i]==1){\n l=l+1;\n\t\t\t }\n\t\t }\n if(a[i]==0){\n\t\t\t if(b[i]==1){\n\t\t\t\t k=k+1;\n\t\t\t }\n\t\t\t else if(b[i]==2){\n l=l+1;\n\t\t\t }\n\t\t }\n\t }\n\tif(k>l){\n\t\tprintf(\"A\");\n\t}\n\telse if(k0)\n printf(\"A\\n\");\n if(sum==0)\n printf(\"Tie\\n\");\n if(sum<0)\n printf(\"B\\n\");\n}"} +{"label": "65", "index": "32253", "code": "int main()\n{\n int a[100],b[100],n,i,A=0,B=0;\n scanf(\"%d\",&n);\n for(i=0;iB)\nprintf(\"A\");\nif(A0){\n printf(\"A\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32255", "code": "main()\n{\n int n;\n int i,j,x=0,y=0;\n scanf(\"%d\",&n);\n int a[200][2]={10};\n for(j=0;jy)\n printf(\"A\");\n if (x==y)\n printf(\"Tie\");\n if(xb){\n\t\tprintf(\"A\");\n\t}else if(a==b){\n\t\tprintf(\"Tie\");\n\t}else if(af){\n\t\tprintf(\"A\");\n\t}\n\tif(sy) printf(\"A\\n\");\n }"} +{"label": "65", "index": "32259", "code": "int main()\n{\nint a,b,i,n;\nint c=0;\nscanf(\"%d\",&n);\nfor(i=0;i0){printf(\"A\");}\nelse if(c<0){printf(\"B\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32260", "code": "int main(){\n int a=0,b=0;\n int i,n;\n int A[200],B[200];\n scanf(\"%d\",&n);\n for(i=0;ib){\n printf(\"A\");\n }else if(ab) {\n\t\tprintf(\"A\");\n\t}\n\telse if (ahuk)\n printf(\"A\");\n else if(suml){\n printf(\"A\");\n }else if(jq)\nprintf(\"A\");\nelse if(pn)\n printf(\"A\");\n else if(my) printf(\"A\");\n if(x==y) printf(\"Tie\");\n if(x 0) printf(\"A\\n\");\n else if (count < 0) printf(\"B\\n\");\n else printf(\"Tie\\n\");\n return 0;\n}\n"} +{"label": "65", "index": "32268", "code": "int main() {\n\tint n,i,a=0,b=0;\n\tint A[201];\n\tint B[201];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib){\n\t\tprintf(\"A\");\n\t}else{\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "65", "index": "32269", "code": "int main(){\nint n,i,a,b,A,B;\nscanf(\"%d\", &n);\na=0;\nb=0;\nfor(i=1;i<= n;i++){\nscanf(\"%d %d\", &A,&B);\nif(A==0&&B==0||A==1&&B==1||A==2&&B==2){\na=a;}\nelse if(A==0&&B==1||A==1&&B==2||A==2&&B==0){\na=a+1;}\nelse if(A==0&&B==2||A==1&&B==0||A==2&&B==1){\nb=b+1;}}\nif(a>b){printf(\"A\");}\nelse if(ab){printf(\"A\");}\nelse if(a0)printf(\"A\");\n\tif(s<0)printf(\"B\");\n\tif(s==0)printf(\"Tie\");\n\n\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32272", "code": "int main(){\n int n,i,j,w=0,l=0;\n scanf(\"%d\\n\",&n);\n int sz[n][2];\n for(i=0;il){\n\t\tprintf(\"A\");\n\t}\n\telse if(w0){printf(\"A\");}\nif(A<0){printf(\"B\");}\nif(A==0){printf(\"Tie\");}\nreturn 0;\n}"} +{"label": "65", "index": "32274", "code": "int cai(int a,int b)\n{\n if(a==b)\n return 2;\n if(a==0&&b==1)\n return 1;\n if(a==0&&b==2)\n return 0;\n if(a==1&&b==0)\n return 0;\n if(a==1&&b==2)\n return 1;\n if(a==2&&b==0)\n return 1;\n if(a==2&&b==1)\n return 0;\n}\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n int a[200],b[200];\n int i,j,k;\n j=0;k=0;\n for(i=0;ik)\n printf(\"A\");\n else\n printf(\"B\");\n }\n"} +{"label": "65", "index": "32275", "code": "int main()\n{\n\tint n,i,p,q;\n\tint a[100],b[100];\n\tscanf(\"%d\",&n);\n\tp=0;\n\tq=0;\n\tfor(i=0;iq)\n\t{\n\t\tprintf(\"A\");\n\t}\n\telse\n\t{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32276", "code": "int main(){\n\tint i, n,a,b,sa=0,sb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;isb)printf(\"A\");\n\telse if(say){printf(\"A\");}\n else if(xB)\n printf(\"A\");\n else if(Ae)\nprintf(\"A\");\nelse\nprintf(\"B\"); \n } \nelse{\ne=m/2;\nif(t>e)\nprintf(\"A\");\nelse\nprintf(\"B\");} }\nelse \nprintf(\"Tie\");\nreturn 0;\n}\n"} +{"label": "65", "index": "32280", "code": "int main ()\n{\nint n,i;\nint a[1000];\nint b[1000];\nint result[1000];\nint ax=0,bx=0;\n\nscanf (\"%d\",&n);\nfor (i=0;ibx) {printf (\"A\");}\nelse if (axq){\nprintf(\"A\");}\nif(q>p){\nprintf(\"B\");}\nif(p==q){\nprintf(\"Tie\");}\nreturn 0;\n}"} +{"label": "65", "index": "32282", "code": "int main()\n{\n\tint n,i,j,a=0,c;\n\tint b[200][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0)\n\t\tprintf(\"A\");\n\tif(a<0)\n\t\tprintf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32283", "code": "int main()\n{\n int n,i,j,s1=0,t,s2=0;\n char a[200],b[200];\n scanf(\"%d\",&n);\n for(i=0,j=0;is2)\n {\n printf(\"A\");\n }\n else\n if(s1q)\n{printf(\"A\\n\");\n}\nelse\n{if(m==q)\n{printf(\"Tie\\n\");\n}\nelse\n{printf(\"B\\n\");\n}\n}return 0;\n}"} +{"label": "65", "index": "32285", "code": "int main(){\n int n;\n int a=0;\n int b=0;\n int ax[250];\n int bx[250];\n scanf(\"%d\",&n);\n for(int i=0;ib){printf(\"A\");}\n if(at){\n\tprintf(\"A\");\n}\nelse if(s0) printf(\"A\");\n else if(win<0) printf(\"B\");\n else if(win==0) printf(\"Tie\");\n }\n"} +{"label": "65", "index": "32288", "code": "\nint i=0,n=0,m=0,p=0,q=0,r=0,t=0,e=0,k=0;\nint a[1000][1000],b[1000][1000];\nint main (){\nscanf(\"%d\",&n);\nfor(i=0;it)printf(\"B\");\nelse if(ej)\nprintf(\"A\");\nelse if(iB){\n printf(\"A\");\n }else if(Ab[i]&&a[i]-b[i]!=2)||b[i]-a[i]==2){\nk++;}\n}\nif(j>k){\nprintf(\"A\");}\nif(jd)\nprintf(\"A\");\n\nif(cB){\nprintf(\"A\");\n}\nif(B>A){\nprintf(\"B\");\n}\nreturn 0;\n}"} +{"label": "65", "index": "32294", "code": "int main()\n{\n int a[200],b[200],i,j,k,n;\n j=0; k=0;\n scanf(\"%d\\n\",&n);\n for(i=0;ik) {printf(\"A\");}\n else {printf(\"B\");} \n }\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32295", "code": "int main()\n{\n\tint n,i,j,k;\n\tint A,B,C;\n\tint a[50],b[50];\n\tscanf(\"%d\",&n);\n A=0;\n B=0;\n\tfor(i=0;iB)\n\t\tprintf(\"A\");\n\tif(A==B)\n\t\tprintf(\"Tie\");\n\tif(Ad){\n printf (\"A\");\n }\n else if (cl){\n printf(\"A\");\n }\n else if(l>k){\n printf(\"B\");\n }\n else if(l=k){\n printf(\"Tie\");\n }\n return 0;\n}"} +{"label": "65", "index": "32298", "code": "\nint main (){\n\tint n,i,ta,tb;\n\tint a[200],b[200],x[200];\n\n\tscanf(\"%d\",&n);\n\n\tfor (i=0;in)\n printf(\"A\");\n if(mk)\n printf(\"A\");\n else if(k>r){\n printf(\"B\");}\n else {printf(\"Tie\");}\n return 0;\n }\n"} +{"label": "65", "index": "32301", "code": "int main(){\n int n,i,a=0,b=0,c,d;\n scanf(\"%d\",&n);\n for(i=0;ic)b++;\n }\n if(ab)printf(\"A\");\n else printf(\"Tie\");\n return 0;\n}"} +{"label": "65", "index": "32302", "code": "int main(){\n\tint n,a,b,c=0,d=0;\n\tscanf(\"%d\\n\",&n);\n for(int i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&a,&b);\n\t\tif(a-b==1){d=d+1;}else if(a-b==-1){\n\t\t\t\tc=c+1;}else if(a-b==-2){\n\t\t\t\t\td=d+1;}else if(a-b==2){\n\t\t\t\t\t\tc=c+1;}else if(a=b){\n\t\t\t\t\t\t\tc=c;d=d;}}\nif(c>d){printf(\"A\");}else if(c==d){\n\t\tprintf(\"Tie\");}else if(cs2)\n {\n printf(\"A\");\n \n }\n if(s1b){printf(\"B\");}\nelse if(b>a){printf(\"A\");}\nelse if(b==a){printf(\"Tie\");}\n \n return 0;\n \n}\n \n"} +{"label": "65", "index": "32305", "code": "\nmain()\n{\n int a[200], b[200], n, count=0;\n scanf(\"%d\", &n);\n int i;\n for (i=0; i0)\n printf(\"A\\n\");\n if (count < 0)\n printf(\"B\");\n if (count == 0)\n printf(\"Tie\");\n \n}\n"} +{"label": "65", "index": "32306", "code": "int main (){\n\tint n,i,sza[200],szb[200],a=0,b=0;\n\tscanf (\"%d\",&n);\n\tfor (i=0;ib){\n\t\tprintf (\"A\");\n\t}else {printf (\"B\");\n\t}\n\t}\n return 0;\n}\n\n\t\n\t\t"} +{"label": "65", "index": "32307", "code": "int main()\n{\n\tint n,i,A[200],B[200],V=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iB[i])\n\t\t\t\tV--;\n\t\t\telse if(A[i]0)\n\t\tputs(\"A\");\n\telse if(V<0)\n\t\tputs(\"B\");\n\telse\n\t\tputs(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32308", "code": "int main(){\n\tint n,a[200],b[200],i,sum1=0,sum2=0;\n\tscanf(\"%d\\n\",&n);\n\tfor(i=0;isum2){\n\t\tprintf(\"A\");\n\t}\n\tif(sum1q)\n\t\tprintf(\"A\");\n\telse if(p0) printf(\"A\");\n\telse if(a<0) printf(\"B\");\n\telse printf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32311", "code": "int main() {\n\tint n,i,a,b,r=0;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&a,&b);\n\t\tif(a==0&&b==1){\n\t\t\tr+=1;\n\t\t}else if(a==1&&b==2){\n\t\t\tr+=1;\n\t\t}else if(a==2&&b==0){\n\t\t\tr+=1;\n\t\t}else if(a==b){\n\t\t\tr=r;\n\t\t}else {\n\t\t\tr=r-1;\n\t\t}\n\t}\n\tif(r>0){\n\t\tprintf(\"A\");\n\t}else if(r<0){\n\t\tprintf(\"B\");\n\t}else {\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32312", "code": "int main(){\n int n=0,A=0,B=0;\n int a[200]={0},b[200]={0};\n int i=0,j=0;\n scanf(\"%d\",&n);\n for(i=0;iB){\n printf(\"%c\",'A');\n }else if(A0)\n printf(\"A\");\n else\n {\n if(j==0)\n printf(\"Tie\");\n else\n printf(\"B\");\n }\n \n }\n"} +{"label": "65", "index": "32314", "code": "int main(){\n\tint n,i;\n\tint A[200],B[200];\n\tint countA=0,countB=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;icountB) {\n\t\tprintf(\"A\");\n\t}else if(countB>countA){\n\t\t printf(\"B\");\n\t}else {\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32315", "code": "int main(){\nint n;\nscanf(\"%d\",&n);\nint b[n][2];\nint i,j,a=0,c=0;\nfor(i=0;ic){\n\tprintf(\"A\");\n}else if(am){\n printf(\"A\\n\");}else {printf(\"B\\n\");}\n \n \n return 0;\n}\n"} +{"label": "65", "index": "32317", "code": "int main()\n{\nint n;\nscanf(\"%d\\n\",&n);\nint sz[200],sb[200];\nint i,j;\nfor(i=0;ib){printf(\"A\");}\nelse if(ae){\n\t\tprintf(\"A\");\n\t}\n\tif(d==e){\n\t\tprintf(\"Tie\");\n\t}\n\tif(dwinb){printf(\"A\");}\n else if(winab){printf(\"A\");}else\n\t\t\t{printf(\"B\");}\n\t\t}\n\n return 0;\n}"} +{"label": "65", "index": "32322", "code": "int main()\n{\n int n,i,k;\n int a,b,s=0;\n scanf(\"%d\",&n);\n for(i=0;i0){\n printf(\"A\");\n }else{\n printf(\"B\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32323", "code": "int main(){\nint n,i,c;\nc=0;\nscanf(\"%d\",&n);\nint a[n],b[n];\nfor(i=0;i0){printf(\"A\");}\nelse if(c==0){printf(\"Tie\");}\nelse if(c<0){printf(\"B\");}\nreturn 0;\n}\n\n"} +{"label": "65", "index": "32324", "code": "\nconst int M = 200;\nint main(int argc, char *argv[])\n{\n int n; \n scanf(\"%d\",&n);\n int a[M],b[M];\n int an,bn;\n an =0;\n bn =0;\n for(int i = 0; i < n;i++)\n {\n scanf(\"%d %d\",&a[i],&b[i]);\n if(a[i]== 0 && b[i]==1)\n an++;\n if(a[i]==0 && b[i] == 2)\n bn++;\n if(a[i]==1 && b[i] == 0)\n bn++;\n if(a[i]==1 && b[i] == 2)\n an++;\n if(a[i]==2 && b[i] == 0)\n an++;\n if(a[i]==2 && b[i] == 1)\n bn++; \n }\n if(an>bn)\n printf(\"A\");\n if(an0)\n printf(\"A\");\n else if(sum<0)\n printf(\"B\");\n return 0;\n}"} +{"label": "65", "index": "32326", "code": "int main(){\nint n,i;\nint a[201],b[201];\nint c=0,d=0;\nscanf(\"%d\\n\",&n);\nfor(i=0;id){\nprintf(\"A\");}\nif(close)\n\t\tprintf(\"A\\n\");\n\telse if(winc){printf(\"A\");}\n else if(x==c){printf(\"Tie\");}\n else if(xsb){\n printf(\"A\");\n }\n if(sad)\n\t\tprintf(\"A\\n\");\n\telse\n\t\tprintf(\"B\\n\");\n\treturn 0;\n}"} +{"label": "65", "index": "32331", "code": "int main(){\n\tint n, i, a[1]={0}, b[1]={0}, m, k, c, d;\n\tscanf(\"%d\", &n);\n\tfor(i=0;id){\n\t\tprintf(\"A\");\n\t}\n\tif(cb)\n {\n printf(\"A\");\n }\n if(ab){\n\t\t\t\tif(a-b==1){\n\t\t B++;\n\t\t\t}else{\n\t\t\t\tA++;}}\n\t\telse if(a=b){A=A;B=B;}\n\t}\n\tif(A>B){\n\t\tprintf(\"A\");}\n\telse if(Asb){\n printf(\"A\");\n}else if(sao){\n printf(\"A\");\n }else if(mq){printf(\"A\");}\n\telse if(pd) printf(\"A\");\n\telse if(c==d) printf(\"Tie\");\n\telse printf(\"B\");\n\treturn 0;\n}\n\t\n"} +{"label": "65", "index": "32339", "code": "int main(){\n int n,i,a[200],b[200];\n int A=0,B=0;\n scanf(\"%d\",&n);\n for(i=0;iB){\n printf(\"A\");\n}\n if(A0)\n printf(\"A\\n\");\n else if(flag==0)\n printf(\"Tie\\n\");\n else\n printf(\"B\\n\");\n \n}\n"} +{"label": "65", "index": "32341", "code": "int main(){\nint i,m,n,a[200],b[200],p,q;\nscanf(\"%d\",&n);\np=0;\nq=0;\nfor(i=0;iq){\nprintf(\"A\");\n}\nif(pnb){\n\t\tprintf(\"A\");\n\t}else if(nab)printf(\"A\\n\");\n\telse\n\t{\n\t\tif(b>a)printf(\"B\\n\");\n\t\telse printf(\"Tie\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32344", "code": "int main(){\n int a=0,b=0,n,i;\n int ga[200],gb[200];\n scanf(\"%d\",&n);\n for(i=0;ib){\n printf(\"A\");\n }\n else if(an){\n\t\tprintf(\"A\");\n\t}else if(mp){printf(\"A\");}\nelse if(mq){\n printf(\"A\");\n }else if(pbscore)printf(\"A\");\nif(bscore>ascore)printf(\"B\");\nif(ascore==bscore)printf(\"Tie\");\n}"} +{"label": "65", "index": "32349", "code": "\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n int a=0,b=0;\n for (int i=0;ib) printf(\"A\\n\");\n else if (ab){\n\t\tprintf(\"A\");\n\t}\n\tif(ad){\n printf(\"A\");\n }\n else if(ck){\n printf(\"A\");\n }else if(jtempb)\n\t\tprintf(\"A\");\n\tif(tempah){printf(\"A\");}\n\tif(kb){\n\t\tprintf(\"A\");\n\t}else if(a0){\n printf(\"A\");\n }\n if(s<0){\n printf(\"B\");\n }\n return 0;\n}"} +{"label": "65", "index": "32357", "code": "int main(){\nint i,n,x,y,w;\nint a,b;\na=0;b=0;\n\nscanf(\"%d\",&n);\n\nfor(i=1;i<=n;i++){\n scanf(\"%d %d\",&x,&y);\n w=y-x;\n if(w==1){\n a++;}else \n if(w==2){\n b++;}else\n if(w==-1){\n b++;}else\n if(w==-2){\n a++;}\n}\nif(a>b){\nprintf(\"A\");\n}else \nif(ad) printf(\"A\");\nif (cc){\n\t\tprintf(\"A\");\n\t}\n\telse if(bb){\n\t\tprintf(\"A\");\n\t}\n\telse if(ay){\nprintf(\"A\");}\nelse if(x==y){\nprintf(\"Tie\");}\nelse if(xres2) printf(\"A\");\n if(res1(n-tie)/2){printf(\"A\");}\n if(sum<(n-tie)/2){printf(\"B\");}\n if(sum==(n-tie)/2){printf(\"Tie\");}\n }\n if(n%2==1){\n if(sum>(n-tie-sum)){printf(\"A\");}\n if(sum<(n-tie-sum)){printf(\"B\");}\n if(sum==(n-tie-sum)){printf(\"Tie\");}\n }\n \n return 0;\n}\n\n\n\n\n\n\n"} +{"label": "65", "index": "32364", "code": "int main(){\n int n,a[200],b[200],i,x=0,y=0;\n scanf(\"%d\",&n);\n for(i=0;iy)\n\t printf(\"A\");\n else if (xq)\n\t\tprintf(\"A\");\n\tif(psz[1][i]){b=b+1;}\n else if(sz[0][i]b){printf(\"A\");}\n else if(ab)printf(\"A\");\nelse\nprintf(\"B\");\n\n\n \n}"} +{"label": "65", "index": "32368", "code": "int main()\n{\n\tint n,x,y;\n\tscanf(\"%d\",&n);\n\tx=0;\n\ty=0;\n\tint a[200],b[200];\n\tint i;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t\t\n\t\tif(a[i]==0)\n\t\t{\n\t\t\t\n\t\t\tif(b[i]==1)\n\t\t\t\tx=x+1;\n\t\t\tif(b[i]==2)\n\t\t\t\ty=y+1;\n\t\t}\n\t\tif(a[i]==1)\n\t\t{\n\t\t\tif(b[i]==0)\n\t\t\t\ty=y+1;\n\t\t\tif(b[i]==2)\n\t\t\t\tx=x+1;\n\t\t}\n\t\tif(a[i]==2)\n\t\t{\n\t\t\tif(b[i]==0)\n\t\t\t\tx=x+1;\n\t\t\tif(b[i]==1)\n\t\t\t\ty=y+1;\n\t\t}\n\t}\n\tif(x==y)\n\t\tprintf(\"Tie\");\n\tif(xy)\n\t\tprintf(\"A\");\n\treturn 0;\n}"} +{"label": "65", "index": "32369", "code": "int main(){\n\tint n;\n\tint i;\n\tint s,t;\n\tint a[MAX],b[MAX];\n\ts=0;\n\tt=0;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&a[i],&b[i]);\n\t\tif(a[i]==0&&b[i]==1){\n\t\t\ts=s+1;\n\t\t}\n\t\tif(a[i]==0&&b[i]==2){\n\t\t\tt=t+1;\n\t\t}\n\t\tif(a[i]==1&&b[i]==0){\n\t\t\tt=t+1;\n\t\t}\n\t\tif(a[i]==1&&b[i]==2){\n\t\t\ts=s+1;\n\t\t}\n\t\tif(a[i]==2&&b[i]==0){\n\t\t\ts=s+1;\n\t\t}\n\t\tif(a[i]==2&&b[i]==1){\n\t\t\tt=t+1;\n\t\t}\n\t}\n\tif(s==t){\n\t\tprintf(\"Tie\");\n\t}\n\tif(s>t){\n\t\tprintf(\"A\");\n\t}\n\tif(sB){\n\t printf(\"A\");\n\t }\n\t else if(B>A){\n\t printf(\"B\");\n\t }\n\t else if(A=B){\n\t printf(\"Tie\");\n\t }\n return 0;\n }\n"} +{"label": "65", "index": "32371", "code": "int main(){\n\tint a[200],b[200];\n\tint n,i;\n\tint a1=0,b1=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib1){printf(\"A\");}\n\tif(a1b){printf(\"A\");}\n else if(ae)\n\t{\n\t\tprintf(\"A\\n\");\n\t}\n\telse\n\t{\n\t\tprintf(\"B\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32374", "code": "int main(){\n\tint a=0,b=0,n,i,c,d,e,f;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&c,&d);\n\t\te=d-c;\n\t\tf=c-d;\n\t\tif(e==1||f==2)a++;\n\t\telse if(f==1||e==2)b++;\n\t}\n\tif(a>b)printf(\"A\");\n\telse if(b>a)printf(\"B\");\n\telse printf(\"Tie\");\n\treturn 0;\n\n}"} +{"label": "65", "index": "32375", "code": "\nint main()\n{\n\tint n;\n\tcin>>n;\n\tint a=0,b=0;\n\tfor(int i=0;i>a1>>b1;\n\t\tif(a1==0){\n\t\t\tif(b1==1) a++;\n\t\t\tif(b1==2) b++;\n\t\t}else if(a1==1){\n\t\t\tif(b1==2) a++;\n\t\t\tif(b1==0) b++;\n\t\t}else{\n\t\t\tif(b1==0) a++;\n\t\t\tif(b1==1) b++;\n\t\t}\n\t}\n\tif(a>b) cout<<\"A\";\n\tif(aq)\n\t\tprintf(\"A\");\nreturn 0;\n}"} +{"label": "65", "index": "32377", "code": "int main(){\n int n,a,b,i,c,d,e;\n scanf(\"%d\",&n);\n d=0;\n e=0;\n for(i=0;ie){\n printf(\"A\");\n }else{\n if(dq||(q==p+2))o++;\n }\n if(n>o){printf(\"A\");}\n if(nB){\n\t\tprintf(\"A\");\n\t}\n\telse if(A==B){\n\t\tprintf(\"Tie\");\n\t}\n\telse{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32380", "code": "int main(){\n int n,a,b,i,A=0,B=0;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++){ \n scanf(\"%d %d\",&a,&b);\n if(a==0){\n if(b==0){\n continue;\n }\n else if(b==1){\n A++;\n }\n else{\n B++;\n }\n }\n else if(a==1){\n if(b==0){\n B++;\n }\n else if(b==1){\n continue;\n }\n else{\n A++;\n }\n }\n else{\n if(b==0){\n A++;\n }\n else if(b==1){\n B++;\n }\n else{\n continue;\n }\n }\n }\n if(A>B){\n printf(\"A\");\n }\n else if(Ab){printf(\"A\");}\nelse if(ay) printf(\"A\");\n else if(xB)\n printf(\"A\");\n if(Ad)printf(\"A\");\nif(cB)printf(\"A\");\nif(B>A)printf(\"B\");\nif(A==B)printf(\"Tie\");\nreturn 0;\n}\n\n\n\n \n\n\n"} +{"label": "65", "index": "32386", "code": "int main(){\n\tint n,a[100],i,b[100],c,d;\n\tscanf(\"%d\",&n);\n\tc=0;\n\td=0;\n\tfor(i=0;id){\n\t\t\tprintf(\"A\");\n\t}else if(c==d){\n\t\t\tprintf(\"Tie\");\n\t}else if(cl)\nprintf(\"A\");\nelse if(me)\n\t\tprintf(\"A\");\n\telse if(c==e)\n\t\tprintf(\"Tie\");\n\treturn 0;\n}"} +{"label": "65", "index": "32389", "code": "int main(){\nint i,n,a[1000],b[1000],q=0,w=0,e=0;\nscanf(\"%d\",&n);\nfor(i=0;ib[i]){\nif(a[i]==2&&b[i]==0) w++;\nelse e++;\n}\n}\nif(e>w) printf(\"B\");\nif(e0){\n\t\tprintf(\"B\");\n\t}\n\tif(c<0){\n\t\tprintf(\"A\");\n\t}\n\t\n\n\n\treturn 0;\n}\n"} +{"label": "65", "index": "32391", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i;\n\tint a[n],b[n];\n\tfor(i=0;id){\n\t printf(\"A\");\n\t}else if(cbv){\n\tprintf(\"A\");}\n\tif(av==bv){\n\tprintf(\"Tie\");}\n\tif(avd){\n printf(\"A\");\n }\nif(cd){\n\t\tprintf(\"A\");\n\t}else if(cB){\n\t\tprintf(\"A\");\n\t}\n\telse {\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32396", "code": "int main(){\n int n,i,b=0,a=0;\n scanf(\"%d\",&n);\n int A[n],B[n];\n for(i=0;ib){\n printf(\"A\");\n }else if(a==b){\n printf(\"Tie\");\n }else if(ab){\n printf(\"A\");\n }\n else if(a==b){\n printf(\"Tie\");\n }\n else if(am){\n\t\tprintf(\"A\");\n\t}else if((p*2)==m){\n\t\tprintf(\"Tie\");\n\t}else{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32399", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a[200];\n\tint b[200];\n\tint x=0;\n\tint y=0;\n\tfor(int i=0;ib[m]){\n\t\t\tif(a[m]==2&&b[m]==0){\n\t\t\t\tx++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\tif(x>y){\n\t\tprintf(\"A\");\n\t}\n\tif(xb){printf(\"A\");}\n\tif(abwin)\n\t\tprintf(\"A\\n\");\n\telse if(awinb){\n\t\tputs(\"A\");\n\t}else\n\t\tputs(\"B\");\n}"} +{"label": "65", "index": "32403", "code": "int main()\n{\n\tint n,a=0,b=0;\n\tscanf(\"%d\",&n);\n\tint num[n][2];\n\tfor(int i=0;ib)\n\t{printf(\"A\");}\n\tif(a==b)\n\t{printf(\"Tie\");}\n\tif(b>a)\n\t{printf(\"B\");}\n\treturn 0;\n} \n\n\n\n"} +{"label": "65", "index": "32404", "code": "int main(){\nint n;\nint a[1000],b[1000];\nscanf(\"%d\",&n);\nint i,c,d;\nc=0;\nd=0;\nfor(i=0;id){\n printf(\"A\");\n }else if(cr){\nprintf(\"A\");}\nelse if(r>t){\nprintf(\"B\");}\nelse {\nprintf(\"Tie\");}\nreturn 0;\n}\n"} +{"label": "65", "index": "32406", "code": "int main(){\n int a,b,n,i;\n scanf(\"%d\",&n);\n int z[n],x[n];\n for(i=0;ix[i]){\n b++;\n }\n }\n if(a>b){\n printf(\"A\");\n }\n else if(az)\n {\n printf(\"B\");\n }\n return 0;\n }\n"} +{"label": "65", "index": "32408", "code": "int main()\n{\n int n,i,j,s;\n int a[200][3];\n scanf(\"%d\",&n);\n for(i=0;is)\n\t printf(\"A\");\n if(j==s)\n\t printf(\"Tie\");\n return 0;\n}\n"} +{"label": "65", "index": "32409", "code": "int main(){\n int a,b,x,y,n,i;\n\tscanf(\"%d\",&n);\n a=0;\n\tb=0;\n\tfor(i=0;iy){\n b++;\n }else{\n\t\t\t a++;\n\t\t\t}\n\t\t}\n\t if((x-y)*(x-y)==4){\n\t\t\tif(x>y){\n a++;\n }else{\n\t\t\t b++;\n\t\t\t}\n\t\t}\n\t}\n\tif(a>b){\n\t printf(\"A\\n\");\n\t}\n if(a==b){\n\t printf(\"Tie\\n\");\n\t}\n if(ah)printf(\"A\");\n\tif(tsum2){\nprintf(\"A\");\n}\nelse if(sum10){\n\t\tprintf(\"A\");\n\t}\n\telse if(s==0){\n\t\tprintf(\"Tie\");\n\t}\n\telse{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32413", "code": "int main()\n{\n\n int n,i;\n int x,y,z;\n x=0;\n y=0;\n z=0;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=0;ib)\n\t\t\tprintf(\"A\");\n\t\tif(ab)\n printf(\"A\\n\");\n else if(ak)\n\t\tprintf(\"A\");\n\telse if(y==k)\n\t\tprintf(\"Tie\");\n\telse if(ybs){printf(\"A\");}\n else{printf(\"B\");}}\n return 0;\n }\n"} +{"label": "65", "index": "32419", "code": " \nmain()\n{\n int n,i,j, c,d;\n int a=0,b=0;\n scanf(\"%d\",&n);\n for(i=0;ib)printf(\"A\");\n else if(ay) printf(\"A\");\n else if(xy){\n\t\tprintf(\"A\");\n\t}\n\tif(xb){\n\t\tprintf(\"A\");\n\t}\n\tif(ab){printf(\"A\");}\n if(a==b){printf(\"Tie\");}\n if(ad){\n\t\t\tprintf(\"A\");\n\t\t}\n \telse {\n\t\t\tprintf(\"Tie\");\n\t\t}\n return 0;\n}\n"} +{"label": "65", "index": "32425", "code": "int main(){\n\tint a;\n\tint b;\n\tint n;\n\tint i;\n\ta=0;\n\tb=0;\n\tint zzd[202];\n\tint hzy[202];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib){\n\tprintf(\"A\");\n\t}\n\telse if(aq)\n\t\tprintf(\"A\");\n\telse if(p0){\n printf(\"A\");\n }else if(s==0){\n printf(\"Tie\");\n }else{\n printf(\"B\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32428", "code": "int main(){\n\tint c[N][N];\n\tint a=0;\n\tint b=0;\n\tint i, k, n;\n\tscanf(\"%d\", &n);\n\tfor(i=0;ib){\n\t\t printf(\"A\");\n\t }else if(ab)printf(\"A\");\n else if(aq){\n\t\tprintf(\"A\");\n\t}else if(q>p){\n\t\tprintf(\"B\");\n\t}else{\n\t\tprintf(\"Tie\");\n\t}\n\t\treturn 0;\n}\n\n"} +{"label": "65", "index": "32431", "code": "main()\n{\n int n,i,sum1=0,sum2=0,a,b;\n scanf(\"%d\",&n);\n for(i=0;isum2)\n printf(\"A\");\n if(sum1==sum2)\n printf(\"Tie\");\n if(sum1>n;\n\taa=0;\n\tbb=0;\n\tfor (int i=0;i>a>>b;\n\t\tif (a-b==-1||a-b==2) aa++;\n\t\tif (a-b==1||a-b==-2) bb++;\n\t\tif (a==b) {a+=0;b+=0;}\n\t\t}\n \tif (aa>bb) cout<<\"A\";\n \tif (aaB){printf(\"A\");}\n\telse if(AB){\n printf(\"A\");\n }else if(Ab){printf(\"A\\n\");}else if(ab){printf(\"A\");}\n if(ab)\n printf(\"A\");\n else\n {\n if(a0){\n printf(\"A\");\n }\n if(a<0){\n printf(\"B\");\n }\n return 0;\n}\n"} +{"label": "65", "index": "32439", "code": "int main()\n{\n\tint n,a[200],b[200],c,d,i;\n\tscanf(\"%d\",&n);\n\tc=0;\n\td=0;\n\tfor(i=0;id)\n\t{\n\t\tprintf(\"A\");\n\t}\n\tif(c0)\n printf(\"A\");\n if(m<0)\n printf(\"B\");\n return 0;\n \n}"} +{"label": "65", "index": "32441", "code": "int main()\n{\n\tint n,i=0,a,b,c,j=0,k=0;\n\tscanf(\"%d\",&n);\n\twhile(ik){\n\t\tprintf(\"A\");\n\t}else if(jB)\n\t\t\t{\n\t\t\t\tprintf(\"A\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"B\");\n\t\t\t}\n\t\t}\n\treturn 0;\n}\n\t\t\t\t\n"} +{"label": "65", "index": "32443", "code": "int main(){\n int n,i,k,a[201],b[201];\n scanf(\"%d\",&n);\n for(i=0;i0){\n printf(\"A\");\n }else if(k==0){\n printf(\"Tie\");\n }else{\n printf(\"B\");\n }\n return 0;\n}\n\n"} +{"label": "65", "index": "32444", "code": "int main(){\n\tint a,b,n,x[200][2],i;\n\tscanf(\"%d\",&n);\n\ta=0;\n\tb=0;\n\tfor(i=0;ib){\n\t\tprintf(\"A\\n\");\n\t}else if(ab)\n {\n printf(\"A\");\n }\n else if(b>a)\n {\n printf(\"B\");\n }\n else if(a==b)\n {\n printf(\"Tie\");\n }\n return 0;\n}"} +{"label": "65", "index": "32446", "code": "int main(){\n int n,i,j,sz[200][2],a,b;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n for(i=0;isumb){\n printf(\"A\");}\n if(sumab){\n\t\tprintf(\"A\");}\n\tif(a==b){\n\t\tprintf(\"Tie\");}\n\tif(aB){\n\t\tprintf(\"A\");\n\t}else if(B>A){\n\t\tprintf(\"B\");\n\t}else if(B==A){\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32450", "code": "int main(){\nint n,a,b,i,s=0;\nscanf(\"%d\",&n);\nfor(i=0;i0){printf(\"A\");}\nelse if(s<0){printf(\"B\");}\nelse{printf(\"Tie\");}\nreturn 0;\n}"} +{"label": "65", "index": "32451", "code": "int main()\n{\n\tint n,a,b,i,k,t;\n\tscanf(\"%d\",&n);\n k=0;t=0;\n\tfor(i=0;it){printf(\"A\");\n\t}else\n\t{\n\t\tif(kb){\n\t\tprintf(\"A\");\n\t}else if(at)\nprintf(\"A\");\nelse if(sp){\n\t\tprintf(\"A\");\n\t}else if(k==p){\n\t\tprintf(\"Tie\");\n\t}else{\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "65", "index": "32455", "code": "int main (){\n\tint m,n,s,i,a[200],b[200];\n\nscanf(\"%d\",&n);\ns=0;\nm=0;\nfor(i=0;im)\n\tprintf(\"B\");\nif(s==m)\n\tprintf(\"Tie\");\nif(sy) {printf(\"A\");}\nif (xlose) printf(\"A\\n\");\n if(wind[1]) printf(\"A\\n\");\n else if(d[0]y){\n\t\tprintf(\"A\");\n\t}else if(xbs){\n\tprintf(\"A\");\n\t}else if(ass1[i])b++;\n else if(s2[i]b)printf(\"A\");\n return 0;\n}\n\n"} +{"label": "65", "index": "32462", "code": "int main(){\nint j,a[201],b[201],i,m,n,h,k;\nscanf(\"%d\",&j);\nm=0;\nn=0;\nfor(i=0;ik){printf(\"A\");}\nelse if(hq){\n printf(\"A\");\n \n }else if(q>p){\n printf(\"B\");\n }else if(p==q){\n printf(\"Tie\");\n }\n return 0;\n \n}\n\n"} +{"label": "65", "index": "32464", "code": "int main()\n{\n int n,i,x=0,y=0;\n int a[200],b[200];\n scanf(\"%d\",&n);\n for(i=0;iy){\n printf(\"A\");\n }if(xb){printf(\"A\");}\nelse{printf(\"B\");}\nreturn 0;\n}"} +{"label": "65", "index": "32466", "code": "int main(){\n int i,a=0,A,b=0,B,n;\n scanf(\"%d\",&n);\n for(i=0;ib){\n puts(\"A\");\n }\n if(ac){\n\t\tprintf(\"B\");\n\t\treturn 0;}\n\telse if(c>f){\n\t\tprintf(\"A\");\n\t\treturn 0;}\n\tprintf(\"Tie\");\n\treturn 0;\n}\n"} +{"label": "65", "index": "32468", "code": "int main()\n{\n\tint a[200], b[200], i, r=0, n;\n\tscanf(\"%d\", &n);\n\tfor(i=0;i<=(n-1);i++)\n\t{\n\t\tscanf(\"%d%d\", &a[i], &b[i]);\n\t}\n\tfor(i=0;i<=(n-1);i++)\n\t{\n\t\tif(((a[i]==0)&&(b[i]==1))||((a[i]==1)&&(b[i]==2))||((a[i]==2)&&(b[i]==0)))\n\t\t{\t\n\t\t\tr++;\n\t\t}\n\t\telse if(((b[i]==0)&&(a[i]==1))||((b[i]==1)&&(a[i]==2))||((b[i]==2)&&(a[i]==0)))\n\t\t{\n\t\t\tr--;\n\t\t}\n\t}\n\tif(r>0)\n\t{\t\n\t\tprintf(\"A\");\n\t}\n\telse if(r<0)\n\t{\t\n\t\tprintf(\"B\");\n\t}\n\telse if(r==0)\n\t{\n\t\tprintf(\"Tie\");\n\t}\n\treturn 0;\n}\n"} +{"label": "65", "index": "32469", "code": "int main(){\n\tint n,i,a[200],b[2000],p=0,q=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iq){\n\t\tprintf(\"A\");\n\t}else if(p0){\n printf(\"A\");\n }\n else if(s==0){\n printf(\"Tie\");\n }\n else if(s<0){\n printf(\"B\");\n }\n return 0;\n}\n\n"} +{"label": "65", "index": "32471", "code": "int main()\n{\nint n,a[200],b[200],result=0,i,j,k;\nscanf(\"%d\",&n);\nfor(i=0;i0) printf(\"A\");\nif(result<0) printf(\"B\");\nif(result==0) printf(\"Tie\");\n}\n"} +{"label": "65", "index": "32472", "code": "int main(){\nint n,i,a[100],b[100],c=0,d=0,e=0;\nscanf(\"%d\",&n);\nfor(i=0;id) printf(\"A\\n\");\nelse if(cq)printf(\"A\");\n if(pq){\nprintf(\"A\");}\nelse if(p==q){\nprintf(\"Tie\");}\nelse if(pq){printf(\"A\");}\n\tif(pq){\n\t\tprintf(\"A\");\n\t}\n\tif(q>p){\n\t\tprintf(\"B\");\n\t}\n\treturn 0;\n}"} +{"label": "65", "index": "32478", "code": "int main(){\nint n,i,a,b,c,d;\nscanf(\"%d\",&n);\nc=0;\nd=0;\nfor(i=1;i<=n;i++){\nscanf(\"%d%d\",&a,&b);\nif((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){\nc++;\n}else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){\nd++;\n}else if(a==b){\n c=c;\n d=d;\n}\n}\nif(c>d){\nprintf(\"A\");\n}\nelse if(cq){\nprintf(\"A\");\n}else{\n\tif(p=sz[i][1]){\n if(sz[i][0]==2&&sz[i][1]==0)\n a++;\n else\n b++;\n }\n if(sz[i][0]<=sz[i][1]){\n if(sz[i][0]==0&&sz[i][1]==2)\n b++;\n else\n a++;\n }\n \n }\n if(a>b){\n printf(\"A\");\n }\n if(a==b){\n printf(\"Tie\");\n }\n if(ap){\n\t\tprintf(\"A\");\n\t}\n\tif(m0) printf(\"A\");\n\telse if(x==0) printf(\"Tie\");\n\telse printf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32483", "code": "int main(){\nint a,b,i,n,t=0,m=0,p=0;\nscanf(\"%d\",&n);\nfor(i=0;im)\nprintf(\"A\");\nelse if(tk)\n printf(\"A\");\n else if(jj){\n printf(\"A\");\n }else if(m==j){\n printf(\"Tie\");\n }else{\n printf(\"B\");\n }\nreturn 0;\n}"} +{"label": "65", "index": "32486", "code": "int main(){\n\tint n,a,b,i,c,d;\n\ta=0;\n\tb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib)\n\t\tprintf(\"A\");\n\telse if(b>a)\n\t\tprintf(\"B\");\n\telse \n\t\tprintf(\"Tie\");\n\n\n\treturn 0;\n}"} +{"label": "65", "index": "32487", "code": "\nint main() \n{ \n\tint n,i,A=0,B=0,a,b;\n\tscanf (\"%d\",&n);\n\tfor (i=0;iB)\nprintf(\"A\");\nelse if (Am2) printf(\"A\");\n else printf(\"B\");\n}"} +{"label": "65", "index": "32489", "code": "int main() {\n int n;\n scanf(\"%d\",&n);\n int sz[n][2];\n int i;\n for(i=0;iB) {\n printf(\"A\");\n }\n if(A0){printf(\"A\");} \n if(s==0){printf(\"Tie\");}\n if(s<0){printf(\"B\");} \n }\n"} +{"label": "65", "index": "32491", "code": "int main()\n{\n\tint n,i,a1,b1,c1;\n\tint a[200],b[200];\n\ta1=0;\n\tb1=0;\n\tc1=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib1)\n\t\tprintf(\"A\");\n\telse if(a1==b1)\n\t\tprintf(\"Tie\");\n\telse \n\t\tprintf(\"B\");\n\treturn 0;\n}"} +{"label": "65", "index": "32492", "code": "\nint main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint sz[234][2];\n\tint i,j;\n\tfor(i=0;il){\n\t\tprintf(\"A\");\n\t}else if(kSB){printf(\"A\");} \n else if(SA> n;\n\tint total = 0;\n\tfor(int i=0; i> a >> b;\n\t\tif(b == (a+1)%3) {\n\t\t\ttotal += 1;\n\t\t} else if(a == (b+1)%3) {\n\t\t\ttotal -= 1;\n\t\t}\n\t}\n\tif(total > 0) {\n\t\tcout << \"A\" << endl;\n\t} else if(total < 0) {\n\t\tcout << \"B\" << endl;\n\t} else {\n\t\tcout << \"Tie\" << endl;\n\t}\n return 0;\n}"} +{"label": "65", "index": "32495", "code": "int main(){\n int n,a=0,b=0;\n int sz[200][2];\n scanf(\"%d\",&n);\n for(int i=0;ib){\n printf(\"A\");\n } else if(atime[a][1]&&(time[a][0]!=2||time[a][1]!=0)){\n B++;\n }\n if((time[a][1]==0&&time[a][0]==2)){\n A++;\n }\n if(time[a][1]>time[a][0]&&(time[a][1]!=2||time[a][0]!=0)){\n A++;\n }\n }\n if(A==B){printf(\"Tie\");}\n if(A>B){printf(\"A\");}\n if(Ak){\n\t\t\tprintf(\"A\");\n\t\t}else if(k>j){\n\t\t\tprintf(\"B\");\n\t\t}else if(j==k){\n\t\t\tprintf(\"Tie\");\n\t\t}\n\n\treturn 0;\n}"} +{"label": "65", "index": "32498", "code": "int main(){\n\tint c=0,d=0,i,n,a[200],b[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;id) printf(\"A\");\n\telse if(cb){\n\tprintf(\"A\");\n}\nelse{\n\tprintf(\"B\");\n}\n\treturn 0;\n}"} +{"label": "66", "index": "32500", "code": "int main()\n{\n\tlong y,m,d,w,a,b;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\n\tif((y%4==0&&y%100!=0)||y%400==0)b=1;\n\telse b=0;\n\t\n\tswitch(m)\n\t{\n\t case 1:a=0;\n\t break;\n\t case 2:a=31;\n\t break;\n\t case 3:a=59+b;\n\t break;\n\t case 4:a=90+b;\n\t break;\n\t case 5:a=120+b;\n\t break;\n\t case 6:a=151+b;\n\t break;\n\t case 7:a=181+b;\n\t break;\n\t case 8:a=212+b;\n\t break;\n\t case 9:a=243+b;\n\t break;\n\t case 10:a=273+b;\n\t break;\n\t case 11:a=304+b;\n\t break;\n\t case 12:a=334+b;\n\t break;\t\n\t default:;\n\t}\n\t\n\tw=y-1+(y-1)/4-(y-1)/100+(y-1)/400+a+d;\n\tswitch(w%7)\n\t{\n\t\tcase 0:printf(\"Sun.\");\n\t\tbreak;\n\t\tcase 1:printf(\"Mon.\");\n\t\tbreak;\n\t\tcase 2:printf(\"Tue.\");\n\t\tbreak;\n\t\tcase 3:printf(\"Wen.\");\n\t\tbreak;\n\t\tcase 4:printf(\"Thu.\");\n\t\tbreak;\n\t\tcase 5:printf(\"Fri.\");\n\t\tbreak;\n\t\tcase 6:printf(\"Sat.\");\n\t\tbreak;\n\t}\n\t\n\treturn 0;\n}"} +{"label": "66", "index": "32501", "code": "\nint main()\n{\n\tlong int y,m,d;\n\tint total1=0,total2=0,total3=0,total;\n\tint i,j,a;\n\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\ta=(y-1)%400;\n\tfor(j=1;j<=a;j++)\n\t{\n\t\ttotal1=(total1+1)%7;\n\t\tif((j%4==0&&j%100!=0)||(j%400==0))\n\t\t{\n\t\t\ttotal1=total1+1;\n\t\t}\n\t}\n\n\tint mth[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=1;i2))\n\t{\n\t\ttotal2=total2+1;\n\t}\n\ttotal3=d;\n\ttotal=total1+total2+total3;\n\tif(total%7==1)\n\t{\n\t\tprintf(\"Mon.\\n\");\n\t}\n\telse if(total%7==2)\n\t{\n\t\tprintf(\"Tue.\\n\");\n\t}\n\telse if(total%7==3)\n\t{\n\t\tprintf(\"Wed.\\n\");\n\t}\n else if(total%7==4)\n\t{\n\t\tprintf(\"Thu.\\n\");\n\t}\n\telse if(total%7==5)\n\t{\n\t\tprintf(\"Fri.\\n\");\n\t}\n\telse if(total%7==6)\n\t{\n\t\tprintf(\"Sat.\\n\");\n\t}\n\telse if(total%7==7)\n\t{\n\t\tprintf(\"Sun.\\n\");\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32502", "code": "\n int main ()\n {\n\t long year,month,day;\n\t scanf(\"%ld%ld%ld\",&year,&month,&day);\n\t int sumyearday=0;\n\t int i,j;\n if(year>400)\n {\n year=400+(year-400)%400;\n }\n\t for (i=1;i=3)||(year%400==0&&month>=3))\n\t {\n\t\t total = total + 1;\n\t }\n\t int days;\n\t days=sumyearday+total%7+day%7;\n\t int result;\n\t result=days%7;\n\t if (result==1)printf(\"Mon.\\n\");\n\t else if (result==2)printf(\"Tue.\\n\");\n\t else if (result==3)printf(\"Wed.\\n\");\n\t else if (result==4)printf(\"Thu.\\n\");\n\t else if (result==5)printf(\"Fri.\\n\");\n\t else if (result==6)printf(\"Sat.\\n\");\n\t else if (result==0)printf(\"Sun.\\n\");\n\t return 0;\n }\n\n"} +{"label": "66", "index": "32503", "code": "int isRunNian(int year); \nint DiJiTian(int year, int month, int day); \nint main()\n{\n int sy,year1,month1,day1;\n \n scanf(\"%d%d%d\",&year1,&month1,&day1);\n \nsy=(DiJiTian(year1, month1,day1)+1*(year1-1)+((year1-1)/4-(year1-1)/100+(year1-1)/400))%7; \nif(sy==0)printf(\"Sun.\");\nif(sy==1)printf(\"Mon.\");\nif(sy==2)printf(\"Tue.\");\nif(sy==3)printf(\"Wed.\");\nif(sy==4)printf(\"Thu.\");\nif(sy==5)printf(\"Fri.\");\nif(sy==6)printf(\"Sat.\");\n\nreturn 0;\n}\n \n int DiJiTian(int year, int month, int day)\n{\n\tint result = 0;\n\tint i;\n\tfor(i = 1; i < month; i++)\n { \t\n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n {\n\t\t\tresult += 31;\t\n\t\t} \n else if (i == 4 || i ==6 || i == 9 || i==11)\n {\n\t\t\tresult += 30;\n\t\t} else if(i == 2)\n {\n\t\t\tif(isRunNian(year))\n {\n\t\t\t\tresult += 29;\n\t\t\t} else\n {\n\t\t\t\tresult += 28;\n\t\t\t}\t\n\t\t}\n\t}\n\tresult += day;\t\n\n\treturn result;\t\n}\nint isRunNian(int year)\n{\n\tint result;\n\tif(year%400 == 0 ||(year%4==0 && year%100!=0))\n {\n\t\tresult = 1;\n\t} else\n {\n\t\tresult = 0;\n\t}\n return result;\t\n}\n"} +{"label": "66", "index": "32504", "code": "int main()\n{\n\tint a,b,c,s,d,y;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n\tif(b==1)\n\t{\n\t\ts=0;\n\t}\n\telse if(b==2)\n\t{\n\t\ts=31;\n\t}\n\telse if(b==3)\n\t{\n\t\tif(a%4==0||a%400==0)\n\t\t{\n\t\t\ts=31+29;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28;\n\t\t}\n\t}\n\telse if(b==4)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31;\n\t\t}\n\t}\n\telse if(b==5)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30;\n\t\t}\n\t}\n\telse if(b==6)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31;\n\t\t}\n\t}\n\telse if(b==7)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30;\n\t\t}\n\t}\n\telse if(b==8)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30+31;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30+31;\n\t\t}\n\t}\n\telse if(b==9)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30+31+31;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30+31+31;\n\t\t}\n\t}\n else if(b==10)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30+31+31+30;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30+31+31+30;\n\t\t}\n\t}\n\telse if(b==11)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30+31+31+30+31;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30+31+31+30+31;\n\t\t}\n\t}\n\telse if(b==12)\n\t{\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t{\n\t\t\ts=31+29+31+30+31+30+31+31+30+31+30;\n \t\t}\n\t\telse\n\t\t{\n\t\t\ts=31+28+31+30+31+30+31+31+30+31+30;\n\t\t}\n\t}\n\ta--;\n d=a+a/4+a/400-a/100;\n\ty=(s+c+d)%7;\n if(y==1)\n\t{\n\t\tprintf(\"Mon.\");\n\t}\n\telse if(y==2)\n\t{\n\t\tprintf(\"Tue.\");\n\t}\t\n else if(y==3)\n\t{\n\t\tprintf(\"Wed.\");\n\t}\n\telse if(y==4)\n\t{\n\t\tprintf(\"Thu.\");\n\t}\n\telse if(y==5)\n\t{\n\t\tprintf(\"Fri.\");\n\t}\n\telse if(y==6)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\telse if(y==0)\n\t{\n\t\tprintf(\"Sun.\");\n\t}\n\n\treturn 0;\n}"} +{"label": "66", "index": "32505", "code": "int main()\n{\n\tint i,y,l_y,l_y1,m,d,t=0,w;\n\tint m_p[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint r_p[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tchar week[7][10]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n\tcin>>y>>m>>d;\n\twhile(y>400)\n\t{\n\t\ty=y-400;\n\t}\n\t/*cout<1)\n\t{\n\t\ty--;\n\t\tl_y=((y%4==0)&&(y%100!=0)||(y%400==0));\n\t\tif(l_y==0)\n\t\t\tt=t+365;\n\t\telse\n\t\t\tt=t+366;\n\t\t/*cout<>y>>m>>r; \n y=y%400;\n if(y==0)\n y=400;\n while(i700000000;)\n\t{\n\t\tzong-=700000000;\n\t}\n\tfor(;zong>70000000;)\n\t{\n\t\tzong-=70000000;\n\t}\n\tfor(;zong>7000000;)\n\t{\n\t\tzong-=7000000;\n\t}\n\t\tfor(;zong>700000;)\n\t{\n\t\tzong-=700000;\n\t}\n\tfor(;zong>70000;)\n\t{\n\t\tzong-=70000;\n\t}\n\tfor(;zong>7000;)\n\t{\n\t\tzong-=7000;\n\t}\n\n\n\tfor(i=0;;i++)\n\t{\n\t\tif((7*i=zong))\n\t\t{break;}\n\t}\n\tif(zong-7*i==1)\n\t{\n\t\tprintf(\"Mon.\");\n\t}\n\tif(zong-7*i==2)\n\t{\n\t\tprintf(\"Tue.\");\n\t}\n\tif(zong-7*i==3)\n\t{\n\t\tprintf(\"Wed.\");\n\t}\n\tif(zong-7*i==4)\n\t{\n\t\tprintf(\"Thu.\");\n\t}\n\tif(zong-7*i==5)\n\t{\n\t\tprintf(\"Fri.\");\n\n\t}\n\tif(zong-7*i==6)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\tif(zong-7*i==7)\n\t{\n\t\tprintf(\"Sun.\");\n\t}\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "66", "index": "32509", "code": "int main()\n{\nint a,b,c,m,n,j,k,sum;\nsum=0;\nscanf(\"%d%d%d\",&a,&b,&c);\nm=(a-1)/4;\nn=(a-1)/100;\nk=(a-1)/400;\nsum+=1*(a-1)+m+k-n;\nfor(j=1;j4)&&(y%4!=0)){a=(y-1)+y/4-f+g;}\n \t else if ((y>4)&&(y%4==0)&&(y!=100)){a=(y-1)+(y-1)/4-f+g;}\n else if(y<=4){a=y-1;}\n\t\t else if(y==100){a=99*365+24;}\n\t\ne=a;\n if(((m>=3)&&(y%4==0)&&(y%100!=0))||((m>=3)&&(y%400==0))){\n\te=e+1;} \nb=e;\n if(m==1){b=b+d;}\n else if(m==2){b=b+31+d;}\n else if(m==3){b=b+31+28+d;}\n else if(m==4){b=b+31+28+31+d;}\n else if(m==5){b=b+31+28+31+30+d;}\n else if(m==6){b=b+31+28+31+30+31+d;}\n else if(m==7){b=b+31+28+31+30+31+30+d;}\n else if(m==8){b=b+31+28+31+30+31+30+31+d;}\n else if(m==9){b=b+31+28+31+30+31+30+31+31+d;}\n else if(m==10){b=b+31+28+31+30+31+30+31+31+30+d;}\n else if(m==11){b=b+31+28+31+30+31+30+31+31+30+31+d;} \n else if(m==12){b=b+31+28+31+30+31+30+31+31+30+31+30+d;}\nc=b;\nif(c<=7){c=c;}\nelse if(c>7){c=c%7;}\n\nif(c==0){printf(\"Sun.\");}\nelse if (c==1){printf(\"Mon.\");}\nelse if (c==2){printf(\"Tue.\");}\nelse if (c==3){printf(\"Wed.\");}\nelse if (c==4){printf(\"Thu.\");}\nelse if (c==5){printf(\"Fri.\");}\nelse if (c==6){printf(\"Sat.\");}\nreturn 0;\n}"} +{"label": "66", "index": "32513", "code": "int main(){\n\tint i,a=0,b=0; //a ???? b????\n\tint y,m,d;\n\tint s,t,n,x,c;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\n\ts=y%400;\n\nfor(i=0;i0)\n\t{\n\t\tif(year>year>>month>>day;\n int time=(year-1)/400;\n for(int i=time*400+1;i>year>>month>>date;\nint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\nyearleft=year%400;\nif(yearleft==0)\n{\nyearleft=400;\n}\nfor(int i=1;i6||w<0) printf(\"%d\",w);\n}"} +{"label": "66", "index": "32525", "code": "\nint main(int argc, char *argv[])\n{\n int year,month,day,n_runnian=0,diyitian,m,i,sum=0;\n int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n scanf(\"%d%d%d\",&year,&month,&day);\n \n n_runnian=(year-1)/100-(year-1)/400;\n n_runnian=(year-1)/4-n_runnian;\n \n \n diyitian=(year-1+n_runnian)%7;\n\n \n if(year%100>0){ //????????? \n if(year%4==0)\n a[2]=29;\n }\n if(year%400==0){\n a[2]=29;\n }\n \n //????? \n for(i=0;i1600) year-=1600; \n if(pd(year)) a[2]++;\n for(i=1,d2=0;i2))\n\t{\n\t\t\tif((i%100)==0)\n\t\t\t{\n\t\t\t\tif((i%400)==0)\n\t\t\t\t\td=d+1;\n\t\t\t}\n\t\t\telse\n\t\t\t\td=d+1;\n\t}\n t=d%7;\n switch(t)\n {\n case 0:printf(\"Mon.\");break;\n case 1:printf(\"Tue.\");break;\n case 2:printf(\"Wed.\");break;\n case 3:printf(\"Thu.\");break;\n case 4:printf(\"Fri.\");break;\n case 5:printf(\"Sat.\");break;\n case 6:printf(\"Sun.\");break;\n }\n}\t\t"} +{"label": "66", "index": "32532", "code": "int main() {\n\tint year,month,day,i,date=0,m[12]={3,0,3,2,3,2,3,3,2,3,2,3};\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tyear-=1;\n\tdate=year+year/4-year/100+year/400;\n\tyear+=1;\n\tif(year%4==0&&year%100!=0||year%400==0) {\n\t\tm[1]=1;\n\t}\n\tfor(i=0;i<(month-1);i++) {\n\t\tdate+=m[i];\n\t}\n\tdate+=day;\n\tdate=date%7;\n\tswitch(date) {\n\t\tcase 0:printf(\"Sun.\");break;\n\t\tcase 1:printf(\"Mon.\");break;\n\t\tcase 2:printf(\"Tue.\");break;\n\t\tcase 3:printf(\"Wed.\");break;\n\t\tcase 4:printf(\"Thu.\");break;\n\t\tcase 5:printf(\"Fri.\");break;\n\t\tcase 6:printf(\"Sat.\");break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32533", "code": "int runnian(int y);\nint main()\n{\n int i;\n int y2,m2,d2;\n\t/*?y,m,d??(year,month,date)???,sum???????,p,q?????*/\n int sum=0;\n scanf(\"%d%d%d\",&y2,&m2,&d2);\n\twhile(y2>(7*400))\n\t{\n\t\ty2=y2%(7*400);\n\t}\n for(i=1;i2000){\n\t\tyear%=2000;\n\t}\n\tfor(k=1;k> y >> m >> d;\n if(y%400==0||(y%100!=0&&y%4==0))\n M[1]++;\n for(int i=0;i400&&y%400!=0)\n y=y%400;\n if(y%400==0)\n y=400;\n for(int i=1;i2800){\n\t\tyear=year-(year/2800)*2800;\n\t}\n for (j=1;j> year >> month >> date;\n\tint days=0;\n\tint i=0;\n\tfor(;year>=400;i++)\n\t\tyear = year-400;\n\n\tfor(;i > 2800;)\n\t\ti -= 2800;\n\tdays = days+ i * 146097;\n\n\tif(year != 0)\n\t\tfor(i=1 ;i < year; i++)\n\t\t\tif((i%4 == 0 && i%100 != 0) || (i%400 == 0))\n\t\t\t\tdays += 366;\n\t\t\telse\n\t\t\t\tdays += 365;\n\telse \n\t\tdays -= 366;\n\n\t\n\n\tint a[13] = { 0 , 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 };\n\tfor(i=1; i < month; i++ )\n\t\tdays += a[i];\n\n\tif(((year%4 == 0 && year%100 != 0) || (year%400 == 0)) && (month >= 3) )\n\t\tdays++;\n\t\n\tdays += date;\n\n\n\n\tchar b[][5] = {\"Sun.\",\"Mon.\", \"Tue.\", \"Wed.\", \"Thr.\", \"Fri.\", \"Sat.\"};\t\n\tint j = days %7;\n\tcout << b[j];\n\n\treturn 0;\n}"} +{"label": "66", "index": "32550", "code": "int main(int argc, char* argv[])\n{\n\tint days[]={ 0,31,28,31,30,31,30,\n\t\t31,31,30,31,30,31};\n\tchar*weekdays[]=\n\t{\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"};\n\tint y,m,d,w,i;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tw=y%7+y/4-y/100+y/400;\n\tfor(i=1;i 2 ) tag = tag + run(yahr);\n\n\tzzz = tag % 7;\n\n\n\tswitch(zzz){\n\t\tcase 1 : printf(\"Mon.\");break;\n\t case 2 : printf(\"Tue.\");break;\n\t\tcase 3 : printf(\"Wed.\");break;\n\t\tcase 4 : printf(\"Thu.\");break;\n\t\tcase 5 : printf(\"Fri.\");break;\n\t\tcase 6 : printf(\"Sat.\");break;\n\t\tcase 0 : printf(\"Sun.\");break;\n\t}\n\n\treturn(0);\n}\n"} +{"label": "66", "index": "32552", "code": "\nint main()\n{\n\tint year,month,day;\n\tlong years=0,days=0;\n\tint i,result;\n\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\n\tif(year==4&&month==3&&day==1)\n\t{\n\t\tprintf(\"Mon.\");\n\t}\n\telse if(year==1111111111&&month==11&&day==11)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\telse if(year==1111&&month==11&&day==11)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\telse if(year==2000&&month==2&&day==29)\n\t{\n\t\tprintf(\"Tue.\");\n\t}\n\telse if(year==1921&&month==7&&day==1)\n\t{\n\t\tprintf(\"Fri.\");\n\t}\n\telse printf(\"hello\");\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32553", "code": "int main()\n{\n\tint year[2]={365,366};\n\tint month[2][12]={3,0,3,2,3,2,3,3,2,3,2,3,3,1,3,2,3,2,3,3,2,3,2,3};\n\tint y,m,d;\n\tcin>>y>>m>>d;\n int i;\n\tint sum=0;\n\tsum+=((y-1)/4)*5;\n\tsum%=7;\n\tsum+=((y-1)/100)*6;\n\tsum%=7;\n\tsum+=((y-1)/400);\n\tsum%=7;\n\tfor(i=((y-1)/4)*4+1;i> a >> b >> c;\n\ta=a%400;\n\tif (a==0)\n\t\ta=400;\n\tfor (i=1;i2 && (a%400==0) ||(a%4==0 && a%100!=0))\n\t\tsum++;\n\tsum=sum+c;\n\td=sum%7;\n\tswitch(d)\n\t{\n\t\tcase 1: cout << \"Mon.\"; break;\n\t\tcase 2: cout << \"Tue.\";break;\n\t\tcase 3: cout << \"Wed.\";break;\n\t\tcase 4: cout << \"Thu.\";break;\n\t\tcase 5: cout << \"Fri.\";break;\n\t\tcase 6: cout << \"Sat.\";break;\n\t\tdefault: cout << \"Sun.\";break;\n\t}\n\treturn 0;\n}\n"} +{"label": "66", "index": "32557", "code": "int main(){\n\tint a,b,c,total=0,d;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n total=(a-1)*1+(a-1)/4-(a-1)/100+(a-1)/400;\n\t\n\n\tfor(int i=1;i2&&year%4==0&&year>=4&&year%100!=0)\n\t{\n\t\tpass=pass+1;\n\t}\n\telse if(mon>2&&year%100==0&&year>=100&&year%400==0)\n\t{\t\n\t\tpass=pass+1;\n\t}\n\t//????\n\tfor(i=1;i<=day;i++)\n\t{\n\t\tpass=pass+1;\n\t}\n\tstruct seven{\n\t\tint d1;\n\t\tchar d2[5];\n\t}days[7]={0,\"Sun.\",1,\"Mon.\",2,\"Tue.\",3,\"Wed.\",4,\"Thu.\",5,\"Fri.\",6,\"Sat.\"};\n\tint x;\n\tif(pass<7)\n\t\tx=pass;\n\telse\n\t x=pass%7;\n\tprintf(\"%s\\n\",days[x].d2);\n\treturn 0;\n}"} +{"label": "66", "index": "32559", "code": "\n\nint panduan(int nian)\n{\n if((nian%4==0&&nian%100!=0)||nian%400==0)\n return 1;\n else\n return 0;\n}\n\nint main()\n{\n \n int year,month,day;\n cin>>year>>month>>day;\n int i;\n long long sum=0;\n int tempsum = 0;\n for(i=1;i<=400;i++)\n {\n tempsum+=(365+panduan(i));\n }\n for(i=1;i<=(year-1)/400;i++)\n {\n sum+=tempsum;\n }\n for(i=((year-1)/400)*400+1;i<=year-1;i++)\n {\n sum+=(365+panduan(i));\n }\n int b[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};\n for(i=1;i=3)\n\t\t\tsum=sum+1;\n\n\tsum=sum+d;\n\treturn sum;\n}\n\nvoid main()\n{\n\tint year,month,day;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tswitch(week(year,month,day)%7)\n\t{\n\tcase 0:printf(\"Sun.\");break;\n\tcase 1:printf(\"Mon.\");break;\n\tcase 2:printf(\"Tue.\");break;\n\tcase 3:printf(\"Wed.\");break;\n\tcase 4:printf(\"Thu.\");break;\n\tcase 5:printf(\"Fri.\");break;\n\tcase 6:printf(\"Sat.\");break;\n\t}\n\tprintf(\"\\n\");\n}"} +{"label": "66", "index": "32562", "code": "int main()\n{\n\tint y,m,d,i,y1,y2;\n\tchar str[7][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\tint month[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>y>>m>>d;\n\ty1=(y-1)/4-(y-1)/100+(y-1)/400;y2=y-1-y1;\n\td+=(2*y1+y2);\n\tif(y%400==0||(y%4==0&&y%100!=0))\n\t\tmonth[1]+=1;\n\tfor(i=0;i>year>>month>>day;\n\tint y[2]={365,366};\n\tfor (int i=1;i2)\n\t\t\tD++;\n\t}\n\telse if(y%4==0&&y%100!=0)\n\t{\n\t\tif(m>2)\n\t\t\tD++;\n\t}\n\tw=D%7;\n\tswitch(w)\n\t{\n\tcase 0:printf(\"Sun.\");break;\n\tcase 1:printf(\"Mon.\");break;\n\tcase 2:printf(\"Tue.\");break;\n\tcase 3:printf(\"Wed.\");break;\n\tcase 4:printf(\"Thu.\");break;\n\tcase 5:printf(\"Fri.\");break;\n\tcase 6:printf(\"Sat.\");\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "66", "index": "32576", "code": "int main()\n{\n\tint star=1;\n\tint year,month,day;\n\tint month1[13]={3,0,3,2,3,2,3,3,2,3,2,3},\n\t month2[13]={3,1,3,2,3,2,3,3,2,3,2,3};\n\tint i,p;\n\tcin>>year>>month>>day;\n year = year%400;\n\tif(year!=0)\n\t{\n\tfor(i=1;i7)\n\t\t\tstar -= 7;\n\t}\n\t}\n\telse \n\tstar=6;\n\tif(year%4==0&&year%100!=0)\n\t{\n\t\tfor(i=1;i7)\n\t\t\t star -= 7;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=1;i7)\n\t\t\t star -= 7;\n\t\t}\n\t}\n\tstar += (day-1)%7;\n\tif(star>7)\n\t star -= 7;\n\tswitch(star)\n\t{\n\t case 1:cout<<\"Mon.\"<>d.year>>d.month >>d.day ;\n\td.century =d.year /100;\n\t//cout<> y >> m >> d;\n\n\tif (y % 400 == 0 || (y % 100 != 0 && y % 4 == 0))\n\t\tmonth[2] = 29;\n\telse\n\t\tmonth[2] = 28;\n\tfor(i = 1; i <= 400; i++)\n\t{\n\t\tif (i % 400 == 0 || (i % 100 != 0 && i % 4 == 0))\n\t\t\tday += 366;\n\t\telse \n\t\t\tday += 365;\n\t}\n\tday = day % 7;\n\tk = (y-1) / 400;\n\tday = day * k;\n\ty = (y-1) % 400;\n\tfor(i = 1; i <= y; i++)\n\t{\n\t\tif (i % 400 == 0 || (i % 100 != 0 && i % 4 == 0))\n\t\t\tday += 366;\n\t\telse \n\t\t\tday += 365;\n\t}\n\n\tfor(i = 1; i < m; i++)\n\t\tday += month[i];\n\tday += d;\n\n\tn = day % 7;\n\tswitch(n)\n\t{\n\t\tcase 1: cout << \"Mon.\";break;\n\t\tcase 2: cout << \"Tue.\";break;\n\t\tcase 3: cout << \"Wed.\";break;\n\t\tcase 4: cout << \"Thu.\";break;\n\t\tcase 5: cout << \"Fri.\";break;\n\t\tcase 6: cout << \"Sat.\";break;\n\t\tcase 0: cout << \"Sun.\";break; \n\t} \n\t\n\n\treturn 0;\n}\n\t\t\n"} +{"label": "66", "index": "32582", "code": "void main()\n{\n\tlong a;\n\tint b,c,j,i,k,l;\n\tscanf(\"%ld %d %d\",&a,&b,&c);\n\tk=0;\n\ta=a%400+400;\n\tfor(i=1;i<=(a-1);i++)\n\t{\n\t\tif(i%4!=0) k=k+1;\n\t\telse\n\t\t{\n\t\t\tif((i%100==0)&&(i%400!=0)) k=k+1;\n\t\t\telse k=k+2;\n\t\t}\n\t\tif(k==7) k=0;\n\t}\n\tif(a%4!=0) l=28;\n\telse\n\t{\n\t\tif((a%100==0)&&(a%400!=0)) l=28;\n\t\telse l=29;\n\t}\n\tfor(j=1;j<=b-1;j++)\n\t{\n\t\tswitch(j)\n\t\t{\n\t\tcase 1:k=k+31;break;\n\t\tcase 2:k=k+l;break;\n\t\tcase 3:k=k+31;break;\n\t\tcase 4:k=k+30;break;\n\t\tcase 5:k=k+31;break;\n\t\tcase 6:k=k+30;break;\n\t\tcase 7:k=k+31;break;\n\t\tcase 8:k=k+31;break;\n\t\tcase 9:k=k+30;break;\n\t\tcase 10:k=k+31;break;\n\t\tcase 11:k=k+30;break;\n\t case 12:k=k+31;break;\n\t\t}\n\t\tif (k>6) k=k%7;\n\t}\n\tk=k+c;\n\tif (k>6) k=k%7;\n\tswitch(k)\n\t{\n\tcase 0:printf(\"Sun.\\n\");break;\n\tcase 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n\t}\n}"} +{"label": "66", "index": "32583", "code": "int main()\n{\n\tint a,b,c,A,B,C,j,s=0,n=0,y;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\n\tA=(a-1)/4;\n\tB=A/25;\n\tC=B/4;\n\ts=A+C-B;\n\tn=2*s+1*(a-1-s);\n\nfor(j=1;j>y>>m>>d;\n \n \n\tif(y%4==0&&y%100!=0||y%400==0)\n\t{\n\t\tfor(i=1;i>q;\n return 0;\n}"} +{"label": "66", "index": "32586", "code": "int main()\n{\n\tint year,month,day;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tint i,s;\n\ts=year%400;\n\tif(s==0)\n\t{\n\t\ts+=400;\n\t}\n\tint sum=0;\n\tfor(i=1;i=3){\n\t\t\tmday=mday+1;}\n\t\telse {\n\t\t\tmday=mday;\n\t\t}\n\t}\n\tlong n;\n\tn=mday+day;\n\tint m;\n\tm=n%7;\n\tswitch(m)\n\t{\n\tcase 1:printf(\"Sat.\");break;\n\n case 2:printf(\"Sun.\");break;\n case 3:printf(\"Mon.\");break;\n case 4:printf(\"Tue.\");break;\n case 5:printf(\"Wed.\");break;\n case 6:printf(\"Thu.\");break;\n\t default:printf(\"Fri.\");\t}\n\t\treturn 0;\n}\n\n\n"} +{"label": "66", "index": "32588", "code": "int main(int argc, char* argv[])\n{\n\tint y,m,d,i,x;\n\tscanf (\"%d%d%d\",&y,&m,&d);\n\tx=(y-1)%7+(y-1)/4-(y-1)/100+(y-1)/400;\n\tint md[]={0,31,28,31,30,31,30,31,31,30,31,30};\n\tfor (i=1;i2)\n\t\tx+=1;\n x +=d;\n\tswitch (x%7)\n\t{\n\tcase 0: printf (\"Sun.\");break;\n\tcase 1: printf (\"Mon.\");break;\n\tcase 2: printf (\"Tue.\");break;\n\tcase 3: printf (\"Wed.\");break;\n\tcase 4: printf (\"Thu.\");break;\n\tcase 5: printf (\"Fri.\");break;\n\tcase 6: printf (\"Sat.\");break;\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32589", "code": "\nstruct date{\n\tint century;\t\t\t\t\t\t\t\t\t\t\t\t\t//century??????100?????????????023???0???\n\tint year;\n\tint month;\n\tint day;\n};\n\n\nint runnian(int year)\n{\n\tif((year%4==0&&year%100!=0)||year%400==0) return 1;\n\telse return 0;\n}\n\n\nlong int day_from_cen_begin(struct date d)\n{\n\tlong int day=0;\n\tint i;\n\tfor(i=100*d.century ;i>d.year>>d.month >>d.day ;\n\td.century =d.year /100;\n\t//cout<2800)\n\t\ty-=2800;\n\tfor(i=1;i=3)\n\t\tz++;\n\tz+=365*y+d+k-1;\n\tif(z%7==1)\n\t\tprintf(\"Mon.\");\n\telse if(z%7==2)\n\t\tprintf(\"Tue.\");\n\telse if(z%7==3)\n\t\tprintf(\"Wed.\");\n\telse if(z%7==4)\n\t\tprintf(\"Thu.\");\n\telse if(z%7==5)\n\t\tprintf(\"Fri.\");\n\telse if(z%7==6)\n\t\tprintf(\"Sat.\");\n\telse\n\t\tprintf(\"Sun.\");\n\treturn 0;\n}\nint run(int y){\n\tif(y%100!=0&&y%4==0)\n\t\treturn 1;\n\telse if(y%400==0)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n"} +{"label": "66", "index": "32596", "code": "int main()\n{\n int year,month,day;\n cin>>year>>month>>day;\n int num=0,days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n char date[12][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n num=year%7+year/4-year/100+year/400;\n for (int i=1;i225) s=i-1;\n\tif(i>275) s-=1;\n\tif(i>325) s-=1;\n\tif(i>350) s-=1;\n\tif(i>375) s-=1;\n\tif(i>425) s-=1;\n\tif(i>450) s-=1;\n\tif(i>475) s-=1;\n\tif(i>525) s-=1;\n\tif(i>575) s-=1;\n\tif(i>625) s-=1;\n\tif(i>650) s-=1;\n\tif(i>675) s-=1;\n\tif(j==0) s-=1;\n\tif(b==1) w=0;\n\tif(b==2) w=31;\n\tif(b==3) w=59;\n\tif(b==4) w=90;\n\tif(b==5) w=120;\n\tif(b==6) w=151;\n\tif(b==7) w=181;\n\tif(b==8) w=212;\n\tif(b==9) w=243;\n\tif(b==10) w=273;\n\tif(b==11) w=304;\n\tif(b==12) w=334;\n\tif(b>2&&j==0) w+=1;\n\tday=366*s+365*(a-s-1)+w+c;\n\tdate=day%7;\n if(a==1111111111&&b==11&&c==11) printf(\"Sat.\");\n\telse if(date==0) printf(\"Sun.\\n\");\n\telse\tif(date==1) printf(\"Mon.\\n\");\n\telse\tif(date==2) printf(\"Tue.\\n\");\n\telse\tif(date==3) printf(\"Wed.\\n\");\n\telse\tif(date==4) printf(\"Thu.\\n\");\n\telse\tif(date==5) printf(\"Fri.\\n\");\n\telse\tif(date==6) printf(\"Sat.\\n\");\n\t\treturn 0;\n}\n"} +{"label": "66", "index": "32598", "code": "int main()\n{\n\tint year2,year1,year,month,day,count,c;\n\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\n\tyear2=((year-1)/4-(year-1)/100+(year-1)/400)*(366%7);\n\n year1=(year-1)*(365%7)+((year-1)/4-(year-1)/100+(year-1)/400);\n\n if((year%4==0&&year%100!=0)||(year%400==0))\n\t{ \n\t\tif(month>=8)\n\t\t{\n\t\t\tcount=((month-1)/2+1)*31+29+(month-3-(month-1)/2)*30+year1+day;\n\t\t}\n\t\telse if(2=8)\n\t\t{\n\t\t\tcount=((month-1)/2+1)*31+28+(month-3-(month-1)/2)*30+year1+day;\n\t\t}\n\t\telse if(22)||(y%400==0 && m>2)) dy++;\ndy+=dt;\ndy=dy%7;\nswitch(dy){\n case 1:{\n\tprintf(\"Mon.\");\n\tbreak;\n\t}\n\tcase 2:{\n\tprintf(\"Tue.\");\n\tbreak;\n\t}\n\tcase 3:{\n\tprintf(\"Wed.\");\n\tbreak;\n\t}\n\tcase 4:{\n\tprintf(\"Thu.\");\n\tbreak;\n\t}\n\tcase 5:{\n\tprintf(\"Fri.\");\n\tbreak;\n\t}\n\tcase 6:{\n\tprintf(\"Sat.\");\n\tbreak;\n\t}\n\tcase 0:{\n\tprintf(\"Sun.\");\n\tbreak;}\n}\n\nreturn 0;\n}\n"} +{"label": "66", "index": "32606", "code": "int runnian(long year)\n{\n\tint p=0;\n\tif(!(year%4)&&year%100||!(year%400))\n\t\tp=1;\n\treturn p;\n}\nint main()\n{\n\tint month,day,j;\n long year;\n\tfloat total;\n\tscanf(\"%ld%d%d\",&year,&month,&day);\n\t\ttotal=(year-1)*365+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\tif(month<=2)\n\t\t\ttotal+=(month-1)*31+day;\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t\tif(month==9||month==11)\n\t\t\t\t\ttotal+=(month-1)*30+month/2-1+day;\n\t\t\t\telse\n\t\t\t\t\ttotal+=(month-1)*30+month/2-2+day;\t\t\n\t\t\t if(runnian(year))\n\t\t\t\t total+=1;\t\n\n\t\t}\n\t\tj=(long)total%7;\n\t\t\n\t\tswitch(j)\n\t\t{\n\t\tcase 0:printf(\"Sun.\\n\");break;\n\t\tcase 1:printf(\"Mon.\\n\");break;\n\t\tcase 2:printf(\"Tue.\\n\");break;\n\t\tcase 3:printf(\"Wed.\\n\");break;\n\t\tcase 4:printf(\"Thu.\\n\");break;\n\t\tcase 5:printf(\"Fri.\\n\");break;\n\t\tcase 6:printf(\"Sat.\\n\");break;\n\t\t}\n\t\n\treturn 0;\n}\n"} +{"label": "66", "index": "32607", "code": "\nint main(int argc, char* argv[])\n{\n\tint year,month,day,i,total=0;\n\tint week;\n scanf(\"%d%d%d\",&year,&month,&day);\n\t\n\tyear = year%400+400;\n\t\n\tfor (i=1;i>y>>m>>d;\n\tif((y%4==0&&y%100!=0)||(y%400==0))\n\t\tday[1]=29;\n\tfor(int i=0;i> year >> month >> day;\n\tlong long a[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\n\tchar week[7][6] = { \"Sun.\", \"Mon.\", \"Tue.\", \"Wed.\", \"Thu.\", \"Fri.\", \"Sat.\" }; \n\tlong long num = 0;\n\tlong long mod =( year / 100 ) % 4 ;\n\t//cout << mod << \" \";\n\tnum = year / 4 - (year/100 - mod) * 3 / 4 - mod;\n\t//cout << num << \" \";\n\tif ( year % 4 == 0 && year % 100 != 0 || year % 400 == 0 )\n\t{\n\t\tnum --;\n\t\ta[2] = 29;\n\t}\n\t//cout << num << \" \";\n\tlong long sum = 0;\n\tsum = sum + num * 366 + ( year - num - 1 ) * 365;\n\t//cout << sum << \" \";\n\tfor( int i = 1; i < month; i++)\n\t{\n\t\tsum = sum + a[i];\n\t}\n\t//cout << sum << \" \";\n\tsum = sum + day;\n\t//cout << sum << \" \";\n\tsum = sum % 7;\n\t//cout << sum << \" \";\n\tcout << week[ sum ] << endl;\n\treturn 0;\n}"} +{"label": "66", "index": "32615", "code": "int main()\n{\nint w,c,y,m,d,Y;\nscanf(\"%d%d%d\",&Y,&m,&d);\n\nif (Y==4) printf(\"Mon.\\n\");\nif (Y==1111) printf(\"Sat.\\n\");\nif (Y!=1111&&Y!=4&&Y!=2000&&Y!=1921) printf(\"Sat.\\n\");\nif (Y==2000) printf(\"Tue.\\n\");\nif (Y==1921) printf(\"Fri.\\n\");\n\nreturn 0;\n}"} +{"label": "66", "index": "32616", "code": "int main(){\nint a,b,c,m=0,g,k;\n scanf(\"%d%d%d\",&a,&b,&c);\n\tfor(int i=1;i>y>>m>>d;\n\tif (y==1111111111) {cout<<\"Sat.\";return 0;}\n /*year*/\n y=y-1;\n leapn=y/400+y/4-y/100;\n sum=sum+366*leapn+365*(y-leapn);\n /*month*/\n flag=leap(y+1);\n for (i=1;i>year>>mm>>dd;\n i=(year-1)/4-((year-1)/100-(year-1)/400);\n\tsum=sum+i;\n sum+=(long long)(year-1)*365;\n\tif((year%100==0&&year%400==0)||(year%100!=0&&year%4==0))\n\t\ta[1]=29;\n\tif(mm>1)\n\t{\n\t for(j=0;j2)))\n\t{\n\t total2=total2+1;\n\t}\n\ttotal3=day;\n\ttotal=total1+total2+total3;\n\tswitch(total%7){\n\tcase 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n\tcase 0:printf(\"Sun.\\n\");break;\n\t}\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32625", "code": "int main()\n{\n int year,month,day;\n int i,days=0,n;\n scanf(\"%d%d%d\",&year,&month,&day);\n n=(year-1)%400+1;\n for(i=1;i2)\n\t{\n\t\tif(f(Year))\n\t\t\tsum=sum+1;\n\t}\n\tWeek=sum%7;\n\tprintf(\"%s\",week[Week]);\n\tprintf(\"\\n\");\n\treturn 0;\n}\n\n\n"} +{"label": "66", "index": "32630", "code": "int main()\n{\n\tint p[400],q[12];\n\tint a,b,c,i,s=0;\n\tfor(i=1;i<=12;i++)\n\t{\n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n\t\t{\n\t\t\tq[i]=31;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i==4||i==6||i==9||i==11)\n\t\t\t{\n\t\t\t\tq[i]=30;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tq[i]=28;\n\t\t\t}\n\t\t}\n\t}\n\tscanf(\"%d%d%d\",&a,&b,&c);\n\tif(a%400!=0)\n\t{\n\ta=a%400;\n\t}\n\telse\n\t{\n\t\ta=400;\n\t}\n\tfor(i=1;i<=a;i++)\n\t{\n\t\tif(i%400==0)\n\t\t{\n\t\t\tp[i]=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i%100==0)\n\t\t\t{\n\t\t\t\tp[i]=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(i%4==0)\n\t\t\t\t{\n\t\t\t\t\tp[i]=1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp[i]=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=b;i++)\n\t{\n\t\ts=s+q[i];\t\n\t}\n\ts=s-q[b]+c;\n\tfor(i=1;i<=a;i++)\n\t{\n\t\ts=s+p[i]+365;\t\n\t}\n\ts=s-365-p[a];\n\tif(p[a]==1&&b>=3)\n\t{\n\t\ts=s+1;\n\t}\n\ts=s%7;\n\tif(s==1)\n\t{\n\tprintf(\"Mon.\");\n\t}\n\tif(s==2)\n\t{\n\tprintf(\"Tue.\");\n\t}\n\tif(s==3)\n\t{\n\tprintf(\"Wed.\");\n\t}\n\tif(s==4)\n\t{\n\tprintf(\"Thu.\");\n\t}\n\tif(s==5)\n\t{\n\tprintf(\"Fri.\");\n\t}\n\tif(s==6)\n\t{\n\tprintf(\"Sat.\");\n\t}\n\tif(s==0)\n\t{\n\tprintf(\"Sun.\");\n\t}\n return 0;\n}"} +{"label": "66", "index": "32631", "code": "int main() \n{ \nint y, m, d; \nscanf(\"%d %d %d\", &y,&m,&d); \nif(3 > m) \n{ \nm+= 12; \ny--; \n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==1)\n{printf(\"Mon.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==2)\n{printf(\"Tue.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==3)\n{printf(\"Wed.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==4)\n{printf(\"Thu.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==5)\n{printf(\"Fri.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==6)\n{printf(\"Sat.\");\n}\nif((d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7+1==7)\n{printf(\"Sun.\");\n}\nreturn 0;\n}\n"} +{"label": "66", "index": "32632", "code": "int main()\n{\nint a,b,c,i,x=0,y=0;\nscanf(\"%d%d%d\",&a,&b,&c);\nif ((a%4==0&&a%100!=0)||a%400==0)\n{x=1;}\na%=400;\nif (a==0)\n{y=5;}\nelse\n{\nfor(i=1;i<=a-1;i++)\n{\nif(i%4==0&&i%100!=0)\n{y+=2;}\nelse\n{y++;}\n}\ny%=7;\n}\nfor(i=1;i<=b-1;i++)\n{\nif(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n{y+=31;}\nelse if(i==4||i==6||i==9||i==11)\n{y+=30;}\nelse if(x==1)\n{y+=29;}\nelse \n{y+=28;}\n}\ny=(y+c)%7;\nswitch(y)\n{\ncase 1:\n{\nprintf(\"Mon.\");\nbreak;\n} \ncase 2:\n{\nprintf(\"Tue.\");\nbreak;\n} \ncase 3:\n{\nprintf(\"Wed.\");\nbreak;\n} \ncase 4:\n{\nprintf(\"Thu.\");\nbreak;\n} \ncase 5:\n{\nprintf(\"Fri.\");\nbreak;\n} \ncase 6:\n{\nprintf(\"Sat.\");\nbreak;\n} \ncase 0:\n{\nprintf(\"Sun.\");\nbreak;\n} \n}\nreturn 0;\n}\n\n\n"} +{"label": "66", "index": "32633", "code": "\n\nint isRunNian(int year);\nvoid main(){\n \n\n int iday,imonth,iyear;\n\n int i,j,num,t1;\n int sum;\n\n\n scanf(\"%d%d%d\",&iyear,&imonth,&iday);\n\n sum=0;\n\n\n //??????\n //???????\n\n\n\n\nsum=(iyear-1)*(365%7) + (iyear-1)/4 - (iyear-1)/100 + (iyear-1)/400;\n\n\n//printf(\"%d \\n\",sum);\n//printf(\"%d %d\\n\",sum,num-j);\n\n//??????\n\n\nfor(i=1;i2)\n total = total + 1;\n total = total + day;\n int b;\n\tif(year%400!=0) b=year%400;\n\telse { b=400;}\n int a,n,n1,n2;\n\tfor(n1=0,a=1;a>y>>m>>d;\n if(y>100000)\n\t y=y%400;\n for(i=1;i>y>>m>>d;\n\tj=y;\n\tif(y>1)\n\t{\n\t\tif(j>2000)\n\t\t{\n\t\t\tfor(i=0;;i++)\n\t\t\t{\n\t\t\t\tsum[i]=0;\n\t\t\t\tif(j<2000)\n\t\t\t\t\tbreak;\n\t\t\t\tsum[i]+=2000/4*pi;\n\t\t\t\tj-=2000;\n\t\t\t}\n\t\t\tsum[i]+=(j-1)%4*365;\n\t\t\tsum[i]+=(j-1)/4*pi;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti=0;\n\t\t\tsum[0]+=(y-1)%4*365;\n\t\t\tsum[0]+=(y-1)/4*pi;\n\t\t}\n\t}\n\tfor(t=100;t0)\n\t{\t\n\t\ty1=y0%4;\n\t\ty2=y0/4;\n\t\tsum=sum+y2*5+y1-y0/100;\n\t}\n\tif(leap(y)==0)\n\t{\n\t\tswitch(m)\n\t\t{\n\t\tcase 1:break;\n\t\tcase 2:sum=sum+3;break;\n\t\tcase 3:sum=sum+3;break;\n\t\tcase 4:sum=sum+6;break;\n\t\tcase 5:sum=sum+1;break;\n\t\tcase 6:sum=sum+4;break;\n\t\tcase 7:sum=sum+6;break;\n\t\tcase 8:sum=sum+2;break;\n\t\tcase 9:sum=sum+5;break;\n\t\tcase 10:break;\n\t\tcase 11:sum=sum+3;break;\n\t\tcase 12:sum=sum+5;break;\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch(m)\n\t\t{\n\t\tcase 1:break;\n\t\tcase 2:sum=sum+3;break;\n\t\tcase 3:sum=sum+4;break;\n\t\tcase 4:break;\n\t\tcase 5:sum=sum+2;break;\n\t\tcase 6:sum=sum+5;break;\n\t\tcase 7:break;\n\t\tcase 8:sum=sum+3;break;\n\t\tcase 9:sum=sum+6;break;\n\t\tcase 10:sum=sum+1;break;\n\t\tcase 11:sum=sum+4;break;\n\t\tcase 12:sum=sum+6;break;\n\t\t}\n\t}\n\tsum=sum+d%7;\n\tsum=sum%7;\n\tswitch(sum)\n\t{\n case 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n\tcase 0:printf(\"Sun.\\n\");break;\n\t}\n}\n\n\n\n"} +{"label": "66", "index": "32646", "code": "void main()\n{\n\tint n,m,d,w,i,y;\n\tlong sum;\n\tchar nian[20];\n scanf(\"%s%d%d\",nian,&m,&d);\n\tn=strlen(nian);\n\ty=0;\n\tif(n>5)\n\t\tfor(i=n-5;i2&&m<=7)\n\t\t\tsum=sum+(m-1)*30+(m-2)/2;\n\t\tif(m>=8&&m<=12)\n\t\t\tsum=sum+(m-1)*30+(m-1)/2;\n\t}\n\telse\n\t{\n sum=365*(y-1)+y/4-y/100+y/400;\n if(m==1)\n\t\t\tsum+=0;\n\t\tif(m==2)\n\t\t sum+=31;\n\t\tif(m>2&&m<=7)\n\t\t\tsum=sum+(m-1)*30+(m-2)/2-1;\n\t\tif(m>=8&&m<=12)\n\t\t\tsum=sum+(m-1)*30+(m-1)/2-1;\n\t}\n\n\tsum=sum+d;\n\tw=sum%7;\n\tif(w==1)\n\t\tprintf(\"Mon.\");\n if(w==2)\n\t\tprintf(\"Tue.\");\n\tif(w==3)\n\t\tprintf(\"Wed.\");\n\tif(w==4)\n\t\tprintf(\"Thu.\");\n\tif(w==5)\n\t\tprintf(\"Fri.\");\n if(w==6)\n\t\tprintf(\"Sat.\");\n\tif(w==0)\n\t\tprintf(\"Sun.\");\n}"} +{"label": "66", "index": "32647", "code": "int main()\n{\n\tint year,month,day,year_real;\n\tint total=0,i;\n\tscanf(\"%d%d%d\",&year_real,&month,&day);\n\tif(year_real%400!=0)\n\t\tyear=year_real%400;\n\telse\n\t\tyear=400;\n\tfor(i=1;i2) days+=LpYr(y);\n dayofwn=days%7;\n printf(\"%s\\n\",dayofw[dayofwn]);\n \n return 0;\n}\n\nint LpYr(int yr)\n{\n return yr%100!=0&&yr%4==0||yr%400==0;\n}"} +{"label": "66", "index": "32651", "code": "void main()\n{\nunsigned long a,b,c,n,d,D,x;\nscanf(\"%d%d%d\",&a,&b,&c);\nif((a%4==0&&a%100!=0)||a%400==0)\n{\nswitch(b)\n{\ncase 1: d=0;break;\ncase 2: d=31;break;\ncase 3: d=60;break;\ncase 4: d=91;break;\ncase 5: d=121;break;\ncase 6: d=152;break;\ncase 7: d=182;break;\ncase 8: d=213;break;\ncase 9: d=244;break;\ncase 10: d=274;break;\ncase 11: d=305;break; \ncase 12: d=335;break;\n}\nn=d+c;\nD=(a-1)+a/4-a/100+a/400+n-1;\nx=D%7;\n}\nelse\n{\nswitch(b)\n{\ncase 1: d=0;break;\ncase 2: d=31;break;\ncase 3: d=59;break;\ncase 4: d=90;break; \ncase 5: d=120;break;\ncase 6: d=151;break;\ncase 7: d=181;break;\ncase 8: d=212;break;\ncase 9: d=243;break;\ncase 10: d=273;break;\ncase 11: d=304;break;\ncase 12: d=334;break;\n}\nn=d+c;\n\nD=(a-1)+(a-a%4)/4-(a-a%4)/100+(a-a%4)/400 +n; \nx=D%7;\n}\nswitch(x)\n{\ncase 1: printf(\"Mon.\");break;\ncase 2: printf(\"Tue.\");break;\ncase 3: printf(\"Wed.\");break;\ncase 4: printf(\"Thu.\");break;\ncase 5: printf(\"Fri.\");break; \ncase 6: printf(\"Sat.\");break;\ncase 0: printf(\"Sun.\");break;\n}\n\n}"} +{"label": "66", "index": "32652", "code": "int main()\n{\n\tchar week[7][10]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\tlong int year;\n\tint i,month,day;\n\tcin>>year>>month>>day;\n\tint days[2][12]={{31,29,31,30,31,30,31,31,30,31,30,31},{31,28,31,30,31,30,31,31,30,31,30,31}};\n\tlong int sum=0;\n\tsum=(year-1)+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\n\tif(( (year%400)==0) || ( ((year%4)==0) && ((year%100)!=0) ) ) //???????\n\t\tfor(i=0;i>year>>month>>day;\n\tint sum=0;\n\tif (year==1111111111)\n\t{\n\t\tcout<<\"Sat.\"<2 && y%4==0)\n\t{\n\t\tif(y%100==0)\n\t\t{\n\t\t\tif(y%400==0)\n\t\t\t\tl++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tl++;\n\t\t}\n\t}\n\t\n\tint mod = (((y-1) * (365%7)) % 7 + l + dd[m] + d)%7;\n\t\n\tswitch(mod)\n\t{\n\tcase 1:\n\t\tprintf(\"Mon.\\n\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\\n\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\\n\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\\n\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\\n\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\\n\");\n\t\tbreak;\n\tcase 0:\n\t\tprintf(\"Sun.\\n\");\n\t\tbreak;\n\t}\n\t\n\treturn 0;\n}"} +{"label": "66", "index": "32655", "code": "main()\n{\nlong year,month,day;\nlong totalday;\nint week;\nint monthday[12]={0,31,59,90,120,151,181,212,243,273,304,334};\nint monthdayLeap[12]={0,31,60,91,121,152,182,213,244,274,305,335};\nchar * weekname[7]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\n\nscanf(\"%ld %ld %ld\",&year,&month,&day);\n\ntotalday=((year-1)%7)*365+(year-1)/4-(year-1)/100+(year-1)/400;\n\nif((year%4==0)&&(year%100!=0)||(year%400==0))\n totalday+=monthdayLeap[month-1];\nelse\n totalday+=monthday[month-1];\n\n totalday+=day;\n\n week=totalday%7;\n\nprintf(\"%s\\n\",weekname[week]);\n\n}\n\n\n"} +{"label": "66", "index": "32656", "code": "int runnian(int y);\nint lunhun(int y,int m,int d);\nint main()\n{\n\tint y,m,d,x;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tx=lunhun(y,m,d);\n\tx=x%7;\n\tswitch(x)\n\t{\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\t}\n\treturn 0;\n}\n\nint lunhun(int y,int m,int d)\n{\n\tint x=0;\n\tif(y%400!=0)\n\t{\n\t\ty=y%400;\n\t}\n\telse\n\t{\n\t\ty=400;\n\t}\n\tfor(int i=1;i1;month--)day+=d[month];\n\t\tday=day%7;\n\t}\n\telse{\n\t\tfor(;month>1;month--)day+=d[month];\n\t\tday+=year%7-1;\n\t\tday=day%7;\n\t\tif(k<3)year--;\n\t\ta=year/4;\n\t\tb=year/100;\n\t\tc=year/400;\n\n\t\tday=day+a+c-b;\n\t\t\n\t\t\n day=day%7;\n\n\t}\n\t\n\txingqi=day;\n\tswitch(xingqi){\n\t\tcase 1:printf(\"Mon.\\n\");break;\n\t\tcase 2:printf(\"Tue.\\n\");break;\n\t\tcase 3:printf(\"Wed.\\n\");break;\n\t\tcase 4:printf(\"Thu.\\n\");break;\n\t\tcase 5:printf(\"Fri.\\n\");break;\n\t\tcase 6:printf(\"Sat.\\n\");break;\n\t\tcase 0:printf(\"Sun.\\n\");break;\n\t}\n\treturn 0;\n}\n"} +{"label": "66", "index": "32661", "code": "int main(int argc, char* argv[])\n{\n\tint year,day,sum=0,month,n=0,i,j,date;\n\tint m[12];\n\tm[0]=31;m[1]=28;m[2]=31;m[3]=30;m[4]=31;m[5]=30;m[6]=m[7]=m[9]=m[11]=31;m[8]=m[10]=30;\n scanf(\"%d%d%d\",&year,&month,&day);\n sum=day;\n\tfor(i=0;i2)&&(year%400==0||((year%4==0)&&(year%100!=0))))\n\t{\n\tsum++;\n\t}\n\tdate=sum%7;\n\tif(year==1111111111&&month==11&&day==11)\n\t\tprintf(\"Sat.\");\n\telse\n\t{\n\t switch(date)\n\t\t{\n\t case 1:printf(\"Mon.\\n\");break;\n\t case 2:printf(\"Tue.\\n\");break;\n\t case 3:printf(\"Wed.\\n\");break;\n \tcase 4:printf(\"Thu.\\n\");break;\n \tcase 5:printf(\"Fri.\\n\");break;\n \tcase 6:printf(\"Sat.\\n\");break;\n \tcase 0:printf(\"Sun.\\n\");break;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32662", "code": "\n\nint panduan(int nian)\n{\n if((nian%4==0&&nian%100!=0)||nian%400==0)\n return 1;\n else\n return 0;\n}\n\nint main()\n{\n \n int year,month,day;\n cin>>year>>month>>day;\n int i;\n long long sum=0;\n if (year==1111111111)\n\t{\n\t\tcout<<\"Sat.\"<2))days+=1;\n\tm+=days%7;\n\tm=m%7;\n\tchar s[5];\n\tswitch(m)\n\t{\n case 1:strcpy(s,\"Mon.\");break;\n\tcase 2:strcpy(s,\"Tue.\");break;\n case 3:strcpy(s,\"Wed.\");break;\n\tcase 4:strcpy(s,\"Thu.\");break;\n case 5:strcpy(s,\"Fri.\");break;\n case 6:strcpy(s,\"Sat.\");break;\n\tcase 0:strcpy(s,\"Sun.\");break;\n\t}\n\tprintf(\"%s\",s);\n\n\n\treturn 0;\n}\n"} +{"label": "66", "index": "32665", "code": "int main(){\n\tlong int year,month,day,a,b,c=0,i,d[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%ld %ld %ld\",&year,&month,&day);\n for(;year>10000;)year=year-10000;\n a=year/4-year/100+year/400;\n\tif(year%4==0&&year%100!=0||year%400==0){\n\t\ta--;\n\t\td[1]++;\n\t}\n b=(year-1)*365+a+day;\n for(i=0;i2800){\n\t\tnian%=2800;\n\t}\n\n\tfor(i=1;i=2800)\n\t\ta=a-2800;\n\td=a-1;\n\te=d*365+(d/4+d/400-d/100);\n\tif(b==1)\n\t\tf=0;\n\telse if(b==2){\n\t\tf=31;}\n\telse if(b==3){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=60;}\n\t\telse{\n\t\t\tf=59;}}\n\telse if(b==4){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=91;}\n\t\telse{\n\t\t\tf=90;}}\n\telse if(b==5){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=121;}\n\t\telse{\n\t\t\tf=120;}}\n\telse if(b==6){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=152;}\n\t\telse{\n\t\t\tf=151;}}\n\telse if(b==7){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=182;}\n\t\telse{\n\t\t\tf=181;}}\n\telse if(b==8){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=213;}\n\t\telse{\n\t\t\tf=212;}}\n\telse if(b==9){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=244;}\n\t\telse{\n\t\t\tf=243;}}\n\telse if(b==10){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=274;}\n\t\telse{\n\t\t\tf=273;}}\n\telse if(b==11){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=305;}\n\t\telse{\n\t\t\tf=304;}}\n\telse if(b==12){\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tf=335;}\n\t\telse{\n\t\t\tf=334;}}\n\tg=e+f+c;\n\th=g%7;\n\tif(h==1)\n\t\tprintf(\"Mon.\");\n\telse if(h==2)\n\t\tprintf(\"Tue.\");\n\telse if(h==3)\n\t\tprintf(\"Wed.\");\n\telse if(h==4)\n\t\tprintf(\"Thu.\");\n\telse if(h==5)\n\t\tprintf(\"Fri.\");\n\telse if(h==6)\n\t\tprintf(\"Sat.\");\n\telse if(h==0)\n\t\tprintf(\"Sun.\");\n\treturn 0;\n}"} +{"label": "66", "index": "32669", "code": "//int isrunnian(int year);\nint total(int year,int mouth, int day);\nint main(){\n\tint k;\n\tint p,q;\n\tint year,mouth, day;\n\tint sum=0;\n\tscanf(\"%d %d %d\",&year,&mouth, &day);\n\t//for(k=1;k<=year-1;k++){\n\t\t//if(isrunnian(k)){\n\t//\tif(k%400==0 || (k%4==0&&k%100 != 0) )\n\t//\t{\n\t//\t\tsum+=2;\n\t//\t}else{\n\t//\t\tsum+=1;\n\t//\t}\n\t//}\n\tsum+=year-1 + (year-1)/4 - (year-1)/100 + (year-1)/400;\n\tp=total(year, mouth ,day);\n\tq=p+sum;\n\tif(q%7==0){\n\t\tprintf(\"Sun.\\n\");\n\t}\n\tif(q%7==1){\n\t\tprintf(\"Mon.\\n\");\n\t}\n\tif(q%7==2){\n\t\tprintf(\"Tue.\\n\");\n\t}\n\tif(q%7==3){\n\t\tprintf(\"Wed.\\n\");\n\t}\n\tif(q%7==4){\n\t\tprintf(\"Thu.\\n\");\n\t}\n\tif(q%7==5){\n\t\tprintf(\"Fri.\\n\");\n\t}\n\tif(q%7==6){\n\t\tprintf(\"Sat.\\n\");\n\t}\n\treturn 0;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nint total(int year, int mouth ,int day){\n\tint j=0;\n\tfor(int i=1;i> year >> month >> day;\n\tif((year % 400 == 0)||((year % 100 != 0)&&(year % 4 == 0)))/*???????*/\n\t\ta[1] = 29;\n\telse a[1] = 28;\n\tyear = (year-1) % 400;/*400??????7???*/\n\tn = year / 100;\n\tnum += 2 * (year / 4 - n);/*?????????7?2*/\n\tnum += year - (year / 4 - n);\n\tfor(i = 0;i < month-1;i++)\n\t{\n\t\tnum += a[i];\n\t}\n\tnum += day;/*?????*/\n\tnum = num % 7;\n\tswitch(num)/*??????*/\n\t{\n\t\tcase 0:cout << \"Sun.\" <0;i-=400){\n\t\t\t\tm=i;\n\t\t}\n\t\t}\n for(i=1;i>y>>m>>d;\n\tif(((y%4==0)&&(y%100!=0))||(y%400==0))\n\t{\n\t\ta=1;\n\t}\n\telse\n\t{\n\t\ta=0;\n\t}\n\tb=(y+(y-1)/4-(y-1)/100+(y-1)/400)%7;\n\tswitch(m)\n\t{\n\t\tcase 12:n=n+30;\n\t\tcase 11:n=n+31;\n\t\tcase 10:n=n+30;\n\t\tcase 9:n=n+31;\n\t\tcase 8:n=n+31;\n\t\tcase 7:n=n+30;\n\t\tcase 6:n=n+31;\n\t\tcase 5:n=n+30;\n\t\tcase 4:n=n+31;\n\t\tcase 3:n=n+28+a;\n\t\tcase 2:n=n+31;\n\t\tcase 1:n=n;\n\t}\n\tn=n+d;\n\tswitch((n-1+b)%7)\n\t{\n\tcase 0:cout<<\"Sun.\";break;\n\tcase 1:cout<<\"Mon.\";break;\n\tcase 2:cout<<\"Tue.\";break;\n\tcase 3:cout<<\"Wed.\";break;\n\tcase 4:cout<<\"Thu.\";break;\n\tcase 5:cout<<\"Fri.\";break;\n\tcase 6:cout<<\"Sat.\";break;\n\t}\t\n\treturn 0;\n}"} +{"label": "66", "index": "32677", "code": "int main()\n{\nint a,b,c,q,w,p,e,r,t,y;\nscanf(\"%d %d %d\",&a,&b,&c);\nq=((a-1)/4-(a-1)/100+(a-1)/400)+(a-1)*1;\nswitch(b){\n case 1: \n w=0;\n break;\n case 2: \n w=31;\n break;\n case 3: \n w=31+28;\n break;\n case 4: \n w=31+28+31;\n break;\n case 5: \n w=31+28+31+30;\n break;\n case 6: \n w=28+31*3+30;\n break;\n case 7: \n w=28+31*3+30*2;\n break;\n case 8: \n w=28+31*4+30*2;\n break;\n case 9: \n w=28+31*5+30*2;\n break;\n case 10: \n w=28+31*5+30*3;\n break;\n case 11: \n w=28+31*6+30*3;\n break;\n case 12: \n w=28+31*6+30*4;\n break;\n }\nr=a%4;\ny=(a+100)%100;\nt=(a+400)%400;\nif(r==0){\n if(y!=0){\n if (b>2) w=w+1; \n }\n else if(t==0){\n if (b>2) w=w+1;\n }\n }\n e=q+w+c;\n p=e%7;\n\n\tswitch(p){\n\tcase 1:\n\t\tprintf(\"Mon.\\n\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\\n\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\\n\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\\n\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\\n\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\\n\");\n\t\tbreak;\n\tcase 0:\n\t\tprintf(\"Sun.\\n\");\n\t\tbreak;\n }\nreturn 0;\n}\n\n\n\n"} +{"label": "66", "index": "32678", "code": "// xingqiji.cpp : Defines the entry point for the console application.\n//\n\n\nint main()\n{\nlong int y1,y,m,d,a,x,b;\nscanf(\"%d %d %d\",&y1,&m,&d);\ny=y1%400;\na=y/4-y/100+y/400;\n\nif(y%400==0||y%100!=0&&y%4==0) {if(m<3) a=a-1;}\n\nswitch(m){\ncase 1:x=d;break;\ncase 2:x=31+d;break;\ncase 3:x=59+d;break;\ncase 4:x=90+d;break;\ncase 5:x=120+d;break;\ncase 6:x=151+d;break;\ncase 7:x=181+d;break;\ncase 8:x=212+d;break;\ncase 9:x=243+d;break;\t\ncase 10:x=273+d;break;\ncase 11:x=304+d;break;\t\ndefault :x=334+d;break;}\t\n \nb=(y*365+x+a-1)%7;\n\nswitch(b){\ncase 1:printf(\"Mon.\");break;\ncase 2:printf(\"Tue.\");break;\ncase 3:printf(\"Wed.\");break;\ncase 4:printf(\"Thu.\");break;\ncase 5:printf(\"Fri.\");break;\ncase 6:printf(\"Sat.\");break;\ndefault :printf(\"Sun.\");break;}\n\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32679", "code": "int main()\n{\n\tint year,month,date,t,y,m,d,s;\n\tscanf(\"%d %d %d\",&year,&month,&date);\n\tt=(year-1)/400;\n\tyear=year-t*400;\n t=(year-1)/4;\n\ty=(t*366+(year-1-t)*365)%7;\n\tif (year>300) y=(y-3)%7;\n\telse if (year>200) y=(y-2)%7;\n\telse if (year>100) y=(y-1)%7;\n\tswitch(month)\n\t{\n\t case 1:m=0;break;\n\t case 2:m=3;break;\n\t case 3:m=3;break;\n\t case 4:m=6;break;\n\t case 5:m=1;break;\n\t case 6:m=4;break;\n\t case 7:m=6;break;\n\t case 8:m=2;break;\n\t case 9:m=5;break;\n\t case 10:m=0;break;\n\t case 11:m=3;break;\n\t case 12:m=5;break;\n\t}\n\tif((year%4==0&&year%100!=0||year%400==0)&&month>2) m=(m+1)%7;\n\td=date%7;\n\ts=(m+y+d)%7;\n\tswitch (s)\n\t{\n\tcase 0: printf(\"Sun.\\n\");break;\n case 1: printf(\"Mon.\\n\");break;\n\tcase 2: printf(\"Tue.\\n\");break;\n case 3: printf(\"Wed.\\n\");break;\n\tcase 4: printf(\"Thu.\\n\");break;\n\tcase 5: printf(\"Fri.\\n\");break;\n\tcase 6: printf(\"Sat.\\n\");break;\n\t\t\t\t\t\t\t\n\t}\n\n\t\t\n\t\treturn 0;\n}"} +{"label": "66", "index": "32680", "code": "int main() \n{ \nint day,mn,yr,i,days=0,s,k; \nint mont[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; \nchar wek[7][9]={ {'S','u','n'}, \n{'M','o','n'}, \n{'T','u','e'}, \n{'W','e','d'}, \n{'T','h','u'}, \n{'F','r','i'}, \n{'S','a','t'} \n }; \nscanf(\"%d%d%d\",&yr,&mn,&day); \nif (yr%4==0||yr%100==0||yr%400==0) \nmont[2]=29; \nelse \nmont[2]=28; \nfor (i=0;i2001){\n\t\t\tn-=2000;\n\t\t}\n\t\telse\n\t\t\tbreak;\n\t}\n\n\tfor(i=1;i>year>>month>>day;\n temp=year-1;\n runnian=temp/4-temp/100+temp/400;\n sum=runnian*366+(temp-runnian)*365;\n if(year%4!=0||year%100==0&&year%400!=0) a[1]=28; \n if(month==1) sum+=day;\n else\n {for(int i=0;i<=month-2;i++)\n sum+=a[i];\n sum+=day;\n } \n sum=sum%7;\n switch(sum)\n { case(1): cout<<\"Mon.\";break;\n case(2): cout<<\"Tue.\";break;\n case(3): cout<<\"Wed.\";break;\n case(4): cout<<\"Thu.\";break;\n case(5): cout<<\"Fri.\";break;\n case(6): cout<<\"Sat.\";break;\n case(0): cout<<\"Sun.\";break;\n }\n return 0;\n}"} +{"label": "66", "index": "32684", "code": "\n\nchar s[][4] = {\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"};\nint c[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\nint leap(int n) {\n return n % 400 == 0 || (n % 4 == 0 && n % 100);\n}\n\nint main() {\n int y, m, d, k, i;\n scanf(\"%d%d%d\", &y, &m, &d);\n if (!(y %= 400)) y = 400;\n k = 0;\n for (i = 1; i < y; ++i) k = (k + 365 + leap(i)) % 7;\n for (i = 1; i < m; ++i)\n k = (k + c[i] + (i == 2 ? leap(y) : 0)) % 7;\n printf(\"%s.\\n\", s[(k + d) % 7]);\n return 0;\n}\n"} +{"label": "66", "index": "32685", "code": "int main()\n{\n\tint year,month,day,y,d,num4,num100,x;\n\tint a[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};\n\tint b[13]={0,0,31,60,91,121,152,182,213,244,274,305,335};\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\ty=year%400;\n\tif(y==0) y=400;\n\tnum4=(y-1)/4;\n\tnum100=(y-1)/100;\n\tif(num100==4) num100=3;\n\td=(y-1)*365+num4-num100;\n\tif(y%4!=0)\td=d+a[month]+day;\n\tif(y%4==0) d=d+b[month]+day;\n\tx=d%7;\n\tif(x==0) printf(\"Sun.\\n\");\n\tif(x==1) printf(\"Mon.\\n\");\n\tif(x==2) printf(\"Tue.\\n\");\n\tif(x==3) printf(\"Wed.\\n\");\n\tif(x==4) printf(\"Thu.\\n\");\n\tif(x==5) printf(\"Fri.\\n\");\n\tif(x==6) printf(\"Sat.\\n\");\n\treturn 0;\n}\n\n\n"} +{"label": "66", "index": "32686", "code": "int isRunNian(int year){\n\tint result;\n\tif(year%400 == 0 ||(year%4==0 && year%100!=0)){\n\t\tresult = 1;\n\t} else{\n\t\tresult = 0;\n\t}\n return result;\t\n}\n\nint main()\n{\n\tlong int year, month, day, total;\n\tscanf(\"%d %d %d\", &year, &month, &day);\n\ttotal = 0;\n\tfor(int i = 1; i < month; i++){ \t\n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12){\n\t\t\ttotal += 31;\t\n\t\t} else if (i == 4 || i ==6 || i == 9 || i==11){\n\t\t\ttotal += 30;\n\t\t} else if(i == 2){\n\t\t\tif(isRunNian(year)){\n\t\t\t\ttotal += 29;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\ttotal += 28;\n\n\t\t\t}\n\t\t}\n\t}\n\ttotal += day-1;\n\ttotal+=(year-1)*365+year/4-year/100+year/400;\ntotal=total%7;\nif(total==0){printf(\"Sat.\");}\nelse if(total==1){printf(\"Mon.\");}\nelse if(total==2){printf(\"Tue.\");}\nelse if(total==3){printf(\"Wed.\");}\nelse if(total==4){printf(\"Fri.\");}\nelse if(total==5){printf(\"Sat.\");}\nelse if(total==6){printf(\"Fri.\");}\nreturn 0;\n}\n\n"} +{"label": "66", "index": "32687", "code": "\nint main(){\n\tint i,j,a,year,month,day,days=0;\n\t\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tfor( i=1;i2&&(y%4==0&&y%100!=0||y%400==0))\n\t\t\tt+=1;\n\n\tfor(;y1>0;y1--)\n\t{\n\t\tif(y1%4==0&&y1%100!=0||y1%400==0)\n\t\t\tt+=366;\n\t\telse\n\t\t\tt+=365;\n\t}\n\n\tfor(m--;m>0;m--)\n\t{\n\t\tif(m==1||m==3||m==5||m==7||m==8||m==10||m==12)\n\t\t\tt+=31;\n\t\telse if(m==2)\n\t\t\tt+=28;\n\t\telse\n\t\t\tt+=30;\n\t}\n\n\tt+=d;\n\n\tn=t%7;\n\n\tswitch (n)\n\t{\n\t\tcase(0):\n\t\t\t{\n\t\t\t\tprintf(\"Sun.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase(1):\n\t\t\t{\n\t\t\t\tprintf(\"Mon.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase(2):\n\t\t\t{\n\t\t\t\tprintf(\"Tue.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase(3):\n\t\t\t{\n\t\t\t\tprintf(\"Wed.\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\tcase(4):\n\t\t\t{\n\t\t\t\tprintf(\"Thu.\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\tcase(5):\n\t\t\t{\n\t\t\t\tprintf(\"Fri.\");\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\tcase(6):\n\t\t\t{\n\t\t\t\tprintf(\"Sat.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "66", "index": "32690", "code": "main()\n{\n\tunsigned long a,b,c;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tif(a==4)\n\tprintf(\"Mon.\");\n\telse if(a==1111)printf(\"Sat.\");\n\telse if(a==2000)printf(\"Tue.\");\n\telse if(a==9876543)printf(\"Sun.\");\n\telse if(a==2147483647)printf(\"Tue.\");\n\telse if(a==210000)printf(\"Wed.\");\n\telse if(a==1921)printf(\"Fri.\");\n\telse printf(\"Thu.\");\n \n}"} +{"label": "66", "index": "32691", "code": "int main(){\n\tlong y,m,d,t=0,l,a,b,c,ry;\n long d1=0;\n\tscanf(\"%d %d %d\",&y,&m,&d);\n\ta=(y-1)/4;\n\tb=(y-1)/100;\n\tc=(y-1)/400;\n ry=a-b+c;\n\td1=365%7*(y-1)%7+ry%7;\n\tif(y>=4&&y<100&&y%4==0){\n\t\t\tt=1;\n\t}\n\telse if(y>=100&&y%4==0&&y%100!=0){\n\t\t\tt=1;\n\t}\n\telse if(y>=100&&y%100==0&&y%400==0){\n\t\t\tt=1;\n\t}\n\tif(t==0){\n\tswitch(m)\n\t{\n\tcase 1:\n\t\td1+=d;\n\t\tbreak;\n\tcase 2:\n\t\td1=d1+31+d;\n\t\tbreak;\n\tcase 3:\n\t\td1=d1+59+d;\n\t\tbreak;\n\tcase 4:\n\t\td1=d1+90+d;\n\t\tbreak;\n\tcase 5:\n\t\td1=d1+120+d;\n\t\tbreak;\n\tcase 6:\n\t\td1=d1+151+d;\n\t\tbreak;\n\tcase 7:\n\t\td1=d1+181+d;\n\t\tbreak;\n\tcase 8:\n\t\td1=d1+212+d;\n\t\tbreak;\n\tcase 9:\n\t\td1=d1+243+d;\n\t\tbreak;\n\tcase 10:\n\t\td1=d1+273+d;\n\t\tbreak;\n\tcase 11:\n\t\td1=d1+304+d;\n\t\tbreak;\n\tcase 12:\n\t\td1=d1+334+d;\n\t\tbreak;\n\t}\n\t}\n\tif(t==1){\n\tswitch(m)\n\t{\n\tcase 1:\n\t\td1+=d;\n\t\tbreak;\n\tcase 2:\n\t\td1=d1+31+d;\n\t\tbreak;\n\tcase 3:\n\t\td1=d1+60+d;\n\t\tbreak;\n\tcase 4:\n\t\td1=d1+91+d;\n\t\tbreak;\n\tcase 5:\n\t\td1=d1+121+d;\n\t\tbreak;\n\tcase 6:\n\t\td1=d1+152+d;\n\t\tbreak;\n\tcase 7:\n\t\td1=d1+182+d;\n\t\tbreak;\n\tcase 8:\n\t\td1=d1+213+d;\n\t\tbreak;\n\tcase 9:\n\t\td1=d1+244+d;\n\t\tbreak;\n\tcase 10:\n\t\td1=d1+274+d;\n\t\tbreak;\n\tcase 11:\n\t\td1=d1+305+d;\n\t\tbreak;\n\tcase 12:\n\t\td1=d1+335+d;\n\t\tbreak;\n\t}\n\t}\n\tl=d1%7;\n\tswitch(l)\n\t{\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\t}\n\treturn 0;\n\t}\n\n\n\n\n\n"} +{"label": "66", "index": "32692", "code": "int main()\n{\n int a,b,c,d,e;\n int i;\n int m=0,n=0,p=0,q=0;\n scanf(\"%d %d %d\",&a,&b,&c);\n for(i=1;i2))\nw++;\n\nprintf(\"%s.\\n\", weekdays[w%7]);\n\nreturn 0;\n}\n"} +{"label": "66", "index": "32694", "code": "int isRunNian(int year){\n int result;\n if(year%400==0||(year%4==0&&year%100!=0)){\n result = 1;\n } else{\n result = 0;\n }\n return result; \n}\nint main(){\n int year,month,day;\n long total;\n scanf(\"%d%d%d\",&year,&month,&day);\n total=0;\n int i;\n for(i=1; i2&&((y%4==0&&y%100!=0)||y%400==0))\n {sum+=1;}\n for(i=y-1;i>=0;i--)\n {\n if(i%400==0)\n {y1=i;\n break;}\n }\n for(i=y1+100;i 2)\n\t\t\tday = day + 1; \n } \n \n\tfor(i = 1; i < y; i++)\n {\n day = day + 365;\n if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0)) \n {\n day = day + 1; \n } \n }\n \n\tfor(i = 1; i < m; i++)\n {\n day = day + mon[i]; \n }\n \n\n \n switch(day % 7) \n {\n\tcase 1: printf(\"Mon.\\n\");break; \n case 2: printf(\"Tue.\\n\");break;\n case 3: printf(\"Wed.\\n\");break;\n case 4: printf(\"Thu.\\n\");break;\n case 5: printf(\"Fri.\\n\");break;\n case 6: printf(\"Sat.\\n\");break;\n case 0: printf(\"Sun.\\n\");break; \n }\n \n return 0; \n}\n\n"} +{"label": "66", "index": "32698", "code": "int main()\n{\n\tint a[13] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5, 1},\n\t\tb[13] = {0, 3, 4, 0, 2, 5, 0, 3, 6, 1, 4, 6, 2};\n\tint year, mon, day, i, sum = 0, t, n;\n\t\n\tcin >> year >> mon >> day;\n\tn = (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400; \n\tsum = n * 2 + (year - 1 - n);\n\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\tsum = sum + b[mon - 1] + day;\n\telse\n\t\tsum = sum + a[mon - 1] + day;\n\n\tt = sum % 7;\n\tswitch(t)\n\t{\n\t\tcase 0:cout << \"Sun.\"; break;\n\t\tcase 1:cout << \"Mon.\"; break;\n\t\tcase 2:cout << \"Tue.\"; break;\n\t\tcase 3:cout << \"Wed.\"; break;\n\t\tcase 4:cout << \"Thu.\"; break;\n\t\tcase 5:cout << \"Fri.\"; break;\n\t\tcase 6:cout << \"Sat.\"; break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32699", "code": "int main()\n{\n\tlong a,b,c;\n\tint i;\n\tint e[13];\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tlong n,s=0,m;\n\tif(a==1111){printf(\"Sat.\\n\");goto end;}else\tif(a==2000){printf(\"Tue.\\n\");goto end;}else\tif(a==1111111111){printf(\"Sat.\\n\");goto end;}\n if(a%400==0||(a%100!=0&&a%4==0)){\n e[0]=0;e[1]=31;e[2]=29;e[3]=31;e[4]=30;e[5]=31;e[6]=30;e[7]=31;e[8]=31;e[9]=30;e[10]=31;e[11]=30;}\n else e[0]=0;e[1]=31;e[2]=28;e[3]=31;e[4]=30;e[5]=31;e[6]=30;e[7]=31;e[8]=31;e[9]=30;e[10]=31;e[11]=30;\n\ta=a%28;\n\tn=a/4;\n\tm=a%4;\n\ts=s+n*366;if(m==0)s=s+365*3*n;else\n\ts=s+365*(3*n+m-1);\n for(i=0;i>y>>m>>d;\nif (y==1)\n{\n\tif (m==1)\n\t\tsum=d;\n\telse{\n\t\tsum=a[m-2]+d;\n\n\t}\n\n}\nif (y!=1){\n\n\tx=(y-1)/4-(y-1)/100+(y-1)/400;\n\tsum=sum+2*x+(y-1-x);\n\tif (m==1) sum=sum+d;\n\tif (m!=1){\n\tif (check(y)==1)\n\t{\n\t\tsum=sum+a[m-2]+d;\n\t}\n\tif (check(y)==2)\n\t\t{sum=sum+b[m-2]+d;}\n\n}}\n\nif (sum%7==0) cout<<\"Sun.\"<leap[i])\n\t\t\ttemp++;\n\t\tyears += temp*sign;\n\t\tsign *= -1;\n\t}\n\n\treturn years;\n}\n\nint main()\n{\n\tint y,m,d;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\t\n\tint leftDay = leapYearBetween(1,(y-1)/7*7);\n\tleftDay += (y-1)%7*365;\n\tleftDay += leapYearBetween((y-1)/7*7+1,y-1);\n\n\tfor(int i=0;i2)\n\t\tleftDay += leapYearBetween(y,y);\n\tleftDay += d;\n\n\tleftDay %= 7;\n\n\tprintf(\"%s\\n\",name[leftDay]);\n\n\treturn 0;\n}"} +{"label": "66", "index": "32703", "code": "\nint main()\n{\n\tlong year,month,day,days=0;\n\tscanf(\"%ld %ld %ld\",&year,&month,&day);\n\tdays=( (year-1)%7+(year-1)/4-(year-1)/100+(year-1)/400 )%7;\n\tint i;\n\tfor(i=1;i400;i++)\n\t{\n\t a=a-400;\n\t}\n d=(a-1)/4;\n e=(a-1)/100;\n\tsum=(a-1)*365+d-e;\n for(j=0;j2)\n\t\tsum++;\n\tsum=sum+c;\n\tsum=sum%7;\n\tswitch(sum)\n\t{\n\t case 1: printf(\"Mon.\"); break;\n\t case 2: printf(\"Tue.\"); break;\n\t case 3: printf(\"Wed.\"); break;\n\t case 4: printf(\"Thu.\"); break;\n\t case 5: printf(\"Fri.\"); break;\n\t case 6: printf(\"Sat.\"); break;\n\t case 0: printf(\"Sun.\"); break;\t\n\t}\n return 0;\n}"} +{"label": "66", "index": "32705", "code": "int main()\n{\n int a,b,c;\n scanf(\"%d%d%d\",&a,&b,&c);\n int sum1=0,sum2=0,sum;\n int i;\n sum1=(a-1)/4-(a-1)/100+(a-1)/400+a-1;\n for(i=1;i>y>>m>>d;\n\tint t,q,k,sum,f;\n\tt = ( y - 1 ) / 400;\n\tq = ( y - 1 ) % 400 / 100;\n\tk = ( y - 1 ) % 100;\n sum = q * ( 100 * 365 + 24 ) + k * 365 + k / 4;\n\tint zz[12]={0,31,59,90,120,151,181,212,243,273,304,334};\n\tif ( y % 4 != 0 || ( y % 4 == 0 && y % 100 == 0 && y % 400 != 0 ))\n\t\tsum+=zz[m-1]+d;\n\telse\n\t{\n\t\tif ( m <= 2 )\n\t\t\tsum+=zz[m-1]+d;\n\t\telse\n\t\t\tsum+=zz[m-1]+d+1;\n\t}\n\tf = ( sum - 1 ) % 7;\n\t if ( f == 0) cout<<\"Mon.\"<1){\n\t\tif(a%4!=0||(a%100==0&&a%400!=0)){\n\t\t\tfor(i=0;i400){\n\t\t year=year-400;\n\t\t }\n a=(year-1)/4;\n\tb=(year-1)/100;\n\tsum=365*year+a+1-b;\n for(i=1; i>year;\n\tif( year%4 != 0 || ( year%100 == 0 && year%400 != 0 ) )\n\t{\n\t\t;\n\t}\n\telse\n\t{\n\t\tPing[2]++;\n\t}\n\tcin>>month>>day;\n\tfor( int i=0 ; i2)\n {\n if((year%100)==0)\n {\n if((year%400)==0)\n n=n+1;\n else\n n=n;\n }\n else\n n=n+1; \n }\n }\n else\n {\n if((year%3200)==0&&month>2)\n { \n if((year%1728)==0)\n n=n+1;\n else\n n=n;\n }\n else\n n=n;\n }\n switch(month)\n {\n case 1:n=n+day;\n break;\n case 2:n=n+31+day;\n break;\n case 3:n=n+59+day;\n break;\n case 4:n=n+90+day;\n break;\n case 5:n=n+120+day;\n break;\n case 6:n=n+151+day;\n break;\n case 7:n=n+181+day;\n break;\n case 8:n=n+212+day;\n break;\n case 9:n=n+243+day;\n break;\n case 10:n=n+273+day;\n break;\n case 11:n=n+304+day;\n break;\n case 12:n=n+334+day;\n break; \n }\n m=n%7;\n switch(m)\n {\n case 0:printf(\"Sun.\\n\");\n break;\n case 1:printf(\"Mon.\\n\");\n break;\n case 2:printf(\"Tue.\\n\");\n break;\n case 3:printf(\"Wed.\\n\");\n break;\n case 4:printf(\"Thu.\\n\");\n break;\n case 5:printf(\"Fri.\\n\");\n break;\n case 6:printf(\"Sat.\\n\");\n break;\n }\n }\n return 0;\n}\n"} +{"label": "66", "index": "32719", "code": "void main()\n{\n\tlong int year;\n\tint month,day;\n\tlong int sum;\n\tscanf(\"%ld%d%d\",&year,&month,&day);\n\t\tif(month==1)\n\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+day;\n\t\telse if(month==2)\n\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+31+day;\n\t\telse\n\t\t{\n\t\tif(year%400==0||((year%4==0)&&(year%100!=0)))\n\t\t{\n\t\t\tif(month==3)\n sum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+60+day;\n\t\t\telse if(month==4)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+91+day;\n\t\t\telse if(month==5)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+121+day;\n\t\t\telse if(month==6)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+152+day;\n\t\t\telse if(month==7)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+182+day;\n else if(month==8)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+213+day;\n else if(month==9)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+244+day;\n else if(month==10)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+274+day;\n else if(month==11)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+305+day;\n else if(month==12)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+335+day;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(month==3)\n sum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+59+day;\n\t\t\telse if(month==4)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+90+day;\n\t\t\telse if(month==5)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+120+day;\n\t\t\telse if(month==6)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+151+day;\n\t\t\telse if(month==7)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+181+day;\n else if(month==8)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+212+day;\n else if(month==9)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+243+day;\n else if(month==10)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+273+day;\n else if(month==11)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+304+day;\n else if(month==12)\n\t\t\t\tsum=365*((year-1)%7)+((year-1)/4+(year-1)/400-(year-1)/100)+334+day;\n\t\t}\n\t\t}\n\t\tif(sum%7==0)\n\t\t\tprintf(\"Sun.\\n\");\n\t\telse if(sum%7==1)\n\t\t\tprintf(\"Mon.\\n\");\n\t\telse if(sum%7==2)\n\t\t\tprintf(\"Tue.\\n\");\n\t else if(sum%7==3)\n\t\t\tprintf(\"Wed.\\n\");\n\t else if(sum%7==4)\n\t\t\tprintf(\"Thu.\\n\");\n\t else if(sum%7==5)\n\t\t\tprintf(\"Fri.\\n\");\n\t else if(sum%7==6)\n\t\t\tprintf(\"Sat.\\n\");\n}"} +{"label": "66", "index": "32720", "code": "int main()\n{\nint w,c,y,m,d,Y;\nscanf(\"%d%d%d\",&Y,&m,&d);\nif(m==1)\n{\nY=Y-1;\nm=13;\n}\nif(m==2)\n{\nY=Y-1;\nm=14;\n}\n\nc=Y/100;\ny=Y-c*100; \nint a,b,e;\na=y/4;\nb=c/4;\ne=26*(m+1)/10;\n\nif(Y<=5000){\nw=y+a+b-2*c+e+d-1;\nw=w%7;\n\n\nswitch(w)\n{\ncase 0:printf(\"Sun.\\n\");break;\ncase 1:printf(\"Mon.\\n\");break;\ncase 2:printf(\"Tue.\\n\");break;\ncase 3:printf(\"Wed.\\n\");break;\ncase 4:printf(\"Thu.\\n\");break;\ncase 5:printf(\"Fri.\\n\");break;\ncase 6:printf(\"Sat.\\n\");break;\n}\n}\nelse{\n\tw=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400+1)%7; \n\nswitch(w)\n{\ncase 6:printf(\"Sun.\\n\");break;\ncase 0:printf(\"Mon.\\n\");break;\ncase 1:printf(\"Tue.\\n\");break;\ncase 2:printf(\"Wed.\\n\");break;\ncase 3:printf(\"Thu.\\n\");break;\ncase 4:printf(\"Fri.\\n\");break;\ncase 5:printf(\"Sat.\\n\");break;\n}\n}\nreturn 0;\n}\n\n"} +{"label": "66", "index": "32721", "code": "int main()\n{\n\tunsigned long year,month,date;\n\tunsigned long i,days,total=0;\n unsigned long sumrun=0;\t\n\t scanf(\"%d%d%d\",&year,&month,&date);\n\t \n\n\t days=(year-1)*(365%7)+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\t \n\n\t if(month==1)\n\t\t total=days+date;\n\t else\n\t {\n\t\t for(i=1;i=400)\n\t{\n\t\tyea=year;\n\t\twhile(yea>=400)\n\t{\n\tyea=yea-400;\n\tsum=5;\t\n\t}\n\n\tfor(i=0;i1)\n\t{\n\t\tfor (i=1;i>year>>month>>day;\n\tint num=(year-1)/400;\n\tlong sum=num*sum1;\n\tsum%=7;\n\tyear=year-num*400; //??????\n\tfor(i=1;i4)\n\t{\n\tsum=((year-1)/4)-((year-1)/100)+((year-1)/400);\n\t}\n\telse\n\t{\n\t\tsum=0;\n\t}\t\t\n\t\n\tfor(n=1;n2&&isleapyear(year))\n\t\tx=x+1;\n\ty=365*((year-1)%7)+(sum+x)%7;\n\tz=y%7;\n\tprintDigit(z);\n}\nint isleapyear(int year)\n{\n\treturn((year%4==0&&year%100!=0)||(year%400==0));\n\n}\n"} +{"label": "66", "index": "32730", "code": "int main()\n{\n\tint y,m,d,p,q;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tint i,n=0;\n\tp=(y-1)/400;\n\tq=(y-1)%400;\n\tfor(i=1;i<=q;i++){\n\t\tif(i%400==0||(i%4==0&&i%100!=0)){\n\t\tn+=366;\n\t} \n\t\telse{\n\t\tn+=365;\n\t}}\n\t\n\t\n\tfor(i=1;i1){\nif (a%4!=0||(a%100==0&&a%400!=0)){\n for(j=0;j40002)\n {\n y-=40000;\n m+=14609700;\n m%=7;\n }\n while (y>=402)\n {\n y-=400;\n m+=146097;\n m%=7;\n }\n while (!((y==1) && (mon==1) && (day==1)))\n {\n m++;\n m%=7;\n day--;\n if (day==0)\n {\n mon--;\n if (mon==0)\n {\n mon=12;\n y--;\n }\n if ((mon==1) || (mon==3) ||(mon==5) ||(mon==7) ||(mon==8) ||(mon==10) ||(mon==12))\n day=31;\n else if ((mon==4) || (mon==6) ||(mon==9) ||(mon==11))\n day=30;\n else if ((y%100!=0) && (y%4==0) || (y%100==0) && (y%400==0))\n day=29;\n else day=28;\n }\n }\n m%=7;\n switch (m)\n {\n case 0:printf(\"Mon.\\n\"); break;\n case 1:printf(\"Tue.\\n\"); break;\n case 2:printf(\"Wed.\\n\"); break;\n case 3:printf(\"Thu.\\n\"); break;\n case 4:printf(\"Fri.\\n\"); break;\n case 5:printf(\"Sat.\\n\"); break;\n case 6:printf(\"Sun.\\n\"); break;\n }\n\n return 0;\n}\n"} +{"label": "66", "index": "32736", "code": "int main()\n{\nunsigned int year,month,date,a,b;\nscanf(\"%d %d %d\",&year,&month,&date);\na=(year-1)+(year-1)/4-(year-1)/100+(year-1)/400;\nswitch(month)\n\t{ \n case 2:\n case 3:a+=3;break;\n case 4:a+=6;break;\n\t case 5:a+=8;break;\t\t\n\t case 6:a+=11;break; \n\t case 7:a+=13;break;\n\t case 8:a+=16;break;\n\t case 9:a+=19;break;\n\t case 10:a+=21;break;\n\t case 11:a+=24;break;\n\t case 12:a+=26; break;\n\t}\nif ( month>=3 && ((year%4==0&&year%100!=0) || year%400==0) ) a+=1;\n\na+=date;\nb=a%7;\n\nswitch(b)\n\t{\n case 1 :printf(\"Mon.\\n\");break;\n\t case 2 :printf(\"Tue.\\n\");break;\n\t case 3 :printf(\"Wed.\\n\");break;\n\t case 4 :printf(\"Thu.\\n\");break;\n\t case 5 :printf(\"Fri.\\n\");break;\n\t case 6 :printf(\"Sat.\\n\");break;\n\t case 0 :printf(\"Sun.\\n\");break;\n\t}\nreturn 0;\n}\n\n"} +{"label": "66", "index": "32737", "code": "int main(){\n int s[13],y,m,d,t=0,w;\n s[1]=s[3]=s[5]=s[7]=s[8]=s[10]=s[12]=31;\n s[4]=s[6]=s[9]=s[11]=30;\n cin>>y>>m>>d;//????????????\n s[2]=y%400==0||y%4==0&&y%100!=0?29:28;\n for(int i=1;i>y>>m>>d;\n\tk=(y-1)+(y-1)/4-(y-1)/100+(y-1)/400;\n\tif((y%4==0&&y%100!=0)||y%400==0)\n\t{\n\t\tif(m==1)\n\t\t{\n\t\t\tk=k+d;\n\t\t}\n\t\telse if(m>1)\n\t\t{\n\t\t\tfor(i=0;i1)\n\t\t{\n\t\t\tfor(i=0;i=3)\n\t{\tl=toshi/4-toshi/100+toshi/400;\n\t\tb=toshi%7;\n\t\ta=b*365+l;\n\t}\n\telse\n\t{\tl=(toshi-1)/4-(toshi-1)/100+(toshi-1)/400;\n\t\tb=toshi%7;\n\t\ta=b*365+l;\n\t}\n\ts=s+a+getsu1(getsu)+hi;\n\tshuu(s);\n \n}\n"} +{"label": "66", "index": "32744", "code": "int main()\n{\n int s=0,i,q,y,m,d;\n int k[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int r[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n char w[][10]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n cin>>y>>m>>d;\n if(y==1111111111)\n {\n\t\tcout<<\"Sat.\"<>q;\n return 0;\n}"} +{"label": "66", "index": "32745", "code": "\nint f(unsigned int year,int month,int day)\n{\n\tint t=0;\n\t\n\n\tif(year%4 == 0 && year%100 !=0 || year%400 == 0) t=1;\n\tint monthday[13]={0,31,28+t,31,30,31,30,31,31,30,31,30,31};\n\n\tint summonth=0;\n\tint sum=0;\n\n\tint i;\n\tfor(i=0;i8) m++;\n\t\telse m--;\n\t\tif((m*45/32)>0) m=m*m;\n\t\telse m=m-280;\n\t}\n\t\t//cout<>d.year>>d.month >>d.day ;\n\td.century =d.year /100;\n\t//cout<>n>>m>>l; //?????\n if(n%4==0&&n%100!=0||n%400==0) //???????\n a[1]+=1; //??2??????\n int d=l; //??d??????? ???????\n for(m=m-1;m>=1;m--) //??????????????\n d+=a[m-1];\n //???????????????????\n d+=year(n); //????????1?????? \n d=d%7; //????? ?????????????\n char week[7][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n cout<2)\n\t\tres+=1;\n\tres+=day;\n\tres=res%7;\n\tswitch(res)\n\t{\n\tcase 0:printf(\"Sun.\\n\");break;\n case 1:printf(\"Mon.\\n\");break;\n case 2:printf(\"Tue.\\n\");break;\n case 3:printf(\"Wed.\\n\");break;\n case 4:printf(\"Thu.\\n\");break;\n case 5:printf(\"Fri.\\n\");break;\n case 6:printf(\"Sat.\\n\");break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32749", "code": "int main()\n{\n\tint y,m,d,date=0;\n\tint a[12]={31,28,31,30,31,30,31,31,30,31,30,31},b[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\t//int a[12]={3,0,3,2,3,2,3,3,2,3,2,3},b[12]={3,1,3,2,3,2,3,3,2,3,2,3};\n\tcin>>y>>m>>d;\n\tif(y>1)\n\t{\n\t\tdate=y-1+(y-1)/4-(y-1)/100+(y-1)/400;\n\t\tif(m==1)\n\t\t\tdate+=d;\n\t\telse\n\t\t{\n\t\t\tif(y%4!=0||(y%100==0&&y%400!=0))\n\t\t\t{\n\t\t\t\tfor(int i=0;i> N >> X >> B;\n\tSum = ((N - 1) % 7) * 365 + ((N - 1) / 4 - (N - 1) / 100 + (N - 1) / 400);\n\tint S = B;\n\tif (N%100)\n\t\tif (N%4 == 0) A[2] = 29; else A[2] = 28;\n\telse if (N%400 == 0) A[2] = 29; else A[2] = 28;\n\tA[1] = A[3] = A[5] = A[7] = A[8] = A[10] = A[12] = 31;\n\tA[4] = A[6] = A[9] = A[11] = 30;\n\tfor (int I = 1; I < X; I ++) S += A[I];\n\tSum = (Sum + S) % 7;\n\tif ( Sum == 1 ) cout << \"Mon.\" << endl;\n\tif ( Sum == 2 ) cout << \"Tue.\" << endl;\n\tif ( Sum == 3 ) cout << \"Wed.\" << endl;\n\tif ( Sum == 4 ) cout << \"Thu.\" << endl;\n\tif ( Sum == 5 ) cout << \"Fri.\" << endl;\n\tif ( Sum == 6 ) cout << \"Sat.\" << endl;\n\tif ( Sum == 0 ) cout << \"Sun.\" << endl;\n}"} +{"label": "66", "index": "32751", "code": "int main(){\n\tint a,b,c,day,i;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n a--;\n\tday=a;\n day=a+a/4+a/400-a/100;\n\ta++;\n if(b==1){\n\t\tday+=c;\n\t}else{\n\t\tif(b==2){\n\t\t\tday=day+c+31;\n\t\t}else{\n if((a%4==0)&&(a%100!=0)||(a%400==0)&&(a%3200!=0)){\n day=day+31+29+c;\n\t\t\t\t}else{\n\t\t\t\t day=day+31+28+c;\n\t\t\t\t}\n\t\t\t for(i=3;i=100){\n\t\t\tt=i/100;\n\t\t\ty=i/4;\n\t\t\tr=i/400;\n\t\t\trun=y-t+r;\n\t\t\tpin=i-run;\n\t\t\ttotal=366*run+365*pin;\n\t\t}\n\t\telse{\n\t\t\ty=i/4;\n\t\t\trun=y;\n\t\t\tpin=i-run;\n\t\t\ttotal=366*run+365*pin;\n\t\t}\n\t\ta=dijitian(year,month,day);\n\t\ttotal+=a;\n\t\ttotal%=7;\n\t\tif(total==1)\n\t\t\tprintf(\"Mon.\");\n\t\tif(total==2)\n\t\t\tprintf(\"Tue.\");\n\t\tif(total==3)\n\t\t\tprintf(\"Wed.\");\n\t\tif(total==4)\n\t\t\tprintf(\"Thu.\");\n\t\tif(total==5)\n\t\t\tprintf(\"Fri.\");\n\t\tif(total==6)\n\t\t\tprintf(\"Sat.\");\n\t\tif(total==0)\n\t\t\tprintf(\"Sun.\");\n\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "66", "index": "32753", "code": "int day(unsigned long y,int m,int d)\n{ \n int t,i;\n if ((y%4==0&&y%100!=0)||(y%400==0))\n {\n switch(m)\n {\n case 1: t=d;break;\n case 2: t=d+31;break;\n case 3: t=d+60;break;\n case 4: t=d+91;break;\n case 5: t=d+121;break;\n case 6: t=d+152;break;\n case 7: t=d+182;break;\n case 8: t=d+213;break;\n case 9: t=d+244;break;\n case 10: t=d+274;break;\n case 11: t=d+305;break;\n case 12: t=d+335;break;\n } \n }\n else\n {\n switch(m)\n {\n case 1: t=d;break;\n case 2: t=d+31;break;\n case 3: t=d+59;break;\n case 4: t=d+90;break;\n case 5: t=d+120;break;\n case 6: t=d+151;break;\n case 7: t=d+181;break;\n case 8: t=d+212;break;\n case 9: t=d+243;break;\n case 10: t=d+273;break;\n case 11: t=d+304;break;\n case 12: t=d+334;break;\n }\n }\n return(t);\n}\n\nvoid main()\n{\n int day(unsigned long,int,int);\n unsigned long y;\n int m,d,w;\n scanf(\"%ld %d %d\",&y,&m,&d);\n w=(day(y,m,d)+y-1+(y-1)/4-(y-1)/100+(y-1)/400)%7;\n switch(w)\n {\n case 1: printf(\"Mon.\");break;\n case 2: printf(\"Tue.\");break;\n case 3: printf(\"Wed.\");break;\n case 4: printf(\"Thu.\");break;\n case 5: printf(\"Fri.\");break;\n case 6: printf(\"Sat.\");break;\n case 0: printf(\"Sun.\");break;\n }\n\n}\n"} +{"label": "66", "index": "32754", "code": "int y,m,d,sum;\nint judy(int y)\n{\n\tif(y%4==0&&y%100)return 1;\n\telse if(y%400==0)return 1;\n\telse return 0;\n}\nint judm(int m)\n{\n\tif(m==1||m==3||m==5||m==7||m==8||m==10||m==12)return 3;\n\telse if(m==2)return judy(y);\n\telse return 2;\n}\nvoid g(int a)\n{\n\tif(a==0)printf(\"Sun.\\n\");\n\tif(a==1)printf(\"Mon.\\n\");\n\tif(a==2)printf(\"Tue.\\n\");\n\tif(a==3)printf(\"Wed.\\n\");\n\tif(a==4)printf(\"Thu.\\n\");\n\tif(a==5)printf(\"Fri.\\n\");\n\tif(a==6)printf(\"Sat.\\n\");\n}\nvoid main()\n{\n\tint i,t;scanf(\"%d%d%d\",&y,&m,&d);sum=0;t=y%400;\n\tfor(i=1;i>y>>m>>d;\ncount=count+(y-1)+(y-1)/4-(y-1)/100+(y-1)/400;\n\t\tif(y%4==0&&y%100!=0||y%400==0)\n\t{\n\t\tfor(i=0;i<=m-1;i++)\n\t\t\tcount=count+*(b+i);\n\t}\n\telse\n\t{\n\t\tfor(i=0;i<=m-1;i++)\n\t\t\tcount=count+*(a+i);\n\t}\n\tcount+=d-1;\n\tswitch(count%7)\n\t{\n\tcase 0:cout<<\"Mon.\"<2)\n\t\t\t s=s+1;\n\t}\n\tif(t==0)\n\t m[1]=28;\n\t\tfor(i=0;i>a>>b>>c;a=a%400;if(a==0) a=400;\n l=tian(a,b,c);\n n=l%7;\n if(n==0) cout<<\"Mon.\";if(n==1) cout<<\"Tue.\";if(n==2) cout<<\"Wed.\";if(n==3) cout<<\"Thu.\";if(n==4) cout<<\"Fri.\";if(n==5) cout<<\"Sat.\";if(n==6) cout<<\"Sun.\";\n return 0;\n}\n"} +{"label": "66", "index": "32761", "code": "int main()\n{\n\tint year,day,month,sum,i;\n\tint num1[13],num2[13];//ping nian he run nian de yue fen tian shu\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tsum=(year-1)*(365%7);\n\tsum=sum%7;\n\t/*for(i=1;i=1)&&(d<=12)&&(r>=1)&&(r<=a[d])) return 1;else return 0;\n}\nint main()\n{\n\tlong long y,d,r,n;\n//\tcin>>n;\n//\twhile (n>0)\n//\t{\n\tcin>>y>>d>>r;//d=-d;r=-r;\n\t//cout<>y;\n}\n"} +{"label": "66", "index": "32763", "code": "int main()\n{\n\tunsigned int y,m,d,i,n=0,temp,p;\n\tscanf(\"%d %d %d\",&y,&m,&d);\n\tn+=(y-1)/4*(1*4+1)-(y-1)/100+(y-1)/400;\n\tn+=(y-1)%4*1;\n\tif(y%400==0||(y%100!=0&&y%4==0))\n\t\tp=29;\n\telse\n\t\tp=28;\n\tfor(i=1;i2000){\n\t\ty=y-2000;\n\t}\n\tfor(i=1;i400)\n\t{\n\t\twhile(a>400)\n {\n\t\t\ta-=400;\n\t\t}\n\t\tfor(i=1;i> y >> m >> d;\n\tif((y%400 == 0 || (y%4 == 0 && y%100 !=0)))\n\t\tdd += ((y-1)/4-(y-1)/100+(y-1)/400);\n\telse\n\t\tdd += (y/4-y/100+y/400);\n\tdd=dd%7;\n\tdd += y-1;\n\tdd=dd%7;\n\tfor (i=0;i7&&j%2==0))\n\t\t{\n\t\t\tm+=31%7;\n\t\t}\n\t\telse if(j<8&&j>2&&j%2==0||j>7&&j%2==1)\n\t\t{\n\t\t\tm+=30%7;\n\t\t}\n\t\telse if(j==2&&Is_Runinian(year)==1)\n\t\t{\n\t\t\tm+=29%7;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm+=28%7;\n\t\t}\n\t}\n\tm=m%7;\n\tm+=day%7;\n\tm=m%7;\n\tif(m==0)\n\t{\n\t\tprintf(\"Sun.\");\n\t}\n\telse if(m==1)\n\t{\n\t\tprintf(\"Mon.\");\n\t}\n\telse if(m==2)\n\t{\n\t\tprintf(\"Tue.\");\n\t}\n\telse if(m==3)\n\t{\n\t\tprintf(\"Wed.\");\n\t}\n\telse if(m==4)\n\t{\n\t\tprintf(\"Thu.\");\n\t}\n\telse if(m==5)\n\t{\n\t\tprintf(\"Fri.\");\n\t}\n\telse\n\t{\t\n\t\tprintf(\"Sat.\");\n\t}\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "66", "index": "32774", "code": "int isrunnian(int m);\nint dijitian(int a,int b,int c);\nint main(){\n\tint x,y,z,k,p=0;\n\tscanf(\"%d%d%d\",&x,&y,&z);\n\tp=x+dijitian(x,y,z)+(x-1)/4-(x-1)/100+(x-1)/400-1;\n\tif(p%7==1){\n\t\tprintf(\"Mon.\");\n\t}\n\tif(p%7==2){\n\t\tprintf(\"Tue.\");\n\t}\n\tif(p%7==3){\n\t\tprintf(\"Wed.\");\n\t}\n\tif(p%7==4){\n\t\tprintf(\"Thu.\");\n\t}\n\tif(p%7==5){\n\t\tprintf(\"Fri.\");\n\t}\n\tif(p%7==6){\n\t\tprintf(\"Sat.\");\n\t}\n\tif(p%7==0){\n\t\tprintf(\"Sun.\");\n\t}\n\treturn 0;\n}\nint dijitian(int a,int b,int c){\n\tint days=0;\n\tfor(int i=1;i>year>>month>>day;\n\tleap1=((year%400==0)||(year%100!=0 && year%4==0));\n\tchar b[7][5]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n\tint a[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31,},{31,29,31,30,31,30,31,31,30,31,30,31}};\n step=(year-1)/4-(year-1)/100+(year-1)/400;\n sum+=step*2+year-step-1;\n\tfor (int j=0;j>a>>b>>c;\n\tfor(i=1;i1){\n\t\t\ttotal++;\n\t\t}\n\t}\n\ttotal+=runnian;\n\tint today;\n\ttoday=total%7;\n\tswitch (today){\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n \tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32781", "code": "int main()\n{\n\tunsigned long int a,b,c,days,allday,m,n;\n\tscanf(\"%ld %ld %ld\",&a,&b,&c);\n\tn=(a-1)*365+(unsigned long int)((a-1)/4)-(unsigned long int)((a-1)/100)+(unsigned long int)((a-1)/400);\n \n\tswitch(b)\n\t{\ncase 1:days=c;break;\ncase 2:days=c+31;break;\ncase 3:days=c+59;break;\ncase 4:days=c+90;break;\ncase 5:days=c+120;break;\ncase 6:days=c+151;break;\ncase 7:days=c+181;break;\ncase 8:days=c+212;break;\ncase 9:days=c+243;break;\ncase 10:days=c+273;break;\ncase 11:days=c+304;break;\ncase 12:days=c+334;break;\n\t}\n\tif((a%4==0&&a%100!=0||a%400==0)&&b>2)\n\t\tdays+=1;\n\tallday=n+days;\n\tif(a!=1000000000||b!=10||c!=12)\n\t{m=allday%7;\n\t\n\tswitch(m)\n\t{\ncase 0:printf(\"Sun.\");break;\n\tcase 1:printf(\"Mon.\");break;\ncase 2:printf(\"Tue.\");break;\ncase 3:printf(\"Wed.\");break;\ncase 4:printf(\"Thu.\");break;\ncase 5:printf(\"Fri.\");break;\ncase 6:printf(\"Sat.\");break;\n\t}\n\t}\n\telse if(a==1000000000&&b==b&&c==12)\n\t\tprintf(\"Thu.\");\n\t\n\t\n\t\n\treturn 0;\n}"} +{"label": "66", "index": "32782", "code": "void main()\n{\n\tint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint m1[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint i,j,year,month,day,day1,d=0;\n\tlong int sum=0,total,xq;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tyear=year%2000+400;\n\tfor(i=1;i=100)\n\t\t{\n \t\t\tif((i%4==0&&i%100!=0)||i%400==0)\n\t\t\t{\n\t\t\t\tsum=sum+366;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum=sum+365;\n\t\t\t}\n\t\t}\n\t\t\n\t}\t\n\tif((year%4==0&&year%100!=0)||year%400==0)\n\t{\n\t\tfor(j=1;j2800){\n\t\tyear=year-(year/2800)*2800;\n\t}\n\tfor(i=1;i> year;\n\tcin >> mon;\n\tcin >> day;\n\tint\tm1[13] = {0,0,3,3,6,1,4,6,2,5,0,3,5};\n\tint\tm2[13] = {0,0,3,4,0,2,5,0,3,6,1,4,6};\n\tchar\tdate[8][5] = {\"0\", \"Mon.\", \"Tue.\", \"Wed.\", \"Thu.\", \"Fri.\", \"Sat.\", \"Sun.\"};\n\t\n\tint\ti;\n\tint\tsum = 0;\n\tint\tk = (int)(year /2000);\n\tif(year % 2000 == 0)\n\t{\n\t\tyear = year - (k - 1) * 2000;\n\t}\n\telse\n\t{\n\t\tyear = year - k * 2000;\n\t}\n\t\n\n\n\tfor (i = 1; i < year; i ++)\n\t{\n\t\tif(sum > 7){sum = sum - 7;}\n\t\tsum = sum + 1 + run(i);\n\t}\n\n\tif(run(year))\n\t{\n\t\tsum = sum + m2[mon];\n\t}\n\telse\n\t{\n\t\tsum = sum + m1[mon];\n\t}\n\n\tsum = sum + day;\n\t\n\twhile(sum > 7)\n\t{sum = sum - 7;}\n\tcout << date[sum] << endl;\nreturn 0;\n}\n"} +{"label": "66", "index": "32785", "code": "int main()\n{\nint a,b,c,i,d,e=0;\nint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\ni=0;\nscanf(\"%d %d %d\",&a,&b,&c);\n\ti=a-1+(a-1)/4+(a-1)/400-(a-1)/100;\nif(a%400==0||a%4==0&&a%100!=0)\nm[2]=29;\nelse\nm[2]=28;\nfor(e=0;e2)\n\t\t\t\tday++;\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\tif(month>2)\n\t\t\tday++;\n\t}\n\t//printf(\"%d %d %d\\n\",j,first,day);\n\tint weekday=(day-1+first)%7;\n\tswitch(weekday)\n\t{\n\tcase 0:printf(\"Sun.\\n\");break;\n\tcase 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n\t}\n\treturn 0;\n}\n"} +{"label": "66", "index": "32787", "code": "\nint main(int argc, char* argv[])\n{\n int y,m,d,total,i;\n\tint md[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\ttotal=0;\n\tif(y>400){\n\t\ty=400+(y-400)%400;\n\t\t}\n\tif((y%4==0&&y%100!=0)||(y%400==0)){\n\t\tmd[1]=(29);\n\t}\n\tfor(i=1;i>y>>m>>d;\n\t//rns=0;\n\t//for(i=1;i=3) sum+=1;\n\treturn sum;\n}\n\n\nint rn(int year){ //?????????? 1?true 0?false\n\tif(year%4==0&&year%100!=0) return 1;\n\tif(year%100==0&&year%400==0) return 1;\n\treturn 0;\n}"} +{"label": "66", "index": "32789", "code": "int isrunnian(int year){\n if(year%400 == 0 ||(year%4==0 && year%100!=0))\n return 1;\n return 0;\n}\nint main(){\n int i,year,month,date,sum;\n int montha[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},\n {31,29,31,30,31,30,31,31,30,31,30,31}};\n scanf(\"%d%d%d\",&year,&month,&date);\n sum=(year%7+(year-1)/4-(year-1)/100+(year-1)/400);\n\n for(i=0;i>a>>b>>c;\n\nfor(int i=1;i<=(a-1)%400;++i)\n{\nif(i%400==0||(i%4==0&&i%100!=0))\nn+=2;\nelse\nn+=1;\n}\n\nif(a%400==0||(a%4==0&&a%100!=0))\n++d[2];\n\nfor(int i=1;i>year>>month>>day;\n long long a,b,c;\n a=(long long)(year-1)/4;\n b=(long long)(year-1)/100;\n c=(long long)(year-1)/400;\n num=a-b+c;\n\tlong long sum;\n\tsum=(year-1)*365+num;\n\tint imonth[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif(year%4==0){\n\t\tif(year%100!=0) imonth[1]=29;\n\t\tif(year%400==0) imonth[1]=29;\n\t}\n\tfor(i=0;i> year >> mon >> day;\n\tint y,m,sumd=0,lunar=0;\n\twhile (year > 2800)\n\t{\n\t\tyear = year % 2800;\n\t}\n\tfor (y = 1; y < year; y++)\n\t{\n\t\tif ((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0))\n\t\t{\n\t\t\tsumd += 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsumd += 365;\n\t\t}\n\t}\n\tif ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))\n\t{\n\t\tlunar = 1;\n\t}\n\tfor (m = 1; m < mon; m++)\n\t{\n\t\tif ((m == 1) || (m == 3) || (m == 5) || (m == 7) || (m == 8) || (m == 10))\n\t\t{\n\t\t\tsumd += 31;\n\t\t}\n\t\telse if ((m == 4) || (m == 6) || (m == 9) || (m == 11))\n\t\t{\n\t\t\tsumd += 30;\n\t\t}\n\t\telse if ((m == 2) && (lunar == 1))\n\t\t{\n\t\t\tsumd += 29;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsumd += 28;\n\t\t}\n\t}\n\tsumd += day;\n\tint a = sumd % 7;\n\tif (a == 0)\n\t\tcout << \"Sun.\" << endl;\n\tif (a == 1)\n\t\tcout << \"Mon.\" << endl;\n\tif (a == 2)\n\t\tcout << \"Tue.\" << endl;\n\tif (a == 3)\n\t\tcout << \"Wed.\" << endl;\n\tif (a == 4)\n\t\tcout << \"Thu.\" << endl;\n\tif (a == 5)\n\t\tcout << \"Fri.\" << endl;\n\tif (a == 6)\n\t\tcout << \"Sat.\" << endl;\n\treturn 0;\n}"} +{"label": "66", "index": "32794", "code": "int main()\n{\n\tint a,b,c,n,x,t=0,i=0,j,o;\n\tchar f[100],g[5];\n\tscanf(\"%s%d%d\",f,&b,&c);\n\to=strlen(f);\n\tif (o>6)\n\t{\n\tfor(j=o-5;j>y>>m>>d;\n\tnumofleap=floor((y-1)/4.0)-(floor((y-1)/100.0)-floor(floor((y-1)/100.0)/4.0));\n\tnumofafter=numofleap*2+y-numofleap-1;\n\tint start=0;\n\tstart=numofafter%7+1;\n\tif((y%4==0&&y%100!=0)||(y%400==0))\n\t\tmon[2]=29;\n\tfor(int i=0;i>year>>month1>>day;\n\tchar week[7][200]={\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"};\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint y;\n\tint yy=year-1;\n\ty=(yy/4+yy-yy/100+yy/400)%7;\n \n\tint sum=0;\n\tint i;\n\tif(((year%4==0)&&(year%100)!=0)||(year%400==0))\n\t{\n\t\tmonth[2]=month[2]+1;\n\t for(i=1;i=3))\n t=t+1;\n\tw=(n+t)%7;\n switch(w)\n\t{\n\tcase 0:printf(\"Sun.\\n\");break;\n\tcase 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n default:printf(\"error\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32803", "code": "void main()\n{\n\tint x,y,z,a,b,c,d,e,f,g,h;\n\tscanf(\"%d%d%d\",&x,&y,&z);\n\ta=x/400;b=x%400;\n\tc=b/100;d=b%100;\n\te=d/4;f=d%4;\n\tg=c*5+e*5+365*(f-1)+700;\n\tswitch(y)\n\t{\n\t case 1:g=g+z;break;\n\t case 2:g=g+z+31;break;\n\t\tcase 3:g=g+z+59;break;\n\t\tcase 4:g=g+z+90;break;\n\t\tcase 5:g=g+z+120;break;\n\t\tcase 6:g=g+z+151;break;\n\t\tcase 7:g=g+z+181;break;\n\t\tcase 8:g=g+z+212;break;\n\t\tcase 9:g=g+z+243;break;\n\t\tcase 10:g=g+z+273;break;\n\t\tcase 11:g=g+z+304;break;\n\t\tcase 12:g=g+z+334;break;\n\t}\n\tif((b==0&&y<3)||(e!=0&&f==0&&y<3))\n\t\tg=g-1;\n\th=g%7;\n\tswitch(h)\n\t{\n\t\tcase 1:printf(\"Mon.\\n\");break;\n\t case 2:printf(\"Tue.\\n\");break;\n\t\tcase 3:printf(\"Wed.\\n\");break;\n\t\tcase 4:printf(\"Thu.\\n\");break;\n\t\tcase 5:printf(\"Fri.\\n\");break;\n\t\tcase 6:printf(\"Sat.\\n\");break;\n\t\tcase 0:printf(\"Sun.\\n\");break;\n\t}\n}"} +{"label": "66", "index": "32804", "code": "void main()\n{\n\tlong year,mon,day,n,x,y;\n\tscanf(\"%d%d%d\",&y,&mon,&day);\n\tyear=y%200000;\n\tn=365*(year-1);\n\tswitch(mon)\n\t{\n\tcase 1:n=n+0;break;\n\tcase 2:n=n+31;break;\n\tcase 3:n=n+59;break;\n\tcase 4:n=n+90;break;\n case 5:n=n+120;break;\n\tcase 6:n=n+151;break;\n\tcase 7:n=n+181;break;\n\tcase 8:n=n+212;break;\n\tcase 9:n=n+243;break;\n\tcase 10:n=n+273;break;\n\tcase 11:n=n+304;break;\n case 12:n=n+334;\n\t}\n\tn=n+day;\n\tif(mon<3) n=n+((year-1)/4)-((year-1)/100)+((year-1)/400);\n\telse n=n+(year/4)-(year/100)+(year/400);\n\tx=n%7;\n\tswitch(x)\n\t{\n\tcase 1:printf(\"Mon.\");break;\n\tcase 2:printf(\"Tue.\");break;\n\tcase 3:printf(\"Wed.\");break;\n\tcase 4:printf(\"Thu.\");break;\n\tcase 5:printf(\"Fri.\");break;\n\tcase 6:printf(\"Sat.\");break;\n\tcase 0:printf(\"Sun.\");\n\t}\n}"} +{"label": "66", "index": "32805", "code": "\nint main()\n{\n\tint n,m,d,cnt=0,cntpingnian=0,cntyiqian=0,cntrunnian=0,cntthisyear=0,i,a1[13]={31,28,31,30,31,30,31,31,30,31,30,31},a2[13]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tcin>>n>>m>>d;\n\tcntrunnian=(n-1)/4-(n-1)/100+(n-1)/400;\n\tcntpingnian=n-1-cntrunnian;\n\tcntyiqian=cntpingnian+2*cntrunnian;\n\tif((n%4==0&&n%100!=0)||(n%400==0))\n\t{\n\t\tfor(i=0;i2))\ntemp++;\ntemp=(temp+c-1)%7;\nif (temp==0) printf(\"Mon.\");\nif (temp==1) printf(\"Tue.\");\nif (temp==2) printf(\"Wed.\");\nif (temp==3) printf(\"Thu.\");\nif (temp==4) printf(\"Fri.\");\nif (temp==5) printf(\"Sat.\");\nif (temp==6) printf(\"Sun.\");\n}\n"} +{"label": "66", "index": "32808", "code": "int main()\n{\n\tint i,y,m,d,sum=0;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\ty=y%400;\n\tif(y==0)\n\t\ty=400;\n\tfor(i=1;i10000)\n\t\tn=n%2000;\n\tk=n/100;\n\tm=n/400;\n\ti=n/4-(k-m);\n\tif(y==1)\n\t\tt=0;\n\telse\n\t{\n\t\tfor(j=0;j>year>>month>>day;\n\tif (year%4==0&&year%100!=0||year%400==0)//??????\n\t{\n\t\tdays[2]=29;\n\t\tsum+=year-1+year/4-year/100+year/400-1;\n\t}\n\telse\n\t\tsum+=year+year/4-year/100+year/400-1;\n\tfor (i=1;i4000)\n\t\td++;\n\tx=d%7;\n\tif(x==0)\n\t\tprintf(\"Sun.\");\n\telse if(x==1)\n\t\tprintf(\"Mon.\");\n\telse if(x==2)\n\t\tprintf(\"Tue.\");\n\telse if(x==3)\n\t\tprintf(\"Wed.\");\n\telse if(x==4)\n\t\tprintf(\"Thu.\");\n\telse if(x==5)\n\t\tprintf(\"Fri.\");\n\telse if(x==6)\n\t\tprintf(\"Sat.\");\n\n\n\treturn 0;\n}"} +{"label": "66", "index": "32816", "code": "int main()\n{\n\tint day[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint y,m,d,w,i,j=0;\n\tcin>>y>>m>>d;\n\tchar a[][10]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Tue.\",\"Fri.\",\"Sat.\"};\n\tw=y%7+y/4-y/100+y/400;\n\tif((y%4==0&&y%100!=0)||y%400==0)\n\t{\n\t\tif(w==1)\n\t\t{\n\t\t\tw=7;\n\t\t}\n\t\telse\n\t\t{\n\t\tw=w-1;\n\t\t}\n\t\tday[2]=29;\n\t}\n\tfor(i=1;i2)\n sum++;\n switch(sum%7)\n {\n case 0: printf(\"Sun.\\n\"); break;\n case 1: printf(\"Mon.\\n\"); break;\n case 2: printf(\"Tue.\\n\"); break;\n case 3: printf(\"Wed.\\n\"); break;\n case 4: printf(\"Thu.\\n\"); break;\n case 5: printf(\"Fri.\\n\"); break;\n default: printf(\"Sat.\\n\");\n }\n return 0;\n}"} +{"label": "66", "index": "32819", "code": "int main()\n{\n int y,m,d,sum=0,month[2][13]={{0,0,3,3,6,1,4,6,2,5,0,3,5},{0,0,3,4,0,2,5,0,3,6,1,4,6}},leap;\n cin >> y >> m >> d;\n\t\tsum=(y-1)/4*2+y-1-(y-1)/4-y/100+y/400; //??100?????\n leap=(y%400==0)||((y%4==0)&&(y%100!=0));\n sum=sum+month[leap][m]+d;\n switch (sum%7)\n\t\t{\n case 0: cout << \"Sun.\" << endl;break;\n case 1: cout << \"Mon.\" << endl;break;\n case 2: cout << \"Tue.\" << endl;break;\n case 3: cout << \"Wed.\" << endl;break;\n\t\tcase 4: cout << \"Thu.\" << endl;break;\n\t\tcase 5: cout << \"Fri.\" << endl;break;\n\t\tcase 6: cout << \"Sat.\" << endl;break;\n\t\tdefault: cout << \"error\" << endl;break;\n\t\t}\n\t\treturn 0;\n}"} +{"label": "66", "index": "32820", "code": "\nint main()\n{\n\tint a,b,c,d,e,f;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tif(b==1){e=c;}\n\tif(b==2){e=31+c;}\n\tif(b==3){e=31+28+c;}\n\tif(b==4){e=31+28+31+c;}\n\tif(b==5){e=31+28+31+30+c;}\n\tif(b==6){e=31+28+31+30+31+c;}\n\tif(b==7){e=31+28+31+30+31+30+c;}\n\tif(b==8){e=31+28+31+30+31+30+31+c;}\n\tif(b==9){e=31+28+31+30+31+30+31+31+c;}\n\tif(b==10){e=31+28+31+30+31+30+31+30+31+c;}\n\tif(b==11){e=31+28+31+30+31+30+31+30+31+31+c;}\n\tif(b==12){e=31+28+31+30+31+30+31+30+31+31+30+c;}\n\tif(b>2&&((a%4==0&&a%100!=0)||a%400==0)){\n\t\td=(a-1)*365+(a-1)/4-(a-1)/100+(a-1)/400-a/3200-a/86400+e+1;\n\t\t}\n\telse{\n\t\td=(a-1)*365+(a-1)/4-(a-1)/100+(a-1)/400-a/3200-a/86400+e;\n\t}\n\tf=d%7;\n\tif(f==1){printf(\"Mon.\");}\n\tif(f==2){printf(\"Tue.\");}\n\tif(f==3){printf(\"Wed.\");}\n\tif(f==4){printf(\"Thu.\");}\n\tif(f==5){printf(\"Fri.\");}\n\tif(f==6){printf(\"Sat.\");}\n\tif(f==0){printf(\"Sun.\");}\n\t\n return 0;\n}\n"} +{"label": "66", "index": "32821", "code": "\nint year[2]={365,366};\nint month[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};\nchar*week[7]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\nint leap(int a)\n{ \n\tif(a%400==0||(a%4==0&&a%100!=0)) //??????????????????????????????\n\t\treturn 1;\n\telse return 0;\n}\nint main()\n{\n\tint y,m,d;\n\tcin>>y>>m>>d;\n\tint day=0;\n\tfor(int i=1;i*400<=y-1;i++) //????????\n\t\tday=(day+365*400+100-3)%7;\n\tfor(int i=1;i<=(y-1)%400;i++) //???????\n\t\tday=(day+year[leap(i)])%7;\n\tfor(int i=1;i>y>>m>>d;\n\ta=((y-1)-(y-1)%4)/4*2+((y-1)-((y-1)-(y-1)%4)/4)*1;\n\tfor(i=1;i<=(y-y%100)/100;i++)\n\t{\n\t\tif(i%4!=0)sum=sum+1;\n\t\telse sum=sum;\n\t}\n\tb=(a-sum)%7+1;\n\tif(y%4!=0||y%100==0&&y%400!=0)str[1]=28;\n\telse str[1]=29;\n\tif(m>1)\n\t{\n\t\tfor(i=0;i>y>>m>>d;\n\tint day=0;\n\tday=y-1+(y-1-((y-1)%4))/4-(y-1-((y-1)%100))/100+(y-1-((y-1)%400))/400;\n\tint a[11]={3,0,3,2,3,2,3,3,2,3,2};\n\tif( (y%4==0&&y%4!=100) || y%400==0) a[1]=1;\n\tfor(int i=1;i>year;\n cin>>month;\n cin>>day;\n CaculateWeekDay(year,month,day);\n return 0;\n}"} +{"label": "66", "index": "32829", "code": "void main()\n{\n int a,b,c,d,i,e,f,g,n,y,m;\n scanf(\"%d%d%d\",&y,&m,&d);\n if(m==1) b=0;\n if(m==2) b=31;\n if(m==3) b=59;\n if(m==4) b=90;\n if(m==5) b=120;\n if(m==6) b=151;\n if(m==7) b=181;\n if(m==8) b=212;\n if(m==9) b=243;\n if(m==10) b=273;\n if(m==11) b=304;\n if(m==12) b=334;\n e=y/4;\n f=y/100;\n g=y/400;\n a=y-1+e+g-f+b+d;\n if(y%4==0&&y%100!=0&&(m==1||m==2))\n a=a-1;\n if(y%400==0&&(m==1||m==2))\n a=a-1;\n a=a%7;\n if(a==1) printf(\"Mon.\\n\");\n if(a==2) printf(\"Tue.\\n\");\n if(a==3) printf(\"Wed.\\n\");\n if(a==4) printf(\"Thu.\\n\");\n if(a==5) printf(\"Fri.\\n\");\n if(a==6) printf(\"Sat.\\n\");\n if(a==0) printf(\"Sun.\\n\");\n}"} +{"label": "66", "index": "32830", "code": "int main()\n{\n\tint a,b,c,d,e;\n\tscanf(\"%d %d %d\",&a,&c,&d);\n\tb=0;\n\tif(a%100==0 && (a/100)%4!=0 && a%4!=0)\n\t{\n b=a/4+a-(a/100-a/400)-1;\n\t}\n\telse\n\t{\n\t\tb=a/4+a-(a/100-a/400)-2;\n\t}\n\tif(a%100==0 && (a/100)%4!=0 && a%4!=0)\n\t{\n\t\tswitch(c)\n\t\t{\n\t\tcase 1:\n\t\t\tb=b; \n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tb=b+3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tb=b+3;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tb=b+6;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tb=b+1;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tb=b+4;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tb=b+6;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tb=b+2;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tb=b+5;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tb=b+7;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tb=b+3;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tb=b+5;\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t switch(c)\n\t\t{\n\t\tcase 1:\n\t\t\tb=b;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tb=b+3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tb=b+4;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tb=b+7;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tb=b+2;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tb=b+5;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tb=b+7;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tb=b+3;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tb=b+6;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tb=b+1;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tb=b+4;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tb=b+6;\n\t\t\tbreak;\n\t\t}\n\t}\n\tb=b+d;\n\te=b%7;\n\tswitch(e)\n\t{\n\t\tcase 1:\n\t\t\tprintf(\"Mon.\\n\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tprintf(\"Tue.\\n\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tprintf(\"Wed.\\n\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tprintf(\"Thu.\\n\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tprintf(\"Fri.\\n\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tprintf(\"Sat.\\n\");\n\t\t\tbreak;\n\t\tcase 0:\n\t\t\tprintf(\"Sun.\\n\");\n\t\t\tbreak;\n\t}\n\treturn 0;\n}\n\t\n"} +{"label": "66", "index": "32831", "code": "int main(){\n\tint y,m,d,sumd=0,X[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>y>>m>>d;\n\twhile(y>2800)\n\t\ty-=2800;\n\tif(y%4==0&&y%100!=0||y%400==0)\n\t\tX[1]++;\n\twhile(y>1){\n\t\ty--;\n\t\tif(y%4==0&&y%100!=0||y%400==0)\n\t\t\tsumd+=366;\n\t\telse\n\t\t\tsumd+=365;\n\t}\n\twhile(m>1){\n\t\tsumd+=X[m-2];\n\t\tm--;\n\t}\n\tsumd+=d;\n\tsumd=sumd%7;\n\tswitch(sumd){\n\t\tcase 0:cout<<\"Sun.\";break;\n\t\tcase 1:cout<<\"Mon.\";break;\n\t\tcase 2:cout<<\"Tue.\";break;\n\t\tcase 3:cout<<\"Wed.\";break;\n\t\tcase 4:cout<<\"Thu.\";break;\n\t\tcase 5:cout<<\"Fri.\";break;\n\t\tcase 6:cout<<\"Sat.\";break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32832", "code": "\nint main()\n{\n\t\n int a,b,c;\n\tint s=0,sum=0,i,v;\n\tscanf(\"%d %d %d\",&a,&b,&c);\na=(a-1)%400+1;\n\tfor(i=1;i<=a-1;i++)\n\t{\n\t\tif((i%400==0)||(i%100!=0)&&(i%4==0))\n\t\t{\n\t\t\ts++;\n\t\t}\n\t}\t\t\n\t\tsum+=366*s+365*(a-1-s);\n\n\tfor(v=1;v<=b-1;v++)\n\t{\n\t\tif(v==1||v==3||v==5||v==7||v==8||v==10)\n\t\t{\n\t\t\tsum+=31;\n\t\t}\n\t\tif(v==4||v==6||v==9||v==11)\n\t\t{\n\t\t\tsum+=30;\n\t\t}\n\t\tif(v==2)\n\t\t{\n\t\t if(a%400==0||(a%100!=0)&&(a%4==0))\n\t\t {\n\t\t\t sum+=29;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t sum+=28;\n\t\t }\n\t\t}\n\t}\n\tsum+=c;\n\tif(sum%7==1)\n\t{\n\t\tprintf(\"Mon.\");\n\t}\n\tif(sum%7==2)\n\t{\n printf(\"Tue.\");\n\t}\n\tif(sum%7==3)\n\t{\n\t\tprintf(\"Wen.\");\n\t}\n\tif(sum%7==4)\n\t{\n\t\tprintf(\"Thu.\");\n\t}\n\tif(sum%7==5)\n\t{\n\t\tprintf(\"Fri.\");\n\t}\n\tif(sum%7==6)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\tif(sum%7==0)\n\t{\n\t\tprintf(\"Sun.\");\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32833", "code": "int main()\n{\n\tint a, b,c,i,j,A;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tint wee=0;\n\tA=a-1;\n\twee=A+A/4-(A-(A%100))/100+(A-(A%100))/400;\n\tfor (j=1;j<=b-1;j++)\n\t{\n\tif(j==3||j==5||j==7||j==8||j==10||j==12||j==1)\n\t\twee+=31;\n\telse \n\t\tif(j==4||j==6||j==9||j==11)\n\t\t\twee+=30;\n\t\telse\n\t\t\tif(a%4!=0||(a%100==0&&a%400!=0))\n\t\t\twee+=28;\n\t else \n\t\t\t\twee+=29;\n\t}\n\t\n\twee+=c;\n\t\n\tint s;\n\ts=wee%7;\n\tif(s==1)\n\t{printf(\"Mon.\");\n\t}\n\tif(s==2)\n\t{\n\t\tprintf(\"Tue.\");\n\t}\n\tif(s==3)\n\t{\n\t\tprintf(\"Wed.\");\n\t}\n\tif(s==4)\n\t{\n\t\tprintf(\"Thu.\");\n\t}\n\tif(s==5){\n\t\tprintf(\"Fri.\");\n\t}\n\tif(s==6)\n\t{\n\t\tprintf(\"Sat.\");\n\t}\n\tif(s==0){\n\t\tprintf(\"Sun.\");\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32834", "code": "int main()\n{\n\tint months[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tchar m[7][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\tunsigned int year,month,day,i,l,sum=0;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tsum=sum+year-1+(year-1)/4-(year-1)/100+(year-1)/400;\n\tif((year%4==0)&&(year%100!=0)||(year%400==0))\n\t{\n\t\tfor(i=0;i2){\n\t\t all=all+1;\n\t\t}\n t=all%7;\n\t switch(t){\n \t case 0:\n\t\t\t printf(\"Mon.\\n\");\n\t\t\t break;\n case 1:\n\t\t\t printf(\"Tue.\\n\");\n\t\t\t break;\n\t\t case 2:\n\t\t\t printf(\"Wed.\\n\");\n\t\t\t break;\n case 3:\n\t\t\t printf(\"Thu.\\n\");\n\t\t\t break;\n\t\t case 4:\n\t\t\t printf(\"Fri.\\n\");\n\t\t\t break;\n\t\t case 5:\n\t\t\t printf(\"Sat.\\n\");\n\t\t\t break;\n\t\t case 6:\n\t\t\t printf(\"Sun.\\n\");\n\t\t\t break;\n\t\t}\n\t\n\treturn 0;\n}"} +{"label": "66", "index": "32837", "code": "\n\nint main()\n{\n\tint n,a,b;\n\twhile(cin>>n>>a>>b){\n\tint x[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif(n%4==0&&n%100!=0||n%400==0)x[1]=29;\n\telse x[1]=28;\n\tint day=0;\n\tfor(int i=0;i=3)\n {s+=1;}\n\n\t s=s+c;\n m=s%7;\n\n if(m==1){printf(\"Mon.\");}\n if(m==2){printf(\"Tue.\");}\n if(m==3){printf(\"Wed.\");}\n if(m==4){printf(\"Thu.\");}\n if(m==5){printf(\"Fri.\");}\n if(m==6){printf(\"Sat.\");}\n if(m==0){printf(\"Sun.\");}\n return 0;\n}\n"} +{"label": "66", "index": "32839", "code": "int main()\n{\n\tint a,b,c,s=0,j,n;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n\tif ((a==1111111111)&&(b==11)&&(c==11)) \n {\n cout<<\"Sat.\"<2)\n {\n if(((a%4==0)&&(a%100!=0))||(a%400==0)) s+=29;\n else s+=28;\n\t}\n\ts+=c;\n\tif(s%7==1)\n\t{\n\t\tprintf(\"Mon.\\n\");\n\t}\n\tif(s%7==2)\n\t{\n\t\tprintf(\"Tue.\\n\");\n\t}\n if(s%7==3)\n\t{\n\t\tprintf(\"Wed.\\n\");\n\t}\n\tif(s%7==4)\n\t{\n\t\tprintf(\"Thu.\\n\");\n\t}\n\tif(s%7==5)\n\t{\n\t\tprintf(\"Fri.\\n\");\n\t}\n\tif(s%7==6)\n\t{\n\t\tprintf(\"Sat.\\n\");\n\t}\n\tif(s%7==0)\n\t{\n\t\tprintf(\"Sun.\\n\");\n\t}\n}\n"} +{"label": "66", "index": "32840", "code": "int main(){\n\tint year,month,day;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tint a=1;\n\tdo{\n\t\ta+=400;\n\t}\n\twhile(year>=a);\n\ta=a-400;\n\tint ryear=0,sum=0;\n\tint i;\n\tfor(i=a;i>year>>month>>day;\n\tif(month==1||month==2)\n\t{\n\t\tmonth+=12;\n\t\tyear--;\n\t}\n\tc=year/100;\n\ty=year%100;\n\tm=month;\n\td=day;\n\tweek=y%7+(y/4)%7+(c/4)%7-(2*c)%7+(26*(m+1)/10)%7+d-1;\n\tweek%=7;\n\tif(week==1)\n\t\tcout<<\"Mon.\"< 0)\n\t{\n\t\tt = year / 4;\n\t\tsum_mod_day += t * 2 + (year - t) * 1;\n\t\tsum_mod_day %= 7;\n\t}\n\n\tmonth--;\n\tsum_mod_day += month_day_sum[month];\n\n\tsum_mod_day += day;\n\tsum_mod_day %= 7;\n\n\tswitch (sum_mod_day)\n\t{\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32847", "code": "int sum;\nint main()\n{\n int m,b,c;\n\tint i,j;\n\tsum=0;\n\tscanf(\"%d%d%d\",&m,&b,&c);\n\tif(b!=1)\n\t{\n\t for(j=1;j=2){\n\tfor(int i=1;i>nian>>yue>>ri;\n\tif(nian>2000)nian=nian%2000;\n\tfor(i=1;i>inputYear>>inputMonth>>inputDay;\n\n\ttotalDay += (365*(inputYear-1))%7;\n\tfor (int j =1; j2)\n\t\t\tadditionalDay++;\t\n\t}\n\n\treturn additionalDay;\n}"} +{"label": "66", "index": "32859", "code": "\nint main()\n{\n long y,m,d,a,b,c,z;\n long x1,x2,x3;\n scanf(\"%d%d%d\",&y,&m,&d);\n a=(y-1)/4;\n b=(y-1)/100;\n c=(y-1)/400;\n x1=(365%7)*((y-1)%7)+a-b+c;\n x1=x1%7;\n if (y%4==0)\n {\n\t switch(m)\n {\n\t case 1:x2=0;break;\n\t case 2:x2=31;break;\n\t case 3:x2=60;break;\n\t case 4:x2=91;break;\n\t case 5:x2=121;break;\n\t case 6:x2=152;break;\n\t case 7:x2=182;break;\n\t case 8:x2=213;break;\n\t case 9:x2=244;break;\n\t case 10:x2=274;break;\n\t case 11:x2=305;break;\n\t case 12:x2=335;break;\n\t }\n }\n else\n\t {\n\t\t switch(m)\n\t\t {\n\t\t case 1:x2=0;break;\n\t case 2:x2=31;break;\n\t case 3:x2=59;break;\n\t case 4:x2=90;break;\n\t case 5:x2=120;break;\n\t case 6:x2=151;break;\n\t case 7:x2=181;break;\n\t case 8:x2=212;break;\n\t case 9:x2=243;break;\n\t case 10:x2=273;break;\n\t case 11:x2=304;break;\n\t case 12:x2=334;break;\n\t\t }\n\t }\n\tx3=x1+x2+d;\n z=x3%7;\n\n\tswitch(z)\n\t{\n\tcase 0: printf(\"Sun.\\n\");break;\n\tcase 1: printf(\"Mon.\\n\");break;\n\tcase 2: printf(\"Tue.\\n\");break;\n\tcase 3: printf(\"Wed.\\n\");break;\n\tcase 4: printf(\"Thu.\\n\");break;\n case 5: printf(\"Fri.\\n\");break;\n\tcase 6: printf(\"Sat.\\n\");break;\n\t}\n\treturn 0;\n}\n"} +{"label": "66", "index": "32860", "code": "int main(){\n\tint year,mouth,day,k,sum=0;\n\tscanf(\"%d%d%d\",&year,&mouth,&day);\n\tsum=(year-1)%7+year/4-year/100+year/400;\n\t\t\tfor(k=1;k2)\n\t\tsum++;\n\ts=sum+l+h;\n if(s%7==0)\n\t\tprintf(\"Sun.\");\n\tif(s%7==1)\n\t\tprintf(\"Mon.\");\n\tif(s%7==2)\n printf(\"Tue.\");\n\tif(s%7==3)\n\t\tprintf(\"Wed.\");\n\tif(s%7==4)\n\t\tprintf(\"Thu.\");\n\tif(s%7==5)\n\t\tprintf(\"Fri.\");\n\tif(s%7==6)\n\t\tprintf(\"Sat.\");\n\treturn 0;\n}\n \n\n"} +{"label": "66", "index": "32865", "code": "void main()\n{\n\tint month1[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint month2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tint year ,month, day;\n\tchar out[7][5]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n\tint i,days=1,temp;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\ttemp=year%400+400;\n\tfor(i=2;i<=temp;i++)\n\t{\n\t\tif((i-1)%4==0&&(i-1)%100!=0||(i-1)%400==0)\n\t\t{\n\t\t\tdays=(days+366)%7;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tdays=(days+365)%7;\n\t\t}\n\t}\n\tfor(i=2;i<=month;i++)\n\t{\n\t\tif(year%4==0&&year%100!=0||year%400==0)\n\t\t{\n\t\t\tdays=(days+month2[i-2])%7;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tdays=(days+month1[i-2])%7;\n\t\t}\n\t}\n\tdays=(days+day-1)%7;\n\tif(days==0)\n\t{\n\t\tprintf(\"%s\\n\",out[6]);\n\t}\n\telse \n\t{\n\t\tprintf(\"%s\\n\",out[days-1]);\n\t}\n}\n\n\n\n\n"} +{"label": "66", "index": "32866", "code": "int isrunnian(int y){\n\tif((y%4==0&&y%100!=0)||y%400==0)\n\t\treturn 1;\n\treturn 0;\n}\nint main()\n{\n\tint y,m,d,sum;\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tsum=(y%7+(y-1)/4-(y-1)/100+(y-1)/400)%7;\n\n\t\n\tint month[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tint i;\n\tfor(i=0;i>y>>m>>d;\n\tint sum=0;\n\tif(y>400&&y%400!=0)\n\t\ty=y%400;\n\tfor(int i=1;i7)\n\t\t\tsum=sum%7;\n\t}\n\tint e[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tif(((y%4==0)&&(y%100!=0))||(y%400==0))\n\t\te[2]=29;\n\tfor(int i=0;i>year>>month>>day;\n long long leapyear=0;\n // for(int i=1;i2800){\n\t\ty=y-(y/2800)*2800;\n\t}\n\tfor(i=1;i>year>>month>>date;\n\n\twhile(year>7000)\n\t\tyear-=7000;\n\tcountdate(year,month,date,&num);\n\tcountyear(year,&num);\n\n\tswitch(num%7)\n\t{\n\t\tcase 0:cout<<\"Sun.\"<2)\n\t\tif((year%400==0)||((year%100!=0)&&(year%4==0)))\n\t\t\t(*num)++;\n}\n\nvoid countyear(int year,long *num)\n{\n\t*num+=(year-1)*365;\n\t*num+=(year-1)/4;\n\t*num-=(year-1)/100;\n\t*num+=(year-1)/400;\n}"} +{"label": "66", "index": "32875", "code": "\nvoid main()\n{\n\tint n(long year);\n\tint run(long y,int m,int d);\n\tlong count(long y,int m,int d);\n\tint day(long s);\n\tvoid print(int s);\n\n\tint m,d;\n\tlong y;\n\n\tscanf(\"%ld%d%d\",&y,&m,&d);\n\n\tlong sum=count(y,m,d);\n\tint s=day(sum);\n\n\tprint(s);\n}\n\n\nint n(long year)\n{\n\tint n;\n\tn=year/4-year/100+year/400;\n\treturn n;\n}\n\nint run(long y,int m,int d)\n{\n\tif((y%4==0&&y%400!=0)||y%400==0)\n\t\tif(m>2)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nlong count(long y,int m,int d)\n{\n\tlong sum;\n\tsum=(y-1)+n(y)-run(y,m,d);\n\tif(m==1)\n\t\tsum+=d;\n\telse if(m==2)\n\t\tsum+=31+d;\n\telse if(m==3)\n\t\tsum+=31+28+d;\n\telse if(m==4)\n\t\tsum+=31+28+31+d;\n\telse if(m==5)\n\t\tsum+=31+28+31+30+d;\n\telse if(m==6)\n\t\tsum+=31+28+31+30+31+d;\n\telse if(m==7)\n\t\tsum+=31+28+31+30+31+30+d;\n\telse if(m==8)\n\t\tsum+=31+28+31+30+31+30+31+d;\n\telse if(m==9)\n\t\tsum+=31+28+31+30+31+30+31+31+d;\n\telse if(m==10)\n\t\tsum+=31+28+31+30+31+30+31+31+30+d;\n\telse if(m==11)\n\t\tsum+=31+28+31+30+31+30+31+31+30+31+d;\n\telse if(m==12)\n\t\tsum+=31+28+31+30+31+30+31+31+30+31+30+d;\n\n\treturn sum;\n}\n\nint day(long s)\n{\n\tint day;\n\tday=s%7;\n\treturn day;\n}\n\nvoid print(int s)\n{\n\tswitch(s)\n\t{\n\tcase 0:printf(\"Sun.\");break;\n\t\tcase 1:printf(\"Mon.\");break;\n\t\t\tcase 2:printf(\"Tue.\");break;\n\t\t\t\tcase 3:printf(\"Wed.\");break;\n\t\t\t\t\tcase 4:printf(\"Thu.\");break;\n\t\t\t\t\t\tcase 5:printf(\"Fri.\");break;\n\t\t\t\t\t\t\tcase 6:printf(\"Sat.\");break;\n\t}\n}"} +{"label": "66", "index": "32876", "code": "int main(){\n\tint year,syear,month,date,last;\n\tint mon1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint mon2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tlong days,a=0,b=0;\n\tscanf(\"%d %d %d\",&year,&month,&date);\n\tint i=1,j=0,k=0,w=1;\n\tfor(w=1;;w++){\n\t\tyear=year-400;\n\t\tif(year<=0){\n\t\t\tsyear=year+400;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=1;i2800)\n\t\ty=y-y/2800*2800;\n\tfor (i=1;i>year>>month>>day;\n\tyear%=400;\n\tyear+=400;\n\tfor (i=1;i>i;\n\treturn 0;\n}\n"} +{"label": "66", "index": "32879", "code": "\nint main()\n{\n\tint n=1,a,b,c,d;\n\tcin>>a>>b>>c;\n\td=a;\n\ta=a-1;\n\ta=a%400;\n\tn=(n+((a/100)*5))%7;\n\ta=a%100;\n\tn=(n+((a/4)*366%7)+(a-a/4)*365%7)%7;\n\tif(d%4==0&&d%100!=0||d%400==0)\n\t{\n\t\tif(b==1)\n\t \tn=n+c;\n\t if(b==2)\n\t\tn=n+31+c;\n\t if(b==3)\n\t\tn=n+31+29+c;\n\t if(b==4)\n\t\tn=n+31+29+31+c;\n\t if(b==5)\n\t\tn=n+31+29+31+30+c;\n \tif(b==6)\n\t\tn=n+31+29+31+30+31+c;\n\t if(b==7)\n\t\tn=n+31+29+31+30+31+c+30;\n \tif(b==8)\n\t\tn=n+31+29+31+30+31+c+30+31;\n if(b==9)\n\t\tn=n+31+29+31+30+31+c+30+62;\n if(b==10)\n\t\tn=n+31+29+31+30+31+c+30+62+30;\n\t if(b==11)\n\t\tn=n+31+29+31+30+31+c+60+62+31;\n\t if(b==12)\n\t\tn=n+31+29+31+30+31+c+60+93+30;\n\t}\n\telse{\n\t\tif(b==1)\n\t \tn=n+c;\n\t if(b==2)\n\t\tn=n+31+c;\n\t if(b==3)\n\t\tn=n+31+29+c;\n\t if(b==4)\n\t\tn=n+31+29+31+c;\n\t if(b==5)\n\t\tn=n+31+29+31+30-1+c;\n \tif(b==6)\n\t\tn=n+31+29+31+30+31+c;\n\t if(b==7)\n\t\tn=n+31+29+31+30+31+c+30;\n \tif(b==8)\n\t\tn=n+31+29+31+30+31+c+30+31;\n if(b==9)\n\t\tn=n+31+29+31+30+31+c+30+62;\n if(b==10)\n\t\tn=n+31+29+31+30+31+c+30+62+30;\n\t if(b==11)\n\t\tn=n+31+29+31+30+31+c+60+62+31;\n\t if(b==12)\n\t\tn=n+31+29+31+30+31+c+60+93+30;\n\t\tif(b!=1&&b!=2)\n\t\t\tn--;\n\t}\n\tn--;\n\tn=n%7;\n\tif(n==1)\n\t\tcout<<\"Mon\";\n\telse if(n==2)\n\t\tcout<<\"Tue\";\n\telse if(n==3)\n\t\tcout<<\"Wed\";\n\telse if(n==4)\n\t\tcout<<\"Tur\";\n\telse if(n==5)\n\t\tcout<<\"Fri\"\n\t;else if(n==6)\n\t\tcout<<\"Sat\";\n\telse\n\t\tcout<<\"Sun\"\n\t\t;\n\tcout<<\".\";\n\treturn 0;\n}\n"} +{"label": "66", "index": "32880", "code": "int isRunNian(int year)\n{\n\tint result;\n\tif(year%400 == 0 ||(year%4==0 && year%100!=0)){\n\t\tresult = 1;\n\t} else{\n\t\tresult = 0;\n\t}\n return result;\t\n}\nint DiJiTian(int year, int month, int day)\n{\n\tint result = 0,i;\n\tfor(i = 1; i < month; i++){ \t\n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12){\n\t\t\tresult += 31;\t\n\t\t} else if (i == 4 || i ==6 || i == 9 || i==11){\n\t\t\tresult += 30;\n\t\t} else if(i == 2){\n\t\t\tif(isRunNian(year)){\n\t\t\t\tresult += 29;\n\t\t\t} else {\n\t\t\t\tresult += 28;\n\t\t\t}\t\n\t\t}\n\t}\n\tresult += day;\t\n\treturn result;\n}\nint main()\n{\n int year,month,day,days,weekday;\t\n scanf(\"%d%d%d\",&year,&month,&day);\n days=(year-1)*(365%7)+(year-1)/400+(year-1)/4-(year-1)/100;\n days+=DiJiTian(year,month,day);\n weekday=days%7;\n switch(weekday)\n {\n case 0:\n printf(\"Sun.\");\n break;\n case 1:\n printf(\"Mon.\");\n break;\n case 2:\n printf(\"Tue.\");\n break;\n case 3:\n printf(\"Wed.\");\n break;\n case 4:\n printf(\"Thu.\");\n break;\n case 5:\n printf(\"Fri.\");\n break;\n case 6:\n printf(\"Sat.\");\n break;\n }\n return 0;\n}\n "} +{"label": "66", "index": "32881", "code": "int main()\n{\n\tint p[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tlong year,month,day,y;\n\tint sum;\n\tint a,b;\n scanf(\"%d%d%d\",&year,&month,&day);\n\tif(year%400==0){ \n sum=0;\n\t if(month<=2){\n\t\t for(int j=1;j400){\n\t\t year=year-400;\n\t\t }\n a=(year-1)/4;\n\tb=(year-1)/100;\n\tsum=365*year+a+1-b;\n for(int i=1; i2)\tmod++;\n\tmod+=day;\n\tswitch(mod%7)\n\t{\n\tcase 1:printf(\"Mon.\\n\");\tbreak;\n\tcase 2:printf(\"Tue.\\n\");\tbreak;\n\tcase 3:printf(\"Wed.\\n\");\tbreak;\n\tcase 4:printf(\"Thu.\\n\");\tbreak;\n\tcase 5:printf(\"Fri.\\n\");\tbreak;\n\tcase 6:printf(\"Sat.\\n\");\tbreak;\n\tcase 0:printf(\"Sun.\\n\");\n\t}\n\treturn(0);\n}\n\n\n\n"} +{"label": "66", "index": "32883", "code": "int lp(int x,int y)\n{\n\tint z=0;\n\tif(x>2 && ((y%4==0 && y%100!=0) || y%400==0))\n\t\tz=1;\n\treturn(z);\n}\nint main()\n{\n\tunsigned int year,month,day;\n\tunsigned int v=0,num=0;\n\tunsigned int i,j,k,n[11]={3,0,3,2,3,2,3,3,2,3,2};\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tj=(year-1)/400;\n\tk = year-j*400;\n\tif(k>=100)\n\t{\n\t\tif(k>=200)\n\t\t{\n\t\t\tif(k>=300)\n\t\t\t{\n\t\t\t\ti=3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti=2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti=1;\n\t\t}\n\t}\n\telse\n\t{\n\t\ti=0;\n\t}\n\tv=(year-1)/4-3*j-i;\n\tnum=(year-1-v)+2*v;\n\tfor(i=0;i>y>>m>>d;\n\ty=(y-1)%400+1;\n\tif(y>1)\n\t{\n\t\tfor(int i=1;i1)\n\t{\n\t\tif(y%4==0&&y%100!=0) a[1]=29;\n\t\tfor(int i=1;i=1)\n\t\ty=y-y/400*400;\n\tint md[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor (i=1;i2)\n\t\t\ttotal+=1;\n\t}\n total+=d;\n\tn=total%7;\n\tswitch (n){\n\tcase 1:{printf (\"Mon.\");break;}\n\tcase 2:{printf (\"Tue.\");break;}\n\tcase 3:{printf (\"Wed.\");break;}\n\tcase 4:{printf (\"Thu.\");break;}\n\tcase 5:{printf (\"Fri.\");break;}\n\tcase 6:{printf (\"Sat.\");break;}\n\tcase 0:{printf (\"Sun.\");break;}\n\t}\t\n\treturn 0;\n}\n\n\n\n"} +{"label": "66", "index": "32889", "code": "int xinqi(int z,int x,int w)\n{\n int D,C;\n\tD=365*(z-1)+w-1;\n if(x==2) D=D+0;\n\tif(x==2) D=D+31;\n\tif(x==3) D=D+59;\n\tif(x==4) D=D+90;\n\tif(x==5) D=D+120;\n\tif(x==6) D=D+151;\n\tif(x==7) D=D+181;\n\tif(x==8) D=D+212;\n\tif(x==9) D=D+243;\n\tif(x==10) D=D+273;\n\tif(x==11) D=D+304;\n\tif(x==12) D=D+334;\n if(x>2)\n\tD=D+z/4-z/100+z/400;\n\telse D=D+(z-1)/4-(z-1)/100+(z-1)/400;\n\tC=D%7;\n\treturn C;\n}\nvoid main()\n{\n int year,mon,day,days;\n scanf(\"%d%d%d\",&year,&mon,&day);\n year=year%200000;\n \n days=xinqi(year,mon,day);\n if(days==0) printf(\"Mon.\");\n if(days==1) printf(\"Tue.\");\n if(days==2) printf(\"Wed.\");\n if(days==3) printf(\"Thu.\");\n if(days==4) printf(\"Fri.\");\n if(days==5) printf(\"Sat.\");\n if(days==6) printf(\"Sun.\");\n }\n"} +{"label": "66", "index": "32890", "code": "int after(int x)\n{\n\tint y,sum,z,m;\n\ty=(x-1)/400;\n\tm=(x-1)/100;\n\tz=(x-1)/4;\n\tsum=x-1+z-m+y;\n\treturn sum;\n}\nint date(int x,int y,int z)\n{\n\t int sum=0,i;\n if(y==1) sum=z;\n\t else\n\t {\n\t\t for(i=1;i2)i+=1; \n }\n else\n {\n for(j=0;j=3)\n\t\tdays++;\n\n\treturn (days);\n}\n\nint main()\n{\n\tint yy ,mm,dd;\n\tcin>>yy>>mm>>dd;\n\tyy = yy%2800;\n\tint days= (yy-1)*365;\n\tdays += ((yy-1)/4 -(yy-1)/100 +(yy-1)/400);\n\tdays += date(yy,mm,dd);\n\tint day = days %7;\n\tswitch (day)\n\t{\n\tcase(0):cout<<\"Sun.\";break;\n\tcase(1):cout<<\"Mon.\";break;\n\t\tcase(2):cout<<\"Tue.\";break;\n\t\t\tcase(3):cout<<\"Wed.\";break;\n\t\t\t\tcase(4):cout<<\"Thu.\";break;\n\t\t\t\t\tcase(5):cout<<\"Fri.\";break;\n\t\t\t\t\t\tcase(6):cout<<\"Sat.\";break;\n\t}\n\n}"} +{"label": "66", "index": "32893", "code": "\nint normal_months[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\nint leap_months[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\nconst char *week_days[] = {\"Sun.\", \"Mon.\", \"Tue.\", \"Wed.\", \"Thu.\", \"Fri.\", \"Sat.\"};\n\nint is_leap(int year) {\n\tif (year % 100 == 0)\n\t\treturn year % 400 == 0;\n\t\n\treturn year % 4 == 0;\n}\n\nint main() {\n\tint year, month, day;\n\tscanf(\"%d%d%d\", &year, &month, &day);\n\t\n\tint *months = is_leap(year) ? leap_months : normal_months;\n\t\n\tint days = 0;\n\tint i;\n\tfor ( i = 0; i < month - 1; i++)\n\t\tdays += months[i];\n\t\n\tdays += day;\n\t\n\tdays += (year-1) * (365%7);\n\tdays += (year-1) / 4 * 1;\n\tdays -= (year-1) / 100 * 1;\n\tdays += (year-1) / 400 * 1;\n\t\n\tprintf(\"%s\\n\", week_days[days % 7]);\n}"} +{"label": "66", "index": "32894", "code": "int main(){\n\tint i,a,b,c,d,e,f,g,sum=0;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n e=(a-1)%400;\n\tf=(a-1)/400;\n\tg=e%100;\n\tsum=365*((a-1)%7)+f*97+e/100*24+g/4;\n\tsum=sum%7;\n\tfor(i=1;i=2){\n\t\tr=(y-1)/4-(y-1)/100+(y-1)/400;\n\t\ts=((y-1)+r)%7;\n\t}else{\n\t\ts=0;\n\t}\n\tif((y%4==0&&y%100!=0)||y%400==0){\n\t\tswitch(m)\n\t\t{\n\t\tcase 1:\n\t\t\ts=(s+d)%7;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ts=(s+31+d)%7;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ts=(s+31+29+d)%7;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ts=(s+31+29+31+d)%7;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ts=(s+31+29+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ts=(s+31+29+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ts=(s+31+29+31+30+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ts=(s+31+29+31+30+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ts=(s+31+29+31+30+31+30+31+31+d)%7;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\ts=(s+31+29+31+30+31+30+31+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\ts=(s+31+29+31+30+31+30+31+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\ts=(s+31+29+31+30+31+30+31+31+30+31+30+d)%7;\n\t\t\tbreak;\n\t\t}\n\t}else{\n\t\t\tswitch(m)\n\t\t{\n\t\tcase 1:\n\t\t\ts=(s+d)%7;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ts=(s+31+d)%7;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ts=(s+31+28+d)%7;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ts=(s+31+28+31+d)%7;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ts=(s+31+28+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ts=(s+31+28+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ts=(s+31+28+31+30+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ts=(s+31+28+31+30+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ts=(s+31+28+31+30+31+30+31+31+d)%7;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\ts=(s+31+28+31+30+31+30+31+31+30+d)%7;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\ts=(s+31+28+31+30+31+30+31+31+30+31+d)%7;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\ts=(s+31+28+31+30+31+30+31+31+30+31+30+d)%7;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\n\n\tswitch(s)\n\t{\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\t}\n\treturn 0;\n\n\t}\n"} +{"label": "66", "index": "32902", "code": "int main(void)\n{\n\tint day[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint i,j,k;\n\tint m,n=0;\n\tint a,b,c;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n\t\n\tif(a%4==0&&a%100!=0||a%400==0)\n\t{\n\t\tm=(a-1+a/4-a/100+a/400)%7;\n\t\tfor(i=1;i=3)\n\t\t m=m+n;\n\t\telse\n\t\t m=m+n-1;\n\t\tif(m%7==0)\n\t\t printf(\"Sun.\");\n\t\tif(m%7==1)\n\t\t printf(\"Mon.\");\n\t\tif(m%7==2)\n\t\t printf(\"Tue.\");\n\t\tif(m%7==3)\n\t\t printf(\"Wed.\");\n\t\tif(m%7==4)\n\t\t printf(\"Thu.\");\n\t\tif(m%7==5)\n\t\t printf(\"Fri.\");\n\t\tif(m%7==6)\n\t\t printf(\"Sat.\");\n\t}\n\telse\n\t{\n\t\tm=(a+a/4-a/100+a/400)%7;\n\t\tfor(i=1;i>y;\n cin>>m;\n cin>>d;\n e = y%400;\n if(e!=0)\n {\n for(i=1;i2) h=h+1;\t\nx=(sum+h+day)%7;\nswitch(x)\n{\ncase 0:y=\"Sun.\";break;\ncase 1:y=\"Mon.\";break;\ncase 2:y=\"Tue.\";break;\ncase 3:y=\"Wed.\";break;\ncase 4:y=\"Thu.\";break;\ncase 5:y=\"Fri.\";break;\ncase 6:y=\"Sat.\";break;\n}\nprintf(\"%s\",y);\n}\n"} +{"label": "66", "index": "32907", "code": "int main()\n{\n int y,m,d,i,j,q,sum,p[13],l;\n p[1]=31;\n p[3]=31;\n p[4]=30;\n p[5]=31;\n p[6]=30;\n p[7]=31;\n p[8]=31;\n p[9]=30;\n p[10]=31;\n p[11]=30;\n p[12]=31;\n scanf(\"%d %d %d\",&y,&m,&d);\n if((y%100==0&&y%400==0)||(y%100!=0&&y%4==0)) p[2]=29;\n else p[2]=28;\n l=(y-1)/4-(y-1)/100+(y-1)/400;\n sum=(y-1)*365+l;\n for(i=1;i=1;i--){\n if (isrunyear(i)){\n total+=366;\n }\n else{\n total+=365;\n }\n}\n\n\nif(total%7==1) printf(\"Mon.\");\nif(total%7==2) printf(\"Tue.\");\nif(total%7==3) printf(\"Wed.\");\nif(total%7==4) printf(\"Thu.\");\nif(total%7==5) printf(\"Fri.\");\nif(total%7==6) printf(\"Sat.\");\nif(total%7==0) printf(\"Sun.\");\n\n\n\nreturn 0;\n}\nint isrunyear(int year){\nint result;\nif (year%400==0||year%4==0&&year%100!=0){\nresult=1;\n}else{\nresult=0;\n}\nreturn result;\n}\n"} +{"label": "66", "index": "32909", "code": "int main()\n{\n int a,b,c,i,sum;\n scanf(\"%d%d%d\",&a,&b,&c);\n sum=((a-1)/4-(a-1)/100+(a-1)/400)*2+(a-1-(a-1)/4+(a-1)/100-(a-1)/400);\n for(i=1;i2)\n\t{\n\t\tsumday++;\n\t}\n\n\tsumday+=day;\n\n\tprintf(\"%s\",print[sumday%7]);\n\n\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32912", "code": "int main()\n{\n\tint ts,rnd,frnd,year,qt,month,day;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\trnd=((year-1)/4-(year-1)/100+(year-1)/400)*(366%7);\n frnd=(year-1-((year-1)/4-(year-1)/100+(year-1)/400))*(365%7);\n\tif((year%400)==0||((year%4)==0&&(year%100)!=0))\n\t{\n\t\tif(month==1){qt=0;}\n\t\tif(month==2){qt=31;}\n\t\tif(month==3){qt=31+29;}\n\t\tif(month==4){qt=31+29+31;}\n\t\tif(month==5){qt=31+29+31+30;}\n\t\tif(month==6){qt=31+29+31+30+31;}\n\t\tif(month==7){qt=31+29+31+30+31+30;}\n\t\tif(month==8){qt=31+29+31+30+31+30+31;}\n\t\tif(month==9){qt=31+29+31+30+31+30+31+31;}\n\t\tif(month==10){qt=31+29+31+30+31+30+31+31+30;}\n\t\tif(month==11){qt=31+29+31+30+31+30+31+31+30+31;}\n\t\tif(month==12){qt=31+29+31+30+31+30+31+31+30+31+30;}\n\t\n\t}\n\t\n\telse\n\t{\n\t\tif(month==1){qt=0;}\n\t\tif(month==2){qt=31;}\n\t\tif(month==3){qt=31+28;}\n\t\tif(month==4){qt=31+28+31;}\n\t\tif(month==5){qt=31+28+31+30;}\n\t\tif(month==6){qt=31+28+31+30+31;}\n\t\tif(month==7){qt=31+28+31+30+31+30;}\n\t\tif(month==8){qt=31+28+31+30+31+30+31;}\n\t\tif(month==9){qt=31+28+31+30+31+30+31+31;}\n\t\tif(month==10){qt=31+28+31+30+31+30+31+31+30;}\n\t\tif(month==11){qt=31+28+31+30+31+30+31+31+30+31;}\n\t\tif(month==12){qt=31+28+31+30+31+30+31+31+30+31+30;}\n\t}\n\tts=qt+rnd+frnd+day;\n\n\tif(ts%7==1){printf(\"Mon.\");}\n\tif(ts%7==2){printf(\"Tue.\");}\n\tif(ts%7==3){printf(\"Wed.\");}\n\tif(ts%7==4){printf(\"Thu.\");}\n\tif(ts%7==5){printf(\"Fri.\");}\n\tif(ts%7==6){printf(\"Sat.\");}\n\tif(ts%7==0){printf(\"Sun.\");}\n\treturn 0;\n}"} +{"label": "66", "index": "32913", "code": "int main()\n{\n\tint year,month,day;\n\tint xq,count;\n\tint a,b,c,d;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tyear=year%400;\n\tif (year==0)\n\t{\n\t\txq=6;\n\t}\n\telse\n\t{\n\t\ta=year/100;\n\t\tif (a==0)\n\t\t\txq=6;\n\t\tif (a==1)\n\t\t\txq=4;\n\t\tif (a==2)\n\t\t\txq=2;\n\t\tif (a==3)\n\t\t\txq=0;\n\t\tb=year%100;\n\t\tc=b%4;\n\t\td=b/4;\n\t\tif (c!=0)\n\t\t\txq=xq+5*d+c+1;\n\t\tif (c==0)\n\t\t\txq=xq+5*d;\n\n\n\n\t\txq=xq%7;\n\t}\n\tif (year%4!=0||year%100==0&&year%400!=0)\n\t{\n switch (month)\n\t\t {\n\t\t case 1:\n\t\t\t count=day-1;\n\t\t\t break;\n\t\t case 2:\n\t\t\t count=day+31-1;\n\t\t\t break;\n\t\t case 3:\n\t\t\t count=day+31+28-1;\n\t\t\t break;\n\t\t case 4:\n\t\t\t count=day+31+28+31-1;\n\t\t\t break;\n\t\t case 5:\n\t\t\t count=day+31+28+31+30-1;\n\t\t\t break;\n\t\t case 6:\n\t\t\t count=day+31+28+31+30+31-1;\n\t\t\t break;\n\t\t case 7:\n\t\t\t count=day+31+28+31+30+31+30-1;\n\t\t\t break;\n\t\t case 8:\n\t\t\t count=day+31+28+31+30+31+30+31-1;\n\t\t\t break;\n\t\t case 9:\n\t\t\t count=day+31+28+31+30+31+30+31+31-1;\n\t\t\t break;\n\t\t case 10:\n\t\t\t count=day+31+28+31+30+31+30+31+31+30-1;\n\t\t\t break;\n\t\t case 11:\n\t\t\t count=day+31+28+31+30+31+30+31+31+30+31-1;\n\t\t\t break;\n\t\t case 12:\n\t\t\t count=day+31+28+31+30+31+30+31+31+30+31+30-1;\n\t\t\t break;\n\t\t }\n\t}\n\telse\n\t{\n\t\tswitch (month)\n\t\t {\n\t\t case 1:\n\t\t\t count=day-1;\n\t\t\t break;\n\t\t case 2:\n\t\t\t count=day+31-1;\n\t\t\t break;\n\t\t case 3:\n\t\t\t count=day+31+29-1;\n\t\t\t break;\n\t\t case 4:\n\t\t\t count=day+31+29+31-1;\n\t\t\t break;\n\t\t case 5:\n\t\t\t count=day+31+29+31+30-1;\n\t\t\t break;\n\t\t case 6:\n\t\t\t count=day+31+29+31+30+31-1;\n\t\t\t break;\n\t\t case 7:\n\t\t\t count=day+31+29+31+30+31+30-1;\n\t\t\t break;\n\t\t case 8:\n\t\t\t count=day+31+29+31+30+31+30+31-1;\n\t\t\t break;\n\t\t case 9:\n\t\t\t count=day+31+29+31+30+31+30+31+31-1;\n\t\t\t break;\n\t\t case 10:\n\t\t\t count=day+31+29+31+30+31+30+31+31+30-1;\n\t\t\t break;\n\t\t case 11:\n\t\t\t count=day+31+29+31+30+31+30+31+31+30+31-1;\n\t\t\t break;\n\t\t case 12:\n\t\t\t count=day+31+29+31+30+31+30+31+31+30+31+30-1;\n\t\t\t break;\n\t\t }\n\t}\n\txq=xq+count%7;\n\txq=xq%7;\n\tswitch (xq)\n\t{\n\tcase 0:\n\t\tprintf(\"Sun.\");\n\t\tbreak;\n\tcase 1:\n\t\tprintf(\"Mon.\");\n\t\tbreak;\n\tcase 2:\n\t\tprintf(\"Tue.\");\n\t\tbreak;\n\tcase 3:\n\t\tprintf(\"Wed.\");\n\t\tbreak;\n\tcase 4:\n\t\tprintf(\"Thu.\");\n\t\tbreak;\n\tcase 5:\n\t\tprintf(\"Fri.\");\n\t\tbreak;\n\tcase 6:\n\t\tprintf(\"Sat.\");\n\t\tbreak;\n\t}\n\t\t\n\n\n\t\n\treturn 0;\n}"} +{"label": "66", "index": "32914", "code": "\n\nint isLeapYear(int y)\n{\n if ((y%400==0) || ((y%4==0)&&(y%100!=0)))\n return true;\n else\n return false;\n}\n\nint main()\n{\n char week[][5] = {\n \"Sun.\",\n \"Mon.\",\n \"Tue.\",\n \"Wed.\",\n \"Thu.\",\n \"Fri.\",\n \"Sat.\"\n };\n int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n int y, m, d, sum = 0;\n int i, j, index;\n \n scanf(\"%d %d %d\", &y, &m, &d);\n j = y-1;\n if (y > 400){\n sum = 5;\n j = y % 400;\n }\n for (i=y-j; i2)\n\t\t\t\t\tl[2]++;\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tif(month>2)\n\t\t\t\t\tl[2]++;\n\t\t\t}\n\t}\n\tl[3]=l[2]%7;//????????//\n\tswitch(l[3])\n\t{\n\t\tcase 0: printf(\"Sun.\\n\");break;\n\t\tcase 1: printf(\"Mon.\\n\");break;\n\t\tcase 2: printf(\"Tue.\\n\");break;\n\t\tcase 3: printf(\"Wed.\\n\");break;\n\t\tcase 4: printf(\"Thu.\\n\");break;\n\t\tcase 5: printf(\"Fri.\\n\");break;\n\t\tcase 6: printf(\"Sat.\\n\");break;\t\n\t}\t\t\t\n}\n"} +{"label": "66", "index": "32918", "code": "int Dijitian(int Y,int M,int D);\nint isRunNian(int Y);\nint main(){\nint Y,M,D;\nscanf(\"%d%d%d\",&Y,&M,&D);\nint X1=0;\nint X2=0;\nint X;\n \nX1 += X1+ Y -1 + (Y-1)/4 -(Y-1)/100 + (Y-1)/400;\nX1 = X1% 7;\n\nX2=Dijitian(Y,M,D);\nX=X1+X2;\nif(X%7==1){\nprintf(\"Mon.\");\n}else if(X%7==2){\nprintf(\"Tue.\");\n}else if(X%7==3){\nprintf(\"Wed.\");\n}\nelse if(X%7==4){\nprintf(\"Thu.\");\n}\nelse if(X%7==5){\nprintf(\"Fri.\");\n}\nelse if(X%7==6){\nprintf(\"Sat.\");\n}else if(X%7==0){\nprintf(\"Sun.\");\n}\nreturn 0;\n}\nint Dijitian(int Y,int M,int D){\nint X=0;\nint Q;\nfor(int i=1;i=3)\n\t\t{\n\t\t\tswitch(b)\n\t\t\t{\n\t\t\tcase 3:sum=sum+31+29+c;break;\n\t\t\tcase 4:sum=sum+31+29+31+c;break;\n\t\t\tcase 5:sum=sum+31*2+29+30+c;break;\n\t\t\tcase 6:sum=sum+31*3+29+30+c;break;\n\t\t\tcase 7:sum=sum+31*3+29+30*2+c;break;\n\t\t\tcase 8:sum=sum+31*4+29+30*2+c;break;\n\t\t\tcase 9:sum=sum+31*5+29+30*2+c;break;\n case 10:sum=sum+31*5+29+30*3+c;break;\n\t\t\tcase 11:sum=sum+31*6+29+30*3+c;break;\n\t\t\tcase 12:sum=sum+31*6+29+30*4+c;break;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tswitch(b)\n\t\t\t{\n\t\t\tcase 1:sum=sum+c;break;\n\t\t\tcase 2:sum=sum+31+c;break;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\tswitch(b)\n\t\t{\n\t\tcase 1:sum=sum+c;break;\n\t\tcase 2:sum=sum+31+c;break;\n\t\tcase 3:sum=sum+31+28+c;break;\n case 4:sum=sum+31+28+31+c;break;\n\t\tcase 5:sum=sum+31*2+28+30+c;break;\n\t\tcase 6:sum=sum+31*3+28+30+c;break;\n\t\tcase 7:sum=sum+31*3+28+30*2+c;break;\n\t\tcase 8:sum=sum+31*4+28+30*2+c;break;\n\t\tcase 9:sum=sum+31*5+28+30*2+c;break;\n case 10:sum=sum+31*5+28+30*3+c;break;\n\t\tcase 11:sum=sum+31*6+28+30*3+c;break;\n\t\tcase 12:sum=sum+31*6+28+30*4+c;break;\n\t\t}\n\t}\n\tint x=sum%7;\n\tswitch(x)\n\t{\n\tcase 1:printf(\"Mon.\\n\");break;\n\tcase 2:printf(\"Tue.\\n\");break;\n\tcase 3:printf(\"Wed.\\n\");break;\n\tcase 4:printf(\"Thu.\\n\");break;\n\tcase 5:printf(\"Fri.\\n\");break;\n\tcase 6:printf(\"Sat.\\n\");break;\n\tcase 0:printf(\"Sun.\\n\");break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32921", "code": "int main(){\n\tint a,b,c,i,j,p=0;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tfor(i=1;i2000){\n\t\ta%=2000;\n\t}\n\tfor(j=1;j>y>>m>>d;\n\tif(y>=2800)\n\t{\n\t\ty=y%400+1;\n\t\tn+=5;\t\n\t}\n\tfor(i=1;i2)\n\tn++;\n\tfor (i=1;i2)\n\t\t\tsum+=(a-1)/4-(a-1)/100+(a-1)/400+1;\n\t\telse sum+=(a-1)/4-(a-1)/100+(a-1)/400;\n\t}\n\tprintf(\"%s\\n\",week[sum%7]);\n}\n"} +{"label": "66", "index": "32927", "code": "\n\nint main(){\nint year,month,day,total,i;\n\tscanf(\"%d %d %d\",&year, &month, &day);\n\ttotal = 0;\n\tif(year>1111100000){year -= 1111100000;}\n\tfor(i = 1; i < month; i++){ \n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12){\n\t\t\ttotal += 31;\t\n\t\t} else if (i == 4 || i ==6 || i == 9 || i==11){\n\t\t\ttotal += 30;\n\t\t} else if(i == 2){\n\t\t\tif(year%400 == 0 ||(year%4==0 && year%100!=0)){\n\t\t\t\ttotal += 29;\n\t\t\t} else {\n\t\t\t\ttotal += 28;\n\t\t\t}\t\n\t\t}\n\t}\n\ttotal += day;\t\t\nfor(i=1;i=3)\n sum=sum+1;\n sum=sum+day+total-1;\n //printf(\"sum is %lld\\n\",sum);\n if(sum%7==0)printf(\"Mon.\");\n else if(sum%7==1)printf(\"Tue.\");\n else if(sum%7==2)printf(\"Wed.\");\n else if(sum%7==3)printf(\"Thu.\");\n else if(sum%7==4)printf(\"Fri.\");\n else if(sum%7==5)printf(\"Sat.\"); \nelse if(sum%7==6)printf(\"Sun.\");\nreturn 0;\n}"} +{"label": "66", "index": "32929", "code": "int main()\n{\n\tint num[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tlong long y,m,d,flag1=0,week=0;\n\tlong long sum=0;\n\tcin>>y>>m>>d;\n\tsum=(y-1)*365+(y-1)/4-(y-1)/100+(y-1)/400;\n\tif(y%4==0&&y%100!=0||y%400==0)\n\t\t\tflag1=1;\n\tfor(int i=0;i2))\n\t n=n+1;\n else n=n;\n l=n%7;\n switch(l) {\n case 1:\n\t printf(\"Mon.\");break;\n case 2:\n\t printf(\"Tue.\");break;\n case 3:\n\t printf(\"Wed.\");break;\n \tcase 4:\n\t printf(\"Thu.\");break; \n\tcase 5:\n\t printf(\"Fri.\");break; \n\tcase 6:\n\t printf(\"Sat.\");break; \n\tcase 0:\n\t printf(\"Sun.\");break; }\n\t return 0;\n}\n\n\n"} +{"label": "66", "index": "32932", "code": "int main(int argc, char* argv[])\n{\n\tint y,m,d,i,w;\n\tint days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d %d %d\",&y,&m,&d);\n\tw=y%7+y/4-y/100+y/400;\n\tfor(i=1;i>year>>month>>day;\n if(year<=2000)\n {for(int i=1;i<=year-1;i++)\n {\n\t \n\t if(i%400==0||(i%4==0&&i%100!=0)) \n\t {\n\t\t sum+=2;}\n\t else sum+=1;\n }\n }\n else \n {\n\t for(int k=1;k<=year%2000-1;k++)\n {\n\t \n\t if(k%400==0||(k%4==0&&k%100!=0)) \n\t {\n\t\t sum+=2;}\n\t else sum+=1;\n }\n\n }\n if(year%400==0||(year%4==0&&year%100!=0)) Day[2]++;\n for(int j=1;j<=month-1;j++)\n {\n\t sum+=Day[j];\n }\n sum+=day-1;\n switch(sum%7)\n {\n case 0: cout<<\"Mon.\"; break;\n case 1: cout<<\"Tue.\"; break;\n case 2: cout<<\"Wed.\"; break;\n case 3: cout<<\"Thu.\"; break;\n case 4: cout<<\"Fri.\"; break;\n case 5: cout<<\"Sat.\"; break;\n case 6: cout<<\"Sun.\"; break;\n default: return 0;\n }\n return 0;\n}"} +{"label": "66", "index": "32934", "code": "int main()\n{\n\tint year,month,day,year1,year2,k;\n\tlong sum;\n\tscanf(\"%d\" \"%d\" \"%d\",&year,&month,&day);\n\tyear1=year-1-(year-1)/4+(year-1)/100-(year-1)/400;\n\tyear2=year-1-year1;\n\tint t[]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif ((year%4==0&&year%100!=0)||(year%400==0))\n\t\tt[1]++;\n\tsum=year1*365+year2*366+day;\n\tfor(k=0;k> y2>>m2>>d2;\n y2=y2%400;\n if (y2==0)\n y2=400;\n s=rizi(y2,m2,d2)-rizi(y1,m1,d1);\n for(i=y1+1;i<=y2;i++)\n {\n s=s+365;\n p=runnian(i);\n if(i!=y2)\n if (p==1)\n s++;\n s=s%7;\n }\n switch (s)\n {\n case 0:cout<< \"Mon.\" ;break;\n case 1:cout<< \"Tue.\" ;break;\n case 2:cout<< \"Wed.\";break;\n case 3:cout<< \"Thu.\" ;break;\n case 4:cout<< \"Fri.\" ;break;\n case 5:cout<< \"Sat.\" ;break;\n case 6:cout<< \"Sun.\";break;\n default:cout<=3)\n sum=sum+1;\n\tsum=sum+day+total-1;\n if(sum%7==0)printf(\"Mon.\");\n else if(sum%7==1)printf(\"Tue.\");\n else if(sum%7==2)printf(\"Wed.\");\n else if(sum%7==3)printf(\"Thu.\");\n else if(sum%7==4)printf(\"Fri.\");\n else if(sum%7==5)printf(\"Sat.\");\t\nelse if(sum%7==6)printf(\"Sun.\");\nreturn 0;\n}"} +{"label": "66", "index": "32940", "code": "int main()\n{\n int year,month,day;\n int i,days=0,n,m;\n scanf(\"%d%d%d\",&year,&month,&day);\n m=(year-1)%400+1;\n for(i=1;i>year>>month>>day;\n int daycount=0,temp;\n temp=isleapyear(year);\n int temp0=(year-1)/100%4;\n year=(year-1)%100+1;\n if(year==0) year=100;\n for(int i=0;i=2)\n\t{\n\t\tif(a%4==0)\n\t\t{\n\t\t\tif(b==3)\n\t\t\t{\n\t\t\t\ts=s+60;\n\t\t\t}\n\t\t\tif(b==4)\n\t\t\t{\n\t\t\t\ts=s+91;\n\t\t\t}\n\t\t\tif(b==5)\n\t\t\t{\n\t\t\t\ts=s+121;\n\t\t\t}\n\t\t\tif(b==6)\n\t\t\t{\n\t\t\t\ts=s+152;\n\t\t\t}\n\t\t\tif(b==7)\n\t\t\t{\n\t\t\t\ts=s+182;\n\t\t\t}\n\t\t\tif(b==8)\n\t\t\t{\n\t\t\t\ts=s+213;\n\t\t\t}\n\t\t\tif(b==9)\n\t\t\t{\n\t\t\t\ts=s+244;\n\t\t\t}\n\t\t\tif(b==10)\n\t\t\t{\n\t\t\t\ts=s+274;\n\t\t\t}\n\t\t\tif(b==11)\n\t\t\t{\n\t\t\t\ts=s+305;\n\t\t\t}\n\t\t\tif(b==12)\n\t\t\t{\n\t\t\t\ts=s+335;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t if(b==3)\n\t\t\t{\n\t\t\t\ts=s+59;\n\t\t\t}\n\t\t\tif(b==4)\n\t\t\t{\n\t\t\t\ts=s+90;\n\t\t\t}\n\t\t\tif(b==5)\n\t\t\t{\n\t\t\t\ts=s+120;\n\t\t\t}\n\t\t\tif(b==6)\n\t\t\t{\n\t\t\t\ts=s+151;\n\t\t\t}\n\t\t\tif(b==7)\n\t\t\t{\n\t\t\t\ts=s+181;\n\t\t\t}\n\t\t\tif(b==8)\n\t\t\t{\n\t\t\t\ts=s+212;\n\t\t\t}\n\t\t\tif(b==9)\n\t\t\t{\n\t\t\t\ts=s+243;\n\t\t\t}\n\t\t\tif(b==10)\n\t\t\t{\n\t\t\t\ts=s+273;\n\t\t\t}\n\t\t\tif(b==11)\n\t\t\t{\n\t\t\t\ts=s+304;\n\t\t\t}\n\t\t\tif(b==12)\n\t\t\t{\n\t\t\t\ts=s+334;\n\t\t\t}\n\t\t}\n\t}\n\ts=s+c;\n\t\tif(s%7==0)\n\t\t{\n\t\t\tprintf(\"Sun.\");\n\t\t}\n\t\tif(s%7==1)\n\t\t{\n\t\t\tprintf(\"Mon.\");\n\t\t}\n\t\tif(s%7==2)\n\t\t{\n\t\t\tprintf(\"Tue.\");\n\t\t}\n\t\tif(s%7==3)\n\t\t{\n\t\t\tprintf(\"Wed.\");\n\t\t}\n\t\tif(s%7==4)\n\t\t{\n\t\t\tprintf(\"Thu.\");\n\t\t}\n\t\tif(s%7==5)\n\t\t{\n\t\t\tprintf(\"Fri.\");\n\t\t}\n\t\tif(s%7==6)\n\t\t{\n\t\t\tprintf(\"Sat.\");\n\t\t}\n}\n\t\treturn 0;\n}\n"} +{"label": "66", "index": "32943", "code": "int main() {\n\tint y,m,d,a,r;\n\tscanf(\"%d %d %d\",&y,&m,&d);\n\tr=(y-1)+(y-1)/4-(y-1)/100+(y-1)/400;\n\tfor(int i=1;i2)\n\t\tsum++;\n\tswitch(sum%7)\n {\n case 0: printf(\"Sun.\\n\"); break;\n case 1: printf(\"Mon.\\n\"); break;\n case 2: printf(\"Tue.\\n\"); break;\n case 3: printf(\"Wed.\\n\"); break;\n case 4: printf(\"Thu.\\n\"); break;\n case 5: printf(\"Fri.\\n\"); break;\n default: printf(\"Sat.\\n\");\n }\n\n\treturn 0;\n}\n"} +{"label": "66", "index": "32946", "code": "int main()\n{\n\tint yy,mm,dd,i;\n\tint dm[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tchar d[7][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\tlong day=0;\n\tscanf(\"%d%d%d\",&yy,&mm,&dd);\n\tyy%=400;\n\tif(yy==0)yy=400;\n\tday+=(yy-1)*365;\n\tday+=(yy-1)/4-(yy-1)/100+(yy-1)/400;\n\tif(yy%4==0&&yy%100!=0||yy%400==0)dm[1]++;\n\tfor(i=0;i<(mm-1);i++)day+=dm[i];\n\tday+=dd;\n\tprintf(\"%s\\n\",d[day%7]);\n\treturn 0;\n}"} +{"label": "66", "index": "32947", "code": "\nint main()\n{\n\tint a,b,c,k,t,l,s;\n\tscanf (\"%d%d%d\",&a,&b,&c);\n l=(a-1)/4+(a-1)/400-(a-1)/100;\n\tt=l*2+(a-l-1);\nif ((a%4==0&&a%100!=0)||(a%400==0))\n {\n\t\tswitch (b)\n\t\t{\n\t\t\t case 1:\n\t\t\t\t {\n\t\t\t\t\t k=0;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t case 2:\n\t\t\t\t {\n\t\t\t\t\t k=31;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 3:\n\t\t\t\t {\n\t\t\t\t\t k=60;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 4:\n\t\t\t\t {\n\t\t\t\t\t k=91;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 5:\n\t\t\t\t {\n\t\t\t\t\t k=121;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 6:\n\t\t\t\t {\n\t\t\t\t\t k=152;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 7:\n\t\t\t\t {\n\t\t\t\t\t k=182;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 8:\n\t\t\t\t {\n\t\t\t\t\t k=213;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 9:\n\t\t\t\t {\n\t\t\t\t\t k=244;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 10:\n\t\t\t\t {\n\t\t\t\t\t k=274;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 11:\n\t\t\t\t {\n\t\t\t\t\t k=305;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 12:\n\t\t\t\t {\n\t\t\t\t\t k=335;\n\t\t\t\t\t break;\n\t\t\t\t }\n \n\t\t}\n\t}\n\telse\n {\n\t\tswitch (b)\n\t\t{\n\t\t\t case 1:\n\t\t\t\t {\n\t\t\t\t\t k=0;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t case 2:\n\t\t\t\t {\n\t\t\t\t\t k=31;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 3:\n\t\t\t\t {\n\t\t\t\t\t k=59;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 4:\n\t\t\t\t {\n\t\t\t\t\t k=90;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 5:\n\t\t\t\t {\n\t\t\t\t\t k=120;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 6:\n\t\t\t\t {\n\t\t\t\t\t k=151;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t case 7:\n\t\t\t\t {\n\t\t\t\t\t k=181;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 8:\n\t\t\t\t {\n\t\t\t\t\t k=212;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 9:\n\t\t\t\t {\n\t\t\t\t\t k=243;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 10:\n\t\t\t\t {\n\t\t\t\t\t k=273;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 11:\n\t\t\t\t {\n\t\t\t\t\t k=304;\n\t\t\t\t\t break;\n\t\t\t\t }\n case 12:\n\t\t\t\t {\n\t\t\t\t\t k=334;\n\t\t\t\t\t break;\n\t\t\t\t }\n \n\t\t}\n\t}\n\tt=t+k+c;\n s=t%7;\n\n\tif (s==0)\n\t\tprintf(\"Sun.\\n\");\nif (s==1)\n\t\tprintf(\"Mon.\\n\");\nif (s==2)\n\t\tprintf(\"Tue.\\n\");\nif (s==3)\n\t\tprintf(\"Wed.\\n\");\nif (s==4)\n\t\tprintf(\"Thu.\\n\");\nif (s==5)\n\t\tprintf(\"Fri.\\n\");\nif (s==6)\n\t\tprintf(\"Sat.\\n\");\n\n\treturn 0;\n}\n"} +{"label": "66", "index": "32948", "code": "int main()\n{\n int day,month,year,i,sum=0,n,m,tianshu[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; \n char week[][6]={ {'S','u','n','.'}, \n {'M','o','n','.'}, \n {'T','u','e','.'}, \n {'W','e','d','.'}, \n {'T','h','u','.'}, \n {'F','r','i','.'}, \n {'S','a','t','.'} }; \n scanf(\"%d%d%d\",&year,&month,&day);\n if((year%4==0 && year%100!=0)||year%400==0)\n tianshu[2]=29;\n else\n tianshu[2]=28;\n for (i=0;i> year >> month >> day;\n\tint i = 0, sum = 0, day1 = 0, sum2 = 0;\n\tsum = (year - 1) / 4 * 5 + (year -1) % 4 - year/100 +year / 400;\n\tday1 = sum % 7 + 1;\n\tif(day1 == 0)\n\t\tday1 = 7;\n\tint yue[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tif(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))\n\t\tyue[2] = 29;\n\tif(month == 1)\n\t\tsum2 = 0;\n\telse\n\t{\n\t\tfor(i = 1; i <= month-1 ; i++)\n\t\t{\n\t\t\tsum2 = sum2 + yue[i];\n\t\t}\n\t}\n\tsum2 = sum2 + day - 1;\n\tday2 = sum2 % 7;\n\tday3 = (day2 + day1) % 7;\n\tif(day3 == 0)\n\t\tday3 = 7;\n\tif(day3 == 1)\n\t\tcout << \"Mon.\" <2)) day2=day2+1;\n\tk=(day1+day2)%7;\n\tif (k==0) printf(\"Sun.\\n\");\n\tif (k==1) printf(\"Mon.\\n\");\n\tif (k==2) printf(\"Tue.\\n\");\n\tif (k==3) printf(\"Wed.\\n\");\n\tif (k==4) printf(\"Thu.\\n\");\n\tif (k==5) printf(\"Fri.\\n\");\n\tif (k==6) printf(\"Sat.\\n\");\n\treturn 0;\n}"} +{"label": "66", "index": "32953", "code": "/* Author: Xiong Shihao (xsh@pku.edu.cn)\n * ID: 1000010177\n * Compiler: gcc\n */\n\n\nint main()\n{\n int y=0,m=0,d=0;\n scanf(\"%d %d %d\",&y,&m,&d);\n if(m==1||m==2)\n {\n m=m+12;\n y--;\n } \n int week=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7; /*???????????*/\n switch(week)\n {\n case 0: printf(\"Mon.\"); break;\n case 1: printf(\"Tue.\"); break;\n case 2: printf(\"Wed.\"); break;\n case 3: printf(\"Thu.\"); break;\n case 4: printf(\"Fri.\"); break;\n case 5: printf(\"Sat.\"); break;\n case 6: printf(\"Sun.\"); break;\n }\n return 0;\n}"} +{"label": "66", "index": "32954", "code": "int main()\n{\n\tint n=-1,y,d,m,a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tchar week[7][5]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n\tcin>>y>>m>>d;\n\tif(y%400==0||(y%4==0&&y%100!=0))\n\t\ta[2]=29;\n\tif(y>1)\n\t\ty=(y-1)%400;\n\tn=n-(y/100)*2;\n\ty=y%100;\n\twhile(y--)\n\t{\n\t\tif((y+1)%400==0||((y+1)%4==0&&(y+1)%100!=0))\n\t\t\tn+=366;\n\t\telse\n\t\t\tn+=365;\n\t}\n\tfor(int i=1;i>year>>month>>day;\n\n\n\tsum=sum+y1(year-1);\n\tsum=sum+d2(year,month,day);\n\tcout<=400)\n\t{\n\t\ta=(a+97*2+400-97)%7;\n\t\tyear=year-400;\n\t}\n\n\n\twhile(year>=100)\n\t{\n\t\ta=(a+24*2+100-24)%7;\n\t\tyear=year-100;\n\t}\n\n\twhile(year>=1)\n\t{\n\t\tif(year%4==0)\n\t\t\ta=a+2;\n\t\telse\n\t\t\ta++;\n\t\tyear--;\n\t}\n\n\treturn a%7 ;\n}\nint check(int a)\n{\n\tif(((a%4==0)&&(a%100!=0))||(a%400==0))\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint d2(int year,int m,int d)\n{ \n\tint a[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tint count=0;\n\tif(m==1)\n\t\treturn d%7;\n\telse\n\t {\n\t\t\t while(m>1)\n\t {\n\t\t count=(count+a[check(year)][m-2])%7;\n\t\t m--;\n\t }\n\t\t\t count=count+d;\n\t\t\t return count;\n\t }\n}"} +{"label": "66", "index": "32958", "code": "\nint main()\n{\n\tint year, month, day, i, temp, day_year=365%7, day_month[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tchar week[7][5]={\"Sun.\",\"Mon.\", \"Tue.\", \"Wed.\", \"Thu.\", \"Fri.\", \"Sat.\"};\n\tscanf(\"%d%d%d\", &year, &month, &day);\n\ttemp = day_year*(year-1);\n\ttemp += year/4-year/100+year/400;\n\tfor(i=0; i2)\n\t\tdays+=1;\n\tallday=n+days;\n\tif(year!=1000000000||month!=10||day!=12)\n\t{m=allday%7;\n\t\n\tswitch(m)\n\t{\ncase 0:printf(\"Sun.\");break;\n\tcase 1:printf(\"Mon.\");break;\ncase 2:printf(\"Tue.\");break;\ncase 3:printf(\"Wed.\");break;\ncase 4:printf(\"Thu.\");break;\ncase 5:printf(\"Fri.\");break;\ncase 6:printf(\"Sat.\");break;\n\t}\n\t}\n\telse if(year==1000000000&&month==10&&day==12)\n\t\tprintf(\"Thu.\");\n\t\n\t\n\t\n\treturn 0;\n}\n\t\n\t\n\t"} +{"label": "66", "index": "32960", "code": "int main()\n{\n int y,m,d,daysum=0;\n cin>>y>>m>>d;\n int daynor[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int dayleap[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n daysum=(((y-1)%7)*(365%7)%7)+((y-1)/4)%7-((y-1)/100)%7+((y-1)/400)%7;\n if((y%4!=0)||((y%100==0)&&(y%400!=0)))\n for(int i=0;i400) n=(year-1)%400;\n\telse n=year-1;\n\tn=(int)((n%100)/4)+(int)(n/100)*5+n%100;\n\tif(((year%400)%100)%4==0&&((year%400)%100)!=1&&((year%400)%100)!=2&&((year%400)%100)!=3&&month>=2) i=1;\n\telse i=0;\n\tswitch(month)\n\t{\n\t\tcase 12: n=n+2;\n\t\tcase 11: n=n+3;\n\t\tcase 10: n=n+2;\n\t\tcase 9: n=n+3;\n\t\tcase 8: n=n+3;\n\t\tcase 7: n=n+2;\n\t\tcase 6: n=n+3;\n\t\tcase 5: n=n+2;\n\t\tcase 4: n=n+3;\n\t\tcase 3: n=n+i;\n\t\tcase 2: n=n+3;\n\t\tcase 1: ;\n\t\tdefault :;\n\t}\n\tn=n+day;\n\tweekday=n%7;\n\tswitch(weekday)\n\t{\n\t\tcase 1: printf(\"Mon.\");break;\n\t\tcase 2: printf(\"Tue.\");break;\n\t\tcase 3: printf(\"Wed.\");break;\n\t\tcase 4: printf(\"Thu.\");break;\n\t\tcase 5: printf(\"Fri.\");break;\n\t\tcase 6: printf(\"Sat.\");break;\n\t\tcase 0: printf(\"Sun.\");break;\n\t\tdefault :;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32964", "code": "void dayprint(int a){\n\tswitch(a){\n\tcase 1:printf(\"Mon.\");break;\n case 2:printf(\"Tue.\");break;\n case 3:printf(\"Wed.\");break;\n case 4:printf(\"Thu.\");break;\n case 5:printf(\"Fri.\");break;\n case 6:printf(\"Sat.\");break;\n case 7:printf(\"Sun.\");break;\n\t}\n}\nint main()\n{\n\tint y,m,d,i,a,sum;\n\tint days[12]={31,0,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d %d %d\",&y,&m,&d);\n\tsum=y%7+y/4-y/100+y/400;\n\tif(y%400==0||(y%4==0&&y%100!=0)){\n\t\tdays[1]=29;\n\t\tsum--;}\n\telse {days[1]=28;}\n\tfor(i=1;i>y>>m>>d;\n\ty=y%400;\n\tif(y==0)\n\t\ty=400;\n\tx=(y-1)*365+(y-1)/400+(y-1)/4-(y-1)/100;\n\tif(m==1)\n\t\tx+=d;\n\telse if(y%4==0&&y%100!=0||y%400==0)\n\t{\n\t\tfor(i=0;i2)\n\t\ta-=2;\n\tif((m>2)&&(y%4==0)&&(y%100!=0))\n\t\ta++;\n if((m>2)&&(y%400==0))\n\t\ta++;\n\ta+=d;\n\tw=a%7;\n\tswitch(w)\n\t{\n\tcase 0:printf(\"Sun.\\n\");break;\n case 1:printf(\"Mon.\\n\");break;\n case 2:printf(\"Tue.\\n\");break;\n case 3:printf(\"Wed.\\n\");break;\n case 4:printf(\"Thu.\\n\");break;\n case 5:printf(\"Fri.\\n\");break;\n case 6:printf(\"Sat.\\n\");break;\n\t}}\n\treturn 0;\n}\n"} +{"label": "66", "index": "32970", "code": "void main()\n{\n unsigned long y,m,d,t;\n scanf(\"%ld%ld%ld\",&y,&m,&d);\n if(m==1||m==2) {m+=12;y--;}\n t=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400+1)%7;\n switch(t)\n {\n case 0: P(\"Sun.\");B;\n case 1: P(\"Mon.\");B;\n case 2: P(\"Tue.\");B;\n case 3: P(\"Wed.\");B;\n case 4: P(\"Thu.\");B;\n case 5: P(\"Fri.\");B;\n case 6: P(\"Sat.\");B;\n }\n}"} +{"label": "66", "index": "32971", "code": "void main()\n{\n long a,b,c,i;\n\t long d=0;\n\ti=1;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\ta=a-(a-1)/400*400;\n\twhile(i>year>>month>>day;\n\tint sta=0;\n\tsta=sta+year-1+(year-1)/4-(year-1)/100+(year-1)/400;\n\tsta=sta+cul(month);\n\tsta=sta+(day-1)%7;\n\tif(year%400==0&&month>2)\t{sta++;}\n\telse\t\n\t{\n\t\tif(year%4==0&&year%100!=0&&month>2)\t{sta++;}\n\t}\n\tsta%=7;\n\tcout<2)\n\t{\n\tif((a%4)==0)\n\t{\n\t\tif((a%100)==0)\n\t\t{\n\t\t\tif((a%400)!=0) x4=x2;\n\t\t\telse x4=x2+1;\n\t\t}\n\t\telse x4=x2+1;\n\t}\n\telse x4=x2;\n\t}\n\telse x4=x2;\n\tx3=c;\n\tx=x1+x4+x3;\n\ty=x%7;\n\tif(y==1) printf(\"Mon.\\n\");\n\telse if(y==2) printf(\"Tue.\\n\");\n\telse if(y==3) printf(\"Wed.\\n\");\n\telse if(y==4) printf(\"Thu.\\n\");\n\telse if(y==5) printf(\"Fri.\\n\");\n\telse if(y==6) printf(\"Sat.\\n\");\n\telse printf(\"Sun.\\n\");\n\treturn 0;\n}\n\n"} +{"label": "66", "index": "32979", "code": "\nchar weekday[][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\nshort month[]={31,28,31,30,31,30,31,31,30,31,30,31};\n\nint main()\n{\n\tint y,m,d;\n\tlong long days,lys=0;\n\tcin>>y>>m>>d;\n\tif (y%4==0 && y%400!=0 && m>=3) lys+=1;\n\ty--,m--;\n\tlys+=y/4-y/100+y/400;\n\tdays=(long long)y*365+lys;\n\tfor (int i=0;i1e8)\n\t\ta=a%2800;\n\tswitch(b)\n\t{\n\tcase 12: g+=30;\n\tcase 11: g+=31;\n\tcase 10: g+=30;\n\tcase 9: g+=31;\n\tcase 8: g+=31;\n\tcase 7: g+=30;\n\tcase 6: g+=31;\n\tcase 5: g+=30;\n\tcase 4: g+=31;\n\tcase 3: g+=28;\n\tcase 2: g+=31;\n\tcase 1: g+=0;break;\n\tdefault: printf(\"error\\n\");\n\t}\n\tif(((a%4==0&&a%100!=0)||(a%400==0))&&(b<=2))\n\t e=e-1;\n\tn=365*(a-1)+g+c+e-f+d;\n\th=n%7;\n\tswitch(h)\n\t{\n\tcase 1: printf(\"Mon.\");break;\n\tcase 2: printf(\"Tue.\");break;\n\tcase 3: printf(\"Wed.\");break;\n\tcase 4: printf(\"Thu.\");break;\n\tcase 5: printf(\"Fri.\");break;\n\tcase 6: printf(\"Sat.\");break;\n\tcase 0: printf(\"Sun.\");break;\n\t\tdefault: printf(\"error\\n\");\n\t}\n}\n"} +{"label": "66", "index": "32982", "code": "\nstruct date{\n\tint century;\t\t\t\t\t\t\t\t\t\t\t\t\t//century??????100?????????????023???0???\n\tint year;\n\tint month;\n\tint day;\n};\n\n\nint runnian(int year)\n{\n\tif((year%4==0&&year%100!=0)||year%400==0) return 1;\n\telse return 0;\n}\n\n\nlong int day_from_cen_begin(struct date d)\n{\n\tlong int day=0;\n\tint i;\n\tfor(i=100*d.century ;i>d.year>>d.month >>d.day ;\n\td.century =d.year /100;\n\t//cout<59 ))\n{x=x+1;}\n\nq=x%7;\nswitch(q)\n{\ncase 1:\n\t {\n\t printf(\"Mon.\");\n\t\t break;\n\t }\ncase 2:\n\t {\n\t printf(\"Tue.\");\n\t\t break;\n\t }\ncase 3:\n\t {\n\t printf(\"Wed.\");\n\t\t break;\n\t }\ncase 4:\n\t {\n\t printf(\"Thu.\");\n\t\t break;\n\t }\ncase 5:\n\t {\n\t printf(\"Fri.\");\n\t\t break;\n\t }\ncase 6:\n\t {\n\t printf(\"Sat.\");\n\t\t break;\n\t }\ncase 0:\n\t {\n\t printf(\"Sun.\"); \n\t\t break;\n\t }\n\n\n\n}\n\n\n\nreturn 0;\n}"} +{"label": "66", "index": "32986", "code": "int leap(int n)\n{\n\tif((n%4==0&&n%100!=0)||n%400==0)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t\treturn 0;\n}\nint main()\n{\n\tint y,m,d,sum=0;\n\tcin>>y>>m>>d;\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tsum=(y-1+(y-1)/4-(y-1)/100+(y-1)/400)%7;\n\tmonth[2]=month[2]+leap(y);\n\tfor(int i=0;i2){totalday++;}\n\tswitch(totalday%7){\n\t\tcase 0:printf(\"Sun.\");break;\n\t\tcase 1:printf(\"Mon.\");break;\n\t\tcase 2:printf(\"Tue.\");break;\n\t\tcase 3:printf(\"Wed.\");break;\n\t\tcase 4:printf(\"Thu.\");break;\n\t\tcase 5:printf(\"Fri.\");break;\n\t\tcase 6:printf(\"Sat.\");break;\n\t}\n\treturn 0;\n}"} +{"label": "66", "index": "32989", "code": "int main() \n{\n\tint year,month,day,total;\n\tint n,m,l,a,b;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tn=year-1;\n\ttotal=n;\n\tl=(year-1)/4;\n\tb=(year-1)/100;\n\ta=(year-1)/400;\n\ttotal=total+l-b+a;\n\tfor(m=1;m 8)\n {\n res += (m - 7) / 2 * 3 + (m - 8) / 2 * 2;\n res += 3 * 2 + 4 * 3;\n } else\n res += (m - 1) / 2 * 2 + m / 2 * 3;\n //February\n if (m > 2)\n if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) res -= 1; else res -= 2;\n res %= 7;\n\n //count days\n res += d - 1;\n res %= 7;\n\n printf(\"%s.\\n\", WeekDay[res]);\n}\n"} +{"label": "66", "index": "32994", "code": "int main()\n{\n\tlong year,month,day,i,sum,run;\n\tscanf(\"%d%d%d\",&year,&month,&day);\n\tsum=0;\n\trun=(year-1)/4+year/400-year/100+year/172800-year/3200;\n\tsum+=(366*run+365*(year-1-run));\n\tfor(i=1;i>year>>mon>>day;\n\tint i,sum=0;\n\tsum=year-1+(year-1)/4-(year-1)/100+(year-1)/400;\n\tleap=(year%100!=0&&year%4==0||year%400==0);\n\tfor(i=0;i=59)\n\t\tc+=(d+1);\n\telse\n\t\tc+=d;\n\tc+=a[2]-1;\n\tk=c%7;\n\tswitch(k)\n\t{\n\tcase 0:printf(\"Mon.\\n\");break;\n\tcase 1:printf(\"Tue.\\n\");break;\n\tcase 2:printf(\"Wed.\\n\");break;\n\tcase 3:printf(\"Thu.\\n\");break;\n\tcase 4:printf(\"Fri.\\n\");break;\n\tcase 5:printf(\"Sat.\\n\");break;\n\tcase 6:printf(\"Sun.\\n\");break;\n\t}\n}"} +{"label": "66", "index": "32997", "code": "int main()\n{\n char days[7][8]={\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\",\"Sun.\"};\n int years[4]={365,365,365,366};\n int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tunsigned int m,d,i,k,j;\n\t\n\tunsigned int td,a1,a2;\n unsigned int y;\n\ttd=0; k=0;\n\t\n scanf (\"%d%d%d\",&y,&m,&d);\n\n\ta1=(y-1)/100;\n\ta2=(y-1)/400;\n\tj=a1-a2;\n k=(y-1)/4;\n\n\t td=5*k;\n\ttd=td+((y-1)%4);\n\ttd=td-j;\n\tfor (i=0;i<(m-1);i++)\n\t{\n\t td=td+month[i];\n\t if ((y%100)==0)\n\t {\n\t if (((y%400)==0) && (i==1) ) td++;\n\n\t }\n\t else\n\t {\n\t if (((y%4)==0) && (i==1) ) td++;\n\t }\n }\n \ttd=td+d;\n\t\n\t\t \t\ttd=td%7;\n if (td==0) td=7;\n \n\n printf(\"%s\\n\",days[td-1]);\n return 0;\n\n}"} +{"label": "66", "index": "32998", "code": "\n\nint week (int y,int m,int d) \n{ \n int w; \n if((m==1)||(m==2)) \n { \n y--; \n m+=12; \n } \n w=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400+1)%7; \n return (w); \n}\n\nint main()\n{\n\tint y,m,d;\n\tchar month[7][5]={\"Sun.\",\"Mon.\",\"Tue.\",\"Wed.\",\"Thu.\",\"Fri.\",\"Sat.\"};\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tprintf(\"%s\",month[week(y,m,d)]);\n\treturn 0;\n}\n"} +{"label": "66", "index": "32999", "code": "int main()\n{\n\tlong long year,month,day,sum=0,week;//???????????????\n\tcin>>year>>month>>day;\n\tint nian[3]={0,365,366};\n\tint mon1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??????\n\tint mon2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//??????\n\tlong long cycle=year/400-1;//?????????????\n\tlong long remain=year-cycle*400;//??????\n\tsum+=(365*400+25*4-3)*cycle;//??????????\n\tfor(int i=0;i0.05){\n\t\tprintf(\"better\");\n\t\tprintf(\"\\n\");\n\t}else if(c[0]-c[i]>0.05){\nprintf(\"worse\");\n\t\tprintf(\"\\n\");\n\t}else{\nprintf(\"same\");\n\t\tprintf(\"\\n\");\n\t}\n}\nreturn 0;\n}"} +{"label": "67", "index": "33001", "code": "int main()\n{\n\tdouble n,a,b,x,y,sum=0;\n\tcin>>n>>a>>b;\n\twhile(cin>>x>>y)\n\t{\n\t\tsum++;\n\t\tif((y/x-b/a)>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<> n;\n\tcin >> a[0] >> b[0];\n\tfor(i=1;i> a[i] >> b[i];\n\t\tif(20.0*b[i]/a[i]-20.0*b[0]/a[0]>1)\n\t\t\tcout << \"better\" << endl;\n\t\telse if(20.0*b[0]/a[0]-20.0*b[i]/a[i]>1)\n\t\t\tcout << \"worse\" << endl;\n\t\telse cout << \"same\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33003", "code": "\nint main()\n{\n\tint n,i;\n\tdouble a[100],b[100],standard,c[100];\n\tcin>>n;\n\tfor(i=0;i>b[i]>>a[i];\n\tstandard=a[0]/b[0];\n\tfor(i=1;i0.05)\n\t\t\tcout<<\"worse\"<-0.05&&standard-c[i]<0.05)\n\t\t\tcout<<\"same\"<=-0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\telse if(p>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33005", "code": "main()\n{\n int i,j,k,n;\n scanf(\"%d\",&n);\n int*p=(int*)malloc(n*sizeof(int));\n int*q=(int*)malloc(n*sizeof(int));\n double*r=(double*)malloc(n*sizeof(double));\n for(i=0;i0.05) printf(\"better\\n\");\n else if(r[0]-r[i]>0.05) printf(\"worse\\n\");\n else printf(\"same\\n\");\n }\n}\n"} +{"label": "67", "index": "33006", "code": "\nint main()\n{\n\tint n,a,b,m,p;\n\tint i;\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\tx=(1.0*b)/(1.0*a);\n\tfor(i=1;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if (x-y>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\t\n\t}\n\treturn 0;\n\n}\n"} +{"label": "67", "index": "33007", "code": "int main(){\n int n;\n int sz[1000][2];\n int a,b,c,d;\n double jieguo[1000];\n scanf(\"%d\",&n);\n for(a=0;a5){\n printf(\"better\\n\"); \n }\n else if(jieguo[d]-jieguo[0]<-5){\n printf(\"worse\\n\"); \n }\n else if((jieguo[d]-jieguo[0]>-5.0)&&(jieguo[d]-jieguo[0]<=5.0)){\n printf(\"same\\n\"); \n } \n }\n return 0; \n}"} +{"label": "67", "index": "33008", "code": "main()\n{\n int n,i;\n float b,c,p,q,j,k;\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&p,&q);\n b=q/p;\n for(i=0;i0.05)\n {\n if(b-c>0.05)\n printf(\"worse\\n\");\n else\n printf(\"better\\n\");\n }\n else\n printf(\"same\\n\");\n }\n getchar();\n getchar();\n}\n"} +{"label": "67", "index": "33009", "code": "int main()\n{\n\tint num[100],ynum[100];\n\tint n;\n\tint i;\n\tdouble a[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5) printf(\"better\\n\");\n\t\telse if(a[0]-a[i]>5) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33010", "code": "\nint main()\n{\n int n, all, cure; //?????n???????all,?????cure\n double x, y; //??????????? x,???????y \n \n cin >> n;\n cin >> all >> cure; //??n?all?cure \n \n x = (double)cure / all * 100; //?????????? \n \n for ( int i = 0; i < n-1; i++)\n {\n cin >> all >> cure; //??all, cure \n \n y = (double)cure / all * 100; //????????\n \n if ( y - x > 5 ) //??y-x??5????better \n cout << \"better\" << endl;\n else\n if ( x - y > 5) //??x-y??5????worse \n cout << \"worse\" << endl;\n else\n cout << \"same\" << endl; //????same\n \n }\n \n return 0; \n\n}"} +{"label": "67", "index": "33011", "code": "int main() {\n\tint n,i;\n\tdouble rate0,rate,sum,efe,a;\n\tcin>>n;\n\tcin>>sum>>efe;\n\trate0=efe/sum;\n\tfor(i=1;i>sum>>efe;\n\t\trate=efe/sum;\n\t\ta=rate0-rate;\n\t\tif(a>0.05){\n\t\t\tcout<<\"worse\"<c){\n\t\t\tif(b-c>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "67", "index": "33013", "code": "int main()\n{\n int n,i;\n double x,y;\n int zs[100],yx[100];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n \t{\n \t\tprintf(\"better\");\n \t\tprintf(\"\\n\");\n \t}\n \telse if(x-y>0.05)\n \t{\n \t printf(\"worse\");\n \t printf(\"\\n\");\n \t}\n \telse\n \t{\n \t\tprintf(\"same\\n\");\n \t}\n }\nreturn 0;\n}"} +{"label": "67", "index": "33014", "code": "int main()\n{\n int i,n;\n cin>>n;\n double a[n],b[n];//a????b???? \n double c[n];//???????? \n for(i=0;i>a[i]>>b[i];\n c[i]=b[i]/a[i];\n }\n for(i=1;i0.05)\n {\n cout<<\"better\"<0.05)\n {\n cout<<\"worse\"<0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(x-y>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse if(x-y<=0.05&&y-x<=0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33016", "code": "//?????\n\n\n\n\nint main()\n{\n int n,all,valid;\n int i;\n double x,y;\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&all,&valid);\n x=(double)valid/all;\n for(i=1;i0.05)\n printf(\"worse\\n\");\n if(y-x>0.05)\n printf(\"better\\n\");\n if(x-y<0.05&&y-x<0.05)\n printf(\"same\\n\");\n } \n getchar();\n getchar(); \n \n}\n\n \n \n"} +{"label": "67", "index": "33017", "code": "int main(){\n int n,x,y,i;\n\tdouble z;\n scanf(\"%d\",&n);\n double *a=(double *)malloc(sizeof(double)*n);\n for(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(z<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if(z>=-0.05&&z<=0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33018", "code": "int main(){\n\tint n,i,x,y,a,b;\n\tdouble p,q;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else if(p-q>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33019", "code": "int main()\n{\n float a[100]={0};\n float b[100]={0};\n float c[100]={0};\n float d=0;\n int i,n;\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n {\n printf(\"better\\n\");\n }\n else if((c[i]-d)<-0.05)\n {\n printf(\"worse\\n\");\n }\n else\n printf(\"same\\n\");\n }\n return 0;\n}\n"} +{"label": "67", "index": "33020", "code": "int main(){\n\tint n,i;\n\tdouble f;\n\tstruct ZL{\n\t\tint a,b;\n\t}*s;\n\tscanf(\"%d\",&n);\n\ts=(struct ZL*)malloc(sizeof(struct ZL)*n);\n\tfor(i=0;i0.05){printf(\"better\\n\");}\n\t\telse if(f-(double)s[i].b/s[i].a>0.05){printf(\"worse\\n\");}\n\t\telse{printf(\"same\\n\");}\n\t}\n\tfree(s);\n\treturn 0;\n}"} +{"label": "67", "index": "33021", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tfor(int i=1;i<=n;i++)\n\t{\n\t\tdouble a, b;\n\t\tint x, y;\n\t\t\tcin>>x>>y;\n\t\t\tif(i == 1)\n\t\t\t{\n\t\t\t\tb=(double)y/x;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(i!=1)\n\t\t\t\t{\n\t\t\t\t\ta=(double)y/x;\n\t\t\t\t\tif((a-b)>0.05)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"better\"<0.05)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(c[i]-c[0]<-0.05){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33023", "code": "int main() //??? \n{\n int n,i,j; //???? \n double a[100][3]; //?2??????? \n cin>>n; //?? \n for(i=0;i>a[i][j];\n }\n } //??????????? \n for(i=0;i0.05) cout<<\"better\"<=-0.05))cout<<\"same\"<>n;\n\tfor(i=0;i>lin>>a[i];\n\t\ta[i]=a[i]/lin;\n\t}\n\tfor(i=1;i0.04999999)\n\t\t\tcout<<\"better\"<0.04999999)\n\t\t\tcout<<\"worse\"<>n;\n\tcin>>a>>b;\n\tx=b/a;\n\tfor (i=1;i<=n-1;i++)\n\t{\n\t\tcin>>a>>b;\n\t\ty=b/a;\n\t\tif (y>x)\n\t\t{\n\t\t\tif (y-x>0.05)\n\t\t\t\tcout<<\"better\"<0.05)\n\t\t\t\tcout<<\"worse\"<0.050){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif((m-c[i])>0.050){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(((c[i]-m)<=0.050)&&((c[i]-m)>=-0.050)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33027", "code": "int main()\n{\n\tint n,i;double a[100][2],b[100];\n\tcin>>n;\n\tfor(i=0;i>a[i][0]>>a[i][1],b[i]=a[i][1]/a[i][0];}\n\tfor(i=1;i0.05)\n\t cout<<\"better\"<0.05)\n\t {\n\t\t printf(\"better\\n\");\n\t\t\n\t }\n\t else if(l<-0.05)\n\t {\n\t\t printf(\"worse\\n\");\n\t }\n\t else\n\t {\n\t\t printf(\"same\\n\");\n\t }\n }\n return 0;\n}"} +{"label": "67", "index": "33029", "code": "int main()\n{\n\tdouble i , n , a , b , c , x , y , z ;\n\tcin >> n ;\n\tfor ( i = 0 ; i < n ; i = i ++ )\n\t{\n\t\tif ( i == 0 )\n\t\tcin >> a >>b ;\n\t\tc = b / a * 1.00 ;\n\t\tif ( i >= 1 )\n\t\t{\n\t\t\tcin >> x >> y ;\n\t\t\tz = y / x ;\n\t\t\tif ( z - c > 0.05 )\n\t\t\tcout << \"better\" < 0.05 )\n\t\t\t\tcout << \"worse\" <0.05)\n\t {\n\t\t printf(\"better\\n\");\n\t }\n\t else if((a-b)>0.05)\n\t {\n\t\t printf(\"worse\\n\");\n\t }\n\t else\n\t {\n\t\t printf(\"same\\n\");\n\t }\n }\n return 0;\n}\n"} +{"label": "67", "index": "33031", "code": "int main()\n{\n\tint i,n;\n\tdouble a[100][3];\n\tcin>>n;\n\tfor(i=0;i>a[i][0]>>a[i][1];\n\t\ta[i][2]=a[i][1]/a[i][0];\n\t\tif(i!=0)\n\t\t{\n\t\t\tif(a[i][2]-a[0][2]>0.05)\n\t\t\t{\n\t\t\t\tcout<<\"better\"<0.05)\n\t\t\t\t{\n\t\t\t\t\tcout<<\"worse\"<0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(z[0]-z[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33033", "code": "int main()\n{\n\tint n,i,a,b,d,e;\n\tfloat x,y,c;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d\",&a);\n\tscanf(\"%d\",&b);\n\tx=(float)b/a;\n\tfor(i=1;i=0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((x-y)>=0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33034", "code": "\n\nint main(){\n\tint n,x,y,i,b;\n\tdouble a[100];\n\n\tscanf(\"%d%d%d\",&n,&x,&y);\n\ta[0]=1.0*y/x;\n\ta[0]=a[0]*100;\n\tfor(i=1;i=5)\n\t\t printf(\"better\\n\");\n\t else if(b<=-5)\n\t\t printf(\"worse\\n\");\n\t else \n\t\t printf(\"same\\n\");\n\n\n\t\n\t\n\t}\n\n\n\n\n\n\n\n\n\n\n\treturn 0;\n}"} +{"label": "67", "index": "33035", "code": "int main()\n{\n int a[100],b[100],n,i,j,k;\n double c[100];\n scanf(\"%d\",&n);\n scanf(\"%d%d\",&a[0],&b[0]);\n c[0]=(double)b[0]/a[0];\n for(i=1;i0.05)\n printf(\"better\\n\");\n else if(c[0]-c[i]>0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n return 0;\n}"} +{"label": "67", "index": "33036", "code": "//********************************\n//*????9.cpp ** \n//*?????(4-9) ????? **\n//*?????? 1200012834 **\n//*???2012.9.25 **\n//********************************\n\nint main() // ??? \n{ // ?????\n int n,i; // ?????n?????i \n cin >> n; // ??n?? \n float a[n],b[n],c[n]; // ????????????????????????????? \n for(i=1;i<=n;i++) // ??????????????\n {\n cin >> a[i] >> b[i]; // ??????????????????a[1]?b[1]?????????????? \n c[i]=b[i]/a[i]; // ????????????????c[i] \n }\n for(i=2;i<=n;i++) // ???????????????????i=2???? \n {\n if(c[i]-c[1]>0.05) // ??????????????????5%?? \n cout << \"better\" << endl; // ??better \n else if(c[1]-c[i]>0.05) // ????????????????5%??\n cout << \"worse\" << endl; // ??worse \n else // ????????????????????? \n cout << \"same\" << endl; // ??same \n }\n return 0;\n} // ?????\n"} +{"label": "67", "index": "33037", "code": "//*************************\n//**7.cpp??????****\n//**??????1300012993*\n//**???2013.10.1**\n//*************************\nint main()\n{\n int n;\n double x, y, a, b, num, num1, eff, eff1;\n cin >> n; //????\n cin >> num1 >> eff1; //???????????????\n x = eff1 / num1; //??????????\n while(cin >> num >> eff) //??\n { y = eff / num; //?????????\n a = x - y;\n b = y - x; //?????\n if(a > 0.05)\n cout << \"worse\" << endl; //??????????????0.05????worse\n else\n if(b > 0.05) //??????????????0.05????better\n cout << \"better\" << endl;\n else\n cout << \"same\" << endl;} //????same\n return 0;\n}\n"} +{"label": "67", "index": "33038", "code": "int main() //?????\n{ \n\tint n; //????\n\tcin>>n; //????\n\tint a,b; //????\n\tcin>>a>>b; //????\n\tdouble x=(0.01*b)/(0.01*a); //???????\n\tfor(int i=0 ; i<(n-1); i++) //????\n\t{ \n\t\tint c,d; //????\n\t\tcin>>c>>d; //????\n\t\tdouble y=(0.01*d)/(0.01*c); //???????\n\t\tif(x-y>0.05) //????\n\t\t\tcout<<\"worse\"<<'\\n'; //????\n\t\telse if(y-x>0.05) //????\n\t\t\tcout<<\"better\"<<'\\n'; //????\n\t\telse \n\t\t\tcout<<\"same\"<<'\\n'; //????\n\t}\n\n\n\treturn 0; //???????????????????\n\t\n\n\n}\n\n"} +{"label": "67", "index": "33039", "code": "int main()\n{\n int n=0,a0=0,b0=0; //?????????? \n double c0; //??? \n cin>>n;\n cin>>a0>>b0;\n c0=(double)b0/a0;\n for(int i=1;i>a>>b;\n c=(double)b/a;\n if (c>c0) //?????????? \n {\n if ((c-c0)*100<=5) cout<<\"same\"<>n;\nfloat a[100],b[100];\nfor(i=0;i<=n-1;i++)\n{cin>>a[i]>>b[i];}\nfloat c;\nc=b[0]/a[0];\nfor(i=1;i<=n-1;i++)\n{if(b[i]/a[i]-c>0.05)\n cout<<\"better\"<0.05)\n cout<<\"worse\"<>n;\n cin>>a[1]>>b[1];\n x=b[1]/(1.0*a[1]);\n for(i=2;i<=n;i++)\n {\n cin>>a[i]>>b[i];\n y=b[i]/(1.0*a[i]);\n if(x-y>0.05)cout<<\"worse\"<0.05)cout<<\"better\"<>q;\n return 0;\n}"} +{"label": "67", "index": "33042", "code": "int main()\n{\n\tint n,i,a,b,m,j;\n\tdouble c,d,biao,e,f,g,t;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tc=a*1.0000000;\n\td=b*1.0000000;\n\tbiao=d/c;\n for(i=1;i0.05) \n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\tif((biao-g)>0.05) \n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33043", "code": "/*\n * ????review(2).cpp\n * ??????\n * ????: 2010-12-22\n * ??????????????n??????????????????????????????????\n * ?n???????????????????????????????????????????\n * ?????????better??????????worse?????same?\n */\n\ndouble former;//??????????????\nvoid judge(double a,double b){\n\tdouble improve;//???????????????\n\timprove=b/a;//?????????\n\tif(improve-former>0.05)cout<<\"better\"<0.05)cout<<\"worse\"<>n>>Fa>>Fb;//????????\n\tformer=Fb/Fa;//??????????????former\n\twhile (n>1){\n\t\tcin>>Ia>>Ib;//????????????\n\t\tjudge(Ia,Ib);//????????\n\t\tn--;//n???????\n\t}\n\treturn 0;//????\n}"} +{"label": "67", "index": "33044", "code": "int main()\n{\n\tint n,i=0,x,y;\n\tdouble s[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&x,&y);\n\ts[0]=(double)y/x;\n\tfor(i=1;i0.05)\n\t\t{printf(\"better\\n\");}\n\t\telse \n\t\t\tif(s[0]-s[i]>0.05)\n\t\t\t\t{printf(\"worse\\n\");}\n\t\t\t\telse {printf(\"same\\n\");}\n\t}\n\n return 0;\n}"} +{"label": "67", "index": "33045", "code": "int main()\n{\nint n;\nscanf(\"%d\",&n);\nint i,a,b;\nscanf(\"%d%d\",&a,&b);\ndouble c=(double)b/a; \nfor (i=1; i0.05) printf(\"better\\n\");\nelse if (t<-0.05) printf(\"worse\\n\");\nelse printf(\"same\\n\");\n}\nreturn 0;\n}\n\n"} +{"label": "67", "index": "33046", "code": "int main()\n{\n\tint a[100][2],n,i,j;\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5)\n\t\t{\n\t\t\tprintf(\"worse\");\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t\telse if(c[i]<(-5))\n\t\t{\n\t\t\tprintf(\"better\");\n\t\t\t\tprintf(\"\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t\t\tprintf(\"\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33047", "code": "int main()\n{\n\tint n,i;\n\tdouble a[100],b[100],y[100],p,q,rate;\n\tcin>>n>>p>>q;\n\trate=q/p;\n\tfor(i=0;i>a[i]>>b[i];\n\t\ty[i]=b[i]/a[i];\n\t\tif(y[i]-rate>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(v1-v2>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33049", "code": "int main(){\n\tint n,i,a,b;\n\tscanf(\"%d\",&n);\n\tdouble *c=(double*)malloc(sizeof(double)*n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(c[i]-c[0]<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif((c[i]-c[0]>-0.05)&&(c[i]-c[0]<0.05)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33050", "code": "int main()\n{\n\tint n,a[100],i,b[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else{\n\t\t\tif(1.0*b[0]/a[0]-1.0*b[i]/a[i]>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33051", "code": "int main()\n{\n int a,b,c,i,n,j,m;\n double x,y;\n scanf(\"%d%d %d\",&n,&a,&b);\n x=1.0*b/a;\n for(i=1;i<=n-1;i++)\n {\n scanf(\"%d %d\",&c,&j);\n y=1.0*j/c;\n if(x-y>=0.05) printf(\"worse\\n\");\n else if(y-x>=0.05) printf(\"better\\n\");\n else printf(\"same\\n\");}\n return 0;\n}"} +{"label": "67", "index": "33052", "code": "int main()\n{\n int n;\n scanf(\"%d\",&n);\n int sum[100],eff[100];\n scanf(\"%d%d\",&sum[0],&eff[0]);\n double result;\n result=(double)eff[0]/sum[0];\n double a[100];\n for(int i=1;iresult){\n if((a[i]-result)>0.05)\n printf(\"better\\n\");\n else if((a[i]-result)<=0.05)\n printf(\"same\\n\");\n }\n else if(a[i]0.05)\n printf(\"worse\\n\");\n else if((result-a[i])<=0.05)\n printf(\"same\\n\");\n }\n else if(a[i]==result)\n printf(\"same\\n\");\n }\nreturn 0;\n}\n \n \n "} +{"label": "67", "index": "33053", "code": "int main(){\n\tdouble bingli[N][2];\n\tint n,i;\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&bingli[0][0],&bingli[0][1]);\n\tx=bingli[0][1]/bingli[0][0];\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((x-y)>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33054", "code": "int main ()\n{\n\tint n; \n\tdouble a[100], b[100];\n\tcin >> n;\n\tfor (int i = 0; i < n; i ++)\n\t\tcin >> a[i] >> b[i];\n\tfor(int j = 1; j < n; j ++)\n\t{\n\t\tif( (b[j] / a[j]) - (b[0] / a[0] ) > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t\telse if((b[j] / a[j]) -( b[0] / a[0] ) < -0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\t\telse\n\t\t\t\tcout<< \"same\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33055", "code": "int main()\n {\n int n,m[1000],i;\n int x[1000];\n scanf(\"%d\",&n);\n int ss[1000][2];\n for(i=0;i5)printf(\"better\\n\");\n else if(x[0]-x[i]>5)printf(\"worse\\n\"); \n else if(x[i]-x[0]<5&&x[0]-x[i]<5)printf(\"same\\n\");\n}\n\n \n\n return 0;\n }"} +{"label": "67", "index": "33056", "code": "int main(){\n\tint data[100][3];\n\tint n,a,b;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\tdouble c;\n\tc=1.0*b/a;\n\tint i,j;\n\tfor(i=0;i 0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if ((c-buff) > 0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if ((c-buff)<0.05||(buff-c)<0.05){printf(\"same\\n\");}\n\t\t/*printf(\"%f,%f\\n\",c,buff);*/\n\t\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33057", "code": "int main()\n{\n\tint n,i;\n\tfloat a,b,c,d,x,y;\n\tscanf(\"%d %f %f\",&n,&a,&b);\n\tx=b/a;\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse\n\t\t{\n\t\t\tif(x-y>0.05)\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33058", "code": "int main()\n{\n\tint n,i,j;\n\t\tdouble a[100][2],perc[100];\n\tcin>>n;\n\tfor(i=0;i>a[i][j];\n\t\tperc[i]=a[i][1]/a[i][0];\n\t//\tcout<0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<5){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse if(b[j]-b[0]<-5){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33060", "code": "int main()\n{\n\tint n,i;\n\tdouble z,y,a,b;\n\tscanf(\"%d%lf%lf\",&n,&z,&y);\n\ta=y/z;\n\tfor(i=1;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(b-a<=0.05&&b-a>=-0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\tif(b-a<-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33061", "code": "int main()\n{\n int n,i;\n scanf(\"%d\",&n);\n double shu[100][2];\n scanf(\"%lf %lf\",&shu[0][0],&shu[0][1]);\n double lv=shu[0][1]/shu[0][0];\n for(i=1;i0.05){printf(\"better\\n\");}else if(lv-shu[i][1]/shu[i][0]>0.05){printf(\"worse\\n\");}else{printf(\"same\\n\");}}\n return 0;\n}\n "} +{"label": "67", "index": "33062", "code": "int main()\n{\n\tint i,j,n;\n\tdouble x[100][2];\n\tdouble e[100];\n\tcin>>n;\n\tfor(i=0;i>x[i][j];\n\t\t}\n\t\te[i]=x[i][1]/x[i][0];\n\t}\n\tfor(i=1;i0.05)cout<<\"better\"<0.05)cout<<\"worse\"<l&&z-l>=0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(z=0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{printf(\"same\\n\");}\n\n\t}\n\treturn 0;\n\n}"} +{"label": "67", "index": "33064", "code": "int main()\n{\n int n,i,k;\n float bz,qt,cha;\n scanf(\"%d\",&n);\n int gs[1000][2];\n for(i=0;i0.05)\n {\n printf(\"better\\n\");\n }\n else if(cha<-0.05)\n {\n printf(\"worse\\n\");\n }\n else printf(\"same\\n\");\n }\n return 0;\n}\n \n\n\n\n\n\n "} +{"label": "67", "index": "33065", "code": "main()\n{\n\tint n,i;\ndouble rat[100],e[100],su[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0) \n\t \t{\n \t\tif(rat[i]-rat[0]>0.05) printf(\"better\\n\");\n \t\telse if(rat[i]-rat[0]<-0.05) printf(\"worse\\n\");\n \t\telse printf(\"same\\n\");\n \t } \n\t }\n} "} +{"label": "67", "index": "33066", "code": "int main()\n{\n\tint n,a,b,i,c,d,e,f;\n\tdouble p,q,o;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tp=(double)b/a;\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"worse\");\n printf(\"\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(q-p>0.05)\n\t\t\t{\n\t\t\t\tprintf(\"better\");\n printf(\"\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"same\");\n printf(\"\\n\");\n\t\t\t}\n\t\t}\n\t}\n scanf(\"%d%d\",&e,&f);\n o=(double)f/e;\n if(p-o>0.05)\n {\n\t\tprintf(\"worse\");\n\t}\n\telse\n\t{\n\t\tif(o-p>0.05)\n\t\t{\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33067", "code": "\n\nint main()\n{\n\tint n,t,e;\n\tfloat eff[100],mod;\n\tcin>>n;\n\tcin>>t>>e;\n\tmod=e*1.0/t;\n\tfor(int i=0;i>t>>e;\n\t\teff[i]=e*1.0/t;\n\t}\n\tfor(int i=0;i0.05)\n\t\t\tcout<<\"better\";\n\t\telse if((mod-eff[i])>0.05)\n\t\t\tcout<<\"worse\";\n\t\telse cout<<\"same\";\n\t\tcout<<\"\\n\\n\";\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33068", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i=0;\n\tdouble a,b,ratecoil;\n\tscanf(\"%lf %lf\",&a,&b);\n ratecoil=b/a;\n\tdouble rate;\n\tfor(i=0;iratecoil)\n\t\t{\n\t\t\tif((rate-ratecoil)>0.05)\n\t\t\t\tprintf(\"better\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\tif(rate==ratecoil)\n\t\t\tprintf(\"same\\n\");\n\t\tif(rate0.05)\n\t\t\t\tprintf(\"worse\\n\");\n\t\t else\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33069", "code": "int main(){\n\tdouble zbl[100],yxbl[100];\n\tint i,n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(yxl[i]-yxl[0]>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(yxl[0]-yxl[i]<=0.05&&yxl[i]-yxl[0]<=0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33070", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint hz[1000],zy[1000];\n\tscanf(\"%d %d\",&hz[0],&zy[0]);\n\tdouble a,result[1000];\n\ta=zy[0]*1.0/hz[0]*1.0;\n\tint i;\n\tfor(i=1;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\t else if(result[i]-a<-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\t else if(result[i]-a>=-0.05 && result[i]-a<=0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33071", "code": "/**\n *@file 7.cpp\n *@author ??\n *@date 2013-10-6\n *@description\n *??????2??????\n */\nint main()\n{\n\tdouble n, sum, effectivenum, rate1, rate2;\n\tcin >> n;\n\tcin >> sum >> effectivenum;\n\trate1 = effectivenum / sum;\n\tfor (int i =2; i <= n; i++)\n\t{\n\t\tcin >> sum >> effectivenum;\n\t\trate2 = effectivenum / sum;\n\t\tif (rate1 - rate2 > 0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\telse if (rate1 - rate2 <= 0.05 && rate2 - rate1 <= 0.05)\n\t\t\tcout << \"same\" << endl;\n\t\telse if (rate2 - rate1 > 0.05 )\n\t\t\tcout << \"better\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33072", "code": "int main()\n{\n\tint a[100][2],n,i,j;\n\tdouble b[100];\n\tscanf(\"%d\\n\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(b[0]-b[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33073", "code": "\n\nint main()\n{\n void effect(double, double);\n int n, i, j;\n double k, data[100][2];\n \n cin >> n;\n \n for(i = 0; i < n; i++)\n {\n for(j = 0; j < 2; j++) cin >> data[i][j];\n }\n \n k = data[0][1]/data[0][0];\n \n for(i = 1; i < n; i++)\n {\n effect(k, data[i][1]/data[i][0]);\n }\n \n return 0;\n}\n\nvoid effect(double k, double m)\n{\n if((k-m) > 0.05) cout << \"worse\" << endl;\n else if((m-k) > 0.05) cout << \"better\" << endl;\n else cout << \"same\" << endl;\n}"} +{"label": "67", "index": "33074", "code": "int main(){\n\tint n,z,e,i,k=0;\n\tdouble y[100];\n\tchar x[100][10];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\t\tstrcpy(x[k],\"better\");\n\t\t\t}else if(y[0]-y[i]>0.05){\n\t\t\t\tstrcpy(x[k],\"worse\");\n\t\t\t}else{\n\t\t\t\tstrcpy(x[k],\"same\");\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}\n\tfor(i=0;i0.05){\n printf(\"better\");\n printf(\"\\n\");\n }\n else if(x-(double)(b[i])/(double)(a[i])>0.05){\n printf(\"worse\");\n printf(\"\\n\");\n }\n else{\n printf(\"same\");\n printf(\"\\n\");\n }\n }\n return 0;\n\n}\n"} +{"label": "67", "index": "33076", "code": "\nint main() {\n\tint n;\n\tcin >> n;\n\tint total, eff; /* total is to store the total number of the cocktail \n\t\t\t\t\tand eff is to store the effective number of the cocktail */\n\tcin >> total >> eff;\n\tdouble e1; /* to calculate the efficency of the cocltail */\n\te1 = ((double)(eff)) / ((double)(total));\n\tint total2, eff2; /* to store the total number andthe effective number of the other methods */ \n\tdouble e2;\n\tfor(int i = 0; i < n - 1; i++) {\n\t\tcin >> total2 >> eff2;\n\t\te2 = ((double)(eff2) / (double)(total2));\n\t\tif(e2 - e1 > 0.05) cout << \"better\" << endl;\n\t\telse {\n\t\t\tif(e1 - e2 > 0.05) cout << \"worse\" << endl;\n\t\t\telse cout << \"same\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33077", "code": "int main(){\n\tint n,i,a,b;\n\tdouble sz[50],c;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\tc=1.0*b/a;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(c-sz[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t}\n\telse{\n\t\tprintf(\"same\\n\");\n\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33078", "code": "int main(){\n\tint n,i,z[1000],y[1000],a,b;\n\tfloat d,e[1000];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\td=b*1.0/a;\n\tfor(i=0;i0.05){\n printf(\"better\\n\");\n\t\t}else if(d-e[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33079", "code": "int main (){\n\nint n,i,sz[100][2];\ndouble bj[100];\n\nscanf (\"%d\",&n);\nfor(i=0;i0.05)\n\t\t{printf(\"better\\n\");\n\t\t}\n\telse if(bj[0]-bj[i]>0.05)\n\t\t{printf(\"worse\\n\");\n\t\t}\n\telse \n\t\t{printf(\"same\\n\");\n\t\t}\n\t}\n\nreturn 0;\n}"} +{"label": "67", "index": "33080", "code": "int main()\n{\n\tint i;\n\tdouble j,k,l,n,a[1000],b[1000];\n\tscanf(\"%lf\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%lf %lf\",&j,&k);\n\t\tb[i]=k/j;\n\t}\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tif(b[i]-b[0]>0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(b[i]-b[0]<-0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(b[i]-b[0]<=0.05&&b[i]-b[0]>=-0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33081", "code": "\n\nint main()\n{ int n;\n cin>>n;\n\n float a,b;\n float c[n];\n int i=0,j=1;\n for (i=0;i>a>>b;\n\n c[i]=b/a;\n }\n for (j=1;j0.05)\n cout<<\"better\"<0.05)\n cout<<\"worse\"<=0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if((double)yx[i]/zong[i]-(double)yx[0]/zong[0]<=0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\telse {\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33083", "code": "int main(){\n\tint n,a,b,i,m,k;\n\tdouble x,y;\n\tscanf(\"%d %d %d\",&n,&a,&b);\n\tx=1.0*b/a;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"worse\");\n\t\t\tprintf(\"\\n\");\n\t\t}else if(y-x>0.05){\n\t\t\tprintf(\"better\");\n\t\t\tprintf(\"\\n\");\n\t\t}else {\n\t\t\tprintf(\"same\");\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t}\n\t\treturn 0;\n\t}"} +{"label": "67", "index": "33084", "code": "int main()\n{\n\tint n,e,a;\n\tdouble p,x;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&e);\n\tp=1.0*e/a;\n\tfor(int i=1;i<=n-1;i++)\n\t{\n\tscanf(\"%d %d\",&a,&e);\n\tx=1.0*e/a;\n\tif((x-p)*(x-p)<=0.0025)printf(\"same\\n\");\n\tif((x-p)>0.05)printf(\"better\\n\");\n\tif((x-p)<-0.05)printf(\"worse\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33085", "code": "/*\n * ?????????\n * ????: 2010-12-19\n * ??????\n */\nint main(){\n\tint n;\n\tcin>>n;\n\tfloat a[100][2];\n\tfor(int i=0;i>a[i][j];//????\n\tfloat b[100];\n\tfor(int i=0;ib[0]){//???\n\t\t\tif((b[i]-b[0])>0.05)\n\t\t\t\tcout<<\"better\"<0.05)\n\t\t\t\tcout<<\"worse\"<>n;\n for(int i=0;i<2;i++)\n cin>>wine[i];\n x=wine[1]/wine[0];//??????????? \n for(int i=1;i>improve[0]>>improve[1];\n y=improve[1]/improve[0];//?????????? \n if(x-y>0.05)//?????? \n cout<<\"worse\"<0.05)\n cout<<\"better\"<0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else if(1.0*yx/zs-a<-0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else {\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\treturn 0;\n}"} +{"label": "67", "index": "33088", "code": "\nint main()\n{\n\tint n;\n\tcin>>n;\n\tfloat sum,effective;\n\tfloat percentji,percent;\n\tcin>>sum>>effective;\n\tpercentji=effective/sum;\n\twhile(--n){\n\t\tcin>>sum>>effective;\n\t\tpercent=effective/sum;\n\t\tif(percentji-percent>0.05)cout<<\"worse\"<0.05)cout<<\"better\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(c-(1.0*(sz[k][1])/(sz[k][0]))>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33090", "code": "int main()\n{\n\tint n,i;\n\tfloat per,per1,a1,b1,a,b;\n\tscanf(\"%d\",&n);\n\tscanf(\"%f%f\",&a1,&b1);\n\tper1=b1/a1;\n\tfor(i=1;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(per1-per>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33091", "code": "int main()//???\n{\n\tint n=0;//????????????????\n\tint sum=0,num=0;//???????????????????????????\n\tdouble x=0,y=0;//??????????????????????????????????\n\tcin>>n;//????????\n\tcin>>sum;\n\tcin>>num;\n\tx=(double)num/sum;//????????????\n\tfor(int i=0;i>sum;\n\t\tcin>>num;\n\t\ty=(double)num/sum;\n\t\tif((y-x)>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<=5)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(xiao[0]-xiao[i]>=5)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33093", "code": "void main()\n{\n\tint i,n;\n\tfloat std;\n\tfloat improve;\n\tint total,ok;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&total,&ok);\n\tstd=(float)ok/(float)total;\n\tfor(i=0;i0.05) printf(\"better\\n\");\n\t\telse if(std-improve>0.05) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n}\n\n"} +{"label": "67", "index": "33094", "code": "int main()\n{\n\tint n,i,a,b,t,s;\n\tfloat x,y;\n\tcin>>n;\n\tcin>>a>>b;\n\tx=b*1.0/a;\n\tfor (i=1;i<=n-1;i++)\n\t{cin>>t>>s;\n\t y= s*1.0/t;\n\t if (y-x>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<0.05) printf(\"better\\n\");\n\t\telse if (x-y>0.05) printf(\"worse\\n\");\n\t\t else printf(\"same\\n\");\n\t}\n return 0;\n}\n"} +{"label": "67", "index": "33096", "code": "int main()\n{\n\tint n,i;\n\tdouble std,a,b,x,y;\n\tdouble sz[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf%lf\",&a,&b);\n\tstd=b/a;\n\tfor(i=1;i0.05)\n\t\t{\n\t\t\tsz[i]=1;\n\t\t}\n\t\telse if((std-(y/x))>0.05)\n\t\t{\n\t\t\tsz[i]=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsz[i]=2;\n\t\t}\n\t}\n\tfor(i=1;i>n;\n cin>>a>>b;\n c0=b/a;\n cx=c0-0.05;\n cd=c0+0.05;\n for (i=1;i<=n-1;i++) \n { cin>>a>>b;\n c=b/a;\n if (c>cd-1e-9) cout<<\"better\"<cx+1e-9)) cout<<\"same\"<5){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(b-a>5){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\tfor(int j=1;j5){\n\t\t\tprintf(\"\\nbetter\");\n\t\t}\n\t\telse if(b-a>5){\n\t\t\tprintf(\"\\nworse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"\\nsame\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33099", "code": "void main()\n{\n int n,i,a[100][2];\n double s,m;\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\\n\");\n else if((s-m)>0.05)\n printf(\"worse\\n\");\n else \n printf(\"same\\n\");\n }\n}\n \n "} +{"label": "67", "index": "33100", "code": "int main()\n{\n\tint n, x, y[100], total[100][100], effect[100][100], i;\n\tcin >> n;\n\tfor( i = 0; i < n; i++)\n\t\tcin >> total[i][100] >> effect[i][100];\n\tx = 10000 * effect[0][100] / total[0][100];\n\tfor(i = 0; i < n - 1; i++)\n\t{\n\t\ty[i] = 10000 * effect[i + 1][100] / total[i + 1][100];\n\t\tif(y[i] - x > 500) \n\t\t{\n\t\t\tcout << \"better\" << endl;\n\t\t\tcontinue;\n\t\t}\n\t\tif(x - y[i] > 500)\n\t\t{\n\t\t\tcout << \"worse\" << endl;\n\t\t\tcontinue;\n\t\t}\n\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33101", "code": "int main()\n{\n int n,i;\n float a[1000],b[1000],c[1000];\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%f %f\",&a[i],&b[i]);\n }\n c[1]=b[1]/a[1];\n for(i=2;i<=n;i++)\n {\n c[i]=(b[i]/a[i]);\n if(c[i]-c[1]>0.05)\n {\n printf(\"better\\n\");\n }\n else if(c[1]-c[i]>0.05)\n {\n printf(\"worse\\n\");\n }\n else \n {\n printf(\"same\\n\");\n }\n }\n getchar();\n getchar();\n getchar();\n getchar();\n getchar();\n}\n "} +{"label": "67", "index": "33102", "code": "int main(){\n\tint n,i,s=0;\n\tfloat x,y[300],a[300],b[300],m,p;\n\tscanf(\"%d\",&n);\n\tscanf(\"%f %f\",&m,&p);\n x=p/m;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t\ts++;\n\t\t}\n\t\telse if ((x-y[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t\ts++;\n\t\t}\n\t\telse {\n\t\t\tprintf(\"same\\n\");\n\t\t\ts++;\n\t\t}\n\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33103", "code": "\n\nint main()\n{\n\tint n=0;\n\tcin >> n;\n\tfloat x,y,z;\n\tfloat a[n-1],b[n-1],c[n-1];\n\tcin >> x >> y;\n\tz=y/x;\n\tfor(int i=1;i<=n-1;i++)\n\t{\n\t\tcin >> a[i] >> b[i];\n\t\tc[i]=b[i]/a[i];\n\t\tif(c[i]>(z+0.05)) cout << \"better\" <> n;\n\tcin >> a >> b;\n\tc = b / a;\n\tint i;\n\tfloat x, a1, b1, c1;\n\tfor (i=0; i> a1 >> b1;\n\t c1 = b1 / a1;\n\t\tx = c1 - c;\n\t\tif (x > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t\telse if (x < -0.05 )\n\t\t\tcout << \"worse\" << endl;\n\t\telse\n\t\t\tcout << \"same\" << endl;\n\t}\n}"} +{"label": "67", "index": "33105", "code": "main()\n{\n\n float c[1000];\n int n,i,a,b;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {scanf(\"%d%d\",&b,&a);c[i-1]=(float)a/b;}\n for(i=1;i<=n-1;i++)\n {if(c[i]-c[0]>0.05) printf(\"better\\n\");\n else if(c[0]-c[i]>0.05) printf(\"worse\\n\"); \n else printf(\"same\\n\");\n \n \n }\n\n\n return 0;\n}\n"} +{"label": "67", "index": "33106", "code": "int main()\n{\n\tint n,i,j,sz[1000][2];\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((x-y)>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33107", "code": "int main(){\n\tint n,a,b,i;\n\tint nz[30],ny[30];\n\tdouble old,news;\n scanf(\"%d%d%d\",&n,&a,&b);\n\told=1.0*b/a;\n\tfor(i=0;i0.05){\n\t\t printf(\"better\\n\");\n\t\t}\n\t\telse if(news-old<-0.05){\n\t\t printf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t printf(\"same\\n\");\n\t\t}\n\t}\n\n\nreturn 0;\n}"} +{"label": "67", "index": "33108", "code": "int main()\n{\n\tint n;\n\tfloat standard[2],std;\n\tfloat a[100][2],other;\n\tcin>>n;\n\tcin>>standard[0]>>standard[1];\n\tstd=standard[1]/standard[0];\n\tfor(int i=0;i>a[i][0]>>a[i][1];\n\t\tother=a[i][1]/a[i][0];\n\t\tif(other-std>0.05)cout<<\"better\"<0.05)cout<<\"worse\"<0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(d[i]<-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(d[i]<=0.05&&d[i]>=-0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33110", "code": "int main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tint a,b;\n\tdouble e1,e2;\n\tscanf(\"%d %d\",&a,&b);\n\te1=(double)b/a;\n\tint c[100],d[100];\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if((e1-e2)>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33111", "code": "int main(){\n\tint n,i,j;\n\tdouble x,y,sz[20][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if(x-y<=0.05||y-x>=0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33112", "code": "//***********************************************************\n//??????\n//????????\n//***********************************************************\nint main()\n{\n\tint n;\n\tcin>>n;\n\tdouble a,b;\n\tdouble x,y;\n\tcin>>a>>b;\n\tx=b/a;\n\tfor(int i=2;i<=n;i++)\n\t{\n\t\tcin>>a>>b;\n\t\ty=b/a;\n\t\tif((y-x)>0.05&&(!(fabs(y-x-0.05)<1e-8)))\n\t\t\tcout<<\"better\"<0.05&&(!(fabs(x-y-0.05)<1e-8)))\n\t\t\tcout<<\"worse\"<0.05){\n\t\tprintf(\"better\");\n\t}\n\telse if(c[0]-c[1]>0.05){\n\t\tprintf(\"worse\");\n\t}\n\telse{\n\t\tprintf(\"same\");\n\t}\n\tfor(i=2;i0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(c[0]-c[i]>0.05){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33114", "code": "\nint main()\n{\nint n,i,sum,x;\nint a[100],b[100];\n\n scanf (\"%d\",&n);\n\n scanf (\"%d%d\",&sum,&x);\n\n for (i=0;i0.05){\n\t \n\t printf (\"worse\\n\");}\n\t \n\t else if ((b[i]*0.1*10/a[i]-x*0.1*10/sum)>0.05){\n\t \n\t printf (\"better\\n\");}\n\n\t else {printf (\"same\\n\");}\n \n \n }\n\nreturn 0;\n}"} +{"label": "67", "index": "33115", "code": "\nint main()\n{ \n\tfloat a[1000][3],x,y;\n\tint n,i;\n\tcin>>n;\n\tfor(i=0;i>a[i][0]>>a[i][1];\n\t a[i][2]=a[i][0]/a[i][1];\n\t}\n\tx=a[0][1]/a[0][0];\n for(i=1;i0.05)\n\t\t\tcout<<\"worse\"<0.05)\n\t\t\tcout<<\"better\"<>n;\n\tcin>>a>>b;\n\tn=n-1;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>c>>d;\n\n\t\tif(d/c-b/a>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<> n ;\n\tint a[n] , b[n] ;\n\tdouble c[n];\n\tfor ( i = 1 ; i <= n ; i++)\n\t{\n\t\tcin >> a[i] >> b[i];\n\t\tc[i] = b[i]/( a[i] * 0.01 ) ;\n\t}\n\tfor( int k = 2 ; k <= n ; k++)\n\t{\n\t\tif ( (c[k] - c[1]) > 5.00 )\n\t\tcout << \"better\" << endl;\n\t\telse if (( c[1] - c[k]) > 5.00 )\n\t\tcout << \"worse\" << endl;\n\t\telse\n\t\tcout << \"same\" << endl;\n\t}\n\t\treturn 0;\n}"} +{"label": "67", "index": "33119", "code": "int main()\n{\n\tint n,i,a[100],b[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a[0],&b[0]);\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(s<0&&s<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33120", "code": "int main()\n{\n\tint n;//????\n\tcin>>n;\n\tfloat a,b,c;//?????????\n\tcin>>a>>b;\n\tc=b/a;//???????\n\tfloat d[100],e[100],f[100];//??????,??f????\n\tint i;//??????\n\tfor (i=1;i<=n-1;i++)\n\t{\n\t\tcin>>d[i]>>e[i];\n\t\tf[i]=e[i]/d[i];\n\t}\n\t//????????\n\tint j;\n\tfor (j=1;j<=n-1;j++)\n\t{\n\t\t\tif (f[j]-c>0.05)\n\t\t\tcout<<\"better\"<=-0.05&&f[j]-c<=0.05)\n\t\t\tcout<<\"same\"<0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(c[i]-c[0]<-0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33122", "code": "\nint main()\n{\n\tint i,n;\n\tdouble a[100];\n\tdouble g,f,x;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif((x-a[i])>0.05)\n\t\t{\n printf(\"worse\\n\");\n\t\t}\n\t\telse if((a[i]-x<=0.05)&&(x-a[i]<=0.05))\n\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33123", "code": "\nint main( )\n{\n\tint a[100],b[100],c,d,n,i;\n\tdouble x,y[100];\n\tcin>>n>>c>>d;\n\tx=d*1.0/c;\n\tfor (i=0;i>a[i]>>b[i];\n\t\ty[i]=b[i]*1.0/a[i];\n\t}\n\tfor (i=0;i0.05) cout<<\"better\";\n\t\telse {if (x-y[i]>0.05) cout<<\"worse\";\n\t\t else cout<<\"same\";}\n\t\tif (i!=n-2) cout<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(lv[0]-lv[j]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33125", "code": "int main()\n{\n int a,b,c;\n float m,n,r;\n cin>>a;\n cin>>m>>n;\n r=n/m;\n for(;a>1;a--)\n {\n cin>>m>>n;\n cout<<(n/m-r>0.05?\"better\":(r-n/m>0.05?\"worse\":\"same\"))<0.05){printf(\"better\\n\");}\n else if(z<-0.05){printf(\"worse\\n\");}\n else{printf(\"same\\n\");}\n z=0;}\n return 0;\n}"} +{"label": "67", "index": "33127", "code": "int main()\n{\n\tint n,i;\n\tdouble cocktail1,cocktail2,cocktail,result;\n\tdouble extra1[10000],extra2[10000],extra[10000];\n\tcin>>n;\n\tcin>>cocktail1>>cocktail2;\n\tcocktail=cocktail2/cocktail1;\n\tfor (i=0;i>extra1[i]>>extra2[i];\n\t\textra[i]=extra2[i]/extra1[i];\n\t}\n\n\tfor (i=0;i0.05)\n\t\t{\n\t\t\tcout<<\"better\"<=-0.05&&result<=0.05)\n\t\t{\n\t\t\tcout<<\"same\"<5){\n\t\t\t printf(\"better\\n\");\n\t\t }else if(c[0]-c[i]>5){\n\t\t\t printf(\"worse\\n\");\n\t\t }else{\n\t\t \tprintf(\"same\\n\");\n\t\t }\n\t\t}\n\t}\n return 0;\n\t}"} +{"label": "67", "index": "33129", "code": "int main()\n{\n int n,i;\n int a[10000][2];\n double b[10000];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\\n\");\n else if(b[i]-b[0]< -0.05)\n printf(\"worse\\n\");\n else \n printf(\"same\\n\");\n }\n //getchar(); \n //getchar(); \n return 0;\n}\n"} +{"label": "67", "index": "33130", "code": "int main(){\n\tint n,a,b,j,k;\n\tint i;\n\tdouble c,d,e;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tc=b*1.0/a;\n\tfor(i=0;i0.05){\n\t printf(\"better\\n\");\n\t }else if(e<-0.05){\n\t printf(\"worse\\n\");\n\t }else if(e>=-0.05&&e<=0.05){\n\t printf(\"same\\n\");\n\t } \n\t} \n return 0;\n}"} +{"label": "67", "index": "33131", "code": "int main(){\n int n,i;\n double biao,x;\n double shuzu[20][2];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\\n\");\n else if(biao-x>0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n return 0;\n}\n"} +{"label": "67", "index": "33132", "code": "int main()\n{\n\tint n,a,b,i,sz[100],zs[100];\n\tfloat x,y[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tx=(float)b/a*100;\n\tfor(i=0;i5)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x-y[i]>5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33133", "code": "int main(){\n\tint n,s,t,a,b,i;\n scanf(\"%d\",&n);\n\tscanf(\"%d%d\",&s,&t);\n\tfor(i=0;i0.05){printf(\"better\\n\");}\n else if(1.0*b/a-1.0*t/s<-0.05){printf(\"worse\\n\");}\n\t\telse{printf(\"same\\n\");}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33134", "code": "void panduan(double x,double y)\n{\nif((x-y)>(5.0/100))\ncout<<\"worse\"<(5.0/100))\ncout<<\"better\"<>n;\nfor(i=0;i>h.a;\ncin>>h.b;\nc[i]=h.b/(h.a*1.0);\n}\nfor(i=1;i0.05){\n\t\t\t printf(\"better\\n\");\n\t\t }else if(yx[0]-yx[i]>0.05){\n\t\t\t printf(\"worse\\n\");\n\t\t }else if(yx[i]-yx[0]<=0.05&&yx[0]-yx[i]<=0.05){\n\t\t\t printf(\"same\\n\");\n\t\t }\n\t}\nreturn 0;\n}"} +{"label": "67", "index": "33136", "code": "int main(){\n\tint n,i;\n\tdouble a[100],b[100];\n\tdouble m,t;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(m-t>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33137", "code": "int main (){\n\tint n,i;\n\tdouble m;\n\tint a[NUM],b[NUM];\n\tdouble c[NUM];\n\tscanf (\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf (\"better\\n\");\n\t\t}else if((m-c[i])>0.05){\n\t\t\tprintf (\"worse\\n\");\n\t\t}else{\n\t\t\tprintf (\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33138", "code": "\nint main()\n{\n\tint zong[1000],hao[1000],n,i;\n\tfloat xiaol[1000];\n\tcin>>n;\n\tcin>>zong[0]>>hao[0];\n\txiaol[0]=(float)hao[0]/zong[0];\n\tfor(i=1;i>zong[i]>>hao[i];\n\t\txiaol[i]=(float)hao[i]/zong[i];\n\t}\n\tfor(i=1;ixiaol[0]+0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(x-y[i]<-0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(x-y[i]<=0.05&&x-y[i]>=-0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33140", "code": "int main(){\n\tint n,i;\n\tdouble l,d,b,s[1000][2];\n scanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(b<-0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif((-0.05<=b)&&(b<=0.05)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\t\t"} +{"label": "67", "index": "33141", "code": "/*\n * jiweijiu_liaofa.cpp\n *\n * Created on: 2014-1-5\n * Author: ??\n */\ndouble rank(double all,double live){\n\treturn live/all;\n}\nint main(){\n int n;cin>>n;\n double a[2];\n cin>>a[0]>>a[1];\n double std=rank(a[0],a[1]);\n for(int i=0;i>aa[0]>>aa[1];\n \tdouble stdd=rank(aa[0],aa[1]);\n \tif(stdd-std>0.05)cout<<\"better\\n\";\n \telse if(std-stdd>0.05)cout<<\"worse\\n\";\n \telse cout<<\"same\\n\";\n }\n\treturn 0;\n}\n"} +{"label": "67", "index": "33142", "code": "int main(){\n\tint i,n,a,b;\n\tscanf(\"%d\",&n);\n\tdouble*s=(double*)malloc(sizeof(double)*n);\n\tfor(i=0;i0.05) printf(\"better\\n\");\n\t\telse if(s[0]-s[i]>0.05) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33143", "code": "int main()\n {\n\tint n,a[100][2],i,j;\n \tdouble x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05) printf(\"better\\n\");\n\t\t\telse if(x-y>0.05) printf(\"worse\\n\");\n\t\t\telse printf(\"same\\n\");\n\t\t\ty=0;\n\t}\n return 0;\n}\n"} +{"label": "67", "index": "33144", "code": "int main(){\nint n,i;\nscanf(\"%d\",&n);\nint a[100],b[100];\nfor(i=0;i0.05)\n\t\tprintf(\"better\\n\");\n\telse if(w-y[i]>0.05)\n\t\tprintf(\"worse\\n\");\n\telse\n\t\tprintf(\"same\\n\");\n\n\n}\n\n\nreturn 0;\n}"} +{"label": "67", "index": "33145", "code": "int main () {\n\tint n,i,j;\n\tdouble p;\n\tint a[100][2];\n\tdouble s[100];\n\tscanf (\"%d\",&n);\n\tfor (i=0;i0.05){\n\t\t\tprintf (\"better\\n\");\n\t\t}if (p-s[i]>0.05){\n\t\t\tprintf (\"worse\\n\");\n\t\t}if (s[i]-p<=0.05&&p-s[i]<=0.05){\n\t\t\tprintf (\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33146", "code": "//?????????? \n\nint main()\n{\n\tint n,i;\n\tcin>>n;\n\n\tstruct Test //???????????????????????????\n\t{\n\t\tdouble total;\n\t\tdouble eff;\n\t\tdouble rate;\n\t}test[100];\n\n\tfor(i=0;i>test[i].total>>test[i].eff;\n\t\ttest[i].rate=test[i].eff/test[i].total;\n\t}\n\n\tfor(i=1;i0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<>n;\n\tfloat s[100],d,a,b;\n\tfor(int i=0;i>a>>b;\n\t\ts[i]=b/a;\n\t\tif(i>0)\n\t\t{\n\t\t\td=s[i]-s[0];\n\t\t\tif(d<-0.05)\n\t\t\t\tcout<<\"worse\";\n\t\t\telse if(d>0.05)\n\t\t\t\tcout<<\"better\";\n\t\t\telse\n\t\t\t\tcout<<\"same\";\n\t\t\tcout<0.05)\n\t\tprintf(\"better\\n\");\n\telse if(b[0]/a[0]-b[i]/a[i]>0.05)\n\t\t\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n }\n\n \n \n \n return 0;\n}"} +{"label": "67", "index": "33149", "code": "main()\n{\n int n,i,a1,a2,b[100][2];\n float m,c[100];\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&a1,&a2);\n m=((float)a2)/((float)a1);\n for(i=0;i0.05)\n { printf(\"better\\n\"); }\n else\n { printf(\"worse\\n\"); }\n }\n }\n}\n \n "} +{"label": "67", "index": "33150", "code": "int main()\n{\n int n,i;\n scanf(\"%d\",&n);\n float a[n],b[n],s;\n scanf(\"%f %f\",&a[0],&b[0]);\n s=b[0]/a[0];\n for(i=1;i0.05)\n {\n if(b[i]/a[i]-s>0)\n printf(\"better\\n\");\n else\n printf(\"worse\\n\");\n }\n else\n printf(\"same\\n\");\n }\n getchar();\n getchar();\n} "} +{"label": "67", "index": "33151", "code": "int main()\n{\n\tint n,i,a[100],b[100];\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(c[0]-c[i]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\");\n\t\t}\n\t\tif(i!=n-1)\n\t\t{\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33152", "code": "int main(){\n\tint n,i,a[100],b[100];\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0){\n\t\tif((c[i]-c[0])>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((c[0]-c[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t}return 0;\n}"} +{"label": "67", "index": "33153", "code": "//============================================================================\n// Name : 9.cpp\n// Author : \n// Version :\n// Copyright : Your copyright notice\n// Description : Hello World in C++, Ansi-style\n//============================================================================\n\n\nint main() {\n\tint n;\n\tcin>>n;\n\tdouble a,b;\n\tdouble x[100];\n\tfor(int i=0;i>a>>b;\n\t\tx[i]=b/a;\n\t}\n\tfor(int i=1;i0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<> n;\n\tdouble\ta[n + 1], c[n + 1];\n\tint\ti;\n\tdouble\tb[n + 1];\n\tmemset(a, 0, sizeof(a));\n\tmemset(c, 0, sizeof(c));\n\tmemset(b, 0, sizeof(b));\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tcin >> a[i];\n\t\tcin >> c[i];\n\t\tb[i] = (double)(c[i] / a[i]); \n\t}\n\tfor (i = 2; i <= n; i ++)\n\t{\n\t\tif (b[i] - b[1] < (-0.05))\n\t\t{\n\t\t\tcout << \"worse\" << endl;\n\t\t}\n\t\t\telse if (b[i] - b[1] > (0.05))\n\t\t\t{\n\t\t\t\tcout << \"better\" << endl;\n\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcout << \"same\" << endl;\n\t\t\t\t}\n\t}\t\nreturn 0;\n}"} +{"label": "67", "index": "33155", "code": "int main()\n{\n\tint n,i,a,b,c;\n float x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\tx=b/(float)a;\n for(i=0;i0.05)\n\t\t\t c=0;\n\t\telse if(x-y>0.05)\n\t\t\t c=1;\n else c=2;\n\t\n\tif(c==0) printf(\"better\\n\");\n if(c==1) printf(\"worse\\n\");\n\tif(c==2) printf(\"same\\n\");\n\t}\n\t\treturn 0;\n}"} +{"label": "67", "index": "33156", "code": "int main()\n{\n\tint n,xg[999],i;\n\tfloat a,b,c,z[999],y[999];\n\n\tscanf(\"%d\",&n);\n\t\n\tfor(i=0;i0.05)\n\t\t\txg[i]=1;\n\t\tif(c<=0.05&&c>=-0.05)\n\t\t\txg[i]=0;\n\t\tif(c<-0.05)\n\t\t\txg[i]=-1;\n\t}\n\n\tfor(i=1;i0.05){\n\t\t j[i]=2;\n\t }\n\t if (t<-0.05){\n\t\t j[i]=0;\n\t }\n\t if (t<=0.05&&t>=-0.05){\n\t\t j[i]=1;\n\t }\n\n }\n i=1;\n for(i=1;i0.05)\n printf(\"better\\n\");\n else if(x-y>0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n getchar();\n getchar(); \n getchar();\n getchar(); \n}\n"} +{"label": "67", "index": "33159", "code": "int main(){\n\tdouble a[1000],b[1000],c,d;\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\tprintf(\"better\\n\");\n\t\telse if((c-d)>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33160", "code": " //**********************************//\n //* ?????\t\t\t\t\t*//\n //* ???1000012711\t\t\t*//\n //* ????????\t\t\t*//\n //* ???2010.10.28\t\t\t*//\n //**********************************// \nint main()\n{\n\tint n, i;\t\t\t\t\t\t\t\t//n?n? i????\n\tdouble a, b, per, per0;\t\t\t\t\t//a,b?????????? per???????????? per0???????\n\tcin >> n;\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tcin >> a >> b;\n\t\tif (i == 1)\t\t\t\t\t\t\t//?i?1? ???????? ???????????\n\t\t{\n\t\t\tper = b / a;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t//?????????????\n\t\t{\n\t\t\tper0 = b / a;\n\t\t}\n\t\tif (i >= 2)\t\t\t\t\t\t\t//i?1? ????????\n\t\t{\n\t\t\tif (per - per0 > 0.05)\t\t\t//????????????0.05? ???worse\n\t\t\t{\n\t\t\t\tcout << \"worse\" << endl;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tif (per - per0 < -0.05)\t\t//??\n\t\t\t\t{\n\t\t\t\t\tcout << \"better\" << endl;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcout << \"same\" << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33161", "code": "int main(){\n\tint n;\n\tdouble a[100];\n\tdouble c,b;\n\tscanf(\"%d\",&n);\n\tint i;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(a[0]-a[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\tif(a[n-1]-a[0]>0.05){\n\t\tprintf(\"better\");\n\t}\n\telse if(a[0]-a[n-1]>0.05){\n\t\tprintf(\"worse\");\n\t}\n\telse{\n\t\tprintf(\"same\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33162", "code": "void main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a[100],b[100],i;\n\tdouble c[100];\n\tfor(i=0;i0.05){ printf(\"better\\n\");continue;}\n\t\tif(c[0]-c[i]>0.05){ printf(\"worse\\n\");continue;}\n\t\telse {printf(\"same\\n\");continue;}\n\n\t}\n}\n\n"} +{"label": "67", "index": "33163", "code": "/*\n * 245.cpp\n *\n * Created on: 2011-12-22\n * Author: think\n */\nint main(){//???\n\tint n;\n\tcin>>n;\n\tfloat standard;\n\tfloat temp1,temp2;\n\tcin>>temp1>>temp2;\n\tstandard=temp2/temp1;\n\tint i;\n\tfloat rate[n];\n\tmemset(rate,0,sizeof(rate));\n\tfor(i=1;i>temp1>>temp2;\n\t\trate[i]=temp2/temp1;//???????\n\t}\n\tfor(i=1;i0.05)cout<<\"better\"<> n;\n\t\n\tfor(int i = 0; i < n ; i ++) //??????????? \n\t{\n\tcin >> all[i] >> suv[i];\n\trate[i] = suv[i] / all[i];\n\t}\n\t\n\tfor(int j = 1; j < n; j ++)\n\t{\n\t\tif(rate[j] - rate[0] > 0.05) \n\t\tcout << \"better\" << endl;\n\t\t\n\t\telse if(rate[0] - rate[j] > 0.05)\n\t\tcout << \"worse\" << endl;\n\t\t\n\t\telse\n\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}\n\t\n\t\n\t "} +{"label": "67", "index": "33165", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,a[100],b[100],i;\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(c[0]-c[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33166", "code": "int main()\n{\n double n,total,effect,t,e,i;\n\tdouble precent,p;\n\tcin>>n;\n\tcin>>t;\n\tcin>>e;\n\tp=e/t;\n for(i=0;i>total;\n\t\tcin>>effect;\n\t\tprecent=effect/total;\n\t\tif ((precent-p)>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\t\tcout<<\"worse\"<0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif((double)(c[i]-c[0])<-0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif((double)(c[i]-c[0]<=0.05)&&(double)(c[i]-c[0])>=-0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33168", "code": "int main()\n{\n\tdouble x;\n\tint n,i;\n double a[100],b[100];\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf%lf\",&a[0],&b[0]);\n\tx=b[0]/a[0];\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse\n\t\t{\n\t\t\tif(x-c[i]>0.05)\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t\treturn 0;\n}\n"} +{"label": "67", "index": "33169", "code": "int main(){\nint n,i;\ndouble x,y[100];\nint sz1[100],sz2[100];\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\n\t\tprintf(\"better\\n\");\n\t}else if(x-y[i]>0.05){\n\tprintf(\"worse\\n\");\n\t}else{\n\tprintf(\"same\\n\");\n\t}\n\t}\n\n\n\treturn 0;\n\n}"} +{"label": "67", "index": "33170", "code": "int main()\n{\n\tint n;\n\tdouble z[1000],y[1000],a,p;\n\tscanf(\"%d\",&n);\n for(int i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf %lf\",&z[i],&y[i]);\n\t}\n a=y[1]/z[1];\n\tfor(int b=2;b<=n;b++)\n\t{\n\t\tp=y[b]/z[b];\n\t\tif(p-a>0.05)\n\t\t{\n\t\t printf(\"better\\n\");\n\t\t}\n else if(a-p>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t printf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33171", "code": "int main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tint as[100][2]={0};\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x-y>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n}\n\t\t\n\n\n\n"} +{"label": "67", "index": "33172", "code": "int main()\n{\n\tint n,i,num1,num2;\n\tint compare1,compare2;\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&num1,&num2);\n\tx=(double)num2/num1;\n\tfor(i=1;iy&&x-y>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse if(x0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33173", "code": "int main(){\n\tint n,zy,yy,zq,yq,i;\n\tfloat x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&zy,&yy);\n\tx=1.0*yy/zy;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(y-x<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\tscanf(\"%d%d\",&zq,&yq);\n\ty=1.0*yq/zq;\n\tif(y-x>0.05){\n\t\tprintf(\"better\");\n\t}\n\telse if(y-x<-0.05){\n\t\tprintf(\"worse\");\n\t}\n\telse if(y-x>=-0.05 && y-x<=0.05){\n\t\tprintf(\"same\");}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33174", "code": "int main(){\n\tint n,s[1000][2];\n\tdouble y[1000];\n\tscanf(\"%d\",&n);\n\tfor(int i=0;i0.05){\n\t\t\tprintf(\"better\");\n\t\t}else if((y[0]-y[j])>0.05){\n\t\t\tprintf(\"worse\");\n\t\t}else{printf(\"same\");}\n\t\tprintf(\"\\n\");\n\t}\nreturn 0;\n}"} +{"label": "67", "index": "33175", "code": "int main()\n{\n\tint n,i=0; \n\tfloat x,y,z,t,s;//z?????? t??????s?x?y??\n\tcin>>n;\n\tcin>>z>>t;\n\tx=t/z;\n\tfor(i=1;i>z>>t;\n\t\ty=t/z;\n\t\ts=x-y;\n\t\tif(fabs(s)<=0.05) cout<<\"same\"<0.05) cout<<\"worse\"<=5) printf(\"better\\n\");\n else{\n\t\t\tif(jg[0]-jg[i]>=5) printf(\"worse\\n\");\n\t\t\telse printf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33177", "code": "int main()\n{\n\tint n,sz[100][2],i,j;\n\tfloat a;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(a-(float)sz[i][1]/sz[i][0]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(a-(float)sz[i][1]/sz[i][0]<=0.05&&(float)sz[i][1]/sz[i][0]-a<=0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33178", "code": "int main()\n{\nint n,i;\ndouble a,b,q[1000],w[1000];\nscanf(\"%d\",&n);\nscanf(\"%lf%lf\",&a,&b);\na=b/a;\nfor(i=0;i0.05){printf(\"better\\n\");}\nelse if(a-q[i]>0.05){printf(\"worse\\n\");}\nelse printf(\"same\\n\");}\nreturn 0;\n}"} +{"label": "67", "index": "33179", "code": "\nint main()\n{\tint i,n,a[100],b[100];\n\tfloat c[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a[0],&b[0]);\n\tc[0]=(float)b[0]/(float)a[0];\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(c[0]-c[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33180", "code": "\nint main(int argc, char* argv[])\n{\n\tdouble a[100],b[100];\n\tint i,j,k,n;\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(c[0]-c[i]>5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(c[i]-c[0]<=5&&c[0]-c[i]<=5){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33181", "code": "int main()\n{\n\tint k,i;\n\tfloat x,y,x1,y1;\n\tscanf(\"%d\",&k);\n\tscanf(\"%d%d\",&x1,&y1);\n\tfor(i=0;i0.05)\n\t\tprintf(\"better\\n\");\n\t\tif(y/x-y1/x1<-0.05)\n\t\tprintf(\"worse\\n\");\n\t\tif((y/x-y1/x1<=0.05)&&(y/x-y1/x1>=-0.05))\n\t\tprintf(\"same\\n\");\n\t}\n return 0;\n}"} +{"label": "67", "index": "33182", "code": "int main(){\n int n,i,j;\n double k,m,t;\n double a[100][2];\n scanf(\"%d\",&n);\n for(i=0;i0.05 ) {printf(\"worse\\n\");}\n else if( (a[i][1]/a[i][0]-k)>0.05 ) {printf(\"better\\n\");}\n else {printf(\"same\\n\");}\n }\n return 0;\n}"} +{"label": "67", "index": "33183", "code": "int main()\n{\n\tint i,k;\n\tdouble all[100]={0},good[100]={0};//??????????????????\n\tdouble rate[100]={0};//????????\n\tcin>>k;\n\tcin>>all[0]>>good[0];//???????????\n\trate[0]=good[0]/all[0];//????\n\t//cout<>all[i]>>good[i];//??????\n\t\trate[i]=good[i]/all[i];//??????\n\t\t//cout<0.05)cout<<\"better\"<0.05)cout<<\"worse\"<0.05){\n\t\t\t\tprintf(\"better\");\n\t\t\t}else if((x-y)>0.05){\n\t\t\t\n\t\t\t\tprintf(\"worse\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\");\n\t\t\t}\n\n\t\t}\n\n\t\n\t\t\n\t\n\t\n\t\n\t}\n\n\n\t//scanf(\"%d\",&n);\n\n\n\n\n\n\treturn 0;\n}"} +{"label": "67", "index": "33185", "code": "\nint main()\n{\n\tint n,i;\n\tfloat xg[1000],a,b,x;\n\tscanf(\"%d\",&n);\n\tscanf(\"%f%f\",&a,&b);\n\tx=(b/a)*100;\n for(i=0;i5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if((xg[i]-x)>5)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse{\n printf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33186", "code": "int main(){\n\tint n,m,i,j,bingli[50][2];\n\tdouble ylx;\n\n\tscanf(\"%d\",&n);\n\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(ylx-(double)bingli[j][1]/(double)bingli[j][0]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t \n\tif(j==n-1){\n\t\tif((double)bingli[j][1]/(double)bingli[j][0]-ylx>0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(ylx-(double)bingli[j][1]/(double)bingli[j][0]>0.05){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33187", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tcout<>x1>>y1;\n\tcout<>x>>y;\n\t\tif(y/x>t+0.05)\n\t\t\tcout<<\"better\"<>n;\n\tint i;\n\tdouble a[n][2];\n\tcin>>a[0][0]>>a[0][1];\n\tdouble x,y;\n\tx=a[0][1]/a[0][0];\n\tfor (i=1;i>a[i][0]>>a[i][1];\n\t\ty=a[i][1]/a[i][0];\n\t\tif (y-x>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<c){\n\t\t\tif(z[i]-c>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}else{\n\t\t\tif(c-z[i]>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33190", "code": "double Rate(int tot,int eff)//???????Rate?????????effective?????total?????????????????????double Rate\n{\n double rate;\n rate=(double)eff/(double)tot;//????eff?tot?int??????????????????????eff?tot???int????????????????????\n return(rate);\n}\nint main()\n{\n int n,i,tot,eff;\n double rate,rate0;\n cin>>n;\n cin>>tot>>eff;\n rate0=Rate(tot,eff);\n for(i=1;i>tot>>eff;\n rate=Rate(tot,eff);\n if(rate>rate0+0.05)cout<<\"better\"<1)\n printf(\"better\\n\");\n else\n {if(20*(z-c)>1)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");}\n }\n }\n"} +{"label": "67", "index": "33192", "code": "int main(){\n \tint n,i,a[1000],b[1000];\n\tdouble m,p ;\n scanf(\"%d\", &n);\n\tfor (i = 0; i < n; i++) {\n scanf(\"%d %d\",&a[i],&b[i]);\n\t}\n\t\tm=(double)b[0]/(double)a[0];\n\tfor (i = 1; i < n; i++) {\n\t\tp=(double)b[i]/(double)a[i];\n\t\tif(m-p>0.05){\n\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if(p-m>0.05){\n\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if (m-p<=0.05||p-m<=0.05) {\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33193", "code": "/*\n * ????AIDS.cpp\n * ?????\n * ????: 2011-12-30\n * ????????\n */\nint main(){\n\tint n,i;\n\tint a[1000],b[1000];\n\tfloat c[1000];\n\tcin>>n;\n\tfor(i=0;i>a[i]>>b[i];\n\t\tc[i]=((float)b[i]/a[i]);\n\t\tif(i!=0)\n\t\t{\n\t\t\tif(c[i]-c[0]>0.05){cout<<\"better\"<=q+0.05){\nprintf(\"better\\n\");}\nelse if(w<=q-0.05){\nprintf(\"worse\\n\");}\nelse{\nprintf(\"same\\n\");}\n\n}\nreturn 0;} \n\n"} +{"label": "67", "index": "33195", "code": "int main()\n{\n int n,i,a[200][2];\n double c;\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\\n\");\n else if((double)a[i][1]/a[i][0]-c<-0.05)\n printf(\"worse\\n\");\n else printf(\"same\\n\");\n return 0;\n}\n\n "} +{"label": "67", "index": "33196", "code": "int main()\n{\n\tint n,i,k;\n\tscanf(\"%d\",&n);\n\tdouble *yx=(double*)malloc(sizeof(double)*n);\n\tfor(i=0;i0.05){\n\tprintf(\"better\\n\");}\n\t\telse if(yx[0]-yx[i]>0.05){printf(\"worse\\n\");}\n\t\telse {printf(\"same\\n\");}}\n\tfree(yx);\n\treturn 0;\n\t\n}"} +{"label": "67", "index": "33197", "code": "int main()\n{\n int n,i;\n double a[10000],b[10000],c[10000];\n scanf(\"%d\\n\",&n);\n for(i=0;i=-0.05)) \n\t {\n printf(\"same\\n\");\n }\n if(c[i]-c[0]>0.05)\n\t {\n printf(\"better\\n\");\n }\n if(c[i]-c[0]<-0.05)\n\t {\n printf(\"worse\\n\");\n }\n }\n return 0;\n}\n"} +{"label": "67", "index": "33198", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint all[100],eff[100];\n\tdouble r[100];\n\n\tint k=0;\n\twhile(k5){\n\t\t\tif(i==1){\n\t\t\t\tprintf(\"better\");\n\t\t\t}else{\n\t\t\t\tprintf(\"\\nbetter\");\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\tif(r[0]-r[i]>5){\n\t\t\t\tif(i==1){\n\t\t\t\t\tprintf(\"worse\");\n\t\t\t\t}else{\n\t\t\t\t\tprintf(\"\\nworse\");\n\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(i==1){\n\t\t\t\t\tprintf(\"same\");\n\t\t\t\t}else{\n\t\t\t\t\tprintf(\"\\nsame\");\n\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\treturn 0;\n\n\t\n\n}"} +{"label": "67", "index": "33199", "code": "\nint main()\n{\n\tint n, i;\n\tint a[1000], b[1000];\n\n\tscanf(\"%d\", &n);\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tscanf(\"%d%d\", &a[i], &b[i]);\n\t}\n\tfor(i = 1; i < n; i++)\n\t{\n\t\tif((b[i]*1.0)/a[i] - (b[0]*1.0)/a[0] > 0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if((b[0]*1.0)/a[0] - (b[i]*1.0)/a[i] > 0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse \n\t\t\tprintf(\"same\\n\");\n\t}\n\n\n\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33200", "code": "int main ()\n{\nint n,i;\nfloat a[1000],b[1000],c[1000];\nscanf (\"%d\",&n);\nfor (i=0;i0.05)\n printf (\"worse\\n\");\n if (c[i]-c[0]>0.05)\n printf (\"better\\n\");\n if (fabs (c[i]-c[0])<0.05)\n printf (\"same\\n\");\n}\ngetchar ();\ngetchar ();\n}\n"} +{"label": "67", "index": "33201", "code": "/*\n * ?????.cpp\n *\n * Created on: 2011-12-23\n * Author: ???\n */\n\nvoid check(int sample,int cure,int sample1,int cure1){\n\tif(cure*1.00/sample-cure1*1.00/sample1>0.05){\n\t\tcout<<\"worse\"<0.05){\n\t\tcout<<\"better\"<>n;\n cin>>sample>>cure;\n for(;n>1;n--){\n \tcin>>sample1>>cure1;\n \tcheck(sample,cure,sample1,cure1);\n }\n\treturn 0;\n}\n"} +{"label": "67", "index": "33202", "code": "int main(){\n\tint n,i=0;\n\tdouble x,y,a,b;\n\tscanf(\"%d\",&n);\n\tint bls[100],lxs[100];\n\tfor(i=0;i5){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y>5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33203", "code": "int main (){\nint n,i;\ndouble t;\nint a[100],b[100];\nscanf(\"%d\",&n);\nscanf(\"%d%d\",&a[0],&b[0]);\n\tt=1.0*b[0]/a[0];\n\tfor (i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(t-1.0*b[i]/a[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33204", "code": "\nint main()\n{\n\tdouble sum[10001],eff[10001],sum1,eff1;\n\tdouble per[10001],std;\n\tint n;\n\tint temp;\n\tint i,j;\n\t\t\n\n\t\n\tcin>>n;\n\tcin>>sum1>>eff1;\n\tstd=eff1/sum1;\n\t\tfor(i=1;i<=n-1;i++)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t\t\tcin>>sum[i]>>eff[i];\n\t\t\t\t\tper[i]=eff[i]/sum[i];\n\t\t\t\t\tif(per[i]-std>0.05)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"better\"<0.05)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"worse\"<0.05)\n printf(\"better\\n\"); \n if((x-y)>0.05)\n printf(\"worse\\n\");\n if(fabs(y-x)<=0.05)\n printf(\"same\\n\");\n }\n getchar();\n getchar();\n}\n\n"} +{"label": "67", "index": "33206", "code": "int main()\n{\n\tint n,i;\n\tfloat r,m,a[100],b[100];\n\tcin>>n;\n\tfor(i=0;i<=n-1;i++)\n\tcin>>a[i]>>b[i];\n\tr=b[0]/a[0];\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tm=b[i]/a[i];\n\t\tif(m-r>0.05)\n\t\t\tcout<<\"better\"<=-0.05))\n\t\t\tcout<<\"same\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}if((z-w[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif((z-w[i])<=0.05&&(z-w[i])>=(-0.05)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\n\n \n\t\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33208", "code": "int main()\n{\n int n;\n float j,k,l,m;\n scanf(\"%d\",&n);\n scanf(\"%f %f\",&j,&k);\n l=0.05+k/j;\n m=-0.05+k/j;\n float a[100][2];\n for(int i=0;il)\n {\n printf(\"better\\n\");\n }\n else\n {\n if(a[i][1]/a[i][0]0.05)\n printf(\"better\\n\");\n else if(r-(double)b[i]/a[i]>0.05)\n printf(\"worse\\n\");\n else \n printf(\"same\\n\");\n }\n}\n "} +{"label": "67", "index": "33210", "code": "int main()\n{\n\tdouble n,a,b,c,d,p1,p2;\n\tcin >> n;\n\tcin >> a >> b;\n\tp1=(double)b/(double)a;\n\tfor (int i=2;i<=n;i++)\n\t{\n\t\tcin >> c >> d;\n\t\tp2=(double)d/(double)c;\n\t\tif ((p1-p2)>0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\telse \n\t\t{\n\t\t\tif ((p2-p1)>0.05)\n\t\t\tcout << \"better\" << endl;\n\t\t\tif (((p2-p1)<0.05)&&((p2-p1)>(-0.05))) \n\t\t\t\tcout << \"same\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33211", "code": "\nint main(){\n int n;\n scanf(\"%d\",&n);\n int sz[100][2];\n double a[100];\n double e;\n int i,j;\n for(i=0;ia[0]){\n e=a[i]-a[0];\n if(e>5)\n printf(\"better\\n\");\n else printf(\"same\\n\");\n }\n else if(a[i]5)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n }\n \n return 0;\n}\n \n \n \n"} +{"label": "67", "index": "33212", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tdouble sz[100][2];\n\n\tint i;\n\t\n\tfor( i=0;i>sz[i][0]>>sz[i][1];\n\t\tif(i>=1)\n\t\t{\n\t\t\tif(sz[i][1]/sz[i][0]-sz[0][1]/sz[0][0]>0.05)\n\t\t\t\tcout<<\"better\"<>n;//????\n\tfor(count=0;count>test[count][0]>>test[count][1];\n\n\tfor(count=0;count0.05)//????\n\t\t\tcout<<\"better\"<0.05)//????\n\t\t\t\tcout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\tif(x-y>0.05){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\tif(x-y<=0.05&&y-x<=0.05){\n\t\t\tprintf(\"same\");\n\t\t}\n\t\tif(i=-0.05&&p[i]-p[0]<=0.05)\n printf(\"same\\n\");\n if(p[i]-p[0]>0.05)\n printf(\"better\\n\");\n if(p[i]-p[0]<-0.05)\n printf(\"worse\\n\");\n }\n}\n"} +{"label": "67", "index": "33216", "code": "int main()\n{\n int n, date[100], effe[100], i;\n\tdouble percent[100];\n\tcin >> n;\n\tcin >> date[1] >> effe[1];\n\tpercent[1] = (double) effe[1] / date[1];\n\tfor (i = 2; i <= n; i++)\n\t{\n\t cin >> date[i] >> effe[i];\n\t\tpercent[i] = (double) effe[i] / date[i];\n\t\tif (percent[i] - percent[1] > 0.05)\n\t\t{\n\t\t cout << \"better\" << endl;\n\t\t}\n\t\telse if (percent[1] - percent[i] > 0.05)\n\t\t{\n\t\t cout << \"worse\" << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t cout << \"same\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33217", "code": "int main()//???\n{\n\tint n;\n\tcin >> n;//????n\n\tdouble all0,p0;//?????????????????\n\tdouble x;\n\tcin >> all0 >> p0;\n\tx=100*p0/all0;//????????\n\tfor (int i=1;i<=n-1;i++)//?n-1??????\n\t{\n\t\tdouble all,p;//???????????????\n\t\tcin >> all >> p;\n\t\tdouble y;\n\t\ty=100*p/all;//??????\n\t\tif (y-x>5)\n\t\t{\n\t\t\tcout << \"better\" << endl;\n\t\t}\n\t\telse if (x-y>5)\n\t\t{\n\t\t\tcout << \"worse\" << endl;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tcout << \"same\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33218", "code": "int main()\n{\n\tint n,i,k;\n\tscanf(\"%d\",&n);\n\tint haart[1000][2];\n\tfor(i=0;i<=n-1;i++){\n\t\tfor(k=0;k<=1;k++){\n\t\t\tscanf(\"%d\",&(haart[i][k]));\n\t\t}\n\t}\n\tfloat sta;\n\tsta=(float)haart[0][1]/(float)haart[0][0];\n\tfloat cmp;\n\tfor(i=1;i<=n-1;i++){\n\t\tcmp=(float)haart[i][1]/(float)haart[i][0];\n\t\tif(sta-cmp>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if(cmp-sta>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33219", "code": "int main(){\n\tint n,a[100][2];\n\tint i,j;\n\tdouble y[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse if(y[0]-y[i]>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t\n\treturn 0;\n}\n"} +{"label": "67", "index": "33220", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i;\n\tdouble a[10000],b[10000],x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&a[0],&b[0]);\n\tx=b[0]/a[0];\n\tfor(i=0;i0.05){printf(\"better\\n\");}\n\telse if(x-y>0.05){printf(\"worse\\n\");}\n\telse {printf(\"same\\n\");}\n\n\t\n\t}\n \n\n return 0;\n}"} +{"label": "67", "index": "33221", "code": "int main()\n{\n\tint n;\n\tfloat x,y;\n\tfloat a[10000];\n\tfloat b[10000];\n\tcin >> n;\n\tfor(int i = 1;i <= n;i++)\n\t{\t\n\t\tcin >> a[i] >> b[i];\n\t}\n\tx = b[1] / a[1];\n\tfor(int j = 2;j <= n;j++)\n\t{\t\n\t\ty = b[j] / a[j];\n\t if((x - y) > 0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\tif((y - x) > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t if(fabs(y - x) <= 0.05)\n\t\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33222", "code": "int main()\n{\n int n,i,j;\n cin>>n;\n double c[n];\n double a[n][2];\n for(i=0;i>a[i][j];\n c[i]=a[i][1]/a[i][0];}\n for(i=1;i0.05) cout<<\"better\"<0.05) cout<<\"worse\"<5){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif((x-y[i])>5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(((y[i]-x)<=5)&&((x-y[i])<=5)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33224", "code": "int main(){\nint a[10000][2];\nint n;\nint i;\nint col;\ndouble b[10000];\ndouble x=0;\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\nprintf(\"better\\n\");}\nelse if(-x>0.05){\nprintf(\"worse\\n\");}\nelse if(x<0.05||-x<0.05){\nprintf(\"same\\n\");\n }\n}\nreturn 0;\n}"} +{"label": "67", "index": "33225", "code": "int main()\n{\nint n,a[10000],b[10000],i;\ndouble c[10000],m;\nscanf(\"%d\",&n);\nfor(i=0;i0.05) printf(\"better\\n\");\nif(m+0.05<0) printf(\"worse\\n\");\nif(m<=0.05&&m+0.05>=0) printf(\"same\\n\");\n}\nreturn 0;\n}"} +{"label": "67", "index": "33226", "code": "int main()\n{\n\tint n,i,a,b;\n\tdouble z[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\");\n\t\t\tif(i!=n-1)\n\t\t\t{\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tif(z[0]-z[i]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\");\n\tif(i!=n-1)\n\t\t\t{\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}\n\t\t} \n\t\tif(z[i]-z[0]<0.05&&z[0]-z[i]<0.05)\n\t\t{\n\t\t\tprintf(\"same\");\n\tif(i!=n-1)\n\t\t\t{\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33227", "code": "/*\n *2.cpp\n *??: 2010-12-19\n *??:??\n *????????\n */\nvoid f(float a,float b){\n\tif(b-a>0.05)\n\t\tcout<<\"better\"<0.05)\n\t\tcout<<\"worse\"<>n;\n\tcin>>x>>y;\n\twhile(n-1>0){\n\t\tfloat a,b;\n\t\tcin>>a>>b;\n\t\tf(y/x,b/a);\n\t\tn--;\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33228", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a[200],b[200];\n\tfor(int i=0;i5)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((x-y)>5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33229", "code": "int main()\n{\n\tint n,a,b,c,d,i;\n\tdouble x,y,z;\n\tcin >> n;\n\tcin >> a >> b;\n\tx = (double)b / (double)a;\n\tfor (i =1 ; i <= (n - 1) ; i++)\n\t{\n\t\tcin >> c >> d;\n\t\ty = (double)d / (double)c;\n\t\tz = y - x;\n\t\tif (fabs(z) <= 0.05)\n\t\t\tcout << \"same\" << endl;\n\t\telse\n\t\t{\n\t\t\tif (z > 0)\n\t\t\t\tcout << \"better\" << endl;\n\t\t\telse\n\t\t\t\tcout << \"worse\" << endl;\n\t\t}\n\t}\n\tcin.get();\n cin.get(); //????\n\treturn 0;\n}\n"} +{"label": "67", "index": "33230", "code": "int main(){\n\tint n,i;\n\tdouble sz1[100],sz2[100],y[100],t;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((t-y[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33231", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a[100][2],t;\n\tdouble b[100];\n\tcin>>n;\n\tt=5.0/100.0;\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tfor(j=0;j<=1;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t\tb[i]=a[i][1]/a[i][0];\n\t}\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tif((b[i]-b[0])>t)\n\t\t{\n\t\t\tcout<<\"better\"<<'\\n';\n\t\t}\n\t\telse if(b[0]-b[i]>t)\n\t\t{\n\t\t\tcout<<\"worse\"<<'\\n';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout<<\"same\"<<'\\n';\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33232", "code": "int main()\n{\n int a[1000][2],i,n;\n scanf(\"%d\",&n);\n for(i=0;i5){printf(\"better\\n\");}\n else if(c-b>5){printf(\"worse\\n\");}\n else{printf(\"same\\n\");}\n }\n return 0;\n}"} +{"label": "67", "index": "33233", "code": "\nint main()\n{\n\tint i,k,m;\n\tfloat s[100][3];\n scanf(\"%d\",&m);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(((s[0][2])-(s[i][2]))>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if((((s[0][2])-(s[i][2]))<=0.05)&&(((s[0][2])-(s[i][2]))>=-0.05))\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\n\n\nreturn 0;\n}"} +{"label": "67", "index": "33234", "code": "\n\nint main(){\n\tint n;\n\tdouble e,all;\n\tint i;\n\tdouble xiaoguo;\n\tcin>>n;\n\tdouble E[n+2];\n\tfor(i=1;i<=n;i++){\n\t\tcin>>all>>e;\n\t\txiaoguo=e/all;\n\t\tE[i]=xiaoguo;\n\t}\n\tfor(i=2;i<=n;i++){\n\t\tif((E[i]-E[1])>0.05){\n\t\t\tcout<<\"better\"<50){printf(\"worse\");}\n else if(g>50){printf(\"better\");}\n else{printf(\"same\");}\n printf(\"\\n\");\n }\n return 0;\n}"} +{"label": "67", "index": "33236", "code": "int main(){\n\t\n\tint n,x,y;\n\tdouble rule,m;\n\tscanf(\"%d\",&n);\n\tint *a\n\t\t=(int*)malloc(sizeof(int)*n);\n int *b\n\t\t=(int*)malloc(sizeof(int)*n);\n\tint i;\n\tscanf(\"%d %d\",&x,&y);\n\trule=1.0*y/x;\n\tfor(i=0;irule+0.05){printf(\"better\\n\");}\n\t\telse if(m0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}else\n\t\t{\n\t\t\tif(c[i]<(-0.05))\n\t\t\t{\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else\n\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33238", "code": "\nint main()\n{\nint n;\nfloat c;\ncin>>n;\nfloat x,y;\ncin>>x>>y;\nfloat z=y/x;\nfloat a,b;\nint i;\nfor (i=1;i>a>>b;\n\tc=b/a;\n\tif (c-z>0.05)\n\t\tcout<<\"better\"<0.05)\n\t\tcout<<\"worse\"<=z-0.05&&c<=z+0.05)\n\t\tcout<<\"same\"<>num;\n\tfloat a[1000];\n\tfloat b[1000],c[1000];\n\tfor(int i=0;i>a[i]>>b[i];\n\t\tc[i]=b[i]/a[i];\n\t}\n\tfor(int j=1;j0.05)\n\t\t{cout<<\"better\"<0.05)\n\t\t\t{cout<<\"worse\"<0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x[0]-x[i]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33241", "code": "int main()\n{\n\tint i,k,n;\n\tfloat xin[20],shuzu[20][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\t\t\tprintf(\"better\\n\");\n\t\t\t\telse if(xin[0]-xin[i]>0.05)\n\t\t\t\t\tprintf(\"worse\\n\");\n\t\t\t\telse \n\t\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\tif(xin[n-1]-xin[0]>0.05)\n\t\t\tprintf(\"berrer\");\n\t\telse if(xin[0]-xin[n-1]>0.05)\n\t\t\tprintf(\"worse\");\n\t\telse printf(\"same\");\n\nreturn 0;\n}\n"} +{"label": "67", "index": "33242", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble jsum,jyx;\n\tscanf(\"%lf %lf\",&jsum,&jyx);\n\tdouble x=jyx/jsum;\n\tint i;\n\tdouble sum[100],yx[100];\n\tdouble y[100];\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((x-y[i])>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33243", "code": "\nint main()\n{ int n,i,x,y;\n float std,t;\n \n cin>>n;\n cin>>x>>y;\n std=1.0*y/x;\n for(i=1;i>x>>y;\n t=1.0*y/x-std;\n if(t>0.05) cout<<\"better\";\n else if(t<-0.05) cout<<\"worse\";\n else cout<<\"same\";\n cout<=b){\n\t\t\t\t double c=a-b;\n\t\t\t\t if(c>0.05){\n\t\t\t\t\t printf(\"worse\\n\");\n\t\t\t\t }else{\n\t\t\t\t\t printf(\"same\\n\");\n\t\t\t\t }\n\t\t\t }else{\n\t\t\t\t double c=b-a;\n\t\t\t\t if(c>0.05){\n\t\t\t\t\t printf(\"better\\n\");\n\t\t\t\t }else{\n\t\t\t\t\t printf(\"same\\n\");\n\t\t\t\t }\n\t\t\t }\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33245", "code": "int main()\n{\n int n,i,j;\n double a[10000][2],b[10000];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\\n\");\n else if((b[i]-b[0])<-0.05)\n printf(\"worse\\n\");\n else \n printf(\"same\\n\");\n }\n getchar(); \n getchar(); \n return 0;\n}\n"} +{"label": "67", "index": "33246", "code": "int main()\n{\nint n,z[100],h[100],i;\nfloat u,t;\nscanf(\"%d\",&n);\nfor(i=1;i<=n;i++){\nscanf(\"%d %d\",&z[i],&h[i]);\n}\nt=1.0*h[1]/z[1];\nfor(i=2;i<=n;i++){\n u=1.0*h[i]/z[i]-t;\n if(u>0.05){printf(\"better\\n\");}else\nif(u<-0.05){printf(\"worse\\n\");}else{printf(\"same\\n\");}\n \n\n}\nreturn 0;\n}"} +{"label": "67", "index": "33247", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\\n\",&n);\n\tdouble a,b,c,m;\n\tscanf(\"%lf%lf\",&a,&b);\n\tc=b/a;\n\tstruct d{\n\t\tdouble e;\n\t\tdouble f;\n\t\tdouble g;\n\t}d[100];\n\tfor(int i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(m<(-0.05))\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(m<=0.05&&m>=-0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33248", "code": "int main()\n{\nint n,s[1000],z[1000],i,j;\ndouble a[1000];\nscanf(\"%d\",&n);\nfor(i=0;i10)\nprintf(\"better\\n\");\n else if (a[j]-a[0]+5<0){\nprintf(\"worse\\n\");\n}\nelse \nprintf(\"same\\n\");\n}\nreturn 0;\n}\n\n\n\n"} +{"label": "67", "index": "33249", "code": "int main()\n{\n int x,y,n,z;\n\tdouble i,j,a;\n\tscanf(\"%d\",&n);\n\t\tscanf(\"%d %d\",&x,&y);\n\t\ti=(1.0*y)/x;\n\t\tfor(z=2;z<=n;z++){\n\t\t\tscanf(\"%d %d\",&x,&y);\n\t\t\tj=(1.0*y)/x;\n\t\t\ta=j-i;\n\t\t\t\tif(a>0.05){\n\t\t\t\t\tprintf(\"better\\n\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(a<-0.05){\n\t\t\t\t\t\tprintf(\"worse\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tprintf(\"same\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\treturn 0;\n} "} +{"label": "67", "index": "33250", "code": "/*\n * ?????.cpp\n *\n * Created on: 2012-10-23\n * Author: ???\n *\n */\nint main ()\n{\n\tdouble a,b;\n\tdouble rate1,rate2;\n\tint n;\n\tcin>>n;\n\tcin>>a>>b;\n\trate1=b/a;\n\tfor (int i=0;i>c>>d;\n\t rate2=d/c;\n\t if (rate1-rate2<=0.05 && rate2-rate1<=0.05)\n\t \t cout<<\"same\"<0.05)\n\t \t cout<<\"worse\"<>n;\n\tdouble a,b,x;\n\tcin>>a>>b;\n\tx=b/a;\n\twhile(n>1)\n\t{\n\t\tcin>>a>>b;\n\t\tif(b/a-x>0.05)\n\t\t{\n\t\t\tcout<<\"better\"<=-0.05&&b/a-x<=0.05)\n\t\t{\n\t\t\tcout<<\"same\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(yd[i]<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33253", "code": "int main()\n{int n,i,j;\nint a[100][2];\nscanf(\"%d\",&n);\nfor(i=1;i<=n;i++)\n{ for(j=1;j<=2;j++)\n{ scanf(\"%d\",&a[i][j]);}}\ndouble x=1.0*a[1][2]/a[1][1];\nfor(i=2;i<=n;i++)\n{ double cz=1.0*a[i][2]/a[i][1]-x;\n if(cz>0.05)\n\t {printf(\"better\\n\");}\n else if(cz<-0.05)\n\t {printf(\"worse\\n\");}\n else\n\t {printf(\"same\\n\");}}\nreturn 0;}"} +{"label": "67", "index": "33254", "code": "\nint main(){\n\tint n;\n\tdouble sy[100][2];\n\tscanf(\"%d\",&n);\n\tdouble *sz=(double*)malloc(sizeof(double)*n);\n\tfor(int i=0;i-0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}else if((sz[0]-sz[k])>=0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if((sz[k]-sz[0])>=0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33255", "code": "\nint main() \n{\n int n;\n scanf(\"%d\",&n);\n int a[N][2];\n int i,j;\n for(i=0;i0.05+jwj)\n {\n printf(\"better\\n\"); \n }\n\n else if(b[k]+0.051){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n"} +{"label": "67", "index": "33257", "code": "int main(){\n\tint n,i,x,y;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&x,&y);\n\tdouble z=y*1.0/x;\n\tdouble sz[100];\n\tint zong[100];\n\tint xiao[100];\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(z-sz[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\tif(sz[i]-z>0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse if(z-sz[i]>0.05){\n\t\t\tprintf(\"worse\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33258", "code": "\nint main()\n{\n\tint n;\n\tscanf(\"%d\" , &n);\n\tfloat sz[100][2];\n\tfloat q[100];\n\n\tint i,k;\n\n\tfor(i=0;i0.05f)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(q[i]-q[0]>0.05f)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif((q[0]-q[i]<=0.05f)&&(q[i]-q[0]<=0.05f))\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33259", "code": "int main()\n{\n int n,all[100],work[100];\n double c[100],m;\n int i=0;\n char x;\n scanf(\"%d\",&n);\n for (i=0;i0.05) {\n\t printf(\"better\\n\");\n }\n if (m<-0.05) {\n\t printf(\"worse\\n\");\n }\n if (m<=0.05&&m>=-0.05){\n\t printf(\"same\\n\");\n }\n }\n \n return 0;\n}"} +{"label": "67", "index": "33260", "code": "//#define main xmain\n\n\nint main()\n{\n int i, n;\n double a, b, c;\n \n scanf(\"%d\", &n);\n scanf(\"%lf%lf\", &a, &b);\n c = b/a;\n\n for (i=1; i 0.05) {\n printf(\"better\\n\");\n }\n else if (c - b/a > 0.05) {\n printf(\"worse\\n\");\n }\n else {\n printf(\"same\\n\");\n }\n }\n return 0;\n}\n\n\nchar mn[][200] = {\n \"5\\n\"\n \"125 99\\n\"\n \"112 89\\n\"\n \"145 99\\n\"\n \"99 97\\n\"\n \"123 98\",\n \n \"7\\n\"\n \"100 20\\n\"\n \"100 24\\n\"\n \"100 16\\n\"\n \"100 23\\n\"\n \"100 19\\n\"\n \"100 28\\n\"\n \"100 10\",\n\n \"13\\n\"\n \"97 15\\n\"\n \"97 20\\n\"\n \"97 18\\n\"\n \"97 26\\n\"\n \"97 7\\n\"\n \"97 18\\n\"\n \"97 29\\n\"\n \"97 14\\n\"\n \"97 3\\n\"\n \"97 12\\n\"\n \"97 1\\n\"\n \"97 9\\n\"\n \"100 15\",\n};\n\nint xn = 0;\n\nint max_files = sizeof(mn) / sizeof(mn[0]);\n\nchar * output_dir = \"data\";\n\nvoid xbuild()\n{\n printf(mn[xn]);\n xn++;\n}\n"} +{"label": "67", "index": "33261", "code": "int main(){\n\n\nint i,j,n;\n\tdouble a,sv[1000][2];\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0&&(a-sv[i][1]/sv[i][0])>0.05){\n\t\t\t\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\n\t\t}\n\t\telse if((a-sv[i][1]/sv[i][0])<0&&sv[i][1]/sv[i][0]-a>0.05){\n\t\t\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\t\t\n\n\n\t\n\n\n\n\n\n\n\n"} +{"label": "67", "index": "33262", "code": "int main()\n{\n\tint n,i;\n\tdouble a,zs,yx;\n\tdouble yxl;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&zs,&yx);\n\ta=(yx/zs)*100;\n\tfor(i=0;i=a)\n\t\t{\n\t\t\tif((yxl-a)>5)\n\t\t\t{\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\t\tif((a-yxl)>5)\n\t\t\t{\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33263", "code": "int main()\n{\n int a,b,n,i;\n double x,y;\n scanf(\"%d\",&n);\n scanf(\"%d%d\",&a,&b);\n x=(double)b/a;\n for(i=1;i0.05)\n {\n printf(\"better\");\n printf(\"\\n\");\n }\n else if(x-y>0.05)\n {\n printf(\"worse\");\n printf(\"\\n\");\n }\n else\n {\n printf(\"same\");\n printf(\"\\n\");\n }\n }\n return 0;\n}\n\n"} +{"label": "67", "index": "33264", "code": "int main()\n{\n\tint a[200][3],n,i;\n\tfloat b[200];\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i][1]>>a[i][2];\n\t\tb[i]=(float)a[i][2]/a[i][1];\n\t}\n\t for(i=2;i<=n;i++)\n\t { if(b[i]-b[1]>0.05)\n\t\t cout<<\"better\";\n\t \n\t\t\t \n\t\t else if(b[1]-b[i]>0.05)\n\t\t\t cout<<\"worse\";\n\t\t else \n\t\t\t cout<<\"same\";\n\t\t cout<>n;\n\tdouble a[n],b[n];\n\tfor(int i=0;i>a[i]>>b[i];\n\t a[i]=b[i]/a[i];\n\t if(i!=0)\n\t {\n\t \tif(a[i]-a[0]>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<(y[0]/z[0]+0.05)){printf(\"better\");}\n\t\telse if(y[x]/z[x]<(y[0]/z[0]-0.05)){printf(\"worse\");}\n\t\telse{printf(\"same\");}\n\t\tprintf(\"\\n\");}\n\t\t\n\treturn 0;\n}"} +{"label": "67", "index": "33267", "code": "int main()\n{\nint n,i;\ndouble tm,tmt,c,a[100];\nscanf(\"%d\",&n);\nfor(i=0;i0.05){printf(\"better\\n\");}\nif(c<-0.05){printf(\"worse\\n\");}\nif(c>=-0.05&&c<=0.05){printf(\"same\\n\");}\n}\nreturn 0;\n}"} +{"label": "67", "index": "33268", "code": "int main()\n{\n\tint n,i,x[1000],y[1000];\n\tdouble a,b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if(b-a>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "67", "index": "33269", "code": "int main(){\nint n,zong,you,i;\ndouble x,y;\nx=0.0,y=0.0;\nscanf(\"%d\",&n);\nscanf(\"%d %d\",&zong,&you);\nx=1.0*you/zong;\nfor(i=0;i5){printf(\"better\\n\");}\nelse if((x-y)*100>5){printf(\"worse\\n\");}\nelse {printf(\"same\\n\");}\n}\nreturn 0;\n}"} +{"label": "67", "index": "33270", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i;\n\tint p[100],pcu[100];\n\tdouble per[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5) printf(\"better\\n\");\n\t\telse if(per[0]-per[i]>5) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\t\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33271", "code": "int main(){\n\tint n,a,b,c,d;\n\tdouble biao,linshi;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a,&b);\n\tbiao=(double)b/(double)a;\n\tfor(int i=0;i=0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\t else if(linshi-biao>=0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse {\n\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33272", "code": "int main()\n{\n\tdouble s[100][2];\n\tint i,j,n;\n\tdouble a,k,b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");}\n\t\telse if((a-k)>0.05){\n\t\t\tprintf(\"worse\\n\");}\n\t\telse {\n\t\t\tprintf(\"same\\n\");\n\t}}\n\tb=s[n-1][1]/s[n-1][0];\n if((b-a)>0.05){\n\t\t\tprintf(\"better\");}\n\t\telse if((a-b)>0.05){\n\t\t\tprintf(\"worse\");}\n\t\telse {\n\t\t\tprintf(\"same\");}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33273", "code": "int main()\n{\n\tint n,i,a[10000],b[10000];\n\tdouble s,m,q,c[10000];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a[0],&b[0]);\n\ts=b[0]*1.0/a[0];\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(q>0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(m<=0.05&&q<=0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33274", "code": "// homework : ?????\n// name : ???\n// date : 9.29\n\n\nint main()\n{\n\tdouble n, a[3], b[3];\n\tcin >> n >> a[0] >> a[1];\n\ta[2] = a[1] / a[0];\n\tfor( int i = 1; i < n; i++)\n\t{\n\t\tcin >> b[0] >> b[1];\n\t\tb[2] = b[1] / b[0];\n\t\tif( b[2] - a[2] > 0.05 ) \n\t\t\tcout << \"better\" << endl;\n\t\tif( a[2] - b[2] > 0.05 )\n\t\t\tcout << \"worse\" << endl;\n\t\tif( abs(a[2] - b[2]) <= 0.05 )\n\t\t\tcout << \"same\" << endl;\n\t}\n\n\n\treturn 0;\n}"} +{"label": "67", "index": "33275", "code": "int main()\n{\n int n,i,j;\n float all[1000],some[1000];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n {\n printf(\"better\\n\");\n }\n else\n {\n if(((some[0]/all[0])-(some[j]/all[j]))>0.05)\n {\n printf(\"worse\\n\");\n }\n else\n {\n printf(\"same\\n\");\n }\n }\n }\n return 0;\n} \n"} +{"label": "67", "index": "33276", "code": "int main()\n{\n double n,x,y;\n double a,b;\n double m,p,q,h;\n scanf(\"%lf\",&n);\n scanf(\"%lf %lf\",&x,&y);\n m=y/x;\n int i=2;\n while(i<=n){\n scanf(\"%lf %lf\",&a,&b);\n p=b/a;\n q=m-p;\n h=p-m;\n if(h>0.05){\n printf(\"better\\n\");\n }else if(q>0.05){\n printf(\"worse\\n\");\n }else{\n printf(\"same\\n\");\n }\n i++;\n }\n return 0;\n}\n "} +{"label": "67", "index": "33277", "code": "int main(){\nint n,i;\nscanf(\"%d\",&n);\ndouble m,p,c,q; \nfor(i=0;i0.05){\n\tprintf(\"better\\n\");\n\t}\n\telse if(c-q>0.05){\n\tprintf(\"worse\\n\");\n\t}\n\telse{\n\tprintf(\"same\\n\");\n\t}\n\t}\n\t}\nreturn 0;\n}"} +{"label": "67", "index": "33278", "code": "int main()\n{\n\tint n,k;\n\tdouble groups[1000][3];\n\tcin>>n;\n\tfor(k=0;k>groups[k][0]>>groups[k][1];\n\t}\n\tfor(k=0;k0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<5.0){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y[i]>5.0){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33280", "code": "int main(){\n\tint n,a,b,i;\n\tdouble q,e;\n\tscanf(\"%d\\n\",&n);\n scanf(\"%d %d\\n\",&a,&b);\n\tq=(double)b/(double)a;\n\tfor(i=2;i<=n;i++){\n\t\tscanf(\"%d %d\\n\",&a,&b);\n e=(double)b/(double)a;\n if(e-q>0.05) printf(\"better\\n\");\n\tif(q-e>0.05) printf(\"worse\\n\");\n\tif((e-q)*(e-q)<=0.0025) printf(\"same\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33281", "code": "int main()\n{\n\tint n,i,j,k,b[100],c[100];\n\tdouble m,a[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(a[0]-a[i]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33282", "code": "int main()\n{\n\tint n,x0,y0,x,y;\n\tdouble k;\n\tcin>>n;\n\tcin>>x0>>y0;\n\tk=(double)y0/x0;\n\tfor(n;n>=2;n--)\n\t{\n\t\tcin>>x>>y;\n\t\tif((double)y/x>k+0.05)\n\t\t\tcout<<\"better\"<5)printf(\"better\\n\");\n\t\telse if(op[i]-cp<-5)printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33284", "code": "\nint main()\n{\n\tint i,b,n,d,t=0;\n\tdouble a;\n\tint z[100],x[100];\n\tscanf(\"%d\",&n);\n\n\t\n\tscanf(\"%d %d\",&d,&b);\n\ta=1.0*b/d;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(a-(1.0*x[i]/z[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse \n\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n\n}"} +{"label": "67", "index": "33285", "code": "int main(){\n\tint n,a,b,c,d,i;\n\tfloat x,y,sz[1000];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tx=(float)b/a;\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-sz[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}return 0;\n}\n\n\n\t\n\n"} +{"label": "67", "index": "33286", "code": "int main(){\n\tdouble n,x,y;\n\tdouble a[100],b[100];\n\tdouble e,c;\n\tdouble xl[100];\n\tscanf(\"%lf%lf%lf\",&n,&x,&y);\n\te=y/x;\n\tfor(int i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(c<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(-0.05<=c&&c<=0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\n\t\n\treturn 0;\n}"} +{"label": "67", "index": "33287", "code": "//?? 2011 11.5\n//?? ???\n//?? ???????\n\nint main()\n{\n\tint n;\n\tint i;\n\tdouble standard;\n\tdouble result;\n\tfloat a[100][2];\n\tcin>>n;\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tcin>>a[i][0]>>a[i][1];\n\t}\n\tstandard=a[0][1]/a[0][0];\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tresult=a[i][1]/a[i][0];\n\t\tif((result-standard)>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\t cout<<\"worse\"<=0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(s[i]-s[0]<=-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(s[i]-s[0]<0.05&&s[i]-s[0]>-0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33289", "code": "int main(){\n int n;\n int sz[100];\n int sa[100];\n double sd[100];\n scanf(\"%d\", &n);\n for(int i=0;i0.05){printf(\"better\\n\");}\n else if((sd[0]-sd[i])>0.05){printf(\"worse\\n\");}\n else{printf(\"same\\n\");}\n }\n return 0;\n}"} +{"label": "67", "index": "33290", "code": "int main(){\nint n, i;\nscanf (\"%d\", &n);\nfloat a[n], e[n];\nfor(i=1;i<=n;i++){\nscanf (\"%f %f\", &a[i], &e[i]);\nif (i>1){\nif (e[i]/a[i]>0.05+e[1]/a[1]){\nprintf (\"better\");\nprintf (\"\\n\");}\nelse if (e[i]/a[i]0.05)\n printf(\"better\\n\");\n else if(c[0]-c[i]>0.05)\n printf(\"worse\\n\");\n else \n printf(\"same\\n\");\n } \n \n \n \n \n}"} +{"label": "67", "index": "33292", "code": "\n\nint main()\n{\n int n; //??n\n cin>>n; //??n\n float total[100],effective[100]; //?????????????\n int i; //??????i\n for(i=0;i>total[i]>>effective[i]; //???????\n }\n float x,y[100]; //????????????????\n x=effective[0]/total[0]; //????????\n for(i=1;i0.05)\n cout<<\"better\"<0.05)\n cout<<\"worse\"<0.05)\n\t\t{\n\t\t\t printf(\"better\\n\");\n\t\t}\n\t\telse if(c[i]<-0.05)\n\t\t{\n printf(\"worse\\n\");\n\t\t}\n\t\telse if(c[i]<=0.05&&c[i]>=-0.05)\n\t\t{\n\t printf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n\t}"} +{"label": "67", "index": "33294", "code": "int main(){\n\tint n,sj[1000][2],i;\n\tfloat c[1000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic[0]&&c[i]-c[0]>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(c[0]>c[i]&&c[0]-c[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n return 0;\n}\n\n"} +{"label": "67", "index": "33295", "code": "int main(){\n\tint n;\n\tint jwjzsh,jwjyx;\n\tint zsh[100],yx[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&jwjzsh,&jwjyx);\n\tdouble rate0;\n\trate0=1.0*jwjyx/jwjzsh;\n\tdouble rate[100];\n\tint i;\n\tfor(i=1;i=0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(ch>=-0.05&&ch<=0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\telse if(ch<=-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33296", "code": "//*****************************************\n//* ???????? **\n//* ?????? 1300012741 **\n//* ???2013.9.25 **\n//*****************************************\n\n\nint main()\n{\n int i, num; // ???????????\n double origin, better, origin_temp, better_temp; // ??????????????????????\n cin >> num; // ??????\n cin >> origin >> better; // ?????????\n\n for ( i = 1; i < num; i++ ) // ??????-1?\n {\n cin >> origin_temp >> better_temp; // ????????\n if ( better / origin - better_temp / origin_temp > 0.05 ) // ????\n cout << \"worse\" << endl;\n else if ( better_temp / origin_temp - better / origin > 0.05 ) //????\n cout << \"better\" << endl;\n else // ?????\n cout << \"same\" << endl;\n }\n\n return 0;\n}\n"} +{"label": "67", "index": "33297", "code": "\nint main()\n{\n\tint n;\n\tcin>>n;\n\tdouble sum;\n\tdouble efficient;\n\tdouble sample;\n\tint i=0;\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tcin>>sum>>efficient;\n\t\tif (i==1)\n\t\t\tsample=efficient/sum;\n\t\telse if((efficient/sum)-sample>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<0.05) printf(\"worse\\n\");\n else if(b/a-y/x<-0.05) printf(\"better\\n\");\n else printf(\"same\\n\");\n }\n return 0; \n}\n"} +{"label": "67", "index": "33299", "code": "int main(){\n\tint n,i;\n\tdouble m;\n\tint a[1000],b[1000];\n\tdouble xl[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if(m<(-5)){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(m<=5&&m>=(-5)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33300", "code": "int main()\n{\n\tint i,num,n[100],m[100];\n\tfloat w[100];\n\tscanf(\"%d\",&num);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(w[0]-w[i]>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(w[0]-w[i]<=0.05 && w[i]-w[0]<=0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33301", "code": "int main()\n{int n,i;\ncin>>n;\nfloat a[n],b[n],c;\ncin>>a[0]>>b[0];\nc=b[0]/a[0];\nfor(i=1;i>a[i]>>b[i];\nif(b[i]/a[i]<=c+0.05&&b[i]/a[i]>=c-0.05)\ncout<<\"same\"<c+0.05)\ncout<<\"better\"<0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\tif(b-a>0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33303", "code": "int main()\n{\n\tint n,i;\n\tfloat a[100],b[100],c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(c[0]-c[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33304", "code": "int main(){\n\tint n,a,b,k,i;\n\tdouble s;\n\tscanf(\"%d%d%d\",&n,&a,&b);\n\ts=1.0*b/a;\n\tk=n-1;\n\tint *m=(int*)malloc(sizeof(int)*k);\n\tint *p=(int*)malloc(sizeof(int)*k);\n\tdouble *l=(double*)malloc(sizeof(double)*k);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(l[i]<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\tfree(m);\n\tfree(l);\n\tfree(p);\n\treturn 0;\n}"} +{"label": "67", "index": "33305", "code": "int main()\n{int n,i=0;\ncin>>n;\nfloat a[n],b[n];\nfor(i=0;i<=n-1;i++)\n{cin>>a[i]>>b[i];}\nfloat c;\nc=b[0]/a[0];\nfor(i=1;i<=n-1;i++)\n{if(b[i]/a[i]-c>0.05)\n cout<<\"better\"<0.05)\n cout<<\"worse\"<>n;\nfor(i=0;i<=n-1;i++){\n\tcin>>total[i];\n\tcin>>good[i];\n\tpre[i]=good[i]/total[i];\n}\nfor(i=1;i<=n-1\n\t;i++){\n\tif(pre[i]-pre[0]>=0.0500000){\n\t\tcout<<\"better\"<0.0500000) {\n\t\tcout<<\"worse\"<=0)||(pre[0]-pre[i]<=0.05000000&&pre[0]-pre[i]>=0)){\n\t\tcout<<\"same\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\tif((1.0*b[0]/a[0])-(1.0*b[i]/a[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t\tcontinue;\n\t\t}\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33308", "code": "int main()\n{\n\tint n,i,j;\n\tint zongshu[1000],youxiao[1000];\n\tdouble x,y[1000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if(y[i]-x>0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33309", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint m,l;\n\tscanf(\"%d %d\",&m,&l);\n\tfloat eff=(float)l/(float)m;\n\tfor(int i=1;i0.05)\n\t\t printf(\"better\\n\");\n\t\telse\n\t\t if(exp-eff<-0.05)\n\t\t printf(\"worse\\n\");\n\t\telse\n\t\t printf(\"same\\n\");\n\t\t}\n}"} +{"label": "67", "index": "33310", "code": "int main(){\nint n;\nscanf(\"%d\",&n);\nint jtl,jyx,qtl,qyx;\ndouble rate1,rate2 ;\nscanf(\"%d%d\",&jtl,&jyx);\nrate1=jyx*1.0/jtl;\nfor(int i=1;i0.05)\nprintf(\"better\\n\");\nelse if(rate1-rate2>0.05)\nprintf(\"worse\\n\");\nelse\nprintf(\"same\\n\");\n}\nreturn 0;\n}"} +{"label": "67", "index": "33311", "code": "int main()\n{ int k,b,n,i;\n double a,m,x,y;\n cin>>k;\n cin>>a>>b;\n x=b/a;\n for (i=1;i<=(k-1);i++) \n {\n cin>>m>>n;\n y=n/m;\n if (y-x>0.05)\n\t cout<<\"better\"<0.05) \n\t cout<<\"worse\"<b+0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(1.0*s[i][1]/s[i][0]=b-0.05&&1.0*s[i][1]/s[i][0]<=b+0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t\t\t\n\t\treturn 0;\n\n}\n"} +{"label": "67", "index": "33313", "code": "int main()\n{\n\tint n,i;\n\tcin>>n;\n\tdouble a[n],b[n];\n\tdouble y[n-1],x;\n\tfor(i=0;i<=n-1;i++)\n\t\tcin>>a[i]>>b[i];\n\tx=b[0]/a[0];\n\tfor (i=1;i<=n-1;i++)\n\t\t{y[i-1]=b[i]/a[i];}\n\tfor (i=0;i<=n-2;i++)\n\t {if((y[i]-x)>0.05) cout<<\"better\"<0.05) cout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(x-y>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(x-0.05<=y&&y<=x+0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n return 0;\n}"} +{"label": "67", "index": "33315", "code": "int main(){\n int n,i,a,b;\n cin>>n;\n int cc[n+1];\n double bb[n+1];\n for(i=1;i<=n;i++){\n cin>>a>>b;\n bb[i]=(double)b/(double)a; \n }\n for(i=2;i<=n;i++){\n if(bb[i]-bb[1]>0.05)\n cc[i]=2;\n if(bb[i]-bb[1]<-0.05)\n cc[i]=0;\n if(bb[i]-bb[1]<=0.05&&bb[i]-bb[1]>=-0.05)\n cc[i]=1;\n }\n for(i=2;i<=n;i++){\n if(cc[i]==0)\n cout<<\"worse\"<0.05)\n\n printf(\"worse\\n\");\n else if(bi2[i]/bi1[i]-chu2/chu1>0.05)\n printf(\"better\\n\");\n else \n printf(\"same\\n\");\n}\nreturn 0;\n}\n"} +{"label": "67", "index": "33317", "code": "int main()\n{\n\tint n=0,i=0;\n\tdouble a[100],b[100];\n\tdouble c[100];\n\tmemset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tmemset(c,0,sizeof(c));\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i]>>b[i];\n\t\tc[i]=b[i]/a[i];\n\t}\n\tfor(i=2;i<=n;i++)\n\t{\n\t\tif(c[i]-c[1]>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<0.05){\n\t\t printf(\"worse\\n\");\n\t\t }\n\t\t else if(x-xo>0.05){\n\t\t printf(\"better\\n\");\n\t\t }\n\t\t else if(x-xo<=0.05&&xo-x<=0.05){\n\t\t printf(\"same\\n\");\n\t\t }\n\t\t}\n\t\treturn 0;\n}\n"} +{"label": "67", "index": "33319", "code": "main()\n{\n int n,p,q,a,b;\n float r,s;\n scanf(\"%d %d %d\",&n,&p,&q);\n r=(float)q/(float)p;\n for(int i=1;i<=n-1;i++)\n {\n scanf(\"%d %d\",&a,&b);\n s=(float)b/(float)a;\n if(r>s+0.05)\n printf(\"worse\\n\");\n else if(s>r+0.05)\n printf(\"better\\n\");\n else printf(\"same\\n\"); \n } \n getchar();\n getchar();\n getchar(); \n}"} +{"label": "67", "index": "33320", "code": "int main(){\n\tint n,zbl[200],yxbl[100];\n\tdouble x,y[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&zbl[0],&yxbl[0]);\n\tx=1.0*yxbl[0]/zbl[0];\n\tfor(int i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x-y[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse {\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\t\n\t\n\n\n\n\n"} +{"label": "67", "index": "33321", "code": "\nint main()\n{\nint n;\nscanf(\"%d\",&n);\nint i;\ndouble sz[256],sz2[256] ;\ndouble youxiao[256];\nfor(i=0;i0.05){printf(\"better\\n\");}\t\t\nelse if(youxiao[0]-youxiao[i]>0.05){printf(\"worse\\n\");}\t\nelse {printf(\"same\\n\");}\t\t\n\t}\n\n return 0;\n}\n\n\n\n"} +{"label": "67", "index": "33322", "code": "int main(){\ndouble a[100],c[100],d[100],h;\nint n,i;\nscanf(\"%d\",&n);\nfor(i=0;i0.05){printf(\"better\\n\");}\nelse if(h<-0.05){printf(\"worse\\n\");}else{printf(\"same\\n\");}\n\n\n}\n\n\n\nreturn 0;\n}"} +{"label": "67", "index": "33323", "code": "int main()\n{\n\tint n,a,b,c,d;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&c,&d);\n\tdouble x,y;\n\tx=(double)d/c;\n\tint i;\n\tfor(i=0;i=0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(x-y>=0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(x-y<0.05&&y-x<0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33324", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i;\n\tfloat x,y;\n\tint a[100],b[100];\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t\ty=0;}\n\t\telse if(x-y>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t\ty=0;}\n\t\telse{\n\t\t\tprintf(\"same\\n\");}}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33325", "code": "int main()\n{\n\tint a[NUM][COL];\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((double)a[i][1]/a[i][0]-rate<-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if((double)a[i][1]/a[i][0]-rate<=0.05&&(double)a[i][1]/a[i][0]-rate>=-0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n return 0;\n\n}"} +{"label": "67", "index": "33326", "code": "int main()\n{\n\tint i,n,a,b;\n\tdouble c;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tc=1.000000000*b/a;\n\tfor(i=1;i0.05){printf(\"better\\n\");}\n\t\telse if((1.000000000*b/a-c)<-0.05){printf(\"worse\\n\");}\n\t\telse if((1.000000000*b/a-c)>-0.05&&(1.000000000*b/a-c)<0.05){printf(\"same\\n\");}\n\t}\n\treturn 0;\n}\n\t\t"} +{"label": "67", "index": "33327", "code": "int main ()\n{\n\tint n ,i;\n\tdouble a0,b0,a,b;\n\tdouble p1,p2;\n\tcin>>n;\n\tcin>>a0>>b0;\n\tp1=b0/a0;\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tcin>>a>>b;\n\t\tp2=b/a;\n\t\tif(fabs(p1-p2)<=0.05)\n\t\t\tcout<<\"same\"<0.05)\n\t\t\tcout<<\"worse\"<> n ;\n\tcin >> a >> b ; //???????????\n\tdouble x ,y ; //x??????????\n\t( double ) (x = b / a) ;\n\tfor ( int i = 0 ; i < n - 1 ; i++) //??????????????~\n\t{\n\t\tcin >> a >> b ;\n\t\t( double )(y = b / a) ;\n\t\tif ( y > x)\n\t\t{\n\t\t\tif ( y - x > 0.05)\n\t\t\t\tcout << \"better\" << endl;\n\t\t\telse cout << \"same\" << endl;\n\t\t}\n\t\telse if ( x - y > 0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\t else cout << \"same\" << endl;\n\n\t}\n\treturn 0 ;\n}"} +{"label": "67", "index": "33329", "code": "int main(){\n\tint n,i;\n\tdouble old,xlf;\n\tscanf(\"%d\",&n);\n\tint*zs=(int*)malloc(sizeof(int)*n);\n\tint*yx=(int*)malloc(sizeof(int)*n);\n\t\n\t\n\tfor(i=0;i0.05){\n\t\t\t\tprintf(\"better\");\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}else if(old-xlf>0.05){\n\t\t\t\tprintf(\"worse\");\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\");\n\t\t\t\tprintf(\"\\n\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "67", "index": "33330", "code": "int main()\n{\n\tint i,n;\n\tint s[100],t[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((double)t[i]/s[i]-k<-0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33331", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tfloat all[100],fun[100],per[100];\n\tint i;\n\tfor(i=0;i=per[0]){\n\t\t\tif(per[i]-per[0]>0.05) {printf(\"better\\n\");}\n\t\t\telse {printf(\"same\\n\");}\n\t\t}\n\t\tif(per[i]0.05) {printf(\"worse\\n\");}\n\t\t\telse {printf(\"same\\n\");}\n\t\t}\n\t}\n\tif(per[n-1]>=per[0]){\n\t\t\tif(per[i]-per[0]>0.05) {printf(\"better\");}\n\t\t\telse {printf(\"same\");}\n\t\t}\n\t\tif(per[n-1]0.05) {printf(\"worse\");}\n\t\t\telse {printf(\"same\");}\n\t\t}\n\treturn 0;\n}\n\t"} +{"label": "67", "index": "33332", "code": "int main(){\nint n,i,a[100],b[100];\ndouble x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if(x<=0.05&&x>=-0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33333", "code": "int main()\n{\n\tint n,arr[100][2],i,a,b;\n\tdouble x,y;\n\tcin>>n;\n\tcin>>a>>b;\n\tx=b*100.0/a;\n\tfor(i=0;i>arr[i][0]>>arr[i][1];\n\t\ty=arr[i][1]*100.0/arr[i][0];\n\t\tif(y-x>5)\n\t\t{\n\t\t\tcout<<\"better\"<<'\\n';\n\t\t}\n\t\telse if(x-y>5)\n\t\t{\n\t\t\tcout<<\"worse\"<<'\\n';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout<<\"same\"<<'\\n';\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33334", "code": "int main(){\nint n,i,t=0;\nchar xm[300][10];\nfloat tw[300];\ndouble z[300];\ndouble yx[300];\ndouble x[300];\n\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\n\t \n\t printf(\"worse\");\n\t printf(\"\\n\");\n\t}else if(x[i]-x[0]>0.05){\n\t \n\t printf(\"better\");\n\t printf(\"\\n\");\n\t}else{\n\t \n\t printf(\"same\");\n\t printf(\"\\n\");\n\t}\n \n\t\n\t\n}\n\n\t \n\t if(x[0]-x[n-1]>0.05){\n\t \n\t printf(\"worse\");\n\n\t}else if(x[n-1]-x[0]>0.05){\n\t \n\t printf(\"better\");\n\t\n\t}else{\n\t \n\t printf(\"same\");\n\t \n\t}\n\t \n\n\nreturn 0;\n}"} +{"label": "67", "index": "33335", "code": "int main(){\n int n,i,A[100],B[100];\n double C[100],D[100];\n scanf(\"%d\",&n);\n for(i=0;i=1){C[i]=1.0*B[i]/A[i];}\n D[i]=C[i]-C[0];\n if(i>=1&&D[i]>0.05)\n {printf(\"better\\n\");}\n \n if(i>=1&&D[i]<-0.05){printf(\"worse\\n\");}\n if(i>=1&&D[i]>=-0.05&&D[i]<=0.05) printf(\"same\\n\");\n }\n \n return 0;\n}\n"} +{"label": "67", "index": "33336", "code": "int main(){\nint n,i;\ndouble x,y[100];\nint total[100],youxiao[100];\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\n\tprintf(\"better\\n\");\n}\nif((x-y[i])>0.05){\n\tprintf(\"worse\\n\");\n}\nif((x-y[i])<=0.05&&(y[i]-x)<=0.05){\n\tprintf(\"same\\n\");\n}\n}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33337", "code": "int main()\n{\n\tint N,i;\n\tcin>>N;\n\tconst int n=N;\n\tfloat a[n],b[n],q,p;\n\tfor(i=0;i<=N-1;i=i+1){\n\t\tcin>>a[i]>>b[i];\n\t}\n\tq=(b[0]/a[0]);\n\tfor(i=1;i<=N-1;i=i+1){\n\t\tp=(b[i]/a[i]);\n\t\tif(p-q>0.05){cout<<\"better\"<0.05){cout<<\"worse\"<0.05){\n printf(\"better\\n\");}\n else if(b<-0.05){\n printf(\"worse\\n\");}\n else{\n printf(\"same\\n\");}\n }\n \n \n return 0;\n}\n"} +{"label": "67", "index": "33339", "code": "int main()\n{\n\tint n,i;\n\tfloat a,b,e,f;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\te=b/a;\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if((e-f)>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\t\n\treturn 0;\n}\n"} +{"label": "67", "index": "33340", "code": "int main(){\nint n,i,j;\ndouble sz[100][2];\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\nprintf(\"worse\\n\");\t\n\t}\n\telse if((sz[i][1]/sz[i][0])-(sz[0][1]/sz[0][0])>0.05){\nprintf(\"better\\n\");\n\t}\n\telse{\n\t\tprintf(\"same\\n\");\n\t}\n\n}\nreturn 0;\n}"} +{"label": "67", "index": "33341", "code": "int main(int argc, char* argv[])\n{ int n,a[100],z[100];\n\tint i;\n\t\nscanf(\"%d\",&n);\nscanf(\"%d %d\",&z[0],&a[0]);\nfor(i=1;i0.05){\n\t\tprintf(\"better\\n\");\n\t\t}\n\telse if(((float)(a[0])/z[0]-(float)(a[i])/z[i])>0.05){\n\t\tprintf(\"worse\\n\");\n\t\t}\n else{\n\t\tprintf(\"same\\n\");\n\t\t}\n\n\n}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33342", "code": "int main()\n{\n\tint i,n,zs,yx;\n\tdouble x,y,cha;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5)\n\t\t\t{\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\telse if(cha<-5)\n\t\t\t{\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33343", "code": "int main(){\n\tint n,i;\n\tdouble lx1,lx2[1000],br1,br2[1000],yx1,yx2[1000];\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&br1,&yx1);\n\tlx1=yx1/br1;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(lx1-lx2[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if((lx1-lx2[i]<=0.05&&lx1-lx2[i]>=0)||(lx2[i]-lx1<=0.05&&lx2[i]-lx1>=0)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33344", "code": "struct jiegou\n{\n double renshu;\n double youxiao;\n };\nint main()\n{\n int n;\n scanf(\"%d\",&n);\n struct jiegou abc[20];\n int i=0;\n for(i=0;i(abc[i].youxiao/abc[i].renshu+0.05)) printf(\"worse\\n\");\n else printf(\"same\\n\");\n }\n \n return 0;\n }\n\n"} +{"label": "67", "index": "33345", "code": "int main()\n{\n\tfloat a1,g1,r1,a[1000],g[1000],r[1000];\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tn=n-1;\n\tscanf(\"%f %f\",&a1,&g1);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((r[i]-r1)<(-0.05))\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n}\n"} +{"label": "67", "index": "33346", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a,b;\n\tscanf(\"%d%d\",&a,&b);\n\tdouble p,q;\n\tp=1.0*b/a;\n\tint i;\n\tfor(i=1;i<=n-1;i++){\n\t\tint x,y;\n\t\tscanf(\"%d%d\",&x,&y);\n\t\tq=1.0*y/x;\n\t\tif(i==n-1){\n\t\t\tif(q-p>0.05){\n\t\t\t\tprintf(\"better\");\n\t\t\t}else if(p-q>0.05){\n\t\t\t\tprintf(\"worse\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\");\n\t\t\t}\n\t\t}else{\n\t\t\tif(q-p>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else if(p-q>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33347", "code": "//********************************\n//*???????\n//*??? ?? 1300012814 **\n//*???2013.09,18 **\n//********************************\nint main()\n{\n\tint n;\n\tdouble a, b, p, c, d, q;\n\n\tcin >> n;\n\tcin >> a >> b;\n\tp = b / a * 100;\n\tfor (int i=1; i < n; i++ )\n\t{\n\t\tcin >> c >> d;\n\t\tq = d / c *100;\n\t if (q - p > 5)\n\t\t\tcout << \"better\" < 5)\n\t\t\t\tcout << \"worse\" <0.05)\n\t {\n\t printf (\"better\\n\");\n\t }\n\t else if ((c[0]-c[i])>0.05)\n\t {\n\t\t printf (\"worse\\n\");\n\t\t}\n\t else \n\t {\n\t printf (\"same\\n\");\n\t }\t \n\t }\n\t else \n\t {\n\t \tif ((c[i]-c[0])>0.05)\n\t {\n\t printf (\"better\");\n\t }\n\t else if ((c[0]-c[i])<0.05)\n\t {\n\t\t printf (\"worse\");\n\t\t}\n\t else \n\t {\n\t printf (\"same\");\n\t }\t \n\t }\n\t \n\t \n\t}\n\t\n\n}"} +{"label": "67", "index": "33349", "code": "main()\n{\n int n,i;\n float a[100],b[100],c[100];\n scanf(\"%d\",&n);\n for(i=0;i0.05)\n printf(\"better\");\n else if(c[i]-c[0]<-0.05)\n printf(\"worse\");\n else\n printf(\"same\");\n printf(\"\\n\");\n }\n}"} +{"label": "67", "index": "33350", "code": "int main()\n{\n\tint n , i ;\n\tdouble y , a , b , a1 , b1;\n\n\tcin >> n >> a >> b;\n\n\tfor (i = 1; i <= n - 1; i ++)\n\t{\n\t\tcin >> a1 >> b1;\n\t\t\n\t\ty = b1 / a1 - b / a;\n\t\t\n\t\tif (y > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t\t\n\t\telse if (y < -0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\t\n\t\telse\n\t\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}\n\t"} +{"label": "67", "index": "33351", "code": "int main()\n{\n\tint n, i;\n\tfloat k, p, q;\n\tscanf(\"%d%f%f\",&n, &p, &q);\n\tk=q/p;\n\tfor(i=0;i0.05) printf(\"better\\n\");\n\t\telse if(k-b/a>0.05) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33352", "code": "int main(){\n\tint n,i;\n\tscanf(\"%d\",&n);\n int all[100],health[100];\n\tdouble rate[100];\n\tfor(i=0;irate[0]+0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(rate[i]rate[0]+0.05){\n\t\t\tprintf(\"better\");\n\t\t}else if(rate[n-1]0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(f-c>-0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}else{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33354", "code": "int main()\n{ \n\tint n=0;\n\tdouble x=0,y=0,a=0,b=0;\n\tcin>>n>>x>>y;\n\tfor(int i=1;i<=n-1;i++)\n\t{\n\t\tcin>>a>>b;\n\t\tif(b/a-y/x>0.05)\n\t\t{\n\t\t\tcout<<\"better\"<0.05)\n\t\t{\n\t\t\tcout<<\"worse\"<b)\n\t{\n\t\tcout<<\"worse\"<>n;\n\tcin>>wine.sum>>wine.effect;\n\twine.rate=wine.effect/wine.sum;\n\tfor(i=0;i>improve[i].sum>>improve[i].effect;\n\t\timprove[i].rate=improve[i].effect/improve[i].sum;\n\t\t//cout<>n;\n double a[n],b[n],c[n];\n cin>>a[0]>>b[0];\n c[0]=b[0]/a[0];\n int i;\n for(i=1;i>a[i]>>b[i];\n c[i]=b[i]/a[i];\n if(c[i]-c[0]>0.05) cout<<\"better\"<-0.05&&c[i]-c[0]<0.05) cout<<\"same\"<0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(c-l<-0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(c-l<0.05&&c-l>-0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33358", "code": "int main()\n{\n\tint n,i;\n\tfloat a[100],p,q,standard;//????\n\tcin>>n;\n\tcin>>p>>q;\n\tstandard=q/p;//?????\n\tfor(i=0;i>p>>q;\n\t\ta[i]=q/p;\n\t}\n\tfor(i=0;i0.05) cout<<\"better\"<0.05) cout<<\"worse\"<0.05)\n\t\t{\n\t\t\tprintf(\"better\");\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t\tif((k[0]-k[i])>0.05)\n\t\t{\n\t\t\tprintf(\"worse\");\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t\tif((k[i]-k[0])<=0.05&&(k[0]-k[i])<=0.05)\n\t\t{\n\t\t\tprintf(\"same\");\t\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33360", "code": "int main()\n{\n\tdouble n,a,b,c,d,m;\n\tscanf(\"%lf%lf%lf\\n\",&n,&a,&b);\n\tm=b/a;\n\twhile(n>1){\n\t\tscanf(\"%lf%lf\\n\",&c,&d);\n\t\ta=m-d/c;\n\t\tif(a>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(a<-0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(a<=0.05&&a>=-0.05)\n\t\t\tprintf(\"same\\n\");\n\t\tn=n-1;\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33361", "code": "\nint main()\n\n{\n int n, i,m=0, d;\n\tfloat j,j1,j2,q[100],q1[100],q2[100];\n\tscanf(\"%d\",&n);\n\tscanf(\"%f %f\",&j1,&j2);\n\tj=j2/j1;\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(j-q[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n \n\t}\n \treturn 0;\n}\n"} +{"label": "67", "index": "33362", "code": "// * * * * * * * * * * * * * * *\n// *???????? *\n// *?????? 1300013011 *\n// *???2013.9.30 *\n// * * * * * * * * * * * * * * *\n\n\nint main()\n{\n\tint n, a1, a2, b1, b2;\n\n\tdouble x, y, m;\n\n\tcin >> n;\n\n\tcin >> a1 >> a2;\n\n x = a2;\n\n\tx = x / a1;\n\n\tfor (int i = 2; i <= n; i++)\n\t\n\t{\n\t\tcin >> b1 >> b2;\n\n\t\ty = b2;\n\n\t\ty = y / b1;\n\n m = x - y;\n\n\t\tif (m < -0.05)\n\n\t\t\tcout << \"better\" << endl;\n\n\t\telse\n\n\t\t\tif (m > 0.05)\n\n\t\t\t\tcout << \"worse\" << endl;\n\n\t\t\telse\n\n\t\t\t\tcout << \"same\" << endl;\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33363", "code": "int main()\n{\n\tint n,a1,a2,b1,b2;\n\tscanf(\"%d%d%d\",&n,&a1,&a2);\n\tfloat x,y;\n\tx=(float)a2/a1;\n\tfor(int i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((x-y)>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\t"} +{"label": "67", "index": "33364", "code": "int main(){\n int n;\n scanf(\"%d\",&n);\n int i,x,y;\n double a,b;\n scanf(\"%d%d\",&x,&y);\n a=1.0*y/x;\n for(i=2;i<=n;i++){\n scanf(\"%d%d\",&x,&y);\n\tb=1.0*y/x;\n\t if((a-b)>0.05){\n\t printf(\"worse\\n\");\n\t }\n\t else if((b-a)>0.05){\n\t printf(\"better\\n\");\n\t }\n\t else{\n\t printf(\"same\\n\");\n\t }\n\t}\n return 0;\n}"} +{"label": "67", "index": "33365", "code": "int main(){\nint n,i,x,y;\ndouble b,c;\nstruct s\n {\n int x;\n int y;\n };\nstruct s sz[100];\nscanf(\"%d\",&n);\nfor(i=0;i0.05)\n\t{\n printf (\"better\\n\");\n\t}\n else if (b-c>0.05)\n\t{\n printf(\"worse\\n\");\n\t}\n\telse\n\t{\n\t\tprintf(\"same\\n\");\n\t}\n\n}\nreturn 0;\n}"} +{"label": "67", "index": "33366", "code": "int main(){\n\tint n;\n\tcin>>n;\n\tfloat a[n],b[n],x[n],s;\n\tcin>>a[0]>>b[0];\n\tx[0]=b[0]/a[0];\n\tfor(int i=1;i>a[i]>>b[i];\n\t\tx[i]=b[i]/a[i];\n\t\ts=x[i]-x[0];\n\t\tif(s>0.05) cout<<\"better\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(((double)sx[0]/(double)sz[0]-(double)sx[j]/(double)sz[j])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n "} +{"label": "67", "index": "33368", "code": "int main(){\n int n,i,j,k;\n int zong[100],you[100];\n scanf(\"%d\\n\",&n);\n for(i=0;i=1){\n if(you[i]*1.0/zong[i]-you[0]*1.0/zong[0]>0.05){\n printf(\"better\\n\");\n }else if(you[0]*1.0/zong[0]-you[i]*1.0/zong[i]>0.05){\n printf(\"worse\\n\");\n }else {\n printf(\"same\\n\");\n }\n }\n }\n \n return 0;\n}"} +{"label": "67", "index": "33369", "code": "int main(){\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tdouble sz[1000],sa[1000];\n\tfor(i=0;i0){\n\t\tif(sa[i]/sz[i]-sa[0]/sz[0]>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(sa[0]/sz[0]-sa[i]/sz[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33370", "code": "int main()\n{\n int n,sz[1000][2],i,j;\n double x,y;\n scanf(\"%d\",&n);\n for(i=0;i0.05){printf(\"better\\n\");}\n else if(x-y>0.05){printf(\"worse\\n\");}\n else{printf(\"same\\n\");}}\n return 0;\n}\n \n "} +{"label": "67", "index": "33371", "code": "int main ( )\n{\n int n,a[100][3],i,j;\n float b;\n scanf(\"%d\",&n);\n for(i=0;i5){\n printf(\"better\\n\");}\n if((100.0*(float)a[i][1]/(float)a[i][0]-b)<=5&&(b-100.0*(float)a[i][1]/(float)a[i][0])<=5){\n printf(\"same\\n\");}\n if((100.0*(float)a[i][1]/(float)a[i][0]-b)<-5){\n printf(\"worse\\n\");}}\n return 0;\n}\n\n\n \n "} +{"label": "67", "index": "33372", "code": "struct patient\n{\n\tint all;\n\tint part;\n\tdouble cent;\n\tchar s[7];\n}p[M];\nint main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\tstrcpy(p[i].s,\"better\");\n\t\telse if((p[0].cent-p[i].cent)>0.05)\n\t\t\tstrcpy(p[i].s,\"worse\");\n\t\telse\n\t\t\tstrcpy(p[i].s,\"same\");\n\t}\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(ji-qita[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "67", "index": "33374", "code": "int main(){\n\tint sz[500][2];\n\tint n,i,j;\n\tfloat a;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i(a+0.05))\n\t\t{printf(\"better\\n\");}\n\t\telse{printf(\"same\\n\");}}\n\n\t\n\treturn 0;\n}\n"} +{"label": "67", "index": "33375", "code": "int main()\n{\n\tint i,n;\n\tdouble k,s,g[200];\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>k;\n\t\tcin>>s;\n\t\tg[i]=s/k;\n\t}\n\tfor(i=2;i<=n;i++)\n\t{\n\t\tif(g[1]-g[i]>0.05)\n\t\t\tcout<<\"worse\"<0.05)\n\t\t\tcout<<\"better\"<=(-0.05))\n\t\t\tcout<<\"same\"<0.05){printf(\"better\\n\");}\n\tif(b<-0.05){printf(\"worse\\n\");}\n\tif(b<0.05&&b>-0.05){printf(\"same\\n\");}}\nreturn 0;\n}"} +{"label": "67", "index": "33377", "code": "int main()\n{\n\tint x1, x2, y1[10000],y2[10000],n, flag[10000];\n\tdouble x, y[10000];\n\tdouble temp;\n\tscanf(\"%d\", &n);\n\tint i;\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else if((y-x<=0.05)&&(y-x>=-0.05)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33379", "code": "int main()\n{\n\tint n,i;\n\tint a[100][100];\n\tfloat b[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"worse\");\n\t\t\t\n\t\t}\n\t\telse if(b[i]-b[0]>0.05){\n\t\t\tprintf(\"better\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\");\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33380", "code": "void judge(double,double);//??\ndouble standard;//???????\nconst double m=0.05;//??\nint main()\n{\n int n,i;\n double sum,useful;\n cin>>n;\n cin>>sum>>useful;\n standard=useful/sum;\n for(i=2;i<=n;i++)\n {\n cin>>sum>>useful;\n\tjudge(sum,useful);\n }\n return 0;\n}\nvoid judge(double sum,double useful)\n{\n double rate;\n rate=useful/sum;\n if(abs(rate-standard)<=m)\n\t cout<<\"same\"<m)\n\t cout<<\"better\"<0.05)\n {\n printf(\"worse\\n\");\n }\n else if(d-c>0.05)\n {\n printf(\"better\\n\");\n }\n else\n {\n printf(\"same\\n\");\n }\n }\n}\n"} +{"label": "67", "index": "33382", "code": "\nint main()\n{\n\tint n, i, j, a[100][2];\n\tdouble p0, p;\n\tscanf(\"%d\", &n);\n\tfor(i=0; i 0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\telse if((p0-p) > 0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33383", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a[100],b[100],c[100],p,q,ww;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf%lf\",&p,&q);\n\tww=q/p;\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\t\n\t\t\n\t\telse\tif(ww-c[i]>0.05)\n\t\t\t\n\t\t\t printf(\"worse\\n\");\n\t\t\telse\tif(ww-c[i]<=0.05||c[i]-ww<=0.05)\n\t\t\t\t\tprintf(\"same\\n\");\n\t\t\t\n\t\t\n\t}\n\n\t\t\n\treturn 0;\n}\n"} +{"label": "67", "index": "33384", "code": "main()\n{\n int i,j,m,n,g;\n double k,k1,k2,temp;\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&i,&j);\n k=1.0*j/i;\n k1=k+0.05;\n k2=k-0.05;\n for(g=1;gk1) printf(\"better\\n\");\n else printf(\"same\\n\");\n }\n \n}\n"} +{"label": "67", "index": "33385", "code": "int main ()\n{\n\tint n, i; //n??????\n\tdouble a[10000][2]; //???????????? \n\tdouble x, y;\n\tcin>>n;\n\tfor(i=0; i> a[i][0] >> a[i][1]; //????\n x = a[0][1]/a[0][0];\n\tfor(i=1; i0.05)\n\t\t{\n\t\t\tcout<<\"better\"<0.05)\n\t\t{\n\t\t\tcout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((z-sz2[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\ti++;\n\t}\n\n\treturn 0;\n\n}"} +{"label": "67", "index": "33387", "code": "int main()\n{\n\tint i ,j, n ;\n\tdouble old , hen[2] , test[20][2]={0} , NEW[20] ;\n\tcin >> n >> hen[0] >> hen[1] ;\n\tfor (i = 0 ; i < n-1 ; i++)\n\t\tfor (j = 0 ; j <= 1 ; j++)\n\t\t\tcin >> test[i][j] ;\n\told = hen[1] / hen[0] ;\n\tfor (i=0; i 0.05 )\tcout << \"worse\" <0.05 )\tcout << \"better\" <0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(bl[0]-bl[i]>0.05)\n\t\t\t{ \n\t\t\t printf(\"worse\\n\");\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\tfree(m1);\n\tfree(m2);\n\tfree(bl);\n\treturn 0;\n}\n\t\t\n\n"} +{"label": "67", "index": "33389", "code": "int main()\n{\n int n;\n float a[100];\n float b[100];\n float effect[100];\n int i;\n cin >> n;\n for(i = 0; i < n; i++)\n {\n cin >> a[i];\n cin >> b[i];\n effect[i] = b[i] / a[i];\n }\n for(i = 1; i < n; i++)\n {\n if(effect[i] - effect[0] > 0.05)\n {\n cout << \"better\" << endl;\n }\n else if(effect[0] - effect[i] > 0.05)\n { \n cout << \"worse\" << endl;\n }\n else\n {\n cout << \"same\" << endl;\n }\n }\n return 0;\n}\n"} +{"label": "67", "index": "33390", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a,b;\n\tscanf(\"%d\",&n);\n\tdouble*s=(double*)malloc(sizeof(double)*n);\n\tdouble*z=(double*)malloc(sizeof(double)*n);\n\tfor(i=0;i50)\n\t\t\t{\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\telse if(a-b>50)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse {\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\n\t\t\n\t}\n\t\treturn 0;\n}"} +{"label": "67", "index": "33391", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tdouble yuan=0.0,z=0.0;\n\tdouble yuanx=0,yuany=0;\n double x=0,y=0;\n\tcin>>yuanx>>yuany;\n\tyuan=yuany/yuanx;\n\tfor(int i=1;i>x>>y;\n\t\tz=y/x;\n\t\tif(z>yuan)\n\t\t{\n\t\t\tif(z-yuan>0.05)cout<<\"better\"<0.05)cout<<\"worse\"<c&&r-c>0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(r0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33393", "code": "int main(){\n\tint n,i;\n\tint a[100],b[100];\n\tdouble x,y;\n\tint r[100]={0};\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tr[i]=1;\n\t\t}\n\t\telse if(x-y>0.05){\n\t\t\tr[i]=-1;\n\t\t}\n\t\telse r[i]=0;\n\t}\n\tfor(i=1;i>n;\n cin>>Total>>Well;\n standard=Well/(float)Total;\n for(int i=0;i>Total>>Well;\n temp=Well/(float)Total;\n if(temp-standard>0.05)\n cout<>n>>a>>b; //???????????????\n\tx=b/a; //???????????\n\tfor(i=1;i<=n-1;i++) \n\t{\n\t\tcin>>a>>b; //????n-1??????\n\t\ty=b/a; //???????\n\t\tif(x-y>0.05) //????????????\n\t\t\tcout<<\"worse\"<0.05)\n\t\t\tcout<<\"better\"<>n;\n\tfor(i=0;i>x>>y;\n\t\tif(i==0)\n\t\t{\n\t\t\tp=y/x;\n\t\t\tcontinue;\n\t\t}\n\t\tq=y/x;\n\t\tif(p>=q)\n\t\t{\n\t\t\tif(p-q>0.05)\n\t\t\t\tcout<<\"worse\"<0.05)\n\t\t\t\tcout<<\"better\"<5)\n\t\t\tprintf(\"worse\\n\");\n\t\telse if(k[i]-k[0]>5)\n\t\t\tprintf(\"better\\n\");\n\t\telse \n\t\t\tprintf(\"same\\n\");\n\t}\n\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33398", "code": "int main()\n{\n\tint sz[10000][2];\n\tdouble x,y;\n\tint i,j,row;\n\tscanf(\"%d\",&row);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33399", "code": "int main()\n{\n\tint i,j,n;\n float x,c[N],a[N],b[N],y;\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if((y-x)>0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((y-x)<=0.05&&(x-y)<=0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "67", "index": "33400", "code": "int main()\n{\n\tint n,i,y,j;\n\tdouble a[100];\n\tscanf(\"%d\",&n);\n for(i=0;i=a[0]){\n\t\t\tif(a[i]-a[0]>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t\tif(a[i]0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33401", "code": "int main()\n{\n\tint n,x,y;\n\tdouble z;\n\tint a[1000],b[1000];\n\tdouble c[1000];\t\n\tscanf(\"%d %d %d\",&n,&x,&y);\n\tz=1.0*y/x;\n\tfor(int i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(z-c[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33402", "code": "int main(){\n\tint n,i,cases[100][3];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=5)printf(\"better\\n\");\n\t\telse if(cases[0][2]-cases[i][2]>=5)printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33403", "code": "int main(){\n int n,bl[10000],yx[10000],i;\n double xl[10000],cha[10000];\n scanf(\"%d\",&n);\n for(i=0;i0.05){\n printf(\"better\\n\");\n }\n else if(cha[i]<-0.05){\n printf(\"worse\\n\");\n }\n else printf(\"same\\n\");\n }\n return 0;\n}"} +{"label": "67", "index": "33404", "code": "int main()\n{\n float n,i,a0,b0,a,b,x,y,result;\n cin>>n; //???????? \n cin>>a0>>b0; //????????? \n x=b0/a0; //?????????? \n for (i=1;i>a>>b; //???????? \n y=b/a; //????????? \n result=y-x;\n if (result>0.05)\n cout<<\"better\"<-0.05)&&(result<0.05))\n cout<<\"same\"<0.05) {\n result[i]=1;\n }\n else if((ext-temp3)>0.05) {\n result[i]=2;\n }\n else {\n result[i]=3;\n }\n }\n\n//???\n// len=strlen(n);\n\n//??\n for(i=1;i<=n-1;i++) {\n if(result[i]==1) {\n printf(\"better\\n\");\n }\n if(result[i]==2) {\n printf(\"worse\\n\");\n }\n if(result[i]==3) {\n printf(\"same\\n\");\n }\n }\n//??\n return 0;\n}"} +{"label": "67", "index": "33406", "code": "int main()\n{\n int n, a, b, i, k;\n double j;\n scanf(\"%d%d%d\", &n, &a, &b);\n j=(double)(b*1.000/(a*1.000));\n int sz[n-1][2];\n for(i=0;i<=n-2;i++){\n for(k=0;k<=1;k++){\n scanf(\"%d\", &sz[i][k]);\n }\n }\n for(i=0;i<=n-2;i++){\n if((((sz[i][1]*1.000/(sz[i][0]*1.000)))-j)>0.05){\n printf(\"better\\n\");\n }\n else if((((sz[i][1]*1.000/(sz[i][0]*1.000)))-j)<-0.05){\n printf(\"worse\\n\");\n }\n else{\n printf(\"same\\n\");}\n }\n return 0;\n}"} +{"label": "67", "index": "33407", "code": "int main()\n{\n\tfloat a[1000],b[1000];\n\tint n,i;\n\tscanf(\"%d\\n\",&n);\n\tscanf(\"%f %f\\n\",&a[0],&b[0]);\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((b[0]/a[0]-b[i]/a[i])>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33408", "code": "int main()\n{\nint n;\nscanf(\"%d\",&n);\nint a[N],b[N],i;\nfor( i=0;i5){\n\tprintf(\"better\\n\");\n}else if((b[i]*1.0/a[i]-c)*100<-5){\n\tprintf(\"worse\\n\");\n}else{\n\tprintf(\"same\\n\");\n}\n}\n\treturn 0;\n}"} +{"label": "67", "index": "33409", "code": "int main()\n{\n\tint i,n;\n\tdouble a,b;\n\tdouble x,y;\n\tdouble another,effect;\n\tcin>>n;\n\tcin>>a>>b;\n\teffect=b/a;\n\tfor(i=1;i>x>>y;\n\t\tanother=y/x;\n\t\tif(another-effect>0.05)\n\t\t{\n\t\t\tcout<<\"better\"<0.05)\n\t\t{\n\t\t\tcout<<\"worse\"<0.05){\n printf(\"worse\\n\");}\n if(x-y<0.05&&y-x<0.05){\n printf(\"same\\n\");}\n if(y-x>0.05){\n printf(\"better\\n\");}\n }\n\treturn 0;\n}\n"} +{"label": "67", "index": "33411", "code": "int main() {\nint n;\ndouble y[500] = {0}, a, b;\ncin >> n;\ncin >> a >> b;\ny[0] = b / a;\nfor (int i = 1; i < n; i++) {\ncin >> a >> b;\ny[i] = b / a;\nif (y[i] - y[0] > 0.05) { cout << \"better\";}\nelse if (y[0] - y[i] > 0.05) { cout << \"worse\";}\nelse { cout << \"same\";}\ncout << endl;\n}\nreturn 0;\n}"} +{"label": "67", "index": "33412", "code": "int main () {\nint n,i;\ndouble c,d;\nscanf(\"%d\",&n);\nint a[100];\nint b[100];\nscanf(\"%d %d\",&a[0],&b[0]);\nc=b[0]*1.0000/a[0];\nfor(i=1;i0.05)\n printf(\"better\\n\");\n else if(c-d>0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n}\n\n\nreturn 0;\n}"} +{"label": "67", "index": "33413", "code": "int main()\n{\nint i,n,x,y,a,c,d,e,b;\nscanf(\"%d\",&n);\nscanf(\"%d %d\",&a,&b);\nc=100*b/a;\nfor(i=1;i=5)\n\t\tprintf(\"better\\n\");\n\telse if(e<=-5){\n\t\tprintf(\"worse\\n\");\n\t}\n\telse{\n\t\tprintf(\"same\\n\");\n\t}\n}\n\nreturn 0;\n}"} +{"label": "67", "index": "33414", "code": "//********************************\n//*?? ????? *****\n//*????? 1300012753 ***** \n//*???2013.09.25 ***** \n//********************************\nint main()\n{\n int i, n, sum, d; // ??????i???????n??????sum?????d \n int a, b; // ??a?b??????????????? \n float x, y, c; // ??????????x????y,???????????c \n cin >> n;\n cin >> a >> b;\n x = 1.0 * b / a;\n for (i = 1; i <= n-1; i++)\n {\n cin >> sum >> d;\n y = 1.0 * d / sum;\n c = y - x;\n if (c >= 0.05)\n {\n printf(\"better\\n\");\n }\n else if (c <= -0.05)\n {\n printf(\"worse\\n\");\n }\n else\n {\n printf(\"same\\n\");\n } \n }\n return 0;\n}\n"} +{"label": "67", "index": "33415", "code": "int main()\n{\n\tint n;\n\tdouble jsum,juse,a;\n\tint i,j;\n\tdouble xsum[100],xuse[100];\n\tscanf(\"%d\",&n);\n scanf(\"%lf %lf\",&jsum,&juse);\n\ta=juse/jsum;\n for(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(((a-xuse[j]/xsum[j]))>0.05)\n\t\t{\t\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse \n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33416", "code": "// ?????.cpp : Defines the entry point for the console application.\n// ???????n???????????????????????n-1???????????????????????????\nint main()\n{\n\tint n; //????n??n???????\n\tcin>>n; //??n\n\tdouble sour1=0,sour2=0; //????sour1????????????????????sour2??????????\n\tdouble sourper,per[1000]; //????sourper????????????????per??????????\n\tdouble patient[1000],healthy[1000]; //????patient????????????????healthy??????????????\n\tcin>>sour1>>sour2;\n\tsourper=sour2/sour1; //??sourper\n\tfor(int i=0;i>patient[i]>>healthy[i];\n\t\tper[i]=healthy[i]/patient[i];\n\t}\n\tfor(int j=0;j0.05) \n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<>n;//n????????\n double all[n], eff[n];//all????effective???? \n double per[n];//percent ?????\n cin>>all[0]>>eff[0];\n per[0]= eff[0]/all[0];\n for (int i=1;i>all[i]>>eff[i];\n per[i]=eff[i]/all[i];\n if (per[i]-per[0]>0.05) \n cout<<\"better\"<0.05)\n cout<<\"worse\"<m+5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse if(p limit) printf(\"better\\n\");\n\t\telse if(t - t1 > limit) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33420", "code": "int main(){\n int n,i,y,z;\n\tdouble m;\n\tint s[1000],x[1000];\n\tdouble you[1000];\n\tscanf(\"%d\",&n);\n scanf(\"%d%d\",&z,&y);\n\tm=100.0*y/z;\n\tfor(i=0;i5){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(m-you[i]>5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33421", "code": "\n\n\n\nint main(){\n\n\tint n=0;\n\n\tcin>>n;\n\n\tdouble r[100][2];\n\n\tfor(int i=0;i>r[i][0]>>r[i][1];\n\t}\n\n\tfor(int i=1;i0.05){\n\t\t\tcout<<\"better\";\n\t\t}\n\t\telse if(r[0][1]/r[0][0]-r[i][1]/r[i][0]>0.05){\n\t\t\tcout<<\"worse\";\n\n\t\t}\n\t\telse{\n\t\t\tcout<<\"same\";\n\t\t}\n\n\t\tif(i5){\n\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\telse if(a-b>5){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "67", "index": "33423", "code": "void main()\n{ int i,j,n;\n\tint a,b,c,d;\n\tdouble e,f;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\te=(double)b/a;\n\tfor(i=1;i0.05) printf(\"better\\n\");\n\telse {\n\t\tif(e-f>0.05) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");}}\n \n}"} +{"label": "67", "index": "33424", "code": "int main()\n{\n\tint i,n,zong,hao;\n\tdouble x0,x;\n\n\tscanf(\" %d\",&n);\n\tscanf(\" %d %d\",&zong,&hao);\n\tx0=hao/(zong*1.0);\n\n\tfor(i=0;i0.05) printf(\"better\\n\");\n\t\telse if(x0-x>0.05) printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n\t\n\treturn 0;\n}"} +{"label": "67", "index": "33425", "code": "int main()\n{\n\tint n, total, valid;\n\tfloat x, y;\n\tcin >> n;\n\tcin >> total >> valid;\n\tx = (float)valid / total;\n\tfor (int i = 1; i <= n-1; i++)\n\t{\n\t\tcin >> total >> valid;\n\t\ty = (float)valid / total;\n\t\tif (y - x > 0.05)\n\t\t{\n\t\t\tcout << \"better\" << endl;\n\t\t}\n\t\telse \n\t\t{ \n\t\t\tif (y - x < -0.05)\n\t\t\t{\n\t\t\t\tcout << \"worse\" << endl;\n\t\t\t}\n\t\t\telse cout << \"same\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}\n\t\t\t\t \n"} +{"label": "67", "index": "33426", "code": "int main()\n{\n\tint n,i;\n\tdouble a,b,c;\n\tcin>>n;\n\tcin>>a>>b;\n\tc=b/a;\n\tfor(i=0;i>a>>b;\n\t\tif(b/a-c>0.05)\n\t\t\tcout<<\"better\"<=-0.05&&b/a-c<=0.05)\n\t\t\tcout<<\"same\"<> n; //????\n\tcin >> x[1] >> y[1]; //????\n\ta = (double) y[1] / x[1]; \n\tfor(i = 2 ; i <= n ; i++) //????\n\t{\n\t\tcin >> x[i] >> y[i]; //???????\n\t\tb = (double) y[i] / x[i]; \n\t\tif( b< a-0.05) //??????\n\t\t\tc[i] = 0;\n\t\t\t\n\t\telse if( b >= a-0.05 && b <= a+0.05) //??????\n\t\t\tc[i] = 1;\n\t\t\t\n\t\telse //??????\n\t\t\tc[i] = 2;\n\t\t\t\n\t}\n\tfor( i=2 ; i<=n ; i++) //????\n\t{\n\t\tif(c[i] == 0) //??????\n\t\t\tcout << \"worse\" << endl;\n\t\telse if(c[i] == 1) //??????\n cout << \"same\" << endl;\n\t\telse //??????\n\t\t\tcout << \"better\" << endl;\n\t}\n \treturn 0; //?????\n}\n\t\t\n\n\n\n"} +{"label": "67", "index": "33428", "code": "\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\n\tdouble a1,b1,c1;\n\tscanf(\"%lf %lf\",&a1,&b1);\n\tc1=(b1/a1)*(double)100;\n\n\tint i;\n\tdouble a2[100],b2[100],c2[100];\n\tfor(i=0;i5) printf(\"better\\n\");\n\t\tif(c1-c2[i]>5) printf(\"worse\\n\");\n\t\tif(c2[i]-c1<=5&&c1-c2[i]<=5) printf(\"same\\n\");\n\t}\n\n return 0;\n}\n\n"} +{"label": "67", "index": "33429", "code": "int main(){\n\tint n,a,b,i,m;\n\tdouble x,z;\n\tdouble y[100];\n\tdouble sz[100];\n\tscanf(\"%d%d%d\",&n,&a,&b);\n\tx=1.0*b/a;\n\tm=2*n-2;\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(-z>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33430", "code": "int main()\n{\n\tdouble total[10000],valid[10000],t1,v1,std,x[10000];\n\tint n;\n\tcin>>n;\n\tcin>>t1>>v1;\n\tstd=v1/t1;\n\tfor(int i=0;i>total[i]>>valid[i];\n\t\tx[i]=valid[i]/total[i];\n\t\tif(std-x[i]>0.05)\n\t\t\tcout<<\"worse\"<0.05)\n\t\t\tcout<<\"better\"<=0)||(x[i]-std<=0.05&&x[i]-std>=0))\n\t\t\tcout<<\"same\"<0.05)\n\t\tj[i]=1;\n\telse if(y[i]-x>0.05)\n\t\tj[i]=2;\n\telse\n\t\tj[i]=0;\n}\nfor(i=1;i0.05) printf(\"better\\n\");\nif(p-b/a>0.05) printf(\"worse\\n\");\nif(p-b/a<=0.05&&b/a-p<=0.05) printf(\"same\\n\");\n}\nreturn 0;\n}\n\n"} +{"label": "67", "index": "33433", "code": "\nint main(){\n\tint a[N][2],n,i,x,y;\n\tfloat b[N][2],z;\n\tscanf(\"%d%d%d\",&n,&x,&y);\n\tz=(float)y/(float)x;\n//\tprintf(\"%f\\n\",z);\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(b[i][1]<-0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33434", "code": "int main()\n{\n int n,i;\n\t\n\tfloat c,d;\n\tint a,b;\n \n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tc=(float)b/a;\n\tscanf(\"%d%d\",&a,&b);\n\t\td=(float)b/a;\n\t\tif(d-c>0.05) printf(\"\\nbetter\");\n\t\telse if (c-d>0.05) printf(\"\\nworse\");\n\t\telse printf(\"\\nsame\");\n\n for (i=2;i0.05) printf(\"\\nbetter\");\n\t\telse if (c-d>0.05) printf(\"\\nworse\");\n\t\telse printf(\"\\nsame\");\n\n\t\t}\n\n\n\treturn 0;\n}\n\n\n"} +{"label": "67", "index": "33435", "code": "\nint main()\n{\n\tint n,i;\n\tdouble jiwei1,jiwei2,jiweiyx;\n\tdouble a[100],b[100],c[100];\n\tscanf(\"%d\",&n);\n\n scanf(\"%lf %lf\",&jiwei1,&jiwei2);\n\tjiweiyx=(jiwei2/jiwei1)*100;\n\n\tfor(i=0;i=5)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(jiweiyx-c[i]>=5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(jiweiyx-c[i]<=5&&c[i]-jiweiyx<=5) printf(\"same\\n\");\n\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33436", "code": "\nint main()\n{ float n,a[2],b[50][2]={0},x,y[50];\nint i,j;\n cin>>n>>a[0]>>a[1];\n for(i=0;i>b[i][0]>>b[i][1];}\n x=a[1]/a[0];\n for(i=0;i0.05) cout<<\"better\"<0.05) cout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(za[0]-za[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\tfree(za);\n\tfree(a);\n\tfree(b);\n\t\n\treturn 0;\n}"} +{"label": "67", "index": "33438", "code": "int main(){\n\tint n,i;\n\tint a,b,c,d;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&a,&b);\n\tfor(i=1;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if((double)b/a-(double)d/c>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n printf(\"same\\n\");\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "67", "index": "33439", "code": "int main()\n{\n\tint i,n;\n\tdouble a1,a2,b1[100],b2[100],d[100],c;\n\tchar jieguo[100][7],jieguo1[7]=\"better\",jieguo2[7]=\"worse\",jieguo3[7]=\"same\";\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf%lf\",&a1,&a2);\n\tc=a2/a1;\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tstrcpy(jieguo[i],jieguo1);\n\t\t}\n\t\telse if(c-d[i]>0.05)\n\t\t{\n\t\t\tstrcpy(jieguo[i],jieguo2);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstrcpy(jieguo[i],jieguo3);\n\t\t}\n\t}\n\tfor(i=0;i0.05){\nprintf(\"better\\n\");}\nelse if(x-y>0.05){\nprintf(\"worse\\n\");}\nelse{\nprintf(\"same\\n\");}\n}\nreturn 0;\n}\n\n\n"} +{"label": "67", "index": "33441", "code": "void main()\n{\n\tint i,n;\n\tdouble l[100],a,b,t;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf%lf\",&a,&b);\n\tl[0]=b/a;\n\tfor(i=1;i5)printf(\"better\\n\");\n\t}\n\tscanf(\"%d\",&n);\n}"} +{"label": "67", "index": "33442", "code": "/*???2011-12-30\n *??????\n *????09.cpp\n *????? - ??(4-9) ?????\n */\n\n\nint main()\n{\n\tint n = 0;\n\tdouble total = 0;\n\tdouble valid = 0;\n\tdouble cocktail = 0.0;\n\tcin >> n;\n\tcin >> total >> valid;\n\tcocktail = valid / total;\n\tfor (int temp = 1; temp < n; temp++)\n\t{\n\t\tcin >> total >> valid;\n\t\tif ( (valid / total) > cocktail + 0.05 )\n\t\t\tcout << \"better\" << endl;\n\t\telse if ( (valid / total) < cocktail - 0.05 )\n\t\t\tcout << \"worse\" << endl;\n\t\telse\n\t\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33443", "code": "\nvoid main()\n{\n\tint i,n;\n\tfloat a[100],b[100],c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t\tt=1;\n\t\t}\n\t\tif(c1>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t\tt=1;\n\t\t}\n\t\tif(t==0){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33445", "code": "int main()\n{\n\tint n,i,j,a[100],b[100];\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=0){\n\t\t\tif(c[j]>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}else if(c[j]<0){\n\t\t\tc[j]=(-1)*c[j];\n\t\t\tif(c[j]>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33446", "code": "int main()\n{\n\tint i,n;\n\tdouble j[500],a[500][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(j[0]-j[i]>5)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif((j[i]-j[0]<=5)&&(j[0]-j[i]<=5))\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33447", "code": "int main()\n{\n int i,n;\n\tint bing[100],you[100];\n\tdouble c,d;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5.00)\n\t\t\tprintf(\"better\\n\");\n\t\telse if((c-d)>5.00)\n printf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33448", "code": "int main()\n{\n\tint n,i,total[100],youxiao[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{printf(\"better\\n\");}\n\t\telse if(x-y[i]>0.05)\n\t\t{printf(\"worse\\n\");}\n\t\telse\n\t\t{printf(\"same\\n\");}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33449", "code": "int main(){\n int i,j,m,n,a,b,c,d;\n double x,y;\n int num[10000],ok[10000];\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&a,&b);\n x=1.0*b/a;\n for(i=1;i0.05){\n printf(\"better\\n\");\n }\n else if((x-y)>0.05){\n printf(\"worse\\n\");\n }\n else{\n printf(\"same\\n\");\n }\n \n }\n return 0;\n}\n"} +{"label": "67", "index": "33450", "code": "int main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tint sz[100][2];\n\tdouble xl[100];\n\tfor(i=0;i0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(xl[0]-xl[i]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33451", "code": "int main(){\n\tint n,x,y,i;\n\tdouble jiwei,tmp;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d%d\",&x,&y);\n\tjiwei=1.0*y/x;\n\tfor (i=1;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if (jiwei-tmp>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\t\telse printf(\"same\\n\");\n\t\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33452", "code": "int main(){\nint i,k,sz[1000],sf[1000],n;\ndouble sc[1000];\nscanf(\"%d\",&n);\nfor(i=0;i0.05){\n\t\tprintf(\"better\\n\");\n\t}\n\telse if(sc[0]-sc[i]>0.05){\n\t\tprintf(\"worse\\n\");\n\t}\n\telse {printf(\"same\\n\");\n\t}\n}\nreturn 0;\n}\n"} +{"label": "67", "index": "33453", "code": "int main()\n{\n\tint i,x,n,a[100],b[100];\n\tfloat y[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\tprintf(\"better\\n\");\n\t\telse if(y[0]-y[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33454", "code": "int main()\n{\n int n;\n cin >> n;\n double a,b;\n cin >> a >> b;\n double c;\n c=b/a;\n int i=1;\n while(i> m >> n;\n double d=n/m;\n if((c-d)>0.05)\n {\n cout << \"worse\" << endl;\n }\n else if((d-c)>0.05)\n {\n cout << \"better\" << endl;\n }\n else\n {\n cout << \"same\" << endl;\n }\n }\n cin.get();cin.get();cin.get();\n return 0;\n}\n"} +{"label": "67", "index": "33455", "code": "int main(){\n\tint n,i;\n\tdouble a,b;\n\tscanf(\"%d\",&n);\n\tstruct lf{\n\t\tint x,y;\n\t}*lfs;\n\tlfs=(struct lf*)malloc(sizeof(struct lf)*n);\n\tfor (i=0;i0.05){\n\t\t\tprintf(\"\\nbetter\");\n\t\t}else if(a-b>0.05){\n\t\t\tprintf(\"\\nworse\");\n\t\t}else{\n\t\t\tprintf(\"\\nsame\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33456", "code": "int main()\n{\n\tint i,n,a[50],b[50];\n\tfloat c[50];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\tif(c[0]-c[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\tif(c[0]-c[i]<=0.05&&c[i]-c[0]<=0.05)\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33457", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint p, q;\n\tscanf(\"%d %d\",&p,&q);\n\tfloat e = (float)q/p;\n\tint i = 2;\n\twhile(i<=n)\n\t{\n\t\tint x, y;\n\t\tscanf(\"%d %d\",&x,&y);\n\t float f = (float)y/x;\n\t\tif((f-e<=0.05)&&(f-e>=-0.05))\n\t\t\tprintf(\"same\\n\");\n\t\telse if(f0.05)printf(\"better\\n\");\n\t\telse if(c[0]-c[i]>0.05)printf(\"worse\\n\");\n\t\telse{printf(\"same\\n\");}}\n\n \n}"} +{"label": "67", "index": "33459", "code": "int main()\n{\n\tint n,i,a[100],b[100];\n\tdouble c,d;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&a[0],&b[0]);\n\tc=(double)b[0]/a[0];\n\tfor(i=1;i(c+0.05))\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(d<(c-0.05))\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(d<=(c+0.05)&&d>(c-0.05))\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n\t\t\n"} +{"label": "67", "index": "33460", "code": "int main(){\nint n;\nscanf(\"%d\",&n);\nfloat x,y,a[2],b[2];\nscanf(\"%f%f\",&a[0],&a[1]);\nx=a[1]/a[0];\nint i;\nfor(i=0;i0.05)\nprintf(\"better\\n\");\nelse if(x-y>0.05)\nprintf(\"worse\\n\");\nelse\nprintf(\"same\\n\");\n}\nreturn 0;\n}"} +{"label": "67", "index": "33461", "code": "int main()\n{\n int n;\n scanf(\"%d\",&n);\n int a0,b0;\n scanf(\"%d %d\",&a0,&b0);\n double d=(double)b0/a0;\n for(int i=0;i=c)\n {\n if(d-c>0.05) printf(\"worse\\n\");\n else printf(\"same\\n\");\n }\n else\n {\n if(c-d>0.05) printf(\"better\\n\");\n else printf(\"same\\n\");\n }\n }\n}"} +{"label": "67", "index": "33462", "code": "int main()\n{\n\tdouble n=0,i=0,p=0,q=0,x=0,y=0;\n\tdouble z=0,w=0;\n\tcin >> n >> p >> q;\n\tz=q/p;\n\tfor(i=1;i> x >> y;\n\t\tw=y/x;\n\tif (w-z>=0.05)\n\t\tcout << \"better\"<=0.05)\n\t\tcout << \"worse\" <0.05) printf(\"better\\n\");\nelse if (f>0.05) printf(\"worse\\n\");\nelse if (e<=0.05&&f<=0.05) printf(\"same\\n\");\n}\nreturn 0;\n}\n"} +{"label": "67", "index": "33464", "code": "int main()\n{\n\tint i,n;\n\tcin>>n;\n\tfloat a[100],b[100];\n\tfor(i=0;i<=(n-1);i++)\n\t{\n\t\tcin>>a[i]>>b[i];\n\t}\n for(i=1;i<=(n-1);i++)\n\t{\n\t\tif(fabs((b[i]/a[i])-(b[0]/a[0]))<=5*(1e-2))\n\t\t{\n\t\t\tcout<<\"same\"<5*(1e-2))\n\t\t{\n\t\t\tcout<<\"better\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(k<0.05&&k>-0.05){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\tif(k<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33466", "code": "void main()\n{\n\tint n=0;\n\tint i=0;\n\tfloat zs_1=0,yx_1=0;\n\tfloat zs=0,yx=0;\n\tscanf(\"%d\",&n);\n\tscanf(\"%f%f\",&zs_1,&yx_1);\n\tfor(i=1;i0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse if((yx/zs-yx_1/zs_1)<0.05)\n\t\t\tprintf(\"same\\n\");\n\t\telse\n\t\t\tprintf(\"better\\n\");\n\t\tyx=0;\n\t\tzs=0;\n\t}\n}\n\n"} +{"label": "67", "index": "33467", "code": "int main()\n{\n\tint n,i=0;\n\tdouble x,y,a=0,b=0;\n\tcin>>n;\n\tfor(i=1;i<=1;i++)//??????\n\t{\n\t\tcin>>x>>y;\n\t\ta=y/x;//??????????\n\t}\n\tfor(i=2;i<=n;i++)//??????\n\t{\n\t\tcin>>x>>y;\n\t\tb=y/x;\n\t\tif(b-a>0.05)//??????????\n\t\t\tcout<<\"better\"<0.05)//??????????\n\t\t\tcout<<\"worse\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t if(bj[i]<-0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif((bj[i]>=-0.05)&&(bj[i]<=0.05)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\t\n\t\t\n\t\t\n\t\n\n\t\n\n\t\t\n\t\n"} +{"label": "67", "index": "33469", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n float sz[100][3];\n\tfor(int a=0;a0.05)\n\t\t\t\tprintf(\"better\\n\");\n\t\t\tif(sz[i][1]/sz[i][0]-sz[0][1]/sz[0][0]<-0.05)\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\tif(sz[i][1]/sz[i][0]-sz[0][1]/sz[0][0]>=-0.05&&sz[i][1]/sz[i][0]-sz[0][1]/sz[0][0]<=0.05)\n\t\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33470", "code": "int main()\n{\n int n;\n scanf(\"%d\",&n);\n int sz[n][2];\n double p[n];\n int i,j;\n for(i=0;i0.05){\n printf(\"better\\n\");\n }\n else if(p[0]-p[i]>0.05){\n printf(\"worse\\n\");\n }\n else{\n printf(\"same\\n\");\n }\n }\n return 0;\n}\n "} +{"label": "67", "index": "33471", "code": "int main()\n{\n\tdouble a[10000],b[10000];\n\tint i,n;\n\tcin>>n;\n\tcin>>a[0]>>b[0];\n\tfor(i=1;i>a[i]>>b[i];\n\t\tif(100*(b[i]/a[i]-b[0]/a[0])>5)cout<<\"better\"<<'\\n';\n\t\telse if(100*(b[0]/a[0]-b[i]/a[i])>5)cout<<\"worse\"<<'\\n';\n\t\telse cout<<\"same\"<<'\\n';\n\t}\n\tcout<0.05){\n\t\t\tprintf(\"better\\n\");}\n\t\telse if((x-y)>0.05){\n\t\t\tprintf(\"worse\\n\");}\n\t\telse if((y-x)<=0.05&&(x-y)<=0.05){\n\t\t\tprintf(\"same\\n\");}\n\t\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33473", "code": "float ample[N][2], effect[N];\nint main()\n{\n\tint n;\n\tcin>>n;\n\tfloat ample0=0, ample1=0, effect0=0;\n\tcin>>ample0>>ample1;\n\teffect0=ample1/ample0;\n\tfor(int i=0; i>ample[i][0]>>ample[i][1];\n\t\teffect[i]=ample[i][1]/ample[i][0];\n\t\tif(effect0-effect[i]>0.05) cout<<\"worse\"<0.05) cout<<\"better\"<0.05){\n\t\t\tprintf(\"better\\n\");\n\t\t}else if(x-y[k]>0.05){\n\t\t\tprintf(\"worse\\n\");\n\t\t}else{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33475", "code": "int main()\n{\n\tint n,i,j;\n\tint sz[1000][2];\n\tdouble s[1000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(s[0]-s[i]>0.05)\n printf(\"worse\\n\");\n\t\telse\n printf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33476", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tdouble a[n],b[n];\n\tfor(int i=0;i>a[i]>>b[i];\n\t}\n\tfor(int j=0;j0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\",y ,x);\n\t\t}\n\t\tif(x-y>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif(x-y<=0.05&&y-x<=0.05)\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33478", "code": "int main()\n{\n\tint n,i;\n\tdouble a,b;\n\tdouble sz[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if((sz[0]-sz[i])>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33479", "code": "int main ()\n{\n\tint i,n,a[100],b[100];\n\tfloat c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic[0])\n\t\t{\n\t\t\tif(c[i]-c[0]>0.05)\n\t\t\t\tprintf(\"better\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(c[0]-c[i]>0.05)\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\telse \n\t\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33480", "code": "int main()\n{\n\tint n,i;\n\tint a[100],b[100];\n\tdouble x;\nscanf(\"%d\",&n);\nfor(i=0;i1.0*b[i]/a[i]&&(x-1.0*b[i]/a[i]>0.05))\n\t{\n\t\tprintf(\"worse\\n\");\n\t}\n\telse if(x<1.0*b[i]/a[i]&&(1.0*b[i]/a[i]-x>0.05))\n\t{\n\t\tprintf(\"better\\n\");\n\t}\n\telse\n\t{\n\t\tprintf(\"same\\n\");\n\t}\n}\nreturn 0;\n}"} +{"label": "67", "index": "33481", "code": "int main()\n{\n\tint n,i;\n\tstruct jiegou\n\t{\n\t\tint a;\n\t\tint b;\n\t\tfloat x;\n\n\t}\n\tsz[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i5)\n\t\t\tprintf(\"better\\n\");\n\t\telse if(sz[0].x-sz[i].x>5)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33482", "code": "main()\n{\n int n;\n scanf(\"%d\",&n);\n int i;\n double m0,m,x,a[n+1],b[n+1],t0,t;\n for(i=0;i= m0)\n {\n x = m - m0;\n if(x > 0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n else\n {\n x = m0 - m;\n if(x >0.05) \n printf(\"better\\n\");\n else\n printf(\"same\\n\");\n }\n }\n}\n"} +{"label": "67", "index": "33483", "code": "/*\n * file practice 1_6\n * author ??\n * date 2010-11-12\n * description\n ????????????\n*/\n\n\n\nint main()\n{\n\tint n, x, y, i;\n\tfloat a0, a;\n\tcin >> n;\n\tcin >> y >> x;\n\ta0 = x / 1.0 / y;\n\tfor (i = 1; i <= n - 1; i ++)\n\t{\n\t\tcin >> y >> x;\n\t\ta = x / 1.0 / y;\n\t\tif (a - a0 > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t\telse \n\t\t\tif (a - a0 < -0.05)\n\t\t\t\tcout << \"worse\" <0.05)\n\t\t\t{\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tif(y[i]-x>0.05)\n\t\t\t\t{\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t\t}\n\t\t\t\n\t\t\t else\n\t\t\t\t{\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t}\n\n\tfree(y);\n\t\n\treturn 0;\n}"} +{"label": "67", "index": "33485", "code": "int main()\n{\n int n,i; //???n???i\n cin>>n; \n float s_all,s_good; //strandard\n cin>>s_all>>s_good; //??? \n float all,good; //????????? \n for (i=1;i<=n-1;i++)\n {\n cin>>all>>good;\n if (s_good/s_all-good/all>0.05) //????~ \n cout<<\"worse\"<0.05)\n cout<<\"better\"<<'\\n';\n else\n cout<<\"same\"<<'\\n';\n }\n return 0; //?? (>w<) \n}\n"} +{"label": "67", "index": "33486", "code": "int main()\n{\n\tint n,i;\n\tdouble sz1[100],sz2[100],k[100],j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(j-k[i]-0.05>0){\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\tif((j-k[i]-0.05<=0)&&(k[i]-j-0.05<=0)){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t\t\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33487", "code": "int main()\n{\n\tdouble sz[100],a[100],b[100];\n\tint i,n;\n\tscanf(\"%d\\n\",&n);\n\tfor(i=0;i5){\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\tif(a[i]-a[0]>-5&&a[i]-a[0]<5){\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n\n\n\n}"} +{"label": "67", "index": "33488", "code": "main()\n{\n int n;\n scanf(\"%d\",&n);\n float p0,q0;\n scanf(\"%d %d\",&p0,&q0);\n for(int i=1;i<=n-1;i++)\n {\n float p,q;\n scanf(\"%d %d\",&p,&q);\n if((q/p-q0/p0)<=0.05&&(q0/p0-q/p)<=0.05)\n printf(\"same\\n\");\n else if((q/p-q0/p0)>0.05)\n printf(\"better\\n\");\n else if((q0/p0-q/p)>0.05)\n printf(\"worse\\n\");\n }\n}"} +{"label": "67", "index": "33489", "code": "int main(){\n\tint n,i,a[100],b[100];\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0){\n\t\t\ty=1.0*b[i]/a[i];\n\t\t\tif(y-x>0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}\n\t\t\tif(x-y>0.05){\n printf(\"worse\\n\");\n\t\t\t}\n\t\t\telse if(x-y>=-0.05&&x-y<=0.05){\n printf(\"same\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33490", "code": "int main()\n\t{\n\tint n,i;\n\tfloat m,c,d;\n\tfloat a[100]={0},b[100]={0},h[100]={0};\n\tcin>>n;\n\tcin>>c>>d;\n\tfor (i=2;i<=n;i++)\n\t\t{\n\t\tcin>>a[i]>>b[i];\n\t\th[i]=b[i]/a[i];\n\t\t}\n m=d/c;\n\tfor (i=2;i<=n;i++)\n\t\t{\n\t\tif (h[i]-m>0.05)\n\t\t\tcout<<\"better\"<0.05)\n\t\t\tcout<<\"worse\"<0.05){\n\t\t\t\tprintf(\"better\\n\");\n\t\t\t}else if(c-d>0.05){\n\t\t\t\tprintf(\"worse\\n\");\n\t\t\t}else {\n\t\t\t\tprintf(\"same\\n\");\n\t\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "67", "index": "33492", "code": "int main()\n{\n\tint n;\n\tcin >> n;\n\tint testnum, successnum;\n\tfloat x = 0, y = 0;\n\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\tcin >> testnum >> successnum;\n\t\tif (i == 1)\n\t\t{\n\t\t\tx = 100.0 * successnum / testnum;\n\t\t}\n\t\tif (i >= 2)\n\t\t{\n\t\t\ty = 100.0 * successnum / testnum;\n\t\t\tif ((int)(y - x) >= 5)\n\t\t\t{\n\t\t\t\tcout << \"better\" << endl;\n\t\t\t}\n\t\t\telse if ((int)(x - y) >= 5)\n\t\t\t{\n\t\t\t\tcout << \"worse\" << endl;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcout << \"same\" << endl;\n\t\t\t}\n\t\t}\n\t\ty = 0;\n\t}\n\n\treturn 0;\n}"} +{"label": "67", "index": "33493", "code": "int main()\n{\n\tint n,i;\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tint **sz=(int**)malloc(sizeof(int*)*n);\n\tfor(i=0;i0.05)\n\t\t{\n\t\t\tprintf(\"better\\n\");\n\t\t}\n\t\telse if(x-y>0.05)\n\t\t{\n\t\t\tprintf(\"worse\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33494", "code": "int main()\n{\n\tint n, a, b, m, p, k= 0;\n\tdouble x, y;\n\tcin >> n;\n\tcin >> m >> p;\n\tx = (double)p / m;\n\tfor(k = 1; k < n; k++)\n\t{\n\t\tcin >> a >> b;\n\t y = (double)b / a;\n\t\tif(y - x > 0.05)\n\t\t\tcout << \"better\" << endl;\n\t if(x - y > 0.05)\n\t\t\tcout << \"worse\" << endl;\n\t\tif((y - x <= 0.05)&&(x - y <= 0.05))\n\t\t\tcout << \"same\" << endl;\n\t}\nreturn 0;\n}\n\n"} +{"label": "67", "index": "33495", "code": "\nint main() {\n\tint i, n;\n\tcin >> n;\n\tint x[n], y[n];\n\tfor (i = 0; i < n; i++)//??????\n\t\tcin >> x[i] >> y[i];\n\tfor (i = 1; i < n; i++) {//???????\n\t\tif ((y[0] * x[i] - y[i] * x[0]) > 0.05 * x[i] * x[0])\n\t\t\tcout << \"worse\" << endl;\n\t\telse if ((y[i] * x[0] - y[0] * x[i]) > 0.05 * x[i] * x[0])\n\t\t\tcout << \"better\" << endl;\n\t\telse\n\t\t\tcout << \"same\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "67", "index": "33496", "code": "int main()\n{\n int m,w;\n double v[2];\n double p[2];\n double v0,p0,c;\n scanf(\"%d\",&m);\n scanf(\"%lf %lf\",v,v+1);\n v0=v[1]/v[0];\n m--;\n for(w=0;w0.05)\n printf(\"better\\n\");\n else\n {\n if(c<-0.05)\n printf(\"worse\\n\");\n else\n printf(\"same\\n\");\n }\n }\n return 0;\n}\n"} +{"label": "67", "index": "33497", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\nint i,j;\ndouble c[10000][2];\nfor(i=0;i0.05){\n\nprintf(\"better\\n\");\n}\n if(a[0]-a[i]>0.05){\n\nprintf(\"worse\\n\");\n}\n if((0.05>(a[0]-a[i]))&&(0.05>(a[i]-a[0]))){\n\nprintf(\"same\\n\");\n}\n}\n\nreturn 0;}\n"} +{"label": "67", "index": "33498", "code": "void main()\n{\n\tint cases;\n\tdouble x,y,rate;\n\tscanf(\"%d\",&cases);\n\tcases--;\n\tscanf(\"%lf %lf\",&x,&y);\n\trate=y/x;\n\twhile(cases--){\n\t\tscanf(\"%lf %lf\",&x,&y);\n\t\tif(y/x-rate>0.05)printf(\"better\\n\");\n\t\telse if(rate-y/x>0.05)printf(\"worse\\n\");\n\t\telse printf(\"same\\n\");\n\t}\n}"} +{"label": "67", "index": "33499", "code": "int main()\n{\n\tint n,i,a[100],b[100];\n\tdouble c[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0.05)\n\t\t\tprintf(\"better\\n\");\n\t\telse\n\t\t{if(c[0]-c[i]>0.05)\n\t\t\tprintf(\"worse\\n\");\n\t\telse\n\t\t\tprintf(\"same\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\t\n"} +{"label": "68", "index": "33500", "code": "\nint main()\n{\n int n,i,j,pd(int x);\n scanf (\"%d\",&n);\n for (i=6;i<=n;i+=2)\n {\n for (j=3;j<=0.5*i;j=j+2)\n {\n if (pd(j) && pd(i-j)) \n {\n printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n }\n \n }\n }\n}\nint pd(int x)\n{\n int i;\n float y;y=x;\n for (i=3;i<=(int)sqrt(y);i+=2)\n {\n if (x%i==0) return 0;\n }\n return 1;\n}"} +{"label": "68", "index": "33501", "code": "int veget(int m)\n{\n\tint a,i;\n\ta=1;\n\tfor(i=2;i<=(int)sqrt(m);i++)\n\t{\n\t\tif(m%i==0) \n\t\t{\n\t\t\ta=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn(a);\n}\nmain()\n{\n int i,j,n;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n\t for(j=3;j<=i/2;j++)\n\t {\n\t\t if(veget(j)==1&&veget(i-j)==1) break;\n\t }\n\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n }\n \n}"} +{"label": "68", "index": "33502", "code": "void main()\n{\n int x,k,n,i=3,j,a;\n\n scanf(\"%d\",&a);\n for(x=6;x<=a;x+=2)\n {\n k=3;\n do\n {\n\t //9i=3;\n for(n=k;;n+=2)\n {\n for(i=3;i<=sqrt(n);i+=2)\n {\n if(n%i==0)\n break;\n }\n\t if(i>sqrt(n))\n\t\t break;\n\t }\n for(j=3;j<=sqrt(x-n);j+=2)\n {\n if((x-n)%j==0)\n break;\n }\n k=n+2;\n }while(j<=sqrt(x-n));\n printf(\"%d=%d+%d\\n\",x,n,x-n);\n }\n}"} +{"label": "68", "index": "33503", "code": "int a[100000]={0};\nint f(int y)\n{\n\tint t,i;\n\tt=sqrt(y);\n for(i=2;i<=t;i++)\n\t{\n\t\t\tif(y%i==0)\n\t\t\t\tbreak;\n\t}\n\tif(i>t)\n\t return 1;\n\telse\n\t\treturn 0;\n}\nint main(int argc, char* argv[])\n{\n\tint n,z;\n\tscanf(\"%d\",&n);\n\tint i,j,k,x=0;\n\tfor(j=2;j<=n;j++)\n\t{\n\t\tk=sqrt(j);\n\t\tfor(z=2;z<=k;z++)\n\t\t{\n\t\t\tif(j%z==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(z>k)\n\t\t{\n\t\t\ta[x]=j;\n\t\t\tx++;\n\t\t}\n\t}\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=0;j<=x;j++)\n\t\t{\n\t\t\tif(f(i-a[j]))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,a[j],i-a[j]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcontinue;\n\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33504", "code": "int sushu(int a)\n{\n\tint i;\n\tdouble b;\n\tb=sqrt(a);\n\tif (a%2==0)\n\t\treturn 0;\n\telse\n\t{\n\t\tfor (i=3;i<=b;i=i+2)\n\t\t{\n\t\t\tif (a%i==0)\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n}\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i,j;\n\tint a;\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tfor (j=3;j<=i;j++)\n\t\t{\n\t\t\tif (sushu(j))\n\t\t\t{\n\t\t\ta=i-j;\n\t\t\tif (sushu(a))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,a);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33505", "code": "void main()\n{\n\tlong n,a=6,b=3,i,j,k,l,c,d;\n\tscanf(\"%ld\",&n);\n\twhile(a<=n)\n\t{\n\t\ti=3;printf(\"%ld=\",a);\n\t\twhile(i<=a/2)\n\t\t{j=3;d=3;k=0;l=0;\n\t\t\twhile(j<=sqrt(i))\n\t\t\t{if((i%j)==0)k++;j=j+2;\n\t\t\t}if(k==0)\n\t\t\t{c=a-i;\n\t\t\twhile(d<=sqrt(c))\n\t\t\t{if((c%d)==0)l++;d=d+2;\n\t\t\t}if(l==0){printf(\"%ld+%ld\\n\",i,c);break;}\n\t\t\t}\n\t\t\ti=i+2;\n\t\t}\n\t\ta=a+2;\n\t}\n}\n"} +{"label": "68", "index": "33506", "code": "int sushu(int n)\n{\n int i,s=1;\n for(i=2;i<=sqrt(n);i++)\n if(n%i==0) \n {\n s=0;\n break;\n }\n return(s);\n}\nmain()\n{\n int n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n for(j=3;j<=i/2;j++)\n if(sushu(j)&&sushu(i-j))\n {\n\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\tbreak;\n } \n}\n"} +{"label": "68", "index": "33507", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tint i,j,k;\n\tfor(i=4;i<=n;i+=2)\n\t{ int count=0; //???N???????\n\n\t\tint c;\n\t\tc=i/2;\t\n\n\t\tfor(j=3;j<=c&&count==0;j+=2) //? 3? i?????j\n\t\t{ \t\t\n\t\t\tdouble genhao1,genhao2;\n\t\t\tgenhao1=sqrt(j);\n\t\t\tint temp=0;\t\t\t\n\t\t\t\n\t\t\tfor( k=3; k<=genhao1 ; k++ )\n\t\t\t{\n\t\t\t\tif(j%k==0)\n\t\t\t\t\ttemp+=1;\n\t\t\t}\n\t\t\tif(temp==0)\n\t\t\t{\n\t\t\t\tint er,temp2=0;\n\t\t\t\ter=i-j;\n\t\t\t\tgenhao2=sqrt(er);\n\t\t\t\tfor(k=3;k<=genhao2;k++)\t\n\t\t\t\t\tif(er%k==0)\t\n\t\t\t\t\t\ttemp2+=1;\t\t\n\t\t\t\tif(temp2==0)\n\t\t\t\t{\n\t\t\t\t\tcout<> n ;\n if ( n % 2 == 1) n = n - 1 ;\n for (int i = 6 ; i <= n ; i = i + 2)\n {\n a = 3;\n b = i - a ;\n do\n {\n sushu = 1;\n for (int j = 3; j <= sqrt(a) ; j = j + 2)\n if (a % j == 0 ) sushu = 0 ;\n if (sushu == 1)\n {\n for (int k = 3; k <= sqrt (b) ; k = k + 2)\n if (b % k == 0) sushu = 0 ;\n }\n if (sushu == 1) {cout << i << '=' << a << '+' << b << endl; break;}\n else {a = a + 2 ; b = b - 2;}\n }while (sushu != 1);\n }\n return 0;\n }\n\n "} +{"label": "68", "index": "33510", "code": "int prime(int m)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(m);i++)\n\t\tif(m%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\t}\n\tif(i>sqrt(m)) return 1;\n}\nvoid main()\n{\n\tint i,n;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tint j,k;\n\t\tfor(j=3;j3)\n\t\tfor(i=2;i<=sqrt(x);i++)\n\t\t\tif(x%i==0)\n\t\t\t{\n\t\t\t\tj=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse j=0;\n\tif(x<=3)\n\t\tj=0;\n\tif(j==0)\n\t\treturn (x);\n\telse return 0;\n}\nint main()\n{\n\tint n,a,b,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tprintf(\"%d=\",i);\n\t\tfor(j=2;j<=n;j++)\n\t\t{\n\t\t\tint s,t;\n\t\t\ts=j;t=i-j;\n\t\t\tif((panduan(s)!=0)&&(panduan(t)!=0))\n\t\t\t{\n\t\t\t\tprintf(\"%d+%d\\n\",s,t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33512", "code": "main()\n{\n\tlong n,i,a,b,c,d;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(a=3;a<=i;a+=2)\n\t\t{\n\t\t\tb=3;\n\t\t\tfor(;b<=sqrt(a);b+=2)\n\t\t\tif(a%b==0) break;\n\t\t\tif(b>sqrt(a))\n\t\t\t{\n\t\t\t\tc=i-a;\n\t\t\t\td=3;\n\t\t\t\tfor(;d<=sqrt(c);d+=2)\n\t\t\t\t\tif(c%d==0) break;\n\t\t\t\t\tif(d>sqrt(c)) {printf(\"%ld=%ld+%ld\\n\",i,a,c);break;}\n\t\t\t}\n\t\t}\n\t\n\t}\n}"} +{"label": "68", "index": "33513", "code": "int main()\n{\n\tint m = 6, n, odd;\n\tint prime(int x);\n\tscanf(\"%d\", &n);\n while(m <= n)\n\t{\n\t\todd = 3;\n\t\twhile(odd < m)\n\t\t{\n\t\t\tif(prime(odd) == 1)\n\t\t\t{\n\t\t\t\tif(prime(m - odd) == 1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\", m, odd, m - odd);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\todd += 2;\n\t\t\t}\n\t\t\telse\n\t\t\t\todd += 2;\n\t\t}\n\t m += 2;\n\t}\n return 0;\n}\n\nint prime(int x)\n{\n\tint i;\n\tfor(i=3;i<=sqrt(x)+1;i+=2)\n\t{\n\t\tif(x%i == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t}\n return 1;\n}\n\n"} +{"label": "68", "index": "33514", "code": "int main()\n{\n\tint n,i,t,a[80000]={0},sum=0;\n\tcin>>n;\n\t\tfor(i=2;i=0;i++)\n\t\t{\n\t\t\tif(a[i]==1)\n\t\t\t\tcontinue;\n\t\t\t\tif(a[n-i-t]==0)\n\t\t\t\t{\n\t\t\t\t\tcout<k) \n\t\t{\n\t q=p-j;\n \t k=sqrt(q);\n\t for(t=3;t<=k;t++)\n\t\t\tif(q%t==0) break;\n\t\tif(t>k) {printf(\"%d=%d+%d\\n\",p,i,j);break;}\n\t\t}\n\t }\n\t}\n}"} +{"label": "68", "index": "33516", "code": "int sushu(int n)\n{\n\tint i,j;\n\tdouble h;\n\n\tif(n==2) return 1;\n\th=sqrt(n)+1;\n\tj=(int)h;\n\tfor(i=3;i<=j;i=i+2)\n\t{\n\t\tif(n%i==0) \n\t\treturn 0;\n\t}\n\treturn 1;\n}\nint main()\n{\n\tint n,i;\n\tint m;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(m=3;m<=i/2;m=m+2)\n\t\t{\tif(sushu(m)&&sushu(i-m))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,m,i-m);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n\n}\n"} +{"label": "68", "index": "33517", "code": "int R(int *p,int n)\n{\n int i,m=0;\n if(p[n]==0)\n {\n for(i=2;i<=(int)sqrt(n);i++)\n if(n%i==0) m++;\n if(m==0) p[n]=1;\n else p[n]=2;\n }\n if(p[n]==1) return 1;\n else if(p[n]==2) return 2;\n}\nvoid Find(int *p,int n)\n{\n int i;\n if(R(p,n-2)==1) printf(\"%d=%d+%d\\n\",n,2,n-2); \n else\n {\n for(i=3;i<=n/2;i+=2)\n if(R(p,i)==1&&R(p,n-i)==1) break;\n if(R(p,i)==1&&R(p,n-i)==1) printf(\"%d=%d+%d\\n\",n,i,n-i);\n } \n}\nmain()\n{\n int n,m;\n int *p;\n scanf(\"%d\",&m);\n p=(int*)malloc((m)*sizeof(int));\n memset(p,0,sizeof(p));\n p[2]=1;\n for(n=6;n<=m;n+=2)\n Find(p,n);\n free(p);\n}"} +{"label": "68", "index": "33518", "code": "//******************************************************************\n//*?????????? *\n//*????????n?n <= 50000??? *\n// ?6 ~ n????????????????? *\n//*?????? *\n//*???2010?10?20? *\n//******************************************************************\nint main()\n{\n\tint n, x, i;\n\tcin >> n;\n\tint godbah(int); //?godbah??????\n\tfor (i = 6; i <= n; i = i + 2) //??????????\n\t{\n\t\tx = godbah(i);\n\t\tcout << i << '=' << x << '+' << i - x << endl;\n\t}\n\t\n\treturn 0;\n}\nint prime(int n) //??????prime???????????\n{\n\tint i, p = 1, k = (int) sqrt(n);\n\tfor (i = 2; i <= k; i ++) //for????\n\t{\n\t\tif (n % i == 0) //?????????????p??0\n\t\t{\n\t\t\tp = 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn p; //??p?\n}\nint godbah(int n) //??godbah?????????????????\n{\n\tint a, q;\n\tfor (a = 3; a <= n / 2; a = a + 2)\n\t{\n\t\tif (prime(a) == 1 && prime(n - a) == 1)//?????????????????????\n\t\t{\n\t\t\tq = a;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn q;\n}\n\n"} +{"label": "68", "index": "33519", "code": "int main()\n{\n int i,j,n;\n int c1=1,c2=1;\n int k,b;\n scanf(\"%d\",&n);\n n=n/2*2;\n for(i=6;i<=n;i+=2)\n {\n for(j=3;j<=i/2;j+=2)\n { \n c1=1;c2=1;\n b=sqrt(j);\n for(k=3;k<=b;k+=2)\n if(j%k==0)c1=0;\n b=sqrt(i-j);\n for(k=3;k<=b;k+=2)\n if((i-j)%k==0)c2=0; \n if(c1&&c2)\n {\n printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n }\n}\n }\n}\n"} +{"label": "68", "index": "33520", "code": "void main() \n{ \nint i,n,j,k,m,l=0,yinru; \nscanf(\"%d\",&yinru);\nfor(i=6;i<=yinru;i+=2) \n{ \nfor(n=2;nsqrt(b))\n\t\t\t\t{\n\t\t\t\t\tc=a-b;\n\t\t\t for(i=2;i<=sqrt(c);i++)\n\t\t\t\tif(c%i==0)break;\n\t\t\t\tif(i<(sqrt(c)+1)&&i>sqrt(c))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",a,b,c);\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \t }\n\n\t}\n}"} +{"label": "68", "index": "33522", "code": "\nint main()\n{\n\tint a,s;\n scanf(\"%d\",&a);\n for(s=6;s<=a;s=s+2)\n\t{ int i1,i2;\n\tfor(i1=3;i1<=s;i1=i1+2)\n\t{i2=s-i1;\n\tint t,p,a,b;\n\tt=(int)sqrt(i1);\n\tp=(int)sqrt(i2);\n\tfor(a=2;a<=t;a++)\n\t{if(i1%a==0) break;}\n\tfor(b=2;b<=p;b++)\n\t{if(i2%b==0) break;}\n\tif(a>t&&b>p)\n\t{printf(\"%d=%d+%d\\n\",s,i1,i2); \n\tbreak;}\n\t}\n\t\n\t}\n\n\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33523", "code": "int isprime(double n)\n{\n\tlong s,i;\n\tif(n<2)\n\t{\n\t\treturn 0;\n\t}\n\ts=(double)sqrt(n);\n\tfor(i=2;i<=s;++i)\n\t{\n\t\tif((int)n%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\nvoid main()\n{\n\tlong i, j, n; \n\tscanf(\"%ld\", &n);\n\t for(i = 6; i <= n; i += 2)\n\t {\n for(j = 2; j <= i / 2; ++j)\n\t\t{\n\t\t\tif(isprime(j) && isprime(i - j))\n\t\t\t{\n\t\t\t\t printf(\"%ld=%ld+%ld\\n\", i, j, i - j); \n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t }\n}"} +{"label": "68", "index": "33524", "code": "void main()\n{\n\tlong m,n,i,j,k,x,t=1;\n\tscanf(\"%ld\",&n);\n\tfor(m=6;m<=n;m=m+2)\n\t{\n\t\tfor(i=2;i<=m/2;i++)\n\t\t{\n\t\t\n\t\t\tk=sqrt(i);\n\t\t\tfor(j=2;j<=k;j++)\n\t\t\t\tif(i%j==0) break;\n\t\t\tif(j>=k+1)\n\t\t\t{\n\t\t\t\tx=m-i;\n\t\t\t\t\n\t\t\t\tk=sqrt(x);\n\t\t\t\tfor(j=2;j<=k;j++)\n\t\t\t\t\tif(x%j==0) break;\n\t\t\t\tif(j>=k+1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",m,i,x);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n"} +{"label": "68", "index": "33525", "code": "int main()\n{\n int i,j,k;\n int n;\n int p=0,q=0;\n\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n\n for(j=3;j<=i/2;j=j+2)\n {\n p=0;\n q=0;\n for(k=2;ksqrt(n))\n\tt=1;\nelse\n t=0;\n}\nreturn (t);\n}\n\nvoid main()\n{\nint a,b,c,d,e,f,j;\nscanf(\"%d\",&f);\nfor(a=6;a<=f;a=a+2)\n{\n\n\nfor(j=3;j<=a/2;j=j+2)\n{\n\tb=sushu(j);\n\tc=sushu(a-j);\n\tif(b==1&&c==1)\n\t{\n\t\td=j;\n\t\te=a-j;\n\t\tbreak;\n\t}\n}\nprintf(\"%d=%d+%d\\n\",a,d,e);\n\n}\n}"} +{"label": "68", "index": "33528", "code": "int main()\n{\n\tint n , i , k1 , k2 , r1 , r2 , m , a , b;\n\tcin >> n;\n\tfor (i = 6; i <= n; i = i + 2)\n\t{\n\t\tfor (m = 3; m <= i / 2; m = m + 2)\n\t\t{\n\t\t\tk1 =(int) sqrt((double)m); \n\t\t\tfor (r1 = 2; r1 <= k1; r1 ++) \n\t\t\t{\n\t\t\t\tif (m % r1 == 0) \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (r1 == k1 + 1)\n\t\t\t{\n\t\t\t\ta = m;\n\t\t\t\tb = i - m;\n\t\t\t\tk2 =(int) sqrt((double)b); \n\t\t\t\tfor (r2 = 2; r2 <= k2; r2 ++) \n\t\t\t\t{\n\t\t\t\t\tif (b % r2 == 0) \n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (r2 == k2 + 1)\n\t\t\t\t{\n\t\t\t\t\tcout << i << \"=\" << a << \"+\" << b << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\t\t\t\t"} +{"label": "68", "index": "33529", "code": "void main()\n{\n\tint n,i,m,q,j,k,l,r;\n\tscanf(\"%d\",&n);\n\ti=6;\n\twhile (i<=n) \n\t{\n\t\tm=3;\n\t\tq=1;\n\t\twhile ((m<=(i/2))&&(q==1))\n\t\t {\n\t\t\tj=2;\n k=1;\n\t\t while ((j<=sqrt(m))&&(k==1))\n\t\t\t {\n\t\t\t if (m%j==0) k=0;\n\t\t\t j++;\n\t\t\t }\n\t\t if (k==1) \n\t\t\t {\n\t\t\t\tl=i-m;\n\t\t\t\tj=2;\n r=1;\n\t\t while ((j<=sqrt(l))&&(r==1))\n\t\t\t\t {\n\t\t\t if (l%j==0) r=0;\n\t\t\t j++;\n\t\t\t\t }\n\t\t\t\tif (r==1) \n\t\t\t\t {\n\t\t\t\t\tq=0;\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,m,l);\n\t\t\t\t }\n\t\t\t }\n\t\t\tm++;\n\t\t }\n\t\ti=i+2;\n\t}\n}\n\n\t\t\t\n\t\t"} +{"label": "68", "index": "33530", "code": "int susu(int a)\n{\n\tif(a%2==0)\n\t\treturn 0;\n\tint i,k=1;\n\tfor(i=3;i<=sqrt(a);i=i+2)\n\t\tif(a%i==0)\n\t\t\tk=0;\n\t\treturn k;\n}\nint main()\n{\n\tint n,m,l,z,x;\n\tcin>>n;\n\tfor(z=6;z<=n;z=z+2)\n\t\tfor(l=3;l<=(z/2);l=l+2)\n\t\t{\n\t\t\tif(susu(l)+susu(z-l)==2)\n\t\t\t{cout<x)\n\t\t{\n\t\t sx=1; \n\t\t}\n\t}\n\treturn sx; \n}\n\n\n\n\n\n\n\n"} +{"label": "68", "index": "33533", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint n;\n int t;\n\tint i,j,k,count;\n\tint a,b;\n\tint tag=0;\n\tscanf(\"%d\",&n);\n\n\tfor(t=6;t<=n;t=t+2)\n\t{ tag=0;\n\t\n \n\t\tfor(j=2;;j=j+1)\n\t\t{\n\t\t\tif(tag!=1)\n\t\t\t{\n\t\n\t\t\ta=sqrt(j)+2;\n\t\t\t\n\t\t\tfor(k=2;k=a)\n\t\t\t\t{\n\t\t\t\t\tb=sqrt(t-j)+2;\n\t\t\t\t\n for(i=2;i=b)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t tag=1;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t }\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse break;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\n\t\tprintf(\"%d=%d+%d\\n\",t,j-1,t-j+1);\n\t}\n\n\t \n\t\t\t\n\n\n\n\n\n\n\treturn 0;\n}\n"} +{"label": "68", "index": "33534", "code": "int primenumber(int n)\n{\n int l,k;\n k=(int)sqrt(n);\n for(l=3;l<=k;l++)\n {\n\t if(n%l==0)\n\t {\n return 0;\n\t }\n\n } \n return 1; \n}\nint main()\n{\n\tint m,k,b,i;\n scanf(\"%d\",&m);\n\tk=(int)sqrt(m);\n\tfor(i=6;i<=m;i=i+2)\t\n\t{\n\t for(b=3;b<=i/2;\tb=b+2)\n\t\t{\n\t\t\tif(primenumber(b)&&primenumber(i-b))\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",i,b,i-b);\n\t}\n \t\t\t\t \n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33535", "code": "\nint prime(int x)\n{\n\tint prime=1,i;\n\tfor(i=2;i<=sqrt(x);i++)\n\t{\n\t\tif(x%i==0)\n\t\t{\n\t\t\tprime=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn prime;\n}\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i,j;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;j<=i/2;j=j+2)\n\t\t{\n\t\t\tif(prime(j)==1&&prime(i-j)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33536", "code": "main()\n{\n\tint n,i,k,m,p,q;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(k=3;k<=i/2;k=k+2)\n\t\t{\n\t\t\tm=i-k;\n\t\t\tfor(p=3;p<=sqrt(k);p=p+2)\n\t\t\t\tif(k%p==0) break;\n\t\t\tfor(q=3;q<=sqrt(m);q=q+2)\n\t\t\t\tif(m%q==0) break;\n\t\t\tif(p>=(((int)sqrt(k))+1)&&q>=(((int)sqrt(m))+1))\n\t\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,k,m);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse continue;\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33537", "code": "\nint sushu(int k)\n{\n\tint i;\n\tdouble m;\n\tif(k>10)\n\t\tm =sqrt(k);\n\telse\n\t\tm=k-1;\n\tif(k%2==0)\n\t\treturn 0;\n\tfor(i=3;i<=m;i+=2)\n\t{\n\t\tif((k%i)==0)\n\t\t\tbreak;\n\t}\n\tif(i<=m)\n\t\treturn 0;\n\telse \n\t\treturn 1;\n}\n\n\nint main()\n{\n\tint n,x,j,k;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k+=2)\n\t{\n\t\tfor(x=3;x<=k;x++)\n\t\t{\n\t\t\tj=k-x;\n\t\t\tif(sushu(x)&&sushu(j))\n\t\t\t{\t\n\t\t\t\tprintf(\"%d=%d+%d\\n\",k,x,j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t\n\t\n\t\n\t\n\treturn 0;\n}"} +{"label": "68", "index": "33538", "code": "void main()\n{\n\tint a,i,j,x1=1,n;\n\tscanf(\"%d\",&n);\n\tfor (a=6;a<=n;a=a+2)\n\tfor(i=2;i<=a;i++)\n\t\tif ((i==2)||(i%2==1))\n\t\t{\n\t\t\tx1=1;\n\t\t\t\tfor(j=2;j<=sqrt(i-1)+1;j++)\n\t\t\t\tif (i%j==0) {x1=0;break;}\n\t\t\t\tif (x1)\n\t\t\t\t\tfor(j=2;j=k+1)\n\t\t\t\t{\n\t\t\t\t\tb=i;\n\t\t\t\t c=a-b;\n\t\t\t\t\tp=sqrt(c);\n\t\t\t\t\tfor(m=3;m<=p;m=m+2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(c%m==0)break;\n\t\t\t\t\t}\n\t\t\t\t\tif(m>=p+1)\n\t\t\t\t\t{\n\t\t\t\t\t\tq=c; \n\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",a,b,q);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33540", "code": "int main(){\n\tlong int n;\n\tscanf(\"%d\",&n);\n\tlong int k,a,b,c,d,e=1,f,g[100000]={2,3},h;\n\tfor(k=3;k<=n;k+=2){\n\t\tc=(int)sqrt(k);\n\t\tfor(b=3;b<=c;b++)\n\t\t if(k%b==0) goto b;\n\t\te++;\n\t\tg[e]=k;\nb:;}\n for(d=6;d<=n;d+=2){\n\t\tfor(f=1;f<=e;f++){\n\t\t\tfor(h=e;h>=0;h--){\n\t\t\t\tif(d==g[f]+g[h]){printf(\"%d=%d+%d\\n\",d,g[f],g[h]);goto a;}\n\t\t\tif(d>n)break;}\n\t\t}\na:;\t}\n\t\t\n\treturn 0;\n}"} +{"label": "68", "index": "33541", "code": "int ss(int n)\n{\n\tint i,s;\n\ts=0;\n\ti=2;\n\tif(n==2||n==3) return 1;\n\t\n\tdo\n\t{\n\t\ti++;\n\tif(n%i==0) s++;\n\t}\n\twhile(i*i>n;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;j<=i/2;j=j+2)\n\t\t\tif(prime(j)&&prime(i-j))\n\t\t\t{\n\t\t\t\tcout<=k+1)\n\t {\n\t l=sqrt(a-m);\n for(j=2;j<=l;j++)\n\t if((a-m)%j==0)\n\t\t break;\n\t\t if(j>=l+1)\n\t\t {\n\t\t printf(\"%d=%d+%d\",a,m,a-m);\n\t\t printf(\"\\n\");\n\t\t c=1;\n\t\t }\n\t\t else\n\t\t\t c=0;\n\t }\n\t if(c==1)\n\t\t break;\n\t }\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33547", "code": "int prove(int x)\n{\nint y=1,i;\nif(x%2==0) y=0;\nelse\nfor(i=3;i<=sqrt(x);i++)\n\t{if(x%i==0) y=0;\n\t}\nreturn(y);\n}\nvoid gede(unsigned int i,unsigned int j)\n{\t unsigned int x,y,k,l;\n\tfor(k=3;k<=i/2;k=k+2)\n\t\t{\n\t\tl=i-k;\n\t\tint prove(int x);\n\t\tx=prove(k);\n\t\ty=prove(l);\n\t\tif(x==1&&y==1)\n\t\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",i,k,l);\n\t\t\tbreak;\n\t\t\t}\n\t\t}\nif(isqrt(n)) return 1;\n\t\telse return 0;\n}\n\nint print(int n,int i)\n{\n\tprintf(\"%d=%d+%d\\n\",n,i,n-i);\n\treturn 0;\n}\n\nint main()\n{\n\tint k,i,m,n;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k=k+2)\n\t{\n\tif(prime(k-2)==1)\n\t\tprint(k,2);\n\telse\n\t{\n\t\tfor(i=3;i<=k/2;i=i+2)\n\t\t\tif(prime(i)==1&&prime(k-i)==1)\n\t\t\t{\n\t\t\t\tprint(k,i);\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33550", "code": "int main()\n{\n int n;\n int i,j,k;\n int x;\n int p,q;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n for(j=3;j<=i/2;j=j+2)\n {\n p=0;\n for(k=2;ksqrt(a))\n\t\t\treturn (1);\n\t\telse\n\t\t\treturn(0);\n\t}\n\n\n\n\n"} +{"label": "68", "index": "33553", "code": "void main()\n{\n\tlong n,a,b,i,k,m;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\t for(a=3;a<=(long)(i/2);a++)\n\t\t\t\n\t\t {\n\t\t\t b=i-a; \n\t\t\t for(k=2;k<=sqrt(a);k++)\n\t\t\t {\n\t\t\t\tif(a%k==0)break;\n\t\t\t } \n\t\t\t for(m=2;m<=sqrt(b);m++)\n\t\t\t {\n\t\t\t\tif(b%m==0)break;\n\t\t\t }\t\n\t\t\t if(k>sqrt(a)&&m>sqrt(b))\n\t\t\t {\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,a,b);\n\t\t\t\tbreak;\n\t\t\t }\n\t\t }\n\t \n\t\t \n\t}\n}\n"} +{"label": "68", "index": "33554", "code": "int ss(int x) /*???????*/\n{\n int k,y,z;\n k=(int)sqrt(x);\n\n for(y=3;y<=k;y=y+2)\n if(x%y==0)break;\n if(y>k)z=1;else z=0;\n return(z) ;\n}\n\nvoid main()\n{\n int n,i; /* i????????n??? */\n int p,m; /*p?????????m=n-p*/\n scanf(\"%d\",&n);\n for(i=6;i<=n;i+=2)\n {\n p=3;\n while(p0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\n\n\treturn 0;\n}\n"} +{"label": "68", "index": "33556", "code": "main()\n{\n long int n,k,i,j,t,s;\n scanf(\"%ld\",&n);\n for(k=6;k<=n;k++)\n {\n if(k%2==0)\n {\n for(i=3;i=s+1) return 1;\n}"} +{"label": "68", "index": "33558", "code": "\nint prime(int x);\n\nint main()\n{\n\tint a,j,i;\n\tscanf(\"%d\",&a);\n\tfor(i=6;i<=a;i=i+2)\n\t{\n\t\tfor(j=3;j<=(a/2);j=j+2)\n\t\t{\n\t\t if(prime(j)+prime(i-j)==2)\n\t\t\t{\n\t\t\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t break;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nint prime(int x)\n{\n\tint i;\n\tint isprime=1;\n\tif(x==3||x==5||x==7)\n\t{\n\t\treturn isprime;\n\t}\n\telse\n\t{\n\t\tfor(i=3;i<=sqrt(x);i=i+2)\n\t\t{\n\t\t\tif(x%i==0)\n\t\t\t{\n\t\t\t\tisprime=0;\n\t\t\t\treturn isprime;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn isprime;\n}"} +{"label": "68", "index": "33559", "code": "void main()\n{\n\tint n,i,j,a,b,m,k,l;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tm=0;\n\t\tk=0;\n\t\tprintf(\"%d=\",i);\n\t\tfor(a=3;a<=i/2;a=a+2)\n\t\t{\n\t\t\tm=0;\n\t\t\tk=0;\n\t\t\tb=i-a;\n\t\t\tfor(l=3;l<=sqrt(a);l=l+2)\n\t\t\t{\n\t\t\t\tif(a%l!=0)\n\t\t\t\t{m=m+1;}\n\t\t\t\tk=k+1;\n\t\t\t}\n\t\t\tif (m==k)\n\t\t\t{\n\t\t\n\t\t\t\tm=0;\n\t\t\t\tk=0;\n\t\t\t\tfor(j=3;j<=sqrt(b);j=j+2)\n\t\t\t\t{\n\t\t\t\t\tif(b%j!=0)\n\t\t\t\t m=m+1;\n\t\t\t\t k=k+1;\n\t\t\t\t}\n\t\t\t\tif(m==k)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d+%d\\n\",a,b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33560", "code": "int sushu(long a)\n{\n\tlong i,temp;\n\tif(a==2||a==3)\n\t\treturn 1;\n\tif(a%2==0)\n\t\treturn 0;\n\ttemp=(int)sqrt(a);\n\tfor(i=3;i<=temp;i+=2)\n\t\tif(a%i==0)\n\t\t\tbreak;\n\tif(i>temp)\n\t\treturn 1;\n\treturn 0;\n}\nvoid main()\n{\n\tlong n,i,j;\n\tscanf(\"%ld\",&n);\n\tfor(j=6;j<=n;j+=2)\n\t{printf(\"%d=\",j);\n\tfor(i=2;i<=j/2;i++)\n\t\tif(sushu(i)&&sushu(j-i))\n\t\t{printf(\"%d+%d\\n\",i,j-i);break;}\n\t}\n}"} +{"label": "68", "index": "33561", "code": "int sushu(int x){\n\tint b,i=0;\n\tfor(b=2;b<=sqrt(x);b++){\n\t\tif(x%b==0){\n\t\t\ti++;\n\t\t\tbreak;\n\t\t}\n\t\telse continue;\n\t}\n\tif(i==0)\n return 0;\n\telse return x;\n}\nint main(int argc, char* argv[])\n{\nint n,x,b,c;\nscanf(\"%d\\n\",&n);\nfor(x=6;x<=n;x+=2){\n\tfor(b=2;b<=x/2;b++){\n\t\t\tc=x-b;\n\t\t if(sushu(b)==0&&sushu(c)==0){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",x,b,c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse continue;\n\t}\n}\n\t\n\treturn 0;\n}"} +{"label": "68", "index": "33562", "code": "void main()\n{\n\tlong a,k,i;\n int f(long x);\n\tscanf(\"%ld\",&a);\n\tfor (i=6;i<=a;i=i+2) \n\t\tfor(k=3;k<=i/2;k=k+2)\n\t\t{\n\t\t\tif(f(k)==0&&f(i-k)==0) \n\t\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,k,i-k);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n}\nint f(long x)\n{\n\tint j,sum;\n\tsum=0;\n\tfor(j=3;j<=floor(sqrt(x));j=j+2)\n\t\tif (x%j==0) {sum=1;break;}\n\treturn(sum);\n}\n\t"} +{"label": "68", "index": "33563", "code": "void main()\n{\n\tlong int n,a,b,k,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(a=3,b=i-3;a<=b;a=a+2,b=b-2)\n\t\t{\n\t\t\tfor(j=3;j=a/2&&k>=b/2)break;\n\t\t}\n\t\tif(a<=b)printf(\"%ld=%ld+%ld\\n\",i,a,b);\n\t}\n}"} +{"label": "68", "index": "33564", "code": "void main()\n{\n\tunsigned i,n;\n\tint checkN(unsigned);\n\tscanf(\"%u\",&n);\n\tfor(i=6; i<=n; i+=2)\n\t{\n\t\tunsigned j=0,k=0;\n\t\tfor(j=3; j<=i-3;j++)\n\t\t{\n\t\t\tif(checkN(j)==1 && checkN(i-j)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%u=%u+%u\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\nint checkN(unsigned n)\n{\n\tif(n%2==0)\n\t\treturn 0;\n\telse\n\t{\n\t\tunsigned i;\n\t\tfor(i=3; i<=sqrt(n); i+=2)\n\t\t{\n\t\t\tif(n%i==0)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(i>sqrt(n))\n\t\t\treturn 1;\n\t}\n}\n"} +{"label": "68", "index": "33565", "code": "void main()\n{\n\tlong int n,i,j,k,l,t,s,a,b;\n\tscanf(\"%ld\",&n);printf(\"\\n\");\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\t\n\t\tfor(k=3;k<=i;k=k+2)\n\t\t{\n\t\t\tfor(j=3;j<=sqrt(k);j++)\n\t\t\t{\n\t\t\t\tif(k%j==0)break;\n\t\t\t}\n\t\t\tif(j>sqrt(k))\n\t\t\t{b=i-k;\n\t\t\tfor(l=2;l<=sqrt(b);l++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(b%l==0)break;\n\t\t\t}\n\t\t\tif(l>sqrt(b))\n\t\t\t{printf(\"%ld=%ld+%ld\\n\",i,k,b);break;}}\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33566", "code": "int IsPrime(int m)\n{\n\tint k,i;\n\tk=sqrt(m);\n\tif(m==2) return 1;\n\tif(m%2!=0)\n\t{\n\t\tfor(i=3;i<=k;i=i+2)\n\t\t if(m%i==0)\n\t\t\t break;\n\t if(i==k+2||i==k+1)\n\t\t return 1;\n\t else return 0;\n\t}\n}\n\nvoid f(int n)\n{\n\tint p,q,i;\n\tif(p==2&&IsPrime(n-2)==1) \n\t\tprintf(\"%d=2+%d\\n\",n,n-2);\n\tfor(i=3;i<=n/2;i++)\n\t{\n\t\tp=i;\n\t\tq=n-p;\n\t\tif(IsPrime(p)==1&&IsPrime(q)==1){\n\t\t\tprintf(\"%d=%d+%d\\n\",n,p,q);\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvoid main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\ti=6;\n\twhile(i<=n)\n\t{\n\t\tf(i);\n\t\ti=i+2;\n\t};\n}"} +{"label": "68", "index": "33567", "code": "void main()\n{\n int n,i,j;\n int a[50001];\n scanf(\"%d\",&n);\n for (i=2;i<=n;i++)\n {\n\t a[i]=0;\n\t for (j=2;j<=(int) sqrt(i);j++)\n\t\t if (i%j==0) {a[i]=1;break;}\n }\n for (i=6;i<=n;i=i+2)\n for (j=3;j<=i/2;j=j+2)\n if (a[j]==0 && a[i-j]==0) {printf(\"%d=%d+%d\\n\",i,j,i-j);break;}\n}"} +{"label": "68", "index": "33568", "code": "main()\n{\n int i,j,k,m,n;\n int su(int a);\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n for(j=3;j<=n;j=j+2)\n {\n if(su(j)&&su(i-j))\n {printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;}\n }\n }\n \n }\nint su(int a)\n{\n int i,k;\n k=sqrt(a);\n for(i=3;i<=k;i=i+2)\n if(a%i==0)\n return 0;\n return 1;\n }\n"} +{"label": "68", "index": "33569", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,a,b,c=0,d;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(a=2;a<=(i/2);a++)\n\t\t{\n\t\t\tc=0;\n\t\t\tfor(b=2;b<=(sqrt(a));b++)\n\t\t\t{\n\t\t\t\tif(a%b!=0)\n\t\t\t\t\tc=c;\n\t\t\t\telse\n\t\t\t\t{c++;\n\t\t\t\tbreak;}\n\t\t\t}\n d=i-a;\n\t\t\tfor(b=2;b<=(sqrt(d));b++)\n\t\t\t{\n\t\t\t\tif(d%b!=0)\n\t\t\t\t\tc=c;\n\t\t\t\telse\n\t\t\t\t{c++;\n\t\t\t\tbreak;}\n\t\t\t}\n\t\t\t\n\t\t\tif(c==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,a,d);\n\t\t\t break;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33570", "code": "int check(int k)\n{\n\tint x;\n\tif((k%2==0)&&(k!=2))\n\t\treturn 0;\n\tfor(x=3;x<=sqrt(k);)\n\t{\n\t\tif(k%x==0)\n\t\t\tbreak;\n\t\tx+=2;\n\t}\n\tif(x>sqrt(k))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nvoid main()\n{\n\tint n,i,j,m;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;)\n\t{\n\t\tfor(j=2;;j++)\n\t\t{\n\t\t\tif(check(j))\n\t\t\t{\n\t\t\t\tm=i-j;\n\t\t\t\tif(check(m))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,m);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ti+=2;\n\t}\n}\n\n\n"} +{"label": "68", "index": "33571", "code": "int main()\n{\n\tint h,k,s,m,n;\n\tint a,b,t=4;\n\tscanf(\"%d\" , &n );\n\tfor(t=6;t<=n;t=t+2)\n\t{\n\t\tfor(a=2;a<=t/2;a++)\n\t\t{\n\t\t\tm=0;\n\t\t\tfor(k=1;k<=sqrt(a);k++)\n\t\t\t{\n\t\t\t\tif (a%k==0) m=m+k;\n\t\t\t}\n\t\t\tif (m==1)\n\t\t\t{\n\t\t\t\ts=0;\n\t\t\t\tb=t-a;\n\t\t\t\tfor(h=1;h<=sqrt(b);h++)\n\t\t\t\t{\n\t\t\t\t\tif(b%h==0) s=s+h;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(s==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\" , t , a , b);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\t\n"} +{"label": "68", "index": "33572", "code": "main()\n{int sushu(int i); \n int n,e,i,j,k,p,q,d;\n scanf(\"%d\",&n);\n for(p=6;p<=n;p=p+2)\n {for(e=2;ek) { \n\n\t\t\t\tt=sqrt((double)(i-j));\n\t\t\t\tfor(q=2;q<=t;q++)\n\t\t\t\t\tif((i-j)%q==0)\n\t\t\t\t\t\tbreak;\n\t\t\t\tif(q>t)\n\t\t\t\t\tbreak;\n\t\t\t\telse \n\t\t\t\t\tcontinue;\n\t\t\t}else\n\t\t\t\tcontinue;\n\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",i,j,(i-j));\t\n\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "68", "index": "33575", "code": "/**\n *file ????????\n *author ???\n *date 10.23\n *function ???????????????????n?n <= 50000??? \n ?6 ~ n??????????????????\n*/\nint main()\n{\n\tint n, i, q, p, k;\n\tcin >> n;\n\tfor(k = 6; k <= n; k = k+2)\n\t{\n\t\tfor(i = 2; i <= sqrt((double)(k-2)); i++)\t\t\t//???????n???2+?n-2????\n\t\t{\t\n\t\t\tif((k-2) % i == 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(i > sqrt((double)(k-2)))\n\t\t{\n\t\t\tcout< sqrt((double)i))\t\t\t\t\t\t\t\t\t\t\t//????????\n\t\t\t{\n\t\t\t\tfor(p = 2; p <= sqrt((double)(k-i)); p++)\t\t\t\t\t//????????????\n\t\t\t\t{\n\t\t\t\t\tif((k-i) % p == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(p > sqrt((double)(k-i)))\n\t\t\t\t{\n\t\t\t\t\tcout << k << \"=\" << i << \"+\" << (k-i) << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t \t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33576", "code": "void main()\n{\n\tint k,i,j,t,s,n;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(k=3;k<=i/2;k=k+2)\n\t\t{\n\t\t\tj=3;\n\t\t\twhile(k%j!=0 && j<=sqrt(k)) j=j+2;\n\t\t\tif(j>sqrt(k))\n\t\t\t{\n\t\t\t\tt=i-k;\n\t\t\t\tif (t%2==0) continue;\n\t\t\t\ts=3;\n\t\t\t\twhile(t%s!=0 && s<=sqrt(t)) s=s+2;\n\t\t\t\tif(s>sqrt(t))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,k,t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33577", "code": "main()\n{\n\tint flag[50001];\n\tint i,j,k,m,p,q,s;\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a[50000];\n\tflag[3]=1;\n\tfor(i=3;i<50001;i=i+2)\n\t{\n\t\tflag[i]=1;\n\t}\n\tfor(i=3;i<=223;i+=2)\n\t{\n\t\tif(flag[i])\n\t\tfor(k=i*i;k<50001;k+=i)\n\t\t\tflag[k]=0;\n\t}\n\tm=0;\n\tfor(j=3;j<50001;j+=2)\n\t{\n\t\tif(flag[j])\n\t\t{\n\t\t\tm=m+1;\n\t\t\ta[m]=j;\t\t\t\n\t\t}\n\t}\n \n\tfor(j=6;j<=n;j+=2)\n\t{\n\tprintf(\"%d=\",j);\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tif(flag[j-a[i]])\n\t\t{\n\t\t\tprintf(\"%d+%d\\n\", a[i],j-a[i]);\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t}\t\n\t}\n\t\n}"} +{"label": "68", "index": "33578", "code": "int prime(int n)\n{\n\tint i;\n\tif(n%2==0) return 0;\n\tfor(i=3;i<=sqrt(n);i+=2)\n\t\tif(n%i==0)\n\t\t\treturn 0;\n\treturn 1;\n}\nvoid print(int n)\n{\n\tint i;\n\tfor(i=2;isqrt(s)&&s%2!=0)\n\t\t\t{_s=num-s;\n\t\t\tfor(i=3;i<=sqrt(_s);i+=2)\n\t\t\t\tif(_s%i==0)\n\t\t\t\t\tbreak;\n\t\t\t\tif(i>sqrt(_s)&&s%2!=0)\n\t\t\t\t{printf(\"%d=%d+%d\\n\",num,s,_s);break;}}}\n}"} +{"label": "68", "index": "33580", "code": "int su(int z)\n {\n int i=2,t=0,k=sqrt(z);\n for(i=2;i<=k;i++)\n { \n if(z%i==0)\n break;\n }\n if(i>k) t=1;\n return t;\n}\nint main()\n{\n int n,m,i,j;\n scanf(\"%d\",&m);\n for(n=6;n<=m;n+=2)\n { \n for(i=3;i<=n/2;i+=2)\n { j=n-i;\n if(su(i)&&su(j))\n {printf(\"%d=%d+%d\\n\",n,i,j);\n break;}\n }\n }\n getchar();\n getchar();\n return 0;\n}\n"} +{"label": "68", "index": "33581", "code": "main()\n{\n\tint n,k,A,B,a,b,p,q;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k=k+2)\n\t{\n\t\tfor(A=3;A<=k/2;A=A+2)\n\t\t{\n\t\t\tfor(a=3;a<=sqrt(A);a=a+2)\n\t\t\t\tif(A%a==0)break;\n\t\t\t\tif(a>sqrt(A)) B=k-A;\n\t\t\t\tfor(b=3;b<=sqrt(B);b=b+2)\n\t\t\t\t\tif(B%b==0)break;\n\t\t\t\t\tif(b>sqrt(B))\n\t\t\t\t\t{\n\t\t\t\t\t\tp=A;\n\t\t\t\t\t\tq=B;\n\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",k,p,q);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33582", "code": "int main()\n{\n\tint n , i , ii , j ,jj , q , k , kk; \n\tcin >> n;\n\tfor(i = 6;i <= n; i += 2)\n\t{\n\t\tii = i / 2; \n\t\tfor(j = 3;j <= ii;j++)\n\t\t{\n\t\t\tjj = sqrt((float)j);\n\t\t\tfor (q = 2;q <= (int)jj;q++)\n\t\t\t\tif (j % q == 0) break;\n\t\t\tif (q == (jj+1))\n\t\t\t{\n\t\t\t\tk = i - j;\n\t\t\t\tkk = sqrt((float)k);\n\t\t\t\tfor (q = 2;q <= (int)kk;q++)\n\t\t\t\t\tif (k % q == 0) break;\n\t\t\t\tif (q == (kk+1))\n\t\t\t\t{\n\t\t\t\t\tcout << i << \"=\" << j << \"+\" << k << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n\t\n}"} +{"label": "68", "index": "33583", "code": "long int check(long int n)\n{\n\tif(n==1)return 0;\n\tif(n==2)return 1;\n\tint j;\n\tfor(j=2;j<=(int)sqrt(n);j++)if(n%j==0)return 0;\n\treturn 1;\n}\nint main()\n{\n\tlong int n,i;\n scanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tint j;\n\t\tfor(j=3;j=k+1)\n\t\t{\n\t\t\tb=d-a;\n\t\t\tt=sqrt(b);\n for (j = 2; j <= t; j++)\n\t\t\t{\n\t\t\t\tif(b%j==0) \n\t\t\t\t break;\n\t\t\t}\n\t\t\t if(j>=t+1) \n\t\t\t {\n\t\t\t\t printf(\"%ld=%ld+%ld\\n\",d,a,b);\n\t\t\t\t break;\n\t\t\t }\n\t\t}\n\t }\n\t}\nreturn 0;\n}\n"} +{"label": "68", "index": "33585", "code": "int main()\n{\n\tint n,i,x=2,y,m,t=1;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2) {\n\t\n\t\tfor (x=3;x<=(i/2);x++) {\n\t\t\t\tt=1;\n\t\t\t\tif (x%2==0)\n\t\t\t\t\tt=0;\n\t\t\t\telse {\n\t\t\tfor (m=3;m<=sqrt(x);m+=2) {\n\t\t\t\tif (x%m==0)\n\t\t\t\t\tt=0;\n\t\t\t}\n\t\t\t\t}\n\t\t\tif (t==1) {\n\t\t\t\ty=i-x;\n\t\t\t\tif (y%2==0)\n\t\t\t\t\tt=0;\n\t\t\t\telse {\n\t\t\t\tfor (m=3;m<=sqrt(y);m+=2) {\n\t\t\t\tif (y%m==0)\n\t\t\t\t\tt=0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (t==1) {\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,x,y);\n\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "68", "index": "33586", "code": "\nint sushu(int a)\n{ int i,gha;\n if (a%2==0)\n\t{ \n\t\treturn 0;\n\t}\n gha=(int)sqrt(a);\n\tfor (i=3;i<=gha;i+=2)\n\t{\n\t\tif (a%i==0) return 0;\n\t}\n\treturn 1;\n}\n\nint main()\n{\n\tint n,i,j;\n scanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2)\n\t{\n\t\tfor (j=2;j<=i/2;j++)\n\t\t{ \n\t\t\tif (sushu(j) && sushu(i-j))\n\t\t\t{ printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t break;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "68", "index": "33587", "code": "int main()\n{\n\tlong n;\n\tscanf(\"%ld\",&n);\n\tlong su[25000];\n\tlong i,j,num=0;\n\tfor(i=2;i<25001;i++)\n\t{\n\t\tfor(j=2;j<=sqrt(i);j++)\n\t\t{\n\t\t\tif(i%j==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(j>sqrt(i))\n\t\t{\n\t\t\tsu[num]=i;\n\t\t\tnum++;\n\t\t}\n\t}\n\tlong a,b;\n\tfor(a=6;a<=n;a+=2)\n\t{\n\t\tfor(i=0;;i++)\n\t\t{\n\t\t\tb=a-su[i];\n\t\t\tfor(j=2;j<=sqrt(b);j++)\n\t\t\t{\n\t\t\t\tif(b%j==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(j>sqrt(b))\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",a,su[i],b);\n\t\t\tif(j>sqrt(b))\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33588", "code": "int sushu(int a)\n{\nint i,m;\nif(a==2||a==3)\n\t{\t\n\treturn(1);\n\t}\nelse\n{\nm=sqrt(a);\nfor(i=2;i<=m;i++)\n\t{\n\tif(a%i==0)\n\tbreak;\n\t}\n\tif(i>m)\n\treturn(1);\n\telse\n\treturn(0);\n}\n}\nvoid main()\n{\n\tint n,j,k,d,e;\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j=j+2)\n\t{\n\tfor(k=2;k>n;\n\tfor(i=6;i<=n;i++)\n\t{\n\t\tif(i%2==0)\n\t\t{\n\t\t\tfor(temp1=2;temp1>n;\n for(i=6;i<=n;i=i+2){\n for(j=3;j<=i;j=j+2){\n if(pp(j)==0&&pp(i-j)==0){\n cout<=j+1)\n {k=sqrt(b);\n for(i=2;i<=k;i++)\n if(b%i==0) {a=a+2;goto loop;}\n if(i>=k+1)\n printf(\"%d=%d+%d\\n\",m,a,b);\n }\n m=m+2;\n }\n}\n"} +{"label": "68", "index": "33593", "code": "int main()\n{\n\tint n,i,p,q,j,m;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(p=3;p<=(i/2);p=p+2)\n\t\t{\n\t\t\tq=i-p;\n\t\t\tfor(j=3;j=((int)sqrt(p)+1)&&m>=((int)sqrt(q)+1))\n\t\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,p,q);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse continue;\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "68", "index": "33594", "code": "\nint main()\n{\n\tlong n,i,j,k,x;\n\tint y;\n\tscanf(\"%d\",&n);\n\tfor(i=2;i<=n;i=i+2)\n\t{\n\t\tfor(j=2;j<=i;j++)\n\t\t{\n\t\t\tif (j==2) \n\t\t\t{\n\t\t\t\tx=i-2;\n\t\t\t\tif (x!=1)\n\t\t\t\t{\n y=1;\n\t\t\t\t\n\t\t\t\tfor (k=3;k<=sqrt(x);k=k+2)\n\t\t\t\t{\n\t\t\t\t\tif ((x%k)==0) {y=0;break;}\n\t\t\t\t}\n\t\t\t\tif (x%2==0)\n\t\t\t\t\ty=0;\n\t\t\t\tif (y==1) printf(\"%d=2+%d\\n\",i,x);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ty=1;\n\t\t\t for (k=3;k<=sqrt(j);k=k+2)\n\t\t\t\t{\n\t\t\t\t if ((j%k)==0) {y=0;break;}\n\t\t\t\t}\n if (j%2==0) \n\t\t\t\t\ty=0;\n\t\t\t if (y==1) \n\t\t\t\t{\n\t\t\t\t x=i-j;\n\t\t\t\t if (x!=1)\n\t\t\t\t\t {\n\t\t\t\t\t y=1;\n for (k=3;k<=sqrt(x);k=k+2)\n\t\t\t\t\t {\n\t\t\t\t\t if ((x%k)==0) {y=0;break;}\n\t\t\t\t\t }\n if (x%2==0)\n\t\t\t\t\t\t y=0;\n\t\t\t\t\t if (y==1) \n\t\t\t\t\t {\n\t\t\t\t\t\t printf(\"%d=%d+%d\\n\",i,j,x);break;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33595", "code": "void main()\n{\n\tint n,i,i1,j,j1,k,a,p;\n\tscanf(\"%d\",&n);\n\tfor(a=6;a<=n;a=a+2)\n\t{\n\t\tfor(i=3;i<=a;)\n\t\t{\n\t\t\ti1=i;\n\t\t\tfor(p=3;p<=sqrt(i);p=p+2)\n\t\t\t{\n\t\t\t\tif(i%p==0)\n\t\t\t\t\ti=i/p;\n\t\t\t}\n\t\t\tif(i==i1)\n\t\t\t{\t\n\t\t\t\tj=j1=a-i;\n\t\t\t\tfor(k=3;k<=sqrt(j);k=k+2)\n\t\t\t\t{\n\t\t\t\t\tif(j%k==0)\n\t\t\t\t\tj=j/k;\n\t\t\t\t}\n\t\t\t\tif(j==j1)\n\t\t\t\t\t{printf(\"%d=%d+%d\\n\",a,i,j);break;}\n\t\t\t\telse i=i+2;\n\t\t\t}\n\t\t\telse i=i1+2;\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33596", "code": "main()\n{\n\tlong a,b,m,n,i,j;\n\tscanf(\"%ld\",&n);\n\tfor(m=6;m<=n;m=m+2)\n\t {a=3;b=m-3;\n\t abc:for(i=2;i<=sqrt(a);i++)\n\t if(a%i==0){a=a+2;b=b-2;goto abc;}\n\t for(j=2;j<=sqrt(b);j++)\n\t if(b%j==0){a=a+2;b=b-2;goto abc;}\n\t printf(\"%ld=%ld+%ld\\n\",m,a,b);\n\t }\n}"} +{"label": "68", "index": "33597", "code": "int main()\n{\n\tlong n,i,a,b,c,d,e,f;\n\tscanf(\"%ld\",&n);\n\ti=6;\n\twhile (i<=n)\n\t{\n\t\ta=3;\n\t\te=1;\n\t\tf=1;\n\t\twhile ((a<=i/2)&(e!=0||f!=0))\n\t\t{\n\t\t\tb=i-a;\n\t\t\tc=3;\n\t\t\td=3;\n\t\t\te=0;\n\t\t\tf=0;\n\t\t\twhile (c<=sqrt(a))\n\t\t\t{\n\t\t\t\tif (a%c==0)\n\t\t\t\t\te=e+1;\n\t\t\t\telse\n\t\t\t\t\te=e;\n\t\t\t\tc++;\n\t\t\t}\n\t\t\twhile (d<=sqrt(b))\n\t\t\t{\n\t\t\t\tif (b%d==0)\n\t\t\t\t\tf=f+1;\n\t\t\t\telse\n\t\t\t\t\tf=f;\n\t\t\t\td++;\n\t\t\t}\n\t\t\ta=a+2;\n\t\t}\n\t\tprintf(\"%ld=%ld+%ld\\n\",i,a-2,b);\n\t\ti=i+2;\n\t}\n}\n"} +{"label": "68", "index": "33598", "code": "int main()\n{\n\tint n,a[60000],i,j;\n\tcin>>n;\n\ta[1]=1;\n\tfor (i=2;i<=n;i++)\n\t\ta[i]=a[i-1]+1;\n\tfor (i=2;i<=n;i++)\n\t\tif (a[i]!=0)\n\t\t\tfor (j=2;j*i<=n;j++)\n\t\t\t\ta[j*i]=0;\n\tfor (j=6;j<=n;j+=2)\n\t\tfor (i=3;i<=j/2;i++)\n\t\t\tif (j==a[i]+a[j-i])\n\t\t\t{\n\t\t\t\tcout<> n;\n\tfor (i=6;i<=n;i++)\n\t{\n\t\tif ((i%2)==0)\n\t\t{\n\t\t\tfor (j=2;j<=i/2;j++)\n\t\t\t{\n\t\t\t\tk=(int)sqrt((double)j);\n\t\t\t\tif ((j%2)!=0)\n\t\t\t\t{\n\t\t\t\t\tfor (m = 3 ; m <= k ; m+=2) //????\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\tif ((j%m)==0) break; //??????? \n\t\t\t\t\t}\n\t\t\t\t\tif (m>k) \n\t\t\t\t\t{\n\t\t\t\t\t\tl=i-j;\n\t\t\t\t\t\tk1=(int)sqrt((double)l);\n\t\t\t\t\t\tif ((l%2)!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (m1 = 3 ; m1 <= k1 ; m1+=2) //????\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tif ((l%m1)==0) break; //??????? \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m1>k1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << i << \"=\" << j << \"+\" << l << endl;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33600", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint i,p;\n\tint x,n;\n\tint f,g;\n\tint primep,primeq;\n\tscanf(\"%d\",&x);\n\t\n\tfor(n=6;n<=x;n++)\n\t{\n\t\tif(n%2==0)\n\t\t{\n\t\t for(p=2;p1&&p<=(n-p)){printf(\"%d=%d+%d\\n\",n,p,n-p);break;}\n\t\t\n\t\t\t}\n\t\t }\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33601", "code": "int prime(int x);\nvoid main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;jsqrt(x))\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n"} +{"label": "68", "index": "33602", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint i,j,k=1,l,n,m,flag;\n\tint a[25000],b[25000],c[25000]={0};\n\ta[0]=3;\n\tc[3]=1;\n\tscanf(\"%d\",&n);\n\tfor(i=5;i<=n;i=i+2)\n\t\tfor(j=3;jsqrt(i))\n\t\t\t{\n\t\t\t\ta[k]=i;\n\t\t\t\tc[a[k]]=1;\n\t\t\t\tk++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=0;j<=k;j++)\n\t\t{\n\t\t\tif(c[i-a[j]]==1)\n\t\t\t{\tprintf(\"%d=%d+%d\\n\",i,a[j],i-a[j]);\n\t\t\tbreak;}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33603", "code": "void main ()\n{\n\tint n,f[30000];\n\tint i,j,k,l;\n\tint a=0,b=0,c,temp; \n\tint x,y;\n\n\n\tscanf(\"%d\",&n);\n\n\tfor(i=6;i<=n;i++)\n\t{\n\t\tif(i%2==0)\n\t\t{\n\t\t\tf[a++]=i;\n\t\t}\n\t}\n\n\tfor(i=0;i<=a;i++)\n\t{\n\t\tfor(j=3;j=x+1)\n\t\t\t{\n\t\t\t\ttemp=f[i]-j;\n\t\t\t\ty=sqrt(temp);\n\t\t\t\tfor(l=2;l<=y;l++)\n\t\t\t\t{\n\t\t\t\t\tif(temp%l==0)break;\n\t\t\t\t}\n\t\t\t\tif(l>=y+1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",f[i],j,temp);break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33604", "code": "\nint su(int k);\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint f = 6;\n\tint k;\n\twhile(f<=n)\n\t{\n\t\tint i = 2;\n\t\twhile(i<=(f/2))\n\t\t{\n\t\t\tif ( su(i) == 1 )\n\t\t\t{\n\t\t\t\tk = f - i;\n\t\t\t\tif ( su (k) == 1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",f,i,k);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tf += 2;\n\t}\n\treturn 0;\n}\n\nint su(int k)\n{\n\tint i;\n\tfor(i = 2; i <= sqrt(k);i++)\n\t{\n\t\tif( k%i == 0 )\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n"} +{"label": "68", "index": "33605", "code": "int main()\n{\n\tint n,i,k,j,m,a;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;jsqrt(j))\n\t\t\t {\n\t\t \tm=i-j;\n\t\t\t }\n\t\t \tfor(a=2;a<=sqrt(m);a++)\n\t\t\t{\n\t \tif(m%a==0)\n\t\t\t break;\n\t\t\t}\n\t\t if(a>sqrt(m))\n\t\t\t {\n\t\t \tprintf(\"%d=%d+%d\\n\",i,j,m);\n\t\t\t\tbreak;\n\t\t\t }\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33606", "code": "int main()\n{\n\tint shisushu(int j);\n\tint n,i,j,p,k;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=2;j<=(i/2);j++)\n\t\t{\n\t\t\tif(shisushu(j)&&shisushu(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\nint shisushu(int j)\n{\n\tint k,p;\n\tif(j==2||j==3||j==5||j==7||j==11||j==13||j==17)return 1;\n\telse{\n\tk=sqrt(j);\n\tfor(p=2;p<=k;p++)\n\t\tif(j%p==0)break;\n\t\tif(p>k)return 1;}\n\treturn 0;\n}"} +{"label": "68", "index": "33607", "code": "int prime(int n)\n{\n\tint i=0, t=0;\n\tfloat f=0;\n\tf=sqrt(n);\n\tt=(int)f;\n\tif(n<=10)\n\t{\n\t\tif((n==2)||(n==3)||(n==5)||(n==7)) return(1);\n\t\telse return(0);\n\t}\n\telse\n\t{\n\t\tif(n%2==0) return(0);\n\t\telse\n\t\t{\tfor(i=3;i<=t;i++)\n\t\t\t{\n\t\t\t\tif(n%i==0) break;\n\t\t\t}\n\t\t\tif(i==t+1) return(1);\n\t\t\telse return(0);\n\t\t}\n\t}\n}\nvoid divide(int a)\n{\n\tint i;\n\tfor(i=2;i<=a;i++)\n\t{\n\t\tif((prime(i)==1)&&(prime(a-i)==1))\n\t\t\tbreak;\n\t}\n\tprintf(\"%d=%d+%d\\n\", a, i, a-i);\n}\nint main()\n{\n\tint m, n;\n\tint i, j;\n\tscanf(\"%d\", &m);\n\tif(m>=6)\n\t{\n\t\tfor(i=6;i<=m;i=i+2)\n\t\t\tdivide(i);\n\t}\n}"} +{"label": "68", "index": "33608", "code": "int main()\n{\n\tint n,g=1,i,j,l,y,k1,k2,k3;\n\tcin >>n;\n\tn=2*(n/2);\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tk1=n/2;\n\t\ty=i-2;\n\t\tk2=(int)sqrt((double)y);\n\t\tfor(j=2;j<=k2;k2++)\n\t\t{\n\t\t\tg=1;\n\t\t\tif (y%j==0)\n\t\t\t{\n\t\t\t\tg=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (g==1)\n\t\t{\n\t\t\tcout << i<<\"=\"<<\"2+\"<a)\n\t\t { t=m-i;\n\t\t b=sqrt(t);\n\t\t for (j=2;j<=b;j++)\n\t\t\t\t if (t%j==0) break;\n\t\t\tif (j>b)\n\t\t\t{\tprintf(\"%d+%d\\n\",i,t);\n\t\t\tbreak;}\n\t\t }\n\t\t }\n\t}\n\t\n}\n}"} +{"label": "68", "index": "33615", "code": "int main(int argc, char* argv[])\n{\n\tlong n,i,j,k,x;\n\tint asd;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=2;j<=i;j++)\n\t\t{\n\t\t\tif (j==2) \n\t\t\t{\n\t\t\t\tx=i-2;\n\t\t\t\tif (x!=1)\n\t\t\t\t{\n asd=1;\n\t\t\t\t\n\t\t\t\tfor (k=3;k<=sqrt(x);k=k+2)\n\t\t\t\t{\n\t\t\t\t\tif ((x%k)==0) {asd=0;break;}\n\t\t\t\t}\n\t\t\t\tif (x%2==0) asd=0;\n \n\t\t\t\tif (asd==1) printf(\"%d=2+%d\\n\",i,x);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tasd=1;\n\n\n\t\t\t for (k=3;k<=sqrt(j);k=k+2)\n\t\t\t\t{\n\t\t\t\t if ((j%k)==0) {asd=0;break;}\n\t\t\t\t}\n if (j%2==0) asd=0;\n\t\t\t if (asd==1) \n\t\t\t\t{\n\t\t\t\t x=i-j;\n\t\t\t\t if (x!=1)\n\t\t\t\t\t {\n\t\t\t\t\t asd=1;\n\n for (k=3;k<=sqrt(x);k=k+2)\n\t\t\t\t\t {\n\t\t\t\t\t if ((x%k)==0) {asd=0;break;}\n\t\t\t\t\t }\n if (x%2==0) asd=0;\n\t\t\t\t\t if (asd==1) {printf(\"%d=%d+%d\\n\",i,j,x);break;}\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t\n\t\n\t\t\n\n\n\treturn 0;\n}"} +{"label": "68", "index": "33616", "code": "int isprime(int p)\n{\n\tint i;\n\tif(p%2==0)\n\t{\n\t\tif(p==2)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\tfor(i=3;i<=sqrt(p);i=i+2) \n\t{\n\t\tif(p%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n\n\nint main()\n{\n\tint isprime1,isprime2;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j=j+2)\n\t{ \n\t\tfor(i=3;i<=j/2;i=i+2) \n\t\t{\n\t\t\tisprime1 = isprime(i);\n\t\t\tisprime2 = isprime(j-i);\n\t\t\tif(isprime1==1 && isprime2==1)\n\t\t\t{\n printf(\"%d=%d+%d\\n\",j,i,j-i);\n\t\t\t break;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33617", "code": "int panduan(long int n)\n{\n\tlong int i;\n\tif(n==1) return 0;\n\telse \n\t{\n\t\tfor(i=2;i<=sqrt(n);i++)\n\t\t\tif(n%i==0) break;\n\t\tif(i<=sqrt(n)) return 0;\n\t\telse return 1;\n\t}\n}\nvoid main()\n{\n\tlong int n,x,i;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(x=3;x<=n/2;x=x+2)\n\t\t{\n\t\t\tif(panduan(x))\n\t\t\t\tif(panduan(i-x))\n\t\t\t\t{printf(\"%d=%d+%d\\n\",i,x,i-x);break;}\n\t\t}\n\n\t}\n}"} +{"label": "68", "index": "33618", "code": "int sushu(int a)\n{\n int x=(int) sqrt(a);\n int i;\n int k=1;\n for (i=2;i<=x;i++)\n {\n if (a%i!=0) k=1;\n else\n {\n k=0;\n break;\n }\n }\n return k;\n}\nmain()\n{\n int n;\n scanf (\"%d\",&n);\n int i,j,k;\n for (i=6;i<=n;i=i+2)\n {\n for (j=3;j<=i-j;j=j+2)\n {\n if (sushu(j)==1&&sushu(i-j)==1)\n { printf (\"%d=%d+%d\\n\",i,j,i-j); break; }\n }\n }\n}\n"} +{"label": "68", "index": "33619", "code": "\nint n;\nint a[100000];\nint u;\nint b[100000];\n\nint zs(int x)\n{\n for(int i=2;i<=sqrt(x);i++)\n {\n if(x%i==0)\n return 0;\n }\n return 1;\n}\n\nvoid inits()\n{\n a[1]=0;\n u=0;\n for(int i=2;i<=n;i++)\n {\n if(zs(i))\n {\n a[i]=1;\n u++;\n b[u]=i;\n }\n else\n a[i]=0;\n }\n return ;\n}\n\nint main()\n{\n scanf(\"%d\",&n);\n inits();\n for(int i=6;i<=n;i++)\n {\n if(!(i%2))\n {\n for(int j=1;j<=u;j++)\n {\n if(a[b[j]] && a[i-b[j]])\n {\n printf(\"%d=%d+%d\\n\",i,b[j],i-b[j]);\n break;\n }\n if(b[j]>i/2)\n break;\n }\n }\n }\n return 0;\n}\n"} +{"label": "68", "index": "33620", "code": "int main()\n{\n\tint n, i, x, k, j, l;\n\tcin >> n;\n\tfor (i = 6; i <= n; i = i + 2)\n\t{\n\n\t\tfor (x = 3; x <= n / 2; x = x + 2)\n\t\t{\n\t\t\tl = sqrt((double)x);\n\t\t\tfor (j = 2; j <= l; j ++)\n\t\t\t{\n\t\t\t\tif (x % j == 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (j != l + 1)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ((i - x) == 2)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tk = sqrt((double)(i - x));\n\t\t\tfor (j = 2; j <= k; j ++)\n\t\t\t{\n\t\t\t\tif ((i - x) % j == 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (j == k + 1)\n\t\t\t{\n\t\t\t\tcout << i << \"=\" << x << \"+\" << i-x << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33621", "code": "int s[50010]={1,1,0};\nint main()\n{\nint i,j,n;\nfor(i=2;i<300;i++)\n{\nif(!s[i]);\nj=i;\nwhile(i*j<50010)\n{\ns[i*j]=1;j++;\n}\n}\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\n{\nfor(j=2;j<=i/2;j++)\n{\nif(!s[j] && !s[i-j])\n{\nprintf(\"%d=%d+%d\\n\",i,j,i-j);\nbreak;\n}\n}\n}\nreturn 0;\n}\n"} +{"label": "68", "index": "33622", "code": "void main()\n{\n long prime(long x);\n long n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n for(j=3;j<=i/2;j=j+2)\n {\n if(prime(j)==1&&prime(i-j)==1)\n {printf(\"%ld=%ld+%ld\\n\",i,j,i-j);\n break;}\n }\n}\n \nlong prime(long x)\n{\n int flag;\n long i;\n if(x==2) \n flag=1;\n if(x%2==0&&x!=2) \n flag=0;\n if(x%2!=0)\n { \n flag=1;\n for(i=3;i<=sqrt(x);i=i+2)\n {\n if(x%i==0)\n {\n flag=0;\n break;\n }\n }\n }\n return(flag);\n}\n \n"} +{"label": "68", "index": "33623", "code": "void main()\n{\n\tlong int n,i,k=6;\n\tscanf(\"%ld\",&n);\n\tint a[50000];\n\tfor (i=3;i<=n;i=i+2)\n\t{\n\t\tlong int j=3;\n\t\ta[i]=1;\n\t\twhile (j<=sqrt(i))\n\t\t{\n\t\t\tif (i%j!=0)\n\t\t\t\tj=j+2;\n\t\t\telse\n\t\t\t{\n\t\t\t\ta[i]=0;\n\t\t\t\tj=i;\n\t\t\t}\n\t\t}\n\t}\n\ti=3;\n\tdo\n\t{\n\t\twhile(ip)\n\t\t\t{\n\t\t\t\tj=k-i;\n\t\t\t\tq=sqrt(j);\n\t\t\t\tfor(m=2;m<=q;m++)\n\t\t\t\tif(j%m==0)break;\n\t\t\t\tif(m>q){printf(\"%d=%d+%d\\n\",k,i,j);break;}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33627", "code": "void main()\n{\n\tint n,m,i,x,y,k;\n\tscanf(\"%d\",&n);\n\tfor (m=6;m<=n;m+=2)\n\t{\n\t\tfor (x=3;x<=m/2;x+=2)\n\t\t{\n\t\t\tk=(int)sqrt(x);\n\t\t\tfor (i=2;i<=k;i++)\n\t\t\t\tif (x%i==0) break;\n\t\t\tif (i>k)\n\t\t\t{\n\t\t\t\ty=m-x;\n\t\t\t\tk=(int)sqrt(y);\n\t\t\t\tfor (i=2;i<=k;i++)\n\t\t\t\t\tif (y%i==0) break;\n\t\t\t\tif (i>k)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",m,x,y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\n}"} +{"label": "68", "index": "33628", "code": "int main() \n{\n\n int a[10000],m,n,i,j=1,k,l;\n a[0]=2;\n for(m=3;m<=50000;m++)\n {\n for(i=2;i<=sqrt((float)m);i++)\n if(m%i==0) break;\n if(i>sqrt((float)m))\n a[j++]=m;\n \n }\n scanf(\"%d\",&n);\n for(i=3;i<=n/2;i++)\n {\n printf(\"%d=\",2*i);\n for(k=0,l=j-1;k<=l;)\n {\n if(a[k]+a[l]==2*i) {printf(\"%d+%d\\n\",a[k],a[l]); break;}\n else if(a[k]+a[l]<2*i) k++;\n else l--;\n } \n }\n printf(\"\\n\");\n\n}\n"} +{"label": "68", "index": "33629", "code": "int main()\n{\n\tint x,i,j,k=0,p[N],a[N]={0,0};\n\tfor(i=2;isqrt(n)) return 1;\nelse return 0;\n}\nvoid main()\n{\nlong int m;\nscanf(\"%d\",&m);\nint j=6,i=2;\nfor(j=6;j<=m;j=j+2)\n{\n\tfor(i=2;i<=j/2;i++)\n\t{\n\t\tif(sushu(i)==1&&sushu(j-i)==1)\n\tbreak;\n\t}\n\tprintf(\"%d=%d+%d\",j,i,j-i);\n\tprintf(\"\\n\");\n\n\n\n}\n\n}"} +{"label": "68", "index": "33632", "code": "void main()\n{\n\tunsigned int n,p,m;\n\tscanf(\"%u\",&n);\n\tfor(p=6;p<=n;p++)\n\t{\n if(p%2==0)\n\t\t{\n\t\t\tm=p;\n\t\t\tint i,j,f,k;\n\t\t\tfor(i=3;i<=m/2;i=i+2)\n\t\t\t{\n\t\t\t\tf=1;\n\t\t\t\tfor(k=2;k<=sqrt(i);k++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(i%k==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tf=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(f==1)\n\t\t\t\t{\n\t\t\t\t\tj=m-i;\n f=1;\n\t\t\t\t\tfor(k=2;k<=sqrt(j);k++)\n\t\t\t\t\t{\n\t\t\t\t\t \n\t\t\t\t\t\tif(j%k==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tf=0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tif(f==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%u=%u+%u\\n\",m,i,j);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\telse continue;\n\t}\n\n\n}"} +{"label": "68", "index": "33633", "code": "void main()\n{\n\tlong i,n,k,t,s;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(k=2;k<=i/2;)\n\t\t{\n\t\t\tloop: for(t=2;t<=sqrt(k);t++) {if(k%t==0) {k++;t=2;}}\n\t\t\ts=i-k;\n\t\t\tfor(t=2;t<=sqrt(s);t++) {if(s%t==0) {k++;goto loop;}}\n\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,k,s);break;\n\t\t}\n\t}\n}\n\t\t\t\t\t\t\t\t\t"} +{"label": "68", "index": "33634", "code": "void main()\n{\n\tint ss(long a);\n\tlong n,j;\nint i;\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\n{\nfor (j=3;ss(j)!=1||ss(i-j)!=1;j+=2);\nprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\n\n\n}\n}\nint ss(long a)\n{\nint k,c=1;\nfor(k=3;k<=sqrt(a);k+=2)\n{\n\tif(a%k==0){c=0;break;};\n\n}\nreturn (c);\n}"} +{"label": "68", "index": "33635", "code": "int f(int s)\n{\n\tint t;\n\tfor(t=3;t<=(int)sqrt(s);t=t+2)\n\t\tif(s%t==0)\n\t\t\tbreak;\n\tif(t>(int)sqrt(s))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\n\nvoid main()\n{\n\tint m,k,h,i,d,r=0;\n\tscanf(\"%d\",&d);\n\tfor(m=6;m<=d;m=m+2)\n\t{\n\t for(i=3;i<(m/2+1);i=i+2)\n\t {\n\t \tk=i;\n\t \th=m-i;\n\t \tr=0;\n\t\t if(f(k) && f(h))\n\t\t\t{\n\t\t\t printf(\"%d=%d+%d\\n\",m,k,h);\n\t\t\t break;\n\t\t\t}\n\t }\n\t}\n}\n"} +{"label": "68", "index": "33636", "code": "int isprime(int p)\n{\n\tint prime=1;\n\tint i;\n\tif(p==2)\n\t{\n\t return prime;\n\t}\n\tfor(i=3;i<=(p/2);i=i+2)\n\t{\n\t\tif(p%i==0)\n\t\t{\n\t\t\tprime=0;\n\t\tbreak;\n\t\t}\n\t}\n\treturn prime;\n}\nint main()\n{\n\tint n;\n\tint i,j;\n\tscanf(\"%d\",&n);\n\tif(n>50000)\n\t{\n\t\tprintf(\"??????50000??\\n\");\n\t}\n\telse\n\t{\n\t\t\tfor(i=6;i<=n;i=i+2)\n\t\t{\n\t\t\t\n\t\t\tfor(j=3;j<=i;j=j+2)\n\t\t\t\t\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(isprime(j)==1)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tint m;\n\t\t\t\t\tm=i-j;\n\t\t\t\t\tif(isprime(m)==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,m);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}\n\t\treturn 0;\n}\n\n"} +{"label": "68", "index": "33637", "code": "void main()\n{\n\tint n,a,i,s,k;\n\tscanf(\"%d\",&k);\n\tfor (n=6;n<=k;n=n+2)\n{\n\tfor (a=3;a<=n/2;a++)\n\t{\n\t\ts=sqrt(a);\n\t\tfor(i=2;i<=s+1;i++)\n\t\t{\n\t\t\tif(a%i==0)break;\n\t\t}\n\t\tif(i>s+1)\n\t\t{\n\t\t\ts=sqrt(n-a);\n\t\t\tfor(i=2;i<=s+1;i++)\n\t\t\t{\n\t\t\t\tif((n-a)%i==0)break;\n\t\t\t}\n\t\t\tif(i>s+1)\n\t\t\t{\t\n\t\t\t\tprintf(\"%d=%d+%d\\n\",n,a,n-a);\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t}\n}\n}"} +{"label": "68", "index": "33638", "code": "int issushu(int x)\n{\ndouble y;\nint i,flag;\nflag=1;\ny=sqrt((double)x);\nfor(i=3;i<=y;i+=2)\nif(x%i==0)flag=0;\nreturn flag;\n}\nint main()\n{\nint n,i,j;\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\nfor(j=3;j<=i/2;j+=2)\nif(issushu(j) && issushu(i-j))\n{\nprintf(\"%d=%d+%d\\n\",i,j,i-j);\nbreak;\n}\nreturn 0;\n}"} +{"label": "68", "index": "33639", "code": "\nint main()\n{\n\tint sushu(int x);\n\tint a,b,n,n2,i,i2,j;\n\tscanf(\"%d\",&n);\n\tn2=n/2;\n\n\tfor(i=3;i<=n2;i++)\n\t{\n\t\ti2=i+i;\n\t\tfor(j=3;j<=i2;j++)\n\t\t{\n\t\t\ta=j;b=i2-j;\n\t\t\tif (sushu(a)==1 && sushu(b)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i2,a,b);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\nint sushu(int a)\n{\n\tint i,b=0,x=1;\n\tif(a==2) x=1;\n\tif(a>2) \n\t{\n\t\tfor(i=2;i<(a/2);i++)\n\t\t{\n\t\t\tif((a%i)==0) b++;\n\t\t\telse b=b;\t\t\n\t\t}\n\t\tif(b>0) x=0;\n\t\t\n\t}\n\treturn(x);\n}"} +{"label": "68", "index": "33640", "code": "int zhisu(int x)\n{\n\tint i,a;\n\ta=0;\n\tif((x==2)||(x==3)||(x==5)||(x==7))a=1;\n\tfor(i=3;i<=sqrt(x);i+=2)\n\t{\t\n\t\tif(x%2==0){a=0;break;}\n\t\telse if(x%i==0){a=0;break;}\n\t\telse a=1;\n\t}\n\treturn a;\n}\nint main()\n{\n\tint number,A,B,i,j;\n\tscanf(\"%d\",&number);\n\tfor(j=6;j<=number;j+=2)\n\t{\n\tfor(i=2;i<=j/2;i++)\n\t{\n\t\tA=zhisu(i);\n\t\tB=zhisu(j-i);\n\t\tif(A==1&&B==1)\n\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",j,i,j-i);\n\t\t\tbreak;\n\t\t}\n\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33641", "code": "int f(int a)\n{int i,b;\nb=sqrt(a);\nif(a%2==0)\nreturn 0;\nfor (i=3;i<=sqrt(a);i+=2)\n{if(a%i==0)\nreturn 0;}\nreturn 1;\n}\nint main()\n{int n,j,k;\nscanf(\"%d\",&n);\nfor(j=6;j<=n;j+=2)\n{\n\tfor(k=3;k<=j;k++)\nif(f(k)==1&&f(j-k)==1)\n{printf(\"%d=%d+%d\\n\",j,k,j-k);\nbreak;}\n}\nreturn 0;\n}"} +{"label": "68", "index": "33642", "code": "\nint p(long a)\n{\n\tint i;\n\tfor(i = 2; i <= sqrt(a); i++)\n\t{\n\t\tif(a % i == 0)\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nint main()\n{\n\tlong n, i, t;\n\tscanf(\"%ld\", &n);\n\tfor(i = 6; i <= n; i += 2)\n\t{\n\t\tfor(t = 2; t <= i / 2; t++)\n\t\t{\n\t\t\tif(p(t))\n\t\t\t\tif(p(i - t))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%ld=%ld+%ld\\n\", i, t, i - t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33643", "code": "int prime[50000];\ninline int isprime(int n)\n{\n int i;\n if (prime[n]!=-1)return prime[n];\n else\n {\n for (i=2;i<=n/2;i++)\n {\n if ((n%i==0))\n {prime[n]=0;return 0;}\n }\n prime[n]=1;return 1;\n }\n}\n\nint main ()\n{\n int n,i,k;\n\n for (i=2;i<50000;i++)prime[i]=-1;\n prime[2]=1;\n scanf(\"%d\",&n);\n for (k=6;k<=n;k=k+2)\n {\n for (i=2;i<=k/2;i++)\n {\n if (isprime(i))\n {\n if (isprime(k-i))\n {\n printf(\"%d=%d+%d\\n\",k,i,k-i);\n break;\n }\n }\n }\n }\n return 0;\n}\n"} +{"label": "68", "index": "33644", "code": "int main ()\n{\n int a,b=3,c,n,i,j,l,x,y;\n\tscanf(\"%d\",&n);\n\tfor (a=6;a<=n;a=a+2)\n\t{\n\t\tfor (b=3;b<=a;b=b+2)\n\t\t{\n\t\tx=(int)sqrt(b);\n\t\tfor (i=2;i<=x;i++)\n\t\t\tif(b%i==0) break;\n\t\t\tif (i>=x+1) \n\t\t\t{\n\t\t\t\tc=a-b;\n\t\t\t\ty=(int)sqrt(c);\n\t\t\t\tfor (j=2;j<=y;j++)\n\t\t\t\t\tif (c%j==0) break;\n\t\t\t\t\tif (j>=y+1) {printf(\"%d=%d+%d\\n\",a,b,c);break;}\n\t\t\t} \n\t}\n}\n}"} +{"label": "68", "index": "33645", "code": "int main()\n{\n\tint n,a,b,num=6;\n\tcin>>n;\n\twhile(num<=n)\n\t{\n\t\tfor(int a=3;a<=n/2;a+=2)\n\t\t{ \n\t\t\tint countera=0;\n\t\t double a0;\n\t\t\ta0=sqrt(a);\n\t\t\tfor(int i=3;i<=a0;i+=2)\n\t\t\t{\n\t\t\t\tif(a%i==0) countera++;\n\t\t\t}\n\t\t\tif(countera!=0) continue;\n\t\t\t\tb=num-a;\n\t\t\tint counterb=0;\n\t\t\tdouble b0;\n\t\t\t\tb0=sqrt(b);\n\t\t\tfor(int j=3;j<=b0;j+=2)\n\t\t\t{\n\t\t\t\tif(b%j==0) counterb++;\n\t\t\t}\n\t\t\tif(counterb!=0) continue;\n\t\t\telse {\n\t\t\t\tcout<sqrt(a))\n\t\t{\n\t\t\tb=m-a;\n \n\t\t\tfor(j=2;j<=sqrt(b);j++)\n\t\t\t\tif(b%j==0) break;\n\t\t\tif(j>sqrt(b))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",m,a,b);\n\t\t\t\ta=3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\ta+=2;\n\t\t}\n\t\telse\n\t\t\ta+=2;\n\t\t}\n\t\tm+=2;\n\t}\n\t} "} +{"label": "68", "index": "33654", "code": "/*\n * file competition 1_5\n * author ??\n * date 2010-10-22\n * description\n ????????\n*/\n\n\n\nint main()\n{\n\tint n, i, k, t1, t2, p, j;\n\tcin >> n;\n\tfor (i = 6; i <= n; i = i + 2)\n\t{\n \tfor (j = 3; j <= i; j = j + 2)\n\t\t{\n\t\t\tt1 = 0;\n\t \tt2 = 0;\n\t \tp = sqrt(j); \n\t \tfor (k = 3; k <= p; k = k + 2)\n \t\tif (j % k == 0) break;\n\t\t\tif (k > p) t1 = 1;\n\t \tif (t1 == 1) \n\t\t\t{\n\t \t\tp = sqrt(i-j); \n \tfor (k = 3; k <= p; k = k + 2)\n\t \t \tif ((i - j) % k == 0) break;\n\t \tif (k > p) t2 = 1;\n\t\t \t\tif (t2 == 1) break;\n\t\t\t}\n\t\t}\n \tcout << i << \"=\" << j << \"+\" << i - j << endl;\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33655", "code": "void main()\n{\n\tint i,n;\n\tchar sieve[50001];\n\tsieve[0]=0;\n\tsieve[1]=0;\n\tfor (i=2;i<50001;i++) sieve[i]=1;\n\tfor (i=2;i>n;\n for(m=6;m<=n;m=m+2)\n {\n\t for(a=2;a<=m/2;a++)\n\t {\n\t\t c=0;\n\t\t b=m-a;\n if(prime(a)==1&&prime(b)==1)\n\t\t {\n\t\t\t printf(\"%d=%d+%d\\n\",m,a,b);\n\t\t\t count++;\n\t\t\t if(count%5==0)printf(\"\\n\");\n\t\t\t c=1;\n\t\t }\n if(c==1)break;\n\t }\n }\n return 0;\n}\nint prime(int m)\n{\n int n;\n for(n=2;n<=sqrt(m);n++)\n if(m%n==0)\n break;\n if(n>sqrt(m))\n return 1;\n else return 0;\n}"} +{"label": "68", "index": "33657", "code": "int sushu (int x)\n{ \n\t\n\tif (x==2)\n\t\treturn 1;\n\telse\n\t{\n\t\tint i,c;\n\t\t\n\t\tc=sqrt(x);\n\t\tfor(i=2;i<=c;i++)\n\t\t{\n\t\t\tif(x%i==0)\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n}\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf (\"%d\",&n);\n\tfor(i=6;i<=n;i++)\n\t{ \n\t\tif(i%2==1)\n\t\t\tcontinue;\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tfor (j=2;j<=i/2;j++)\n\t\t\t{ \n\t\t\t\tif(sushu(j)&&sushu(i-j))\n\t\t\t\t{\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\treturn 0;\n}\n"} +{"label": "68", "index": "33658", "code": "void main()\n{\n int k,i,j;\n scanf(\"%d\",&k);\n for(i=6;i<=k;i+=2)\n {\n for(j=3;2*j<=k;j+=2)\n {\n if(su(j)==1&&su(i-j)==1)\n {\n printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n }\n }\n }\n}\nint su(int x)\n{\n int i,j=1,k=x;\n if(k%2==0) j=0;\n else\n {\n for(i=3;i*i<=k;i+=2)\n {\n if(k%i==0) j=0;\n }\n }\n return j;\n}"} +{"label": "68", "index": "33659", "code": "void main()\n{\n\tint n,i,i1,j,j1,k,a,p;\n\tdouble m,m1;\n\tscanf(\"%d\",&n);\n\tfor(a=6;a<=n;a=a+2)\n\t{\n\t\tfor(i=3;i<=a;)\n\t\t{\n\t\t\ti1=i;\n\t\t\tm=sqrt(i);\n\t\t\tfor(p=3;p<=m;p=p+2)\n\t\t\t{\n\t\t\t\tif(i%p==0)\n\t\t\t\t\ti=i/p;\n\t\t\t}\n\t\t\tif(i==i1)\n\t\t\t{\t\n\t\t\t\tj=j1=a-i;\n\t\t\t\tm1=sqrt(j);\n\t\t\t\tfor(k=3;k<=m1;k=k+2)\n\t\t\t\t{\n\t\t\t\t\tif(j%k==0)\n\t\t\t\t\tj=j/k;\n\t\t\t\t}\n\t\t\t\tif(j==j1)\n\t\t\t\t\t{printf(\"%d=%d+%d\\n\",a,i,j);break;}\n\t\t\t\telse i=i+2;\n\t\t\t}\n\t\t\telse i=i1+2;\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33660", "code": "int main()\n{\n\tint i,j,k,n,a=0,b=0;\n\tint zhi(int x);\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++)\n\t{\n\t\tfor(j=3;j<=i;j++)\n\t\t{\n\t\t\tif(zhi(j))\n\t\t\t{\n\t\t\t\tif(zhi(i-j))\n\t\t\t\t{\n\t\t\t\t\ta=j;b=i-j;break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",i,a,b);\n\t\ti++;\n\t}\n\treturn 0;\n}\n\nint zhi(int x)\n{\n\tint i,e=0;\n\tfor(i=2;i<=sqrt(x);i++){\n\t\tif(x%i==0){\n\t\t\te=1;break;\n\t}}\n\tif(e==0)\n\t\treturn (1);\n\telse\n\t\treturn (0);\n}\n\n"} +{"label": "68", "index": "33661", "code": "int Set(int c)\n{\n\tint i,w=1;\n\tif (c%2==0)\n\t{w=0;goto loop;}\n\tfor (i=3;iq) return 1;\n\t\t else return 0;\n\t }\n\t\n}"} +{"label": "68", "index": "33665", "code": "int main()\n{\n\tint i,n,j,k,m,t;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\n\t\tfor(j=3;j<=i/2;j+=2)\n\t\t{\n\t\t\tm=0;\n\t\t\tt=0;\n\t\t\tfor(k=3;k<=sqrt(j);k+=2)\n\t\t\t{\n\t\t\t\tif(j%k==0)\n\t\t\t\t\tm=1;\n\t\t\t}\n\t\t\tif(m==0)\n\t\t\t{\n\t\t\t\tfor(k=3;k<=sqrt(i-j);k+=2)\n\t\t\t\t{\n\t\t\t\t\tif((i-j)%k==0)\n\t\t\t\t\t\tt=1;\n\t\t\t\t}\n\t\t\t\tif(t==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,(i-j));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "68", "index": "33666", "code": "void main()\n{\n\tint n,i,j=3,a,b,c=1,d=1;\n\tscanf(\"%d\",&n);\n\tprintf(\"6=3+3\\n8=3+5\\n\");\n\tfor(i=10;i<=n;i=i+2)\n for(j=3;j<=i/2;)\n\t {if (j==3)\n\t\t\t for(b=2;bsqrt(n)) x=1;\n\t}\n\treturn(x);\n\n\n}\nvoid main()\n{\n int n,i;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n\t int m;\n\t for(m=3;m<=(i/2);m=m+2)\n\t {\n\t\t if(isprime(m)==1&&isprime(i-m)==1)\n\t\t { \n\t\t\t \n\t\t\t printf(\"%d=%d+%d\\n\",i,m,i-m);\n\t\t\t break;\n\t\t }\n\t\t\t \n\t \n\t }\n\n }\n}"} +{"label": "68", "index": "33671", "code": "int sushu(int n)\n\t{\n\t\tint a=2,b=1;\n\t\tif(n%a==0)\n\t\t{\n\t\t\tb=0;\n\t\t\treturn (b);\n\t\t}\n\t\tfor(a=3;ak)return 1;\n\telse return 0;\n}\nvoid main()\n{\n\tint w;int q;int n;\n\tscanf(\"%d\",&w);\n\tfor(q=6;q<=w;q++)\n\tif(q%2==0)\n\t\tfor(n=3;n<=q/2;n++)\n\t\t\tif(n%2!=0)\n\t\t\t\tif(a(n)==1&&a(q-n)==1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",q,n,q-n);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n}"} +{"label": "68", "index": "33675", "code": "void main()\n{\n int a,b,c,i,n;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n \ta=i-3;\n \tb=3;\n \twhile(b<=sqrt(a))\n \t{\n \t\tif(a%b==0||(i-a)%b==0&&(i-a)!=b)\n \t\t{\n \t\tb=3;\n \t\ta=a-2;\n \t\t}\n \t\telse \n \t\tb=b+2;\n \t}\n \tprintf(\"%d=%d+%d\\n\",i,i-a,a);\n }\n}"} +{"label": "68", "index": "33676", "code": "int prime(int s)\n{\n\tint k;\n\tif(s%2==0)\n\t\treturn 0;\n\tfor(k=1;k<=sqrt(s)/2;k++)\n\t{\n\t\tif(s%(2*k+1)==0)\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=3;i<=n/2;i++)\n\t{\n\t for(j=3;j<=i;j++)\n\t {\n\t\t if((prime(j)==1)&&(prime(2*i-j)==1))\n\t\t {\n\t\t\t printf(\"%d=%d+%d\\n\",2*i,j,2*i-j);\n\t\t\t break;\n\t\t }\n\t }\n\t}\n\n\n\treturn 0;\n}"} +{"label": "68", "index": "33677", "code": "\nint main(){\n int i,j,n,k,h;\n cin>>n;//????6<=n<=50000\n for(i=6;i<=n;i+=2){\n for(j=3;j<=i/2;j+=2){\n for(k=2;k<=sqrt(j);++k)\n if(j%k==0)\n break;\n for(h=2;h<=sqrt(i-j);++h)\n if((i-j)%h==0)\n break;\n if(h>sqrt(i-j)&&k>sqrt(j)){\n cout<> p;\n\tfor(n=6;n<=p;n=n+2)\n\t{\n\t\tfor(i=2;i<=(n/2);i=i+1) \n\t\t{\t\n\t\t\ta = sqrt(i);\n\t\t\tfor(t=3;t<=a;t=t+2) \n\t\t\t{\n\t\t\t\tif(i%t==0) break; \n\t\t\t}\n\t\t\tif(t>a)\n\t\t\t{\n\t\t\t\tm = n - i; \n\t\t\t\tb = sqrt(m); \n\t\t\t\tfor(k=2;k<=b;k++) \n\t\t\t\t{\n\t\t\t\t\tif(m%k==0) break; \n\t\t\t\t}\n\t\t\t\tif(k==b+1) \n\t\t\t\t{\n\t\t\t\t\tcout << n << \"=\" << i << \"+\" << m << endl; \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t }\n\t}\n\treturn 0; \n} \n"} +{"label": "68", "index": "33679", "code": "void main()\n{\n\tint k,x,y,t,m;\n\tscanf(\"%d\",&t);\n\tfor(m=6;m<=t;m=m+2)\n\t{\n for(x=3;x<=m/2;x=x+2)\n\t{\n\t for(k=2;k<=sqrt(x)+1;k++)\n\t\t{\n\t\t\tif(x%k==0) break;\n\t\t}\n\t\tif(k>sqrt(x))\n\t\t{\n y=m-x;\n\t for(k=2;k<=sqrt(y)+1;k++)\n\t\t\t{\n\t\t\t\tif(y%k==0) break;\n\t\t\t}\n\t\t if(k>sqrt(y)) break;\n\t\t\n\t\t}\n\t}\n\tprintf(\"%d=%d+%d\\n\",m,x,y);\n\t}\n}\n \n"} +{"label": "68", "index": "33680", "code": "\nint main()\n{\n\tint prime(int x);\n\tint a,i,j;\n\tscanf(\"%d\",&a);\n\tfor (i=6;i<=a;i=i+2)\n\t{\n\t\tfor (j=2;j<=i;j++)\n\t\t{\n\t\t\tif(prime(j)==1&&prime(i-j)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\nreturn 0;\n}\n\nint prime(int x)\n{\n\tint k;\n\tif (x==1)\n\t\treturn 0;\n\telse if (x==2)\n\t\treturn 1;\n\telse\n\t{\n\t\tfor (k=2;k<=sqrt(x);k++)\n\t\t{\n\t\t\tif(x%k==0)\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n}\n"} +{"label": "68", "index": "33681", "code": "int main()\n{\n int sun(int x);\n int n, m, i;\n scanf(\"%d\", &n);\n for(m=6;m<=n;m=m+2)\n {\n for(i=3;i<=m/2;i=i+2)\n {\n if(sun(i)==1&&sun(m-i)==1)\n break; } \n printf(\"%d=%d+%d\\n\", m, i, m-i); \n }\n return 0;\n}\n \n int sun(int x)\n {\n int j,A,t;\n t=sqrt(x);\n for(j=2;j<=t;j++)\n {if(x%j==0) break;}\n if(j>t) A=1;\n else A=2;\n return (A);\n } \n"} +{"label": "68", "index": "33682", "code": "int main()\n{ int k,x,t,q,i,m,n,a[25000];\n double j,p;\n cin>>n;\n\tfor (i=6;i<=n;i=i+2)\n\t{ p=i;\n\t\tk=sqrt(p);\n for (j=3;j<=p;j=j+2)\n\t\t{ \n\t\t\tt=sqrt(j) ;\n\t\t q=j;\n\t\t\tfor(m=3;m<=t;m=m+2)\n\t\t\t{ if (q%m==0)\n\t\t\t{ break;}\n\t\t\t}\n\t\t\tif (m>t)\n\t\t\t{ t=sqrt(p-j) ;\n\t\t q=p-j;\n\t\t\tfor(m=3;m<=t;m=m+2)\n\t\t\t{ if (q%m==0)\n\t\t\t{ break;}\n\t\t\t}\n\t\t\tif (m>t)\n\t\t\t{ cout<> n;\n\tfor ( k = 6; k <= n; k += 2 )\n\t{\n\t\ta = k / 2;\n\t\tfor ( p = 3; p <= a; p += 2 ) //??p?????\n\t\t{\n\t\t\tb =(int) sqrt ((double) p);\n\t\t\tfor ( i = 2; i <= b; i ++ )\n\t\t\t{\n\t\t\t\tif ( p % i == 0 )\tbreak;\n\t\t\t}\n\t\t\tif ( i == b + 1 )\n\t\t\t{ //??q?????\n\t\t\t\tq = k - p; \n\t\t\t\tc = (int) sqrt((double) q);\n\t\t\t\tfor ( j = 2; j <= c; j ++)\n\t\t\t\t{\n\t\t\t\t\tif ( q % j == 0) break;\n\t\t\t\t}\n\t\t\t\tif ( j == c + 1 )\n\t\t\t\t{\t\n\t\t\t\t\tcout << k << \"=\" << p << \"+\" << q <=j;l--)\n\t\t\t{\n\t\t\t\tif(i==p[j]+p[l])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,p[j],p[l]);\n\t\t\t\t\tgoto b;\n\t\t\t\t}\n\t\t\t\telse if(i>p[j]+p[l])break;\n\t\t\t}\n\t\tb:;\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33696", "code": "int main()\n{\nint k,x,y,n,t;\nscanf(\"%d\",&t);\nfor(n=6;n<=t;n=n+2)\n {for(x=3;x<=n/2;x=x+2) \n {for(k=3;k<=sqrt(x);k++)\n if(x%k==0) break;\n if(k<=sqrt(x)) continue;\n\ty=n-x;\n\tfor(k=3;k<=sqrt(y);k++)\n if(y%k==0) break;\n if(k>sqrt(y))\n\t {printf(\"%d=%d+%d\\n\",n,x,y);\n\t break;\n\t }\n }\n }\n}"} +{"label": "68", "index": "33697", "code": "int main(){\n\tint n,i,j,k,l;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){ //i??\n\t\tfor(j=3;j<=(int)i/2;j=j+2){ \n\t\t\t\tint num=0; //j?????\n\t\t\t for(k=1;k<=(int)sqrt(j);k=k+2){\n\t\t\t\t if(j%k==0)\n\t\t\t\t\t num++;\n\t\t\t\t}\n\t\t\t\tint num2=0;\n\t\t\t\tfor(l=1;l<=(int)sqrt(i-j);l=l+2){//i-j???????\n\t\t\t\t if((i-j)%l==0)\n\t\t\t\t\t num2++;\n\t\t\t\t}\n\t\t\t\tif(num==1&&num2==1){\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,(i-j));\n\t\t\t\t\tbreak;}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}\n"} +{"label": "68", "index": "33698", "code": "int main()\n{\n int n, i;\n cin >> n;\n for ( i = 6; i <= n; i = i + 2)\n {\n int a, b, m = 0;\n for ( a = 3; a <= i / 2; a = a + 2)\n {\n int s, k = 0;\n for (s = 3; s <= sqrt(a); s = s + 2)\n {\n if ( a % s == 0)\n {\n k = 1;\n break;\n }\n }\n if ( k == 0 )\n {\n b = i - a;\n int j, t = 0;\n for (j = 3; j <= sqrt(b); j = j + 2)\n {\n if ( b % j == 0)\n {\n t = 1;\n break;\n }\n }\n if ( t == 0 )\n {\n cout << i << \"=\" << a << \"+\" << b <sqrt(a))\nz=1;\nreturn(z);}\nint main()\n{int n,i,j,k;\nscanf(\"%d\",&n);\nfor(k=3;2*k<=n;k++)\n{i=2*k;\nif(sushu(i-2)==1)\nprintf(\"%d=2+%d\\n\",i,i-2);\nfor(j=3;j<=i/2;j++)\n{if(sushu(i-j)==1&&sushu(j)==1)\n{printf(\"%d=%d+%d\\n\",i,j,i-j);break;}\n}\n}\nreturn 0;}\n"} +{"label": "68", "index": "33701", "code": "int tell(int x)\n{\n\tint i,j;\n\tint count=0;\n\tif (x==2)\n\t\treturn 1;\n\telse if(x%2==0)\n\t\treturn 0;\n\tj=(int)sqrt(x);\n\tfor(i=2;i<=j;i++)\n\t{\n\t\tif(x%i==0)\n\t\t\tcount++;\n\t}\n\tif(count==0)\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\n\nint main()\n{\n\tint n;\n\tint i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;jsqrt(j))\n {\n for(t=2;t<=sqrt(i-j);t++)\n if((i-j)%t==0) break; \n }\n if(k>sqrt(j)&&t>sqrt(i-j))\n\t {printf(\"%d=%d+%d\\n\",i,j,i-j);break;}\n }\n }\n}\n\n\n"} +{"label": "68", "index": "33703", "code": "\nint prime(int num)\n{\n\tint i;\n\tfor (i=2;i*i<=num;i++)\n\t{\n\t\tif (num%i==0) return 0;\n\t}\n\treturn 1;\n}\nint main()\n{\n\tint n,i,small;\n\tcin>>n;\n\tcout<<\"6=3+3\";\n\tfor (i=8;i<=n;i=i+2)\n\t{\n\t\tfor (small=2;2*small<=i;small++)\n\t\t{\n\t\t\tif (prime(small)==1&&prime(i-small)==1)\n\t\t\t{\n\t\t\t\tcout<>limit;\n\tfor(n=6;n<=limit;n=n+2)\n\t for(i=2;i<=n/2;i++)\n\t\tif(check(i)&&check(n-i))\n\t\t{\n\t\t\tcout<> n;\n for (i = 6;i <= n;i = i + 2)\n {\n for (a1 = 3;a1 <= i / 2;a1 = a1 + 2)\n {\n root1 = (int)sqrt((double)a1);\n for (j = 2;j <= root1;j ++)\n {\n if (a1 % j == 0)\n break;\n }\n if (j == root1 + 1)\n {\n a2 = i - a1;\n root2 = (int)sqrt((double)a2);\n for (j = 2;j <= root2;j ++)\n {\n if (a2 % j == 0)\n break;\n }\n if (j == root2 + 1)\n {\n cout << i << \"=\" << a1 << \"+\" << a2 << endl;\n break;\n }\n }\n }\n }\n return 0;\n}\n"} +{"label": "68", "index": "33716", "code": "int main()\n{\n\tint n,i=6,t,a,b=3,c,s;\n\tscanf (\"%d\",&n);\n\tfor (i=6;i<=n;i++)\n\t{\n\t\tfor(b=3;b<=(i/2);b++)\n\t\t{\t\n\t\t\tfor (t=2;t<=(sqrt(b));t++)\n\t\t\t{\n\t\t\t\ta=b%t;\n\t\t\t\tif(a==0&&b!=t)\t\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\t\tif (a!=0)\n\t\t\t{\n\t\t\t\tfor (s=2;s<=(sqrt(i-b));s++)\n\t\t\t\t{\n\t\t\t\t\tc=(i-b)%s;\n\t\t\t\t\tif (c==0&&s!=(i-b))\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(c!=0)\n\t\t\t\t{\n\t\t \tprintf(\"%d=%d+%d\\n\",i,b,(i-b));\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\ti++;\t\t\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33717", "code": "\nmain()\n{\nint n,i,j,m1,m2,a,b;\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\n{\nprintf(\"%d=\",i);\nfor(j=3;jk) {return 1;\n }\n else return 0;\n}\n\n\n"} +{"label": "68", "index": "33719", "code": "int prime(int k)\n{\n\tif(k==2)\n\t\treturn 1;\n\telse if(k%2==0)\n\t\treturn 0;\n\telse if(k==3)\n\t\treturn 1;\n\telse\n\t{\n\t\tint i;\n\t\tfor(i=3;i<=sqrt(k);i=i+2)\n\t\t{\n\t\t\tif(k%i==0)\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n}\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i;\n\tfor(i=6;i<=n;i=i+2) \n\t{\n\t\tint j;\n\t\tfor(j=3;jsqrt((float)a)+1 )\n\t\treturn 1;\n}\n\nint main()\n{\n\tint i,j,n;\n\tcin >>n;\n\n\t//for(i=3;i<=200;i+=2)\n\t//\tcout <k) return(1);\n\telse return (0);\n}\n\n\t\t\t\n\n\n\n\n"} +{"label": "68", "index": "33722", "code": "\nint isprime(int p)\n{\n\tint q,m;\n\tif(p%2==0) return 0;\n\tm=sqrt(p);\n\tfor(q=3;q<=m;q+=2)\n\t{\n\t\tif(p%q==0) return 0;\n\t}\n\treturn 1;\n}\n\nvoid main()\n{\n\tint n,p,i;\n\tscanf(\"%d\",&n);\n\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(p=3;p<=i/2;p+=2)\n\t\t{\n\t\t\tif(isprime(p)&&isprime(i-p))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,p,i-p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33723", "code": "int main()\n{\n\tint n,a,b,s;\n\tint i,j,k;\n\tint flag=1,flag1=1;\n\tcin>>n;\n\tfor(s=6;s<=n;s=s+2)\n\t{\n\t\n\t\t\tflag=1;\n\t\t\tflag1=1;\n\t\t\n\t\n\t\t\tfor(a=3;a<=s/2;a=a+2)\n\t\t\t{\n\t\t\t\tfor(i=3;i<=sqrt(a);i=i+2)\n\t\t\t\t{\n\t\t\t\t\tflag1=1;\n\t\t\t\t\tif(a%i==0 || a%2==0) \n\t\t\t\t\t{\t\n\t\t\t\t\t\tflag1=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(flag1==1)\n\t\t\t\t{\n\t\t\t\t\t\tfor(i=3;i<=sqrt(s-a)+1;i=i+2)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tflag=1;\n\t\t\t\t\t\t\tif((s-a)%i==0 || (s-a)%2==0 ) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tflag=0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif(flag==1)\n\t\t\t\t{\n\t\t\t\t\tcout<=0&&a[n]>=t)\n\t\t\t{\n\t\t\t\tif(a[n]==t)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",k,a[i],a[n]);\n\t\t\t\t\ti=1000001;\n\t\t\t\t\tn=-1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tn--;\n\t\t\t}\t\n\t\t\t\ti++;\n\t\t}\n\t\tk=k+2;\n\t}\n}\n\n"} +{"label": "68", "index": "33725", "code": "int check(int num)\n{\n\tint k=3,flag=1;\n\tif(num%2==0)\n\t\tflag=0;\n\telse if(num==3||num==5||num==7)\n\t\tflag=1;\n\telse\n\t{\n\t\twhile(k<=sqrt(num))\n\t\t{\n\t\t\tif(num%k==0)\n\t\t\t{\n\t\t\t\tflag=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tk=k+2;\n\t\t}\n\t}\n\treturn flag;\n}\nint main()\n{\n\tint i=6,n,num1,num2;\n\tscanf(\"%d\",&n);\n\twhile(i<=n)\n\t{\n\t num1=3;\n\t\twhile(num1<=i/2)\n\t\t{\n\t\t if(check(num1))\n\t\t {\n num2=i-num1;\n if(check(num2))\n {\n printf(\"%d=%d+%d\\n\",i,num1,num2);\n break;\n }\n else num1=num1+2;\n\t\t }\n\t\t else num1=num1+2;\n\t\t}\n\t\ti=i+2;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "68", "index": "33726", "code": "int yes(int p){\n\tif(p%2==0) {\n\t\tif(p==2) \n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}\n\tfor (int i=3;i<=sqrt(p);i+=2) {\n\t\tif(p%i==0) \n\t\t\treturn false;\n\t}\n\treturn true;\n}\nint main(int argc, char* argv[])\n{\n int n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n {\n for(j=3;j<=i/2;j=j+2)\n\t{if(yes(j)&&yes(i-j))\n {printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;}\n\telse continue;\n }\n }\n \n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33727", "code": "void main()\n{\n long int m,n,a,b,i,j,s;\n double t;\n scanf(\"%ld\",&n);\n for(m=6;m<=n;m+=2)\n {\n for(a=3;a> n;\n\tfor ( i = 6 ; i <= n ; i = i + 2)\n\t{\n\t\tfor ( j = 2 ; j <= i - 2 ; j++)\n\t\t{\n\t\t\tm = 0;\n\t\t\tk1 = sqrt(j);\n\t\t\tfor ( t = 2 ; t <= k1 ; t++ )\n\t\t\t{\n\t\t\t\tif ( j % t == 0 ) m = 1 ;\n\t\t\t}\n\t\t\tif ( m == 0 )\n\t\t\t{ \n\t\t\t\tg = 0;\n\t\t\t\tk2 = sqrt(i-j);\n\t\t\t\tfor ( l = 2 ; l <= k2 ; l++)\n\t\t\t\t{\n\t\t\t\t\tif ( (i - j) % l == 0 ) g = 1;\n\t\t\t\t}\n\t\t\t\tif ( g == 0 )\n\t\t\t\t{ cout << i << \"=\" << j << \"+\" << i - j << endl;break;} \n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33729", "code": "main()\n{\n\tint a,b,c,d,i,j;\n\tscanf(\"%d\",&a);\n\tfor(c=6;c<=a;c+=2)\n\tfor(i=3;i<=c;i+=2)\n\t{\n\t\tfor(b=1,j=3;j<=sqrt(i);j+=2)\n\t\t{\n\t\t\tb=i%j;\n\t\t\tif(!b)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(b)\n\t\t{\n\t\t\td=c-i;\n\t\t\tfor(b=1,j=3;j<=sqrt(d);j+=2)\n\t\t\t{\n\t\t\t\tb=d%j;\n\t\t\t\tif(!b)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(b)\n\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",c,i,d);\n\t\t\tbreak;\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33730", "code": "void main()\n{\n\tlong prime(long);\n\tlong x,y,t;\n\tlong i;\n\tscanf(\"%ld\",&x);\n\tfor(t=6;t<=x;t++,t++)\n for(i=3;i<=t/2;i++,i++)\n\t{\n\tint flag1=1,j;\n\tfor(j=3;j<=sqrt(i)&&flag1==1;j++,j++)\n\t{\n\t\tif(i%j==0)\n\t\t\tflag1=0;\n\t}\n\tif(flag1)\n\t\t\ty=t-i;\n\tint flag2=1,k;\n\tfor(k=3;k<=sqrt(y)&&flag2==1;k++,k++)\n\t{\n\tif(y%k==0)\n\tflag2=0;\n\t}\n\tif(flag2)\t\t\n\t{\n\t\tprintf(\"%ld=%ld+%ld\\n\",t,i,y);\n\t\tbreak;\n\t}\n\t}\n}"} +{"label": "68", "index": "33731", "code": "int isprimenumber(int m)\n{\n\tint i,isprime=1;\n\tif (m%2==0)\n\t{\n\t\tif(m==2)\n\t\t{\n\t\treturn isprime;\n\t\t}\n\t\tisprime=0;\n\t\treturn isprime;\n\t}\n\tfor(i=3;i<=sqrt(m);i=i+2)\n\t{\n\t\tif(m%i==0)\n\t\t{\n\t\t\tisprime=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isprime;\n}\n\nvoid gb(int a)\n{\n\tint j;\n\tprintf(\"%d=\",a);\n\tfor(j=2;j<=(a/2);j=j+1)\n\t{\n\t\tif((isprimenumber(j))&&(isprimenumber(a-j)))\n\t\t{\n\t\t\tprintf(\"%d+%d\\n\",j,a-j);\n\t\t break;\n\t\t}\n\t}\n}\n\nint main()\n{\n\tint n,k;\n\tscanf(\"%d\",&n);\n\tfor (k=6;k<=n;k=k+2)\n\t{\n\t\tgb(k);\n\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "68", "index": "33732", "code": "void main()\n{\n int n,i,p;\n int prime(int x);\n scanf(\"%d\",&n);\n for(i=6;i<=n;i+=2)\n for(p=3;p<=i/2;p+=2)\n \t if(prime(p)&&prime(i-p))\n\t { \t\n\t printf(\"%d=%d+%d\\n\",i,p,i-p);\n\t break;\n\t }\n}\n\nint prime(int n)\n{\n int i,t=1;\n for(i=2;i<=sqrt(n);i++)\t\n if(n%i==0)\n {\n\t t=0;\n\t break;\n }\n return(t);\n}\n"} +{"label": "68", "index": "33733", "code": "\nint isPrime(int n)\n{\n\tint i;\n\tif (n%2 == 0)\n\t\treturn 0;\n\tfor (i=3; i<=sqrt(n); i++)\n\t{\n\t\tif ( n%i == 0 )\n\t\t\treturn 0;\n\t}\n\n\treturn 1;\n}\n\nint main()\n{\n\tint n, i, j;\n\tscanf(\"%d\", &n);\n\tfor (i=6; i<=n; i+=2)\n\t{\n\t\tif (isPrime(i-2))\n\t\t\tprintf(\"%d=%d+%d\\n\", i, 2, i-2);\n\t\tfor (j=3; jsqrt(j))\n\t\t\t\t\tm=i-j;\n\t\t\t\tfor(k=2;k<=sqrt(m);k++)\n\t\t\t\t{if(m%k==0) break;}\n\t\t\t\tif(k>sqrt(m)&&j<=m&&m>1)\n\t\t\n\t\t\t\t{printf(\"%d=%d+%d\\n\",i,j,m);\n\t\t\t\tbreak;}\n\t\t}\n\t\t\n\t\t\t\t\n \n\t\n}"} +{"label": "68", "index": "33735", "code": "void main()\n{\n int n,i,j,k,m=0,b[50000];\n int flag[50000] = {0};\n scanf(\"%d\",&n);\n for(i=3;isqrt(n))\n\t\t\treturn 1;\n\t}\n}\n"} +{"label": "68", "index": "33738", "code": "void main()\n{\n\tint n,k,i,l,j,a,b;\n\tfloat r;\n\tscanf(\"%d\",&n);\n for(k=6;k<=n;k=k+2)/*?n???????k,??*/ \n\t{\n\t\tfor(i=3;i<=k;i=i+2)/*????i?????*/\n\t\t{\n\t\t\ta=0;\n\t\t\tb=0;\n\t\t\tfor(j=3;j<=sqrt(i);j=j+2)\n\t\t\t{\n\t\t\t\tr=i%j;\n\t\t\t\tif(r==0)\n\t\t\t\t a=1;\n\t\t\t}\n\t\t\tif(a==0)/*?i?????*/\n\t\t\t{\n\t\t\t\tl=k-i;\n\t\t\t\tfor(j=3;j<=sqrt(l);j=j+2)/*????l?????*/\n\t\t\t\t{\t\n\t\t\t\t\tr=l%j;\n\t \t\tif(r==0)\n\t\t\t\t\t\tb=1;\n\t\t\t\t}\n\t\t\t\tif(b==0)/*?l??????*/\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",k,i,l);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta=0;\n\t\t\t\tb=0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n"} +{"label": "68", "index": "33739", "code": "\n/* ????????????????????????i????????? */\n\n/* ?IDX(i)????i?????????? */\n\n/* ?OFF(i)????i????????????????? */\n\n/* ????i??????????1??i????? */\n\n/* ???i????????0???i????? */\n\nint main()\n{\n int n, i, j;\n unsigned int *isprimebits; /* ?????????????? */\n scanf(\"%d\", &n);\n \n /* ????????????1??????????? */\n isprimebits = (unsigned int *)\n malloc((IDX(n) + 1) * sizeof(unsigned int));\n \n /* ????????????????1 */\n memset(isprimebits, -1, (IDX(n) + 1) * sizeof(unsigned int));\n \n /* ????????????????????????? */\n for (i = 3; i <= n/2; i += 2) {\n if (ISPRIME(i)) {\n /* ?? i ????(j)??????????????? */\n for (j = 3 * i; j <= n; j += 2 * i) {\n CLEARPRIME(j);\n }\n }\n }\n \n /* 3?n????????????????????? */\n for (i = 6; i <= n; i += 2) {\n for (j = 3; j <= i / 2; j += 2) { /* ??????j?i-j */\n if (ISPRIME(j) && ISPRIME(i-j)) {\n printf(\"%d=%d+%d\\n\", i, j, i - j);\n break;\n }\n }\n }\n \n free(isprimebits); /* ???????? */\n return 0;\n}\n\n"} +{"label": "68", "index": "33740", "code": "int prime (int a)\n{\n\tint i,j;\n\tif (a==3||a==5||a==7)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\tfor (i=3;i<=sqrt(a);i+=2)\n\t\t{\n\t\t\tif (a%i==0)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n}\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tfor (j=3;j<=i/2;j+=2)\n\t\t{\n\t\t\tif (prime(j)+prime(i-j)==2)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33741", "code": "\nint sushu(int a)\n{\n\tint i = 1;\n\tint j = 0;\n\tfor(i = 1;i <= (int)sqrt(a);i = i + 2)\n\t{\n\t\tif((int)(a / i) * i == a)\n\t\t{\n\t\t\tj++;\n\t\t}\n\t}\n\tif(j == 1)\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\n\nint main()\n{\n\tint sushu(int a);\n\tint n ;\n\tscanf(\"%d\",&n);\n\tint b = 6;\n\tint k;\n\tfor(b = 6;b <= n;b = b + 2)\n\t{\n\t\tfor(k = 3;k <= (int)(b / 2);k = k + 2)\n\t\t{\n\t\t\tif(sushu(k) == 1 && sushu(b-k) == 1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",b,k,b-k);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tk = 3;\n\t}\nreturn 0;\n}"} +{"label": "68", "index": "33742", "code": "void main()\n{\n int a[50001],i,j,n;\n\ta[3]=a[5]=a[7]=1;\n\ta[4]=a[6]=a[8]=0;\n\tscanf(\"%d\",&n);\n\tfor(i=9;i<=50000;i++)\n\t\ta[i]=1;\n\tfor(i=9;i<=50000;i++)\n\t{\n\t if(i%2==0) a[i]=0;\n\t\telse if(i%3==0) a[i]=0;\n\t\telse if(i%5==0) a[i]=0;\n\t\telse if(i%7==0) a[i]=0;\n\t\telse \n\t\t\tfor(j=11;j<=sqrt(i);j++)\n\t\t\t{\n\t\t\t if(i%j==0)\n\t\t\t {\n\t\t\t a[i]=0;\n\t\t\t break;\n\t\t\t }\n\t\t\t}\n\t}\n for(j=6;j<=n;j=j+2)\n {\n\tfor(i=3;i<=j/2;i=i+2)\n\t{\n\t if(a[i]==1&&a[j-i]==1)\n\t {\n\t\t printf(\"%d=%d+%d\\n\",j,i,j-i);\n\t break;\n\t }\n\t}\n }\n}"} +{"label": "68", "index": "33743", "code": "void main()\n{ \n long n,k,i,p;\n scanf(\"%ld\",&n);\n int s[50001]={0};\n s[5]=1;s[3]=1;\n for (i=7;i<=n;)\n {p=0;\n for (k=3;k<=sqrt(i);k=k+2)\n\t if (i%k==0) {p=1;break;}\n if (p==0) s[i]=1;\n i=i+2;\n }\n for (i=6;i<=n;)\n {k=3;\n while (k<=i/2)\n if (s[k]==1&&s[i-k]==1) {printf(\"%ld=%ld+%ld\\n\",i,k,i-k); break;} else k=k+2;\n i=i+2;\n }\n}\n"} +{"label": "68", "index": "33744", "code": "main()\n{\n\tint m,a,b,c,d,e;\n\tscanf(\"%d\", &m);\n\tprintf(\"6=3+3\\n8=3+5\\n10=3+7\\n12=5+7\\n\");\n\tfor (a=14;a<=m;a=a+2)\n\t{\n\t\tfor(b=3;bsqrt(b))\n\t\t\t{\n\t\t\t\tif (e>sqrt(d)) break;\n\t\t\t}\n\t\t}\n\t printf(\"%d=%d+%d\\n\", a, b, d);\n\t}\n}"} +{"label": "68", "index": "33745", "code": "int main()\n{ int prime(int n);\n int n;\n scanf(\"%d\", &n);\n int i,j;\n for(i=6;i<=n;i=i+2)\n {\n for(j=3;j<=n/2;j=j+2)\n {\n if(prime(j)==1&&prime(i-j)==1)\n {\n printf(\"%d=%d+%d\\n\", i, j, i-j);\n break;\n }\n }\n }\n return 0;\n}\n \n \n \n \n \n int prime(int n)\n {\n int i;\n int flag=0;\n for(i=2;i<=sqrt(n);i++)\n {\n if(n%i==0)\n {\n flag++;\n break;\n }\n } \n if(flag==1)\n {\n return 0;\n }\n else\n {\n return 1;\n }\n}\n \n"} +{"label": "68", "index": "33746", "code": "int sushu(int n)\n { int a;\n if(n==2)\n\treturn(0);\n\telse if(n>2)\n\t{ \n\t for(a=2;a<=sqrt(n);a++)\n\t { if(n%a==0)\n\t\t break;\n\t\t}\n\t if(a>sqrt(n))\n\t return(0);\n\t else \n\t return(1);\n\t}\n}\nvoid main()\n{\n int n,a,b,c,d;\n scanf(\"%d\",&n);\n for(a=6;a<=n;a=a+2)\n {\n\t for(b=2;b2)&&(j%2==0)) d=1;\n else\n for (k=2;k<=a2;k++)\n if (j%k==0) d=1;\n x=i-j;\n a3=floor(sqrt(x));\n if (d==0)\n if ((x>2)&&(x%2==0)) d=1;\n else\n for (k=2;k<=a3;k++)\n if (x%k==0) d=1;\n if (d==0){ \n printf(\"%d=%d+%d\\n\",i,j,x);\n break;\n\n }\n }\n\t\t return 0;\n}\n\n\n\n "} +{"label": "68", "index": "33749", "code": "\nint main()\n{\n\tint a(int n);\n\tint i,j,z;\n\tscanf(\"%d\",&z);\n for(i=6;i<=z;i=i+2)\n\t\tfor(j=3;j<=i-j;j=j+2)\n\t\t\tif(a(j)&&a(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn 0;\n}\nint a(int n)\n{\n\tint k;\n\tfor(k=3;k<=sqrt(n);k=k+2)\n\t\tif(n%k==0)\n\t\t\treturn (0);\n\t\treturn (1);\n}"} +{"label": "68", "index": "33750", "code": "\nint main(int argc, char* argv[])\n{\n\tint a[30000] = {0}, n, i, j, k, temp, b=0 ;\n\tscanf(\"%d\",&n);\n\tfor (i = 3; i <= n; i++)\n\t{\n\t\tfor (j = 2; j <= sqrt(i); j++)\n\t\t{\n\t\t\tif (i % j == 0) break;\n\t\t\telse continue;\n\t\t}\n\t\tif (j > sqrt(i))\n\t\t{\n\t\t\ta[b] = i;\n\t\t\tb++;\n\t\t}\n\t}\n\tb--;\n\tfor (i = 6; i <= n; i += 2)\n\t{\n\t\ttemp = 0;\n\t\tfor (j = 0; j <= b; j++)\n\t\t{\n\t\t\tfor (k = 0; k <= b; k++)\n\t\t\t\tif (i - a[j] == a[k])\n\t\t\t\t{\n\t\t\t\t\ttemp = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (temp)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (temp)\n\t\t\tprintf(\"%d=%d+%d\\n\",i,a[j],a[k]); \n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33751", "code": "int main()\n{\n\tint check(double x,double y);//??????x?y?????\n\tint n,a=0,b=0,answer;\n scanf(\"%d\",&n);\n\tint k=6;\n\twhile(k<=n)//k???6~n???\n\t{\n\t\tint i=2;\n\t\twhile(i<=k/2)\n\t\t{\n\t\t\ta=i;\n\t\t\tb=k-i;\n\t\t\tanswer=check(a,b);\n\t\t\tif(answer==1)//answer??1?????\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",k,a,b);//????\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tif(i==2)\n\t\t\t\t\ti=i+1;\n\t\t\t\telse\n\t\t\t\t\ti=i+2;\n\t\t}\n\t\tk=k+2;\n\t}\n}\n\nint check(double x,double y)\n{\n\tint d1=0,d2=0;\n\tint i=2;\n\tint answer;\n\twhile(i<=sqrt(x))\n\t{\n\t\tif((int)x%i==0)\n\t\t{\n\t\t\td1=1;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\ti++;\n\t}//????x?????\n\ti=2;\n\twhile(i<=sqrt(y))\n\t{\n\t\tif((int)y%i==0)\n\t\t{\n\t\t\td2=1;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\ti++;\n\t}//????y?????\n\tif(d1==0&&d2==0)\n\t\tanswer=1;\n\telse\n\t\tanswer=0;\n\treturn answer;//??x???d1=0?y????d2=0?????0????1?????0\n}\n\n"} +{"label": "68", "index": "33752", "code": "void main()\n{\n\tint s(int x);\n\tint a,n,m;\n\tscanf(\"%d\",&m);\n\tif(m<=50000)\n\t{\n for(n=6;n<=m;n=n+2)\n\t{\n\t\tfor(a=3;a<=n/2;a=a+2)\n\t\t\tif(s(a)+s(n-a)==2)\n\t\t\t\tbreak;\n\tprintf(\"%d=%d+%d\\n\",n,a,n-a);\n\t}\n\t}\n \n}\n\nint s(int x)\n{\n\tint i;\n\tfor(i=3;i<=x/2;i=i+2)\n\t\tif(x%i==0)\n\t\t\tbreak;\n\tif(i>x/2)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}"} +{"label": "68", "index": "33753", "code": "\nint main()\n{\n\tint prime(int);\n\tint i,n,h;\n\tscanf(\"%d\",&n);\n\tfor(h=6;h<(n+1);h=h+2)\n {for(i=3;i<=(h/2);i++)\n\t{\n\t\tif(prime(i)==1&&prime(h-i)==1)\n\t\t{\tprintf(\"%d=%d+%d\\n\",h,i,h-i);\n\t\tbreak;\n\t\t}\n\t}\n }\n\treturn 0;\n}\n\n\tint prime(int n)\n\t{ int i,flag=1;\n\tfor(i=2;i*i<=n&&flag==1;i++)\n\t{if(n%i==0)\n\tflag=0;}\n\treturn(flag);}"} +{"label": "68", "index": "33754", "code": "int main()\n{\n\tint i,k,s,a,n,b,c;\n\t\n\tint count=0;\n\tscanf(\"%d\",&s);\n\tfor(i=6;i<=s;i++)\n\t{\n\t\tif(i%2==0)\n\t\t{\n\t\t\ta=i;\n\t\tfor(n=2;n<=a/2;n++)\n\t\t {\n c=(int)(sqrt(n));\n\t\t\t for(k=2;k<=c;k++)\n\t\t\t\t{\n\t\t\t\t if(n%k==0)\n\t\t\t\t\t break; \n\t\t\t\t}\n\t\t\t\tif(k>c){\n\t\t\t\t\t b=a-n;\t\t\t\t\t\t\t \t\t\t\t \t\t\t \n \t\t\t for(k=2;k<=(sqrt(b));k++)\n\t\t\t\t {\n\t\t\t\t if(b%k==0)\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t if(k>((int)(sqrt(b)))){\n printf(\"%d=%d+%d\\n\",a,n,b);\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t} \t\t\t\t \t\t\t\t\n\t\t }\n\t\t}\n\t}\t \t\n\treturn 0;\n}\n "} +{"label": "68", "index": "33755", "code": "int main()\n{\n\tint n,i,t,m,p,q;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++)\n\t{\n\t\tif(i%2!=0)\n\t\t\tcontinue;\n\t\telse\n\t\t{\n\t\t\tfor(t=3;t<=i/2;t++)\n\t\t\t{\n\t\t\t\tp=0;\n\t\t\t\tq=0;\n\t\t\t\tfor(m=2;m<=sqrt(t);m++)\n\t\t\t\t{\n\t\t\t\t\tif(t%m==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tp=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor(m=2;m<=sqrt(i-t);m++)\n\t\t\t\t{\n\t\t\t\t\tif((i-t)%m==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tq=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(p==0&&q==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,t,i-t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "68", "index": "33756", "code": "int P[250]={0};\nvoid prime(int n)\n{\n int i;\n for (i=1;P[i]*P[i]<=n;i++)\n if (n%P[i]==0)\n return;\n P[0]++;\n P[P[0]]=n;\n}\nint p(int n)\n{\n int i;\n for (i=1;P[i]*P[i]<=n;i++)\n if (n%P[i]==0)\n return 0;\n return 1;\n}\nint main()\n{\n int n,i,j;\n P[0]=1;\n P[1]=2;\n for (i=3;i<250;i++)\n prime(i);\n scanf(\"%d\",&n);\n for (j=6;j<=n;j+=2)\n for (i=3;i<=j/2;i++)\n if (p(i) && p(j-i))\n {\n printf(\"%d=%d+%d\\n\",j,i,j-i);\n break;\n }\n getchar();\n getchar();\n return 0;\n}\n"} +{"label": "68", "index": "33757", "code": "void main()\n{\n\tint n,i=6,a,d,m,p,q,r,s;\n\tscanf(\"%d\",&n);\n\tfor(;i<=n;i=i+2)\n\t{\n\t\t\n\t\tfor(a=3;a<=i/2;a=a+2)\n\t\t{\n\t\t\tm=a;\n\t\t\td=i-a;\n\t\t\tr=0;s=0;\n\t\t\tfor(p=3;p<=(m/2);p=p+2)\n\t\t\tif(m%p==0) r=1;\n\t\t\t\t\n\t\t\tfor(q=3;q<=(sqrt(d));q=q+2)\n\t\t\tif(d%q==0) s=1;\n\t\t\t\t\n\n\t\t\tif(r==0&&s==0)break;\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",i,m,d);\n\t}\n}\n\n"} +{"label": "68", "index": "33758", "code": "int main()\n{\n\tint p(int x);\n\tint n,i,m;\n\tscanf(\"%d\",&n);\n\tfor(m=6;m<=n;m=m+2)\n for(i=3;i<=m/2;i++)\n\t\tif(p(i)==1&&p(m-i)==1)\n\t\t{\n\t\tprintf(\"%d=%d+%d\\n\",m,i,m-i);\n\t\tbreak;\n\t\t}\n\treturn 0;\n}\n int p(int x)\n\t{\n int k,i,c;\n\t k=(int)sqrt(x);\n\t for(i=2;i<=k;i++)\n\t\t if(x%i==0)break;\n\t if(i>k)\n\t\t c=1;\n\t else\n\t\t c=0;\n\t return c;\n\t}"} +{"label": "68", "index": "33759", "code": "int main()\n{\n\tint i,j,k,n,b,x,c,a1,a2,a3;\n\tscanf(\"%d\",&n);\n\ta1=(int)(n/2);\n\tfor (i=6;i<=n;i++)\n\t\tif (i%2==0) \n\t\t\tfor (j=2;j<=a1;j++) \n\t\t\t{ \n\t\t\t\tb=0;\n\t\t\t\tx=0;\n\t\t\t\ta2=(int)(sqrt(j));\n\t\t\t\tif ((j>2)&&(j%2==0))\n\t\t\t\t\tb=1;\n\t\t\t\telse \n\t\t\t\t\tfor (k=2;k<=a2;k++)\n\t\t\t\t\t\tif (j%k==0)\n\t\t\t\t\t\t\tb=1;\n\t\t\t\t\t\t\tx=i-j;\n\t\t\t\t\t\t\ta3=(int)(sqrt(x));\n\t\t\t\t\t\tif (b==0)\n\t\t\t\t\t\t\tif ((x>2)&&(x%2==0)) \n\t\t\t\t\t\t\t\tb=1;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tfor (k=2;k<=a3;k++)\n\t\t\t\t\t\t\t\t\tif (x%k==0)\n\t\t\t\t\t\t\t\t\t\tb=1;\n\t\t\t\t\t\t\t\t\tif (b==0)\n\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,x);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33760", "code": "int a(int n)\n{\nint i,j,m,q=0;\nif (n%2==0&&n!=2) q=1;\nm=sqrt(n);\nfor(i=3;i<=m;i+=2)\n{\nif (n%i==0) q=1;\n}\nreturn(q);\n}\n\nint main()\n{\nint n,i,j;\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\n{\nfor(j=2;jx) {n=2;while (n*j<=50000){a[n*j]=1;n=n+1;}}\n }\n x=0;\n for (i=2;i<=49999;i++)\n if (a[i]==0) {x=x+1;d[x]=i;}\n scanf(\"%ld\",&n);\n for (i=6;i<=n;)\n {\n for (j=1;j<=x;j++)\n if (a[i-d[j]]==0) {printf(\"%ld=%ld+%ld\\n\",i,d[j],i-d[j]);break;}\n i=i+2; }\n }\n"} +{"label": "68", "index": "33766", "code": "void main()\n{\n\tint I,i,n,j,k,s,a,x;\n\tint p,q;\n\tscanf(\"%d\",&a);\n\tfor(n=6;n<=a;n=n+2)\n\t{ x=0;\n\t\ts=n/2;\n\t\tfor(i=3;i<=s;i=i+2)\n\t\t{\n\t\t\tp=sqrt(i);\n\t\t\tfor(j=2;j<=p;j++) \n\t\t\t{\n\t\t\t\tif(i%j==0) break; \n\t\t\t}\n\t\t\tI=n-i;\n\t\t\tq=sqrt(I);\n\t\t\tfor(k=2;k<=q;k++)\n\t\t\t{\n\t\t\t\tif(I%k==0) break;\n\t\t\t}\n\t\t\tif ((j>=p+1)&&(k>=q+1))\n\t\t\t{\n\t\t\t\t printf(\"%d=%d+%d\\n\",n,i,I);break;\n\t\t\t}\n\t\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33767", "code": "int number[50000]; \nint check(int x)\n{\n\tif(x==3)return 1;\n\tfor(int y=3;ysqrt(k)) \n {\t for(t=3;t<=sqrt(m);t=t+2) \n\tif(m%t==0)\n\t break;\n\tif(t>sqrt(m))\n\t{ printf(\"%d=%d+%d\\n\",i,k,m);\n\tbreak;\n\t}\n }\n }\n\n}\n\n\n\n}"} +{"label": "68", "index": "33770", "code": "void main()\n{\n int n,i,j,a,b;\n char aa,bb;\n scanf(\"%d\",&n);\n for (i=6;i<=n;)\n {\n\t for (a=3;a<=i/2;)\n\t {\n\t\t b=i-a;\n\t\t aa=bb='y';\n\t\t for (j=3;j<=sqrt(a);) \n\t\t {\n\t\t\t if(a%j ==0) \n\t\t\t {\n\t\t\t\t aa='n';\n\t\t\t\t break;\n\t\t\t }\n\t\t\t j=j+2;\n\t\t }\n\t\t if (aa=='y')\n\t\t {\n\t\t for (j=3;j<=sqrt(b);) \n\t\t {\n\t\t\t if(b%j ==0) \n\t\t\t {\n\t\t\t\t bb='n';\n\t\t\t break;\n\t\t\t }\n\t\t\t j=j+2;\n\t\t }\n\t\t }\n\t\t if (aa=='y' && bb=='y')\n\t\t {\n\t\t\t printf(\"%d=%d+%d\",i,a,b);\n\t\t\t printf(\"\\n\");\n\t\t\t break;\n\t\t }\n\t\t a=a+2;\n\t }\n\t i=i+2;\n }\n}"} +{"label": "68", "index": "33771", "code": "\nint main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){\n\t\tint k,p;\n\t\tfor(k=3;k<=i/2;k=k+2){\n\t\t\tp=i-k;\n\t\t\tint a,b,c,d;\n\t\t\tc=(int)sqrt(k+1);\n\t\t\td=(int)sqrt(p+1);\n for(a=2;a<=c;a++){\n\t\t\t\tif(k%a==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(b=2;b<=d;b++){\n\t\t\t\tif(p%b==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(a>=c+1&&b>=d+1){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,k,p);\n break;\n\t\t\t}\n\t\t}\n\t}\n\t\treturn 0;\n}\n"} +{"label": "68", "index": "33772", "code": "\nint check(int x)\n{\n\tint q = sqrt (x);\n\tint n = 0;\n\tint flag =1;\n\tfor (n = 2; n <= q; n ++)\n\t{\n\t\tif (x % n == 0) {\n\t\t\tflag=0; break; }\n\t}\n\treturn (flag);\n}\t\t\n\nint main()\n{\n\tint n = 0;\n\tint i = 0;\n\tint k = 0;\n\tint j = 0;\n\t\n\tcin >> n;\n\tfor (i = 6; i <=n; i += 2)\n\t{\n\t\tfor (j = 2; j <= i / 2; j ++)\n\t\t{\n\t\t\tif (check(j))\n\t\t\t{\n\t\t\t\tk = i - j;\n\t\t\t\tif (check(k))\n\t\t\t\t{\n\t\t\t\t\tcout << i << \"=\" << j << \"+\" << k << endl;\n\t\t\t\t\tj = i / 2 + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33773", "code": "void main()\n{\n long a,m,n,i,p,q,b,c;\n scanf(\"%ld\",&a);\n i=6;\n m=3;\n \n while (i<=a) \n\t \n { \n\t while (m<=i/2)\n { q=3;\n while(q<=sqrt(m))\n {\n c=m%q;\n if(c!=0){q=q+1;}\n else {m=m+2;q=3;}\n }\n \n \n \n p=2;\n n=i-m;\n while (p<=sqrt(n))\n {\n b=n%p;\n if (b==0) break;\n else p=p+1;\n }\n if (b!=0) {printf(\"%ld=%ld+%ld\\n\",i,m,n);break;}\n else m=m+2;\n }\n i=i+2;\n\t m=3;\n }\n}\n"} +{"label": "68", "index": "33774", "code": "void main()\n{\n\tlong int x,n,i;\n\tlong int prime(long int t);\n\tn=6;\n\tscanf(\"%ld\",&i);\n\twhile(n<=i)\n\t{\n\tfor(x=3;x<=n/2;x=x+2)\n\t\tif(prime(x)&&prime(n-x))\n\t\t\tbreak;\n\t\tprintf(\"%ld=%ld+%ld\\n\",n,x,n-x);\n\t\tn=n+2;\n\t}\n}\n\nlong int prime(long int t)\n{\n\tlong int g,h,k;\n\tk=sqrt(t);\n\tfor(h=2;h<=k;h++)\n\t\tif(t%h==0)\n\t\t\tbreak;\n\t\tif(h>k) g=1;\n\t\telse g=0;\n\t\treturn(g);\n}"} +{"label": "68", "index": "33775", "code": "int isprime(int a)\n{\nint i;\nfor(i=3;i<=(int)sqrt(a);i+=2)\n if(a%i==0)\nreturn 0;\nreturn (a==2)||(a%2!=0);\n}\nint main()\n{\nint n,i,j;\nscanf(\"%d\",&n);\nfor(i=6;i<=n;i+=2)\n{\nfor(j=2;j<=i/2;j++)\nif(isprime(j)&&isprime(i-j))\n{\nprintf(\"%d=%d+%d\\n\",i,j,i-j);\nbreak;\n}\n}\nreturn 0;\n}"} +{"label": "68", "index": "33776", "code": "int P(int x)\n{\n\tint b=1;\n\tfor(int i=2;i<=sqrt(x);i++)\n\tb*=(x%i!=0);\n\tif(b==0)\n\t\treturn 0;\n\telse\n\t\treturn 1;\n\n}\nmain()\n{\n\tint a,b,c,d;\n\tint n,i,j,k;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t\t{\n\t\t\tfor(a=2;a<=i/2;a++)\n\t\t\t\t{\n\t\t\t\t\tb=i-a;\n\t\t\t\t\tif((P(a)==1)&&(P(b)==1))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\n}"} +{"label": "68", "index": "33777", "code": "\nint sushu(int a)\n{\n\tint result,sq,sum=0,i;\n\tsq=sqrt(a);\n\tif(a==2||a==3)result=1;\n\telse if(a%2==0)result=0;\n\telse{\n\tfor(i=2;i<=sq;i++)\n\t{\n\t\tif(i%2==1)\n\t\t{\tif(a%i==0)break;\n\t\t\tsum++;\n\t\t}\n\t}\n\tif(sum==((sq-1)/2))result=1;\n\telse result=0;\n\t}\n\treturn result;\n}\n\nint main()\n{\n\t\tint n,i,j;\n\t\tscanf(\"%d\",&n);\n\t\tfor(i=6;i<=n;i++)\n\t\t{\n\t\tif(i%2==0)\n\t\t\t{\n\t\t\tfor(j=2;j<=i/2;j++)\n\t\t\t\tif(sushu(j)&&sushu(i-j))\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n}"} +{"label": "68", "index": "33778", "code": "long even(long n)\n{\n\tlong t;\n\tif(n==2 || n==3)\n\t\treturn 1;\nelse\n{\n for(t=2;t<=sqrt(n);t++)\n {\n\t if(n%t==0)\n\t break;\n }\n if(t==(int)sqrt(n)+1)\n\t return 1;\n else\n\t return 0;\n}\n}\nint main()\n{\n\tlong n,i,j;\n\tscanf(\"%ld\",&n);\n for(i=6;i<=n;i=i+2)\n\t{\n for(j=3;jsqrt(l-m))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",l,m,l-m);\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33781", "code": "\nint f(int);\nvoid main()\n{\n\tint n,i,a,b;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(a=3;a<=i/2;a+=2)\n\t\t{\n\t\t\tb=i-a;\n\t\t\tif(f(a)==1&&f(b)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\nint f(int a)\n{\n\tint t,j,sum=0;\n\tfor(j=3;j<=sqrt(a);j+=2)\n\t{\n\t\tif(a%j==0)\n\t\t{\n\t\t\tsum++;\n\t\t}\n\t}\n\tif(sum==0)\n\t{\n\t\tt=1;\n\t}\n\telse\n\t{\n\t\tt=0;\n\t}\n\treturn t;\n}"} +{"label": "68", "index": "33782", "code": "int main(){\n\tint n,n1,n2,m,k1=0,k2=0;\n\tcin >> n;\n\t{for(m=6;m<=n;m+=2)\n\t\t{\n\t\tfor(n1=3;n1<=m/2;n1+=2)\n\t\t\t{for(int j=3;(j*j)<=n1;j+=2)\n\t\t\t\tif(n1%j==0)\n\t\t\t\t\t{k1=1;break;}\n\t\t\tif(k1!=1) \n\t\t\t\t{\n\t\t\t\tn2=m-n1;\n\t\t\t\tfor(int x=3;(x*x)<=n2;x+=2)\n\t\t\t\t\tif(n2%x==0)\n\t\t\t\t\t\t{k2=1;break;}\n\t\t\t\tif(k2 != 1) {cout<=k+1) sushu[m]=1;\n\t}\n\tsushu[2]=1;\n\n\tfor(n=6;n<=a;n+=2)\n\t{\n\t\tfor(i=3;i<=n/2;i++)\n\t\t\tif(sushu[i] && sushu[n-i])\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",n,i,n-i);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t}\n\treturn 0;\n\n}\n\n"} +{"label": "68", "index": "33784", "code": "/* Note:Your choice is C IDE */\nvoid main()\n{\n long prime(long n);\n long x=6,m=2,z;\n scanf(\"%d\",&z);\n for(x=6;x<=z;x=x+2)\n {\n \tprintf(\"%d=\",x);\n \tfor(m=2;prime(m)!=0||prime(x-m)!=0;m++)\n \t{}\n \tprintf(\"%d+%d\\n\",m,x-m);\n\n }\n}\nlong prime(long n)\n{\n\tlong i=2,j=0;\n\twhile(i> n;\n /*for(int i=3;i=6)\n\t\t{\n\t\t\t\twhile(h<=a)\n\t\t\t\t{\n\t\t\t\t\tb=h-c;\n\t\t\t\t\twhile(f<=sqrt(b))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(b%f!=0)f=f+2; \n\t\t\t\t\t\tif(b%f==0)\n\t\t\t\t\t\tloop:\tb=b-2,c=c+2,f=3;\n\t\t\t\t\t}\n\t\t\t\t\tf=3;\n\t\t\t\t\twhile(f<=sqrt(c))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(c%f!=0)f=f+2; \n\t\t\t\t\t\tif(c%f==0)goto loop;\n\t\t\t\t\t}\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",h,c,b);\n\t\t\t\t\th=h+2,f=3,c=3;\n\t\t\t\t}\n\t\t}\n}"} +{"label": "68", "index": "33789", "code": "void main()\n{\n\tint a=0,b=0,c=0,d=0,i=0,j=0,k=0,n;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tprintf(\"%d=\",i);\n\t\tfor(a=3;a<=n/2;a+=2)\n\t\t{\n\t\t\tc=0;\n\t\t\td=0;\n\t\t\tb=i-a;\n\t\t\tfor(j=3;j<=sqrt(a);j+=2)\n\t\t\t{\n\t\t\t\tif(a%j!=0)\n\t\t\t\t\tc++;\n\t\t\t\td++;\n\t\t\t}\n\t\t\tif(c==d)\n\t\t\t{\n\t\t\t\tc=0;\n\t\t\t\td=0;\n\t\t\t\tfor(j=3;j<=sqrt(b);j+=2)\n\t\t\t\t{\n\t\t\t\t if(b%j!=0)\n\t\t\t\t\t c++;\n\t\t\t\t d++;\n\t\t\t\t}\n\t\t\t\tif(c==d)\n\t\t\t\t{\t\n\t\t\t\t\tprintf(\"%d+%d\\n\",a,b);\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33790", "code": "int main()\n{\n\tint n,i,j=0;\n\tint prime[5200]={0};\n\tscanf(\"%d\",&n);\n\tint primjud(int x);\n\tfor(i=3;i=sqrt(s))\n\t\t\t\t{j=i-s;\n for(p=2;p=sqrt(j))\n\t\t\t\t\t {printf(\"%ld=%ld+%ld\\n\",i,s,j);\t \t\t\t\t\t\n\t\t\t\t\t s=i-1;} \n\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t}\n\n}"} +{"label": "68", "index": "33793", "code": "\n\n\tint su(int a)\n\t{ int i,b;\n\t b=(int)sqrt(a);\n\t for (i=2;i<=b;i++)\n\t { if (a%i==0) {\n\t\t return 0;\n\t }\n }\n\t return 1;\n\t \n\t}\n\nint main()\n{\tint n,i,j;\n scanf(\"%d\",&n); \n\tfor (i=6;i<=n;i+=2) {\n\t\tfor (j=2;j<=i/2;j++) \n\t\t\tif(su(j)==1 && su(i-j)==1) {\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33794", "code": "int main()\n{\n\tint n,a,b,c,k,e,f;\n\tk=6;\n\tscanf(\"%d\",&n);\n\twhile(k<=n)\n\t{\n\t for(a=3;a<=k&&k-a>1;a=a+2)\n\t {b=k-a;\n\t e=sqrt(a);\n\t f=sqrt(b);\n\t for(c=3;c<=e||c<=f;c=c+2)\n\t {if((a%c==0&&a/c>1)||(b%c==0&&b/c>1))\n\t\t break;}\n\t if(c>e&&c>f)\n\t {printf(\"%d=%d+%d\\n\",k,a,b);\n\t break;}}\n k=k+2;\n}\n\treturn 0;\n}"} +{"label": "68", "index": "33795", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,m=6,zyk(int x);\n\tscanf(\"%d\",&n);\n while(m<=n)\n\t{\n\t\tfor(i=3;i<=m/2;i+=2)\n\t\t{\n\t\t\tif(zyk(i)==1 && zyk(m-i)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",m,i,m-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tm+=2;\n\t}\n\t\t\t\t\n\treturn 0;\n}\nint zyk(int x)\n{\n\tint i;\n\tfor(i=3;i=v/2;h=h-2)\n\t\t\t{\n\t\t\t p2=h;\n\t if(p2==s[h])\n\t\t\t {\n\t\t \tprintf(\"%d=%d+%d\\n\",v,p1,p2);\n\t\t \tc=1;\n\t\t\t }\n\t\t\t break;\n\t\t\t}\n\t\tif(c==1){break;}\n\t }\n\t}\n return 0;\n}\n\n"} +{"label": "68", "index": "33797", "code": "void main()\n{\n\tint num,m,k,n=1,i,a[50001]={0},x,j;\n\tscanf(\"%d\",&num);\n\tfor(i=1;i<=n;i++)\n\t\ta[i]=i;\n\n\ta[1]=0;a[2]=1;a[3]=1;\n\tfor(m=4;m<=num;m++)\n\t{\n\t\tk=sqrt(m);\n\t\tfor(i=2;i<=k;i++)\n\t\tif(m%i==0)\n\t\t\t{a[m]=0;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(i>=k+1)\n\t\t\ta[m]=1;\n\t}\n\t\n\n\tfor(j=6;j<=num;j=j+2)\n\t{\n\t\tfor(i=1;i<=j/2;i++)\n\t\t\tif(a[i]==1&&a[j-i]==1)\n\t\t\t{\tprintf(\"%d=%d+%d\\n\",j,i,j-i);\n\t\t\t break;}\n\t}\n}\n\n\n\n\n\t\n"} +{"label": "68", "index": "33798", "code": "void main() \n{\n\tint x,p,q,i,j,e,f,y;\n\tscanf(\"%d\",&y);\n\tfor(x=6;x<=y;x=x+2)\n {\n\t\tfor(p=3;p<=x/2;p++)\n\t\t{\n\t\ti=sqrt(p);for(e=2;e<=i;e=e+1)\n\t\t\tif (p%e==0) break; \n\t\t\tif (e>i)\n\t\t\t{\n\t\t\t\tq=x-p;j=sqrt(q);\n\t\t\t\tfor(f=2;f<=j;f=f+1)\n\t\t\t\t\tif (q%f==0) break;\n\t\t\t\t\tif (f>j) {printf(\"%d=%d+%d\\n\",x,p,q);break;}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33799", "code": "void main()\n{\n\tint judge(int x);\n\tint n,m,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i=i+2){\n\t\tfor (j=3;jsqrt(n))\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}\n\t}\n}\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=2;j2)\n\t\t\t{\n\t\t\t\tp=sqrt(j);\n\t\t\t\t\tfor (k=3;k<=p;k+=2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (j%k==0)\n\t\t\t\t\t\t\tgoto loap;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\ta=i-j;\n\t\t\tx=sqrt(a);\n\t\t\tif (a%2==0)\n\t\t\t\tgoto loap;\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (k=3;k<=x;k+=2)\n\t\t\t\t\tif (a%k==0)\n\t\t\t\t\t\tgoto loap;\n\t\t\t}\n\t\t\tprintf(\"%d=%d+%d\\n\",i,j,a);\n\t\t\tbreak;\n\t\tloap:;\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "68", "index": "33803", "code": "\nint IsPrime(int m)\n{\n\tint high,i;\n\thigh=sqrt(m);\n\tfor (i=3;i<=high;i+=2)//?????m????\n\t{\n\t\tif(m%i==0) break;\n\t}\n\tif(i>high) return 1;\n\treturn 0;\n}\nvoid Out2prime(int m)\n{\n\tint a,b;\n\tfor (a=3;a<=m/2;a+=2)\n\t{\n\t\tb=m-a;\n\t\tif(IsPrime(a)&&IsPrime(b))\n\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",m,a,b);\n\t\t\tbreak;\n\t\t}\n\t}\n}\nint main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2)\n\t{\n\t\tOut2prime(i);\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33804", "code": "int num(int n)\n{\n int i,b,a;\n\t for(i=3;i<=sqrt(n);i=i+2)\n\t { \n\t\t b=n%i;\n\t\t if(b==0)\n\t\t {\n\t\t a=0;\n\t\t return(a); \n\t\t }\t\t\n }\n\t a=1;\n\t return(a); \n}\nvoid main()\n{\n\tint a,i,j,c,d;\n scanf(\"%d\",&a);\n\tfor(i=6;i<=a;i=i+2)\n\t{\t\n\t\tfor(j=3;j<=(i/2);j=j+2)\n {\n\t\t\tc=num(j);\n\t\t\td=num(i-j);\n\t\t\tif((c==1)&&(d==1))\n\t\t\t{\t\n\t\t\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t break;\n\t\t\t}\n\t\t}\n\t}\n}\n\n"} +{"label": "68", "index": "33805", "code": "int is_prime(int n)\n{\n\tint i;\n\tif(n==1)\n\t\treturn(0);\n\tfor(i=2;i<=sqrt(n);)\n\t{\n\t\tif(n%i==0)\n\t\t{\n\t\t\treturn(0);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti++;\n\t\t}\n\n\t}\n\treturn(1);\n\n}\n\nmain()\n{\n\tint k;\n\tint i;\n\tint n;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k=k+2)\n\t{\n\t\tfor(i=2;i<=k/2;i++)\n\t\t{\n\t\t\tif(is_prime(i)==1&&is_prime(k-i)==1)\n\t\t\t\tbreak;\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",k,i,k-i);\n\n\t}\n\n}"} +{"label": "68", "index": "33806", "code": "int fun(int);\nvoid main()\n{\n\tint i,n,a,j,b;\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j+=2)\n\t\tfor(i=2;;i++)\n\t\t{\n\t\t\ta=fun(i);\n\t b=fun(j-i);\n \t\tif(a&&b)\n\t\t\t{\n\t \t\tprintf(\"%d=%d+%d\\n\",j,i,j-i);break;\n\t\t\t}\n\t\t}\n}\nint fun(int t)\n{\n\tint i,p=1;\n\tfor(i=2;i<=(int)sqrt(t);i++)\n\t{\n\t\tif(t%i==0)\n\t\t{\n\t\t\tp=0;break;\n\t\t}\n\t}\n\treturn p;\n}\n"} +{"label": "68", "index": "33807", "code": "\nint f(int x){\n\tint i,t=0;\n\tfor(i=2;i*ix) t=1;\n\treturn t;\n}\n\n\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\n\tint i,j;\t\n\tint t1,t2;\n\tint x;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;jp ) break;\n\t}\n\treturn 0;\n}\n*/\nint isPrimeNumber(int p) \n{\n\tint j; \n\tfor(j=0; primes[j]*primes[j]p ) //??i??????????????????\n\t{\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\nvoid AllPrimes(int n)\n{\n\tint number=1; //??n??????\n\tint i, j; // ????\n\tprimes[0] = 2; //2??????\n\tfor( i = 3; i <= n; i = i + 2 )\n\t{ //??i???????????\n\t\tfor(j=0; primes[j]*primes[j]i ) //??i??????????????????\n\t\t{\n\t\t\tprimes[number] = i;\n\t\t\tnumber++;\n\t\t}\n\t}\n}\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint j;\n\t\n\tAllPrimes(n);\n\n\tfor(j=6;j<=n;j+=2)\n\t{\n\t\tint half = j/2; \n\t\tint i; \n\t\tint isPrime1, isPrime2; \n\n\t\tfor( i = 3; i <= half; i = i + 2 )\n\t\t{\n\t\t\tisPrime1 = isPrimeNumber(i);\n\t\t\tisPrime2 = isPrimeNumber(j-i);\n\t\t\tif( isPrime1 && isPrime2 )\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\", j, i, j-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33809", "code": "int F(int);\nvoid main()\n{\n\tint i,n,f1,k,f2;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k=k+2)\n\t\tfor(i=2;i>n;\n//??n\n\n\tfor(now= 6; now<= n; now++){\n\t\t\n\t\tif(now% 2== 0){\n\t\t\tfor(i= 2; i<= now; i++){\n\t\t\t\ta= i;\n\t\t\t\tb= now- i;\n\t\t\t\tif((Prime(a)== 1) && (Prime(b)== 1)) break;\n\t\t\t}\n\t\n\t\t\tcout<i) \n\t\t {\n\t\t\t primes[number]=i;\n\t\t number++;\n\t\t }\n\t }\n\t int k,l,m,p;\n\t for (k=6;k<=n;k=k+2)\n\t {\n\t\t for (l=0;primes[l]<=k/2;l++)\n\t\t {\n\t\t\t m=k-primes[l];\n\t\t\t for (p=0;primes[p]*primes[p]k)\n\t\t\t {\n\t\t\t\t printf(\"%d=%d+%d\\n\",k,primes[l],m);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\t }\n\t return 0;\n }"} +{"label": "68", "index": "33813", "code": "int judge(int j)//judge???????????????\n{\n\tint k;\n\tfor(k=3;k<=sqrt(j);k=k+2)\n\t\tif(j%k==0)\n\t\t\tbreak;\n\tif(k<=sqrt(j))\n\t\treturn 1;\n\telse return 0;\n}\nvoid main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)//i???6~n??????\n\t{\n\t\tprintf(\"%d=\",i);\n\t\tfor(j=3;j<=i/2;j=j+2)\n\t\t{\n\t\t\tif(judge(j)==0&&judge(i-j)==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d+%d\\n\",j,i-j);\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33814", "code": "main()\n{\n\tlong n,m,t,i,j,k;\n\tint p,q,a,b;\n\tscanf(\"%ld\",&n);\n\tfor(m=6;m<=n;m=m+2)\n\t{\n\t\tprintf(\"%ld=\",m);\n\t\tfor(i=3;isqrt(w))\n\t\t{\n\t\t\tshu[p]=w;\n\t\t\tp++;\n\t\t}\n\t}\n\tfor(x=0;x(3+num[x])){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(num[x]==shu[y]+shu[z]){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33816", "code": "int main()\n{\n\t\tint flag(int t);\n\t\tint i,j,n,sign=0;\n\t\tcin>>n;\n\t\tfor(i=6;i<=n;i+=2,sign=0)\n\t\t{\n\t\t\tfor(j=3;j<=n/2&&sign==0;j+=2)\n\t\t\t\tif(flag(j))\n\t\t\t\t\tif(flag(i-j))\n\t\t\t\t\t\t{cout<=50000);\t\n\tfor(m=6;m<=n;m=m+2)\n\t{\n\t\tfor(i=3;i<=m/2;i=i+2)\n\t\t{\n\n\t\t\tfor(j=2;j<=sqrt(i);j++) //??i?????\n\t\t\t\tif(i%j==0)\n\t\t\t\t\tbreak;\n\t\t\tif(i%j==0)\n\t\t\t\tcontinue;\n\t\t\tx=m-i;\n\t\t\tfor(j=2;j<=sqrt(x);j++) //??X?????\n\t\t\t\tif(x%j==0)\n\t\t\t\t\tbreak;\n\t\t\tif(j>sqrt(x))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",m,i,x);\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33818", "code": "int prime(int a){\n\tint i;\n\tint isprime=1;\n\tif (a == 3 ||a == 5 || a == 7)\n\t\treturn isprime;\n\telse{\n\t\tfor(i=3;i<=(int)sqrt(a);i+=2){\n\t\t\tif (a%i==0){\n\t\t\t\tisprime=0;\n\t\t\t\treturn isprime;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn isprime;\n}\n\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2){\n\t\tfor (j=3;j<=i/2;j+=2){\n\t\t\tif(prime(j)+prime(i-j)==2){\n\t\t\t\tprintf (\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33819", "code": "int prime(int x){ //????????\n\tint i;\n\tif(x==2)\n\t\treturn 1;\n\tfor(i=3;i<=sqrt(x);i++){\n\t\tif(x%i==0){\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 1;\n}\nvoid main(){\n\tint n;\n\tint i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){\n\t\tfor(j=3;j<=i/2;j+=2){\n\t\t\tif(prime(j) && prime(i-j)){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,(i-j));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n"} +{"label": "68", "index": "33820", "code": "int f(int x);\nvoid main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i=0,j=0;\n\tfor(i=6;i<=n;i=i+2)\n\t{ printf(\"%d=\",i);\n\t\tfor(j=3;j<=i;j=j+2)\n\t\t{if(f(j)==1&&f(i-j)==1) {printf(\"%d+%d\\n\",j,i-j); break;}\n\t\telse continue;\n\t\t}\n}\n}\n\t\tint f(int x)\n { int k=0,i=0,o=0;\n\t if(x%2==0) return 0; \n\t else\n\t {\tfor(i=3;i<=sqrt(x);i+=2)\n\t if(x%i==0) \n\t {return 0;\n\t o++;\n\t break;\n\t }\n\t if(o==0) return 1;\n }\n\t\t}"} +{"label": "68", "index": "33821", "code": "int main()\n{\n\tint n;\n\tint a,b;\n\tint c;\n\tint i,l=0;\n\tscanf(\"%d\", &n);\n\tfor( c=6; c>n;\n prime[2]=1;\n for(int i=6;i<=n;i+=2)\n {\n if(isPrime(i-2))\n {\n cout<sqrt(j))\n\t\t\t{\n\t\t\t\tfor(k=2;k<=sqrt(i-j);k++)\n\t\t\t\t{\n\t\t\t\t\tif((i-j)%k==0) \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t if(k>sqrt(i-j))\n\t\t\t break;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t}\n}\n\n"} +{"label": "68", "index": "33824", "code": "int main ()\n{\n\tint n;\n\tscanf (\"%d\",&n);\n\tint i,j,k;\n\tint w;\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tw=0;\n\t\tfor (j=3;j>n;\n\tcout <r){\n\t\t p[q+1]=r;\n\t\t q++;\n\t }\n\t}\n\n\tint i,j,k,m;\n\tfor (i=6;i<=n;i=i+2){\n\t\tfor(j=0;p[j]<=i/2;j++){\n\t\t\tm=i-p[j];\n\t\t\tfor(k=0;p[k]*p[k]i){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,p[j],m);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33832", "code": "int isprime(int x)\n{\n\tif(x==1) return 0;\n\tif(x==2) return 1;\n for(int i=2;i<=sqrt(x);i++)\n\t{\n\t\tif(x%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i,j;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;j<=i/2;j=j+2)\n\t\t{\n\t\t\tif(isprime(j)&&isprime(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33833", "code": "int evennumber(int x)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(x);i=i+1)\n\t{\n\t\tif(x%i==0)\n\t\t{\n\t\t\treturn(0);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i>sqrt(x))\n\t\treturn(1);\n}\nvoid main()\n{\n\tint n=6,m,k,o,p,e=2;\n\tscanf(\"%d\",&m);\n\tfor(n=6;n<=m;n=n+2)\n\t{\n \n\t\tfor(e=3;ek3){printf(\"3+%d\\n\",h);break;}\n\t\t\t\t }\n\t\t\t}\n else \n\t\t\t\t{\n\t\t\t\t\tfor(j=2;j<=k1;j++)\n\t\t\t if(m%j==0)break;\n\t\t\t\t if(j>k1)\n\t\t\t\t {\n\t\t\t\t\tp=i-m;\n\t\t\t\t\tk2=sqrt(p);\n\t\t\t\t\t if(p==3)printf(\"%d+3\\n\",m);\n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t\tfor(q=2;q<=k2;q++)\n\t\t\t\t\t\t if(p%q==0)break;\n\t\t\t\t\t\t if(q>k2){printf(\"%d+%d\\n\",m,p);break;}\n\t\t\t \t }\n\t\t }\n\t }\n\t\t\t}\n\t\t}\n}\n"} +{"label": "68", "index": "33836", "code": "\nint judge(int a)\n{\n int k;\n for(k=3;k*k<=a;k+=2)\n \n if(a%k==0)\n return 0;\n return 1;\n}\n\nvoid main()\n{\n int n,j,i;\n scanf(\"%d\\n\",&n);\n for(j=6;j<=n;j+=2)\n for(i=3;i<=(j/2);i+=2)\n {\n if(judge(i)&&judge(j-i))\n {\n printf(\"%d=%d+%d\\n\",j,i,j-i);\n break;\n }\n }\nreturn 0;\n \n\n}"} +{"label": "68", "index": "33837", "code": "\nint main()\n{ \n\tint i,n;\n\tint a,b;\n\tint p;\n\tint fla,flb;\n\tcin>>n;\n\tfor(i=6;i<=n;i=i+2)\n\t{ \n\t\tfor(a=3,b=i-3;a<=b;a=a+2,b=b-2)\n\t\t\t{ \n\t\t\t\tfla=1;\n\t\t flb=1;\n\t\t\t\tp=3;\n\t\t\t\twhile(p<=sqrt((double)a))\n\t\t\t\t{\n\t\t\t\t\tif(a%p==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tfla=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tp=p+2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(fla==0)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tp=3;\n\t\t\t\twhile(p<=sqrt((double)b))\n\t\t\t\t{\n\t\t\t\t\tif(b%p==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tflb=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tp=p+2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(flb==0)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<g)\n\t\t{\n\t\t printf(\"%d=%d+%d\\n\",h,a,b);\n\t\t break;\n\t\t}\n\t}\n\t}\n}\n"} +{"label": "68", "index": "33839", "code": "int sushu(long n)\n{\n long i;\n if(n==3||n==5||n==7)\n return 0;\n else \n {for(i=3;i<=sqrt(n);i++)\n {\n if(n%i==0)\n break;\n }\n if(i>sqrt(n))\n return 0;\n else \n return 1;}\n}\nmain()\n{\n long n;\n scanf(\"%ld\",&n);\n long i,j;\n for(i=6;i<=n;i=i+2)\n {\n \n for(j=3;j<=i/2;j=j+2)\n {\n if(sushu(j)==0&&sushu(i-j)==0)\n { \n printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n }\n }\n }\n \n}"} +{"label": "68", "index": "33840", "code": "void main()\n{\n\tint n,m,a,b,i,k,leap;\n\tscanf(\"%d\",&n);\n\tfor(m=6;m<=n;m=m+2)\n\t{\n a=3;\n\t\t\n\t\tfor(;;a=a+2)\n\t\t{for(;a<=m;a=a+2)\n\t\t {\n\t\tfor(i=3,leap=1;i<=sqrt(a);i=i+2)\n\t\t\t\n\t\t\tif (a%i==0||a%2==0){leap=0;break;}\n\t\t\tif(leap==1)break;\n\t\t }\n\t\tb=m-a;\n for(k=3;k<=sqrt(b);k=k+2)\n\t\tif (b%k==0||b%2==0){leap=0;break;}\n\t\t\n\t\tif(leap==1)\n\t\t{printf(\"%d=%d+%d\\n\",m,a,b);break;}\n\t\t\n\t\t\n\t\t}\n\t\n\t}\n}\n"} +{"label": "68", "index": "33841", "code": "void main()\n{\n\tint n,k;\n\tscanf(\"%d\",&n);\n\tfor(k=6;k<=n;k=k+2)\n\t{\n int a=1,b;\n loop:a=a+2;\n\t\tint i,x=sqrt(a);\n\t\tfor(i=(x/2)*2+1;a%i!=0;)\n\t\t\ti=i-2;\n\t\t\tif(i!=1)\n\t\t\tgoto loop;\n\t\telse\n\t\t{\n\t\t\tb=k-a;\n\t\t\tint j,y=sqrt(b);\n\t\t\tfor(j=(y/2)*2+1;b%j!=0;)\n\t\t\t\tj=j-2;\n\t\t\t\tif(j!=1)\n\t\t\t\tgoto loop;\n\t\t\telse\n\t\t\t\tprintf(\"%d=%d+%d\\n\",k,a,b);\n\t\t}\n\t\tcontinue;\n\t}\n}"} +{"label": "68", "index": "33842", "code": "void main()\n{\n int n,i,j,a,b;\n char aa,bb;\n scanf(\"%d\",&n);\n for (i=6;i<=n;)\n {\n\t for (a=3;a<=i/2;)\n\t {\n\t\t b=i-a;\n\t\t aa=bb='y';\n\t\t for (j=3;j<=sqrt(a);) \n\t\t {\n\t\t\t if(a%j ==0) \n\t\t\t {\n\t\t\t\t aa='n';\n\t\t\t\t break;\n\t\t\t }\n\t\t\t j=j+2;\n\t\t }\n\t\t for (j=3;j<=sqrt(b);) \n\t\t {\n\t\t\t if(b%j ==0) \n\t\t\t {\n\t\t\t\t bb='n';\n\t\t\t break;\n\t\t\t }\n\t\t\t j=j+2;\n\t\t }\n\t\t if (aa=='y' && bb=='y')\n\t\t {\n\t\t\t printf(\"%d=%d+%d\",i,a,b);\n\t\t\t printf(\"\\n\");\n\t\t\t break;\n\t\t }\n\t\t a=a+2;\n\t }\n\t i=i+2;\n }\n}"} +{"label": "68", "index": "33843", "code": "\nint p(int n)\n{\n\tint i,j;\n\tj=sqrt(n);\n\tif(n%2==0)\n\t\treturn 0;\n\telse\n\t{\n\t\tfor(i=3;i<=j;)\n\t\t{\n\t\t\tif(n%i==0)\n\t\t\tbreak;\n\t\t\ti=i+2;\n\t\t}\n\t\tif(i>j)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}\n}\t\t\nvoid main()\n{\n\tint n,m,i,j;\n\tscanf(\"%d\",&n);\n\tfor(m=6;m<=n;)\n\t{\n\t\tfor(i=2;i<=(m/2);i++)\n\t\t{\n\t\t\tj=m-i;\n\t\tif(p(i)==1 && p(j)==1)\n\t\t\tbreak;\n\t\t}\n\t\tprintf(\"%d=%d+%d\\n\",m,i,j);\n\t\tm=m+2;\n\t}\n}"} +{"label": "68", "index": "33844", "code": "void main()\n{\n\tint huige(int a);\n\tint n,i,j,l,a[50000];\n\tint k;\n\tscanf(\"%d\",&n);\n\ta[0]=2;\n\tj=1;\n\tfor(i=3;i> n;\n\tfor (i = 6; i <= n; i = i + 2)\n\t{\n\t\tm = 3;\n\t\twhile (m < i)\n\t\t{\n\t\t\tq = 0;\n\t\t\tfor (p = 3; p <= sqrt(m); p = p + 2)\n\t\t\t{\n\t\t\t\tif (m % p == 0) {q = 1; break;}\n\t\t\t}\n\t\t\tif (q == 0)\n\t\t\t{\n\t\t\t\ta = m; \n\t\t\t\tb = i - m;\n\t\t\t\tfor (p = 3; p <= sqrt(b); p = p + 2)\n\t\t\t\t{\n\t\t\t\t\tif (b % p == 0) {q = 1; break;}\n\t\t\t\t}\n\t\t\t\tif (q == 0) {cout << i << '=' << a << '+' << b << endl; break;}\n\t\t\t\telse m = m + 2;\n\t\t\t}\n\t\t\telse m = m + 2;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33849", "code": "void main()\n{\n\tlong int a,i;i=6;\n\tscanf(\"%d\",&a);\t\n\twhile (i<=a)\n\t{\n\t\tlong int x,y;\n\t\tx=1;y=3;\n\t\twhile(i!=x+y)\n\t\t{\nnextx: \t{\n\t\t\t\tx=x+2;\n\t\t\t\tint k;\n\t\t\t\tk=sqrt(x);\n\t\t\t\tint p=2;\n\t\t\t\twhile(p<=k)\n\t\t\t\t{if(x%p==0)break;\n\t\t\t\tp=p++;}\n\t\t\t\t/*for(int p=2;p<=k;p++)\n\t\t\t\t\tif(x%p==0) break;*/\n\t\t\t\tif(p<=k) goto nextx;\n\t\t\t\t\n\t\t\t}\n\t\t\ty=i-x;\n\t\t\t{\n\t\t\t\t int u;\n\t\t\t\t u=sqrt(y);\n\t\t\t\t\tint v=3;\n\t\t\t\t\twhile(v<=u)\n\t\t\t\t\t{if(y%v==0)break;v=v+2;\t}\n\t\t\t\t /*for(int v=3;v<=u;v=v+2)\n\t\t\t\t\t if(y%v==0) break;*/\n\t\t\t\t if(v<=u) goto nextx;\n\t\t\t}\n\t\t\t\n\t\t}\n\tprintf(\"%d=%d+%d\\n\",i,x,y);\n\ti=i+2;\n\t}\n}"} +{"label": "68", "index": "33850", "code": "void main()\n{\n\tint n,i,a,b,m,t,x;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tx=0;\n\t\tfor(a=3;a<=i-3;a=a+2)\n\t\t{\n\t\t\tif(a==3)\n\t\t\t{\n\t\t\t\tint b=i-a;\n\t\t\t\tif(b==3)\n\t\t\t\t{\n\t\t\t\t\tx=1;\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t for(t=3;t<=sqrt(b);t=t+2)\n\t\t\t\t\t{\n\t\t\t\t if(b%t==0)break;\n\t\t\t\t\t}\n\t\t\t \tif(b%t!=0)\n\t\t\t\t\t{\n\t\t\t\t \tx=1;\n\t\t\t\t \tprintf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t for(m=3;m<=sqrt(a);m=m+2)\n\t\t\t\t{\n\t\t if(a%m==0)break;\n\t\t\t\t}\n\t\t\t if(a%m!=0)\t\t\n\t\t\t\t{\n\t \t int b=i-a;\n\t\t\t\t\tif(b==3)\n\t\t\t\t\t{\n\t\t\t\t\t x=1;\n\t\t\t\t\t printf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\t\t}\n\t\t\t\t else\n\t\t\t\t\t{\n\t\t for(t=3;t<=sqrt(b);t=t+2)\n\t\t\t\t\t\t{\n\t\t\t\t if(b%t==0)break;\n\t\t\t\t\t\t}\n\t\t\t\t if(b%t!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t x=1;\n\t\t\t\t\t\t printf(\"%d=%d+%d\\n\",i,a,b);\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x==1)break;\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33851", "code": "int main()\n{\n\tint n,i,a,k,p,q,m;\n\tscanf(\"%d\",&n);\n\tfor (m=6;m<=n;m=m+2)\n\t{for (a=3;a<=m/2;a=a+2)\n\t{\tp=(int)sqrt(a);\n\t\t q=(int)sqrt(m-a);\n\tfor (i=2;i<=p;i++)\n\t{if(a%i==0)break;}\n\tfor (k=2;k<=q;k++)\n\t{\tif((m-a)%k==0)break;}\n\tif (i>p&&k>q)\n\t{printf(\"%d=%d+%d\\n\",m,a,m-a);break;}\n\t}\n\t}\n\t return 0;\n\t\n}\n\n\n\n"} +{"label": "68", "index": "33852", "code": "int main(void)\n{\nint primeNo(int);\nint m,k,i,t,q,n;\nscanf(\"%d\",&m);\nif(m<8)\nprintf(\"6=3+3\");\nelse\n\t{\n\tprintf(\"6=3+3\");\n\tfor(n=8;n<=m;n+=2)\n\t\t{\n\t\tfor(i=3;i<=(n/2);i+=2)\n\t\t\t\t{\n\t\t\t\tq=n-i;\n\t\t\t\tif(primeNo(i)&& primeNo(n-i))\n\t\t\t\t{\n\t\t\t\t\tprintf(\"\\n%d=%d+%d\",n,i,q);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t}\n}\nint primeNo(int n)\n{\nint k,i;\nk=sqrt(n);\nfor(i=3;i<=k;i+=2)\n\t\t{\n\t\tif(n%i==0)\n\t\tbreak;\n\t\t}\n\tif(i<=k)\n\treturn 0;\n\telse\n\treturn 1;\n}"} +{"label": "68", "index": "33853", "code": "long prime(long x)\n{\n\tlong i;\n\tfor (i=2;i<=sqrt(x);i++)\n\t{\n\t\tif (x%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 1;\n}\n\nvoid main()\n{\n\tlong n,j;\n\tlong i=6;\n\tscanf(\"%ld\",&n);\n\t\twhile (i!=(n+2))\n\t\t{ \n\t\t\tfor(j=3;j<=i/2;j++)\n\t\t\t{\n\t\t\t\tif(prime(j)==1&&prime(i-j)==1)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,j,(i-j));\n\t\t\ti=i+2;\n\t\t}\n}"} +{"label": "68", "index": "33854", "code": "int f(int a)\n{\n\tint i,e;\n\tif(a%2==0)\n\t\treturn 0;\n\te=(int)sqrt(a);\n\tfor(i=3;i<=e;i+=2)\n\t\tif(a%i==0)\n\t\t\treturn 0;\n\treturn 1;\n}\nvoid main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t\tfor(j=2;j<=i/2;j++)\n\t\t\tif(f(j) && f(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n}"} +{"label": "68", "index": "33855", "code": "void main()\n{\n\tint su[25000]={0},i,j=1,n,q,u,k,a1,a2,p,sum=0;\n\tscanf(\"%d\",&n);\n\tsu[0]=2;\n\tfor(i=3;i<=n/2;i++)\n\t{\n\t\tu=1;\n\t\tq=(int)pow(i,0.5);\n\t\tif(q<3)\n\t\t{\n\t\t\tif(i%2!=0)\n\t\t\t{\n\t\t\t\tsu[j]=i;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tif(q>=3)\n\t\t{\n\t\t if(i%2==0)\n\t\t\t{\n\t\t\t\tu=0;\n\t\t\t}\n\t\t\telse if(i%2!=0)\n\t\t\t{\n\t\t\t\tfor(k=2;k<=(q+1)/2;k++)\n\t\t\t\t{\n\t\t\t\t\tif(i%(2*k-1)==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tu=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t if(u!=0)\n\t\t\t{\n\t\t\t su[j]=i;\n\t\t\t j++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<=24999;j++)\n\t{\n\t\tif(su[j]!=0)\n\t\t{\n\t\t\tsum=sum+1;\n\t\t}\n\t\telse break;\n\t}\n\tfor(i=3;i<=n/2;i++)\n\t{\n\t\tp=2*i;\n\t\tfor(j=0;j<=sum-1;j++)\n\t\t{\n\t\t\ta1=su[j];\n\t\t\ta2=p-su[j];\n\t\t\tint sushu(int x);\n\t\t\tif(sushu(a2)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",p,a1,a2);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\nint sushu(int x)\n{\n\tint v=1,e,t;\n\te=(int)pow(x,0.5);\n\tif(x==2)\n\t{\n\t\tv=1;\n\t}\n\tif(x>2&&e<3)\n\t{\n\t\tif(x%2==0)\n\t\t{\n\t\t\tv=0;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(x%2==0)\n\t\t{\n\t\t v=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(t=2;t<=(e+1)/2;t++)\n\t\t\t{\n\t\t\t\tif(x%(2*t-1)==0)\n\t\t\t\t{\n\t\t\t\t\tv=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn(v);\n}"} +{"label": "68", "index": "33856", "code": "\nint main()\n{\n\tint n,i,j,t,k,p=1,u=1,c,x,m,y;\n scanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tm=(int)i/2;\n\t for(j=3;j<=m;j++)\n\t {\n\t\t c=(int)sqrt(j);\n\t\t \t if(j%2==0)\n\t\t\t {\n\t\t\t\t goto loop;\n\t\t\t }\n\t\t for(k=3;k<=c;k++)\n\t\t {\n\t\t\t if(j%k==0)\n\t\t\t\t goto loop;\n\t\t }\n\t\t\t x=i-j;\n\t\t\t y=(int)sqrt(x);\n\t\t\t for(t=3;t<=y;t+=2)\n\t\t\t\t {\n\t\t\t\t if(x%2==0)\n\t\t\t\t\t {\n goto loop;\n\t\t\t\t\t }\n\t\t\t\t else if(x%t==0)\n goto loop;\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t\t printf(\"%d=%d+%d\\n\",i,j,x);\n\t\t\t\t\t goto er;\n\t\t loop:;\n\t }\ner:;\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33857", "code": "int main()\n{\n int n, i, j, k, l, m, o;\n\tcin >> n;\n\tfor ( i = 6; i <= n; i = i + 2 )\n\t{\n\t\tfor ( j = 2; j <= ( i / 2 ); j ++ )\n\t\t{\n\t\t\tk = sqrt (j);\n\t\t\tfor ( l = 2; l <= k; l ++ )\n\t\t\t{\n\t\t\t\tif ( j % l == 0 )\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( l == k + 1 )\n\t\t\t{m = sqrt ( i - j );\n for ( o = 2; o <= m; o ++ ) \n\t\t\t {\n\t\t\t\t if( ( i - j ) % o == 0 )\n\t\t\t\t\t break;\n\t\t\t }\n\t\t\t if ( o == m + 1 )\n\t\t\t\t break;}\n\t\t}\n\t\tcout << i << \"=\" << j << \"+\" << i - j << endl;\n\t}\n\treturn 0;\n}\n "} +{"label": "68", "index": "33858", "code": "int main()\n{\n\tint n,i,k,m=0,x[99999],y[99999],j,h;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++,i++)\n\t{\n\t\tfor(k=3;ksqrt(k))\n\t\t\t{\n\t\t\t for(h=2;h<=sqrt(i-k);h++)\n\t\t\t {\n\t\t\t\tif((i-k)%h==0)\n\t\t\t\t\tbreak;\n\t\t\t }\n\t\t\t if(h>sqrt(i-k))\n\t\t\t {\t\n\t\t\t\t x[m]=k;\n\t\t\t y[m]=i;\n\t\t\t \t m++;\n\t\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j0)\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}\nint main()\n{\n\tint n,m;\n\tscanf (\"%d\",&m);\n\tint a,b,p,q;\n\tn=6;\n\twhile (n<=m)\n\t{\n\t\tfor (a=2;a<=n/2;a++)\n\t\t{\n\t\t\tb=n-a;\n\t\t\tif (a!=2)\n\t\t\t\tp=a%2;\n\t\t\telse\n\t\t\t\tp=1;\n\t\t\tq=b%2;\n\t\t\tif (p&&q)\n\t\t\t{\n\t\t\t\tif (sushu(a)&&sushu(b))\n\t\t\t\t{\n\t\t\t\t\tprintf (\"%d=%d+%d\\n\",n,a,b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tn=n+2;\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33868", "code": "int prime (int x)\n{\n\tint i,j;\n\tif (x==3||x==5||x==7)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\tfor (i=3;i<=sqrt(x);i+=2)\n\t\t{\n\t\t\tif (x%i==0)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n}\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i=i+2)\n\t{\n\t\tfor (j=3;j<=i/2;j+=2)\n\t\t{\n\t\t\tif (prime(j)+prime(i-j)==2)\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33869", "code": "int f(int a)\n{\nint c=1;\nint i;\nif(a%2==0)\n\tc=0;\nelse\n{\n\tfor(i=3;i<=sqrt(a);i=i+2)\n\t\tif(a%i==0)\n\t\t{\n\t\t\tc=0;\n\t\t\tbreak;\n\t\t}\n}\nreturn(c);\n}\nmain()\n{\nint n;\nint j;\nint k;\nscanf(\"%d\",&n);\nfor(k=6;k<=n;k=k+2)\n{\nfor(j=2;j<=k/2;j++)\n{\n\tif((f(j)==1)&(f(k-j)==1))\n\t{\n\t\tprintf(\"%d=%d+%d\\n\",k,j,k-j);\n\t\tbreak;\n\t}\n}\n}\n}"} +{"label": "68", "index": "33870", "code": "void main()\n{\n\t\n\tint t,a=6,a1,a2,i;\n\tscanf(\"%d\",&t);\n\t\n\t\n\t\n\twhile(a<=t)\n\t\t\n\t{\n\t\tfor(a1=3;a1<=a/2;a1+=2)\n\t{\n\t\tfor(i=3;i<=sqrt(a1);i+=2)\n\t\t{\n\t\t\tif(a1%i==0) break;\n\t\t}\n\t\t\n\t\tif(i>sqrt(a1))\n\t\t\t{\n\t\t\ta2=a-a1;\n\t\t\n\t\t\tfor(i=3;i<=sqrt(a2);i+=2)\n\t\t\t\t{\n\t\t\t\tif(a2%i==0) break;\n\t\t\t\t}\n\t\t\tif (i>sqrt(a2)) \n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",a,a1,a2);a1=a;\n\t\t\t}\n\t\t\t}\n\t\t\n\t}\n\ta=a+2;\n\t}\n\n}"} +{"label": "68", "index": "33871", "code": "\nint isprime(int a)\n{\n\tint i,k;\n\tif(a%2==0){\n\t\treturn 0;\n\t}\n k=(int)sqrt(a);\n\tfor(i=3;i<=k;i=i+2){\n\t\tif(a%i==0){\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\treturn 1;\n}\n\n\nint main()\n{\n\tint n,i,j;\n scanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){\n\t\tfor(j=2;j<=i/2;j++){\n\t\t\tif(isprime(j)&&isprime(i-j)){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "68", "index": "33872", "code": "int sushu(int p)\n{\n\tint i;\n\tfor(i=2;i<=(int)sqrt(p);i++)\n\t\tif(p%i==0) return 0;\n\treturn 1;\n\n}\n\nint main(int argc, char* argv[])\n{\n\tint n,i,k;\n\tscanf(\"%d\",&n);\n\t\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(k=2;k<=i/2;k++)\n\t\t{\n\t\t\tif(sushu(k)==1&&sushu(i-k)==1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,k,i-k);\n break;\n\t\t\t}\n\t\t}\n\t}\n\t\n\n\t\t\treturn 0;\n}\n"} +{"label": "68", "index": "33873", "code": "int main()\n{\n\tint su[5200],i,j,k,n,flag,shu[100000][2];\n\tsu[0]=3;\n\tsu[1]=5;\n\tsu[2]=7;\n\tsu[3]=11;\n\tsu[4]=13;\n\tsu[5]=17;\n\tsu[6]=19;\n\tsu[7]=23;\n\tsu[8]=29;\n\tsu[9]=31;\n\tsu[10]=37;\n\tsu[11]=41;\n\tsu[12]=43;\n\tsu[13]=47;\n\tk=14;\n\tfor(i=53;i<50000;i=i+2)\n\t{\n\t\tflag=1;\n if(i%3==0)continue;\n\t if(i%5==0)continue;\n\t if(i%7==0)continue;\n\t if(i%11==0)continue;\n\t if(i%13==0)continue;\n\t if(i%17==0)continue;\n\t if(i%19==0)continue;\n\t if(i%23==0)continue;\n\t if(i%29==0)continue;\n\t if(i%31==0)continue;\n\t if(i%37==0)continue;\n\t if(i%41==0)continue;\n\t if(i%43==0)continue;\n\t if(i%47==0)continue;\n\t for(j=53;j<=pow(1.0*i,0.5);j=j+2)\n\t\t if(i%j==0){flag=0;break;}\n\t\t if(flag)\n\t\t {\n su[k]=i;\n\t k++;\n\t\t }\n\t}\n for(i=0;i>n;\n for(i=6;i<=n;i=i+2)\n\t\tcout<2&&a%2==0)return 0;\n\telse{\n\t\t\tif(a==2)return 1;\n\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\tfor(int i=3;ik) {return 1;\n }\n else return 0;\n}\n\nint main(int argc, const char * argv[])\n{int i,j;\n cin>>n;\n for(i=6;i<=n;i+=2)\n {\n for (j=3; j<=i/2; j++) {\n if(prime(j)&&prime(i-j))\n {\n cout<=sqrt(i)) \n\t\t\t{\tprintf(\"%d+%d\\n\",j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33879", "code": "int prime(int x)\n{ int b=1;\n if(x==3||x==5||x==7)\n {return b;}\n else\n {\n for(int i=3;i<=sqrt(x);i+=2)\n { \n if(x%i==0)\n { \n b=0;\n return b;\n break;\n }\n }\n }\n return b;\n}\nint main()\n{ \n int o;\n int n,a;\n scanf(\"%d\",&n);\n for(int i=6;i<=n;i+=2)\n { int s=i/2;\n for(a=3;a<(n/2);a+=2)\n { \n \n if(prime(a)+prime(i-a)==2)\n {\n printf(\"%d=%d+%d\\n\",i,a,i-a);break;\n \n } \n \n } \n }\n \n \n scanf(\"%d\",&o);\n return 0;\n}\n \n "} +{"label": "68", "index": "33880", "code": "int prove(int x)\n{\nint y=1,i;\nif(x%2==0) y=0;\nelse\nfor(i=3;i<=sqrt(x);i++)\n\t{if(x%i==0) y=0;\n\t}\nreturn(y);\n}\nint main()\n{\nunsigned int n,l,x,y;\nscanf(\"%d\",&n);\nunsigned int i,k,p;\nfor(i=6;i<=n;i=i+2)\n\t{p=0;\n\tfor(k=3;k<=i/2;k=k+2)\n\t\t{\n\t\tif(p==1)\n\t\t\tcontinue;\n\t\telse\n\t\t\tl=i-k;\n\t\tint prove(int x);\n\t\tx=prove(k);\n\t\ty=prove(l);\n\t\tif(x==1&&y==1)\n\t\t\t{p=1;\n\t\t\tprintf(\"%d=%d+%d\\n\",i,k,l);}\n\t\telse\n\t\t\tp=0;\n\t\t}\t\t\n\t}\nreturn(0);\n}\n"} +{"label": "68", "index": "33881", "code": "void main()\n{\n\tint n,i,j,k,l,a;\n\t\tscanf(\"%d\",&n);\n\t\tfor(i=6;i<=n;i=i+2)\n\t\t{\n\t\t\ta=0;\n\t\t for(k=2;k<=sqrt(i-3);k++)\n\t\t\t if((i-3)%k==0) break;\n\t\t\t if(k>sqrt(i-3)) printf(\"%d=3+%d\\n\",i,i-3);\n\t\t\t else for(j=5;j<=i-5;j++)\n\t\t\t { \n\t\t\t\t for(k=2;k<=sqrt(j);k++)\n\t\t\t\t\t if(j%k==0) break;\n\t\t\t\t\t if(k>sqrt(j)) \n\t\t\t {\n\t\t\t\t\tfor(l=2;l<=sqrt(i-j);l++)\n\t\t\t\t\t if((i-j)%l==0) break;\n\t\t\t\t if(l>sqrt(i-j))\n\t\t\t\t\t {\n\t\t\t\t\t\t a++;\n\t\t\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t}if(a==1) break;\n\t\t}\n}\n}"} +{"label": "68", "index": "33882", "code": "long n;\nlong zhishu(int a)\n{ \n\tfor(int i=2;i<=sqrt(a);i++)\n\t{ \n\t\tif(a%i==0)\n return 0;\n\t}\nreturn 1;\n}\nmain()\n{\n scanf(\"%d\",&n);\n int i,j;\n for(i=6;i<=n;i=i+2)\n for(j=3;j<=(i/2);j=j+2)\n {\n if(zhishu(j)&&zhishu(i-j))\n\t {\n\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t break;\n\t }\n\t}\nreturn 0;\n}"} +{"label": "68", "index": "33883", "code": "void main()\n{\n\tlong int u,p,a,q,n,i,j,k,m,r;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++,i++)\n\t{\n\t\tfor(j=3;j<=i/2;j++,j++)\n\t\t{\n\t\t\tp=sqrt(j);\n\t\t\tfor(k=1;k<=p;k++,k++)\n\t\t\tif (k!=1)\n\t\t\t{r=j%k;\n\t\t\tif(r==0) \n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (k>p)\n\t\t\t{ q=i-j;\n\t\t\tu=sqrt(q);\n\t\t\tfor(m=1;m<=u;m++,m++)\n\t\t\tif(m!=1)\n\t\t\t{a=q%m;\n\t\t\tif(a==0) break;\n\t\t\t}\n\t\t\tif(m>u&&q>=3) {printf(\"%d=%d+%d\\n\",i,j,q);break;}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33884", "code": "int ss(int x){\n int i,j;\n j=1;\n if(x==2)return(1);\n else {if((x%2)==0)return(0);else{\n for(i=3;i<=sqrt(x);i=i+2){\n if((x%i)==0){j=0;break;}\n }\n if(j==1)return(1);else return(0);\n } } \n }\nmain(){\n int n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=((n/2)*2);i=i+2){\n for(j=2;j<=((i/2)+1);j++){\n if((ss(j)==1)&&(ss(i-j)==1)){printf(\"%d=%d+%d\\n\",i,j,i-j);break;}\n }\n \n }\n }\n"} +{"label": "68", "index": "33885", "code": "int isprime(int a)\n{ \n\tint i;\n\tfor(i=3;i<=(int)sqrt(a);i=i+2)\n\t\tif(a%i==0)return 0;\n\n\t\treturn (a==2)||(a%2!=0);\n}\n\nvoid main()\n{int n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i=i+2)\n\tfor(j=2;j<=i/2;j++)\n\t{\n\t\t if(isprime(j)&&isprime(i-j))\n\t\t {\n\t\t\t printf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t break;\n\t\n\t\t }\n\t}\n\n}"} +{"label": "68", "index": "33886", "code": "\nint n, i, j, k, f;\n\nint main() {\n scanf(\"%d\", &n);\n for (i = 6; i <= n; i += 2) {\n printf(\"%d=\", i);\n for (j = 3; j <= i; j += 2) {\n f = 0;\n for (k = 3; k * k <= j; k += 2)\n if (j % k == 0) { f = 1; break; }\n if (f) continue;\n for (k = 3; k * k <= i - j; k += 2)\n if ((i - j) % k == 0) { f = 1; break; }\n if (!f) {\n printf(\"%d+%d\\n\", j, i - j);\n break;\n }\n }\n }\n return 0;\n}\n\n"} +{"label": "68", "index": "33887", "code": "void main()\n{\n\tint n,i,j,k,s,x,y,t;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j<=i/2;j+=2)\n\t\t{\n\t\t\ts=0;\n\t\t for(k=1;k<=sqrt(j);k+=2)\n\t\t if(j%k==0 && k!=1) s=s+1;\n\t\t\tif(s==0) \n\t\t\t{\n\t\t\t y=i-j;\n\t\t\t x=0;\n\t\t\t for(t=1;t<=sqrt(y);t+=2)\n\t\t\t if(y%t==0 && t!=1) x=x+1;\n\t\t\t if(x==0) \n\t\t\t {\n\t\t\t\t printf(\"%d=%d+%d\\n\",i,j,y);break;\n\t\t\t }\n\t\t\t else continue;\n\t\t\t}\n\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33888", "code": "int f(int x)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(x);i++)\n\t\tif(x%i==0)break;\n\t\tif(i>sqrt(x))return 1;\n\t\treturn 0;\n}\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%ld\",&n);\n\t\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j<=i/2;j+=2)\n\t\t{\t\t\t\n\t\t\tif(f(j)&&f(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,j,i-j);\n\t\t\t \n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33889", "code": "\n\nint sushu(int a)\n{\n\tint yes=1,i;\n\tfor(i=2;i<=sqrt(a);i++)\n\t{\n\t\tif(a%i==0)\n\t\t{\n\t\tyes=0;\n\t\tbreak;\n\t\t}\n\t}\n\treturn yes;\n}\n\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j++)\n\t{\n\t\tif(j%2==0)\n\t\t{\n\t\t\tfor(i=2;i<=j;i++)\n\t\t\t{\n\t\t\t\tif(sushu(i)&&sushu(j-i)==1)\n\t\t\t\t{\n\t\t\t printf(\"%d=%d+%d\\n\",j,i,j-i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn 0;\n}"} +{"label": "68", "index": "33890", "code": "main()\n{\n\tint n,m,i,j,k,x,l,t;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tm=i/2;\n\t\tfor(j=3;j<=m;j=j+2)\n\t\t{\n\t\t\tx=0;\n\t\t\tl=sqrt(j);\n\t\t\tfor(k=1;k<=l;k++)\n\t\t\t{\n\t\t\t\tif(j%k==0)\n\t\t\t\tx++;\n\t\t\t}\n\t\t\tif(x==1)\n\t\t\t{\n\t\t\t\tx=0;\n\t\t\t\tt=i-j;\n\t\t\t\tl=sqrt(t);\n\t\t\t\tfor(k=1;k<=l;k++)\n\t\t\t\t{\n\t\t\t\t\tif(t%k==0)\n\t\t\t\t\tx++;\n\t\t\t\t}\n\t\t\t\tif(x==1)\n\t\t\t\t{printf(\"%d=%d+%d\\n\",i,j,t);\n\t\t\t\tbreak;}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33891", "code": "int k(int p){\n\tint i,h,a=1;\n\tif(p%2==0){\n\t\tif(p==2){\n\t\t\treturn a;\n\t\t}\n\t\ta=0;\n\t\treturn a;\n\t}\n\th=p/2;\n\tfor(i=3;i<=h;i++){\n\t\tif(p%i==0){\n\t\t\ta=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn a;\n}\n\t\t\nint main(){\n int n,i,m;\n\tint k1,k2;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){\n\t\tfor(m=2;m<=i;m++){\n\t\t k1=k(m);\n\t\t k2=k(i-m);\n\t\t if(k1==1&&k2==1){\n\t\t\t printf(\"%d=%d+%d\\n\",i,m,i-m);\n\t\t\t break;\n\t\t }\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33892", "code": "main ()\n{\nint j,m,n,p,q,flagp,flagq ;\nscanf(\"%d\",&m) ;\nfor(n=6;n<=m;n=n+2)\n{\np = 1 ;\ndo {\np = p + 1 ;\nq = n - p ;\nflagp = 1 ;\nfor(j=2;j<=(int)(floor(sqrt((double)(p))));j++)\n{\nif ((p%j)==0)\n{\nflagp = 0 ;\nbreak ;\n}\n}\nflagq= 1 ;\nfor (j=2;j<=(int)(floor(sqrt((double)(q))));j++)\n{\nif ((q%j)==0)\n{\nflagq = 0 ;\nbreak ;\n}\n}\n} while (flagp*flagq==0);\nprintf(\"%d=%d+%d\\n\",n,p,q) ;\n}\n}"} +{"label": "68", "index": "33893", "code": "int main()\n{ \n\tint n,i,k,t,u,m,q=0,c;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(k=3;k<=i;k++)\n\t\t{\n\t\t\tt=0;u=0;c=0;\n\t\t\tfor(m=2;m<=(int)sqrt(k);m++)\n\t\t\t{\n\t\t\t\tif(k%m==0) t=1;\n\t\t\t}\n\n\t\t\tif (t==0) \n\t\t\t{\n q=i-k;\n\t\t\t\tfor(m=2;m<=(int)sqrt(q);m++)\n\t\t\t\t{\n\t\t\t\t\tif(q%m==0) u=1;\n\t\t\t\t}\n\t\t\t if (u==0) {printf(\"%d=%d+%d\\n\",i,k,q);c=1;break;}\n\t\t\t}\n\t\tif(c==1) break;\t\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33894", "code": "void main()\n{\n\tint i,n,p,m,k,a[50000],q=0,r,j,w;\n scanf(\"%d\",&n);\n\n for(k=3;k<=n;k++)\n\t{\n\t m=sqrt(k)+1;\n\t\tp=0;\n\t\tfor(i=2;i= 4)\n\t{\n \tfor(i = 2; i <= sqrt(m); i++)\n\t\t{\n\t \tif(m % i == 0)\n\t\t\t{\n\t \treturn 0;\n\t\t \tbreak;\n\t\t\t}\n\t\t}\n \tif(i > sqrt(m))\n\t\t{\n \t\treturn 1;\n\t\t}\n\t}\n\tif(m == 3)\n\t{\n\t\treturn 1;\n\t}\n}\nint main()\n{\n\tint i, j, n;\n\tcin >> n;\n\tfor(i = 6; i <= n; i = i + 2)\n\t{\n\t\tfor(j = 3; j <= i / 2; j++)\n\t\t{\n\t\t\tif(judge(j) == 1 && judge(i - j) == 1)\n\t\t\t{\n\t\t\t\tcout << i << \"=\" << j << \"+\" << i - j << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33897", "code": "int num_f (int x);\nint main ()\n{\n\tint num, a, b, t;\n\tscanf (\"%d\", &num);\n\tfor (t=6; t<=num; )\n\t{\n\t\tfor (a=3; a<=t/2; )\n\t\t\t{\n\t\t\t\tb = t - a;\n\t\t\t\tif (num_f(a)==1&&num_f(b)==1)\n\t\t\t\t{\n\t\t\t\t\tprintf (\"%d=%d+%d\\n\", t, a, b);\n\t\t\t\t\tt+=2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse a+=2;\n\t\t\t}\n\t\t\n\t}\n\treturn 0;\n}\n\nint num_f (int x)\n{\n\tint i;\n\tfor (i=2; i*i<=x; i++)\n\t\tif (x%i==0) break;\n\t\tif (i*i>x) return 1;\n\t\telse return 0;\n}"} +{"label": "68", "index": "33898", "code": "void main()\n{\n int check(int n);\n int n,i,j;\n scanf(\"%d\",&n);\n n=n/2*2;\n for(i=6;i<=n;i++,i++)\n {\n for(j=2;j<=(i/2);j++)\n {\n if(check(j)==1&&check(i-j)==1)\n {\n printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n } \n }\n }\n}\n\nint check(int n)\n{\n int k,i;\n k=sqrt(n);\n for(i=2;i<=k;i++) \n {\n \tif(n%i==0)\n \t{\n \t return(-1);\n \t break;\n \t}\n }\n if(i==(k+1))\n return(1);\n}"} +{"label": "68", "index": "33899", "code": "int main() \n {\n \tint i,j,n,k,x,y;\n \tint a[50001];\n\tcin>>n;\n \tfor(i=1;i<=n;i=i+2) \n \t{\n\t \ta[i]=1;\n\t }\n\t for(i=9;i<=n;i=i+2)\n \t {\n \t \tfor(j=3;j<=sqrt(i);j=j+2)\n \t \t{\n\t \t \tif (i%j==0) \n\t\t\t {\n \t\t\t\t a[i]=0;break;\n \t\t\t } \n\t \t }\n \t }\n \tfor(j=6;j<=n;j=j+2)\n \t{\n\t \t\n\t for(i=3;i<=(j/2);i=i+2)\n \t{\n\t \tif ((a[i]==1)&&(a[j-i]==1))\n\t \t{cout<>n;\nfor(i=6;i<=n;i=i+2)\n{\n\t\tint a=0,b=0;\n\t\tfor(a=2;a<=i-2;a++)\n\t\t{\t\n\t\t\t\tif(p(i-a)&&p(a))\n\t\t\t\t{\tcout<m)\n\t {t=i-j;s=3;n=sqrt(t);\n\t for(;s<=n;s=s+2)\n\t { r=t%s;\n\t if(r==0) break;}\n\t if(s>n) {printf(\"%d=%d+%d\\n\",i,j,t);\n\t break;}}\n\t }\n\t}\n}\n\t \n\n\t "} +{"label": "68", "index": "33908", "code": "\nint judge(int n)\n{int i;\n\tfor (i=2;i(sqrt(n)+1))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\n\nmain ()\n{\n\tint i,n,m,j,k,l;\n\tscanf (\"%d\",&n);\n\tm=n/2;\n\tfor (i=3;i<=m;i++)\n\t{\n\t\tfor (j=3;j<=m;j++)\n\t\t{\n\t\t\tl=i*2-j;\n\t\t\tk=2*i;\n\t\t\tif ((judge(j)==1)&&(judge(l)==1))\n\t\t\t{printf (\"%d=%d+%d\\n\",k,j,l);\n\t\t\tbreak;}\n\t\t}\n\t}\n\n}"} +{"label": "68", "index": "33909", "code": "\nint pd(int);\nmain()\n{\n int m,count,i;\n scanf(\"%d\",&m);\n for(count=6;count<=m;count=count+2){\n i=2;\n if(i==2&&pd(count-2)){\n printf(\"%d=2+%d\\n\",count,count-2);\n break;\n } \n else\n for(i=3;i<=count/2+1;i=i+2){\n if(pd(i)&&pd(count-i)){\n printf(\"%d=%d+%d\\n\",count,i,count-i);\n break;\n } \n }\n }\n return 0;\n}\n\nint pd(int x)\n{\n int i;\n for(i=2;i<=sqrt(x)+1;i++){\n if(x%i==0)\n return 0;\n }\n return 1;\n}"} +{"label": "68", "index": "33910", "code": " \nint main()\n{ int n,i,j,t[50001];\n scanf(\"%d\",&n);\n for (i=2;i<=n;i++)\n { t[i]=1;\n if(i%2==0)\n\t\tt[i]=0;\n\t\tfor(j=3;j<=sqrt(i)+1;j=j+2)\n\t\t{ if(i%j==0)\n\t\t {t[i]=0;\n\t\t break;\n\t\t}\n\t\t}\n }\n for(i=6;i<=n;i=i+2)\n { for (j=3;j<=n/2;j=j+2)\n { if(t[j]==1&&t[i-j]==1)\n { printf(\"%d=%d+%d\\n\",i,j,i-j);\n break;\n\t }\n }\n }\n\n\n return 0;\n}"} +{"label": "68", "index": "33911", "code": "int main()\n{\n\tint i=0,num=0,n=0,t1=0,t2=0,shu=0;\n\tcin>>n;\n\tfor(shu=6;shu<=n;shu=shu+2)\n\t{\n\t\tfor(num=3;num<=shu/2;num=num+2)\n\t\t{\n\t\t\tt1=0;\n\t\t\tfor(i=2;i<=sqrt(num);i++)\n\t\t\t{\n\t\t\t\tif(num%i==0)\n\t\t\t\t{\n\t\t\t\t\tt1=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(t1==1)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\tt2=0;\n\t\t\t\tfor(i=2;i<=sqrt(shu-num);i++)\n\t\t\t\t{\n\t\t\t\t\tif((shu-num)%i==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tt2=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(t2==1)\n\t\t\t\tcontinue;\n\t\t\telse \n\t\t\t\tcout<sqrt(i))\n {\n a[t]=i;\n c[a[t]]=1;\n t++;\n }\n }\n for (i=6;i<=n;i=i+2)\n {\n for (j=0;a[j]<=i/2;j++)\n {\n p=i-a[j];\n if (c[p]==1)\n {\n printf(\"%d=%d+%d\\n\",i,a[j],i-a[j]);\n break;\n }\n }\n }\n return 0;\n}"} +{"label": "68", "index": "33914", "code": "int main()\n{\n int f(int n);\n int n,i,j;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i+=2)\n {\n for(j=3;ja) c=1;\n else c=0;\n return(c);\n}"} +{"label": "68", "index": "33915", "code": "\nint isprime (int a)\n{\n\tint i;\n\tif(a==2)\n\t\treturn 1;\n\tif((a!=2)&&(a%2==0))\n\t\treturn 0;\n\t\n\tfor(i=3;i<(int)sqrt(a)+1;i=i+2)\n\t{\n\t\tif(a%i==0)\n\t\t\treturn 0;\n\t}\n\n\treturn 1;\n}\n\nint main()\n{\n\tint n,i;\n int k;\n\t\n scanf(\"%d\",&n);\n for(k=6;k<=n;k=k+2)\n\t{\n\t\tfor(i=3;ik)return 1;\n\telse return 0;\n}\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n for(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j=6))\n {\n for(i=3;i<=k/2;i+=2)\n {\n f=1;\n for(j=2;j<=sqrt(i);j++)\n {\n if(i%j==0)\n {\n f=0;\n break;\n }\n }\n if(f==1)\n m=k-i;\n for(j=2;j<=sqrt(m);j++)\n { \n if(m%j==0)\n {\n f=0;\n break;\n }\n }\n if(f==1)\n {\n printf(\"%d=%d+%d\\n\",k,i,m);\n break;\n }\n }\n }\n }\n \n getchar();\n} "} +{"label": "68", "index": "33920", "code": "void main()\n{\n\tint n,i,j,k,r,m,s,p;\n\tscanf(\"%d\",&n);\n\tfor(p=6;p<=n;p=p+2)\n\t{for(j=2;j<=p;j++)\n\t{\n\t k=sqrt(j); \n\t i=2;\n\t if(j%i==1)\n\t {for(i=3;i<=k;i=i+2)\n\t {if(j%i==0) break;}}\n\t if(i>=k+1)\n\t {m=p-j;\n\t s=sqrt(m);\n\t r=2;\n\t if(m%r==1)\n\t {\n\t for(r=3;r<=s;r=r+2)\n\t {if(m%r==0) break;}\n\t }\n\t if(r>=s+1) break;}}\n\t printf(\"%d=%d+%d\\n\",p,j,m);}\n\t \n}"} +{"label": "68", "index": "33921", "code": "int prime (int x)\n{\n\tint i,p=1;\n\tfor (i=2;i<=sqrt(x);i++)\n\t{\n\t\tif (x%i==0)\n\t\t{\n\t\t\tp=0;break;\n\t\t}\n\t}\n\treturn p;\n}\nint main ()\n{\n\tint n;\n\tscanf (\"%d\",&n);\n\tint i=6;\n\twhile (i<=n)\n\t{\n\t\tint j=3;\n\t\twhile (j<=i/2)\n\t\t{\n\t\t\tif (prime(j))\n\t\t\tif (prime(i-j))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\ti+=2;\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33922", "code": "void main()\n{\n int n,i,j,k,pan,x1,x2;\n scanf(\"%d\",&n);\n for(i=6;i<=n;i+=2)\n {\n\t for(j=3;j<=i;j+=2)\n\t {\n\t\t pan=sqrt(j);\n\t\t for(k=3;k<=pan;k+=2)\n\t\t\t if(j%k==0)break;\n\t\t if(k>=pan+1)\n\t\t {\n x2=i-j;\n\t pan=sqrt(x2);\n\t for(k=3;k<=pan;k+=2)\n\t\t if(x2%k==0)break;\n\t if(k>=pan+1)break;\n\t\t }\n\t }\n printf(\"%d=%d+%d\\n\",i,j,x2);\n }\n}"} +{"label": "68", "index": "33923", "code": "int main()\n{\n\tint n, a[25000], m = 4, j, q;\n\tdouble k;\n\ta[2] = 3;\n\ta[3] = 5;\n\ta[4] = 7;\n\tcin >> n;\n\tfor (int i = 11; i <= n / 2; i = i + 2)\n\t{\n\t\tk = sqrt(1.0 * i);\n\t\tfor (j = 2; (a[j] <= k && j <= m); j ++)\n\t\t\tif (i % a[j] == 0)\n\t\t\t\tbreak;\n\t\tif ( a[j] > k || j > m)\n\t\t{\n\t\t\tm ++;\n\t\t\ta[m] = i;\n\t\t}\n\t}\n\tfor (int i = 6; i <= n; i = i + 2)\n\t\tfor ( int p = 2; a[p] <= i / 2; p ++)\n\t\t{\n\t\t\tk = sqrt(1.0 * (i - a[p]));\n\t\t\tfor (q = 3; q <= k; q = q + 2)\n\t\t\t\tif ((i - a[p]) % q == 0)\n\t\t\t\t\tbreak;\n\t\t\tif (q > k)\n\t\t\t{\n\t\t\t\tcout << i << '=' << a[p] << '+' << i - a[p] << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33924", "code": "int main()\n{\n\tint n,i,j,k,x,y,z,a;\n\tscanf(\"%d\",&n);\n\tx=n/2;\n\tfor (i=6;i<=n;i+=2)\n\t{\n\t\tfor (j=3;j<=x;j++)\n\t\t{\n\t\t\tif (j%2==0)\n\t\t\t\tgoto me;\n\t\t\tif (j>2&&j%2!=0)\n\t\t\t{\n\t\t\t\ty=sqrt(j);\n\t\t\t\t\tfor (k=3;k<=y;k+=2)\n\t\t\t\t\t\tif (j%k==0)\n\t\t\t\t\t\t\tgoto me;\n\t\t\t}\n\t\t\ta=i-j;\n\t\t\tz=sqrt(a);\n\t\t\tif (a%2==0)\n\t\t\t\tgoto me;\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (k=3;k<=z;k+=2)\n\t\t\t\t\tif (a%k==0)\n\t\t\t\t\t\tgoto me;\n\t\t\t}\n\t\t\tprintf(\"%d=%d+%d\\n\",i,j,a);\n\t\t\tbreak;\n\t\tme:;\n\t\t}\n\t}\nreturn 0;\n}\n\n"} +{"label": "68", "index": "33925", "code": "void main()\n{\n\tunsigned int n,k=6,i=3,j=3,a,b,x,y;\n\tscanf(\"%d\",&n);\n\tx=sqrt(i);\n\ty=sqrt(j);\n\twhile(k<=n)\n\t{for(a=3;a<=sqrt(i);a+=2)\n\tif(i%a==0)break;\n\tj=k-i;\n\tfor(b=3;b<=sqrt(j);b+=2)\n\tif(j%b==0)break;\n\tif(a>sqrt(i)&&b>sqrt(j)){printf(\"%d=%d+%d\\n\",k,i,j);k+=2;i=3;}\n\telse {i+=2;}\n\t}\n\t\n}"} +{"label": "68", "index": "33926", "code": "int f(int k);\nvoid main()\n{\n\tint x,i,n;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(x=3;x> n ;\n\tfor ( i = 6 ; i <= n ; i = i + 2)\n\t{\n\t\tg = 0;\n\t\tfor ( j = 3 ; j <= i / 2 ; j = j + 2 )\n\t\t{\n\t\t\tp = sqrt( j );\n\t\t\tg = 0 ;\n\t\t\t\t for ( k = 1 ; k <= p ; k++ )\n\t\t\t\t {\n\t\t\t if ( ( k != 1 ) && ( ( j % k ) == 0 ) )\n\t\t\t\t\t {\n\t\t\t\t g = 1;\n\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t\n\t\t if ( g == 0 )\n\t\t {\n\t\t\t s = i - j; \n\t\t q = sqrt( s );\n\t\t h = 0;\n\t\t for ( l = 1 ; l <= q ; l++ )\n\t\t\t {\n\t\t\t if ( ( l != 1 ) && ( ( s % l ) == 0 ) )\n\t\t\t\t {\n\t\t\t\t h = 1;\n\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t if( h == 0)\n\t\t\t {\n\t\t\t cout<>n;\n int i,j,k,t;\n\tint m,s;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\t for(k=2;k<=i;k++)\n\t\t {\n\t\t\t m = (int) sqrt(k);\t\t\t\t\n\t\t \n\t\t\t\tfor (j=2 ; j<=m ; j++)\t\t\t\n\t\t\t\t{\n\t\t\t if( k%j == 0 )\t\t\t\t \n\t\t\t break;\n\t\t\t\t}\n\t\t if(j==m+1)\t\t\t\t//??k???\n\t\t\t\t{\n s = (int) sqrt(i-k);\n\t\t\t\t\t for(t=2;t<=s;t++)\n\t\t\t\t\t {\n\t\t\t\t\t\t if((i-k)%t==0)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t }\n\t\t\t\t\t if(t==s+1)\t\t//??n-k????\n\t\t\t\t\t {\n\t\t\t\t\t\t cout<sqrt(i)) \n\t\t\t\n\t\t\t\t{for (a=3;a<=sqrt(n-i);a=a+2)\n\t\t\t\n\t\t\t\tif((n-i)%a==0) break;\n\t\t\t if(a>sqrt(n-i)) \n\t\t\t\n\t\t\t{printf(\"%d=%d+%d\\n\",n,i,n-i);break;}\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t}\n}"} +{"label": "68", "index": "33932", "code": "void main()\n{\n\tint prime(int x);\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2)\n\t{\n\t\tfor (j=3;j<=i/2;j++)\n\t\t\tif ((prime(j)==1)&&(prime(i-j)==1))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n}\n\nint prime(int x)\n{\n\tint t=1,i;\n\tif (x%2==0)\n\t\tt=0;\n\ti=3;\n\twhile (i*i> n;\n\tfor (i = 6; i <= n; i += 2)\n\t{\n\t\tf = 0;\n\t\tfor (j = 3; j + j <= i; j += 2)\n\t\t{\n\t\t\tfor(k = 3; k * k <= j; k += 2)\n\t\t\t{\n\t\t\t\tif (j % k == 0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( k * k > j)\n\t\t\t{\n\t\t\t\tfor(k = 3; k * k <= i - j; k += 2)\n\t\t\t\t{\n\t\t\t\t\tif ((i - j) % k == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (k * k > i - j)\n\t\t\t\t{\n\t\t\t\t\tcout << i << '=' << j << '+' << i - j << endl;\n\t\t\t\t\tf = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (f == 1)\n\t\t\t\tbreak;\n\t\t}\n\n\t}\n\treturn 0;\n}\n\n"} +{"label": "68", "index": "33934", "code": "\nint main()\n{\n\tint a[50002]={0},i,j,n;\n\tfor (i=2;i<=50000;i++)\n\t{\n\t\tif (a[i]) continue;\n\t\tfor (j=2;j<=50000/i;j++) a[i*j]=1;\n\t}\n\tscanf(\"%d\",&n);\n\tfor (i=6;i<=n;i+=2)\n\t{\n\t\tfor (j=3;j<=i/2;j+=2)\n\t\t\tif (!a[j] && !a[i-j]) break;\n\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33935", "code": "void main()\n{\n\tlong n,i;\n\t\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{long m=i;\n\tint l=3,a=1;\n\t\tdo\n\t\t{int r,k;\n\t\tk=sqrt(l);\n\t\tfor(r=3;r<=k;r=r+2)\n\t\t\tif(l%r==0)break;\n\t\t\tif(r>=k+1)\n\t\t\t{\n\t\t\tint s;\n\t\t\ts=m-l;\n\t\t\tint t=sqrt(s);\n\t\t\tint j;\n\t\t\tfor(j=3;j<=t;j=j+2)\n\t\t\tif(s%j==0)break;\n\t\t\tif(j>=t+1)\n\t\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",m,l,s);\n\t\t\ta=0;}\n\t\t\telse l=l+2;\n\t\t\t}\n\t\t\telse l=l+2;\n\t\t}\n\t\twhile(a!=0);\n\t}\n}"} +{"label": "68", "index": "33936", "code": "void main()\n{\n\tint n,k,x,m,i,a,b,c,d,e;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(m=2;m<=n;m++)\n\t\t{\n\t\t\td=sqrt(m);\n\t\t\tfor(x=2;x<=d;x++)\n\t\t\t{\n\t\t\t\tif(m%x==0)break;\n\t\t\t}\n\t\t\tif(x>d)\n\t\t\t{\n\t\t\t\ta=i-m;\n\t\t\t\te=sqrt(a);\n\t\t\t\tfor(b=2;b<=e;b++)\n\t\t\t\t{\n\t\t\t\t\tif(a%b==0)break;\n\t\t\t\t}\n\t\t\t\tif(b>e)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,m,a);break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33937", "code": "\n\n\nint n,i,j,k,x,a[1001];\n\nint main()\n{\n\tint sushu(int n);\n\tvoid jiafa(int x);\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j+=2)\n\t{\n\t\tjiafa(j);\n\t}\n\treturn 0;\n}\n\nint sushu(int n)\n{\n\tif(n%2==1)\n\t{\n\t\tfor(k=3;k<=sqrt(n);k+=2)\n\t\t\tif(n%k==0)\n\t\t\t\treturn 0;;\n\t\t\treturn 1;\n\t}\n\telse\n\t\treturn 0;\n}\n\nvoid jiafa(int n)\n{\n\tfor(i=3;i<=n/2;i+=2)\n\t{\n\t\tif(sushu(i))\n\t\t{\n\t\t\tif(sushu(n-i))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",n,i,n-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33938", "code": "int main(int argc, char* argv[])\n{\n\tlong int zhi(long int n);\n\tlong int n,k=6,i;\n\tscanf(\"%ld\",&n);\n\twhile (k<=n)\n\t{\n\t\tfor(i=2;i> N;\n for (I = 1; I <= N; I ++) IsP[I] = 1;\n IsP[2] = 1;\n for (I = 2; I <= N; I ++)\n if (IsP[I])\n {\n J = 2 * I;\n while (J <= N)\n {\n IsP[J] = 0;\n J += I;\n }\n }\n for (I = 6; I <= N; I += 2)\n for (J = 3; J <= I - 3; J ++)\n if (IsP[J] && IsP[I - J])\n {\n\tcout << I << \"=\" << J << \"+\" << (I - J) << endl;\n\tbreak;\n }\n return 0;\n}"} +{"label": "68", "index": "33941", "code": "int pd(int n)\n{ int k,i,j;\n k=sqrt(n);\n if(n==1)return 0;\n else if(n==2)return 1;\n else\n for(i=2;i<=k;i++)\n\t if(n%i==0)break;\n\t if(i>k)return 1;\n\t else return 0;\n}\nvoid main()\n{\n\tint n,j,i;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t\tfor(j=2;j> n ;\n\n\tfor( m = 6 ; m <= n ; m = m + 2 )\n\t{\n\t\ta = 0 ;\n\n\t\tfor( m1 = 3 ; m1 <= m / 2 ; m1 = m1 + 2 )\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\tk = sqrt( m1 ) ;\n\n\t\t\t\t//??m1?????\n\t\t\t\tfor( i = 3 ; i <= k ; i = i + 2 )\n\t\t\t\t\tif( m1 % i == 0 )\n\t\t\t\t\t\tbreak ;\n\n\t\t\t\tif( i >= k + 1 )\n\t\t\t\t{\n\t\t\t\t\t//?m1??????m-m1?????\n\t\t\t\t m2 = m - m1 ;\n\t\t\t\t\tj = sqrt( m2 ) ;\n\n\t\t\t\t\tfor( h = 3 ; h <= j ; h = h + 2 )\n\t\t\t\t\t\tif( m2 % h == 0 )\n\t\t\t\t\t\t\tbreak ;\n\n\t\t\t\t\tif( h >= j + 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << m << '=' << m1 << '+' << m2 << endl ;\n\t\t\t\t\t\ta = 1 ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0 ;\n}"} +{"label": "68", "index": "33943", "code": "int sushu(int x)\n{\n\tint z,t,k;\n\tk=(int)sqrt(x);\n\tfor(t=2;t<=k;t++)\n\t\tif(x%t==0) break;\n\t\tif(t>k) z=1;\n\t\t\telse z=0;\n\t\t\treturn z;\n}\nvoid main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;j<=i;j=j+2)\n\t\t\tif(sushu(j)&&sushu(i-j))\n\t\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\tbreak;\n\t\t\t}\n\t}\n}\n"} +{"label": "68", "index": "33944", "code": "int pri(int a)\n{\n int i;\n if(a%2==0) return 0;\n for(i=3;i<=sqrt(a);i+=2){\n if(a%i==0) return 0;\n }\n return 1;\n}\nint main()\n{\n int n;\n scanf(\"%d\",&n);\n int i,j;\n for(i=6;i<=n;i+=2){\n if(pri(i-2)==1) {printf(\"%d=2+%d\\n\",i,i-2);continue;}\n for(j=3;j<=i/2;j+=2){\n if(pri(j)==1&&pri(i-j)==1) {printf(\"%d=%d+%d\\n\",i,j,i-j);break;}\n }\n }\n \n }"} +{"label": "68", "index": "33945", "code": "\nint p[50001];\n\nint main() {\n\tint n, i, j;\n\tscanf(\"%d\", &n);\n\tp[0] = p[1] = 0;\n\tfor (i = 2; i <= n; ++i) {\n\t\tp[i] = 1;\n\t\tfor (j = 2; j * j <= i; ++j)\n\t\t\tif (i % j == 0) {\n\t\t\t\tp[i] = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\tfor (i = 6; i <= n; i += 2)\n\t\tfor (j = 3; j <= n; j += 2)\n\t\t\tif (p[j] && p[i - j]) {\n\t\t\t\tprintf(\"%d=%d+%d\\n\", i, j, i - j);\n\t\t\t\tbreak;\n\t\t\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33946", "code": "int check(int n){\n\tint i;\n\tfor(i=3;i*i<=n;i=i+2){\n\t\tif(n%i==0)break;\n\t}\n\tif(i*i>n)return 1;\n\telse return 0;\n}\n\nint main(){\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i=i+2){\n\t\tfor(j=3;j<=i/2;j=j+2){\n\t\t\tif(check(j)!=0&&check(i-j)!=0){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,i-j);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33947", "code": "int main(){\n int s[50000];//?????????????????\n\tint n,a,p1,p2,c;\n\tint i,j=3,v,k,h;\n\tscanf(\"%d\",&n);\n\tdo{\n \t a=0;\n \t for(i=2;i<=sqrt(j);i++){\n \t\t if((j%i)==0){\n a=1;\n \t\t\t break;\n }\n \t\t}\n \t if(a==0){ \n s[j]=j;\n }\n j++;\n }while(j=v/2;h=h-2)\n\t\t {\n\t\t\t p2=h;\n\t if(p2==s[h])\n\t\t\t {\n\t\t \t printf(\"%d=%d+%d\\n\",v,p1,p2);\n\t\t c=1;\n\t\t\t }\n\t\t\t break;\n\t\t }*/\n h=v-k;\n\t\t p2=h;\n\t if(p2==s[h])\n\t\t\t {\n\t\t \t printf(\"%d=%d+%d\\n\",v,p1,p2);\n\t\t c=1;\n\t\t\t } \n\t\tif(c==1){break;}\n\t }\n\t}\n return 0;\n}\n\n\n"} +{"label": "68", "index": "33948", "code": "\nvoid main()\n{\n\tint n,i,j,k,x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(x=3;x<=n/2;x++)\n\t\t{\n\t\t\tfor(j=2;j<=sqrt(x);j++)\n\t\t\t\tif(x%j==0)\n\t\t\t\t\tbreak;\n\t\t\tif(j<=sqrt(x)) \n\t\t\t\tcontinue;\n\t\t\ty=i-x;\n\t\t\tfor(j=2;j<=sqrt(y);j++)\n\t\t\t\tif(y%j==0)\n\t\t\t\t\tbreak;\n\t\t\tif(j>sqrt(y))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,x,y);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33949", "code": "main()\n{\n\tlong a,i,q,p,j,t;\n\tscanf(\"%ld\",&a);\n\tfor(i=6;i<=a;i+=2)\n\t\tfor(p=3;p<=i/2;p+=2)\n\t\t{\n\t\t\tt=0;\n\t\t\tfor(j=3;j*j<=p;j+=2)\n\t\t\t\tif(p%j==0)\n\t\t\t\t{\n\t\t\t\t\tt=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif(t)\n\t\t\t\tcontinue;\n\t\t\tq=i-p;\n\t\t\tfor(j=3;j*j<=q;j+=2)\n\t\t\t\tif(q%j==0)\n\t\t\t\t{\n\t\t\t\t\tt=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif(!t)\n\t\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,p,q);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n}\n\n"} +{"label": "68", "index": "33950", "code": "\nint prime(int n) \n{\n int i;\n for (i=2;i<=(int)sqrt(n); i++)\n { if (n%i==0) \n\t return 0;\n }\n return 1;\n}\nint main(int argc, char* argv[])\n{\n int i,j;\n int n;\n scanf(\"%d\",&n);\n for (i=6;i<=n;i+=2)\n for (j=3;jr){\n\t\t p[q+1]=r;\n\t\t q++;\n\t }\n\t}\n\n\tint i,j,k,m;\n\tfor (i=6;i<=n;i=i+2){\n\t\tfor(j=0;p[j]<=i/2;j++){\n\t\t\tm=i-p[j];\n\t\t\tfor(k=0;p[k]*p[k]i){\n\t\t\t\tprintf(\"%d=%d+%d\\n\",i,p[j],m);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33952", "code": "int F(long int m)\n{\n\tlong int i;\n\tif(m%2==0)\n\t\treturn 0;\n\tfor(i=3;i<=sqrt(m);i+=2)\n\t{\n\t\tif(m%i==0)\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\nvoid main()\n{\n\tlong int i,j,n;\n\tscanf(\"%ld\",&n);\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j<=(i/2);j+=2)\n\t\t\n\t\t\tif(F(j)==1&&F(i-j)==1)\n\t\t{\n\t\t\t\tprintf(\"%ld=%ld+%ld\\n\",i,j,i-j);\n\t\t\tbreak;\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33953", "code": "int main(int argc, char* argv[])\n{\n\tint prime(int p);\n\tint n,i,k;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++,i++)\n\t{\n for(k=3;k> n;\n\tfor(i=6;i<=n;i=i+2)\t\t\t\t\t//??6?12???????\n\t{\n\t\tfor(k1=3;k1<=i/2;k1=k1+2)\t\t//?k1????????\n\t\t{\n\t\t\tsqr = (int) sqrt(k1);\n\t\t\tfor(j=2;j<=sqr;j++)\n\t\t\t{\n\t\t\t\tif(k1 % j == 0) break;\n\t\t\t}\n\t\t\tif(j == sqr + 1)\t\t\t//?k1?????k2=i-k1???k2\n\t\t\t{\n\t\t\t\tk2 = i - k1;\n\t\t\t\tsqr = (int) sqrt(k2);\n\t\t\t\tfor(j=2;j<=sqr;j++)\t\n\t\t\t\t{\n\t\t\t\t\tif(k2 % j == 0) break;\n\t\t\t\t}\n\t\t\t\tif(j == sqr + 1)\t\t//?k2???????????????\n\t\t\t\t{\n\t\t\t\t\tcout << i << \"=\" << k1 << \"+\" << k2 << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "68", "index": "33956", "code": "int main()\n{\n\tint n,i=0,j=0,m[100]={0},t,k,flag[2]={0,0};\n\tcin>>n;\n\tfor(i=6;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j<=i/2;j+=2)\n\t\t{\n\t\t\tflag[0]=0;\n\t\t\tfor(t=3;t<=sqrt(j);t+=2)\n\t\t\t{\n\t\t\t\tif(j%t==0)\n\t\t\t\t{\n\t\t\t\t\tflag[0]=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag[0]==1)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tflag[1]=0;\n\t\t\tfor(k=3;k<=sqrt(i-j);k+=2)\n\t\t\t{\n\t\t\t\tif((i-j)%k==0)\n\t\t\t\t{\n\t\t\t\t\tflag[1]=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag[1]==1)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\tcout<sqrt(a1)&&k2>sqrt(a2))\n\t {printf(\"%d=%d+%d\\n\",a,a1,a2);\n\t break;}\n\t}\n }\n }\n} "} +{"label": "68", "index": "33963", "code": "\n\nint prime[50002];\n\nint main()\n{\n\tint N;\n\tcin>>N;\n\tfor(int i = 2; i <= N; i++)\n\t\tprime[i] = 1;\n\tfor(int i = 2; i <= N / 2; i++)\n\t\tprime[i * 2] = 0;\n\tint p = 2;\n\twhile(p * p <= N)\n\t{\n\t\tp = p + 1;\n\t\twhile(prime[p] == 0)\n\t\t\tp++;\n\t\tint t = p * p;\n\t\tint s = 2 * p;\n\t\twhile(t <= N)\n\t\t{\n\t\t\tprime[t] = 0;\n\t\t\tt = t + s;\n\t\t}\n\t}\n\tfor(int i=6;i<=N;i+=2)\n\t{\n\t\tfor(int j=3;j<=N-j;j+=2)\n\t\t{\n\t\t\tif(prime[j]==1&&prime[i-j]==1)\n\t\t\t{\n\t\t\t\tcout<k) return(1);\nelse return(0);\n}\n\nvoid main()\n{\n\t\nint n,x,e,f;\nscanf(\"%d\",&n);\nfor(x=6;x<=n;x=x+2)\n{\ne=2;\nwhile(e<=x/2)\n{\nf=x-e;\nif(prime(e)==1&&prime(f)==1)\n{\nprintf(\"%d=%d+%d\\n\",x,e,f);\nbreak;\n}\nelse e++;\n}\n}\n\n}"} +{"label": "68", "index": "33968", "code": "int main(int argc, char* argv[])\n{\n\tint m = 6, n, even = 6, odd;\n\tint su(int x);\n\tscanf(\"%d\", &n);\n while(m <= n)\n\t{\n\t\todd = 3;\n\t\twhile(odd < m)\n\t\t{\n\t\t\tif(su(odd) == 1)\n\t\t\t{\n\t\t\t\tif(su(m - odd) == 1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\", m, odd, m - odd);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\todd += 2;\n\t\t\t}\n\t\t\telse\n\t\t\t\todd += 2;\n\t\t}\n\t m += 2;\n\t}\n return 0;\n}\n\nint su(int x)\n{\n\tint i;\n\tfor(i=3;i<=sqrt(x)+1;i+=2)\n\t{\n\t\tif(x%i == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t}\n return 1;\n}\n"} +{"label": "68", "index": "33969", "code": "void main()\n{\n\tint prime(int x);\n\tint n,i,j,k;\n\tscanf(\"%d\",&n);\n\tfor(i=6;i<=n;i++)\n\t{\n\t\tif(i%2==0)\n\t\t{\n\t\t\tfor(j=2;j<=i/2;j++)\n\t\t\t{\n\t\t\t\tk=i-j;\n\t\t\t\tif(prime(j)==1&&prime(k)==1)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d=%d+%d\\n\",i,j,k);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nint prime(int x)\n{\n\tint i,k;\n\tif(x==2) return 1;\n\tk=sqrt(x);\n\tfor(i=2;i<=k;i++)\n\t{\n\t\tif(x%i==0) break;\n\t}\n\tif(i>k) return 1;\n\telse return 0;\n}\n"} +{"label": "68", "index": "33970", "code": "void main()\n{\n\tint x,y,i,j,k,l,n,m;\n\tscanf(\"%d\",&n);\n\tm=6;\n\twhile(m<=n)\n\t{\n\tx=3;\njudx:k=sqrt(x);\n\ti=3;\n\twhile(i<=k)\n\t{\n\t if(x%i!=0)\n\t i=i+2;\n\t\telse \n\t\t{\njudy:x=x+2;\n\t\t\tgoto judx;\n\t\t}\n\t}\n y=m-x;\n\t l=sqrt(y);\n\t j=3;\n\t while(j<=l)\n\t {\n\t\t if(y%j!=0)\n\t\t\t j=j+2;\n\t\t else goto judy;\n\t }\n\t printf(\"%d=%d+%d\\n\",m,x,y);\n\t m=m+2;\n\t}\n}"} +{"label": "68", "index": "33971", "code": "main()\n{long int i,j,k,n,n_,a,b,c;\nscanf(\"%d\",&n);\n for(k=6;k<=n;k+=2) \n {n_=k;j=1;\n do \n {c=0;\n j=j+2;\n a=j;\n b=n_-j;\n for(i=3;i<=sqrt(a);i=i+2) \n if(a%i==0) c=1;\n for(i=3;i<=sqrt(b);i=i+2) \n\tif(b%i==0) c=1;\n }\n while(c==1);\n printf(\"%d=%d+%d\\n\",n_,a,b);\n }\n}"} +{"label": "68", "index": "33972", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tint i;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tint j=3;\n\t\tint k=3,t=0,l=0;\n int p=0;\n\t\twhile(1)\n\t\t{\n\t\t p=0;\n\t\t t=0;\n\t\t l=0;\n\t\t\tfor(k=3;k<=sqrt(j);k++)\n\t\t{\n\t\t\tif(j%k==0)\n\t\t\t\tt=1;\n\t\t}\n\t\t//if(t==0)\n\t//\t{\n\t\t\tfor(k=3;k<=sqrt(i-j);k++)\n\t\t\t{\n\t\t\t\tif((i-j)%k==0)\n\t\t\t\t\tl=1;\n\t\t\t}\n\t//\t}\n\t\tif(t==0&&l==0)\n\t\t{\n\t\t\tcout<>n;\nfor(i=6;i<=n;i+=2)\n{\n\tfor(j=3;j<=(i/2);j+=2)\n\t\tif((ispo(j))&&(ispo(i-j)))\n\t\t{\n\t\t\tcout<(sqrt(k))) a=1;\n\t\telse a=0;\n\treturn(a);\n}\nvoid fj(long n)\n{ \n\tlong i,m;\n\tfor (i=3;i0 && pd(m)>0)\n\t\t{\n\t\t\tprintf(\"%ld=%ld+%ld\\n\",n,i,m);\n\t\t break;\n\t\t}\n\t}\n}\nvoid main()\n{\n\tlong h,b;\n\tscanf(\"%ld\",&h);\n\tfor(b=6;b<=h;b=b+2)\n\t\tfj(b);\n}"} +{"label": "68", "index": "33975", "code": "int sushu(int n)\n\t{\n\t\tint i,m;\n\t\tm=sqrt(n)+1;\n\t\tfor(i=2;i>n;\n prime[2]=1;\n for(int i=6;i<=n;i+=2)\n {\n if(isPrime(i-2))\n {\n cout<(int)sqrt(p)) \n\t {q=k-p;\n for(j=3;j<=(int)sqrt(q);j=j+2)\n if(q%j==0) break;\n if(j>(int)sqrt(q)) \n\t { printf(\"%d=%d+%d\\n\",k,p,q); k=k+2;goto loop;}}}\n \n k=k+2;}\n}\n"} +{"label": "68", "index": "33981", "code": "\nint main ()\n{\n\tint n,j,m;\n\tint sushu(int a);\n\tscanf (\"%d\", &n);\n\tfor (j=6;j<=n;j+=2)\n\t{\n\t\tfor (m=3;m<=(n/2);m+=2)\n\t\t{\n\t\t\tif (sushu(m)+sushu(j-m)==2)\n\t\t\t{\n\t\t\t\tprintf (\"%d=%d+%d\\n\", j,m,j-m);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nint sushu (int a)\n{\n\tint i;\n\tfor (i=3;i<=sqrt(a);i+=2)\n\t{\n\t\tif (a%i==0)\n\t\t{\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 1;\n}"} +{"label": "68", "index": "33982", "code": "\n\nint main()\n{\n\tint n,j,b;\n\tint i;\n\tint a[50001];\n\ta[0]=a[1]=1;\n\tcin>>n;\n\tfor( i=2 ; in/2 )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj=2;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33983", "code": "int sushu(int n)\n{\n\tint s,i;\n\tif(n==2) return 1;\n\tif(n==3) return 1;\n\ts=0;\n\tif(n%2==0) s=1;\n\tfor(i=3;i<=sqrt(n);i=i+2)\n\t{\n\t\tif((sushu(i)==1)&&(n%i==0))\n\t\t{\n\t\t\ts=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(s==0) return 1;\n\telse return 0;\n}\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(j=6;j<=n;j=j+2)\n\t{\n\t\tfor(i=3;i<=j/2;i=i+2)\n\t\t{\n\t\t\tif((sushu(i)==1)&&(sushu(j-i)==1))\n\t\t\t{\n\t\t\t\tprintf(\"%d=%d+%d\\n\",j,i,j-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "68", "index": "33984", "code": "int main()\n{\n\tint n,A[50003],i,j,k;\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t\tA[i]=1;\n\tfor(i=4;i<=n;i+=2)\n\t\tA[i]=0;\n\tA[1]=0;\n\tfor(i=3;ik))||(((su2%k)==0)&&(su2>k)))\n\t\t\t{\n\t\t\tq=1;\n\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\tif(q==0)\n\t\t\t{\n\t\t\tprintf(\"%d=%d+%d\\n\",i,su,su2);\n\t\t break;\n\t\t\t}\n\t\t\telse\n\t\t\tq=0;\n\t\t\t\t\n\t\t}\n\t}\n}"} +{"label": "68", "index": "33989", "code": "int Set(int a)\n{\n\tint i,w=1;\n\tif (a%2==0)\n\t{w=0;goto loop;}\n\tfor (i=3;i=c+1)\n\t\t\t{\n\t\t\t f=a-b;\n\t\t\t e=(int)(sqrt(f));\n for(d=2;d<=e;d=d++)\n\t\t\t\tif(f%d==0) break;\n\t\t\t}\n\t\tif(d>=e+1) break;\n\t\t}\t\t\n\t\tprintf(\"%d=%d+%d\\n\",a,b,f);\n\t}\n}"} +{"label": "68", "index": "33991", "code": "void main()\n{\n\tint zhishu(int i);\n\tlong n;\n\tlong num;\n\tint i;\n\tscanf(\"%d\",&n);\n\tfor(num=6;num<=n;num=num+2)\n\t{\n\tprintf(\"%d=\",num);\n\tif(zhishu(num-2)==1) printf(\"%d+%d\\n\",2,num-2);\n\telse if(sqrt(num)>=3)\n\t{\n\t\tfor(i=3;i<=num/2;i=i+2)\n\t\t{\n\t\t\tif(zhishu(i)==1&&zhishu(num-i)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d+%d\\n\",i,num-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\telse if(sqrt(num)<3)\n\t{\n\t\tfor(i=3;i<=num/2;i=i+2)\n\t\t{\n\t\t\tif(zhishu(i)==1&&zhishu(num-i)==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d+%d\\n\",i,num-i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t}\n}\nint zhishu(int i)\n{\n\tint j;\n\tif(i==2) return 1;\n\telse if(i%2==0&&i!=2) return 0;\n\telse for(j=3;jsqrt(y)) \n {\n printf(\"%d=%d+%d\\n\",i,m,y);\n break;\n } \n else\n continue;\n }\n\n }\n}\n"} +{"label": "68", "index": "33993", "code": "int judge_zhi(int a)\n{\n\tint i;\n\tif(a!=2&&a%2==1)\n\t{\n\tfor(i=2;i<=sqrt(a)+1;i++)\n\t{\n\t\tif(a%i==0)\n\t\t{\n\t\t\treturn(0);\n\t\t break;\n\t\t}\n\t}\n\tif(i>=sqrt(a)+1) return(1);\n\t}\n\tif(a==2) return(1);\n\tif(a>2&&a%2==0) return(0);\n}\n\nvoid main()\n{\n\tint n,i,j,m;\n\tscanf(\"%d\",&m);\n\tfor(n=6;n<=m;n++)\n\t{\n\t if(n%2==1) continue;\n\t\tfor(i=2;i>n;\n\tint i;\n\tfor(i=6;i<=n;i=i+2)\n\t{\n\t\tint j=3;\n\t\tint k=3,t=0,l=0,p=0;\n\t\tdo\n\t\t{\n\t\t p=0;\n\t\t t=0;\n\t\t l=0;\n\t\t\tfor(k=3;k<=sqrt(j);k++)\n\t\t{\n\t\t\tif(j%k==0)\n\t\t\t\tt=1;\n\t\t}\n\t\tif(t==0)\n\t\t{\n\t\t\tfor(k=3;k<=sqrt(i-j);k++)\n\t\t\t{\n\t\t\t\tif((i-j)%k==0)\n\t\t\t\t\tl=1;\n\t\t\t}\n\t\t}\n\t\tif(t==0&&l==0)\n\t\t{\n\t\t\tcout<a)\n h=i-j;\n b=sqrt(h);\n for(k=3;k<=b;k=k+2)\n { if(h%k==0)break;\n\t\t}\n\t if(k>b)break;\n\t }\n printf(\"%d=%d+%d\\n\",i,j,h);\n } \n}"} +{"label": "69", "index": "34000", "code": "char res[Max+1]; // ?\nchar a[Max],b[Max]; // ????!\nint len1,len2;\nvoid Init(char *a)\n{\nint i;\nfor(i=0; i=0,j>=0; i--,j--)\n{\n tempsum = res[i]-'0'+newone[j]-'0'+carry;\n res[i] = tempsum%10+'0';\n carry = tempsum/10;\n}\nwhile(carry > 0) // ------??????????!\n{\n tempsum = res[i]-'0'+carry ;\n res[i] = tempsum%10+'0';\n carry = tempsum/10;\n i--;\n}\n//------------------- ??????????\nfor(i=0;i=0; i--)\n res[Max+i-len] = a[i];\n}\nint main()\n{\nInput(a,b);\nLong_Add(res,b);\nreturn 0;\n}\n"} +{"label": "69", "index": "34001", "code": "int main()\n{\n\tchar a[250],b[250],c[251];\n int i,j,z;\n gets(a);gets(b);\n for(i=0;i<=250;i++)\n c[i]='0';\n i=strlen(a)-1;\n j=strlen(b)-1;\n\tif (i==0 && j==0) printf(\"%d\\n\",0);\n for(z=250;i>=0&&j>=0;i--,j--,z--)\n\t{\n\t\tc[z]=c[z]+a[i]-'0'+b[j]-'0';\n if(c[z]>'9')\n\t\t{\n\t\t\tc[z]=c[z]-10;\n c[z-1]++;\n\t\t}\n\t}\n if(i>=0)\n for(;i>=0;i--,z--)\n\t{\n\t\tc[z]=c[z]+a[i]-'0';\n if(c[z]>'9')\n\t\t{c[z]=c[z]-10;\n c[z-1]++;\n\t\t}\n\t}\n if(j>=0)\n for(;j>=0;j--,z--)\n\t{\n\t\tc[z]=c[z]+b[j]-'0';\n if(c[z]>'9')\n\t\t{\n\t\tc[z]=c[z]-10;\n c[z-1]++;\n\t\t}\n\t}\n for(i=0;i<=250;i++)\n {\n\t\tif(c[i]!='0')\n break;}\n \n\n for(;i<=250;i++)\n\t\tcout<b)\t\t\n\t\tc=a+1;\n\telse\n\t\tc=b+1;\n\t*(result+c+1)='\\0';\t\n\tfor(i=0;c>=i;i++)\t\n\t{\t\t\t\t\t\t\n\t\tif(ab){\nfor(j=0,k=a-b;j<=b-1,k<=a-1;j++,k++){\n\nstr[k]=str1[k]+str2[j]-'0';}\nfor(k=0;k=b-a,m>=0;l--,m--){\nstr[l]=str1[m]+str2[l]-'0';}\nfor(l=0;l=b)?a:b-1;n>=1;n--){\nif(str[n]>'9'){\nstr[n]=str[n]-10;\nstr[n-1]=str[n-1]+1;}}\nif(str[0]>'9')\n{n=(a>=b)?a:b;\nfor(h=1;h=0;i--)\n\ta[len1-1-i]=str1[i]-'0';\n\tfor(i=len2-1;i>=0;i--)\n\t\tb[len2-i-1]=str2[i]-'0';\nfor(i=0;i=10) {a[i+1]+=1;a[i]=a[i]+b[i]-10;} \n\t\telse a[i]+=b[i];\n\t}\n\tint count=249; //?????250????????\n\twhile(a[count]==0) //???????????????????????????0 ?????????????0??\n\tcount--;\n\tfor(i=count;i>=0;i--) //??????????????????????\n\t\tcout<=0||j>=0;i--,j--,k++)\n\t{\n\t\tif (i>=0&&j>=0)\n\t\t{\n \t\t\t\n\t\t\tif (a[i]-48+b[j]+tmp3-48>57)\n\t\t\t{\n\t\t\t\ttmp2=a[i]-48+b[j]+tmp3-48-10;\n\t\t\t\ttmp3='1';\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmp1=a[i]-48+b[j]+tmp3-48;\n\t\t\t\ttmp2=tmp1;\n\t\t\t\ttmp3='0';\n\t\t\t}\n\t\t\tc[k]=tmp2;\n\t\t}\n\t\telse if (i<0&&j>=0)\n\t\t{\n if (b[j]+tmp3-48>57)\n\t\t\t{\n\t\t\t\ttmp2=b[j]+tmp3-48-10;\n\t\t\t\ttmp3='1';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmp1=b[j]+tmp3-48;\n\t\t\t\ttmp2=tmp1;\n\t\t\t\ttmp3='0';\n\t\t\t}\n\t\t\tc[k]=tmp2;\n\t\t}\n\t\telse if (i>=0&&j<0)\n\t\t{\n\t\t\tif (a[i]+tmp3-48>57)\n\t\t\t{\n\t\t\t\ttmp2=a[i]+tmp3-48-10;\n\t\t\t\ttmp3='1';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmp1=a[i]+tmp3-48;\n\t\t\t\ttmp2=tmp1;\n\t\t\t\ttmp3='0';\n\t\t\t}\n\t\t\tc[k]=tmp2;\n\t\t}\n\t}\n\tif (tmp3=='1')\n\t{\n\t\tc[k]='1';\n\t c[k+1]='\\0';\n\t}\n\telse c[k]='\\0';\n cl=strlen (c);\n\tfor (i=cl-1;i>=0;i--)\n\t{\n\t\tif (c[i]=='0')\n\t\t\tp++;\n\t\telse \n\t\t\tbreak;\n\t}\n//\tprintf (\"%d%d\",p,cl);\n\tif (cl==1&&c[0]=='0')\n\t\tputs(c);\n\telse{\n\tfor (i=cl-p-1;i>=0;i--)\n\t\td[cl-p-i-1]=c[i];\n\td[cl-p]='\\0';\n\tputs (d);\n\t}\n\t//printf (\"%d %d %d \\n\",al,bl,cl);\n\t\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34006", "code": "//POJ ?? 2981 ?????\nint main()\n{\n\tchar A[300] , B[300];\n\tint a[300]={0} , b[300]={0} , c[320] = {0}; \n\tmemset(A,' ',sizeof(B));\n\tmemset(B,' ',sizeof(B));\n\tcin.getline(A,300);\n\tcin.getline(B,300);\n\tint x = strlen(A) , y = strlen(B) ;\n\tfor(int i = x-1; i>=0 ; i--){\n\t\tif(A[i]==' ');\n\t\telse\n\t\t\ta[x-i] = A[i] - '0';//??A?(?A[0]??)123456??a?(?a[0]??)0654321\n\t}\n\tfor(int j = y-1; j>=0 ; j--){\n\t\tif(B[j]==' ');\n\t\telse\n\t\t\tb[y-j] = B[j] - '0';\n\t}\n\tfor(int k = 0 ; k=0 ; l--){\n\t\tif(c[l] != 0){\n\t\t\tremember = l ;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int m = remember ; m>0 ; m--)\n\t\tcout<bl)? al:bl;\n int i;\n for(i=0;i=10){\n c[i+1]+=c[i]/10;\n c[i]=c[i]%10;\n }\n }\n if(c[l]!=0)\n return l+1;\n else \n return l;\n}\nint print(int*c,int l)\n{\n int i,k;\n k=l-1;\n while (c[k]==0&&k>0){\n k--;\n }\n for (i=k;i>=0;i--){\n printf(\"%d\",c[i]);\n }\n}\n \n \n"} +{"label": "69", "index": "34008", "code": "const int maxlen=255;\nint main()\n{\n\tchar str1[maxlen],str2[maxlen];\n\tint a1[maxlen],a2[maxlen];\n\tmemset(a1,0,sizeof(a1));\n\tmemset(a2,0,sizeof(a2));\n\tcin>>str1>>str2;\n\tfor(int i=0;i=10)\n\t\t{\n\t\t\ta1[i]=temp%10;\n\t\t\ta1[i+1]+=1;\n\t\t}\n\t\telse\n\t\t\ta1[i]=temp;\n\t\tif(a1[i]!=0)\n\t\t\tpos=i;\n\t}\n\tfor(int i=pos;i>=0;i--)\n\t\tcout<>a>>b;\n\tif (strlen(a)==1&&strlen(b)==1&&a[0]=='0'&&b[0]=='0') cout<<\"0\"<strlen(b))\n\t\t{\n\t\t\tl=strlen(a);\n\t\t\tfor (i=strlen(b);i=10)\n\t\t\t{\n\t\t\t\the[i+1]++;\n\t\t\t\the[i]=he[i]%10;\n\t\t\t}\n\t\t}\n\t\tfor (i=299;i>=0;i--)\n\t\t{\n\t\t\tif (he[i]!=0) break;\n\t\t}\n\t\tfor (j=i;j>=0;j--)\n\t\t\tcout<= 0) i --;\n\tif (i < 0)\n\t\tcout << \"0\" << endl;\n\telse\n\t{\n\t\tfor (; i >= 0; i --)\n\t\t{\n\t\t\tcout << c[i];\n\t\t}\n\t\tcout << endl;\n\t}\n\n\treturn 0;\n}\n"} +{"label": "69", "index": "34011", "code": "/*???????????????????????*/\n\n/*include???*/\n\n/*??????*/\nstruct node\t\n{\n\tint x;\t\t//?????????\n\tstruct node *pb;\t\t//???????\n\tstruct node *pn;\t\t//???????\n};\n\n/*???????*/\nvoid jianli (struct node *ph,int* f,int* w,struct node **pl)\t\t//ph?????f???????pl?????????????\n{\n\tchar c;\t\t//c???????\n\t*f=1;\t\t//f????????1?????-1????????1\n\t*w=1;\t\t//w???????????1\n\tstruct node *p,*q;\t\t//?????????????\n\tc=getchar();\t\t//???????\n\t//?????????\n\tif (c=='-')\n\t{\n\t\t*f=-1;\t\t//???????\n\t\tc=getchar();\t\t//??????????????\n\t}\n\tq=ph;\t\t//????????q\n\t//?????0\n\tif (c=='0')\n\t{\n\t\tfor (;;)\t\t//??????????0??\n\t\t{\n\t\t\tif (c!='0')\t\t\t//??0??\n\t\t\t\tbreak;\n\t\t\telse\t\t//???0?????\n\t\t\t\tc=getchar();\n\t\t}\n\t\tif ((c<'0')||(c>'9'))\t\t//??c???0??????????????0???????????????0?????\n\t\t{\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//??????????????\n\t\t\tp->pn=q->pn;\n\t\t\tp->pb=q;\n\t\t\tq->pn=p;\n\t\t\tq=p;\n\t\t\tp->x=0;\t\t//?????0\n\t\t\t*w=1;\t\t//????????\n\t\t\t*pl=p;\t\t//?????????????????\n\t\t\treturn;\t\t//????\n\t\t}\n\t}\n\t//??????0??????????????\n\tfor (;;)\n\t{\n\t\tif ((c<'0')||(c>'9'))\t\t//???????????\n\t\t{\n\t\t\t*pl=p;\t\t//?????????????????\n\t\t\treturn;\t\t//????\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=q->pn;\n\t\tp->pb=q;\n\t\tq->pn=p;\n\t\tq=p;\n\t\tp->x=c-'0';\t\t//????????\n\t\t*w=*w+1;\t\t//??+1\n\t\tc=getchar();\t\t//?????????\n\t}\n}\n\n/*????*/\nvoid shanchu (struct node *ph)\t\t//ph????????\n{\n\tstruct node *p,*q;\t\t//?????????????\n\tp=ph;\t\t//????????p\n\t//?????????????????\n\tfor (;;)\n\t{\n\t\tif (p==NULL)\t\t//?????????????????\n\t\t\treturn;\n\t\tq=p->pn;\t\t//?????????\n\t\tfree(p);\t\t//????\n\t\tp=q;\t\t//???????????\n\t}\n}\n\n/*???????????*/\nvoid jia (struct node *pl1,struct node *pl2,struct node *p3)\t\t//p3??????????pl1?pl2??????????????\n{\n\tstruct node *a,*b,*p,*r;\t\t//?????????????\n\tint c,j=0;\t\t//c????????????j???????0??????1????\n\ta=pl1;\t\t//a?b??????????????????????\n\tb=pl2;\n\t//?????????\n\tfor (;;)\n\t{\n\t\tif ((a->pb==NULL)&&(b->pb==NULL))\t\t//???????????????\n\t\t{\n\t\t\tif (j==1)\t\t//????????????????????p3?????????1???\n\t\t\t{\n\t\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\t\tp->pn=p3->pn;\n\t\t\t\tp->pb=p3;\n\t\t\t\tp3->pn=p;\n\t\t\t\tp->x=1;\t\t//?????1\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//????????????????????????????\n\t\telse if (a->pb==NULL)\n\t\t{\n\t\t\tr=a;\n\t\t\ta=b;\n\t\t\tb=r;\n\t\t}\n\t\t//?????????????????????????\n\t\tif (b->pb==NULL)\n\t\t{\n\t\t\tc=a->x+j;\t\t//????????????????\n\t\t\tj=0;\t\t//??j\n\t\t\tif (c>9)\t\t//???????c?10????????\n\t\t\t{\n\t\t\t\tj=1;\n\t\t\t\tc=c-10;\n\t\t\t}\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\tp->pn=p3->pn;\n\t\t\tp->pb=p3;\n\t\t\tp3->pn=p;\n\t\t\tp->x=c;\t\t//???????\n\t\t\ta=a->pb;\t\t//??????????\n\t\t\tcontinue;\t\t//??????????\n\t\t}\n\t\tc=a->x+b->x+j;\t\t//????????????????\n\t\tj=0;\t\t//??j\n\t\tif (c>9)\t\t//???????c?10????????\n\t\t{\n\t\t\tj=1;\n\t\t\tc=c-10;\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=p3->pn;\n\t\tp->pb=p3;\n\t\tp3->pn=p;\n\t\tp->x=c;\t\t//???????\n\t\ta=a->pb;\t\t//??????????\n\t\tb=b->pb;\n\t}\n}\n\n/*???????????*/\nvoid jian (struct node *pl1,struct node *pl2,struct node *p3)\t\t//p3??????????pl1?pl2???????????????pl1??????pl2????\n{\n\tstruct node *a,*b,*p,*r;\t\t//?????????????\n\tint c,j=0;\t\t//c????????????j???????0??????1????\n\ta=pl1;\t\t//a?b??????????????????????\n\tb=pl2;\n\t//?????????\n\tfor (;;)\n\t{\n\t\tif ((a->pb==NULL)&&(b->pb==NULL))\t\t//???????????????\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//???????????????????\n\t\tif (b->pb==NULL)\n\t\t{\n\t\t\tc=a->x-j;\t\t//????????????????\n\t\t\tj=0;\t\t//??j\n\t\t\tif (c<0)\t\t//???????c?10??????????\n\t\t\t{\n\t\t\t\tj=1;\n\t\t\t\tc=c+10;\n\t\t\t}\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\tp->pn=p3->pn;\n\t\t\tp->pb=p3;\n\t\t\tp3->pn=p;\n\t\t\tp->x=c;\t\t//???????\n\t\t\ta=a->pb;\t\t//??????????\n\t\t\tcontinue;\t\t//??????????\n\t\t}\n\t\tc=(a->x)-(b->x)-j;\t\t//????????????????\n\t\tj=0;\t\t//??j\n\t\tif (c<0)\t\t//???????c?10??????????\n\t\t{\n\t\t\tj=1;\n\t\t\tc=c+10;\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=p3->pn;\n\t\tp->pb=p3;\n\t\tp3->pn=p;\n\t\tp->x=c;\t\t//???????\n\t\ta=a->pb;\t\t//??????????\n\t\tb=b->pb;\n\t}\n}\n\n/*????*/\nvoid shuchu (struct node *p3,int f)\t\t//p3?????????f??????????\n{\n\tstruct node *p;\t\t//?????????????\n\tp=p3->pn;\t\t//??????????????????????\n\t//?????????0??????\n\tfor (;;)\n\t{\n\t\tif ((p==NULL)||(p->x!=0))\t\t//?????????????????????0?????\n\t\t\tbreak;\n\t\telse\n\t\t\tp=p->pn;\t\t//???0??????\n\t}\n\t//??????0?????0\n\tif (p==NULL)\n\t\tprintf(\"0\\n\");\n\t//????????\n\telse\n\t{\n\t\tif (f==-1)\t\t//???????????\n\t\t\tprintf(\"-\");\n\t\tfor (;;)\t\t//???????????\n\t\t{\n\t\t\tif (p==NULL)\t\t//???????????????\n\t\t\t{\n\t\t\t\tprintf(\"\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\t\t//????????\n\t\t\t{\n\t\t\t\tprintf(\"%d\",p->x);\t\t//??????????\n\t\t\t\tp=p->pn;\t\t//?????\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*???????????????*/\nint bijiao (struct node *p1,struct node *p2,int w1,int w2)\t\t//p1,p2?????????w1,w2????????????????????????????????????????????0\n{\n\tstruct node *a,*b;\t\t//?????????????\n\t//?????\n\tif (w1!=w2)\t\t//?????????????\n\t\treturn w1-w2;\n\telse\t\t//???????????????\n\t{\n\t\ta=p1->pn;\t\t//??????????????????????\n\t\tb=p2->pn;\n\t\tfor (;;)\n\t\t{\n\t\t\tif (a==NULL)\t\t//?????????????????????????????0\n\t\t\t\treturn 0;\n\t\t\tif ((a->x)!=(b->x))\t\t//????????????????????\n\t\t\t\treturn (a->x)-(b->x);\n\t\t\telse\t\t//?????????????????\n\t\t\t{\n\t\t\t\ta=a->pn;\n\t\t\t\tb=b->pn;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*???*/\nint main ()\n{\n\tint f1,f2,w1,w2,f;\t\t//f1?f2?????????????1????-1?f????????????w1?w2?????????\n\t//???????????????????????p1?p2??????p3???\n\tstruct node *p1=(struct node*)malloc(sizeof(struct node));\n\tstruct node *p2=(struct node*)malloc(sizeof(struct node));\n\tstruct node *p3=(struct node*)malloc(sizeof(struct node));\n\tstruct node *pl1,*pl2,*p;\t\t//pl1?pl2???????????p???????????\n\t//???????\n\tp1->pn=NULL;\n\tp2->pn=NULL;\n\tp3->pn=NULL;\n\tp1->pb=NULL;\n\tp2->pb=NULL;\n\tp3->pb=NULL;\n\t//??????\n\t//printf(\"???????????????\");\n\tjianli(p1,&f1,&w1,&pl1);\t\t//????????p1??????????????????\n\t//printf(\"???????????????\");\n\tjianli(p2,&f2,&w2,&pl2);\t\t//????????p1??????????????????\n\t//printf(\"???????????????\");\n\t//?????\n\tif (f1*f2==1)\t\t//???????????????????p3?????\n\t{\n\t\tjia (pl1,pl2,p3);\n\t\tshuchu (p3,f1);\n\t}\n\telse\t\t//??????????????????????????????????????????\n\t{\n\t\tif (bijiao (p1,p2,w1,w2)==0)\t\t//????????????????????0\n\t\t\tprintf(\"0\\n\");\n\t\telse\n\t\t{\n\t\t\tif (bijiao (p1,p2,w1,w2)<0)\t\t//????????????????\n\t\t\t{\n\t\t\t\tf=f1;\t\t//????\n\t\t\t\tf1=f2;\n\t\t\t\tf2=f;\n\t\t\t\tp=p1;\t\t//?????\n\t\t\t\tp1=p2;\n\t\t\t\tp2=p;\n\t\t\t\tp=pl1;\t\t//???????\n\t\t\t\tpl1=pl2;\n\t\t\t\tpl2=p;\n\t\t\t}\n\t\t\tjian (pl1,pl2,p3);\t\t//????????????????p3?????\n\t\t\tshuchu (p3,f1);\n\t\t}\n\t}\n\t//????\n\tshanchu(p1);\n\tshanchu(p2);\n\tshanchu(p3);\n\t//????\n\treturn 0;\n}"} +{"label": "69", "index": "34012", "code": "int main (){\n int w,p,carry=0,x,y,n0=0,result[260];\n char a[260],b[260];\n gets(a);\n gets(b);\n memset(result,0,sizeof(result));\n w=strlen(a)<=strlen(b)?strlen(a):strlen(b);\n p=strlen(a)>=strlen(b)?strlen(a):strlen(b);\n for ( int i = 0 ; i < p ; i++){\n if (i<=w-1){\n x=a[strlen(a)-1-i]-'0';\n y=b[strlen(b)-1-i]-'0';\n }\n else {\n if(strlen(a)<=strlen(b)){\n x=0;\n y=b[strlen(b)-1-i]-'0';\n }\n else {\n x=x=a[strlen(a)-1-i]-'0';\n y=0;\n }\n }\n if (x+y+carry>=10){\n result[i]=x+y+carry-10;\n carry=1;\n }\n else {\n result[i]=x+y+carry;\n carry=0;\n }\n if(i==p-1&&carry==1){\n result[i+1]=carry;\n }\n }\n if (carry==1){\n p++;\n }\n for (int j=p-1;j>=0;j--){\n if(result[j]==0){\n n0++;\n for (int q=p-1;q>=j;q--){\n if (result[q]!=0){\n printf(\"%d\",result[j]);\n break;\n }\n }\n }\n else{\n printf(\"%d\",result[j]);\n }\n if(n0==p){\n printf(\"%d\",result[j]);\n }\n }\nreturn 0;\n}"} +{"label": "69", "index": "34013", "code": "main()\n{\n\tint i;\n\tchar a[533],b[533],c[533];\n\tcin>>a>>b;\n\tint al,bl,cl;\t\n\tal=strlen(a);\n\tbl=strlen(b);\n\tif(bl>al)\n\t{\n\t\tstrcpy(c,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,c);\n\t}\t\n\tal=strlen(a);\n\tbl=strlen(b);\n\tcl=al+1;\n\tfor(i=0;i'9')\n\t\t{\n\t\t\tc[cl-i]=c[cl-i]-10;\n\t\t\tc[cl-i-1]++;\n\t\t}\n\t}\n\tfor(i=bl+1;i<=al;i++)\n\t{\n\t\tc[cl-i]=c[cl-i]+a[al-i]-'0';\n\t\tif(c[cl-i]>'9')\n\t\t{\n\t\t\tc[cl-i]=c[cl-i]-10;\n\t\t\tc[cl-i-1]++;\n\t\t}\n\t}\n\tfor(;c[0]=='0'&&cl>1;)\n\t{\n\t\tfor(int j=0;j-1;i--)\n a[i+y-x]=a[i];\n for(i=0;iy)\n {\n for(i=y-1;i>-1;i--)\n b[i+x-y]=b[i];\n for(i=0;i=0;i--)\n {\n m=c[z-1-i]+a[i]+b[i]-'0'-'0';\n if(m<10)\n {\n c[z-1-i]=m;\n }\n else\n {\n m=m%10;\n c[z-1-i]=m;\n c[z-i]++;\n if(i==0)\n z++;\n }\n }\n \n for(i=z-1;i>=0;i--)\n {\n if(c[i]==0)\n z--;\n else\n break;\n }\n if(z==0)\n printf(\"0\");\n else\n for(i=z-1;i>=0;i--)\n printf(\"%d\",c[i]);\n \n}\n \n \n \n\n"} +{"label": "69", "index": "34015", "code": "int main()\n{\n\tchar a[251];\n\tchar b[251];\n\tchar f[251];\n\tint c[252];\n\tint d[251];\n\tint e[252];\n\tint s,j,i,x,y;\n\tscanf(\"%s %s\",a,b);\n\tx=strlen(a);\n\ty=strlen(b);\n\te[0]=0;\n\tif(x0;j--)\n\t{\n\t\tif(e[j]>9)\n\t\t{\n\t\t\te[j]=e[j]-10;\n\t\t\te[j-1]=e[j-1]+1;\n\t\t}\n\t}\n\tif(x>1)\n\t{\n\tfor(j=0;j=y) return x;\n\telse return y;\n}\nint trans(char x) \n{ \n\tint y; \n int s[10]={'0','1','2','3','4','5','6','7','8','9'}; \n int i; \n for(i=0;i<10;i++) \n\t{\n\t\tif(x==s[i]) \n\t\t{ \n\t\t\ty=i; \n\t\t\tbreak; \n\t\t} \n\t} \n return y; \n} \nint main()\n{\n\tchar a[251]={'\\0'},b[251]={'\\0'};\n\tint A[250]={0},B[250]={0},C[251]={0};\n\tint i,j=0,x,y,z,count=0;\n\tscanf(\"%s %s\",a,b);\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(a[i]!='\\0')\n\t\t{\n\t\t\tx=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(b[i]!='\\0')\n\t\t{\n\t\t\ty=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tz=max(x,y);\n\tfor(i=x;i>=0;i--)\n\t{\n\t\tA[j]=trans(a[i]);\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=y;i>=0;i--)\n\t{\n\t\tB[j]=trans(b[i]);\n\t\tj++;\n\t}\n\tfor(i=0;i<=z;i++)\n\t{\n\t\tC[i]+=A[i]+B[i];\n\t\tif(C[i]>=10)\n\t\t{\n\t\t\tC[i]=C[i]-10;\n\t\t C[i+1]+=1;\n\t\t}\n\t}\n\tfor(i=0;i<=z+1;i++)\n\t{\n\t\tif(C[i]!=0)\n\t\t{\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(count==1)\t\n\t\tfor(i=z+1;i>=0;i--)\n\t{\n\t\tif(C[i]!=0)\n\t\t{\n\t\t\tfor(j=i;j>=0;j--)\n\t\t printf(\"%d\",C[j]);\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t\tprintf(\"0\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34017", "code": "\n//?????0???\nvoid cutzeros(char* a)\n{\n\tint i;\n\tint unzero=0;\n\tint l=strlen(a);\n\tfor(i=l-1;i>=0;i--)\n\t{\n\t\tif(a[i]!='0') //???????\n\t\t{\n\t\t//\tprintf(\"%d %d\\n\",i,a[i]); //debug\n\t\t\ta[i+1]='\\0';\n\t\t\tunzero=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(unzero==0) //??????\n\t{\n\t\ta[0]='0';\n\t\ta[1]='\\0';\n\t}\n}\n//??????\nvoid reorder(char*a)\n{\n\tint i;\n\tchar c;\n\tint l=strlen(a);\n\tfor(i=0;i= 0; i--){\n an1[j++] = num1[i] - '0';\n }\n j=0;\n for(i = length2-1;i >= 0; i--){\n an2[j++] = num2[i] - '0';\n }\n \n //????\n for(i = 0;i < MAX_LENGTH; i++){\n an1[i] += an2[i];\n if(an1[i] >= 10){\n an1[i] -= 10;\n an1[i + 1]++;\n }\n }\n \n int flagStart = FALSE;\n for(i = MAX_LENGTH;i >= 0; i--){\n if(flagStart)\n printf(\"%d\",an1[i]);\n else if(an1[i]){\n printf(\"%d\",an1[i]);\n flagStart = TRUE;\n }\n }\n //????0?????0\n if(flagStart == FALSE)\n printf(\"0\\n\");\n \n //??\n \n return 0;\n}"} +{"label": "69", "index": "34019", "code": "int main(){\n char aa[300],bb[300],cc[300];\n gets(aa);\n gets(bb);\n int i,j,k,l,x,g;\n i=0;\n j=0;\n while(aa[i]!='\\0')\n i++;\n while(bb[j]!='\\0')\n j++;\n if(il&&j>l)\n x=(int)(aa[i-l-1]+bb[j-l-1]-96);\n else{\n if(i>l)\n x=aa[i-l-1]-48;\n if(j>l) \n x=bb[j-l-1]-48;\n }\n x=x+g;\n if(x>9){\n x=x-10;\n g=1;\n }\n else g=0;\n cc[k-l]=x+48;\n }\n j=0;\n while(aa[j]==48)\n j++;\n if(j==k)\n cout<<0;\n else{\n if(cc[j]==48)\n j++;\n for(i=j;i<=k;i++)\n cout<j){t=i;} \n else {t=j;} \n // ??????????????+1??????????e[t]??? ??????a?b???? \n t=t+1;\n int e[t];\n \n p1=p2=(struct stu*)malloc(LEN); //????p1??? ?p2????? \n p1->num=a[i-1]-'0';\n head=p1;\n p3=p4=(struct stu*)malloc(LEN); //????p3??? ?p4????? \n p3->num=b[j-1]-'0';\n head0=p3; \n i=i-1;j=j-1; //?while???? \n p=head; //????P?P0. \n p0=head0; \n \n //????????P5 \n int c1=0,c2; //C2????????C1??C2???C1???0 \n c2=p->num+p0->num;\n p5=p6=(struct stu*)malloc(LEN);//?????? \n y=c2+c1/10; //Y??????? \n p5->num=y%10; //???????????P5??? \n c1=c2; \n p7=p5; \n \n while(i>0||j>0) //????????????? \n { \n p2=p1;\n p1=(struct stu*)malloc(LEN);\n p1->num=(i>0)?a[--i]-'0':0; //??????0 \n p2->next=p1;\n \n p4=p3;\n p3=(struct stu*)malloc(LEN);\n p3->num=(j>0)?b[--j]-'0':0; //??????0 \n p4->next=p3;\n \n p0=p0->next; \n p=p->next; \n \n c2=p->num+p0->num; \n \n p6=p5;\n p5=(struct stu*)malloc(LEN);\n y=c2+y/10; //Y??????? \n p5->num=y%10; //???????????P5??? \n c1=c2;\n p6->next=p5;\n }\n p1->next=NULL; \n p3->next=NULL;\n p6=p5;\n p5=(struct stu*)malloc(LEN);\n p5->num=y/10; //??????? \n p6->next=p5; \n p5->next=NULL; \n \n \n //????????? \n p=head;\n p0=head0;\n p8=p7;\n for(m=t-1;p8!=NULL;m--)\n {\n e[m]=p8->num;\n p8=p8->next;\n }\n \n m=0;\n if(p5->num==0&&t==2) //?????????0? \n {m=1;} //?????0 \n else //?????????????0?\n {\n while(e[m]==0&&mnext; \n free(pt); \n }\n while(p8!=NULL)\n {\n pt=p8;\n p8=p8->next; \n free(pt); \n }\n while(p0!=NULL)\n {\n pt=p0;\n p0=p0->next; \n free(pt); \n } \ngetchar();\ngetchar();\ngetchar(); \n}\n"} +{"label": "69", "index": "34021", "code": "\nint main()\n{\n\tchar s1[256],s2[256];\n\tscanf(\"%s %s\",&s1,&s2);\n\tint l1=strlen(s1),l2=strlen(s2);\n\tint a,b,c[256]={0},l=0;\n\twhile(l1>0||l2>0)\n\t{\n\t\ta=(l1>0)?(s1[--l1]-'0'):0;\n\t\tb=(l2>0)?(s2[--l2]-'0'):0;\n\t\tc[l]+=a+b;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l++]%=10;\n\t}\n\twhile(c[l]==0&&l>0)\n\t{\n\t\tl--;\n\t}\n\tint i;\n\tfor(i=l;i>=0;i--)\n\t{\n\t\tprintf(\"%d\",c[i]);\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34022", "code": "\n\nvoid jin ( char *ci,char *ai ,int k)\n{\n\tif ( k != 0 )\n\t{\n\t\t//printf(\"k-1%d\\n\",k-1);\n\t\tai[k] -= 10;\n\t\tai[k-1]++;\n\t\tif ( ai[k-1] < 58 && ai[k-1] >=48)\n\t\t{\n\t\t\t//printf(\"diaoyong\\n\");\n\t\t\treturn;\n\t\t}\n\t\telse if ( ai[k-1] >= 58 && k != 0)\n\t\t{\n\t\t\tjin ( ci,ai,k-1);\n\t\t}\n\t}\n\tif ( k == 0)\n\t{\n\t\t//printf(\"diaoyong\\n\");\n\t\tai[k] -= 10;\n\t\tci[0] = 49;\n\t}\n}\n\nvoid jin2 ( char *ci,char *bi ,int j)\n{\n\tif ( j != 0 )\n\t{\n\t\t//printf(\"k-1%d\\n\",k-1);\n\t\tbi[j] -= 10;\n\t\tbi[j-1]++;\n\t\tif ( bi[j-1] < 58 && bi[j-1] >=48)\n\t\t{\n\t\t\t//printf(\"diaoyong\\n\");\n\t\t\treturn;\n\t\t}\n\t\telse if ( bi[j-1] >= 58 && j != 0)\n\t\t{\n\t\t\tjin ( ci,bi,j-1);\n\t\t}\n\t}\n\tif ( j == 0)\n\t{\n\t\t//printf(\"diaoyong\\n\");\n\t\tbi[j] -= 10;\n\t\tci[0] = 49;\n\t}\n}\n\n\n\nint main()\n{\n\tchar a[n];\n\tchar b[n];\n\tchar *ai;\n\tchar *bi;\n\tchar *ci;\n\tai = &a[0];\n\tbi = &b[0];\n\tscanf(\"%s\",ai);\n\tscanf(\"%s\",bi);\n\tint i = 0;\n\tint k = 0;\n\tdo\n\t{\n\t\tif ( a[i] != '\\0' )\n\t\t{\n\t\t\ti++;\n\t\t}\n\t}while( a[i] != '\\0');\n\tk = i;\n\tint j;\n\ti = 0;\n\tdo\n\t{\n\t\tif ( b[i] != '\\0' )\n\t\t{\n\t\t\ti++;\n\t\t}\n\t}while( b[i] != '\\0');\n\tj = i;\n\tif ( k >= j )\n\t{\n\t\tci = (char*) malloc( (k+2) * sizeof(char));\n\t\tci[k+1] = '\\0';\n\t\tfor ( ; k >= 1 ;k--,j-- )\n\t\t{\n\t\t\tif ( j >= 1 )\n\t\t\t{\n\t\t\t\tci[k] = a[k-1] + b[j-1] -48;\n\t\t\t\tif ( ci[k] >= 58 )\n\t\t\t\t{\n\t\t\t\t\tci[k] -= 10;\n\t\t if ( k != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tai[k-2]++;\n\t\t\t\t\t\tif ( ai[k-2] >= 58 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tjin ( ci,ai, k-2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( k == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tci[0] = 49;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( j < 1 )\n\t\t\t{\n\t\t\t\tci[k] = a[k-1];\n\t\t\t}\n\t\t}\n\t\ti = 0;\n\t\tint l = 0;\n\t\tdo\n\t\t{\n\t\t\tif ( ci[i] >= 49 && ci[i] <= 57 && ci[i] != '\\0' && l == 0)\n\t\t\t{\n\t\t\t\tprintf(\"%c\",ci[i]);\n\t\t\t\tl++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if ( ci[i] >= 48 && ci[i] <= 57 && ci[i] != '\\0' && l == 1)\n\t\t\t{\n\t\t\t\tprintf(\"%c\",ci[i]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}while( ci[i] != '\\0');\n\t\tprintf(\"\\n\");\n\t\tfree(ci);\n\t}\n\tif ( k < j )\n\t{\n\t\tci = (char*) malloc( (j+2) * sizeof(char));\n\t\tci[j+1] = '\\0';\n\t\tfor ( ; j >= 1 ;j--,k-- )\n\t\t{\n\t\t\tif ( k >= 1 )\n\t\t\t{\n\t\t\t\tci[j] = b[j-1] + a[k-1] -48;\n\t\t\t\tif ( ci[j] >= 58 )\n\t\t\t\t{\n\t\t\t\t\tci[j] -= 10;\n\t\t if ( j != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbi[j-2]++;\n\t\t\t\t\t\tif ( bi[j-2] >= 58 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tjin2 ( ci,bi, j-2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( j == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tci[0] = 49;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( k < 1 )\n\t\t\t{\n\t\t\t\tci[j] = b[j-1];\n\t\t\t}\n\t\t}\n\t\ti = 0;\n\t\tint l = 0;\n\t\tdo\n\t\t{\n\t\t\tif ( ci[i] >= 49 && ci[i] <= 57 && ci[i] != '\\0' && l == 0)\n\t\t\t{\n\t\t\t\tprintf(\"%c\",ci[i]);\n\t\t\t\tl++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if ( ci[i] >= 48 && ci[i] <= 57 && ci[i] != '\\0' && l == 1)\n\t\t\t{\n\t\t\t\tprintf(\"%c\",ci[i]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}while( ci[i] != '\\0');\n\t\tprintf(\"\\n\");\n\t\tfree(ci);\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34023", "code": "\nint main()\n{\n\tchar num1[251],num2[251];\n\tint i,len1,len2;\n\tint num_sum[251];\n\tfor(i=0;i<251;i++)\n\t\tnum_sum[i]=0;\n\n\tcin>>num1;\n\tcin>>num2;\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\tchar temp_char;\n\tfor(i=0;i=len2) \n\t{\n\t\tfor(i=0;i9)\n\t\t\t{\n\t\t\t\tnum_sum[i]=num_sum[i]-10;\n\t\t\t\tnum_sum[i+1]=num_sum[i+1]+1;\n\t\t\t}\n\t}\n\telse \n\t{\n\t\tfor(i=0;i9)\n\t\t\t{\n\t\t\t\tnum_sum[i]=num_sum[i]-10;\n\t\t\t\tnum_sum[i+1]=num_sum[i+1]+1;\n\t\t\t}\n\t}\n\tint first_pos=0;\n\tfor(i=250;i>=0;i--)\n\t\tif(num_sum[i]!=0)\n\t\t{\n\t\t\tfirst_pos=i;\n\t\t\tbreak;\n\t\t}\n\tfor(i=first_pos;i>=0;i--)\n\t\tcout<= 0 && j >= 0) {\n temp = a[i] - '0' + b[j] - '0' + carry;\n c[k] = temp % 10 + '0';\n carry = temp / 10;\n i--, j--, k++;\n }\n \n if (i >= 0)\n while (i >= 0) {\n temp = a[i] - '0' + carry;\n c[k] = temp % 10 + '0';\n carry = temp / 10;\n i--, k++;\n }\n else if (j >= 0)\n while (j >= 0) {\n temp = b[j] - '0' + carry;\n c[k] = temp % 10 + '0';\n carry = temp / 10;\n j--, k++;\n }\n \n if (carry)\n c[k] = '1';\n else\n k--;\n \n while (c[k] == '0')\n k--;\n if (k < 0)\n printf (\"0\");\n else {\n while (k >= 0) {\n printf (\"%c\", c[k]);\n k--;\n }\n }\n \n return 0;\n}\n"} +{"label": "69", "index": "34025", "code": "int main()\n{\n\tchar a[300],b[300];\n\tunsigned int a1[300],b1[300];\n\tmemset(a1, 0, sizeof(a1));\n\tmemset(b1, 0,sizeof(b1));\n\tint i,j=0,k,l;\n\tcin.getline(a,300);\n\tcin.getline(b,300);\n\tint len1=strlen(a);\n\tint len2=strlen(b);\n\tif(len1==1&&len2==1&&a[0]=='0'&&b[0]=='0')\n\t{\n\t\tcout<<0;\n\t\treturn 0;\n\t}\n for(i=len1-1;i>=0;i--)\n\t{\n\t\ta1[j]=a[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\t for(i=len2-1;i>=0;i--)\n\t{\n\t\tb1[j]=b[i]-'0';\n\t\tj++;\n\t}\n\tfor( i=0;i<259;i++)\n\t{\n\t\ta1[i]=a1[i]+b1[i];\n\t\tif(a1[i]>=10) //???0?0 \n\t\t{\n\t\t\ta1[i]=a1[i]-10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\tj=290;\n\twhile(a1[j]==0) j--;\n\tfor(i=j;i>=0;i--)\n\t\tcout<len2)?len1:len2;\n \n\tfor(i=0;i<=max;i++)\n\t\tif(i=0;i--)\n\t\t{\n c=a[i]+b[i]-2*'0'+m;\n\t\tif(c>9)\n\t\t{\n\t\t\tc=c-10;\n\t\t\tm=1;\n\t\t}\n\t\telse m=0;\n\t\tp[i]=c+'0';\n\t\t}\n if((len1==1)&&(A[0]=='0')&&(B[0]=='0'))\n\t\t printf(\"0\\n\");\n\t else \n\t\t for(i=0;;i++)\n\t\t\t if(p[i]!='0')\n\t\t{\n for(j=i;j<=max;j++)\n\t\t\t printf(\"%c\",p[j]);\n\t\t\t printf(\"\\n\");\n\t\t break;\n\t\t}\n\t\t\t return 0;\n}\n"} +{"label": "69", "index": "34027", "code": "\n\tchar up[300]={NULL};\n\tchar down[300]={NULL};\n\tint add1[300]={0};\n\tint add2[300]={0};\n\tint result[300]={0};\n\t\n\n\nvoid add()\n{\n\tint uplen=0, downlen=0;\n\n\tuplen=strlen(up);\n\tdownlen=strlen(down);\n\t\n\tint temp=strlen(up);\n\tfor(int i=0; i=10)\n\t\t{\n\t\t\tresult[i]%=10;\n\t\t\tresult[i+1]++;\n\t\t}\n\t}\n}\n\n\n\n\nint main()\n{\n\n\tcin>>up>>down;\n\t\n\tadd();\t\t//add function\n\t\n\tint start=0;\n\tfor(int i=290; i>=0; i--)\n\t{\n\t\n\t\tif(result[i]!=0) {start=1;}\n\n\t\tif(start==1)\t{cout<=0&&k!=0;n--)\n\t{\n\t\tif(a[n]!='0')\n\t\t{\t\n\t\t\tk=0;\n\t\t}\n\t}\n\tn++;\n\tfor(;n>=0;n--)\n\t{\n\t\tprintf(\"%c\",a[n]);\n\t}\n\n\treturn 0;\n}"} +{"label": "69", "index": "34029", "code": "void main()\n{\n\tint a,b,c,i,j,k,sign,m,counter,p,x;\n\tchar s1[251],s2[251];\n\tchar s[252]={0};\n\tscanf(\"%s\",s1); scanf(\"%s\",s2);\n\tsign=1; counter=0;x=1;\n\ta=strlen(s1); b=strlen(s2);\n\tfor(i=a-1,j=b-1,k=0;i!=0||j!=0||sign!=0;i--,j--,k++)\n\t{ \n\t\tm=s1[i]+s2[j]+counter-48;\n\t\tif(m<58) {s[k]=m;counter=0;}\n\t\telse {s[k]=m-10;counter=1;}\n\n\t\tif(i==0&&j!=0) {i++;s1[0]='0';}\n\t\telse if(i!=0&&j==0) {j++;s2[0]='0';}\n\t\telse if(i==0&&j==0&&counter==0) {i++;j++;s2[0]='0';s1[0]='0';sign=0;}\n\t\telse if(i==0&&j==0) {i++;j++;s2[0]='0';s1[0]='0';}\n\t} \n\tc=strlen(s);\n\tfor(p=c-1;p>=0;p--)\n\t{ \n\t\tif(s[p]==48&&x==1) continue; \n\t\tprintf(\"%c\",s[p]); x=0;\n\t}\n\tif(x==1) printf(\"0\");\n\tprintf(\"\\n\");\n}"} +{"label": "69", "index": "34030", "code": "int an1[len + 10];\nint an2[len + 10];\nchar szline1[len + 10];\nchar szline2[len + 10];\nint Add(int maxlen, int* a1, int* a2)\n{\n\tint high = 0;\n\tfor(int i = 0; i < maxlen; i++)\n\t{\n\t\ta1[i] = a1[i] + a2[i];\n\t\tif(a1[i] >= 10)\n\t\t{\n\t\t\ta1[i] = a1[i] - 10;\n\t\t\ta1[i + 1]++;\n\t\t}\n\t}\n\tfor(int i = maxlen - 1; i >= 0; i--)\n\t\tif(a1[i])\n\t\t{\n\t\t\thigh = i;\n\t\t\tbreak;\n\t\t}\n\treturn high;\n}\nint main()\n{\n\tcin >> szline1 >> szline2;\n\tint i, j;\n\tfor(int k = 0; k < len + 10; k++)\n\t{\n\t\tan1[k] = 0;\n\t\tan2[k] = 0;\n\t}\n\tint len1 = strlen(szline1);\n\tint len2 = strlen(szline2);\n\tfor(j = 0, i = len1 - 1; i >= 0; i--, j++)\n\t\tan1[j] = szline1[i] - '0';\n\tfor(j = 0, i = len2 - 1; i >= 0; i--, j++)\n\t\tan2[j] = szline2[i] - '0';\n\tint high = Add(len, an1, an2);\n\tfor(i = high; i >= 0; i--)\n\t\tcout << an1[i];\n\tcout << endl;\n}"} +{"label": "69", "index": "34031", "code": "int main()\n{\n\tint i,la,lb,q;\n\tint p[255];\n\tchar a[255],b[255],c[255];\n\tscanf(\"%s%s\",a,b);\n\tla=strlen(a);lb=strlen(b);\n\tif(la=0;i--)\n\t{\n\t\tp[i]+=p[i+1]/10;\n\t\tp[i+1]%=10;\n\t}\n\tq=0;\n\twhile(p[q]==0&&q=10)\n {\n c[i]=c[i]-10;\n c[i+1]=c[i+1]+1;\n }\n }\n while(c[j]==0&&j!=0)\n j--;\n if(j==0&&c[j]==0)printf(\"0\\n\");\n else\n {\n for(int i=j;i>=0;i--)\n printf(\"%d\",c[i]);\n printf(\"\\n\");\n }\n\n}"} +{"label": "69", "index": "34033", "code": "void p(char a[],int l) //?????0???a=000876??a=876 \n{ int i,j;\n for(;a[0]=='0';)\n for(j=0;j<=l-1;j++)\n a[j]=a[j+1];\n}\nvoid h(char a[],int l)\n{ int i,j;\n char c[260];\n strcpy(c,a);\n for(i=0;i<=l-1;i++)\n a[i]=c[l-1-i];\n}\nint max(int x,int y)\n{ if (x>=y) return x;\n else return y;\n}\nint k(int x) \n{ if(x=='\\0')\n return 0;\n else return (x-'0'); \n}\nmain()\n{ char a[260];\n char b[260];\n char c[260];\n int l1,l2,l3,l,t,m,i;\n scanf(\"%s %s\",a,b);\n \n l1=strlen(a);\n l2=strlen(b);\n p(a,l1);p(b,l2);\n \n l1=strlen(a);\n l2=strlen(b);\n h(a,l1); h(b,l2);\n l= max(l1,l2);\n \n for(i=l1;i<=l;i++)\n a[i]='\\0';\n for(i=l2;i<=l;i++)\n b[i]='\\0'; \n \n for(t=0,i=0;i<=l;i++)\n{ \n m=(k(a[i])+k(b[i]))%10;\n c[i]=(m+t)%10+'0';\n t=(k(a[i])+k(b[i])+(m+t)/10)/10;\n} \n\nif(c[l]=='0'&&l!=0) c[l]='\\0';\nelse c[l+1]='\\0';\n\nl3=strlen(c);\nh(c,l3);\nprintf(\"%s\",c);\ngetchar();\ngetchar();\n} \n"} +{"label": "69", "index": "34034", "code": "int max(int x,int y)\n{\n\tif(x>=y)\n\t{\n\t\treturn x;\n\t}\n\telse\n\t\treturn y;\n}\nint main()\n{\n\tint i,j,k,l,tem;\n\tchar a[300],b[300];\n\tint c[300];\n\t\tcin.get(a,290);\n\t\tcin.get();\n\t\tcin.get(b,290);\n if(strlen(a)>strlen(b))\n\t{\n\t\tfor(j=strlen(a)-1;j>=strlen(a)-strlen(b);j--)\n\t\t{\n\t\t\tc[j]=a[j]-'0'+b[j-strlen(a)+strlen(b)]-'0';\n\t\t\tif(c[j]>10)\n\t\t\t{\n\t\t\t\tc[j]=c[j]-10;\n\t\t\t\ta[j-1]=a[j-1]+1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(j>=max(strlen(a)-strlen(b)-1,0);j>=0;j--)\n\t\t{\n\t\t\tc[j]=a[j]-'0';\n\t\t}\n\t\tfor(j=strlen(a)-1;j>=1;j--)\n\t\t{\n\t\t\tif(c[j]>=10)\n\t\t\t{\n\t\t\t\tc[j]=c[j]-10;\n\t\t\t\tc[j-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(j=0;j0;j--)\n\t\t{\n\t\t\tif(c[j]>=10)\n\t\t\t{\n\t\t\t\tc[j]=c[j]-10;\n\t\t\t\tc[j-1]++;\n\t\t\t}\n\t\t}\n\t\tif(c[0]==0&&strlen(a)==1&&strlen(b)==1)\n\t\t{\n\t\t\tcout<<\"0\";\n\t\t}\n\t\tfor(j=0;jstrlen(a))\n\t{\n\t\tfor(j=strlen(b)-1;j>=strlen(b)-strlen(a);j--)\n\t\t{\n\t\t\tc[j]=b[j]-'0'+a[j-strlen(b)+strlen(a)]-'0';\n\t\t\tif(c[j]>10)\n\t\t\t{\n\t\t\t\tc[j]=c[j]-10;\n\t\t\t\tb[j-1]=b[j-1]+1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(j>=max(strlen(b)-strlen(a)-1,0);j>=0;j--)\n\t\t{\n\t\t\tc[j]=b[j]-'0';\n\t\t}\n\t\tfor(j=strlen(b)-1;j>=1;j--)\n\t\t{\n\t\t\tif(c[j]>=10)\n\t\t\t{\n\t\t\t\tc[j]=c[j]-10;\n\t\t\t\tc[j-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(j=0;j9)\n\t\t{\n\t\t\tsum[i]=sum[i]-10;\n\t\t\tsum[i+1]=sum[i+1]+1;\n\t\t}\n\t}\n\tfor(i=251;i>=0;i--)\n\t{\n\t\tif(sum[i]!=0)\n\t\t\tbreak;\n\t}\n\tif(i<0) printf(\"0\");\n\telse\n\tfor(j=i;j>=0;j--)\n\t{\n\t\tprintf(\"%d\",sum[j]);\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34036", "code": "\n\n\nvoid Sum(int *a1, int *a2)\n{\n\tint i;\n\tfor(i = 0; i < 250; i++)\n\t{\n\t\ta1[i] += a2[i];\n\t\tif(a1[i] >= 10)\n\t\t{\n\t\t\ta1[i + 1]++;\n\t\t\ta1[i] -= 10;\n\t\t}\n\t}\n\tfor(i = 250; i >= 0; i--)\n\t\tif(a1[i] != 0)\n\t\t\tbreak;\n\tif(i < 0) cout << 0 << endl;\n\telse\n\t{\n\t\tfor( ; i >= 0; i--)\n\t\t\tcout << a1[i];\n\t\tcout << endl;\n\t}\n}\nint main()\n{\n\tchar a1[300], a2[300];\n\tint b1[300], b2[300], len1, len2;\n\tmemset(b1, 0, sizeof(b1));\n\tmemset(b2, 0, sizeof(b2));\n\tint i, j;\n\tcin.getline(a1, 250);\n\tlen1 = strlen(a1);\n\tcin.getline(a2, 250);\n\tlen2 = strlen(a2);\n\tj = 0;\n\tfor(i = len1 - 1; i >= 0; i--)\n\t\tb1[j++] = a1[i] - '0';\n\tj = 0;\n\tfor(i = len2 - 1; i >= 0; i--)\n\t\tb2[j++] = a2[i] - '0';\n\tSum(b1, b2);\n\treturn 0;\n}"} +{"label": "69", "index": "34037", "code": "int main ()\n{\n\tchar a[251],b[251],c[252];\n\tgets (a);\n\tgets (b);\n if ((b[0]==49)&&(b[1]!=54)){printf (\"10000\");return 0;}\n if ((b[0]==49)&&(b[1]==54)){printf (\"166150419825696669269353719864802549286389829437807167691021301755656104628106616263135897216209841352015716425212540749792574327578585169636688779\");return 0;}\n if (b[7]==49){printf (\"1260010\");return 0;}\n if ((b[0]==48)&&(b[1]!=48)){printf (\"0\");return 0;}\n if (a[16]==49){printf (\"111111111111111110\");return 0;}\n if (a[0]==49){printf (\"1000010\");return 0;}\n else printf (\"34532435\");\n return 0;\n}\n\n\n\n"} +{"label": "69", "index": "34038", "code": "main()\n{\n char str1[251]={0},str2[251]={0},str3[251]={0};\n int i,j,m=0,sum1,sum2,sum3,k,s=0,p=0;\n scanf(\"%s\",str1);\n scanf(\"%s\",str2);\n sum1=strlen(str1);\n sum2=strlen(str2);\n if(sum1>sum2) {sum3=sum1;k=1;}\n else {sum3=sum2;k=2;}\n for(j=1;;j++)\n {\n if(sum1-j<0&&sum2-j<0) break;\n if(sum1-j<0||sum2-j<0) \n {\n if(k==1) str3[sum3-j+1]=str1[sum1-j]-'0'+m;\n else str3[sum3-j+1]=str2[sum2-j]-'0'+m;\n }\n else str3[sum3-j+1]=str1[sum1-j]+str2[sum2-j]-'0'-'0'+m;\n m=0;\n if(str3[sum3-j+1]>=10) {\n if(j==sum3) s=1;\n str3[sum3-j+1]=str3[sum3-j+1]-10;\n m=m+1;\n }\n str3[sum3-j+1]=str3[sum3-j+1]+'0';\n }\n str3[sum3+1]='\\0';\n if(s==1) str3[0]='1';\n for(i=0;i=lb){\n\t\tfor(k=0,i=la-1,j=lb-1;j>=0;i--,j--,k++){\n\t\t\ts[k]=a[i]-'0'+b[j]-'0';\n\t\t}\n\t\tfor(;i>=0;i--,k++){\n\t\t\ts[k]=a[i]-'0';\n\t\t}\n\t}\n\telse{\n\t\tfor(k=0,i=la-1,j=lb-1;i>=0;i--,j--,k++){\n\t\t\ts[k]=a[i]-'0'+b[j]-'0';\n\t\t\t//cout<=0;j--,k++){\n\t\t\ts[k]=b[j]-'0';\n\t\t\t//cout<=10){\n\t\t\ts[i]-=10;\n\t\t\ts[i+1]++;\n\t\t}\n\t}\n\twhile(s[k]==0){\n\t\tk--;\n\t\tif(k==-1){\n\t\t\tcout<<'0'<=0;i--){\n\t\t\tcout<l2)\n\t\tl=l1;\n\telse \n\t\tl=l2;\n\t\n\tif (l1>l2) //???????????????????num????????????????num??? \n\t{\n\t\tj=l1-1;\n\t\tfor (i=l2-1;i>=0;i--)\n\t\t\t{num[j]=num1[j]+num2[i]-'0'-'0';\n\t\t\tj--;}\n\t\tfor (;j>=0;j--)\n\t\t\tnum[j]=num1[j]-'0';\n\t}\n\n\telse\n\t{\n\t\tj=l2-1;\n\t\tfor (i=l1-1;i>=0;i--)\n\t\t\t{num[j]=num2[j]+num1[i]-'0'-'0';\n\t\t\tj--;}\n\t\tfor (;j>=0;j--)\n\t\t\tnum[j]=num2[j]-'0';\n\t}\n\n\n\tfor (i=l-1;i>0;i--) //???????????10????????10?????1 \n\t\t{if (num[i]>=10)\n\t\t\t\t{num[i-1]++;\n\t\t\t\tnum[i]=num[i]-10;}\n\t\t}\n\n\tif (num[0]>=10) //??????????10?????? \n\t\t{\n\t\t\tnum[0]=num[0]-10;\n\t\t\tprintf(\"1\");\n\t\t\tflg=0; //??flg=1????????0?? \n\t\t\t}\n\tif (flg) //?num???????????0??? \n\t\tfor (i=0;i<=l-1;i++)\n\t\t\tif (num[i]!=0)\n\t\t\t\tbreak;\n\tif (i<=l-1) //????0?????????0????? \n\t{\n\t\tfor (;i<=l-1;i++)\n\t\t\tprintf(\"%d\",num[i]);}\n\telse printf(\"0\"); //???0??????0 \n\t\n\t\n}"} +{"label": "69", "index": "34041", "code": "int main()\n{\n char ca[250],cb[250];\n\tint *a,*b,*c,l,i,j;\n\tscanf(\"%s %s\",ca,cb);\n\tl=strlen(ca);\n\tif(strlen(cb)>strlen(ca))\n\t\tl=strlen(cb);\n\ta=(int *)malloc(sizeof(int)*l);\n\tb=(int *)malloc(sizeof(int)*l);\n\tc=(int *)malloc(sizeof(int)*(l+1));\n\tfor(i=0;i=10)\n\t\t{\n\t\t\t\n\t\t\tc[i+1]+=(c[i]/10);\n\t\t\tc[i]%=10;\n\t\t}\n\t}\n\tj=-1;\n\tfor(i=l;;i--)\n\t{\n\t\tif(c[i]!=0)\n\t\t{\n\t\t\tj=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(j<0)\n\t\tprintf(\"0\");\n\telse\n\t\tfor(i=j;i>=0;i--)\n\t\t\tprintf(\"%d\",c[i]);\n\t\tprintf(\"\\n\");\n\n\n\n\tfree(a);\n\tfree(b);\n\tfree(c);\n\treturn 0;\n}"} +{"label": "69", "index": "34042", "code": "int main()\n{\n int max; //???????????\n int n;\n char a[300]; //??????????a?b\n char b[300];\n int aa[300]; //????????????aa?bb\n int bb[300];\n int h[300]; //?????\n int jinwei[300]; //?????????\n int i;\n for(i=0;i<300;i++) aa[i]=0;\n for(i=0;i<300;i++) bb[i]=0;\n\n cin.getline(a,300);\n cin.getline(b,300);\n int long1=strlen(a);\n int long2=strlen(b);\n for(i=1;i<=long1;i++) aa[i]=(int)a[long1-i]-48;\n for(i=1;i<=long2;i++) bb[i]=(int)b[long2-i]-48;\n if(long1>long2) max=long1;\n else max=long2;\n jinwei[0]=0;\n\n for(i=1;i<=max+1;i++)\n {\n if(aa[i]+bb[i]+jinwei[i-1]<10) //??????????????\n {h[i]=aa[i]+bb[i]+jinwei[i-1];\n jinwei[i]=0;\n }\n else\n {\n h[i]=aa[i]+bb[i]+jinwei[i-1]-10;\n jinwei[i]=1;\n }\n }\n for(i=max+1;i>=1;i--) //?????????0\n {\n if(h[i]!=0)\n {\n n=i;\n break;\n }\n }\n if(i==0) cout<<\"0\";\n else\n {\n for(i=n;i>=1;i--) cout<b?a:b);\n}\n\nvoid main()\n{\n\tchar a[251],b[251],c[251];\n\tint i,j,la=0,lb=0,m;\n\tfor(i=0;i<251;i++)\n\t\tc[i]='0';\n\tfor(i=0;;i++,la++)\n\t{\n\t\tscanf(\"%c\",&a[i]);\n\t\tif(a[i]=='\\n')\n\t\t{\n\t\t\ta[i]='0';\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;;i++,lb++)\n\t{\n\t\tscanf(\"%c\",&b[i]);\n\t\tif(b[i]=='\\n')\n\t\t{\n\t\t\tb[i]='0';\n\t\t\tbreak;\n\t\t}\n\t}\n\tm=max(la,lb);\n\tfor(i=0;i250-m;i--)\n\t\tif(c[i]>'9')\n\t\t{\n\t\t\tc[i-1]+=(c[i]-48)/10;\n\t\t\tc[i]=48+(c[i]-48)%10;\n\t\t}\n\tfor(i=250-m;i<250;i++)\n\t{\n\t\tif(c[i]=='0')\n\t\t\tcontinue;\n\t\tfor(;i<250;i++)\n\t\t\tprintf(\"%c\",c[i]);\n\t}\n\tprintf(\"%c\\n\",c[250]);\n}"} +{"label": "69", "index": "34044", "code": "char a[255],b[255],c[255];\nint plus(int l1,int l2)\n{ \n int i,l;\n if(l1 > l2) l = l1;\n else l = l2;\n for(i = 0;i < l;i ++) \n {\n b[i] = b[i] + c[i];\n if(b[i]>=10)\n {\n b[i] -= 10;\n b[i+1] ++; \n } \n }\n if(b[l]) l++;\n return l;\n}\nint main()\n{\n int l1,l2,l; \n int j; \n scanf(\"%s\",a);\n l1 = strlen(a); \n getchar();\n for(j = 0;j < l1;j ++)\n b[l1-j-1] = a[j] - '0';\n scanf(\"%s\",a);\n l2 = strlen(a); \n for(j = 0;j < l2;j ++)\n c[l2-j-1] = a[j] - '0';\n l = plus(l1,l2); \n while(b[l-1] == 0 && l)\n l--; \n for(j = l-1;j >= 0;j--)\n printf(\"%c\",b[j]+'0');\n if(l == 0) printf(\"0\");\n return 0; \n}\n"} +{"label": "69", "index": "34045", "code": "int max(int a,int b);\nvoid change();\nint main()\n{\n\tchar a[210]={'0'},b[210]={'0'};\n\tint plusa[210]={0},plusb[210]={0},sum[210]={0},lena=0,lenb=0,len=0,i,j,maxpoint=0;\n\tcin>>a>>b;\n\tlena=strlen(a);\n\tlenb=strlen(b);\n\tfor(i=0,j=lena-1;j>=0;j--){\n\t\tplusa[i++]=a[j]-'0';\n\t}\n\tfor(i=0,j=lenb-1;j>=0;j--){\n\t\tplusb[i++]=b[j]-'0';\n\t}\n\tlen=max(lena,lenb);\n\tfor(i=0;i=10){\n\t\t\tsum[i+1]=sum[i+1]+sum[i]/10;\n\t\t\tsum[i]=sum[i]%10;\n\t\t}\n\t}\n\tfor(i=210-1;i>=0;i--){\n\t\tif(sum[i]!=0){\n\t\t\tmaxpoint=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=maxpoint;i>=0;i--)\n\t\tcout<=b)return a;\n\telse return b;\n}"} +{"label": "69", "index": "34046", "code": "const int MAX = 260;\nint main()\n{\n\tint i = 0,j = 0,k = 0,l = 0;\n\tint carry = 0 ; //????\n\tint temp = 0;\n\tint len1 = 0,len2 = 0,bigger = 0;\n\tchar ch1[MAX];\n\tchar ch2[MAX];\n\tint num1[MAX];\n\tint num2[MAX];\n\tint result[MAX];\n\tcin>>ch1>>ch2;\n\tlen1 = strlen(ch1);\n\tlen2 = strlen(ch2);\n\tif(len1 > len2){bigger = len1;}\n\telse{bigger = len2;}\n\tfor(j = 0;j < MAX;j++)\n\t{\n\t\tnum1[j] = num2[j] = result[j] = 0;\n\t}\n\tfor(i = 0;i <= len1 - 1;i++)\n\t{\n\t\tnum1[MAX - len1 + i] = ch1[i] - '0';\n\t}\n\tfor(i = 0;i <= len2 -1 ;i++)\n\t{\n\t\tnum2[MAX - len2 + i] = ch2[i] - '0';\n\t}\n\tfor(k = MAX - 1;k >= MAX - bigger;k--)\n\t{\n\t\tcarry = 0;\n\t\ttemp = num1[k] + num2[k] + result[k];\n\t\tif(temp < 10){result[k] = temp;carry = 0;}\n\t\telse{result[k] = temp % 10;carry = 1;}\n\t\tresult[k - 1] = result[k -1] + carry;\n\t}\n\tfor(l = 0;(l <= MAX -1) && (result[l] == 0);l++);\n\tif(l == MAX){cout<<'0';}\n\telse\n\t{\n\t\tfor(i = l;i <= MAX - 1;i++)\n\t\t{\n\t\t\tcout<strlen(b))?strlen(b):strlen(a);\n\tmax1 = (strlen(a)>strlen(b))?strlen(a):strlen(b);\n\tif (strlen(b) == strlen(a)) strcpy(c, a);\n\telse\n\t{\n\t\tfor(i=0; i<=max1-min-1; i++)\n\t\t{\n\t\t\tc[i] = 48;\n\t\t}\n\t\tstrcat(c, (strlen(a)>strlen(b))?b:a);\n\t}\n\tstrcpy(max, (strlen(a)<=strlen(b))?b:a);\n\tup = 0;\n\tfor(i=strlen(c)-1; i>=0; i--)\n\t{\n\t\tif(max[i]+c[i]+up<106)\n\t\t{\n\t\t\td[i] = c[i] + max[i] - 48 + up;\n\t\t\tup = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\td[i] = c[i] + max[i] - 48 - 10 + up;\n\t\t\tup = 0;\n\t\t\tup++;\n\t\t}\n\t}\n\tif (up!=0) printf(\"1%s\\n\", d);\n\telse printf(\"%s\\n\", d);\n\treturn 0;\n}"} +{"label": "69", "index": "34048", "code": "char num1[270],num2[270];int i,j,n1,n2;int ans[270]={0},num[270]={0};\nvoid sup(int,int);\nint main(void){\n\tcin>>num1>>num2;\n\tint n1=strlen(num1),n2=strlen(num2);\n\tans[0]=0;\n\tif(n1>n2){\n for(i=0;i0){\n for(i=max(strlen(num1),strlen(num2));i>0;i--){\n if(ans[i]>=10){\n ans[i]%=10;ans[i-1]+=1;\n }\n }\n for (i = 0; ans[i] == 0 && max(strlen(num1),strlen(num2)); i++);\n if (i == max(strlen(num1),strlen(num2)))\n cout << 0;\n else {\n for(;i<=max(strlen(num1),strlen(num2));i++)\n cout<lb)\n\t\tl=la;\n\telse\n\t{\n\t\tl=lb;\n\t\tstrcpy(t,sa);\n\t\tstrcpy(sa,sb);\n\t\tstrcpy(sb,t);\n\t}\n\tdl=abs(la-lb);\n for(i=l;i>0;i--)\n\t{\n\t\tif(i-dl-1>=0)\n\t\t\ttemp=sb[i-dl-1];\n\t\telse\n\t\t\ttemp='0';\n\t\tif ((int)sa[i-1]+(int)temp+c-96>9)\n\t\t{\n\t\t\ts[i]=sa[i-1]+temp-58+c;\n\t\t\tc=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ts[i]=sa[i-1]+temp-48+c;\n\t\t\tc=0;\n\t\t}\n } \n\tif (c==1)\n\t\ts[0]='1';\n\telse\n\t\ts[0]='0';\n\tc=1;\n for (i=0;i<=l;i++)\n\t{\n\t\tif (s[i] !='0' || c==0)\n\t\t{\n\t\t\tprintf(\"%c\",s[i]);\n\t\t\tc=0;\n\t\t}\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34050", "code": "\nint main()\n{\n\tchar num1[251]={0},num2[251]={0};\n\tint i,j,l;\n\tint anw1[251]={0},anw2[251]={0};\n\tcin>>num1;\n\tcin>>num2;\n\tl=strlen(num1);\n\tfor(j=0,i=strlen(num1)-1;i>=0;i--,j++)\n\t\t\tanw1[j]=num1[i]-'0';\n\tfor(j=0,i=strlen(num2)-1;i>=0;i--,j++)\n\t\t\tanw2[j]=num2[i]-'0';\n\tfor(i=0;i<=250;i++)\n\t{ \n\t\t if(anw1[i]+anw2[i]<10) \n\t\t\t{ \n\t\t\t\tanw1[i]=anw1[i]+anw2[i];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(anw1[i]+anw2[i]>=10)\n\t\t\t{\n\t\t\t\n\t\t\t\tl=anw1[i]+anw2[i]-10;\n\t\t\t\tanw1[i]=l;\n\t\t\t\tanw1[i+1]++;\n\t\t\t continue;\n\t\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t\t\tif(anw1[i]!=0)\n\t\t\t{\n\t\t\t\tfor(j=i;j>=0;j--)\n\t\t\t\t\tcout<>x;\n\tcin>>y;\n\n\tlx=strlen(x);\n\tly=strlen(y);\n\n\tn=0;\n\tfor(i=lx-1;i>=0;i--)\n\t{\n\t\ta[n]=x[i]-'0';\n\t\tn++;\n\t}\n\tk=0;\n\tfor(i=ly-1;i>=0;i--)\n\t{\n\t\tb[k]=y[i]-'0';\n\t\tk++;\n\t}\n\n\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i+1]=c[i+1]+c[i]/10;\n\t\t\tc[i]=c[i]%10;\n\n\t\t}\n\t}\n\n\n\tfor(i=299;i>=0;i--)\n\t{\n\t\tif(c[i]!=0||flag==1)\n\t\t{\n\t\t\tcout<>a;\n cin>>b;\n\n int l1=strlen(a)/sizeof(char),\n l2=strlen(b)/sizeof(char);\n c[l1]='0';c[l2]='0';//???????????0 ????????1\n\n for(i=0;il2)\n {\n max=l1;\n for(i=l2;i=0;i--)\n cout<=0;i--)\n cout<lenb?lena:lenb;\n memset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tfor(i=200;i>200-lena;i--)\n\t\ta[i]=as[lena-201+i]-'0';\n\tfor(i=200;i>200-lenb;i--)\n\t\tb[i]=bs[lenb-201+i]-'0';\n\tfor(i=200;i>200-len-1;i--)\n\t{\n\t\tsum[i]=(jinwei+a[i]+b[i])%10;\n\t\tjinwei=(jinwei+a[i]+b[i])/10;\n\t}\n\tfor(i=200-len;i<=200;i++)\n\t{\n\t\tif(sum[i]!=0)\n\t\t{\n\t\t\tfor(j=i;j<=200;j++)\n\t\t\t\tprintf(\"%d\",sum[j]);\n break;\n\t\t}\nelse if(i==200)\nprintf(\"0\\n\");\t\n\t}\n}\n\n"} +{"label": "69", "index": "34054", "code": "int main()\n{\n\tchar p[251],q[251];\n\tint x,y,n,t=0,i,j,k,h,u,v;\n int a[250],b[250],c[251];\n\tscanf(\"%s\",p);\n\tscanf(\"%s\",q);\n x=strlen(p);\n y=strlen(q);\n\tfor(h=0;h<250;h++)\n\t{\n\ta[h]=b[h]=c[h]=0;\n\t}\n\tc[250]=0;\n\tfor(i=0;iy) n=x;\n\telse n=y;\n\tfor(k=0;k=0;u--)\n\t{\n\t if(c[u]!=0)\n\t\t break;\n\t}\n\tif(u==-1) printf(\"0\");\n\telse\n\t{\n\t\tfor(v=u;v>=0;v--)\n\t\t{\n\t\tprintf(\"%d\",c[v]);\n\t\t}\t\n\t}\n return 0;\n}"} +{"label": "69", "index": "34055", "code": "\n\n\n\nint main()\n{\n\tchar c1[260],c2[260],c[260];\n\tcin>>c1>>c2;\n\tint len1=strlen(c1);\n\tint len2=strlen(c2);\n\tint len=len1+1;\n\tfor( int i=0 ; i<260 ; i++ )\n\t{\n\t\tc[i]=0;\n\t}\n\tif( len2>len1 )\n\t{\n\t\tlen=len2+1;\n\t}\n\tif( c1[0]=='0' && c2[0]=='0' && len1==1 && len2==1 )\n\t{\n\t\tcout<<\"0\"<=0 ; i-- )\n\t\t{\n\t\t\tc1[i+len-len1]=c1[i];\n\t\t}\n\t\tfor( int i=len-len1-1 ; i>=0 ; i-- )\n\t\t{\n\t\t\tc1[i]='0';\n\t\t}\n\t\tfor( int i=len2-1 ; i>=0 ; i-- )\n\t\t{\n\t\t\tc2[i+len-len2]=c2[i];\n\t\t}\n\t\tfor( int i=len-len2-1 ; i>=0 ; i-- )\n\t\t{\n\t\t\tc2[i]='0';\n\t\t}\n\t\tfor( int i=len-1 ; i>=0 ; i-- )\n\t\t{\n\t\t\tc[i]+=c1[i]+c2[i]-'0';\n\t\t\tif( c[i]>'9' )\n\t\t\t{\n\t\t\t\tc[i]-=10;\n\t\t\t\tc[i-1]++;\n\t\t\t}\n\t\t}\n\t\tfor( int i=0 ; ; i++ )\n\t\t{\n\t\t\tif( c[i]!='0' )\n\t\t\t{\n\t\t\t\tfor( int j=i ; jb?a:b;\n int string3[250],string4[250];\n\tint i;\n\tfor(i=0;ib)\n\t{\n\t\tfor(i=b;i9)\n\t\t{\n\t\t\tstring6[i]-=10;\n\t\t\tstring5[i+1]=1;\n\t\t}\n\t}\n\tif(string5[c]!=0)\n\t{\n\t\tprintf(\"%d\",string5[c]);\n\t for(i=c-1;i>=0;i--)\n\t\t{\n\t\tprintf(\"%d\",string6[i]);\n\t\t}\n \tprintf(\"\\n\");\n\t}\n\telse\n\t{\n\t\tfor(i=c-1;i>=0;i--)\n\t\t{\n\t\t\tif(string6[i]!=0)\n\t\t\t\tbreak;\n\t\t}\n\t\tint m;\n\t\tfor(m=i;m>=0;m--)\n\t\t{\n\t\tprintf(\"%d\",string6[m]);\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34057", "code": "int xa[300],xb[300],xx[300];\nchar a[300],b[300];\nint main(){\n int lena,lenb,len,i;\n gets(a);\n gets(b);\n lena=0;\n for(i=0;i<=250;i++){\n xa[i]=0;\n xb[i]=0;\n xx[i]=0;\n }\n while(a[lena]!='\\0'){\n xa[lena]=a[lena]-'0';\n lena++;\n }\n lenb=0;\n while(b[lenb]!='\\0'){\n xb[lenb]=b[lenb]-'0';\n lenb++;\n }\n for(i=0;ilenb)len=lena;else len=lenb;\n int x=0;\n for(i=0;i0)len--;\n for(i=len;i>=0;i--)printf(\"%d\",xx[i]);\n printf(\"\\n\");\n return 0;\n}\n"} +{"label": "69", "index": "34058", "code": "int maxi(int a,int b)\n{\n\tif(a=0;i--)\n\t\tna[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=lenb-1;i>=0;i--)\n\t\tnb[j++]=b[i]-'0';\n\tint m=maxi(lena,lenb);\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tsum[i]-=10;\n\t\t\tsum[i+1]++;\n\t\t}\n\t}\n\ti=m;\n\twhile(sum[i]==0) i--; //???????0??\n\tif(i==-1)\n\t\tcout<<0<= 0; i--)\n\t\tcout << sum[i]; \n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34059", "code": "/*\n * Name:homework.cpp\n * Created on: 2012-11-24\n * Author: Meng Li\n * Function: ?????\n */\n\n\n\nvoid sum(char a[], char b[]);\n\nint main(){\n\tchar a[250], b[250];\n\tcin >> a >> b;\n\tsum(a,b);\n\treturn 0;\n}\n\nvoid sum(char a[], char b[]){\n\tint length1=0, length2=0, i, count=0;\n\tint temp=0;\n\tchar c[250];\n\tlength1=strlen(a);\n\tlength2=strlen(b);\n\tfor (i=0;;i++){\n\t\tif (i'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i>=length1&&i'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i=length2){\n\t\t\tc[i]=a[length1-i-1]+temp;\n\t\t\tif (c[i]>'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i>=length1&&i>=length2)\n\t\t\tif (temp==1){\n\t\t\t\tc[i]=temp+'0';\n\t\t\t\tcount++;\n\t\t\t\ttemp=0;\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t}\n\tfor (i=count-1;i>=0;i--)\n\t\tif (i==count-1){\n\t\t\tif (c[i]=='0'&&count!=1)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tcout << c[i];\n\t\t}\n\t\telse\n\t\t\tcout << c[i];\n}\n"} +{"label": "69", "index": "34060", "code": "int main()\n{\n char store[300],add1[300]={'\\0'},add2[300]={'\\0'},sum[300]={'\\0'};\n int i,l,j,l1,l2;\n \n scanf(\"%s\",store);\n l=strlen(store)-1;\n for(i=l;i>=0;i--) add1[l-i]=store[i];\n scanf(\"%s\",store);\n l=strlen(store)-1;\n for(i=l;i>=0;i--) add2[l-i]=store[i];\n \n l1=strlen(add1);\n l2=strlen(add2);\n if(l1>l2) \n {\n for(i=l2;i<=l1;i++) add2[i]='0';\n add1[l1]='0'; \n }\n else \n {\n for(i=l1;i<=l2;i++) add1[i]='0';\n add2[l2]='0';\n } \n \n for(i=0; add1[i]!='\\0' || add2[i]!='\\0'; i++)\n {\n j=(add1[i]-'0')+(add2[i]-'0');\n if(j>=10) add1[i+1]=add1[i+1]+1;\n sum[i]=j%10+'0';\n }\n \n l=strlen(sum);\n for(i=l-1;i>=0;i--) if(sum[i]!='0' || i==0) break;\n for(;i>=0;i--) printf(\"%c\",sum[i]);\n return 0;\n} "} +{"label": "69", "index": "34061", "code": "int main()\n{\n\tchar inl[200],ink[200];\n\tint a[200],b[200],c[200],out[200];\n\tint len1,len2,i,j,len=1;\n\tcin>>inl;\n\tcin>>ink;\n\tmemset(a,0,sizeof a);\n\tmemset(b,0,sizeof b);\n\tmemset(c,0,sizeof c);\n\tmemset(out,0,sizeof out);\n\tlen1=strlen(inl);\n\tlen2=strlen(ink);\n\tj=0;\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\ta[j]=inl[i]-48;\n\t\tj+=1;\n\t}\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\tb[j]=ink[i]-48;\n\t\tj+=1;\n\t}\n\tfor(i=0;i<200;i++)\n\t{\n\t\tif(a[i]+b[i]+c[i]>=10)\n\t\t{\n\t\t\tc[i+1]+=1;\n\t\t\tout[i]=(c[i]+a[i]+b[i])%10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tout[i]=c[i]+a[i]+b[i];\n\t\t}\n\t}\n\tfor(i=199;i>=0;i--)\n\t\tif(out[i]!=0)\n\t\t{\n\t\t\tlen=i+1;\n\t\t\tbreak;\n\t\t}\n\tfor(i=len-1;i>=0;i--)\n\t\tcout<n=0;\n *phead=p2=p1;\n (*phead)->ahead=NULL;\n for(i=0;i<=n-2;i++)\n {\n p1=(struct num*)malloc(sizeof(struct num));\n p1->n=0;\n if(i==0)\n {\n (*phead)->next=p1;\n p1->ahead=(*phead);\n }\n else\n {\n p2->next=p1;\n p1->ahead=p2;\n }\n p2=p1;\n }\n p2->next=NULL;\n}\n\nint main()\n{\n char num1[10000];\n char num2[10000];\n //printf(\"Please input the first integer\\n\");\n scanf(\"%s\",num1);\n //printf(\"Please input the next integer\\n\");\n scanf(\"%s\",num2);\n int i1=0;\n int i2=0;\n int max;\n while(num1[i1]!='\\0')\n {\n i1++;\n }\n while(num2[i2]!='\\0')\n {\n i2++;\n }\n if(i1>=i2)\n {\n max=i1;\n }\n else\n {\n max=i2;\n } //????????????????\n create(&phead1,max); //?????????max?max?max+1???\n create(&phead2,max);\n create(&phead3,max+1);\n struct num* ptemp1=phead1;\n struct num* ptemp2=phead2;\n int i3;\n for(i3=i1-1;i3>=0;i3--)\n {\n ptemp1->n=num1[i3]-'0';\n ptemp1=ptemp1->next;\n }\n int i4;\n for(i4=i2-1;i4>=0;i4--)\n {\n ptemp2->n=num2[i4]-'0';\n ptemp2=ptemp2->next;\n } //????????????\n struct num* ptemp3=phead1;\n struct num* ptemp4=phead2;\n struct num* ptemp5=phead3;\n while(ptemp3!=NULL)\n {\n if(((ptemp3->n)+(ptemp4->n)+(ptemp5->n))>=10)\n {\n ptemp5->n=ptemp5->n+((ptemp3->n)+(ptemp4->n))-10;\n ptemp3=ptemp3->next;\n ptemp4=ptemp4->next;\n ptemp5=ptemp5->next;\n ptemp5->n=(ptemp5->n)+1;\n }\n else\n {\n ptemp5->n=ptemp5->n+(ptemp3->n)+(ptemp4->n);\n ptemp3=ptemp3->next;\n ptemp4=ptemp4->next;\n ptemp5=ptemp5->next;\n }\n } //???????????????????????\n struct num* ptemp7=phead3;\n while(ptemp7->next!=NULL)\n {\n ptemp7=ptemp7->next;\n }\n //printf(\"the answer is:\\n\");\n if(ptemp7->n==0)\n {\n ptemp7=ptemp7->ahead;\n if(ptemp7->ahead==NULL)\n {\n printf(\"0\");\n return 0;\n }\n else\n {\n while(ptemp7->n==0)\n {\n ptemp7=ptemp7->ahead;\n }\n while(ptemp7!=NULL)\n {\n printf(\"%d\",ptemp7->n);\n ptemp7=ptemp7->ahead;\n }\n }\n }\n else\n {\n while(ptemp7!=NULL)\n {\n printf(\"%d\",ptemp7->n);\n ptemp7=ptemp7->ahead;\n }\n }\n struct num* release1=phead1;//???????free???\n struct num* release2=phead2;\n struct num* release3=phead3;\n while(phead1->next!=NULL)\n {\n release1=phead1->next;\n phead1->next=(phead1->next)->next;\n free(release1);\n }\n free(phead1);\n while(phead2->next!=NULL)\n {\n release2=phead2->next;\n phead2->next=(phead2->next)->next;\n free(release2);\n }\n free(phead2);\n while(phead3->next!=NULL)\n {\n release3=phead3->next;\n phead3->next=(phead3->next)->next;\n free(release3);\n }\n free(phead3);\n return 0;\n}\n"} +{"label": "69", "index": "34063", "code": "\nint main()\n{ \n\tchar a1[251],a2[251];\n\tint b1[251],b2[251];\n\tmemset(b1,0,sizeof(b1));\n\tmemset(b2,0,sizeof(b2));\n\n\tcin.getline(a1,251);\n\tcin.getline(a2,251);\n int l1=strlen(a1),l2=strlen(a2);\n\n\tint i,j;\n\tfor(i=0,j=l1-1;j>=0;i++,j--)\n\t\tb1[i]=a1[j]-'0';\n\tfor(i=0,j=l2-1;j>=0;i++,j--)\n\t\tb2[i]=a2[j]-'0';\n\n\tfor(i=0;i<=250;i++)\n\t{\n\t\tb1[i]+=b2[i];\n\t\tif(b1[i]>=10)\n\t\t{\n\t\t\t\tb1[i]=b1[i]%10;\n\t\t\t\tb1[i+1]++;\n\t\t}\n\t}\n\n\ti=250;\n\twhile(b1[i]==0)\n\t{\n\t\ti--;\n\t\tif(i==0)\n\t\t\tbreak;\n\t}\n\n\tfor(;i>=0;i--)\n\t\tcout << b1[i];\n\tcout << endl;\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34064", "code": "void sum(char str1[],char str2[],int m,int n)\n{\n char str3[251],b;\n int i,a,x,y=0;\n a=n-m;\n for(i=n-1;i>=0;i--)\n {\n if (i57)\n {\n str3[i]=b-10; \n str2[i-1]=str2[i-1]+1;\n for(x=i-1;x>=0;x--)\n {if (str2[x]==58) {str2[x]='0';str2[x-1]=str2[x-1]+1;}}\n }\n else str3[i]=b;\n } \n } \n for(i=0;;i++) {if(str3[i]=='0') y++;else break;}\n if (y==n) printf(\"%c\",'0');\n else\n {for(i=y;in) \n {\n b=n;n=m;m=b;\n for(i=0;i<=n;i++)\n {\n if(i==0) str3[i]='0';\n else str3[i]=str1[i-1]; \n }\n \n sum(str2,str3,m,n+1);\n }\n else\n {\n for(i=0;i<=n;i++)\n {\n if(i==0) str4[i]='0';\n else str4[i]=str2[i-1]; \n }\n sum(str1,str4,m,n+1); \n }\n \n}\n"} +{"label": "69", "index": "34065", "code": "\nchar a[300], b[300], c[301];\nint la, lb;\n\nvoid F(){\n\tint i;\n\tla = strlen(a);\n\tlb = strlen(b);\n\tfor(i = 0;i < 300;i++)\n\t\tc[i] = '0';\n\tc[300] = '\\0';\n\tfor(i = 299;i > 0;i--){\n\t\tif(la - 300 + i >= 0)\n\t\t\tc[i] += a[la - 300 + i] - '0';\n\t\tif(lb - 300 + i >= 0)\n\t\t\tc[i] += b[lb - 300 + i] - '0';\n\t\tif(c[i] > '9'){\n\t\t\tc[i - 1] ++;\n\t\t\tc[i] -= 10;\n\t\t}\n\t}\n\tfor(i = 0;i < 300;i++){\n\t\tif(c[i] != '0')\n\t\t\tbreak;\n\t}\n\tif(i == 300){\n\t\tcout << '0' << endl;\n\t\treturn;\n\t}\n\tcout << c + i << endl;\n\treturn;\n}\n\nint main(){\n\tcin >> a >> b;\n\tF();\n\treturn 0;\n}"} +{"label": "69", "index": "34066", "code": "void main()\n{\n\tchar a[255],b[255];\n\tint x[255],y[255],sum[255],i,j,m,n,p;\n\tgets(a);\n gets(b);\n\tmemset(x,0,sizeof(x));\n\tmemset(y,0,sizeof(y));\n memset(sum,0,sizeof(sum));\n\tm=strlen(a);\n\tfor(i=m-1,j=0;i>=0;i--,j++)\n\t\tx[j]=a[i]-'0';\n\tn=strlen(b);\n\tfor(i=n-1,j=0;i>=0;i--,j++)\n\t\ty[j]=b[i]-'0';\n\tp=m>n?m:n;\n\tfor(i=0;i=10) {\n\t\t\tsum[i]-=10;\n\t\t\tsum[i+1]++;\n\t\t}\n\t}\n\t\n\twhile(sum[p]==0)\n\t\tp--;\n\tif(p<0) printf(\"0\");\n\telse {\n\t\tfor(i=p;i>=0;i--)\n\t\tprintf(\"%d\",sum[i]);\n\t}\n\n}\n"} +{"label": "69", "index": "34067", "code": "int main()\n{\n\tchar szline1[202];\n\tchar szline2[202];\n\tint an1[202];\n\tint an2[202];\n\tcin.getline(szline1, 202);\n\tcin.getline(szline2, 202);\n\tint len1 = strlen(szline1);\n\tint len2 = strlen(szline2);\n\tmemset(an1, 0, sizeof (an1));\n\tmemset(an2, 0, sizeof(an2));\n\tfor (int i = len1 - 1, j = 0; i >= 0; i --)\n\t\tan1[j ++] = szline1[i] - '0';\n\tfor (int i = len2 - 1, j = 0; i >= 0; i --)\n\t\tan2[j ++] = szline2[i] - '0';\n\tint begin;\n\tfor (int i = 0; i < 202; i ++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif (an1[i] >= 10)\n\t\t{\n\t\t\tan1[i] -= 10;\n\t\t\tan1[i + 1] ++;\n\t\t}\n\t\tif (an1[i])\n\t\t\tbegin = i;\n\t}\n\tfor (int i = begin; i >= 0; i --)\n\t\tcout << an1[i];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34068", "code": "int add(int maxlen,int *num1,int *num2);\nint maxlen,len1,len2,highestpos,num1[256],num2[256];\nchar a[256],b[256];\nint main()\n{\n int i,j;\n cin>>a>>b;\n len1=strlen(a);\n len2=strlen(b);\n maxlen=(len1>len2)? len1:len2;\n for(i=0,j=len1-1;i=0;i--)\n\t cout<=10)\n\t {\n\t\t num1[i]=num1[i]-10;\n\t\t num1[i+1]++;\n\t }\n if(num1[i]) highestpos=i;\n }\n return highestpos;\n}\n\n"} +{"label": "69", "index": "34069", "code": "\nint main()\n{\n\tchar a[255],b[255];\n\tint ua[255]={0},ub[255]={0},sum[255]={0};\n\tcin>>a>>b;\n\tint lena,lenb;\n\tlena=strlen(a),lenb=strlen(b);\n\tfor (int i=0;ilenb) max=lena;\n\telse max=lenb;\n\tint temp;\n\tfor (int i=0;i=0;i--)\n\t{\n\t\tif (sum[i]!=0)\n\t\tmark=1;\n\t\tif (mark==1)\n\t\tcout<>a;\n\tcin>>b;\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\tfor(i=0;ilen2)\n\t\tlen=len1;\n\telse len=len2;\n\tfor(i=0;i<=len;i++)\n\t\tresult[i]=0;\n\tfor(i=0;i=len1)\n\t\t\tresult[i]+=b1[i];\n\t\telse result[i]+=a1[i];\n\t\tif(result[i]>9)\n\t\t{\n\t\t\tresult[i]-=10;\n\t\t\tresult[i+1]=1;\n\t\t}\n\t}\n\tfor(i=len;i>=0;i--)\n\t\tif(result[i]!=0)\n\t\t{\n\t\t\tlen=i+1;\n\t\t\tbreak;\n\t\t}\n\tfor(i=len-1;i>=0;i--)\n\t\tcout<len2)\n\t\tmax=len1;\n\telse\n\t\tmax=len2;\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\ta[k++]=str1[i]-'0';\n\t}\n\tk=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\tb[k++]=str2[i]-'0';\n\t}\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i]=c[i]%10;\n\t\t\tc[i+1]++;\n\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(c[i]>0)\n\t\t{\n\t\t\tfor(j=i;j>=0;j--)\n\t\t\t{\n\t\t\t\tcout<>a>>b;\n\tl[0]=strlen(a);\n\tl[1]=strlen(b);\n\tif(l[0]>l[1])\n\t{\n\t\tl[2]=l[0];\n\t\tl[3]=l[1];\n\t\tj=0;\n\t\tfor(i=l[0]-1;i>=0;i--)\n\t\t\tmax[j++]=a[i]-'0';\n\t\tj=0;\n\t\tfor(i=l[1]-1;i>=0;i--)\n\t\t\tmin[j++]=b[i]-'0';\n\t}\n\telse\n\t{\n\t\tl[3]=l[0];\n\t\tl[2]=l[1];\n\t\tj=0;\n\t\tfor(i=l[0]-1;i>=0;i--)\n\t\t\tmin[j++]=a[i]-'0';\n\t\tj=0;\n\t\tfor(i=l[1]-1;i>=0;i--)\n\t\t\tmax[j++]=b[i]-'0';\n\t}\n\tfor(i=0;i9)\n\t\t{\n\t\t\tmax[i+1]++;\n\t\t\tmax[i]=max[i]+min[i]-10;\n\t\t}\n\t\telse\n\t\t\tmax[i]=max[i]+min[i];\n\t}\n\tfor(i=l[3];i9)\n\t\t{\n\t\t\tmax[i]-=10;\n\t\t\tmax[i+1]++;\n\t\t}\n\t}\n\tj=l[2];\n\twhile(max[j]==0)\n\t\tj--;\n\tif(j<0)\n\t\tcout<<0;\n\tfor(;j>=0;j--)\n\t\tcout<len_a)\n\t{\n\t\tmax=len_b;\n\t\tmin=len_a;\n\t\tstrcpy(t,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,t);\n\t}\n\tfor(i=min-1;i>=0;i--)\n\t{\n\t\tif((a[i+max-min]-'0')+(b[i]-'0')<=9)\n\t\t{\n\t\tc[j]=c[j]+a[i+max-min]+b[i]-'0'-'0';\n\t\tj++;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tc[j]=c[j]+a[i+max-min]+b[i]-'9'-'1';\n\t\t\tc[j+1]=c[j+1]+1;\n\t\t\tj++;\n\t\t}\n\t}\n\tfor(i=max-min-1;i>=0;i--)\n\t{if((c[j]-'0')+(a[i]-'0')>9)\n\t{c[j]=c[j]+a[i]-'9'-'1'+'0';\n\tc[j+1]=c[j+1]+1;\n\t}\n\telse \n\tc[j]=c[j]+a[i]-'0';\n\tj++;\n\t}\n\tif(a[0]=='9'||(len_a==len_b&&b[0]=='9'))\n\t{\n\t\tj=j+1;\t\t\t\t\n\t}\n\tif(max=-147)\n\t{\nc[85]='0';\nc[86]='3';\n\t}\n\tif(c[j-1]!='0')\n\t{\tfor(i=j-1;i>=0;i--)\n\tprintf(\"%c\",c[i]);\n\t}\n\telse\n\t{\n\t\tfor(i=j-1;i>=0;i--)\n\t\t{if(c[i]!='0')\n\t\tbreak;}\n\t\tfor(k=i;k>=0;k--)\n\t\t\tprintf(\"%c\",c[k]);\n\t}\n\tprintf(\"\\n\");\n\n\n\treturn 0;\n}\n"} +{"label": "69", "index": "34074", "code": "int main(){\n\tchar a[500],b[500];\n int i,j,k,l1,l2,d,x,c[500],n1,n2;\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n l1=strlen(a);\n\tl2=strlen(b);\n\tif(l1>l2){\n\t\tfor(i=0;i0;i--){\n\t\t d=a[i]-'0';\n\t\t c[i]=c[i]+d;\n\t\t if(c[i]==10){\n\t\t\t c[i]=0;\n\t\t\t c[i-1]=c[i-1]+1;\n\t\t }\n\t }\n\t d=a[0]-'0';\n\t x=c[0]-'0';\n\t\tif(d+x+a[0]<10){\n \tc[0]=c[0]+d;\n\t\t\tfor(j=0;j0;i--){\n\t\t d=b[i]-'0';\n\t\t c[i]=c[i]+d;\n\t\t if(c[i]==10){\n\t\t\t c[i]=0;\n\t\t\t c[i-1]=c[i-1]+1;\n\t\t }\n\t }\n\t d=b[0]-'0';\n\t x=c[0]-'0';\n\t\tif(d+x+c[0]<10){\n \tc[0]=c[0]+d;\n\t\t\tfor(j=0;j0;i--){\n\t\td=a[i]-'0';\n\t\tx=b[i]-'0';\n if(d+x+c[i]<10){\n\t\t\tc[i]=c[i]+d+x;\n\t\t}\n\t\telse{\n\t\t\tc[i-1]=c[i-1]+1;\n\t\t\tc[i]=c[i]+d+x-10;\n\t\t}\n\t}\n d=a[0]-'0';\n\t\tx=b[0]-'0';\n\t\tif(d+x+c[0]<10){\n \tc[0]=c[0]+d+x;\n\t\t\tfor(j=0;j>a;\n\tcin>>b;\n\tint x=strlen(a);\n\tint y=strlen(b);\n\tchar counter='0';\n\tint i=0;\n\tint max;\n\tif(x>y)max=x;\n\telse max=y;\n\tfor(i=0;i<=max;i++)\n\t{\n\t\tc[i]=((a[x-1]-'0'+b[y-1]-'0'+counter-'0')%10+'0');\n\t\tcounter=((a[x-1]-'0'+b[y-1]-'0'+counter-'0')/10+'0');\n\t\tif((x-1)!=0)x--;\n\t\telse if((x-1)==0)a[x-1]='0';\n\t\tif((y-1)!=0)y--;\n\t\telse if((y-1)==0)b[y-1]='0';\n\t}\n\tint count=0;\n\tfor(int j=i-1;j>=0;j--)\n\t{\n\t\tif(c[j]=='0'&&count==0)continue;\n\t\telse if(c[j]!='0')\n\t\t{\n\t\t\tcout<=ia) ta = 0;\n\t\telse ta = a[ia-1-ir];\n\t\tif (ir>=ib) tb = 0;\n\t\telse tb = b[ib-1-ir];\n\n\t\tint tr = ta+tb+addin;\n\t\taddin = tr/10;\n\t\ttr %= 10;\n\t\tresult[ir] = tr;\n\t}\n\tresult[ir] = addin;\n\n\twhile (ir>=0 && result[ir]==0) ir--;\n\n\tif (ir<0) cout << 0 << endl;\n\telse {\n\t\tfor (int i=ir; i>=0; i--) \n\t\t\tcout << result[i];\n\t\tcout << endl;\n\t}\n\n\treturn 0;\n}"} +{"label": "69", "index": "34077", "code": "char m[1000],n[1000];\nint main()\n{\n\tint i=0,j=0,lenm,lenn,km[1000]={0},kn[1000]={0};\n\tchar s;\n\tcin>>m>>n;\n\tlenm=strlen(m);\n\tlenn=strlen(n);\n\tfor(i=lenm-1;i>=0;i--)\n\t{\n\t\tkm[j++]=m[i]-'0';\n\t}\n\tfor(i=lenn-1,j=0;i>=0;i--,j++)\n\t{\n\t\tkn[j]=n[i]-'0';\n\t}\n\t\tfor(i=0;i=10)\n\t\t\t{\n\t\t\t\tkn[i]-=10;\n\t\t\t\tkn[i+1]+=1;\n\t\t\t}\n\t\t}\n\t\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tif(flag==0&&n[i]=='0')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tflag=1;\n\t\t\tcout<=0;i--){\n\t\tan1[j++]=seLine1[i]-'0';}//???????????????\n\tj=0;\n\tfor(i=len2-1;i>=0;i--){\n\t\tan2[j++]=seLine2[i]-'0';}//???????????????\n\tfor(i=0;i=10){\n\t\t\tan1[i]-=10;\n\t\t\tan1[i+1]++;}}//??\n\ti=MAX_LENTH-1;\n\twhile(an1[i]==0){\n\t\ti--;}//???????0??\n\tif(i<0){\n\t\tcout<<0;}//?????0 0???\n\telse{\n\t\tfor(;i>=0;i--){\n\t\t\tcout<=0;i--,j--)\n a[j]+=b[i];\n for(i=m-1;i>0;i--)\n {\n if(a[i]>=10)\n {\n a[i-1]++;\n a[i]-=10;\n }}\n for(i=0;i>a>>b; //?????\n\tint ia=strlen(a),ib=strlen(b); //??????????\n\tint i,k=0,j,sum,s[250]={0},com; //??i?????k?????j?????sum??????????s\n\tif(ia==ib) //????????????\n\t{\n\t\tcom=ia; //?????com????\n\t\tfor(i=com-1;i>=0;i--)\n\t\t{\n\t\t\tsum=a[i]+b[i]+k-96; //?????????48????????\n\t\t\tk=sum/10; //?????\n\t\t\tj=sum-k*10; //?????\n\t\t\ts[i+1]=j;\n\t\t}\n\t\tif(k!=0)\n\t\t\ts[0]=k;\n\t}\n\telse //???????\n\t{\n\t\tint max;\n\t\tif(ia>ib)\n\t\t\tmax=ia;\n\t\telse\n\t\t\tmax=ib;\n\t\tcom=max;\n\t\tfor(;ia!=0&&ib!=0;ia--,ib--,max--)\n\t\t{\n\t\t\tsum=a[ia-1]+b[ib-1]+k-96; //??????\n\t\t\tk=sum/10;\n\t\t\tj=sum-k*10;\n\t\t\ts[max]=j;\n\t\t}\n\t\ta[-1]='0';b[-1]='0';\n\t\tif(ia>ib)\n\t\t{\n\t\t\tfor(;max>=0;max--)\n\t\t\t{\n\t\t\t\tsum=a[ia-1]+k-48; //??????\n\t\t\t\tk=sum/10;\n\t\t\t\tj=sum-k*10;\n\t\t\t\ts[max]=j;\n\t\t\t\tia--;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(;max>=0;max--)\n\t\t\t{\n\t\t\t\tsum=b[ib-1]+k-48; //??????\n\t\t\t\tk=sum/10;\n\t\t\t\tj=sum-k*10;\n\t\t\t\ts[max]=j;\n\t\t\t\tib--;\n\t\t\t}\n\t\t}\n\t\tif(k!=0)\n\t \ts[0]=k;\n\t}\n\tif(a[0]=='0'&&b[0]=='0'&&ia==1&&ib==1)\n\t\tcout<<\"0\"<t1[0]?s1[0]:t1[0];\n for (i=1;i<=max;i++)\n {\n res[i]+=s1[i]+t1[i];\n if (res[i]>=10)\n {\n res[i+1]+=res[i]/10;\n res[i]%=10;\n }\n if (res[max+1]!=0)\n res[0]=max+1;\n else res[0]=max;\n }\n }\n for (i=res[0];res[i]==0;i--);\n if (i==0)printf(\"0\");else\n for (;i>=1;i--)\n printf(\"%d\",res[i]);\n\n printf(\"\\n\");\n return 0;\n}"} +{"label": "69", "index": "34082", "code": "char a[250],b[250];//???????????????\nint A[250],B[250],C[251]={0};//????????????????????????[249]?\nint carrybit=0;//?carrybit?????\nint m=-1;//?m???C?????????????\nvoid add(int n){\n\tif(n<0){\n\t\tC[n+1]=carrybit;\n\t\treturn;\n\t}\n\tC[n+1]=(A[n]+B[n]+carrybit)%10;\n\tcarrybit=(A[n]+B[n]+carrybit)/10;\n\tadd(n-1);\n}\nint main()\n{\n\tint i=0;\n\tcin.getline(a,250);\n\tcin.getline(b,250);\n\tint al=strlen(a),bl=strlen(b);\n\tfor(i=0;i=0){\n\t\tfor(i=m;i<251;i++)\n\t\t\tcout<=0;i--)\n {\n an1[j++]=szLine1[i]-'0';\n }\n j=0;\n for(i=nLen2-1;i>=0;i--)\n {\n an2[j++]=szLine2[i]-'0';\n }\n for(i=0;i=10)\n {\n an1[i]-=10;\n an1[i+1]++;\n }\n }\n for(i=MAX;i>=0;i--)\n {\n if(an1[i]!=0)\n {\n a=i;\n break;\n }\n \n }\n for(i=a;i>=0;i--)\n { \n printf(\"%d\",an1[i]);\n } \n \n}\n "} +{"label": "69", "index": "34084", "code": "main()\n{\n char a[250],b[250],m[250];\n int c,d,i,e,j,k;\n scanf(\"%s %s\",a,b);\n c=strlen(a);\n d=strlen(b);\n k=0;\n if(cd)\n {\n for(i=c-1;i>=c-d;i--)\n b[i]=b[i+d-c];\n for(i=0;i0;i--)\n {\n m[i]=a[i]+b[i]-'0';\n if(m[i]>'9')\n {\n m[i]=m[i]-10;\n a[i-1]=a[i-1]+1;\n }\n }\n m[0]=a[0]+b[0]-'0';\n if(m[0]>'9')\n {\n m[0]=m[0]-10;\n printf(\"1\");\n for(i=0;i=0;count--)\n\t{\n\t\ta[count+differ]=a[count];\n\t}\n\tfor(int i=0;i=0;count--)\n\t{\n\t\taa[la-count]=a[count];\n\t}\n\taa[la+1]='\\0';\n\tfor(int i=0;i<=la+1;i++)\n\t{\n\t\ta[i]=aa[i];\n\t}\n}\nint main()\n{\n\tchar a[1000];\n\tchar b[1000];\n\tscanf(\"%s %s\",a,b);\n\t//printf(\"%d\",strlen(a));\n\t\n\tif((strlen(a)==1)&&(strlen(b)==1)&&(a[0]=='0')&&(b[0]=='0'));\n\telse\n\t{\n\tclean(a);\n\tclean(b);\n }\n\t//printf(\"%s\\n%s\\n\",a,b);\n\t\n\tint la=countnum(a);\n\tint lb=countnum(b);\n\tint max=la;\n\tif(la9)\n\t\t{\n\t\t\tsign =1;\n\t\t\ttemp=temp-10;\n\t\t}\n\t\telse \n\t\t\tsign=0;\n\t\tc[i]=temp+'0';\n\t}\n\tc[max+1]='\\0';\n\tmax=max;\n\tentire(c,max);\t\n\tif(c[0]=='0')\n\t{\n\t\tfor(int j=1;j<=max;j++)\n\t\t\tprintf(\"%c\",c[j]);\n\t\tprintf(\"\\n\");\n\t}\n\telse\n\t{\n printf(\"%s\\n\",c);\n\t}\n\t\n\t\n}\n"} +{"label": "69", "index": "34086", "code": "int main()\n{\n\tchar s[251];\n\tint a[251]={0},b[251]={0},c[252]={0},alen,blen,clen,m;\n\tint i,k=0;\n\tgets(s);\n\talen=strlen(s);\n\tfor(i=alen-1;i>=0;i--){\n\t\ta[alen-i]=s[i]-'0';\n\t}\n\tgets(s);\n\tblen=strlen(s);\n\tfor(i=blen-1;i>=0;i--){\n\t\tb[blen-i]=s[i]-'0';\n\t}\n\tif(alen>blen){\n\t\tclen=alen;\n\t}else{\n\t\tclen=blen;\n\t}\n\tfor(i=1;i<=clen;i++){\n\t\tc[i]=a[i]+b[i];\n\t}\n\tfor(i=1;i<=clen;i++){\n\t\tif(c[i]>9){\n\t\t\tc[i+1]++;\n\t\t\tc[i]=c[i]-10;\n\t\t\tif(i==clen){\n\t\t\t\tclen++;\n\t\t\t}\n\t\t}\n\t}\n\tif(clen==1){\n\t\tprintf(\"%d\",c[clen]);\n\t}else{\n\t\tfor(i=clen;i>0;i--){\n\t\t\tif(c[i]!=0){\n\t\t\t\tm=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=m;i>0;i--){\n\t\tprintf(\"%d\",c[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34087", "code": "\nint main()\n{\n char ch1[252],ch2[252],cha1[253],cha2[253],cha3[253];\n int i,j,len1,len2,jin;\n cin>>ch1;\n cin>>ch2;\n len1=strlen(ch1);\n len2=strlen(ch2);\n for(i=0;i<253;i++)\n {\n cha1[i]='0';\n cha2[i]='0';\n cha3[i]='0';\n }\n for(i=0;i=10)\n {\n cha3[i]='0'+(cha1[i]-'0')+(cha2[i]-'0')+jin-10;jin=1;\n }\n else\n {\n cha3[i]='0'+(cha1[i]-'0')+(cha2[i]-'0')+jin;jin=0;\n }\n }\n for(i=252;i>=0;i--)\n {\n if(cha3[i]!='0')break;\n }\nif(i==-1)cout<<'0';\nelse\n{\n for(j=i;j>=0;j--)\n cout<n)\n\t len =m;\n \telse\n \t len =n;\n \tint k=0;\n \tint s = 0;\n\tfor(i=0;i>s1;\n\tcin>>s2;\n\tm = strlen(s1);\n\tn = strlen(s2);\n\tint i,j=0;;\n\tfor(i=m-1;i>=0;i--)\n\t\ta[j++] = s1[i]-'0';\n\tj=0;\n\tfor(i=n-1;i>=0;i--)\n\t\tb[j++] = s2[i]-'0';\n\tcal();\n\tfor(i=999;i>0;i--)\n\t if(c[i]!=0)\n\t break;\n\tfor(;i>=0;i--)\n\t cout<9){\n k-=10;\n c[cl]++;\n } \n c[cl-1]=k;\n }\n}\nvoid sc(){\n int sign=0,m;cl--;\n for(m=0;m<=250;m++){\n if(c[250-m]!=0){\n cl=251-m;break;\n }\n }\n for(m=0;m0||l2>0)\n\t{\n\t\ta=(l1>0)?s1[--l1]-'0':0;\n\t\tb=(l2>0)?s2[--l2]-'0':0;\n\t\tsum[l]+=a+b;\n\t\tsum[l+1]=sum[l]/10;\n\t\tsum[l++]%=10;\n\t}\n\twhile(sum[l]==0&&l>0)\n\t{\n\t\tl--;\n\t}\n\tfor(;l>=0;l--)\n\t{\n\t\tprintf(\"%d\", sum[l]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34091", "code": "int main()\n{\n char a1[260]={0};\n char b1[260]={0};\n cin.getline(a1,260);\n cin.getline(b1,260);\n int i,j,k,l1,l2;\n l1=strlen(a1);\n l2=strlen(b1);\n int c[300]={0};\n int a[300]={0};\n int b[300]={0};\n j=0;\n for(i=l1-1;i>=0;i--)\n {\n a[j]=a1[i]-'0';\n j++;\n }\n j=0;\n for(i=l2-1;i>=0;i--)\n {\n b[j]=b1[i]-'0';\n j++;\n }\n for(i=0;i<300;i++)\n {\n c[i]=a[i]+b[i]+c[i];\n if(c[i]>=10)\n {\n c[i]=c[i]%10;\n c[i+1]++;\n }\n }\n j=299;\n while(c[j]==0)\n {\n j--;\n }\n for(;j>=0;j--)\n {\n cout << c[j];\n }\n if((a[0]==0)&&(b[0]==0))\n {\n cout << 0;\n }\n cout << endl;\n cin.get(); cin.get(); cin.get();\n return 0;\n}\n"} +{"label": "69", "index": "34092", "code": "\nint main()\n{\n\tchar a[252],b[252];\n\n\tcin>>a>>b;\n\tint la=strlen(a);\n\tint lb=strlen(b);\n\n\tint flag=0;\n\n\tif(la=lb\n\n\tint j,k=la-1;\n\tfor(j=lb-1; j>=0 ;j--)\n\t{\n\t\ta[k]=a[k]+b[j]-48;\n\t\tif(a[k]>'9' && k!=0)\n\t\t{\n\t\t\ta[k]=a[k]-10;\n\t\t\ta[k-1]++;\n\t\t}\n\t\tif(a[k]>'9' && k==0 )\n\t\t{\n\t\t\ta[k]=a[k]-10;\n\t\t\tflag=1;\n\t\t}\n\t\tk--;\n\t}\n\tfor(int i=la-1;i>=0;i--)\n\t{\n\t\tif(a[i]>'9' && i!=0) \n\t\t{\n\t\t\ta[i]=a[i]-10;\n\t\t\ta[i-1]++;\n\t\t}\n\t\tif(a[i]>'9' && i==0 )\n\t\t{\n\t\t\ta[i]=a[i]-10;\n\t\t\tflag=1;\n\t\t}\n\t}\n\tint i=0;\n\tif(flag==1) cout<<1;\n\tif(flag==0)\n\t{\n\t\tfor(i=0;a[i]!='\\0';i++)\n\t\t{\n\t\t\tif(a[i]!='0')\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tcout<=0;i--)\n\t\ta[j++]=str1[i]-'0';\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t\tb[j++]=str2[i]-'0';\n\tif(strcmp(str1,\"0\")!=0&&strcmp(str2,\"0\")!=0)\n\t{\n\tfor (i=0;i<=250;i++)\n\t{\n\t\ta[i]=a[i]+b[i];\n if(a[i]>=10)\n\t\t{\n\t\t\ta[i]=a[i]-10;\n\t\t\ta[i+1]++;\n\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif (a[i]!=0)//????0?????\n\t\t\tbreak;\n\t}\n\tfor(;i>=0;i--)\n\t\tcout<> A >> B;\n\tfor (i = 0; A[i] != 0; i++);\n\tlen1 = i;\n\tfor (i = 0; B[i] != 0; i++);\n\tlen2 = i;\n\tif (A[0] == '0' && B[0] == '0' && len1 == len2 && len1 == 1)\n\t{\n\t\tcout << '0' << endl;\n\t}\n\telse\n\t{\n\t\tmemset(a, 0, sizeof(a));\n\t\tmemset(b, 0, sizeof(b));\n\t\tmemset(c, 0, sizeof(c));\n\t\tif (len2 > len1)\n\t\t{\n\t\t\tj = 0;\n\t\t\tfor (i = len2 - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\ta[j] = B[i] - '0';\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj = 0;\n\t\t\tfor (i = len1 - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\tb[j] = A[i] - '0';\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tint t = len1;\n\t\t\tlen1 = len2;\n\t\t\tlen2 = t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tj = 0;\n\t\t\tfor (i = len1 - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\ta[j] = A[i] - '0';\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj = 0;\n\t\t\tfor (i = len2 - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\tb[j] = B[i] - '0';\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < len1; i++)\n\t\t{\n\t\t\tc[i] += (a[i] + b[i]);\n\t\t\tif (c[i] >= 10)\n\t\t\t{\n\t\t\t\tc[i] = c[i] % 10;\n\t\t\t\tc[i + 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (i = 299; c[i] == 0; i--);\n\t\tif (i == -1)\n\t\t\tcout << '0' << endl;\n\t\telse\n\t\t{\n\t\t\tfor (; i >= 0; i--)\n\t\t\t\tcout << c[i];\n\t\t\tcout << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34095", "code": "\nint MAX(int,int);\nmain()\n{\n char a[251],b[251],c[251];\n int t=0,len1,len2,i,j,m;\n scanf(\"%s%s\",a,b);\n len1=strlen(a);\n len2=strlen(b);\n if(len1=0;i--)\n {a[i+len2-len1]=a[i];\n }\nfor(i=0;i<=len2-len1-1;i++)\n { a[i]='0';\n }\n }\n else if(len1>len2)\n {for(i=len2-1;i>=0;i--)\n {b[i+len1-len2]=b[i];\n }\n for(i=0;i<=len1-len2-1;i++)\n { b[i]='0';\n }\n }\n m=MAX(len1,len2);\n for(i=0;i<=250;i++)\n { c[i]='\\0';\n }\n for(i=m-1;i>=0;i--)\n {c[i]=(a[i]-'0'+b[i]-'0'+t)%10+'0';\n /* printf(\"%c\",a[i]);*/\n t=(a[i]-'0'+b[i]-'0'+t)/10;\n }\n if(t==1)\n{ for(i=m-1;i>=0;i--)\n c[i+1]=c[i];\n c[0]='1';\n }\n len2=strlen(c);\n for(i=0;i<=len2-1;i++)\n {if(c[i]!='0')\n break;\n }\n \n if(i==len2)\n printf(\"0\");\n else\n {for(j=i;j<=len2-1;j++)\n { printf(\"%c\",c[j]);\n } \n } \n } \nint MAX(int a,int b)\n{\n if(a>=b)\n return a;\n else\n return b;\n}\n"} +{"label": "69", "index": "34096", "code": "int c[300],d[300];\nvoid plus(int i,int j,int a){\n\tif (i>=0) a+=c[i];\n\tif (j>=0) a+=d[j];\n\tif (i>=0||j>=0){\n\t\tplus(i-1,j-1,(a)/10);\n\t\tprintf(\"%d\",(a)%10);\n\t}else if (a) printf(\"%d\",a);\n}\nint main(){\n\tchar a[300];\n\tint i,j,n,m;\n\tscanf(\"%s\",a);\n\tfor (i=0;a[i]=='0'&&inext=NULL;\n p->last=NULL;\n return p;\n}\n\nvoid InsertNode(PNode p,char b) //?????????????\n{\n PNode pn=(PNode)malloc(sizeof(struct Node));\n pn->a=b;\n pn->next=p->next;\n pn->last=p;\n p->next=pn;\n if(pn->next!=NULL)\n pn->next->last=pn;\n}\n\nint Compare(PNode p1,PNode p2) //??????p1?p2???\n{ //????1??p1???????2??\n int i,j; //p2??\n i=0;j=0;\n p1=p1->next;\n p2=p2->next;\n while(p1!=NULL)\n {\n i+=1;\n p1=p1->next;\n }\n while(p2!=NULL)\n {\n j+=1;\n p2=p2->next;\n }\n if((i-j)>=0)\n return 1;\n else\n return 2;\n}\n\nint Add(PNode p1,PNode p2) //????????????????\n{ //?p1?p2??????????\n int n,k; //?????\n k=Compare(p1,p2); \n PNode p3; \n p1=p1->next;\n p2=p2->next;\n if(k==2)\t //??k????p1?p2?????p1????????? \n {\n p3=p1;\n p1=p2;\n p2=p3;\n }\n \n while((p1!=NULL)&&(p2!=NULL)) //???? \n {\n n=p1->a-'0'+p2->a-'0';\n if(n<10) //??? \n { \n p1->a=n+'0';\n }\n else //????????????? \n {\n p1->a=n-10+'0';\n if(p1->next==NULL)\n {\n PNode p=(PNode)malloc(sizeof(struct Node));\n p->a='1';\n p1->next=p;\n p->next=NULL;\n p->last=p1;\n }\n else\n {\n if(p2->next!=NULL)\n p1->next->a=(p1->next->a)-'0'+1+'0';\n else\n {\n p1->next->a=(p1->next->a)-'0'+1+'0';\n p1=p1->next;\n while((p1->a-'0')>9)\n {\n p1->a=p1->a-'0'-10+'0';\n if(p1->next!=NULL)\n {\n \n p1->next->a=(p1->next->a)-'0'+1+'0';\n \n p1=p1->next;\n }\n else\n {\n PNode pointer=(PNode)malloc(sizeof(struct Node));\n pointer->a='1';\n p1->next=pointer;\n pointer->next=NULL;\n pointer->last=p1;\n }\n }\n }\n }\n }\n p1=p1->next;\n p2=p2->next;\n }\n return k;\n}\n\nint main()\n{\n char c;\n PNode p1=CreateNullList();\n PNode p2=CreateNullList();\n\tPNode p3=p1; //p3,p4????????????\n PNode p4=p2; //????????\n\n c=getchar();\n while(c!='\\n')\n {\n InsertNode(p1,c);\n c=getchar();\n }\n \n c=getchar();\n while(c!='\\n')\n {\n InsertNode(p2,c);\n c=getchar();\n }\n \n \n\n int w;\n w=Add(p1,p2);\n\n if(w==1)\n p2=p1; \n while(p2->next!=NULL)\n {\n p2=p2->next;\n }\n w=0;\n if((p2->last->last==NULL)&&(p2->a=='0'))\n printf(\"0\");\n else\n {\n while(p2->last!=NULL) \n {\n if(p2->a!='0') \n { \n w=1;\n printf(\"%c\",p2->a);\n p2=p2->last;\n }\n else\n {\n if(w!=0)\n {\n printf(\"%c\",p2->a);\n p2=p2->last;\n\n }\n else\n {\n p2=p2->last;\n }\n }\n \n }\n }\n printf(\"\\n\");\n \n while (p3!=NULL) //????\n {\n p1=p3;\n p3=p3->next;\n free(p1);\n }\n while(p4!=NULL)\n {\n p1=p4;\n p4=p4->next; \n free(p1);\n }\n getchar();\n getchar();\n return 0;\n\n}\n\n"} +{"label": "69", "index": "34098", "code": "int main()\n{\n char str1[250],str2[250],str3[250],str4[250],str5[251];\n int a,b,c,i,j,k,p,q,r,s,t,u,v,w,x,y;\n scanf(\"%s\\n\",str1);\n scanf(\"%s\",str2);\n a=strlen(str1);\n b=strlen(str2);\n if(a0)\n {\n for(j=0;j<=c-1;j++)\n str4[j]='0';\n for(k=c;k<=249;k++)\n str4[k]=str2[k-c];}\n else\n {\n for(p=0;p<=249;p++)\n str4[p]=str2[p];}//???????????????0 \n for(u=0;u<=250;u++)\n str5[u]='0';\n for(q=a-1;q>=0;q--)\n {\n r=str1[q]+str4[q]+str5[q+1]-144;\n if(r>9)\n {str5[q+1]=r-10+'0';\n str5[q]=str5[q]+1;}\n else\n str5[q+1]=r+'0';\n }//????? \n for(v=0;v<=a;v++)\n {w=str5[v]-48;\n if(w!=0)\n {x=v;\n break;}\n else\n x=251;\n }\n if(251==x)\n printf(\"%d\",0);\n else \n {for(y=x;y<=a;y++)\n printf(\"%c\",str5[y]);}//???????0?????? \n //printf(\"%s\",str5);\n }\n"} +{"label": "69", "index": "34099", "code": "int main()\n{\n\t\n\t//int temp = 0;\n\tchar temp[252];\n\tint a[252];\n\tint b[252];\n\tint ans[252];\n\tint j1 = 0;\n\tmemset(ans,0,sizeof(ans));\n\tmemset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tscanf(\"%s\",temp);\n\tfor(int i = strlen(temp)-1;i >= 0;i--)\n\t{\n\t\ta[j1++] = temp[i] - '0';\n\t}\n\tint j2 = 0;\n\tscanf(\"%s\",temp);\n\tfor(int i = strlen(temp)-1;i >= 0;i--)\n\t{\n\t\tb[j2++] = temp[i] - '0';\n\t}\n\tint j = max(j1,j2);\n\tmemset(ans,0,sizeof(ans));\n\tfor(int i = 0;i < j;i++)\n\t{\n\t\tans[i] += a[i] + b[i];\n\t\tans[i+1] +=ans[i]/10;\n\t\tans[i] %= 10;\n\t}\n\tint key = 0;\n\tint tag = 0;\n\tfor(int i = j;i >=0;i--)\n\t{\n\t\tif(ans[i] != 0)\n\t\t\tkey = 1;\n\t\tif(key == 0)\n\t\t\tcontinue;\n\t\tcout<lenb?lena:lenb;\n\t\n\t\tfor(p=a,i=lena-1;p=10)\n\t\t{\n\t\t\tbb[i]-=10;\n\t\t\tbb[i+1]++;\n\t\t}\n\t}\n\n\tstart=0;\n\n\tfor(i=len;i>=0;i--)\n\t{\n\t\n\t\tif(start)\n\t\t{\n\t\t\tprintf(\"%d\",bb[i]);\n\t\t}\n\t\telse if(bb[i]!=0)\n\t\t{\n\t\t\tprintf(\"%d\",bb[i]);\n\t\t\tstart=1;\n\t\t}\n\t}\n\tif(!start) printf(\"0\");\n\n}\n\n"} +{"label": "69", "index": "34101", "code": "struct integer //??????\n{\n int n;\n struct integer * pup;\n struct integer * pdown;\n};\nstruct integer * creat(struct integer * head) //????\n{\n head=(struct integer*)malloc(sizeof(struct integer));\n head->pup=NULL;\n head->pdown=NULL;\n return head;\n}\nmain()\n{\n char a;\n int x=1,y=1,l=1; //k?m?l???????\n struct integer * p,*q,*p1,*head;\n head=p=q=(struct integer *)malloc(sizeof(struct integer));\n p=NULL;\n creat(head);\n scanf(\"%c\",&a);\n while(0<=(a-'0')&&(a-'0')<=9||a=='-')\n {\n p1=(struct integer *)malloc(sizeof(struct integer));\n if(a=='-')\n {\n x=-1; //???????\n scanf(\"%c\",&a);\n continue;\n }\n else\n {\n p1->n=x*(a-'0'); //????????????\n p1->pdown=p;\n p1->pup=head; //???????????????\n if(p!=NULL)\n p->pup=p1;\n head->pdown=p1;\n p=p1;\n scanf(\"%c\",&a);\n }\n }\n p=NULL;\n scanf(\"%c\",&a); //??????\n while(0<=(a-'0')&&(a-'0')<=9||a=='-')\n {\n p1=(struct integer *)malloc(sizeof(struct integer));\n if(a=='-')\n {\n y=-1;\n scanf(\"%c\",&a);\n continue;\n }\n else\n {\n p1->n=y*(a-'0');\n p1->pup=p;\n p1->pdown=head;\n head->pup=p1;\n if(p!=NULL)\n p->pdown=p1;\n p=p1;\n scanf(\"%c\",&a);\n }\n }\n p=q=head;\n while(p->pdown!=NULL&&q->pup!=NULL) //????????\n {\n p=p->pdown;\n q=q->pup;\n p->n=p->n+q->n;\n q->n=p->n; //?????????????\n }\n if(p->pdown==NULL&&q->pup!=NULL) //???????????????????????????\n {\n q=head->pup;\n while(q->pup!=NULL)\n {\n if(q->n>9) //??\n {\n q->pup->n++;\n q->n=q->n%10;\n }\n if(q->n<0) //??\n {\n q->pup->n--;\n q->n=q->n+10;\n }\n q=q->pup;\n }\n if(y<0)\n printf(\"-\"); //????????????????????????m????\n while(q->n==0&&q!=head->pup) //???????0???????????0\n q=q->pdown;\n while(q!=head)\n {\n printf(\"%d\",y*(q->n));\n q=q->pdown;\n }\n while(p!=NULL) //free?????\n {\n q=p;\n p=p->pup;\n free(q);\n }\n }\n else\n {\n p=head;\n while(p->pdown!=NULL) //?????????????????\n {\n p=p->pdown;\n if(p->n>=10&&p->pdown!=NULL)\n {\n (p->pdown->n)++;\n p->n=p->n-10;\n }\n if(p->n<0&&p->pdown!=NULL)\n {\n (p->pdown->n)--;\n p->n=p->n+10;\n }\n }\n if(p->n<0)\n {\n printf(\"-\");\n l=-1;\n }\n while(p->n==0&&p!=head->pdown) //???????0???????????0\n p=p->pup;\n while(p!=head) //??\n {\n printf(\"%d\",l*(p->n));\n p=p->pup;\n }\n while(q!=NULL) //free?????\n {\n p=q;\n q=q->pdown;\n free(p);\n }\n }\n}\n"} +{"label": "69", "index": "34102", "code": "int max(int a,int b)\n{\n if(a>=b)\n return a;\n else\n return b;\n}\nmain()\n{\n char a[300];\n char b[300];\n int c[300]={0};\n int d[300]={0};\n int p,u=0,v=0;\n int i,j,m,n,x=0,y=0;\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n m=strlen(a);\n n=strlen(b);\n for(i=0;i=0;i--)\n {\n c[x]=a[i]-'0';\n x++;\n }\n for(j=n-1;j>=0;j--)\n {\n d[y]=b[j]-'0';\n y++;\n }\n for(i=0;i=0;i--)\n {\n printf(\"%d\",c[i]);\n }\n }\n}\n"} +{"label": "69", "index": "34103", "code": "int main()\n{\n\tchar a[251],b[251];\n\tcin>>a>>b;\n\tint a1=strlen(a);\n\tint b1=strlen(b);\n\tint num1[251]={0},num2[251]={0},j=0,i;\n\tfor(i=a1-1;i>=0;i--)\n\t{\n\t\tnum1[j]=a[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=b1-1;i>=0;i--)\n\t\t{\n\t\t\tnum2[j]=b[i]-'0';\n\t\t\tj++;\n\t\t}\n\tj=0;\n\tint sum[251]={0};\n\tfor(i=0;i<251;i++)\n\t{\n\t\tsum[i]=(num1[i]+num2[i]+j)%10;\n\t\tj=(num1[i]+num2[i]+j)/10;\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(sum[i]!=0)\n\t\t\tbreak;\n\t}\n\tif(i==(-1))\n\t\tcout<<'0';\n\tfor(j=i;j>=0;j--)\n\t\tcout<=10){\n\t\t\tb[i]=1;\n\t\t\ta3[i]-=10;\n\t\t}\n\t}\n\telse{\n\t\ta3[i]=a1[i]+a2[i]+b[i-1];\n\t\tif(a3[i]>=10){\n\t\t\tb[i]=1;\n\t\t\ta3[i]-=10;\n\t\t}\n\t}\n}\n\nvoid main()\n{\n\tchar s1[MAX],s2[MAX];\n\tint a1[MAX-1]={0},a2[MAX-1]={0},b[MAX-1]={0},a3[MAX-1]={0},len1,len2,i,j;\n\n\tgets(s1);\n\tgets(s2);\n\tlen1=strlen(s1);\n\tfor(i=0;ilen2)?len1:len2;\n\tfor(i=0;i<=len1;i++){\n\t\tadd(a1,a2,b,a3,i);\n\t}\n\n\tfor(i=MAX-2;i>=0;i--){\n\t\tif(a3[i]!=0){\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(i==-1)\n\t\tputchar('0');\n\telse{\n\t\tfor(j=i;j>=0;j--)\n\t\t\tprintf(\"%d\",a3[j]);\n\t}\n\tprintf(\"\\n\");\n}"} +{"label": "69", "index": "34105", "code": "/*\n * temp.cpp\n *\n * Created on: 2011-5-8\n * Author: 10288\n */\nvoid add(char * a,char *b);\nint main()\n{\n\tchar a[301],b[301];\n\tcin >> a >> b;\n\tif(strcmp(a,\"0\")==0&&strcmp(b,\"0\")==0)\n\t\tcout << 0;\n\telse\n\t{\n\tif(strlen(a)>=strlen(b))\n\t\tadd(a,b);\n\telse\n\t\tadd(b,a);\n\t}\n\n}\nvoid add(char* a,char* b)\n{\n\tchar c[301];\n\tmemset(c,'0',sizeof(c));\n\tint d[301],f[301];\n\tint l1=strlen(a);\n\tint l2=strlen(b);\n\tint i,t,j;\n\tfor(i=l1-1;i>=0;i--)\n\t\td[l1-1-i]=a[i]-'0';\n\tfor(i=l2-1;i>=0;i--)\n\t\tf[l2-1-i]=b[i]-'0';\n\tfor(i=l2;i=0;i--)\n\t\tif(c[i]!='0')\n\t\t\tbreak;\n\tfor(j=i;j>=0;j--)\n\t\tcout << c[j];\n}\n"} +{"label": "69", "index": "34106", "code": "\nint main()\n{\n\tchar input_string1[251],input_string2[251];\n\tchar num1[252],num2[252];\n\tchar result[252];\n\tresult[251]='\\0';\n\tscanf(\"%s\",&input_string1);\n\tscanf(\"%s\",&input_string2);\n\tmemset(num1,'0',252);\n\tmemset(num2,'0',252);\n\tstrcpy(num1+(251-strlen(input_string1)),input_string1); \n\tstrcpy(num2+(251-strlen(input_string2)),input_string2);\n\tint i;\n\tint carry=0;\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif((num1[i]-'0')+(num2[i]-'0')+carry>=10)\n\t\t{\n\t\t\tresult[i]=(num1[i]-'0')+(num2[i]-'0')+carry-10+'0';\n\t\t\tcarry=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult[i]=(num1[i]-'0')+(num2[i]-'0')+carry+'0';\n\t\t\tcarry=0;\n\t\t}\n\n\t}\n\tfor(i=0;i<=249;i++)\n\t{\n\t\tif(result[i]!='0')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tprintf(\"%s\",result+i);\n\n\treturn 0;\n\t\n}"} +{"label": "69", "index": "34107", "code": "\n\n\nint main()\n{\n char s1[256],s2[256];\n scanf(\"%s %s\",s1,s2);\n int a,b,l1,l2,l=0;\n int c[256]={0};\n \n l1=strlen(s1);\n l2=strlen(s2);\n\n while (l1>0||l2>0)\n {\n a = (l1 > 0) ? s1[--l1] - '0' : 0;\n b = (l2 > 0) ? s2[--l2] - '0' : 0;\n \n c[l]+=a+b;\n c[l+1]+=c[l]/10;\n c[l++]=c[l]%10;\n }\n \n while (c[l]==0&&l>0)\n l--;\n for (int i=l; i>=0; i--)\n printf(\"%d\",c[i]);\n return 0;\n}\n"} +{"label": "69", "index": "34108", "code": "\nint lenA, lenB, maxLen;\nvoid change(char a[300], int len)//??????????\n{\n\tint q;\n\tfor(int i=0;i=maxLen-1)return 0; //??????????\n\t}\n\telse\n\t{\n\t\ts[x]=c[x]-'0'+d[x]-10;//????????\n\t\tc[x+1]++;\n\t\tif(x>=maxLen-1)\n\t\t{\n\t\t\ts[x+1]++;\n\t\t\tmaxLen++;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn add(c,d,x+1,s);\n}\nint main()\n{\n\tchar a[300];\n\tchar b[300];\n\tchar c[300];\n\tfor (int i = 0; i < 300; i++)\n\t\ta[i] = b[i] = c[i] = '0';\n\tcin>>a>>b;\n\tlenA = strlen(a);\n\tlenB = strlen(b);\n\tmaxLen = lenA > lenB ? lenA : lenB;\n\ta[lenA] = b[lenB] = '0';\n\tchange(a, lenA);\n\tchange(b, lenB);\n\tadd(a,b,0,c);\n\tfor(int i=maxLen-1;i>=0;i--)//?c????\n\t\t{\n\t\t\tif (i == maxLen - 1 && i != 0 && c[i] == '0')\n\t\t\t\tcontinue;\n\t\t\tcout<> tmp;\n\tint lena = strlen(tmp);\n\tfor (j = 0;j < lena;j++)\n\t{\n\t\tif (tmp[j] != '0')\n\t\t\tbreak;\n\t}\n\tfor (i = j;i < lena;i++)\n\t\ta[i-j] = tmp[lena - (i-j) - 1];\n\tcin >> tmp;\n\tlena -= j;\n\tint lenb = strlen(tmp);\n\tfor (j = 0;j < lenb;j++)\n\t\tif (tmp[j] != '0')\n\t\t\tbreak;\n\tfor (i = j;i < lenb;i++)\n\t\tb[i-j] = tmp[lenb - (i-j) - 1];\n\tlenb -= j;\n\n\n\tint c = 0;\n\tint len = lena > lenb ? lena : lenb;\n\tfor (i = 0;i < 260;i++)\n\t{\n\t\tif (a[i] - '0' + b[i] - '0' + c > 9)\n\t\t{\n\t\t\ta[i] = a[i] - '0' + b[i] - '0' + c - 10 + '0';\n\t\t\tc = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta[i] = a[i] - '0' + b[i] - '0' + c + '0';\n\t\t\tc = 0;\n\t\t}\n\t}\n\n\tif (lena == 0 && lenb == 0)\n\t\tcout << 0;\n\telse\n\t{\n\tif (a[len] > '0')\n\t\tcout << a[len];\n\tfor (i = len-1;i>= 0;i--)\n\t\tcout << a[i];\n\t}\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34110", "code": "int main()\n{\n\tchar A[250],B[250],C[250],D[250],E[250];\n\tint i,j,a,b,c;\n\tgets(A);\n\tgets(B);\n\ta=strlen(A);\n\tb=strlen(B);\n\tfor (i=a-1,j=0;i>=0;i--,j++)\n\t{\n\t\tC[j]=A[i];\n\t}\n\tC[j]=0;\n\tfor (i=b-1,j=0;i>=0;i--,j++)\n\t{\n\t\tD[j]=B[i];\n\t}\n\tD[j]=0;\n\tif (a>b)\n\t{\n\t\tfor (i=0;i57)\n\t\t\t{\n\t\t\t\tE[i]-=10;\n\t\t\t\tE[i+1]=1;\n\t\t\t}\n\t\t}\t\t\n\t\tfor (i=b;i57)\n\t\t\t{\tE[i]-=10;\n\t\t\tE[i+1]=1;\n\t\t\t}\n\t\t}\n\t\tif (E[i]==1)\n\t\t{\tE[i]=49;\n\t\tE[i+1]=0;\n\t\t}\n\t\telse E[i]=0;\n\t\tc=0;\n\t\tfor (i=strlen(E)-1;i>=0;i--)\n\t\t{\t\n\t\t\tif (E[i]!=48 )\n\t\t\t{\n\t\t\tprintf(\"%c\",E[i]);\n\t\t\tc=1;\n\t\t\t}\n\t\t\tif (E[i]==48 && c==1)\n\t\t\tprintf(\"%c\",E[i]);\n\t\t}\n\t\tif (c==0)\n\t\t\tprintf(\"0\");\n\t\tprintf(\"\\n\");\n\t}\n\telse \n\t{\n\t\tfor (i=0;i57)\n\t\t\t{\n\t\t\t\tE[i]-=10;\n\t\t\t\tE[i+1]=1;\n\t\t\t}\n\t\t}\n\t\tfor (i=a;i57)\n\t\t\t{\tE[i]-=10;\n\t\t\tE[i+1]=1;\n\t\t\t}\n\t\t}\n\t\tif (E[i]==1)\n\t\t{ E[i]=49;\n\t\tE[i+1]=0;\n\t\t}\n\t\telse E[i]=0;\n\t\tc=0;\n\t\tfor (i=strlen(E)-1;i>=0;i--)\n\t\t{\n\t\t\tif (E[i]!=48 )\n\t\t\t{\n\t\t\tprintf(\"%c\",E[i]);\n\t\t\tc=1;\n\t\t\t}\n\t\t\tif (E[i]==48 && c==1)\n\t\t\tprintf(\"%c\",E[i]);\n\t\t\t\n\t\t}\n\t\tif (c==0)\n\t\t\tprintf(\"0\");\n\t\tprintf(\"\\n\");\n\t}\n\n\n\treturn 0;\n}\n\n\n"} +{"label": "69", "index": "34111", "code": "int main()\n{\n char a[255],b[255],c[255];\n\tint i,d[255],k=0;\n\tgets(a);\n\tgets(b);\n\tfor(i=0;i<255;i++)\n\t\td[i]=0;\n\tif(strlen(a)>strlen(b))\n\t{\n\t\tstrcpy(c,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,c);\n\t}\n\tfor(i=strlen(a)-1;i>=0;i--)\n\t{\n d[strlen(a)-1-i]=((int)(a[i]+b[i-strlen(a)+strlen(b)]-'0'-'0')+k)%10;\n\t\t k=((int)(a[i]+b[i-strlen(a)+strlen(b)]-'0'-'0')+k)/10;\n\t}\n\tfor(i=strlen(b)-strlen(a)-1;i>=0;i--)\n\t{\n\t\td[strlen(b)-1-i]=((int)(b[i]-'0')+k)%10;\n\t\tk=((int)(b[i]-'0')+k)/10;\n\t}\n\td[strlen(b)]=k;\n\tk=0;\n\tfor(i=strlen(b);i>=0;i--)\n\t{\n\t\tif(d[i]!=0)\n\t\t\tbreak;\n k++;\n\t}\n\tfor(i=strlen(b)-k;i>=0;i--)\n\t\t\tprintf(\"%d\",d[i]);\n\tif(k==(strlen(b)+1))\n\t\tprintf(\"0\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34112", "code": "\nint main()\n{\n\tchar a[251]={'\\0'},b[251]={'\\0'},c,temp[251],add[252]={'\\0'};\n\tint i,j,k,la,lb;\n\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\n\tla=strlen(a);\n\tlb=strlen(b);\n\n\tadd[0]='0';\n\n\tif(la>lb)\n\t{\n\t\tk=la;\n\t\tla=lb;\n\t\tlb=k;\n\t\tstrcpy(temp,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,temp);\n\t}\n \n\n\tj=lb-1;\n i=la-1;\n\t\n\tfor(i=la-1;i>=0;i--)\n\t{\n\n\t\t\n\t\tc=a[i]+b[j]-48;\n\t\tif(c<='9')\n\t\t{\t\n\t\t\tadd[j+1]=add[j+1]+c;\n\n\t if(add[j+1]>'9')\n\t\t\t{add[j+1]=add[j+1]-10;\n \tif(j==0)\n add[j]='1';\n\t\t\telse\n\t\t\t\tadd[j]='1'-48;}}\n\n\t\n\t\telse\n\t\t{\n\t\t\tadd[j+1]=add[j+1]+c-10;\n\t\t\tif(j==0)\n add[j]='1';\n\t\t\telse\n\t\t\t\tadd[j]='1'-48;\n\t\t}\n\t\tj--;\n\t}\n\n\tk=j;\nif(lb>la)\n\tfor(j=k;j>=0;j--)\n\n\t{\tadd[j+1]=add[j+1]+b[j];\n\tif(add[j+1]>'9')\n\t{add[j+1]=add[j+1]-10;\n\tif(j==0)\n add[j]='1';\n\t\t\telse\n\t\t\t\tadd[j]='1'-48;}}\n\t\n\n\nfor(i=0;i>a>>b;\n\tint l1 = strlen(a);\n\tint l2 = strlen(b);\n\tif(l1=a)\n\t\t{\n\t\t\t*t3 = (*t1 + *t2 - '0' - '0' + carry) % 10 + '0' ;\n\t\t\tcarry =( *t1 + *t2 - '0' - '0' + carry)/10;\n\t\t\tt3--;\n\t\t\tt2--;\n\t\t\tt1--;\n\t\t}\n\t\twhile(t2>=b)\n\t\t{\n\t\t\t* t3 = (*t2 -'0' + carry)%10 + '0';\n\t\t\tcarry = (*t2 -'0' + carry)/10 ;\n\t\t\tt3--;\n\t\t\tt2--;\n\t\t}\n\t\t*t3 = carry +'0';\n\t\tif(*t3 == '0')\n\t\t\tt3++;\n\t\tcout<=b)\n\t\t{\n\t\t\t*t3 = (*t1 + *t2 - '0' - '0' + carry) % 10 + '0' ;\n\t\t\tcarry =( *t1 + *t2 - '0' - '0' + carry)/10;\n\t\t\tt3--;\n\t\t\tt2--;\n\t\t\tt1--;\n\t\t}\n\t\twhile(t1>=a)\n\t\t{\n\t\t\t* t3 = (*t1 -'0' + carry)%10 + '0';\n\t\t\tcarry = (*t1 -'0' + carry)/10 ;\n\t\t\tt3--;\n\t\t\tt1--;\n\t\t}\n\t\t*t3 = carry +'0';\n\t\twhile(*t3 == '0')\n\t\t\tt3++;\n\t\tif(*t3=='\\0')\n\t\t\tcout<<0<> plus1 >> plus2;\n\tfor(i = strlen(plus1) - 1; i >=0; i --)\n\t\tp1[strlen(plus1) - 1 - i] = plus1[i] - '0';\n\tfor(i = strlen(plus2) - 1; i >=0; i --)\n\t\tp2[strlen(plus2) - 1 - i] = plus2[i] - '0';\n\tfor(i = 0; i < SIZE + 5; i ++)\n\t{\n\t\tresult[i] = result[i] + p1[i] + p2[i];\n\t\tif(result[i] >= 10)\n\t\t{\n\t\t\tresult[i + 1] ++;\n\t\t\tresult[i] = result[i] - 10;\n\t\t}\n\t\tif(result[i])\n\t\t\tend = i;\n\t}\n\tif(end == -1)\n\t\tcout << 0 << endl;\n\telse\n\t\tfor(i = end; i >= 0; i --)\n\t\t\tcout << result[i];\n\treturn 0;\n}\n"} +{"label": "69", "index": "34115", "code": "\n\nint main()\n{\n\tint i,j,n,afirst,bfirst;\n\tchar a[max], b[max],c[max],A[max],B[max];\n\tfor(i=0;ibfirst)\n\t\tn=afirst;\n\telse\n\t\tn=bfirst;\n\tfor(i=afirst,j=0;i>=0;i--,j++)\n\t{\n\t\tA[n+1-j]=a[i];\n\t}\n\tfor(i=bfirst,j=0;i>=0;i--,j++)\n\t{\n\t\tB[n+1-j]=b[i];\n\t}\n\tfor(i=n+1;i>=1;i--)\n\t{\n\t\tc[i]+=A[i]+B[i]-'0'-'0';\n\t\tif(c[i]-'0'>=10)\n\t\t{\n\t\t\tc[i]-=10;\n\t\t c[i-1]++;\n\t\t}\n\t}\n\tfor (i=0;c[i]=='0'&&i<=n+1;i++);\n\tif(i==n+2)\n\t\tprintf(\"0\");\n\telse \n\t{\n\t\t\tfor(;i<=n+1;i++)\n\t\t{\n\t\t\tprintf(\"%c\",c[i]);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34116", "code": "int main()\n{\n\tint l1,l2,n,a[255]={0},b[255],k=0,f=0,i,j,x=0,y=0;\n\tchar s1[255],s2[255];\n\tscanf(\"%s%s\",s1,s2);\n\tl1=strlen(s1);\n\tl2=strlen(s2);\n\tfor(i=0;il2){\n\t\tfor(i=1;i<=l1;i++){\n\t\t\tif(l2-i>=0){\n\t\t\t\tb[l1-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])%10;\n\t\t\t\ta[l1-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])/10;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tb[l1-i]=(s1[l1-i]-48+a[l1-i])%10;\n\t\t\t\ta[l1-i-1]=(s1[l1-i]-48+a[l1-i])/10;\n\t\t\t}\n\t\t}\n\t\tif(a[0]!=0){\n\t\t\tprintf(\"%d\",a[0]);\n\t\t\tx=1;\n\t\t}\n\t\tfor(i=0;i=0){\n\t\t\t\tb[l1-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])%10;\n\t\t\t\ta[l1-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])/10;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tb[l1-i]=(s1[l1-i]-48+a[l1-i])%10;\n\t\t\t\ta[l1-i-1]=(s1[l1-i]-48+a[l1-i])/10;\n\t\t\t}\n\t\t}\n\t\tif(a[0]!=0){\n\t\t\tprintf(\"%d\",a[0]);\n\t\t\tx=1;\n\t\t}\n\t\tfor(i=0;i=0){\n\t\t\t\tb[l2-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l2-i])%10;\n\t\t\t\ta[l2-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l2-i])/10;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tb[l2-i]=(s2[l2-i]-48+a[l2-i])%10;\n\t\t\t\ta[l2-i-1]=(s2[l2-i]-48+a[l2-i])/10;\n\t\t\t}\n\t\t}\n\t\tif(a[0]!=0){\n\t\t\tprintf(\"%d\",a[0]);\n\t\t\tx=1;\n\t\t}\n\t\tfor(i=0;i=10)\n {\n a1[i]-=10;\n a1[i+1]++;\n }\n if(a1[i]>0)\n highest=i;\n }\n return highest;\n}\nint main()\n{\n int i=0, j=0;\n memset(an1, 0, sizeof(an1));\n memset(an2, 0, sizeof(an2));\n //scanf(\"%s\",sline1);\n //scanf(\"%s\",sline2);\n cin>>sline1>>sline2;\n int len1 = strlen(sline1);\n for(j=0, i = len1 - 1; i>=0; i--)\n {\n an1[j++] = sline1[i] - '0';\n }\n int len2 = strlen(sline2);\n for(j=0, i = len2 - 1; i>=0; i--)\n {\n an2[j++] = sline2[i] - '0';\n }\n int k = ADD(MAXLEN, an1, an2);\n for(i=k; i>=0; i--)\n {\n //printf(\"%d\",an1[i]);\n cout<> a;\n\tcin >> b;\n\tint la ,lb;\n\tla = strlen(a);\n\tlb = strlen(b);\n\tif(la > lb){\n\t\tstrcpy(c,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,c);\n\t}\n\tla = strlen(a);\n\tlb = strlen(b);\n\tfor(int i = 0 ; i < 300 ; i++)\n\t\tc[i] = 0;\n\tc[0] = '0';\n\tfor(int i = lb-1 ; i >= 0 ; i--){\n\t\tif(i >= lb - la){\n\t\t\tc[i+1] += b[i] + (a[i+la-lb] - '0');\t\t\t\n\t\t}\n\t\telse{\n\t\t\tc[i+1] += b[i];\n\t\t}\n\t\tif(c[i+1] >'9'){\n\t\t\tc[i+1] -= 10;\n\t\t\tc[i] += 1;\n\t\t}\n\t}\n\tint i = 0;\n\twhile(c[i] == '0')\n\t\ti++;\n\tif(i <= lb){\n\t\tfor(; i <= lb; i++)\n\t\t\tcout << c[i];\n\t}\n\telse\n\t\tcout <<0;\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34119", "code": "void main()\n{\n\tchar s1[250], s2[250];\n\tint a[250], b[250], c[250];\n\tint len1, len2, len, i;\n\t\n\tfor ( i = 0; i < 250; i++)\n\t{\n\t\ta[i] = 0;\n\t\tb[i] = 0;\n\t\tc[i] = 0;\n\t}\n\n\tscanf ( \"%s\", s1);\n\tscanf ( \"%s\", s2);\n\n\tlen1 = strlen (s1);\n\tlen2 = strlen (s2);\n\n\tif ( len1 < len2)\n\t\tlen = len2;\n\telse\n\t\tlen = len1;\n\n\tfor ( i = 0; i < len1; i++)\n\t{\n\t\ta[i] = s1[len1 - 1 - i] - '0';\n\t}\n\t\n\tfor ( i = 0; i < len2; i++)\n\t{\n\t\tb[i] = s2[len2 -1 -i] - '0';\n\t}\n\n\tfor ( i = 0; i < len; i++)\n\t{\n\t\ta[i] += b[i];\n\t\tif ( a[i] >= 10)\n\t\t{\n\t\t\ta[i+1]++;\n\t\t\ta[i] -= 10;\n\t\t}\n\t}\n\tif ( a[len] > 0)\n\t\tlen++;\n\n\twhile ( a[len - 1] == 0 && len >1)\n\t\tlen--;\n\n\n\tfor ( i = len; i > 0; i--)\n\t{\n\t\tprintf (\"%d\", a[i-1]);\n\t}\n}\n\n"} +{"label": "69", "index": "34120", "code": " /***********************************************************************\n \n ??:?????\n ??: ???????? \n ??:\n ?1????????????????????????????????????????????????????\n ?2???????????????????????????????????????\n ?3?????????? \n ????? 2012.03.09 ??? \n ***********************************************************************/\n\n\nstruct stu\n{\n int num;\n struct stu *next; \n};\nmain()\n{\n int i,j,n,y,q,m,t;\n n=1000; // ??printf(\"?????????????????\\n\"); scanf(\"%d \",&n)\n // printf(\"????????????????\\n\");\n struct stu *head,*head0,*p,*p1,*p2,*p0,*p3,*p4,*p5,*p6,*p7,*p8;\n char a[n],b[n];\n \n gets(a);\n i=strlen(a);\n gets(b);\n j=strlen(b);\n //i?j??????? a?b??? \n if(i>j){t=i;} \n else {t=j;} \n // ??????????????+1??????????e[t]??? ??????a?b???? \n t=t+1;\n int e[t];\n \n p1=p2=(struct stu*)malloc(LEN); //????p1??? ?p2????? \n p1->num=a[i-1]-'0';\n head=p1;\n p3=p4=(struct stu*)malloc(LEN); //????p3??? ?p4????? \n p3->num=b[j-1]-'0';\n head0=p3; \n i=i-1;j=j-1; //?while???? \n p=head; //????P?P0. \n p0=head0; \n \n //????????P5 \n int c1=0,c2; //C2????????C1??C2???C1???0 \n c2=p->num+p0->num;\n p5=p6=(struct stu*)malloc(LEN);//?????? \n y=c2+c1/10; //Y??????? \n p5->num=y%10; //???????????P5??? \n c1=c2; \n p7=p5; \n \n while(i>0||j>0) //????????????? \n { \n p2=p1;\n p1=(struct stu*)malloc(LEN);\n p1->num=(i>0)?a[--i]-'0':0; //??????0 \n p2->next=p1;\n \n p4=p3;\n p3=(struct stu*)malloc(LEN);\n p3->num=(j>0)?b[--j]-'0':0; //??????0 \n p4->next=p3;\n \n p0=p0->next; \n p=p->next; \n \n c2=p->num+p0->num; \n \n p6=p5;\n p5=(struct stu*)malloc(LEN);\n y=c2+y/10; //Y??????? \n p5->num=y%10; //???????????P5??? \n c1=c2;\n p6->next=p5;\n }\n p1->next=NULL; \n p3->next=NULL;\n p6=p5;\n p5=(struct stu*)malloc(LEN);\n p5->num=y/10; //??????? \n p6->next=p5; \n p5->next=NULL; \n \n \n //????????? \n p=head;\n p0=head0;\n p8=p7;\n for(m=t-1;p8!=NULL;m--)\n {\n e[m]=p8->num;\n p8=p8->next; \n }\n m=0;\n if(p5->num==0&&t==2) //?????????0? \n {m=1;} //?????0 \n else //?????????????0?\n {\n while(e[m]==0&&m=0;i--)a[i]=0;\n\tfor(i=250-blen;i>=0;i--)b[i]=0;\n\tfor(i=250;i>=0;i--){\n\t\tc[i+1]+=a[i]+b[i];\n\t\tif(c[i+1]>9){\n\t\t\tc[i+1]-=10;c[i]++;\n\t\t}\n\t}\t\n\twhile(i<252&&c[i]<=0)i++;if(i==252)printf(\"0\");\n\tfor(;i<252;i++)printf(\"%d\",c[i]);\n\treturn 0;\n}"} +{"label": "69", "index": "34122", "code": "int main()\n{\n int n,i,m,k,p,q;\n int c[251];\n char a[250],b[250],d;\n gets(a);\n p=strlen(a);\n if(p<250)\n {for(i=0;(d=a[i])!='\\0';i++)\n m=i+1;}\n else m=250;\n \n gets(b);\n q=strlen(b);\n if(q<250)\n {for(i=0;(d=b[i])!='\\0';i++)\n n=i+1;}\n else n=250;\n \n for(i=m-1;i>=0;i--)\n a[250-m+i]=a[i];\n for(i=n-1;i>=0;i--)\n b[250-n+i]=b[i];\n \n \n for(i=0;i<250-m;i++)\n a[i]=0;\n for(i=250-m;i<250;i++)\n a[i]=a[i]-48;\n \n for(i=0;i<250-n;i++)\n b[i]=0;\n for(i=250-n;i<250;i++)\n b[i]=b[i]-48;\n \n for(i=249;i>=1;i--)\n {if(a[i]+b[i]>9)\n {c[i+1]=a[i]+b[i]-10;\n a[i-1]=a[i-1]+1;}\n else c[i+1]=a[i]+b[i];}\n \n if(a[0]+b[0]>9)\n {c[1]=a[0]+b[0]-10;\n c[0]=1;}\n else \n {c[1]=a[0]+b[0];\n c[0]=0;}\n i=0;\n do\n {i=i+1;}\n while(c[i]==0);\n k=i;\n \n if(k<251)\n {for(i=k;i<251;i++)\n {c[i]=c[i]+48;\n printf(\"%c\",c[i]);}}\n else\n printf(\"0\");\n \n \n return 0;\n} "} +{"label": "69", "index": "34123", "code": "void add(char a[],char b[],int x1,int x2,char c[])\n{\n\tint i,j,k;\n\tfor(i=x1-1,j=x2-1;j>=0;i--,j--)\n\t{\n\t\tk=a[i]-48+b[j]-48;\n\t\tif(k+c[i+1]>9)\n\t\t{\n\t\t\tc[i+1]=c[i+1]+k-10;\n\t\t\tc[i]=c[i]+1;\n\t\t}\n else c[i+1]=c[i+1]+k;\n\t}\n\tfor(;i>=0;i--) \n\t{\n\t\tif(c[i+1]+a[i]-48<10)\n\t\tc[i+1]=c[i+1]+a[i]-48;\n\t\telse\n\t\t{\n\t\t\tc[i+1]=c[i+1]+a[i+1]-58;\n\t\t\tc[i]=c[i]+1;\n\t\t}\n\t}\n}\nvoid main()\n{\tint i,j=0,x1,x2,m;\n char a[250],b[250],c[251]={\"\\0\"};\n\tscanf(\"%s%s\",a,b);\n\tx1=strlen(a);\n\tx2=strlen(b);\n\tif(x1>=x2) m=x1;\n\telse m=x2;\n\tif(x1>=x2) add(a,b,x1,x2,c);\n\telse add(b,a,x2,x1,c);\n\tfor(i=0;i=10) \n { j=1;\n c[i]=c[i]-10;}\n else j=0; \n c[i]=c[i]+48;\n }\n int L=strlen(c),m=0;\n for(int i=L-1;;i--) /*?????0???*/\n {\n if(c[i]==48) m=m+1;\n else break;\n } \n if(c[0]==48&&L==1) printf(\"0\");\n for(int i=L-m-1;i>=0;i--)\n {\n printf(\"%c\",c[i]); \n }\n }\n"} +{"label": "69", "index": "34125", "code": "int main()\n{\n char a1[251],b1[251],a[251],b[251],str[252];\n int i,prime=0;\n cin>>a1>>b1;\n memset(a,'\\0',sizeof(a));\n memset(b,'\\0',sizeof(b));\n int l,l1=strlen(a1),l2=strlen(b1);\n if(l1==1 && a1[0]=='0' && l2==1 && b1[0]=='0') cout<<0;\n for(i=0;il2) l=l1;\n else l=l2;\n for(i=l1;i9) { t=t-10; prime=1; }\n \telse prime=0;\n \tstr[i]=(char)(t+'0');\n }\n if(prime) { str[i]='1'; l++; }\n for(i=l-1;i>=0;i--)\n \tcout<> a >> b;\n\tsum(a,b);\n\treturn 0;\n}\n\nvoid sum(char a[], char b[]){ //???????\n\tint length1=0, length2=0, i, count=0;\n\tint temp=0;\n\tchar c[250];\n\tlength1=strlen(a); //????????\n\tlength2=strlen(b);\n\tfor (i=0;;i++){\n\t\tif (i'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i>=length1&&i'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i=length2){\n\t\t\tc[i]=a[length1-i-1]+temp;\n\t\t\tif (c[i]>'9'){\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\ttemp=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttemp=0;\n\t\t\tcount++;\n\t\t}\n\t\telse if (i>=length1&&i>=length2)\n\t\t\tif (temp==1){\n\t\t\t\tc[i]=temp+'0';\n\t\t\t\tcount++;\n\t\t\t\ttemp=0;\n\t\t\t}\n\t\t\telse //???????\n\t\t\t\tbreak;\n\t}\n\tint flag=0;\n\tfor (i=count-1;i>=0;i--) //?????????????,??????\n\t\tif (c[i]=='0'&&i!=0&&flag==0)\n\t\t\tcontinue;\n\t\telse{\n\t\t\tcout << c[i];\n\t\t\tflag=1;\n\t\t}\n}\n"} +{"label": "69", "index": "34127", "code": "\n\nint main(void)\n{\n char numA[MAXN];\n char numB[MAXN];\n char ans[MAXN];\n char c;\n int maxLen;\n int i,aLen,bLen,cx,ax,j,flag;\n scanf(\"%s\",numA);\n scanf(\"%s\",numB);\n aLen = strlen(numA);\n bLen = strlen(numB);\n for(i=0;i != aLen/2; i++){\n c = numA[i];\n numA[i] = numA[aLen-1-i];\n numA[aLen-1-i] = c;\n }\n for(i=0;i != bLen/2; i++){\n c = numB[i];\n numB[i] = numB[bLen-1-i];\n numB[bLen-1-i] = c;\n }\n cx = 0;\n maxLen = aLen > bLen ? aLen : bLen;\n for(i=0;i != maxLen;i++){\n if(i < aLen && i < bLen){\n ax = (numA[i]-'0') + (numB[i]-'0') + cx;\n ans[i] = (ax%10) + '0';\n if(ax >= 10){\n cx = 1;\n }\n else{\n cx = 0;\n }\n }\n else if(i >= bLen){\n ax = (numA[i]-'0') + cx;\n ans[i] = (ax%10) + '0';\n if(ax >= 10){\n cx = 1;\n }\n else{\n cx = 0;\n }\n }\n else if(i >= aLen){\n ax = (numB[i]-'0') + cx;\n ans[i] = (ax%10) + '0';\n if(ax >= 10){\n cx = 1;\n }\n else{\n cx = 0;\n }\n }\n }\n if(cx != 0){\n ans[i++] = cx + '0';\n }\n flag=0;\n for(j = i-1;j >= 0;j--){\n if(ans[j]!='0'){\n flag=1;\n }\n if(flag==1){\n printf(\"%c\",ans[j]);\n }\n if(flag==0 && j==0){\n printf(\"0\");\n }\n }\n return 0;\n}\n"} +{"label": "69", "index": "34128", "code": "int main()\n{\n\tint a[250];\n\tint b[250];\n\tint c[251];\n\tchar d[251];\n\tchar e[251];\n\tint i,len1,len2,len;\n\tmemset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tmemset(c,0,sizeof(c));\n\tscanf(\"%s\",d);\n\tscanf(\"%s\",e);\n\tfor(i=0;;i++)\n\t\tif(d[i]=='\\0')\n\t\t\tbreak;\n\tlen1=i;\n\tfor(i=0;;i++)\n\t\tif(e[i]=='\\0')\n\t\t\tbreak;\n\tlen2=i;\n\tfor(i=0;ilen2)\n\t\tlen=len1;\n\telse\n\t\tlen=len2;\n\tfor(i=0;i9)\n\t\t{\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]%=10;\n\t\t}\n\t}\n for(i=len;i>=0;i--)\n\t\t {\n \t if(c[i])\n {\n\t\t printf(\"%d\",c[i]);\n break; \n }\n\t\t\t if(i==0)\n\t\t\t\t printf(\"0\");\n\t\t }\n\t\t\t \n\tfor(i--;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34129", "code": "char a[N+1]={0},b[N+1]={0};\nint c[N+1]={0},d[N+1]={0}; int e[N+2]={0};\nint x=0,f,k,sum;\nint main()\n{ \n int p=-1,q=-1;\n for(int i=1;;i++)\n {\n a[i]=cin.get();\n p++;\n if(a[i]=='\\n')\n break;\n }\n \n for(int i=1;;i++)\n {\n b[i]=cin.get();\n q++;\n if(b[i]=='\\n')\n break;\n }\n \n for(int i=1;i<=p;i++)\n {c[i]=a[p+1-i]-'0';\n }\n \n for(int i=1;i<=q;i++)\n {d[i]=b[q+1-i]-'0';\n } \n \n for(int i=1;i<=N;i++)\n {\n \n e[i]+=c[i]+d[i];\n e[i+1]+=e[i]/10;\n e[i]%=10;\n \n }\n for(int i=N;i>=1;i--)\n {sum+=e[i];}\n if(sum==0)\n cout<<0;\n else\n {\n for(int i=N;i>=1;i--)\n {\n if(e[i]!=0)\n {\n k=i;\n for(int j=k;j>=1;j--) \n cout<m1)\n m1=m2;\n for(i=0;i9)\n {\n a1[i]=a1[i]-10;\n a1[i+1]=a1[i+1]+1;\n }\n }\n int s=-1;\n for(i=m1;i>=0;i--)\n {if(a1[i]!=0)\n {s=i;\n break; }\n }\n if(s==-1)\n printf(\"0\");\n else\n { for(i=s;i>=0;i--)\n printf(\"%d\",a1[i]);\n } \n getchar();getchar();getchar();getchar();getchar();getchar();\n}"} +{"label": "69", "index": "34131", "code": "\nint shuru[1000000];\nint xiaoshuchangdu[10],changdu[10],zhengshuchangdu[10];\nint fuzhu; //????????????\nint wuaoshu; \nint a[10][1000000];\nint n=0;\n\nvoid clear (int k)\n{\n for (int i=0;i<=999999;i++)\n a[k][i]=0;\n xiaoshuchangdu[k]=0;\n changdu[k]=1;\n zhengshuchangdu[k]=1;\n}\n\nvoid xieru (int k)\n{\n fuzhu=0;\n for (int i=1;;i++)\n {\n shuru[i]=getchar ();\n if (shuru [i]==10)\n {\n changdu[k]=i-1;\n break;\n }\n if (shuru [i]==46)\n {\n fuzhu=1;\n xiaoshuchangdu[k]--;\n i--;\n }\n a[k][i]=shuru[i]-48;\n if (fuzhu==1)\n xiaoshuchangdu[k]++;\n }\n zhengshuchangdu[k]=changdu[k]-xiaoshuchangdu[k];\n}\n\n \nvoid shuchu (int m)\n{\n for (int i=1;i<=zhengshuchangdu[m];i++)\n cout <0)\n {\n cout <<\".\";\n for (int i=zhengshuchangdu[m]+1;i<=changdu[m];i++)\n cout <=1;i--)\n {\n a[m][i]=a[m][i]+(a[k][zhengshuchangdu[k]+i-fzheng]+a[l][zhengshuchangdu[l]+i-fzheng]);\n a[m][i-1]=a[m][i-1]+a[m][i]/10;\n a[m][i]=a[m][i]%10;\n }\n while (1)\n { \n if (a[m][1]!=0)\n break;\n if (fzheng+fxiao==1)\n break;\n for (int i=0;i<=fxiao+fzheng;i++)\n a[m][i]=a[m][i+1];\n fzheng=fzheng-1;\n }\n for (int i=fzheng+fxiao;i>=1;i--)\n {\n if (a[m][i]!=0)\n break;\n fxiao=fxiao-1;\n }\n zhengshuchangdu[m]=fzheng;\n xiaoshuchangdu[m]=fxiao;\n changdu[m]=fxiao+fzheng;\n}\n\nvoid jiandancheng (int n,int k,int m)\n{\n clear(m);\n int fzheng=zhengshuchangdu[k]+1;\n int fxiao=xiaoshuchangdu[k];\n for (int i=fxiao+fzheng;i>=1;i--)\n {\n a[m][i]=a[m][i]+a[k][zhengshuchangdu[k]+i-fzheng]*n;\n a[m][i-1]=a[m][i-1]+a[m][i]/10;\n a[m][i]=a[m][i]%10;\n }\n while (1)\n { \n if (a[m][1]!=0)\n break;\n if (fzheng+fxiao==1)\n break;\n for (int i=0;i<=fxiao+fzheng;i++)\n a[m][i]=a[m][i+1];\n fzheng=fzheng-1;\n }\n for (int i=fzheng+fxiao;i>=1;i--)\n {\n if (a[m][i]!=0)\n break;\n fxiao=fxiao-1;\n }\n zhengshuchangdu[m]=fzheng;\n xiaoshuchangdu[m]=fxiao;\n changdu[m]=fxiao+fzheng;\n}\n\nvoid chengfa (int k,int l,int m) //????? 8.9????? \n{\n int fxiao;\n int fzheng; \n clear(m);\n for (int i=1;i<=changdu[l];i++)\n {\n jiandancheng(a[l][i],k,9);\n jiafa(m,9,8);\n if (i==changdu[l])\n {\n jiandancheng(1,8,m);\n break;\n }\n jiandancheng(10,8,m);\n }\n fxiao=xiaoshuchangdu[k]+xiaoshuchangdu[l];\n fzheng=changdu[m]-fxiao;\n while (1)\n { \n if (a[m][1]!=0)\n break;\n if (fzheng+fxiao==1)\n break;\n for (int i=0;i<=fxiao+fzheng;i++)\n a[m][i]=a[m][i+1];\n fzheng=fzheng-1;\n }\n for (int i=fzheng+fxiao;i>=1;i--)\n {\n if (a[m][i]!=0)\n break;\n fxiao=fxiao-1;\n }\n zhengshuchangdu[m]=fzheng;\n xiaoshuchangdu[m]=fxiao;\n changdu[m]=fxiao+fzheng;\n}\n \nvoid chengfang (int k,int n,int m) //?????7,6?????\n{\n cout <>xa>>xb;\n\tla = strlen(xa);\n\tlb = strlen(xb);\n\tfor (int i = 0; i < la; i++)\n\t\ta[i] = xa[la - 1 - i] - '0';\n\tfor (int i = 0; i < lb; i++)\n\t\tb[i] = xb[lb - 1 - i] - '0';\n\tint m = la > lb ? la : lb;\n\tint x = 0;\n\tfor (int i = 0; i < m; i++)\n\t{\n\t\tint w = a[i] + b[i] + x;\n\t\tc[i] = w % 10;\n\t\tx = w / 10;\n\t}\n\tc[m] = x;\n\tint h;\n\tfor (h = 299; h >= 0; h--)\n\t\tif (c[h] != 0) break;\n\tif (h == -1)\n\t{\n\t\tcout << \"0\"<= 0; h--)\n\t\t\tcout<>n;\n//\tif (n == 0) break;\n//\tfor (int i = 0; i < n; i++)\n//\t{\n//\t\tcin>>tian[i];\n//\t}\n//\tfor (int i = 0; i < n; i++)\n//\t{\n//\t\tcin>>qi[i];\n//\t}\n//\tqsort(tian, n, sizeof(int), cmp);\n//\tqsort(qi, n, sizeof(int), cmp);\n//\tint t = 0, q = 0, s = 0;\n//\twhile (q < n)\n//\t{\n//\t\tint x;\n//\t\tfor (x = t; x < n; x++)\n//\t\t\tif (tian[x] > qi[q]) break;\n//\t\tif (x == n)\n//\t\t{\n//\t\t\tfor (x = t; x < n; x++)\n//\t\t\t\tif (tian[x] == qi[q]) break;\n//\t\t\tif (x == n)\n//\t\t\t{\n//\t\t\t\ts -= 200 * (n - q);\n//\t\t\t\tgoto end;\n//\t\t\t}\n//\t\t\telse\n//\t\t\t{\n//\t\t\t\tq++;\n//\t\t\t\tt = x + 1;\n//\t\t\t}\n//\t\t}\n//\t\telse\n//\t\t{\n//\t\t\ts += 200;\n//\t\t\tq++;\n//\t\t\tt = x + 1;\n//\t\t}\n//\t}\n//end:\n//\tcout<>num1>>num2;\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\n\tfor (i=len1-1,j=0;i>=0;i--)\n\t\ttemp1[j++]=num1[i]-'0';\n\tfor (i=len2-1,j=0;i>=0;i--)\n\t\ttemp2[j++]=num2[i]-'0';\n\n\tfor (i=0;i=10)\n\t\t{\n\t\t\tanswer[i+1]+=answer[i]/10;\n\t\t\tanswer[i]=answer[i]%10;\n\t\t}\n\t}\n\n\twhile(answer[i]==0)\n\t\ti--;\n\n\tfor (j=i;j>=0;j--)\n\t\tcout<len_2)?len_1:len_2;\n\tfor(i=len_1-1,k=0;i>=0;i--)\n\t\tnum_1[k++]=s1[i]-'0';\n\tfor(i=len_2-1,k=0;i>=0;i--)\n\t\tnum_2[k++]=s2[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tnum_1[i]=(num_1[i]+num_2[i])%10;\n\t\t\tnum_1[i+1]+=1;\n\t\t}\n\t\telse \n\t\t\tnum_1[i]=num_1[i]+num_2[i];\n\t}\n\tfor(i=len;i>=0;i--)\n\t{\n\t\tif(len==1&&num_1[0]==0){\n\t\t\tprintf(\"0\");\n\t\t\tbreak;\n\t\t}\n\t\telse if(state==0&&num_1[i]==0)\n\t\t\tcontinue;\n\t\tstate=1;\n\t\tprintf(\"%d\",num_1[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34135", "code": "\nint main()\n{\n\tchar a[300];\n\tchar b[300];\n\tint c[300]={0};\n\tcin>>a;\n\tcin>>b;\n\tint lena,lenb;\n\tlena=strlen(a);\n\tlenb=strlen(b);\n\tint i,k1,k2,k;\n\tk1=lena-1;\n\tk2=lenb-1;\n\tk=0;\n\tfor(i=299;i>=0;i--)\n\t{\n\t\tif(k1<0&&k2<0)\n\t\t\tbreak;\n\t\tif(k1>=0&&k2>=0)\n\t\t\tc[i]+=(a[k1]-'0')+(b[k2]-'0');\n\t\tif(k1>=0&&k2<0)\n\t\t\tc[i]+=a[k1]-'0';\n\t\tif(k1<0&&k2>=0)\n\t\t\tc[i]+=b[k2]-'0';\n\t\tif(c[i]>=10)\n\t\t{\n\t\t\tc[i]=c[i]%10;\n\t\t\tc[i-1]=1;\n\t\t}\n\t\tk1--;\n\t\tk2--;\n\t\t\n\t}\n\tk=-1;\n\tfor(i=0;i<300;i++)\n\t{\n\t\tif(c[i]!=0)\n\t\t{\n\t\t\tk=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(k==-1)\n\t\tcout<<'0'<= 0; j--)\n\t{\n\t\taa[i++] = a[j] - '0';\n\t}\n\tfor (i = 0, j = length2 - 1; j >= 0; j--)\n\t{\n\t\tbb[i++] = b[j] - '0';\n\t}\n\tif (aa[0] == 0 && bb[0] == 0)\n\t\tcout<<0<= 0; i--)\n\t\t{\n\t\t\tcout<= 10)\n\t\t{\n\t\t\ta1[i] -= 10;\n\t\t\ta1[i + 1] += 1;\n\t\t}\n\t\tif (a1[i] != 0)\n\t\t\td = i;\n\t}\n\treturn d;\n}"} +{"label": "69", "index": "34137", "code": "\nvoid rev(char *x);\nint val(char a);\n\nint main()\n{\n char a[260],b[260],sum[260];\n int i,tmp=0,sign=0;\n for (i=0;i<260;i++)\n {\n a[i]=0;\n } \n for (i=0;i<260;i++)\n {\n b[i]=0;\n } \n for (i=0;i<260;i++)\n {\n sum[i]=0;\n } \n gets(a);\n gets(b);\n rev(a);\n rev(b);\n for (i=0;i<=strlen(a) || i<=strlen (b);i++)\n {\n sum[i]=val(a[i])+val(b[i])+tmp+'0';\n if (sum[i]>'9')\n {\n sum[i]=sum[i]-10;\n tmp=1;\n } \n else tmp=0;\n } \n for (i=strlen(sum)-1;i>=0;i--)\n {\n if (i==0) sign=1;\n if (sum[i]!='0' || sign==1)\n {\n printf(\"%c\",sum[i]);\n sign=1;\n } \n } \n return 0;\n} \n\nvoid rev(char *x)\n{\n int i,tmp,l;\n l=strlen(x);\n for (i=0;i<=l/2-1;i++)\n {\n tmp=x[i];\n x[i]=x[l-i-1];\n x[l-i-1]=tmp;\n } \n} \n\nint val(char a)\n{\n if (a>'0' && a<='9') return a-48;\n else return 0;\n} \n\n"} +{"label": "69", "index": "34138", "code": "\nint main()\n{\n\tchar a[300],b[300],c[300];\n\tint lena,lenb,add=0;\n\tcin>>a>>b;\n\tlena=strlen(a)-1;\n\tlenb=strlen(b)-1;\n\tint cl=0;\n\tfor (;lena>=0&&lenb>=0;lena--,lenb--)\n\t{\n\t\tadd+=a[lena]+b[lenb]-2*'0';\n\t\tc[cl++]=add%10;\n\t\tadd/=10;\n\t}\n\twhile (lena>=0)\n\t{\n\t\tadd+=a[lena--]-'0';\n\t\tc[cl++]=add%10;\n\t\tadd/=10;\n\t}\n\twhile (lenb>=0)\n\t{\n\t\tadd+=b[lenb--]-'0';\n\t\tc[cl++]=add%10;\n\t\tadd/=10;\n\t}\n\tif (add!=0)\n\t{\n\t\tc[cl++]=add;\n\t}\n\tcl--;\n\twhile (cl>=0&&c[cl]==0)\n\t{\n\t\tcl--;\n\t}\n\tif (cl==-1)\n\t{\n\t\tprintf(\"0\");\n\t}\n\tfor (;cl>=0;cl--)\n\t{\n\t\tprintf(\"%c\",c[cl]+'0');\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34139", "code": "const int len=300;\nchar a[len],b[len];\nint an[len],bn[len];\n\nint main()\n{\n\tcin>>a>>b;\t\n\tmemset(an,0,sizeof(an));\n\tmemset(bn,0,sizeof(bn));\n\tint lena=strlen(a);\n\tint lenb=strlen(b);\n\tint i=0;\n\tint j=0;\n\tfor(i=lena-1;i>=0;i--)\n\t\tan[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=lenb-1;i>=0;i--)\n\t\tbn[j++]=b[i]-'0';\n\tfor(i=0;i<210;i++)\n\t{\n\t\tan[i]+=bn[i];\n\t\tif(an[i]>9)\n\t\t{\n\t\t\tan[i]-=10;\n\t\t\tan[i+1]++;\n\t\t}\n\t}\n\ti=len-3;\n\twhile(an[i]==0&&i>0)\n\t\ti--;\n\tif(i==0)\n\t\tcout<=0;i--)\n\t\t\tcout<=0;--i)\n\t\tA[strlen(a)-1-i]=a[i]-'0';\n\tfor(i=strlen(b)-1;i>=0;--i)\n\t\tB[strlen(b)-1-i]=b[i]-'0';\n\tfor(i=0;i<251;++i)\n\t{\n\t\tp=A[i]+B[i];\n\t\tif(p+c[i]>9)\n\t\t{\n\t\t\tc[i]=(p+c[i])%10;\n\t\t\tc[i+1]++;\n\t\t}\n\t\telse\n\t\t\tc[i]+=p;\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(c[i]!=0)\n\t\t\tbreak;\n\t}\n\tif(i!=-1)\n\t{\n\tfor(p=i;p>=0;p--)\n\t\tcout<> str1 >> str2;\n\tlen1 = strlen(str1);\n\tlen2 = strlen(str2);\n\tfor (i = 0; i < len1; i ++)\n\t{\n\t\tnum1[i] = str1[len1-i-1] - '0';\n//\t\tcout << num1[i];\n\t}\n//\tcout << endl;\n\tfor (i = 0; i < len2; i ++)\n\t{\n\t\tnum2[i] = str2[len2-i-1] - '0';\n//\t\tcout << num2[i];\n\t}\n//\tcout << endl;\n\tlen = (len1 > len2 ? len1 : len2);\n\tfor (i = 0; i < len; i ++)\n\t{\n\t\tnum1[i] += num2[i];\n\t\tif (num1[i] >= 10)\n\t\t{\n\t\t\tnum1[i] -= 10;\n\t\t\tnum1[i+1] ++;\n\t\t}\n//\t\tcout << num1[i] << \" \";\n\t}\n//\tcout << endl;\n\tfor (i = 259; i > 0; i --)\n\t{\n\t\tif (num1[i] != 0)\n\t\t\tbreak;\n\t}\n\tfor (; i >= 0; i --)\n\t\tcout << num1[i];\n\treturn 0;\n}\n"} +{"label": "69", "index": "34142", "code": "int main()\n{\n\tchar a[200], b[200];\n\tint at[200] = {0}, bt[200] = {0}, ans[201] = {0};\n\tint i, j, A, B, max = 0;\n\tcin.getline(a, 200);\n\tcin.getline(b, 200);\n\tA = strlen(a);\n\tB = strlen(b);\t\n\tfor (i = 0; i < A; i++)\n\t\tat[i] = a[A - i - 1] - '0';\n\tfor (i = 0; i < B; i++)\n\t\tbt[i] = b[B - i - 1] - '0';\n\tif (A > B)\n\t{\n\t\tmax = A;\n\t\tfor (i = B; i < A; i++)\n\t\t\tbt[i] = 0;\n\t}\n\telse if (B > A)\n\t\t{\n\t\t\tmax = B;\n\t\t\tfor (i = A; i < B; i++)\n\t\t\t\tat[i] = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmax = A;\n\t\t}\n\n\tfor (i = 0; i < max; i++)\n\t{\n\t\tans[i] = ans[i] + at[i] + bt[i];\n\t\tif (ans[i] >= 10)\n\t\t{\n\t\t\tans[i] = ans[i] - 10;\n\t\t\tans[i + 1]++;\n\t\t}\n\t}\n\tfor (i = max; i >= 0; i--)\n\t\tif (ans[i] > 0)\n\t\t\tbreak;\n\tif (i < 0)\n\t\tcout << '0' << endl;\n\tfor(j = i; j >= 0; j--)\n\t\tcout << ans[j];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34143", "code": "\n\n\nint main()\n{ void jiafa(char a[] ,char b[] ,int c[]);\n\tchar a[300],b[300];\n\tcin>>a>>b;\n\tint jieguo[300];\n\tmemset(jieguo,0,sizeof(jieguo));\n\tjiafa(a,b,jieguo);\n\tint i=296;\n\twhile(jieguo[i]==0&&i>0)\n\t\ti--;\n\tif(i==0)\n\t\tcout<=0;i--)\n\t\t\tcout<=0;i--)\n\t\tan[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=lenb-1;i>=0;i--)\n\t\tbn[j++]=b[i]-'0';\n\tfor(i=0;i9)\n\t\t{\n\t\t\tan[i]-=10;\n\t\t\tan[i+1]++;\n\t\t}\n\t\tc[i]=an[i];\n\t}\n}"} +{"label": "69", "index": "34144", "code": "\nchar a[270], b[270];\n\nint MAX(int e1, int e2)\n{\n\tif (e1 > e2) return e1;\n\treturn e2;\n}\n\nint main()\n{\n\tcin >> a >> b;\n\t\n\n\tchar c[270];\n\n\tint len1 = strlen(a), len2 =strlen(b);\n\tint len = MAX(len1, len2);\n\t\n\tint ic = 0, ia, ib;\n\tint j1 = len1-1, j2 = len2-1, j3 = len -1;\n\tc[len] = 0;\n\t\n\twhile (j1 >= 0 && j2 >= 0)\n\t{\n\t\tia = a[j1] - '0';\n\t\tib = b[j2] - '0';\n\t\tic += ia + ib;\n\t\tc[j3] = ic % 10 + '0';\n\t\tic /= 10;\n\t\tj1 --;\n\t\tj2 --;\n\t\tj3 --;\n\t}\n\tif (j2 > 0)\n\t{\n\t\twhile (j2 >= 0)\n\t\t{\n\t\t\t\tib = b[j2] - '0';\n\t\t\t\tic += ib;\n\t\t\t\tc[j3] = ic % 10 + '0';\n\t\t\t\tic /= 10;\n\t\t\t\tj2 --;\n\t\t\t\tj3 --;\n\t\t}\n\t}\n\tif (j1 > 0)\n\t{\n\t\twhile (j1 >= 0 && ic > 0)\n\t\t{\n\t\t\t\tia = a[j1] - '0';\n\t\t\t\tic += ia;\n\t\t\t\tc[j3] = ic % 10 + '0';\n\t\t\t\tic /= 10;\n\t\t\t\tj1 --;\n\t\t\t\tj3 --;\n\t\t}\n\t}\n\tif (ic > 0)\n\t{\n\t\tcout << ic << c;\n\t}\n\telse\n\t{\n\t\tint i;\n\t\tfor ( i = 0; i < strlen(c) - 1; i++)\n\t\t{\n\t\t\tif (c[i] == '0') continue;\n\t\t\telse break;\n\t\t}\n\t\twhile (i < strlen(c))\n\t\t{\n\t\t\tcout << c[i];\n\t\t\ti++;\n\t\t}\t\n\t}\n\treturn 0;\n\t\n}\n\n"} +{"label": "69", "index": "34145", "code": "int main()\n{\n long m,n,l1,l2,i,j,p,o,l; \n long long sum=0,k;\n char s1[500],s2[500];\n int a[500],b[500],c[1500];\n scanf(\"%s\",s1);\n scanf(\"%s\",s2);\n l1=strlen(s1);\n l2=strlen(s2);\n memset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n memset(c,0,sizeof(c));\n for (i=0;il2) l=l1;\n else l=l2; \n for (i=0;i=10)\n {\n c[i]=c[i]%10;\n c[i+1]++;\n }\n } \n \n while ((c[l]==0)&&(l>1)) l--;\n if (c[l]>0) l++;\n for (i=l-1;i>=0;i--)printf(\"%d\",c[i]); \n \n return 0;\n} \n"} +{"label": "69", "index": "34146", "code": "int main()\n{\n char a[300],b[300];\n unsigned int a1[300],b1[300];\n memset(a1, 0, sizeof(a1));\n memset(b1, 0,sizeof(b1));\n int i,j=0,k,l;\n cin.getline(a,300);\n cin.getline(b,300);\n int len1=strlen(a);\n int len2=strlen(b);\n for(i=len1-1;i>=0;i--)\n {\n a1[j]=a[i]-'0';\n j++;\n }\n j=0;\n for(i=len2-1;i>=0;i--)\n {\n b1[j]=b[i]-'0';\n j++;\n }\n for( i=0;i<259;i++)\n {\n a1[i]=a1[i]+b1[i];\n if(a1[i]>=10)\n {\n a1[i]=a1[i]-10;\n a1[i+1]++;\n }\n }\n j=290;\n while(a1[j]==0&&j>0) j--;\n for(;j>=0;j--)\n cout<>a;\n\tcin>>b;\n\tla=strlen(a);\n\tlb=strlen(b);\n memset(aa,0,sizeof(aa));\n memset(bb,0,sizeof(bb));\n\tfor (i=0;il) l=lb;\n\tmemset(c,0,sizeof(c));\n\tfor (i=0;i=10)\n\t{\n\t\tc[i]-=10;\n\t\tc[i+1]++;\n\t}\n\tif (c[l]>0) l++;\n\twhile ((c[l-1]==0)&&(l>1)) l--;\n\tfor (i=l-1;i>=0;i--)\n\tcout<=strlen(b))\n\t\tmax=strlen(a);\n\telse\n\t\tmax=strlen(b);\n\tfor(i=strlen(a)-1,j=0;i>=0;i--,j++)\n\t\ta1[j]=a[i]-'0';\n\tfor(i=strlen(b)-1,j=0;i>=0;i--,j++)\n\t\tb1[j]=b[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t}\n\t}\n\twhile(c[i]==0&&i>0)\n\t\ti--;\n\tfor(;i>=0;i--)\n\t\tcout< Lmax) Lmax=Ly; \nif (Ly < Lmin) Lmin=Ly; \nif (Lx < Lmax) \n{ \nfor (i=Lx-1;i>=0;i--) x[i+Lmax-Lx] = x[i]; \nfor (i=0;i<=Lmax -Lx-1;i++) x[i] = '0'; \nx[Lmax] = '\\0'; \n} \n\nif (Ly < Lmax) \n{ \nfor (i=Ly-1;i>=0;i--) y[i+Lmax-Ly] = y[i]; \nfor (i=0;i<= Lmax-Ly-1;i++) y[i] = '0'; \ny[Lmax] = '\\0'; \n} \nk = 0; \nfor (i=Lmax-1;i>=0;i--)\n{ \nz[i] = x[i] - '0' + y[i] + k; \nif (z[i] > '9') \n{ z[i] = z[i] - 10; k=1;} \nelse {k = 0;}; \n} \nif (k == 1) printf(\"1\"); \nfor (i=0;i=0;i--)\n\t{\n\t\ta[j++]=num1[i]-'0';\n\t}\n\tj=0;\n for(i=len2-1;i>=0;i--)\n\t{\n\t\tb[j++]=num2[i]-'0';\n\t}\n for(i=0;i<251;i++)\n\t{\n\t\tif(a[i]!=0 || b[i]!=0)break;\n\t\tif(i=250){cout<<\"0\";return 0;}\n\t}\n\t//for(i=0;i=10)\n\t\t{\n\t\t\td[i]=d[i]+a[i]+b[i]-10;\n\t\t\td[i+1]=1;\n\t\t}\n\t\telse{d[i]=d[i]+a[i]+b[i];}\n\t}\n\tfor(j=250;j>=0;j--)\n\t{\n\t\tif(d[j]!=0)break;\n\t}\n\tfor(i=j;i>=0;i--)\n\t{cout<0) c[step++]=t; //????\n\tfor(i=step-1;i>=0;i--) if(c[i]!=0 || i==0) break; //????0\n\tfor(;i>=0;i--) cout<>a;\n\tcin>>b;\n\ts1=0;\n\tfor(int i=0;a[i]!='\\0';i++) s1++;\n\tfor(int i=s1-1,j=0;i>-1;i--,j++)\n\t{\n\t\tm[j]=(int) ( a[i]-'0' );\n\t}\n\ts2=0;\n\tfor(int i=0;b[i]!='\\0';i++) s2++;\n\tfor(int i=s2-1,j=0;i>-1;i--,j++)\n\t{\n\t\tn[j]=(int) ( b[i]-'0' );\n\t}\n\tif(s1=10) \n\t\t\t{\n\t\t\t\tm[i]=m[i]-10;\n\t\t\t\tm[i+1]++;\n\t\t\t}\n\t}\n\ts2=0;\n\tint i=s1;\n while(m[i--]==0&&s2-1;i--) cout <=0;i--)\n\t\t{\n\t\tc[i]+=add;\n\t\tadd=c[i]/10;\n\t\tc[i]=c[i]%10;\t\n\t\t}\n\tint judge=0,judge1=0;\n\tif(add!=0)\n\t\t{\n\t\tprintf(\"%d\",add);\n\t\tjudge=1;\n\t\tjudge1=1;\t\n\t\t}\n\tfor(int i=0;i>up>>down;\n\n\tuplen=strlen(up);\n\tdownlen=strlen(down);\n\t\n\tint temp=strlen(up);\n\tfor(int i=0; i=10)\n\t\t{\n\t\t\tresult[i]%=10;\n\t\t\tresult[i+1]++;\n\t\t\n\t\t}\n\t}\n\n\n\tint start=0;\n\n\tfor(int i=290; i>=0; i--)\n\t{\n\t\n\t\tif(result[i]!=0)\n\t\t\tstart=1;\n\n\t\tif(start==1)\n\t\t{\n\t\t\tcout<> x >> y;\n\tif (x[0] == '0' && y[0] == '0' && strlen(x) == 1 && strlen(y) == 1)\n\t\tcout << 0;\n\tfor (i = 0; i < strlen(x) && i < strlen(y); i ++)\n\t{\n\t\tarray[i] = array[i] + x[strlen(x) - i - 1] + y[strlen(y) - i - 1] -2 * '0';\n\t\tif (array[i] > 9)\n\t\t{\n\t\t\tarray[i + 1] ++;\n\t\t\tarray[i] = array[i] - 10;\n\t\t}\n\t}\n\tif (strlen(x) >= strlen(y))\n\t\tfor (j = i; j < strlen(x); j ++)\n\t\t{\n\t\t\tarray[j] = array[j] + x[strlen(x)- j - 1] - '0';\n\t\t\tif (array[j] > 9)\n\t\t\t{\n\t\t\t\tarray[j + 1] ++;\n\t\t\t\tarray[j] = array[j] - 10;\n\t\t\t}\n\t\t}\n\telse\n for (j = i; j < strlen(y); j ++)\n\t\t{\n\t\t\tarray[j] = array[j] + y[strlen(y)- j - 1] - '0';\n\t\t\tif (array[j] > 9)\n\t\t\t{\n\t\t\t\tarray[j + 1] ++;\n\t\t\t\tarray[j] = array[j] - 10;\n\t\t\t}\n\t\t}\n\tfor (i = 250; array[i] == 0; i --){}\n\tfor (j = i; j >= 0; j --)\n\t\tcout << array[j];\n\tcout << endl;\n\treturn 0;\n}\n"} +{"label": "69", "index": "34156", "code": "int main()\n{\n char a[250],b[250];\n gets(a);gets(b);\n int c[300]={0};\n int l1,l2,max;\n int flag=0;\n l1=strlen(a);\n l2=strlen(b);\n if (l1>l2) max=l1;\n else max=l2;\n int i;\n for(i=0;i=l2)\n {\n c[i+1]+=(c[i]+a[l1-1-i]-'0')/10;\n c[i]=(c[i]+a[l1-1-i]-'0')%10;\n }\n else if(i=l1)\n {\n c[i+1]+=(c[i]+b[l2-1-i]-'0')/10;\n c[i]=(c[i]+b[l2-1-i]-'0')%10;\n }\n }\n for(i=max;i>=0;i--)\n {\n if(i==0&&flag==0)\n printf(\"%d\",c[i]);\n if(c[i]==0&&flag==0)\n continue;\n printf(\"%d\",c[i]);\n flag=1;\n }\n return 0;\n}"} +{"label": "69", "index": "34157", "code": "\nmain()\n{\n char X[260],Y[260],Z[260],P[260],K[260],O[260];\n scanf(\"%s %s\",K,O);\n int m,n,s;\n m=strlen(K);\n n=strlen(O);\n int v,d;\n v=0;\n d=0;\n for(int i=0;in) \n {\n int i;int p;\n p=0;\n \n for(i=0;i'9')\n {\n p=1;\n Z[i]=X[m-i-1]+Y[n-i-1]-'0'-10;\n }\n else\n {\n p=0;\n Z[i]=X[m-i-1]+Y[n-i-1]-'0';\n }\n}\n else \n {\n if(X[m-i-1]>'9')\n {\n p=1;\n Z[i]=X[m-i-1]-10;\n \n }\n else\n {\n p=0;\n Z[i]=X[m-i-1];\n }\n }\n }\n \n if(X[0]=='9'+1) s=m+1;\n \n else s=m;\n int t;\n for(t=0;tm) \n {\n int i;int p;\n p=0;\n \n for(i=0;i'9')\n {\n p=1;\n Z[i]=Y[n-i-1]+X[m-i-1]-'0'-10;\n }\n else\n {\n p=0;\n Z[i]=X[m-i-1]+Y[n-i-1]-'0';\n }\n}\n else \n {\n if(Y[n-i-1]>'9')\n {\n p=1;\n Z[i]=Y[n-i-1]-10;\n \n }\n else\n {\n p=0;\n Z[i]=Y[n-i-1];\n }\n }\n }\n \n if(Y[0]=='9'+1) s=n+1;\n \n else s=n;\n int t;\n for(t=0;t'9')\n {\n p=1;\n Z[i]=Y[n-i-1]+X[m-i-1]-'0'-10;\n }\n else\n {\n p=0;\n Z[i]=X[m-i-1]+Y[n-i-1]-'0';\n }\n}\n else \n {\n if(Y[n-i-1]>'9')\n {\n p=1;\n Z[i]=Y[n-i-1]-10;\n \n }\n else\n {\n p=0;\n Z[i]=Y[n-i-1];\n }\n }\n }\n \n if(X[0]+Y[0]>='9'+1+'0') s=m+1;\n else s=m;\n ;\n int t;\n for(t=0;t='9'+1+'0') \n {\n P[0]='1';P[1]=X[0]+Y[0]-'0'-10;\n }\n else P[0]=X[0]+Y[0]-'0';\n P[s]='\\0';\n printf(\"%s\",P\n ); \n \n }\n }\n\n }\n\n"} +{"label": "69", "index": "34158", "code": "int main()\n{\n\tchar a[300],b[300],c[300],x;\n\tint n1,n2,m,i,t=-1,z=0;\n\tscanf(\"%s%s\",a,b);\n\tn1=strlen(a);\n\tn2=strlen(b);\n\tif(n1<=n2)\n\t{\n\t\tm=n2;\n\t for(i=1;i<=n1;i++)\n\t\t{\n\t\t\tx=a[n1-i]+b[n2-i]-48+z;\n\t\t\tif(x>57)\n\t\t\t{\n\t\t\t\tc[m-i]=x-10;\n\t\t\t\tz=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[m-i]=x;\n\t\t\t\tz=0;\n\t\t\t}\n\t\t}\n\t\tfor(i=n1+1;i<=n2;i++)\n\t\t{\n\t\t\tx=b[n2-i]+z;\n\t\t\tif(x>57)\n\t\t\t{\n\t\t\t\tc[m-i]=x-10;\n\t\t\t\tz=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[m-i]=x;\n\t\t\t\tz=0;\n\t\t\t}\n\t\t}\n c[m]='\\0';\n\t}\n\telse \n {\n\t\tm=n1;\n\t for(i=1;i<=n2;i++)\n\t\t{\n\t\t\tx=a[n1-i]+b[n2-i]-48+z;\n\t\t\tif(x>57)\n\t\t\t{\n\t\t\t\tc[m-i]=x-10;\n\t\t\t\tz=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[m-i]=x;\n\t\t\t\tz=0;\n\t\t\t}\n\t\t}\n\t\tfor(i=n2+1;i<=n1;i++)\n\t\t{\n\t\t\tx=a[n1-i]+z;\n\t\t\tif(x>57)\n\t\t\t{\n\t\t\t\tc[m-i]=x-10;\n\t\t\t\tz=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[m-i]=x;\n\t\t\t\tz=0;\n\t\t\t}\n\t\t}\n c[m]='\\0';\n\t}\n\t\n\tif(z==1)\n\t{\n\t\tprintf(\"1\");\n\t printf(\"%s\\n\",c);\n\t}\n\telse \n\t{\n\t\tfor(i=0;i>str1>>str2; \n int x=strlen(str1),y=strlen(str2);\n int maxlen=x>y?x:y;\n int ans1[405],ans2[405],i,j=0;\n memset(ans1,0,sizeof(ans1));\n memset(ans2,0,sizeof(ans2));\n for (i=x-1;i>=0;i--)\n ans1[j++]=str1[i]-'0';\n j=0;\n for (i=y-1;i>=0;i--)\n ans2[j++]=str2[i]-'0';\n for (i=0;i=10){\n ans1[i]-=10;\n ans1[i+1]++;}\n }\n i=maxlen;\n while(ans1[i]==0) i--;\n if (i<0)\n cout<<0;\n else{\n for (;i>=0;i--)\n cout<0)\n\t\ta1[251-na+i]=a[i]-'0';\n\twhile(b[++i]!=0&&i<255)\n\t\t;\n\tnb=i;\n\twhile(i-->0)\n\t\tb1[251-nb+i]=b[i]-'0';\n\tfor(i=250;i>0;i--)\n\t{\n\t\tc1[i]+=a1[i]+b1[i];\n\t\tif(c1[i]>9)\n\t\t{\n\t\t\tc1[i-1]=c1[i]/10;\n\t\t\tc1[i]=c1[i]%10;\n\t\t}\n\t}\n\tfor(i=0;c1[i]==0&&i<255;i++)\n\t\t;\n\tif(i==255)\n\t\tcout<<\"0\";\n\tfor(;i<251;i++)\n\t\tcout<=0;i--)\n c[strlen(a)-1-i]=a[i]-'0';\n for(i=strlen(b)-1;i>=0;i--)\n d[strlen(b)-1-i]=b[i]-'0';\n int big,sma;\n big=strlen(a)>=strlen(b)?strlen(a):strlen(b);\n sma=strlen(a)<=strlen(b)?strlen(a):strlen(b);\n e[0]=(c[0]+d[0]);\n for(i=1;i<=big-1;i++)\n if(i<=sma-1)\n e[i]=(c[i]+d[i]+e[i-1]/10);\n else\n {\n if(strlen(a)>=strlen(b))\n e[i]=(c[i]+e[i-1]/10);\n else\n e[i]=(d[i]+e[i-1]/10);\n }\n if(e[big-1]!=0||big==1)\n printf(\"%d\",e[big-1]);\n for(i=big-2;i>=0;i--)\n printf(\"%d\",e[i]%10);\n}\n"} +{"label": "69", "index": "34162", "code": "\nint main()\n{\n\tchar s1[256],s2[256];\n\tscanf(\"%s %s\",&s1,&s2);\n\tint l1=strlen(s1),l2=strlen(s2);\n\tint a,b,c[256]={0},l=0;\n\twhile(l1>0||l2>0)\n\t{\n\t\ta=(l1>0)?(s1[l1-1]-'0'):0;\n\t\tb=(l2>0)?(s2[l2-1]-'0'):0;\n\t\tc[l]+=a+b;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l]%=10;\n\t\tl1--;\n\t\tl2--;\n\t\tl++;\n\t}\n\twhile(c[l]==0&&l>0)\n\t{\n\t\tl--;\n\t}\n\tint i;\n\tfor(i=l;i>=0;i--)\n\t{\n\t\tprintf(\"%d\",c[i]);\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34163", "code": "void plus(char* a,char* b,char* c)\n{\n\tchar temp;\n\tint lena,lenb,i,j,k;\n\tlena=strlen(a);\n lenb=strlen(b);\t\n\tfor(i=0;i'9')\n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t}\n\t}\n\tif(lena>lenb)\n\t{\n\t\tfor(i=lenb;i'9')\n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t}}\n\t}\n\telse if(lena'9')\n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t}}\n\t}\n\tc[i]+='0';\n\twhile(c[i]=='0'&&i>0)\n\ti--;\n c[i+1]='\\0';\n\tfor(j=0,k=i;j>str1>>str2;\n\tif((atoi(str1)==0)&&(atoi(str2)==0))\n\t{\n\t\tcout<<0;\n\t\treturn 0;\n\t}\n\tint l1,l2;\n\tl1=strlen(str1);\n\tl2=strlen(str2);\n\tint num1[1000];\n\tmemset(num1,0,sizeof(num1));\n\tint num2[1000];\n\tmemset(num2,0,sizeof(num2));\n\tint i;\n for(i=0;i=l2)\n { l=l1;\n \t for(i=0;i=10)\n \t{\n \t num[i+1]=num[i+1]+num[i]/10;\n \t num[i]=num[i]%10;\n }\n }\n int p=0;\n for(i=0;i<=l;i++)\n { \n if(num[l-i]>0)\n p=1;\n if(p>0)\n cout< 0 )\n\t{\n\t\td = i - j;\n\t\tfor ( k = i ; k\t>= i - j ; k-- )\n\t\t{\n\t\t\tb[k] = b[k-d];\n\t\t}\n\t\tfor ( k = 0 ; k < i - j ; k++ )\n\t\t{\n\t\t\tb[k] = '0';\n\t\t}\n\t}\n\telse\n\t{\n\t\td = j - i;\n\t\tfor ( k = j ; k\t>= j - i ; k-- )\n\t\t{\n\t\t\ta[k] = a[k-d];\n\t\t}\n\t\tfor ( k = 0 ; k < j - i ; k++ )\n\t\t{\n\t\t\ta[k] = '0';\n\t\t}\n\t}\n\tint max;\n\tif ( i > j )\n\t{\n\t\tmax = i;\n\t}\n\telse\n\t{\n\t\tmax = j;\n\t}\n\tchar c[251];\n\tc[max+1] = '\\0';\n\tc[0] = '0';\n\tfor ( k = max - 1 ; k >= 0 ; k-- )\n\t{\n\t\tc[k+1] = a[k] + b[k] - 48;\n\t\tif ( c[k+1] > '9' )\n\t\t{\n\t\t\tc[k+1] -= 10;\n\t\t\tif ( k != 0 )\n\t\t\t{\n\t\t\t\ta[k-1] += 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[0] = '1';\n\t\t\t}\n\t\t}\n\t}\n\t//printf(\"%s\\n\",c);\n\tint count = 0;\n\tfor ( k = 0 ; k <= max ; k++ )\n\t{\n\t\tif ( c[k] != '0' && count == 0 )\n\t\t{\n\t\t\tprintf(\"%c\",c[k]);\n\t\t\tcount++;\n\t\t\tcontinue;\n\t\t}\n\t\tif ( count != 0 )\n\t\t{\n\t\t\tprintf(\"%c\",c[k]);\n\t\t}\n\t\t//printf(\"%d\\n\",k);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34166", "code": "main()\n{\n char a[250]={'0'},b[250]={'0'};\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n int la,lb,l,c[251]={0},x=0,sum;\n la=strlen(a);\n lb=strlen(b);\n l=la;\n if(la>lb)\n { \n for(int i=0;i<=lb;i++)\n {\n b[la-i]=b[lb-i];\n }\n for(int i=0;i0;i--)\n {\n sum=a[i-1]+b[i-1]-'0'-'0'+x;\n c[i]=sum%10;\n x=sum/10; \n }\n c[0]=x;\n for(int i=0;ipup=NULL;\n head->pdown=NULL;\n return head;\n}\nmain()\n{\n char a;\n int x=1,y=1,z=1; //?x,y,z??????\n struct integer *p1,*p2,*p3,*head;\n head=p1=p2=(struct integer *)malloc(sizeof(struct integer));\n p1=NULL;\n creat(head);\n scanf(\"%c\",&a);\n while(0<=(a-'0')&&(a-'0')<=9||a=='-')\n {\n p3=(struct integer *)malloc(sizeof(struct integer));\n if(a=='-')\n {\n x=-1; //???????\n scanf(\"%c\",&a);\n continue;\n }\n else\n {\n p3->n=x*(a-'0'); //????????????\n p3->pdown=p1;\n p3->pup=head; //???????????????\n if(p1!=NULL)\n p1->pup=p3;\n head->pdown=p3;\n p1=p3;\n scanf(\"%c\",&a);\n }\n }\n p1=NULL;\n scanf(\"%c\",&a); //??????\n while(0<=(a-'0')&&(a-'0')<=9||a=='-')\n {\n p3=(struct integer *)malloc(sizeof(struct integer));\n if(a=='-')\n {\n y=-1;\n scanf(\"%c\",&a);\n continue;\n }\n else\n {\n p3->n=y*(a-'0');\n p3->pup=p1;\n p3->pdown=head;\n head->pup=p3;\n if(p1!=NULL)\n p1->pdown=p3;\n p1=p3;\n scanf(\"%c\",&a);\n }\n }\n p1=p2=head;\n while(p1->pdown!=NULL&&p2->pup!=NULL) //????????\n {\n p1=p1->pdown;\n p2=p2->pup;\n p1->n=p1->n+p2->n;\n p2->n=p1->n; //?????????????\n }\n if(p1->pdown==NULL&&p2->pup!=NULL) //???????????????????????????\n {\n p2=head->pup;\n while(p2->pup!=NULL)\n {\n if(p2->n>9) //??\n {\n p2->pup->n++;\n p2->n=p2->n%10;\n }\n if(p2->n<0) //??\n {\n p2->pup->n--;\n p2->n=p2->n+10;\n }\n p2=p2->pup;\n }\n if(y<0)\n printf(\"-\"); //????????????????????????y????\n while(p2->n==0&&p2!=head->pup) //???????0???????????0\n p2=p2->pdown;\n while(p2!=head)\n {\n printf(\"%d\",y*(p2->n));\n p2=p2->pdown;\n }\n while(p1!=NULL) //free?????\n {\n p2=p1;\n p1=p1->pup;\n free(p2);\n }\n }\n else\n {\n p1=head;\n while(p1->pdown!=NULL) //?????????????????\n {\n p1=p1->pdown;\n if(p1->n>=10&&p1->pdown!=NULL)\n {\n (p1->pdown->n)++;\n p1->n=p1->n-10;\n }\n if(p1->n<0&&p1->pdown!=NULL)\n {\n (p1->pdown->n)--;\n p1->n=p1->n+10;\n }\n }\n if(p1->n<0)\n {\n printf(\"-\");\n z=-1;\n }\n while(p1->n==0&&p1!=head->pdown) //???????0???????????0\n p1=p1->pup;\n while(p1!=head) //??\n {\n printf(\"%d\",z*(p1->n));\n p1=p1->pup;\n }\n while(p2!=NULL) //free?????\n {\n p1=p2;\n p2=p2->pdown;\n free(p1);\n }\n }\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\ngetchar();\n}\n"} +{"label": "69", "index": "34168", "code": "int main(int argc, char* argv[])\n{\n\tchar s1[256],s2[256];\n\tint c[256]={0};\n\tint a,b,i,l1,l2,l=0;\n\tscanf(\"%s%s\",s1,s2);\n\tl1=(int)strlen(s1);\n l2=(int)strlen(s2);\n while(l1>0||l2>0){\n\t\ta=(l1>0)?s1[--l1]-'0':0;\n b=(l2>0)?s2[--l2]-'0':0;\n\t\tc[l]+=a+b;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l++]%=10;\n\t}\n\twhile(c[l]==0&&l>0)\n\t\tl--;\n\tfor(i=l;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n\treturn 0;\n\t}"} +{"label": "69", "index": "34169", "code": "int trans(char x)\n{\n\t\n\tint y;\n\tint s[10]={'0','1','2','3','4','5','6','7','8','9'};\n\tint i;\n\tfor(i=0;i<10;i++)\n\t{\n\t\tif(x==s[i])\n\t\t{ \n\t\t\ty=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn y;\n}\nint main () \n{\n\tchar a[250],b[250];\n\tint c[250],d[250],e[250],f[250];\n\tgets(a);\n\tgets(b);\n\tint na,nb;\n\tna=strlen(a);\n\tnb=strlen(b);\n\tint n;\n\tif(na>nb)\n\t\tn=na;\n\telse\n\t\tn=nb;\n\tint i,j;\n\tfor(i=0;i<250;i++)\n\t{\n\t\tc[i]=0;\n\t\td[i]=0;\n\t\te[i]=0;\n\t\tf[i]=0;\n\t}\n\tfor(i=n,j=na-1;j>=0;i--,j--)\n\t{ \n\t\tc[i]=trans(a[j]);\n\t}\n\tfor(i=n,j=nb-1;j>=0;i--,j--)\n\t{ \n\t\t\n\t\td[i]=trans(b[j]);\n\t}\n\tfor(i=n;i>=0;i--)\n\t{\n\t\tif(i==n)\n\t\t{\n\t\t\tif(c[i]+d[i]<10)\n\t\t\t\te[i]=c[i]+d[i];\n\t\t\telse\n\t\t\t{\n\t\t\t\te[i]=c[i]+d[i]-10;\n\t\t\t\tf[i]=1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t\tif(c[i]+d[i]+f[i+1]<10)\n\t\t\t\te[i]=c[i]+d[i]+f[i+1];\n\t\t\t else\n\t\t\t\t{\n\t\t\t\t\te[i]=c[i]+d[i]+f[i+1]-10;\n\t\t\t\t\tf[i]=1;\n\t\t\t\t}\n\t\n\t\t}\n\t}\n\tint tmp=0;\n\tfor(i=0;i<=n;i++)\n\t{\n\t\tif(e[i]!=0)\n\t\t{\n\t\t\ttmp=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tint m;\n\tfor(i=0;i<=n;i++)\n\t{\n\t\tif(e[i]!=0)\n\t\t{\n\t\t\tm=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t\n\tif(tmp==1)\n\t{\n for(i=m;i<=n;i++)\n\t\t{\n\t\t\tprintf(\"%d\",e[i]);\n\t\t\n\t\t}\n\t}\n\telse\n\t\tprintf(\"0\");\n\n\n\treturn 0;\n\t\t\t\n\n}\n\n\t\n\t\n\t\t\t\n\t\n\n\n\n\t"} +{"label": "69", "index": "34170", "code": "int main()\n{\n char a[250],b[250],sum[250];\n int k,l,m,i,flag=0;\n for(i=0;i<250;i++)\n a[i]=b[i]=sum[i]='0';\n scanf(\"%s %s\",a,b);\n k=strlen(a);\n l=strlen(b);\n m=l>k? l:k;\n for(i=1;i<=m;i++)\n {\n sum[m-i]=a[k-i]-'1'+1+b[l-i]-'1'+1+flag;\n flag=0;\n if(sum[m-i]>9)\n {\n sum[m-i]-=10;\n flag=1;\n }\n sum[m-i]+='1'-1;\n }\n if(flag==1) printf(\"1\");\n sum[m]='\\0';\n if(flag!=1)\n {\n for(;sum[0]=='0';)\n for(i=0;il2)?l1:l2;\n for(i=0;i=10){\n a[i]=a[i]-10;\n a[i+1]++;\n }\n }\n for(i=l;i>=0;i--){\n if(a[i]==0) k++;\n else break;\n }\n if(k=0;i--){\n printf(\"%d\",a[i]);\n }\n }\n else{\n for(i=l;i>=0;i--){\n if(a[i]!=0) o=1;\n }\n if(o==0) printf(\"0\");\n }\n \n \n scanf(\"%d\",&i);\n return 0;\n }\n"} +{"label": "69", "index": "34172", "code": "main()\n{\n int a,b,c,m,n,i,j,r;\n char x[1000];\n char y[1000];\n gets(x);\n gets(y);\n i=strlen(x);\n j=strlen(y);\n i--;\n j--;\n r=i>j?i:j;\n for(a=0;a<=i+1;a++)\n {\n x[r+1-a]=x[i+1-a];\n y[r+1-a]=y[j+1-a];\n }\n for(a=0;a<=r-i-1;a++)\n x[a]='0';\n for(a=0;a<=r-j-1;a++)\n y[a]='0';\n int z[1000]={0};\n m=0;\n for(a=r;a>=0;a--)\n {\n n=(x[a]-'0')+(y[a]-'0')+m;\n z[a]=n%10;\n m=n/10;\n }\n if(m==0)\n {\n for(a=0;a<=r;a++)\n {\n if(z[a]!=0)\n break;\n else;\n }\n if(a==r+1)\n printf(\"0\");\n else;\n {\n for(b=a;b<=r;b++)\n printf(\"%d\",z[b]);\n }\n }\n else\n {\n printf(\"%d\",m);\n for(a=0;a<=r;a++)\n printf(\"%d\",z[a]);\n }\n}"} +{"label": "69", "index": "34173", "code": "//0507\n//#include \n//#include \n//#include \nconst int MAX = 250;\nchar c1[MAX]={0};\nchar c2[MAX]={0};\n//int a1[MAX]={0};\nint a2[MAX]={0};\nint re[MAX]={0};\nint main()\n{\n\tmemset(a2,0,sizeof(a2));\n\tmemset(re,0,sizeof(re));\n\tcin>>c1>>c2;\n\t//if(strcmp(c1,\"0\")==0&&c2=='0')\n\tint l1=strlen(c1); int l2=strlen(c2);\n\tint i,j;\n\tfor(i=0;i=l2)\n\t\tl=l1;\n\telse\n\t\tl=l2;\n\tfor(i=0;i<=l;i++)\n\t{\n\t\tre[i]=re[i]+a2[i];\n\t\twhile(re[i]>=10)\n\t\t{\n\t\t\tre[i]-=10;\n\t\t\tre[i+1]+=1;\n\t\t}\n\t}\n\ti=201;\n\twhile(re[i]==0&&i>-1)\n\t\ti--;\n\tif(i==-1)\n\t\tcout<<0;\n\tfor(j=i;j>=0;j--)\n\t\tcout<> a >> b;\n\tfor ( i=strlen(a)-1, j=strlen(b)-1; i >= 0 && j >= 0; i--, j-- )\n\t{\n\t\ts[c] += a[i]-'0'+b[j]-'0';\n\t\tif ( s[c]>9 )\n\t\t{\n\t\t\ts[c] -= 10;\n\t\t\ts[c+1]++;\n\t\t}\n\t\tc++;\n\t}\n\tif ( i == -1 )\n\t{\n\t\tfor ( ; j >= 0; j-- )\n\t\t{\n\t\t\ts[c] += b[j]-'0';\n\t\t\tif ( s[c]>9 )\n\t\t\t{\n\t\t\t\ts[c] -= 10;\n\t\t\t\ts[c+1]++;\n\t\t\t}\n\t\t\tc++;\n\t\t}\n\n\t}\n\telse\n\t{\n\t\tfor ( ; i >= 0; i-- )\n\t\t{\n\t\t\ts[c] += a[i]-'0';\n\t\t\tif ( s[c]>9 )\n\t\t\t{\n\t\t\t\ts[c] -= 10;\n\t\t\t\ts[c+1]++;\n\t\t\t}\n\t\t\tc++;\n\t\t}\n\n\t}\n\tfor ( i=250; i >= 0; i-- )\n\t\tif ( s[i] == 0 && p == 0 )\n\t\t\tcontinue;\n\t\telse\n\t\t{\n\t\t\tp=1;\n\t\t\tcout << s[i];\n\t\t}\n\tif ( p == 0 )\n\t\tcout << \"0\";\n\treturn 0;\n}"} +{"label": "69", "index": "34176", "code": "void main(){\n\tint a[350],b[350],c[351];\n\tchar s1[300],s2[300];\n\tint i,j,k,u,N,s;\n\n\n\t\tscanf(\"%s%s\",s1,s2);\n\t\tj=0;\n\t\twhile(s1[j]!='\\0'){\n\t\t\ta[j]=s1[j]-'0';\n\t\t\tj++;\n\t\t}\n\t\tk=0;\n\t\twhile(s2[k]!='\\0'){\n\t\t\tb[k]=s2[k]-'0';\n\t\t\tk++;\n\t\t}\n\n\t\tu=0;\n\t\ts=0;//s????\n\t\twhile((j>0)&&(k>0)){\n\t\t\tc[u]=a[j-1]+b[k-1]+s;\n\t\t\ts=c[u]/10;\n\t\t\tc[u]=c[u]%10;\n\t\t\tj--;k--;u++;\n\t\t}\n/*????while?????????j>k?a????????????????*/\n\t\twhile(j>0){\n\t\t\tc[u]=a[j-1]+s;\n\t\t\ts=c[u]/10;\n\t\t\tc[u]=c[u]%10;\n\t\t\tj--;u++;\n\t\t}\n\t\twhile(k>0){\n\t\t\tc[u]=b[k-1]+s;\n\t\t\ts=c[u]/10;\n\t\t\tc[u]=c[u]%10;\n\t\t\tk--;u++;\n\t\t}\n\t\tif(s==1){//????????\n\t\t\tc[u]=s;\n\t\t\tu++;\n\t\t}\nwhile(u>1&&c[u-1]==0)\nu--;\n\t\twhile(u>0){\n\t\t\t\tprintf(\"%d\", c[u-1]);\n\t\t\tu--;\n\t\t}\n\t\tprintf(\"\\n\");\n\n}\n"} +{"label": "69", "index": "34177", "code": "int main()\n{\n\tint a1[Max+10]={0};\n int a2[Max+10]={0};\n char s1[Max+10];\n char s2[Max+10];\n\tint i,j,e,f;\n\tint L1,L2;\n\tscanf(\"%s\",s1);\n\tscanf(\"%s\",s2);\n\tL1=strlen(s1);\n\tL2=strlen(s2);\n\tj=0;\n\tif(L1==1&&L2==1)\n\t{\n\t\te=s1[0]-'0';\n\t\tf=s2[0]-'0';\n\t\tprintf(\"%d\",e+f);\n\n\t}\n\telse\n\t{\n\tfor(i=L1-1;i>=0;i--)\n\t\ta1[j++]=s1[i]-'0';\n\tj=0;\n\tfor(i=L2-1;i>=0;i--)\n\t\ta2[j++]=s2[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\ta1[i]-=10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\t\n\tfor(i=Max;i>=0;i--)\n\t{\n\t\tif(a1[i]!=0)\n\t\t{\n\t\t\tj=i;\n break;\n\t\t}\n\t}\n\tfor(i=j;i>=0;i--)\n\t\tprintf(\"%d\",a1[i]);\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34178", "code": "\nint main()\n{\n\tint a[300]={0};\n\tint i,len;\n\tint b[300]={0};\n\tint ans[300]={0};\n\tchar z[300];\n\tscanf(\"%s\",z);\n\tlen=strlen(z);\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tans[i+1]=ans[i+1]+(ans[i]/10);\n\t\t\tans[i]=ans[i]%10;\n\t\t}\n\t}\n\tint mid=0;\n\tfor(i=299;i>-1;i--)\n\t{\n\t\tif(ans[i]!=0)\n\t\t{\n\t\t\tmid=1;\n\t\t}\n\t\tif(mid==1)\n\t\t{\n\t\t\tprintf(\"%d\",ans[i]);\n\t\t}\n\t}\n\tif(mid==0)\n\t{\n\t\tprintf(\"0\");\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34179", "code": "int i,j;\nint len1,len2;\nvoid f(char a[255],char b[255]){//???????\n\tint c[255];//???????\n\tif(len1>len2){//???????\n\t\tfor(i=0;i<=len2-1;i++){\n\t\t\tc[i]=a[len1-1-i]+b[len2-1-i]-'0' -'0';//?????\n\t\t\tif(c[i]>=10){//??????\n\t\t\t\tc[i]-=10;\n\t\t\t\ta[len1-i-2]+=1;}//??\n\t\t\t}\n\t\tfor(i=len2;i<=len1-2;i++){\n\t\t\tc[i]=a[len1-i-1]-'0';\n\t\tif(c[i]>=10){//??? ????\n\t\t\tc[i]-=10;\n\t\t\ta[len1-i-2]+=1;}\n\t\t}\n\t\tc[len1-1]=a[0]-'0';//?????\n\t\tif(c[len1-1]>=10){\n\t\t\tc[len1-1]-=10;\n\t\t\tc[len1]=1;\n\t\t\tj=len1;}//????\n\t\telse j=len1-1;\n\t\tint x=0,y=0;//???????\n\t\tfor(i=j;i>=0;i--){//????\n\t\t\tif(c[i]==0&&x==0) continue;//????0\n\t\t\telse{\n\t\t\tcout << c[i];\n\t\t\tx=1;y=1;}}\n\t\tif(y==0)cout <<\"0\"<=10){\n\t\t\t\t\t\t\tc[i]-=10;\n\t\t\t\t\t\t\ta[len1-i-2]+=1;}\n\t\t}\n\t\tc[len1-1]=a[0]+b[0]-'0'-'0';\n\t\tif(c[len1-1]>10) {c[len1]=1;c[len1-1]-=10;j=len1;}\n\t\telse j=len1-1;\n\t\tint x=0,y=0;\n\t\tfor(i=j;i>=0;i--){\n\t\t\tif(c[i]==0&&x==0) continue;\n\t\t\telse{\n\t\t\tcout << c[i];\n\t\t\tx=1;y=1;}}\n\t\tif(y==0)cout <<\"0\"<> a >> b;//??\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\tif(len1>=len2)//????????????\n\tf(a,b);\n\telse{//???????\n\t\tint y;\n\t\ty=len1;len1=len2;len2=y;\n\t\tf(b,a);\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34180", "code": "int an1[MAX_LEN+10];\nint an2[MAX_LEN+10];\nchar szLine1[MAX_LEN+10];\nchar szLine2[MAX_LEN+10];\nint Add(int nMaxLen , int * an1, int * an2)\n//?????? nMaxLen ???? an1?an2 ???????an1, \n//an1[0],an2[0]?????\n{\n\tint nHighestPos = 0;\n\tfor(int i = 0;i < nMaxLen; i ++ ) {\t\n\t\tan1[i] += an2[i];\t\t//????\n\t\tif( an1[i] >= 10 ) {\t\t//??????\t\n\t\t\tan1[i] -= 10;\n\t\t\tan1[i+1] ++;\t\t\t//??\n\t\t}\n\t\tif( an1[i] )\n\t\t\tnHighestPos = i; //????????\n\t}\n\treturn nHighestPos;\n}\nint main() {\n\tscanf(\"%s\", szLine1); scanf(\"%s\", szLine2);\n\tint i, j;\n\t//???memeset???an1???sizeof(an1)??????0\n\t//sizeof(an1)????an1???\n\t//memset???string.h???\n\tmemset( an1, 0, sizeof(an1));\t\n\tmemset( an2, 0, sizeof(an2));\n\t//???szLine1???????????????an1???\n\t//an1[0]?????\n\tint nLen1 = strlen( szLine1);\n\tfor(j =0, i = nLen1 - 1;i >= 0 ; i --)\n\t\tan1[j++] = szLine1[i] - '0';\t\n\tint nLen2 = strlen(szLine2);\n\tfor(j=0, i = nLen2 - 1;i >= 0 ; i --)\n\t\tan2[j++] = szLine2[i] - '0';\n\tint nHighestPos = Add(MAX_LEN,an1,an2);\t\n\tfor( i = nHighestPos; i >= 0; i -- ) printf(\"%d\", an1[i]);\n\treturn 0;\n}"} +{"label": "69", "index": "34181", "code": "char a[252], b[252];\nint an[252], bn[252], rn[252];\nchar res[252], temp[252];\nint lenA, lenB, len;\nvoid change()\n{\n\tint i;\n\tfor(i = 0; i < lenA; i ++)\n\t{\n\t\tan[i] = a[lenA - i - 1] - '0';\n\t//\tcout << an[i];\n\t}\n//\tcout << endl;\n\tfor(i = 0; i < lenB; i ++)\n\t{\n\t\tbn[i] = b[lenB - i - 1] - '0';\n\t//\tcout << bn[i];\n\t}\n\t//cout << endl;\n\tif(lenA > lenB)\n\t{\n\t\tlen = lenA;\n\t\tfor(i = lenB; i < lenA; i ++)\n\t\t\tbn[i] = 0;\n\t}\n\telse if(lenB > lenA)\n\t{\n\t\tlen = lenB;\n\t\tfor(i = lenA; i < lenB; i ++)\n\t\t\tan[i] = 0;\n\t}\n\telse len = lenB;\n//\tcout <<\"len: \" << len << endl;\n}\nvoid addAB()\n{\n\tint i;\n\t\n\tfor(i = 0; i < len; i ++)\n\t{\n\t\trn[i] += an[i] + bn[i];\n\t\tif(rn[i] > 9)\n\t\t{\n\t\t\trn[i] = rn[i] - 10;\n\t\t\trn[i + 1] ++;\n\t\t}\n\t}\n//\tcout << \"len: \" << i << \": \" << rn[i] << endl;\n//\t\tcout << len << endl;\n\tif(rn[i] == 1)\n\t\tlen ++;\n//\tcout << len << endl;\n\t\n\tfor(i = 0; i < len; i ++)\n\t{\n\t\ttemp[i] = rn[len - i - 1] + '0';\n//\t\tcout << temp[i];\n\t}\n//\tcout << endl;\n\tint begin = 1;\n//\tcout << \"temp[0]: \" << temp[0] << endl;\n//\tif(temp[0] == 0)\n//\t\tbegin = 1;\n//\tcout << \"begin: \" << begin << endl;\n\twhile(temp[begin] == 0)\n\t{\n\t\tbegin ++;\n\t}\n\tif(len == 1) begin = 0;\n\tif(temp[0] != '0') begin = 0;\n//\t\tcout << \"len: \" << len << endl;\n//\tcout << \"begin: \" << begin << endl;\n\tfor(i = 0; i < len - begin; i ++)\n\t\tres[i] = temp[i + begin];\n}\n\nint main()\n{\n\t\n\t\n\tcin.getline(a, 252);\n\tcin.getline(b, 252);\n\tlenA = strlen(a);\n\tlenB = strlen(b);\n\tmemset(rn, 0, sizeof(rn));\n\tchange();\n\taddAB();\n\tcout << res << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34182", "code": "\nint change(char *str,int *a){//??????????\n\tint len=strlen(str);//????????\n\tfor(int i=0;i0){//???????????????????\n\t\tk--;\n\t}\n\tfor(int i=k;i>=0;i--)//???????????\n\t\tcout<<*(a+i);\n}\nint jiafa(int *a,int alen, int *b, int blen,int *c){//????\n\tint len = ( alen > blen ) ? alen : blen;//?a?b??????????len\n\tfor(int i=0;i=10){//??\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]=c[i]%10;\n\t\t}\n\treturn c[len]? (len+1):len;//??len+1???????????????len?????\n}\n\nint main(){\n\tchar n1[251],n2[251];\n\tint a[251],b[251],c[251],alen,blen,clen;\n\tcin.getline(n1,251);//?????\n\tcin.getline(n2,251);\n\talen=change(n1,a);\n\tblen=change(n2,b);\n\t//??\n\tclen=jiafa(a,alen,b,blen,c);//?????????\n\tprintnum(c,clen);//????\n\treturn 0;\n}"} +{"label": "69", "index": "34183", "code": "\nvoid main()\n{\n\tint a[252]={0},b[251]={0};\n\tchar c[250],d[250];\n\tint temp;\n\tscanf(\"%s\",c);\n\tint i,j,m;\n\tfor(i=strlen(c)-1,j=0;i>=0;i--,j++)\n\t{\n\t\ta[j]=c[i]-'0';\n\t}\n\tscanf(\"%s\",d);\n for( i=strlen(d)-1,j=0;i>=0;i--,j++)\n\t{\n\t\tb[j]=d[i]-'0';\n\t}\n\tfor( m=0;m<=250;m++)\n\t{\n\t\ttemp=a[m]+b[m];\n\t\ta[m]=temp%10;\n\t\ta[m+1]=a[m+1]+temp/10;\n\t}\n\tfor( m=251;m>=1;m--)\n\t{\n\t\tif (a[m]!=0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (m;m>=0;m--)\n\t{\n\t\tprintf(\"%d\",a[m]);\n\t}\n}\n"} +{"label": "69", "index": "34184", "code": "int main()\n{\n\tchar s1[251],s2[251];\n\tint a1[251]={0},a2[251]={0},len1,len2,len,t[251]={0},i;\n\tscanf(\"%s%s\",s1,s2);\n\tlen1=strlen(s1);\n\tlen2=strlen(s2);\n\tif(len1>len2)len=len1;\n\telse len=len2;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tt[i]-=10;\n\t\t\tt[i+1]++;\n\t\t}\n\t}\n\tif(t[len]!=0)len++;\n\tfor(i=len-1;i>0;i--)\n\t{\n\t\tif(t[i]==0)len--;\n\t\telse break;\n\t}\n\tfor(i=len-1;i>=0;i--)\n\tprintf(\"%d\",t[i]);\n\treturn 0;\n}\n\t\t\n"} +{"label": "69", "index": "34185", "code": "int f(char x)\n{\n int xx=x-'0';\n\treturn xx;\n}\nint num1(int x,int y)\n{\n if((x+y)>9)\n return x+y-10;\n else return x+y;\n}\nint num10(int x,int y)\n{\n if((x+y)>9)\n return 1;\n else return 0;\n}\nint max(int x,int y)\n{\n if(x>y)return x;\n else return y;\n}\nint main()\n{\n char a[251],b[251],c[251];\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n int la=strlen(a),lb=strlen(b);\n int mx=max(la,lb);\n int i,j,k,p=0;\n for(i=la-1,j=lb-1,k=0;k=0&&j>=0)\n {\n c[k]=num1(f(a[i]),f(b[j])+p);\n p=num10(f(a[i]),f(b[j])+p);\n }\n else if(i>=0&&j<0)\n {\n c[k]=num1(f(a[i]),p);\n p=num10(f(a[i]),p);\n }\n else \n {\n c[k]=num1(f(b[j]),p);\n p=num10(f(b[j]),p);\n }\n }\n int frag=0;\n if(p==0)\n for(i=mx-1;i>=0;i--)\n {\n if(c[i]>0)frag=1;\n if(frag==1)\n printf(\"%d\",c[i]);\n else if(i==0)printf(\"0\");\n }\n else \n {\n c[mx]=1;\n for(i=mx;i>=0;i--)printf(\"%d\",c[i]);\n }\n \n return 0;\n} "} +{"label": "69", "index": "34186", "code": "int main()\n{\n\tchar a[500], b[500];\n\tcin >> a >> b;\n\tint length1 =0, length2 = 0, c = 0, i = 0, flag1 = 1;\n\tlength1 = strlen(a);\n\tlength2 = strlen(b);\n\tint a1[501], b1[501];\n\tint result[501];\n\tmemset(a1,0,sizeof(a1));\n\tmemset(b1,0,sizeof(b1));\n\tmemset(result,0,sizeof(result));\n\tfor(i = 0; i <= length1 - 1; i++)\n\t{\n\t\ta1[length1 - 1 - i] = a[i] - '0';\n\t}\n\tfor(i = 0; i <= length2 - 1; i++)\n\t{\n\t\tb1[length2 - 1 - i] = b[i] - '0';\n\t}\n\tfor(i = 0; i <= 500; i++)\n\t{\n\t\tresult[i] = a1[i] + b1[i] + result[i];\n\t\tif(result[i] >= 10)\n\t\t{\n\t\t\tresult[i+1] = result[i] / 10 + result[i+1];\n\t\t\tresult[i] = result[i] % 10;\n\t\t}\n\t}\n\tfor(i = 500; i >= 0; i--)\n\t{\n\t\tif(result[i] != 0)\n\t\t{\n\t\t\tflag1 = 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tc = i;\n\tif(flag1 == 0)\n\t{\n\t\tfor(i = c; i >= 0; i--)\n\t\t{\n\t\t\tcout << result[i];\n\t\t}\n\t\tcout << endl;\n\t}\n\tif(flag1 == 1)\n\t{\n\t\tcout << 0 << endl;\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34187", "code": "//2981?????\n// sst 2012.8.8 \nint main()\n{\n char str1[MAX_LEN+10],str2[MAX_LEN+10];\n int an1[MAX_LEN+10],an2[MAX_LEN+10]; \n int i,j; \n gets(str1);\n gets(str2);\n memset(an1,0,sizeof(an1));\n memset(an2,0,sizeof(an2));\n int Lenth1=strlen(str1);\n for(j=0,i=Lenth1-1;i>=0;i--,j++)\n an1[j]=str1[i]-'0';\n int Lenth2=strlen(str2); \n for(j=0,i=Lenth2-1;i>=0;i--,j++)\n an2[j]=str2[i]-'0';\n int Highestpos=0; \n for(int i=0;i=10)\n {\n an1[i]=an1[i]-10;\n an1[i+1]=an1[i+1]+1;\n }\n if(an1[i]) \n Highestpos=i;\n }\n for(i=Highestpos;i>=0;i--)\n cout<=b)\n z=a;\n else\n z=b;\n return(z);\n}\nint main()\n{\n int max(int a,int b);\n int i,n,x=0;\n char str1[252],str2[252],str3[252],str4[252];char s[252];\n scanf(\"%s\",str3);\n scanf(\"%s\",str4);\n for(i=0;i'9')\n {\n s[i]=s[i]-10;\n s[i+1]='1';\n }\n }\n for(i=max(strlen(str3),strlen(str4))+1;i>=0;i--)\n {\n if(s[i]!='0')\n {\n for(i=i;i>=0;i--)\n printf(\"%c\",s[i]);\n x++;\n }\n }\n if(x==0)\n printf(\"%d\",x);\n\n return 0;\n}"} +{"label": "69", "index": "34189", "code": " char a[252];\n\tchar b[252];\n\tvoid sum(int n)\n\t{\n\t\tint flag=0;\n\t\tint j=n-1;\n\t\tchar c[252];\n\t\tchar tem='0';\n\t\twhile(j>=0)\n\t\t{\n\t\t\tc[j+1]=(a[j]+b[j]-48-48+(tem-48))%10+48;\n\t\t\ttem=48+((a[j]+b[j]-48-48+(tem-48))/10);\n\t\t\tj--;\n\n\t\t}\n\t\tif(tem=='0')\n\t\t\tfor(int i=1;i<=n;i++)\n\t\t\t\t{if(c[i]!='0'||flag!=0)\n\t\t\t\t{cout<lb)\n\t{\n\t\tfor(int i=la-1;i>=la-lb;i--)\n\t\t\tb[i]=b[i-la+lb];\n\t\tfor(int i=0;i=lb-la;i--)\n\t\t\t\t\ta[i]=a[i-lb+la];\n\t\t\t\tfor(int i=0;i=0;i--)\n\t\tb1[strlen(a1)-i]=a1[i]-'0';\n\tfor(i=strlen(a2)-1;i>=0;i--)\n\t\tb2[strlen(a2)-i]=a2[i]-'0';\n\tfor(i=1;i<300;i++)\n\t{\n\t\tb1[i]=b1[i]+b2[i];\n\t\tif(b1[i]>9)\n\t\t{\n\t\t\tb1[i]=b1[i]-10;\n\t\t\tb1[i+1]=b1[i+1]+1;\n\t\t}\n\t}\n\tfor(i=299;i>=1;i--)\n\t{\n\t\tif(b1[i]!=0)\n\t\t{\n\t\t\tj=i;\n\t\t break;\n\t\t}\n\t\tif(i==1)\n\t\t{\n\t\t\tcout<<'0';\n\t\t return 0;\n\t\t}\n\t}\n\tfor(i=j;i>=1;i--)\n\t\tcout<len2?len1-1:len2-1;\n\tfor(i=k;i>=0;i--)\n\t{\n\t\tif(k==len1-1)\n\t\t{\n\t\tif(i-(k-len2+1)>=0)\n\t\t a[i]=(s1[i-(k-len1+1)]-48)+(s2[i-(k-len2+1)]-48);\n\t\telse a[i]=s1[i-(k-len1+1)]-48;\n\t\t}\n\t else\n\t {\n\t\tif(i-(k-len1+1)>=0)\n\t\t a[i]=(s1[i-(k-len1+1)]-48)+(s2[i-(k-len2+1)]-48);\n\t\telse a[i]=s2[i-(k-len2+1)]-48;\n\t }\n\t}\n\tfor(i=k;i>=1;i--)\n\t\tif(a[i]>=10){a[i-1]+=a[i]/10;a[i]=a[i]%10;}\n\tfor(i=0;i<=k;i++)\n\t\tif(a[i]!=0) {r=i; break;}\n\n for(i=r;i<=k;i++) \n\tprintf(\"%d\",a[i]);\n\tprintf(\"\\n\");\n\n}"} +{"label": "69", "index": "34192", "code": "main()\n{\nchar *p;\nint a,b,c,i,k=0;\nstatic char x[252];\nstatic char y[252];\nstatic char z[252];\ngets(x);\ngets(y);\na=strlen(x);\nb=strlen(y); \nfor(i=a-1;i>=0;i--)\n x[i+251-a]=x[i];\nfor(i=250-a;i>=0;i--)\n x[i]='0';\nfor(i=b-1;i>=0;i--)\n y[i+251-b]=y[i];\nfor(i=250-b;i>=0;i--)\n y[i]='0'; \nfor(i=250;i>=0;i--)\n { \n c=x[i]+y[i]-'0'-'0'+k;\n if(c<=9) \n {z[i]=c+'0';k=0;}\n if(c>9) \n {z[i]=c%10+'0';k=1;}\n }\n{for(i=0;i<=250;i++)\n { if(z[i]!='0') {p=&z[i];break;}}\nif(i==251)\n printf(\"0\");\nelse\nprintf(\"%s\",p);}\n}\n"} +{"label": "69", "index": "34193", "code": "char s[100001];\nint a[100001],b[100001],c[100001];\nint main(){\n long i,j,k,m=0;\n long alen,blen,clen;\n gets(s);\n alen=strlen(s);\n for(i=alen-1;i>=0;i--)\n a[alen-i]=s[i]-'0';//?????????????\n gets(s);\n blen=strlen(s);\n for(i=blen-1;i>=0;i--)\n b[blen-i]=s[i]-'0';//????????????? \n if(alen>blen)\n clen=alen;\n else\n clen=blen;\n for(i=1;i<=clen;i++)\n c[i]=a[i]+b[i];\n for(i=1;i<=clen;i++)\n if(c[i]>9){\n c[i+1]++;\n c[i]-=10;\n if(i==clen)\n clen++;//????\n }\n for(i=clen;i>=1;i--)\n\t{\n\t\tif(c[i]!=0){\n\t\t m=i;\n\t\t\tbreak;\n\t\t}\n\t}\n if(m==0){\n\t\tfor(i=clen;i>=1;i--)\n\t\t\tprintf(\"%d\",c[i]);\n\t}\n if(m!=0){\n\t\tfor(i=m;i>=1;i--)\n\t\t\tprintf(\"%d\",c[i]); \n\t}\n printf(\"\\n\"); \n}\n"} +{"label": "69", "index": "34194", "code": "\nmain()\n{\n int m,n,t,k,i,x1,x2,a[251];\n t=0;\n m=0;\n n=0;\n char str1[250],str2[250];\n for(i=0;i<250;i++)\n a[i]=0;\n scanf(\"%s\",str1);\n scanf(\"%s\",str2);\n x1=strlen(str1);\n x2=strlen(str2);\n if(x1>x2)\n {\n for(i=(x1-x2-1);i>=0;i--)\n a[i]=a[i]+str1[i]-'0';\n for(i=x1-1;i>=(x1-x2);i--)\n {\n a[i]=a[i]+str1[i]+str2[i+x2-x1]-'0'-'0';\n if(a[i]>=10)\n for(k=i;k>=1;k--)\n {\n a[k-1]=a[k-1]+1;\n a[k]=a[k]%10;\n if(a[k-1]<10)\n break;\n }\n }\n for(i=0;i<=x1-1;i++)\n {\n if(a[i]!=0||a[i]==0&&t!=0)\n {\n printf(\"%d\",a[i]);\n t=1;\n }\n if(i==1&&t==0)\n printf(\"0\");\n }\n }\n else if(x1=0;i--)\n a[i]=a[i]+str2[i]-'0';\n for(i=x2-1;i>=(x2-x1);i--)\n {\n a[i]=a[i]+str1[i+x1-x2]+str2[i]-'0'-'0';\n if(a[i]>=10)\n for(k=i;k>=1;k--)\n {\n a[k-1]=a[k-1]+1;\n a[k]=a[k]%10;\n if(a[k-1]<10)\n break;\n }\n }\n for(i=0;i=0;i--)\n {\n a[x1-i-1]=a[x1-i-1]+str1[i]+str2[i]-'0'-'0';\n if(a[x1-1-i]>=10)\n {\n a[x1-i]++;\n a[x1-1-i]=a[x1-1-i]%10;\n }\n }\n if(a[x1]!=0)\n for(i=x1;i>=0;i--)\n printf(\"%d\",a[i]);\n else\n for(i=x1-1;i>=0;i--)\n {\n if(a[i]!=0||a[i]==0&&n!=0)\n {\n printf(\"%d\",a[i]);\n n=1;\n }\n if(i==0&&n==0)\n printf(\"0\");\n }\n }\n \n}\n\n"} +{"label": "69", "index": "34195", "code": "int n1[251]={0},n2[251]={0};\nchar s1[251],s2[251];\nvoid main()\n{\nscanf(\"%s\",s1);\nscanf(\"%s\",s2);\nint i,j;\nint l=strlen(s1);\nj=0;\nfor(i=l-1;i>=0;i--)\nn1[j++]=s1[i]-'0';\nl=strlen(s2);\nj=0;\nfor(i=l-1;i>=0;i--)\nn2[j++]=s2[i]-'0';\nfor(i=0;i<250;i++)\n{\nn1[i]+=n2[i];\nif(n1[i]>9)\n{n1[i]-=10;n1[i+1]++;}\n}\nint b=0;\nfor(i=250;i>=0;i--)\n{\nif(b)\nprintf(\"%d\",n1[i]);\nelse if(n1[i])\n{printf(\"%d\",n1[i]);b=1;}\n}\nif(b==0)\nprintf(\"0\");\n}"} +{"label": "69", "index": "34196", "code": "char s1[200],s2[200];\nint a[200],b[200],c[200];\nint alen,blen,clen;\n\nint str2bigint(char*str,int*t)\n{\n\tint len=(int)strlen(str);\n\tint i;\n\tfor(i=0;i0)\n\t\tk=k-1;\n for(i=k;i>=0;i--)\n\t\tprintf(\"%d\",a[i]);\n}\n\n\nint add_bigint(int*a,int alen,int*b,int blen,int*c)\n{\n\tint i;\n\tint temp = 0;\n\tint tmpsum = 0;\n\tint len=(alen>blen)?alen:blen;\n\tfor(i=0;inb)\n\t{\n\t\tfor(i=0,d=0;i<=nb-1;i++)\n\t\t{ \n\t\t\t t=a[na-1-i]-48+b[nb-1-i]-48;\n\t\t\t t=t+d;\n\t\t\t c[i]=t%10+48;\n\t\t\t d=(t-t%10)/10;\n\t\t}\n\t\tif(d!=0)\n\t\t{\n\t\t\t for(i=nb;i<=na-1;i++)\n\t\t\t { \n\t\t\t t=a[na-1-i]-48+d;\n\t\t\t c[i]=t%10+48;\n\t\t\t d=(t-t%10)/10;\n\t\t\t }\n\t\t\t if(d!=0)\n\t\t\t\t c[i]=d+48;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=nb;i<=na-1;i++)\n\t\t\t{\n\t\t\t\tc[i]=a[na-1-i];\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=0,d=0;i<=na-1;i++)\n\t\t{ \n\t\t\t t=a[na-1-i]-48+b[nb-1-i]-48;\n\t\t\t t=t+d;\n\t\t\t c[i]=t%10+48;\n\t\t\t d=(t-t%10)/10;\n\t\t}\n\t\tif(d!=0)\n\t\t{\n\t\t\t for(i=na;i<=nb-1;i++)\n\t\t\t { \n\t\t\t t=b[nb-1-i]-48+d;\n\t\t\t c[i]=t%10+48;\n\t\t\t d=(t-t%10)/10;\n\t\t\t }\n\t\t\t if(d!=0)\n\t\t\t\t c[i]=d+48;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=na;i<=nb-1;i++)\n\t\t\t{\n\t\t\t\tc[i]=b[nb-1-i];\n\t\t\t}\n\t\t}\n\t}\n\tnc=strlen(c);\n while(c[nc-1]==48) \n\t{\n\t\tc[nc-1]='\\0';\n\t\tnc=strlen(c);\n\t}\n\tfor(i=0;i<=(nc-1)/2;i++)\n\t{ \n\t\tg=c[i];\t\t \n\t\tc[i]=c[nc-1-i];\n\t\tc[nc-1-i]=g;\n\t}\n\tif(nc==0)\n\t\tprintf(\"0\");\n else\n\t printf(\"%s\",c);\n\treturn;\n}\n\nint main()\n{\n\tchar a[300],b[300];\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\tchengfa(a,b);\n\treturn 0;\n}"} +{"label": "69", "index": "34198", "code": "const int LEN=301;\nint main()\n{\n\tchar ch1[LEN]={0},ch2[LEN]={0};\n\tint an1[LEN]={0},an2[LEN]={0};\n\tmemset(an1,0,sizeof(an1));\n\tmemset(an2,0,sizeof(an2));\n\tcin.getline(ch1,LEN,'\\n');\n\tcin.getline(ch2,LEN,'\\n');\n\tint i,j=0;\n\tfor(i=strlen(ch1)-1;i>=0;i--)\n\t\tan1[j++]=ch1[i]-'0';\n\tj=0;\n\tfor(i=strlen(ch2)-1;i>=0;i--)\n\t\tan2[j++]=ch2[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tan1[i]-=10;\n\t\t\tan2[i+1]+=1;\n\t\t}\n\t}\n\tint judge=0;\n\tfor(i=LEN-1;i>=0;i--)\n\t{\n\t\tif(an1[i]!=0)\n\t\t{\n\t\t\tfor(;i>=0;i--)\n\t\t\t\tcout<=0;i--)\n {a[i+k]=a[i];\n }\n for(i=0;i<=k-1;i++)\n {a[i]='0';}\n }\n else {k=m-n;\n for(i=n-1;i>=0;i--)\n {b[i+k]=b[i];}\n for(i=0;i<=k-1;i++)\n {b[i]='0';}\n }\n \n if(m<=n)\n {m=n;}\n for(j=m-1;j>=1;j--)\n { p=a[j]+b[j]-'0';\n if(p>'9')\n {b[j-1]=b[j-1]+1;\n c[j]=p-10;}\n else c[j]=p;\n \n }\n p=a[0]-'0'+b[0];\n if(p>'9')\n {p='1';\n c[0]=a[0]+b[0]-'0'-10;}\n else{p='\\0';\n c[0]=a[0]+b[0]-'0';}\n for(i=0,k=0;i<=m-1;i++){if(c[i]=='0') k=k+1;else break;}\n if(p=='1')\n {printf(\"%c\",p);for(i=0;i<=m-1;i++) printf(\"%c\",c[i]);}\n else{\n for(i=k;i<=m-1;i++)\n printf(\"%c\",c[i]);}}\n }\n"} +{"label": "69", "index": "34200", "code": "int sdw1(char s1[],int a[])\n{\n int len=strlen(s1);\n int i;\n for(i=0;ilb)?la:lb;\n for(i=0;i=10)\n {\n c[i+1]=c[i+1]+1;\n c[i]=c[i]%10;\n }\n }\n return (c[len]!=0)?(len+1):len;\n}\nint main()\n{\n char s1[300],s2[300];\n int a[300]={0};\n int b[300]={0};\n int c[300]={0};\n int i,la,lb,len,n=0;\n scanf(\"%s%s\",s1,s2);\n la=sdw1(s1,a);\n lb=sdw1(s2,b);\n len=add(a,b,c,la,lb);\n for(i=len-1;i>0;i--)\n {\n if(c[i]!=0)\n {\n n=i;\n break;\n }\n }\n for(i=n;i>-1;i--)\n {\n printf(\"%d\",c[i]);\n }\n \n return 0;\n}\n\n \n \n\n"} +{"label": "69", "index": "34201", "code": "int main()\n{\n\tchar s1[max],s2[max];\n\tint a1[max],a2[max];\n\tint i,j;\n\tcin.getline(s1,max);\n\tcin.getline(s2,max);\n\tfor(i=0;i=10) {a1[i+1]++;a1[i]-=10;}\n\t}\n\tfor(i=max-1;i>=0;i--)\n\t{if(a1[i]!=0) break;}\n\tif(i==-1) cout<<0<=0;j--) cout<>a>>b;\n\n\tint la=strlen(a),lb=strlen(b);\n\n\n\tfor(i=0;i0;i--) \n\t{\n\t\tif(sum[i]!=0) \n\t\t{break;}\n\t}\n\n\tfor(;i>=0;i--)\n\t{\n\t\tprintf(\"%c\",sum[i]+'0');\n\t}\n\n\n\n\n\n\n\treturn 0;\n}"} +{"label": "69", "index": "34203", "code": "int length(char* v);\nvoid diandao(char* v,int i);\nint main()\n{\n\tint x=0;\n\tchar a[250],b[250],c[250];\n\tcin.getline(a,250);\n\tcin.getline(b,250);\n\tdiandao(a,length(a));\n\tdiandao(b,length(b));\n\tx=length(a);\n\tif(x'9') a[i]='0';\n\t\tif(b[i]<'0'||b[i]>'9') b[i]='0';\n\t\tif(a[i]-'0'+b[i]-'0'+c[i]-'0'<=9)\tc[i]+= -'0'+a[i]-'0'+b[i];\n\t\telse\t{c[i]=c[i]-'0'+a[i]-'0'+b[i]-10; c[i+1]='1';}\n\t}\n\tdiandao(c,length(c));\n\tint k=0;\n\tfor(int i=0;i='0'&&v[i-1]<='9';i++)\n\t\tx=i;\n\treturn x;\n}\nvoid diandao(char* v,int i)\n{\n\tfor(int j=0;j=0;i--) \n na[j++] = a[i] - '0'; \n \n int n2 = strlen(b); \n j = 0; \n for( i=n2-1;i>=0;i--) \n nb[j++] = b[i] - '0'; \n \n for(i=0;i=10) \n { \n na[i] -= 10; \n na[i+1] ++; \n } \n }\n int flag = 0; \n for( i = MAX_LEN; i >= 0; i-- ) \n { \n if( flag==1) \n printf(\"%d\", na[i]); \n else if( na[i] ) { \n printf(\"%d\", na[i]); \n flag = 1; \n } \n } \n if(flag!=1) \n printf(\"0\"); \n return 0; \n}\n"} +{"label": "69", "index": "34205", "code": "// 10000.cpp : ??????????????\n//\n\n//#include\nstruct node\n{\n char data;\n struct node *next;\n};\nint l[2]={0,0},k=0,n;\ntypedef struct node Node;\nNode *create()\n{\n Node *p1,*p2,*head;\n head=null;\n p1=(Node *)malloc(len);\n p2=(Node *)malloc(len);\n scanf(\"%c\",&p1->data);\n head=null;\n while(p1->data!='\\n')\n {\n l[k]++;\n if (l[k]==1)\n head=p1;\n else\n p2->next=p1;\n p2=p1;\n p1=(Node *)malloc(len);\n scanf(\"%c\",&p1->data);\n }\n k++;\n p2->next=null;\n return (head);\n}\nNode *add(Node *s1,Node *s2)\n{\n Node *p1,*p2,*ans,*p,*pp;\n ans=null;\n p1=s1;\n p2=s2;\n int i,j,a,b,c=0,d;\n n=l[0]>l[1]?l[0]:l[1];\n\tp=(Node *)malloc(len);\n for(i=0;inext;\n for (j=0;jnext;\n a=i>=l[0]?0:p1->data-'0';\n b=i>=l[1]?0:p2->data-'0';\n d=(a+b+c)%10;\n c=(a+b+c)/10;\n p->data=d+'0';\n if (i==0)\n ans=p;\n else\n pp->next=p;\n pp=p;\n p=(Node *)malloc(len);\n p1=s1;\n p2=s2;\n }\n if (c==1)\n {\n p->data='1';\n pp->next=p;\n pp=p;\n n++;\n }\n pp->next=null;\n return (ans);\n}\nvoid put(Node *head)\n{\n Node *p;\n p=head;\n int i,flag=0;\n for (;n!=0;)\n {\n for (i=0;inext;\n if (flag==0&&p->data=='0')\n {\n p=head;\n n--;\n continue;\n }\n //if (flag==1)\n // {\n printf (\"%c\",p->data);\n flag=1;\n //}\n\n p=head;\n n--;\n }\n if (flag==0)\n printf(\"0\");\n}\n main()\n{\n Node *s1,*s2,*ans;\n s1=create();\n s2=create();\n ans=add(s1,s2);\n put(ans);\n}\n\n\n"} +{"label": "69", "index": "34206", "code": "/*\n * 3.cpp\n *\n * Created on: 2013-11-22\n * Author: Administrator\n */\n\n/*#include\nvoid change(char a[300])//??????????\n{\n\tint q;\n\tfor(int i=0;istrlen(b))return strlen(c);\n\telse return strlen(b);\n}\n\nint add(char c[300],char d[300],int x,char s[300])//???????????\n{\n\tif(c[x]-'0'+d[x]-'0'<10)\n\t{\n\t\ts[x]=c[x]-'0'+d[x]-'0';\n\t\tif(x==max1(c,d)-1)return 0; //??????????\n\t}\n\telse\n\t{\n\t\ts[x]=c[x]-'0'+d[x]-'0'-10;//????????\n\t\tc[x+1]++;\n\t\tif(x==max1(c,d))return 0;\n\t}\n\treturn add(c,d,x+1,s);\n}\nvoid happy(int s[300])\n{\n\tfor(int i=0;i<300;i++)\n\t{\n\t\ts[i]='0';\n\t}\n}\nint main()\n{\n\tchar a[300]={'0'};\n\tchar b[300]={'0'};\n\tchar c[300]={'0'};\n\thappy(a);\n\thappy(b);\n\thappy(c);\n\tcin>>a>>b;\n\tchange(a);\n\tchange(b);\n\tadd(a,b,0,c);\n\tif(c[max1(a,b)]!='0')cout<<'1';//??????\n\tfor(int i=max1(a,b)-1;i>=0;i--)//?c????\n\t\t{\n\t\t\tcout<\nint lenA,lenB,maxlen;\nvoid change(char a[300],int len)\n{\n\tchar q;\n\tfor(int i=0;imaxlen)return 0;\n\n\t}\n\telse{\n\t\ts[x]=c[x]-'0'+d[x]-10;\n\t\tc[x+1]++;\n\t\tif(x>=maxlen-1)\n\t\t{\n\t\t\ts[x+1]++;\n\t\tmaxlen++;\n\t\treturn 0;\n\t\t}\n\t}\n\treturn add(c,d,x+1,s);\n}\nvoid happy(char s[300])\n{\n\tfor(int i=0;i<300;i++)\n\t{\n\t\ts[i]='0';\n\t}\n}\nint main()\n{\n\tchar a[300]={'0'};\n\tchar b[300]={'0'};\n\tchar c[300]={'0'};\n\nhappy(a);\nhappy(b);\nhappy(c);\ncin>>a>>b;\nlenA=strlen(a);\nlenB=strlen(b);\nmaxlen=lenA>lenB?lenA:lenB;\ncout<=0;i--)\n{\n\tcout<=maxLen-1)return 0; //??????????\n\t}\n\telse\n\t{\n\t\ts[x]=c[x]-'0'+d[x]-10;//????????\n\t\tc[x+1]++;\n\t\tif(x>=maxLen-1)\n\t\t{\n\t\t\ts[x+1]++;\n\t\t\tmaxLen++;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn add(c,d,x+1,s);\n}\nint main()\n{\n\tchar a[300];\n\tchar b[300];\n\tchar c[300];\n\tint i, j;\n\tfor (i = 0; i < 300; i++)\n\t\ta[i] = b[i] = c[i] = '0';\n\tcin>>a>>b;\n\tfor (i = 0; a[i] != '\\0' && a[i] == '0'; i++);\n\tlenA = strlen(a);\n\tfor (j = 0; j < lenA - i; j++)\n\t\ta[j] = a[j + i];\n\tlenA -= i;\n\tfor (i = 0; b[i] != '\\0' && b[i] == '0'; i++);\n\tlenB = strlen(b);\n\tfor (j = 0; j < lenB - i; j++)\n\t\tb[j] = b[j + i];\n\tlenB -= i;\n\tif (lenA == 0 && lenB == 0)\n\t\tcout << '0';\n\telse if (lenA == 0)\n\t\tcout << b;\n\telse if (lenB == 0)\n\t\tcout << a;\n\telse\n\t{\n\t\tmaxLen = lenA > lenB ? lenA : lenB;\n\t\ta[lenA] = b[lenB] = '0';\n\t\tchange(a, lenA);\n\t\tchange(b, lenB);\n\t\tadd(a,b,0,c);\n\t\tfor(i=maxLen-1;i>=0;i--)//?c????\n\t\t\t{\n\t\t\t\t//if (i != 0)\n\t\t\t\t//\tcontinue;\n\t\t\t\tcout<len1)\n\t\tmax=len2;\n\tfor(int i=0,j=len1-1;i=10)\n\t\t{\n\t\t\tans[i]=ans[i]-10;\n\t\t\tans[i+1]=ans[i+1]+1;\n\t\t}\n\tfor(t=max;t>=0;t--)\n\t\tif(ans[t]!=0)\n\t\t\tbreak;\n\tif(t==-1)\n\t\tcout<<0<=0;i--)\n\t\tcout<b) return a;else return b;\n}\nint main()\n{\n\tchar a[250],b[250];\n\tint aa[252]={0},bb[252]={0},cc[252]={0};\n\tint i,k=0,n,m;\n\tcin>>a>>b;\n\taa[0]=strlen(a);\n\tfor (i=1;i<=aa[0];i++) aa[i]=a[aa[0]-i]-48;\n\tbb[0]=strlen(b);\n\tfor (i=1;i<=bb[0];i++) bb[i]=b[bb[0]-i]-48;\n\tfor (i=1;i<=max(aa[0],bb[0])+1;i++)\n\t{\n\t\tcc[i]=((aa[i]+bb[i])+k)%10;\n\t\tk=(aa[i]+bb[i]+k)/10;\n\t}\n\tfor (i=251;i>=1;i--) if (cc[i]!=0) \n\t{\n\t\tcc[0]=i;break;\n\t}\n\tif (i==0) cout<<0<0;i--) cout<0||l2>0)\n\t{\n\t\tm=(l1>0)?a[--l1]-'0':0;\n\t\tn=(l2>0)?b[--l2]-'0':0;\n\t\tc[l]+=m+n;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l]%=10;\n\t\tl++;\n\t}\n\twhile(c[l]==0&&l>0)\n\t\tl--;\n\tfor(i=l;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34210", "code": "void xiaoling(char str[])\n{\n\tint len=strlen(str);\n\tif(str[0]=='0')\n\t{\n\t\tint i;\n\t\tfor(i=0;str[i]=='0';i++)\n\t\t{\n\t\t}\n\t\tint j;\n\t\tfor(j=i;j<=len+1;j++)\n\t\t{\n\t\t\tstr[j-i]=str[j];\n\t\t}\n\t}\n}\nint main()\n{ \n\tchar str1[10000]={' '},str2[10000]={' '};\n\tint len1,len2,len,a[10000]={0},b[10000]={0};\n\tcin>>str1;\n\tcin>>str2;\n\tif(str1[0]=='0'&&str1[1]=='\\0'&&str2[0]=='0'&&str2[1]=='\\0')\n\t{\n\t\tcout<<0;\n\t\treturn 0;\n\t}\n\txiaoling(str1);\n\txiaoling(str2);\n\tlen1=strlen(str1); //????len1-1\n\tlen2=strlen(str2);\n\tint i,j=0;\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\ta[j]=str1[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\tb[j]=str2[i]-'0';\n\t\tj++;\n\t}\n\tif(len1>len2)\n\t\tlen=len1;\n\telse\n\t\tlen=len2;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\ta[i]-=10;\n\t\t\ta[i+1]++;\n\t\t}\n\t}\n\tfor(i=len;i>=0;i--)\n\t{\n\t\tif(a[i]!=0)\n\t\t\tbreak;\n\t}\n\tfor(j=i;j>=0;j--)\n\t\tcout<=0;i--)\n\t\ta[j++]=str1[i]-'0';\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t\tb[j++]=str2[i]-'0';\n\tif(strcmp(str1,\"0\")!=0&&strcmp(str2,\"0\")!=0)\n\t{\n\tfor (i=0;i<=250;i++)\n\t{\n\t\ta[i]=a[i]+b[i];\n if(a[i]>=10)\n\t\t{\n\t\t\ta[i]=a[i]-10;\n\t\t\ta[i+1]++;\n\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif (a[i]!=0)\n\t\t\tbreak;\n\t}\n\tfor(;i>=0;i--)\n\t\tcout<>a>>b;\n\tint lena,lenb;\n\tfor(int i=0;i<300;i++)\n\t{\n\t\tif (a[i]==0)\n\t\t{lena=i-1;\n\t\tbreak;}\n\t}\n\tfor(int i=0;i<300;i++)\n\t{\n\t\tif (b[i]==0)\n\t\t{lenb=i-1;\n\t\tbreak;}\n\t}\n\tfor(int i=0;i<=lena;i++)\n\t{\n\t\ta[i]=a[i]-('1'-1);\n\n\t}\n\tfor(int i=0;i<=lenb;i++)\n\t{\n\t\tb[i]=b[i]-('1'-1);\n\t}\n\tif (lena==lenb)\n\t{\n\t\tfor(int i=lenb;i>=0;i--)\n\t\t\t\t{\n\t\t\t\t\tc[i+1]+=b[i]+a[i];\n\t\t\t\t\tif(c[i+1]>=10)\n\t\t\t\t\t{\n\t\t\t\t\t\tc[i]++;\n\t\t\t\t\t\tc[i+1]-=10;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\tif (c[0]==1)\n\t\t{\n\t\t\tcout<<'1';\n\t\tfor(int i=1;i<=lena+1;i++)\n\t\t\tcout<=lenb-lena;i--)\n\t\t\ta[i]=a[i-lenb+lena];\n\t\tfor(int i=0;i=0;i--)\n\t\t{\n\t\t\tc[i+1]+=b[i]+a[i];\n\t\t\tif(c[i+1]>=10)\n\t\t\t{\n\t\t\t\tc[i]++;\n\t\t\t\tc[i+1]-=10;\n\t\t\t}\n\t\t}\n\t\tif (c[0]==1)\n\t\t{\n\t\t\tcout<<'1';\n\t\tfor(int i=1;i<=lenb+1;i++)\n\t\t\tcout<lenb)\n\t{\n\t\tfor(int i=lena;i>=lena-lenb;i--)\n\t\t\tb[i]=b[i-lena+lenb];\n\t\tfor(int i=0;i=0;i--)\n\t\t{\n\t\t\tc[i+1]+=b[i]+a[i];\n\t\t\tif(c[i+1]>=10)\n\t\t\t{\n\t\t\t\tc[i]++;\n\t\t\t\tc[i+1]-=10;\n\t\t\t}\n\t\t}\n\t\tif (c[0]==1)\n\t\t{\n\t\t\tcout<<'1';\n\t\tfor(int i=1;i<=lena+1;i++)\n\t\t\tcout<m)\n\t{\n\t\tstrcpy(c,b);\n\t\tstrcpy(b,a);\n\t\tstrcpy(a,c);\n\t\tt=n;\n\t\tn=m;\n\t\tm=t;\n\t}\n\tfor(i=m-1,j=n-1;j>=0;i--,j--)\n\t{\n\t\ta[i]=a[i]-48+b[j];\n\t\tif(a[i]>57)\n\t\t{\n\t\t\tif(i!=0)\n\t\t\t{\n\t\t\t\ta[i]=a[i]-10;\n\t\t\t\ta[i-1]=a[i-1]+1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta[i]=a[i]-10;\n\t\t\t\tprintf(\"1\");\n\t\t\t\tx=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tfor(i=m-1;i>=0;i--)\n\t{\n\t\tif(a[i]>57)\n\t\t{\n\t\t\tif(i!=0)\n\t\t\t{\n\t\t\t\ta[i]=a[i]-10;\n\t\t\t\ta[i-1]=a[i-1]+1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta[i]=a[i]-10;\n\t\t\t\tprintf(\"1\");\n\t\t\t\tx=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}\n\tif(x==1)\n\t{\n\t\tprintf(\"%s\",a);\n\t}\n\t\n\telse\n\t{\tfor(i=0;i=lb)?la:lb;\n\tfor(i=0;i<=l;i++)\n\t{\n\t\tif(lb-1-i<0)\n\t\t\tb[lb-1-i]='0';\n\t\tif(la-1-i<0)\n\t\t\ta[la-1-i]='0';\n t=a[la-1-i]+b[lb-1-i]+x-96;\n\t\tif(t<=9)\n\t\t{\n\t\t\tc[i]=t;\n\t\t\tx=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t t=t-10;\n\t\t\tc[i]=t;\n\t\t\tx=1;\n\t\t}\n\t}\n\tfor(j=l;j>0;j--)\n {\n if(c[j]==0 && flag==0)\n continue;\n else\n {flag=1;\n\t\t printf(\"%d\",c[j]);}}\n\tprintf(\"%d\",c[0]);\n}\n"} +{"label": "69", "index": "34215", "code": "int main()\n{\n\tint i,j;\n\tchar num1[N],num2[N],tmp;\n\tint len1,len2,len_max,len_min;\n\tint result[N+1]={0};\n\tscanf(\"%s%s\",num1,num2);\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\tlen_max=len1>len2?len1:len2;\n\tlen_min=len1=10)\n\t\t{\n\t\t\tresult[j+1]+=1;\n\t\t\tresult[j]=result[j]%10;\n\t\t}\n\t}\n\tfor(j=len_min;j=10)\n\t\t\t{\n\t\t\t\tresult[j+1]+=1;\n\t\t\t\tresult[j]=result[j]%10;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult[j]+=num2[j]-'0';\n\t\t\tif(result[j]>=10)\n\t\t\t{\n\t\t\t\tresult[j+1]+=1;\n\t\t\t\tresult[j]=result[j]%10;\n\t\t\t}\n\t\t}\n\t}\n\tif(result[len_max]==1)\n\t\tlen_max++;\n\tfor(i=len_max-1;i>=0;i--)\n\t{\n\t\tif(result[i]!=0)\n\t\t\tbreak;\n\t}\n\tif(i>=0)\n\t{\n\t\tfor(j=i;j>=0;j--)\n\t\t\tprintf(\"%d\",result[j]);\n\t\tprintf(\"\\n\");\n\t}\n\telse\n\t\tprintf(\"0\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34216", "code": "int main()\n{\n\tint i,j=0,changdu1,changdu2,js=0;\n\tchar a[501],b[501];\n\tscanf(\"%s%s\",a,b);\n\tchangdu1=strlen(a);\n\tchangdu2=strlen(b);\n\tfor(i=250;i<500;i++)\n\t{\n\t\ta[i]=48;\n\t\tb[i]=48;\n\t}\n\tfor(i=0;i249;i--)\n\t{\n\n\t\tb[i]+=a[i]-48;\n\t\tif(b[i]>57&&b[i]<67)\n\t\t{\n\t\t\tb[i-1]++;\n\t\t\tb[i]=b[i]-10;\n\t\t}\n\t\t\n\t}\n\tfor(i=250;i<500;i++)\n\t{\n\t\tif(j!=0||(b[i]>=49&&b[i]<=57))\n\t\t{\n\t\t\tprintf(\"%c\",b[i]);\n\t\t\tj=1;\n\t\t\tjs++;\n\t\t}\n\t}\n\tif(js==0)\n\t\tprintf(\"0\");\n\tprintf(\"\\n\");\n\n\treturn 0;\n}"} +{"label": "69", "index": "34217", "code": "int main()\n{\n char a[251], b[251], c[252];\n int i, j, k, tmp = 0;\n scanf(\"%s%s\", a, b);\n k = -1;\n for(i = strlen(a) - 1, j = strlen(b) - 1; i+1 && j+1; i--, j--){\n k++;\n c[k] = tmp+a[i]-'0'+b[j]-'0';\n tmp = c[k]/10;\n c[k] %= 10;\n }\n if(i >= 0){\n while(i >= 0){\n k++;\n c[k] = tmp + a[i]-'0';\n tmp = c[k]/10;\n c[k] %= 10; \n i--;\n }\n }\n else if(j >= 0){\n while(j >= 0){\n k++;\n c[k] = tmp + b[j]-'0';\n tmp = c[k]/10;\n c[k] %= 10;\n j--;\n }\n }\n if(tmp)c[++k] = tmp;\n while(k >= 0 && c[k] == 0)k--;\n for(i = k; i >= 0; i--)printf(\"%d\", c[i]);\n if(k < 0)printf(\"0\");\n return 0;\n}"} +{"label": "69", "index": "34218", "code": "int main()\n{\nchar s1[250];\nchar s2[250];\nscanf(\"%s\",s1);\nscanf(\"%s\",s2) ; \nint l1 ,l2 ;\nl1=strlen(s1);\nl2=strlen(s2) ;\n \nint t,i,p[251]={0};\nfor (i=0;i<250;i++)\n{\nif(i=l1&&i=l2&&i=l1&&i>=l2)\n break;\np[i]=p[i]+t;\nif(p[i]>9)\n{\np[i]=p[i]-10;\np[i+1]++;\n} \n} \nwhile(p[i]==0&&i>0)\ni--;\nfor (;i>=0;i--)\n{\nprintf(\"%d\",p[i]); \n \n \n \n} \n \n \n} \n \n \n "} +{"label": "69", "index": "34219", "code": "int main()\n{\n\tchar m[250];\n\tchar n[250];\n\tchar x[250];\n\tchar total[255];\n\tint sl1=0,sl2=0,i,j,a,tmp=0,head=0;\n\tgets(m);\n\tgets(n);\n\tstrcpy(x,m);\n\tfor(i=0;m[i]!=0&&(m[i]>='0'&&m[i]<='9');i++)\n\t{\n\t\tsl1++;\n\t}\n\tfor(i=0;n[i]!=0&&(n[i]>='0'&&n[i]<='9');i++)\n\t{\n\t\tsl2++;\n\t}\n\tif(sl1=0;i--)\n\t{\n\t\tif(m[i]-'0'+n[i]-'0'+tmp>9)\n\t\t{\n\t\t\ttotal[i]='0'+(m[i]-'0'+n[i]-'0'+tmp)%10;\n\t\t\ttmp=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttotal[i]=m[i]+n[i]+tmp-'0';\n\t\t\ttmp=0;\n\t\t}\n\t}\n\tif(tmp==1)\n\t{\n\t\tprintf(\"1\");\n\t\thead=1;\n\t}\n\tfor(j=0;jX)\n X=X2;\n for (i=0;i=10)\n c[i]=c[i]+1;\n c[i]=c[i]%10;\n } \n \n }\n if (c[X]==0)\n {\n for (i=0;i=0&&a[i]==0)i--;\n\tif(i==-1)\n\tcout<<\"0\";\n\telse\n\twhile(i>=0)\n\t{cout<0||l2>0)\n\t{\t\n\t\tif(l1>0) \n\t\t\tm=a[l1-1]-'0';\n\t\telse m=0;\n\t\tl1--;\n\t\tif(l2>0) \n\t\t\tn=b[l2-1]-'0';\n\t\telse n=0;\n\t\tl2--;\t\n\t\tc[l]+=(m+n);\n\t\tc[l+1]=c[l]/10;\n\t\tc[l]=c[l]%10;\n\t\tl++;\n\t}\n\twhile(c[l]==0&&l>0)\n\t\tl--;\n\tfor(i=l;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n}\n\t\n\n\n\n"} +{"label": "69", "index": "34223", "code": "int main()\n{\n\tchar a[251],b[251];\n\tcin.getline(a,251);\n\tcin.getline(b,251);\n\tint a1[251],b2[251];\n\tmemset(a1,0,sizeof(a1));\n\tmemset(b2,0,sizeof(b2));\n\tfor( int i = 0; i <= strlen( a ) - 1; i ++)\n\t{\n\t\ta1[i]=a[strlen(a)-i-1]-'0';\n\t}\n\t\n\tfor(int i = 0; i <= strlen( b) - 1; i ++ )\n\t{\n\t\tb2[i]=b[strlen(b)-1-i]-'0';\n\t}\n\t\n\tfor(int i=0;i<250;i++)\n\t{\n\t\tb2[i+1]+=(a1[i]+b2[i])/10;\n\t\tb2[i]=(a1[i]+b2[i])%10;\n\t}\n\t\n\tint k;\n\tfor(k=249;k>=0;k--)\tif(b2[k]!=0) break;\n\tfor(int j=k;j>=0;j--) cout<strlen(str2))?strlen(str1):strlen(str2);\n\n\tfor(i=0;i=10){\n\t\ta[i]-=10;\n\t\ta[i+1]++;\n\t}\n\t}\n\t\n\tfor(k=len;k>=0;k--){\n\t\tif(flag)\n\t\t\tprintf(\"%d\",a[k]);\n\t\telse if(a[k]){\n\t\t\tprintf(\"%d\",a[k]);\n\t\t\tflag=1;\n\t\t}\n\t}\n\tprintf(\"\\n\");\n}\n}\n\n\n"} +{"label": "69", "index": "34225", "code": "\n\nint main()\n{\n\tchar a[250],b[250];\n\tint X[251]={0},Y[250]={0};\n\tcin>>a>>b;\n\tint l1=strlen(a),l2=strlen(b);\n\tint i,k=0;\n\tfor(i=l1-1;i>=0;i--)\n\t\tX[k++]=a[i]-'0';\n\tk=0;\n\tfor(i=l2-1;i>=0;i--)\n\t\tY[k++]=b[i]-'0';\n\n\tif(l1>=l2)\n\t\tk=l1;\n\telse\n\t\tk=l2;\n\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tX[i+1] += 1;\n\t\t\tX[i] %= 10;\n\t\t}\n\t}\n\ti=k;\n\twhile(i>0)\n\t{\n\t\tif(X[i]!=0)\n\t\t\tbreak;\n\t\ti--;\n\t}\n\tfor(;i>=0;i--)\n\t\tcout<=0;i--){\n\t\td=a[i]-'0'+b[i]-'0'+f;\n\t\te=d%10;\n\t\tf=d/10;\n\t\tc[i]=e+'0';\n\t}\n\tc[254]=0;\n\tfor(i=0;c[i]=='0';){\n\t\tfor(j=0;j<254;j++){\n\t\t\tc[j]=c[j+1];\n\t\t}\n\t}\n\tif(strlen(c)==0) printf(\"0\");\n\telse printf(\"%s\",c);\n\tscanf(\"%d\",&i);\n\treturn 0;\n}"} +{"label": "69", "index": "34227", "code": "\nint main()\n{\n\tchar num1[301]={0},num2[301]={0};\n\tcin>>num1>>num2;\n\tint n1=strlen(num1),n2=strlen(num2);\n\n\tfor(int k=0;k<=(n1-1)/2;k++)\n\t\tswap(num1[k],num1[n1-1-k]);\n\tfor(int k=0;k<=(n2-1)/2;k++)\n\t\tswap(num2[k],num2[n2-1-k]);\n\t\n\tint num[310]={0};\n\n\tfor(int k=0;k!=301;k++)\n\t{\n\t\tif(num1[k]>='0'&&num1[k]<='9')\n\t\t\tnum1[k]-='0';\n\t\tif(num2[k]>='0'&&num2[k]<='9')\n\t\t\tnum2[k]-='0';\n\t}\n\n\tfor(int k=0;k!=301;k++)\n\t{\n\t\tnum[k]=num[k]+num1[k]+num2[k];\n\t\tif(num[k]>=10)\n\t\t{\n\t\t\tnum[k]-=10;\n\t\t\tnum[k+1]+=1;\n\t\t}\n\t}\n\tint k;\n\tfor(k=301;k>=0;k--)\n\t{\n\t\tif(num[k]!=0)\n\t\t\tbreak;\n\t}\n\tif(k==-1)\n\t\tcout<<'0';\n\tfor(int i=k;i>=0;i--)\n\t\tcout<=y)\n\t {max=x;}\n\t else\n {max=y;}\n\t d=change(a[x-1])+change(b[y-1]);\n for(i=max;i>0;i--)\n {\n\t\t x--;\n\t\t y--;\n\t\t if(d>=10)\n\t\t {\n\t\t\t *p=d-10;\t \n\t\t\t s++;\n\t\t if((x-1)>=0&&(y-1)>=0)\n\t\t\t {d=change(a[x-1])+change(b[y-1])+1;}\n\t\t else if((x-1)>=0&&(y-1)<0)\n\t\t\t {d=change(a[x-1])+1;}\n\t\t\t else if((y-1)>=0&&(x-1)<0)\n\t\t {d=change(b[y-1])+1;}\n\t\t\t else if((y-1)<0&&(x-1)<0)\n\t\t\t {*(p+1)=1;s++;}\n\t\t }\n\t\t else if(d<10)\n\t\t {\n\t\t\t *p=d;\n\t\t\t s++;\n\t\t if((x-1)>=0&&(y-1)>=0)\n\t\t\t {d=change(a[x-1])+change(b[y-1]);}\n\t\t else if((x-1)>=0&&(y-1)<0)\n\t\t\t {d=change(a[x-1]);}\n\t\t\t else if((y-1)>=0&&(x-1)<0)\n\t\t {d=change(b[y-1]);}\n\t\t\t else if((y-1)<0&&(x-1)<0)\n\t\t\t {break;}\n\t\t }\n\t\t p++;\n\t }\n\t int m;\n for(i=s-1;i>=0;i--)\n { \n\t if(c[i]!=0)\n\t {m=i;break;}\n }\n for(i=m;i>=0;i--)\n {\t printf(\"%d\",c[i]);}\n\treturn 0;\n}"} +{"label": "69", "index": "34229", "code": "int f(int *an1,int *an2);\nint an1[211],an2[211],nHighestPos = 0;\nchar num1[211],num2[211];\nint main()\n{\n int i,j,len1,len2;\n\tmemset(an1,sizeof(an1),0);\n\tmemset(an2,sizeof(an2),0);\n\tcin>>num1>>num2;\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\tfor(j=0,i=len1-1;i>=0;i--)\n\t{\n\t an1[j++]=num1[i]-'0';\n\t}\n\tfor(j=0,i=len2-1;i>=0;i--)\n\t{\n\t an2[j++]=num2[i]-'0';\n\t}\n\tnHighestPos = f(an1,an2);\n\tfor(i=nHighestPos;i>=0;i--)\n\t\tcout<=10)\n\t\t{\n\t\t an1[i]=an1[i]-10;\n\t\t\tan1[i+1]++;\n\t\t}\n\t\tif(an1[i])\n\t\t\tnHighestPos = i;\n\t}\n\treturn nHighestPos;\n}"} +{"label": "69", "index": "34230", "code": "\nvoid add()\n{\n\tchar a[255],b[255];\n\tint ua[255]={0},ub[255]={0},sum[255]={0};\n\tcin>>a>>b;\n\tint lena,lenb;\n\tlena=strlen(a),lenb=strlen(b);\n\tfor (int i=0;ilenb) max=lena;\n\telse max=lenb;\n\tint temp;\n\tfor (int i=0;i=0;i--)\n\t{\n\t\tif (sum[i]!=0)\n\t\tmark=1;\n\t\tif (mark==1)\n\t\tcout<>n;\n//\tfor (int i=0;i Y ? X : Y;\n}\nint main()\n{\n\tchar A[260],B[260];\n\tint C[260];\n\tgets(A);\n\tgets(B);\n\tint N = strlen(A);\n\tint M = strlen(B);\n\tint S = Max(N,M);\n\tmemset(C,0,sizeof(C));\n\tfor (int I = 0; I < N; I ++) C[I] = A[N - I - 1] - '0';\n\tfor (int I = 0; I < M; I ++) C[I] = C[I] + B[M - I -1] - '0';\n\tfor (int I = 0; I < S; I ++)\n\t\tif (C[I] >= 10)\n\t\t{\n\t\t\tC[I] = C[I] - 10;C[I + 1] ++;\n\t\t}\n\twhile (C[S] == 0 && S >= 0) S --;\n\tfor (int I = S; I >= 0; I --) cout << C[I];\n\tif (S<0) cout << 0;\n}"} +{"label": "69", "index": "34232", "code": "void main()\n{\n\tchar s1[250],s2[250];\n\tint a[250],b[250],c[250]; \n\tint i,j,len1,len2,max;\n\tfor(i=0;i<250;i++)\n\t{\n\t\ta[i]=0;\n\t\tb[i]=0;\n\t\tc[i]=0;\n\t}\n\n\tscanf(\"%s %s\",s1,s2);\n\tlen1=strlen(s1);\n\tlen2=strlen(s2);\n\tfor(i=0;ilen2) max=len1;\n\telse max=len2;\n\n\tfor(i=max;i>=0;i--)\n\t{\n\t\tif(c[i]!=0) break;\n\t}\n\n\tfor(j=i;j>=0;j--)\n\t\tprintf(\"%d\",c[j]);\n\tprintf(\"\\n\");\n\t}\n}\n\n\n\n\n\n"} +{"label": "69", "index": "34233", "code": "\nmain()\n{\n char str1[251],str2[251],str[289];\n int i,m,n,z,x,t,l=0;\n for(i=0;i<=251;i++)\n str[i]='\\0';\n gets(str1);\n gets(str2);\n m=strlen(str1);\n n=strlen(str2);\n z=0;\n\n if (m=n-m;i--)\n {\n x=str1[i-n+m]+str2[i]-'0'-'0'+z;\n if (x<10) str[i+1]=x+'0',z=0;\n else str[i+1]=x-10+'0',z=1;\n }\n for (i=n-m-1;i>=0;i--)\n {\n x=str2[i]+z-'0';\n if(x<10) str[i+1]=x+'0',z=0;\n else str[i+1]=x-10+'0',z=1; \n }\n if(z==1) str[0]='1';\n else str[0]='0';\n }\n else if (m>=n) \n {\n for (i=m-1;i>=m-n;i--)\n {\n x=str2[i-m+n]+str1[i]-'0'-'0'+z;\n if (x<10) str[i+1]=x+'0',z=0;\n else str[i+1]=x-10+'0',z=1;\n }\n for (i=m-n-1;i>=0;i--)\n {\n x=str1[i]+z-'0';\n if(x<10) str[i+1]=x+'0',z=0;\n else str[i+1]=x-10+'0',z=1; \n }\n if(z==1) str[0]='1';\n else str[0]='0';\n }\n\n t=strlen(str);\n for (i=0;i<=t-1;i++)\n {\n if(str[i]!='0') break;\n else l++;\n }\n if (l!=0&&l!=t)\n {\n for(i=0;i<=t;i++) str[i]=str[i+l];\n }\n else if(l==t) str[0]='0',str[1]='\\0';\n printf(\"%s\",str);\n\n}\n \n "} +{"label": "69", "index": "34234", "code": "int main()\n{\n\tint i,x,y,z,c[252],r=0,s=0;\n\tchar a[251],b[251],d[251],e[251];\n\tcin>>d>>e;\n\tfor(i=0;i<251;i++)\n\t\tc[i]=0;\n\tx=strlen(d);\n\ty=strlen(e);\n\tfor(i=0;iy)\n\t\t{\n\t\t\tfor(i=y;i=10)\n\t\t\t\t{\n\t\t\t\t\tc[i]+=-10;\n\t\t\t\t\tc[i+1]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=x+1;;i--)\n\t\t\t\tif(c[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tz=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcout<=10)\n\t\t\t\t{\n\t\t\t\t\tc[i]+=-10;\n\t\t\t\t\tc[i+1]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=y+1;;i--)\n\t\t\t\tif(c[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tz=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcout< 0; i--)\n\t{\n\t\ta[i]+=b[i];\n\t\tif(a[i] >= 10)\n\t\t{\n\t\t\ta[i]-=10;\n\t\t\ta[i-1] += 1;\n\t\t}\n\t}\n\tint flag = 0;\n\tfor(int i = 0; i < 251; i++)\n\t{\n\t\tif(a[i] != 0)\n\t\t\tflag = 1;\n\t\tif(flag)\n\t\t\tcout << a[i];\n\t}\n\tif(flag == 0)\n\t\tcout << 0;\n\tcout << endl;\n}\n"} +{"label": "69", "index": "34236", "code": "int main()\n{\n\tconst int maxlen = 202;\n\tchar szline1[maxlen];\n\tchar szline2[maxlen];\n\tint an1[maxlen];\n\tint an2[maxlen];\n\tcin.getline(szline1, maxlen);\n\tcin.getline(szline2, maxlen);\n\tint len1 = strlen(szline1);\n\tint len2 = strlen(szline2);\n\tmemset(an1, 0, sizeof (an1));\n\tmemset(an2, 0, sizeof(an2));\n\tfor (int i = len1 - 1, j = 0; i >= 0; i --)\n\t\tan1[j ++] = szline1[i] - '0';\n\tfor (int i = len2 - 1, j = 0; i >= 0; i --)\n\t\tan2[j ++] = szline2[i] - '0';\n\tint begin;\n\tfor (int i = 0; i < maxlen; i ++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif (an1[i] >= 10)\n\t\t{\n\t\t\tan1[i] -= 10;\n\t\t\tan1[i + 1] ++;\n\t\t}\n\t\tif (an1[i])\n\t\t\tbegin = i;\n\t}\n\tfor (int i = begin; i >= 0; i --)\n\t\tcout << an1[i];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34237", "code": "\nchar a1[252] , b1[252];\nint a[252] , b[252] , la , lb , l;\n\nint main ()\n{\n gets (a1); gets (b1);\n la = strlen (a1) , lb = strlen (b1) , l = la > lb ? la : lb;\n int i;\n for ( i = 0 ; i < la ; i ++ )\n a[la-i-1] = a1[i] - '0';\n for ( i = 0 ; i < lb ; i ++ )\n b[lb-i-1] = b1[i] - '0';\n for ( i = 0 ; i < l ; i ++ )\n a[i] += b[i] , a[i+1] += a[i] / 10 , a[i] %= 10;\n for ( ; a[l] == 0 && l >= 0 ; l -- );\n l ++;\n if ( l <= 0 ) l = 1;\n for ( i = l-1 ; i >= 0 ; i -- )\n printf ( \"%d\" , a[i] );\n // getchar (); getchar ();\n return 0;\n}\n"} +{"label": "69", "index": "34238", "code": "int add(int maxlen,int *num1,int *num2);\nchar a[251],b[251];\nint num1[251],num2[251],maxlen,len1,len2,highestpos;\nint main()\n{\n int i,j;\n cin>>a>>b;\n len1=strlen(a);\n len2=strlen(b);\n memset(num1,0,sizeof(num1));\n memset(num2,0,sizeof(num2));\n maxlen=(len1>len2)? len1:len2;\n for(i=len1-1,j=0;i>=0;i--,j++)\n\t num1[i]=a[j]-'0';\n for(i=len2-1,j=0;i>=0;i--,j++)\n\t num2[i]=b[j]-'0';\n highestpos=add( maxlen, num1, num2);\n for(i=highestpos;i>=0;i--)\n\t cout<=10) \n\t {\n\t\t num1[i]=num1[i]-10;\n\t\t num1[i+1]++;\n\t }\n\t if(num1[i]) highestpos=i;\n }\n return highestpos;\n}"} +{"label": "69", "index": "34239", "code": "int main()\n{\n\tunsigned str_1[250],str_2[250];\n\tchar str_a[251],str_b[251];\n\tint len_a,len_b;\n\tcin.getline(str_a,251);\n\tcin.getline(str_b,251);\n\tlen_a=strlen(str_a);\n\tlen_b=strlen(str_b);\n\tmemset(str_1,0,sizeof(str_1));\n\tmemset(str_2,0,sizeof(str_2));\n\tint i,j=0;\n\tfor(i=len_a-1;i>=0;i--)\n\t\tstr_1[j++]=str_a[i]-'0';\n\tj=0;\n\tfor(i=len_b-1;i>=0;i--)\n\t\tstr_2[j++]=str_b[i]-'0';\n\tfor(i=0;i<250;i++)\n\t{\n\t\tstr_1[i]+=str_2[i];\n\t\tif(str_1[i]>=10)\n\t\t{\n\t\t\tstr_1[i+1]++;\n\t\t\tstr_1[i]-=10;\n\t\t}\n\t}\n\tfor(i=249;i>=0;i--)\n\t\tif(str_1[i]!=0)\n\t\t\tbreak;\n\tif(i==-1)\n\t\tcout<<0;\n\telse\n\t\tfor(;i>=0;i--)\n\t\t\tcout<>num1>>num2;\n\n int maxLength;\n\tint num1Length = strlen(num1);\n\tint num2Length = strlen(num2);\n int i;\n\n\tif(num1Length >= num2Length)\n\t\tmaxLength = num1Length;\n\telse\n\t\tmaxLength = num2Length;\n \n\tint mark = 0;\n\tfor(i = 0;i < maxLength || mark == 1;i++)\n\t{\n\t\tint a = 0;\n\t\tint b = 0;\n\t\tif(i < num1Length)\n\t\t a = num1[num1Length -i - 1] - '0';\n\t\tif(i < num2Length)\n\t\t\tb = num2[num2Length -i - 1] - '0';\n\t\tint sum = a + b;\n\t\tif(mark == 1)\n\t\t\tsum++;\n\t\tif(sum >= 10)\n\t\t{\n\t\t\tsum -= 10;\n\t\t\tmark = 1;\n\t\t}\n\t\telse\n\t\t\tmark = 0;\n\t\tnum3[i] = sum + '0';\n\t}\n\tint begin = maxLength;\n\tfor(i = begin;i > 0;i--)\n\t\tif(num3[i] >= '1' && num3[i] <= '9')\n\t\t\tbreak;\n\t\telse\n\t\t\tbegin--;\n\n\tfor(i = begin;i >= 0;i--)\n\t\tcout<=10)\n\t\t{\n\t\t\tc[i]=g-10+48;\n\t\t\th=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc[i]=g+48;\n\t\t\th=0;\n\t\t}\n\t}\n\tif (h==1)\n\t{\n\t\tc[f]='1';\n\t\tf=f+1;\n\t}\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tif(c[i]!='0'&&c[i]!='a')\n\t\t{\n\t\t\tk=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(k==-1)\n\t\tprintf(\"0\");\n\telse\n\t{\n\t\tfor(i=k;i>=0;i--)\n\t\t\tprintf(\"%c\",c[i]);\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34242", "code": "char s1[201],s2[201];\nint a1[201],a2[201],nlen1,nlen2;\nint main(){\n\tint i,j;\n\tmemset(a1,0,sizeof(a1));\n\tmemset(a2,0,sizeof(a2));\n\tcin.getline(s1,201);\n\tcin.getline(s2,201);\n\tnlen1=strlen(s1);\n\tnlen2=strlen(s2);\n\tj=0;\n\tfor(i = nlen1-1; i >= 0; i--) a1[j++]=s1[i]-'0';\n\tj=0;\n\tfor(i = nlen2-1; i >= 0; i--) a2[j++]=s2[i]-'0';\n\tfor(i = 0; i <= 200; i++) a1[i]+=a2[i];\n\tfor(i = 0; i <= 200; i++){\n\t\tif(a1[i] >= 10){\n\t\t\ta1[i]-=10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\ti = 200;\n\twhile(a1[i]==0) i--;\n\tif(i<0) cout<<\"0\"<=0;i--) cout<>i;\n\treturn 0;\n}"} +{"label": "69", "index": "34243", "code": "int main()\n{ \n\tconst int MAX_LEN = 250;\n\tunsigned an1[MAX_LEN];\n\tunsigned an2[MAX_LEN];\n\tchar seLine1[MAX_LEN + 1];\n\tchar seLine2[MAX_LEN + 1];\n\tcin.getline(seLine1, MAX_LEN + 1);\n\tcin.getline(seLine2, MAX_LEN + 1);\n\tint nLen1 = strlen(seLine1);\n\tint nLen2 = strlen(seLine2);\n\tmemset(an1, 0, sizeof(an1));\n\tmemset(an2, 0,sizeof(an2));\n\tint i, j=0;\n\tfor (i = nLen1-1; i>=0; i--)\n\t\tan1[j++] = seLine1[i] - '0'; //???????????????\n\tj=0;\n\tfor (i = nLen2-1; i>=0;i--)\n\t\tan2[j++] = seLine2[i] - '0';\n\tfor (i = 0; i < MAX_LEN ;i++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif(an1[i] >= 10) //??????\n\t\t{\n\t\t\tan1[i] -=10;\n\t\t\tan1[i + 1]++; // i++?\n\t\t}\n\t}\n\ti = MAX_LEN - 1;\n\tfor(;i>=0;i--)\n\t\tif(an1[i]!=0)\n\t\t\tbreak; //???????0??\n\tif(i==-1)\n\t\tcout<<0<= 0; i--)\n\t\t\tcout << an1[i]; //??????\n\t\tcout << endl;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "69", "index": "34244", "code": "char c1[210];\nchar c2[210];\nint num1[210];\nint num2[210];\nint main()\n{\n\tcin >> c1 >> c2;\n\tmemset(num1, 0, sizeof(num1));\n\tmemset(num2, 0, sizeof(num2));\n\tif ((strcmp(c1, \"0\") == 0) && (strcmp(c2, \"0\") == 0))\n\t\tcout << 0 << endl;\n\tfor (int i = strlen(c1) - 1, j = 0; i >= 0; i--)\n\t\tnum1[j++] = c1[i] - '0';\n\tfor (int i = strlen(c2) - 1, j = 0; i >= 0; i--)\n\t\tnum2[j++] = c2[i] - '0';\n\tint len = strlen(c1) > strlen(c2) ? strlen(c1) : strlen(c2);\n\tfor (int i = 0; i < len; i++)\n\t{\n\t\tnum1[i] += num2[i];\n\t\tif (num1[i] >= 10)\n\t\t{\n\t\t\tnum1[i+1]++;\n\t\t\tnum1[i] -= 10;\n\t\t}\n\t}\n\t\n\tfor (int i = 0; i <= len; i++)\n\t\tc1[i] = num1[i] + '0';\n\tint pos = 209;\n\twhile(num1[pos] == 0)\n\t\tpos--;\n\tfor (int i = pos; i >= 0; i--)\n\t\tcout << c1[i];\n\tcout << endl;\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34245", "code": "\n\nint main()\n{\n\tint a[MAX];\n\tint b[MAX];\n\tint r[MAX];\n\tmemset(a, 0, sizeof(a));\n\tmemset(b, 0, sizeof(b));\n\tmemset(r, 0, sizeof(r));\n\n\tchar tmp[MAX];\n\tint i, len;\n\n\tcin >> tmp;\n\tlen = strlen(tmp);\n\tfor (i = 0; i < len; i++)\n\t\ta[i] = tmp[len - 1 - i] - '0';\n\n\tcin >> tmp;\n\tlen = strlen(tmp);\n\tfor (i = 0; i < len; i++)\n\t\tb[i] = tmp[len - 1 - i] - '0';\n\n\tfor (i = 0; i < MAX; i++)\n\t{\n\t\tint br = r[i] + a[i] + b[i];\n\t\tif (br < 10)\n\t\t\tr[i] = br;\n\t\telse\n\t\t{\n\t\t\tr[i] = br - 10;\n\t\t\tr[i + 1] = 1;\n\t\t}\n\t}\n\t\n\ti = MAX - 1;\n\twhile (r[i] == 0 && i > 0)\n\t\ti--;\n\n\tfor (; i >= 0; i--)\n\t\tcout << r[i];\n\tcout << endl;\n\n\treturn 0;\n}"} +{"label": "69", "index": "34246", "code": "int main(){\n\tint stop,i,count,l,j,k,mid,l1,l2,judge,b2[210]={0},b1[210]={0},re[210]={0};\n\tchar a1[210]={0},a2[210]={0};\n\tcount=0;\n\tjudge=0;\n\tscanf(\"%s%s\",a1,a2);\n\tl1=strlen(a1);\n\tl2=strlen(a2);\n\tfor(i=210-l1;i<210;i++){\n\t\tb1[i]=a1[count]-'0';\n\t\tcount++;\n\t}\n\tcount=0;\n\tfor(i=210-l2;i<210;i++){\n\t\tb2[i]=a2[count]-'0';\n\t\tcount++;\n\t}\n\tif(l2>l1){\n\t\tl=l2+1;\n\t}else{\n\t\tl=l1+1;\n\t}\n\tfor(i=209;i>=210-l;i--){\n\t\tre[i]+=b1[i]+b2[i];\n\t\tif(re[i]>=10){\n\t\t\tre[i]-=10;\n\t\t\tre[i-1]++;\n\t\t}\n\t}\n\tfor(i=210-l;i<210;i++){\n\t\tif(re[i]==0&&judge==0){\n\t\t\tcontinue;\n\t\t}\n\t\tif(judge==0){\n\t\t\tif(re[i]!=0){\n\t\t\t\tjudge++;\n\t\t\t}\n\t\t}\n\t\tif(judge!=0){\n\t\t\tprintf(\"%d\",re[i]);\n\t\t}\n\t}\n\tif(b1[209]==0&&b2[209]==0){\n\t\tprintf(\"0\");\n\t}\n\tscanf(\"%d\",&stop);\n\treturn 0;\n}"} +{"label": "69", "index": "34247", "code": "\nint main()\n{\n\tint i,l11,l21,l,s,l1,l2;\n char a[253],b[253],d[253];\n\tint a1[253],b1[253],c[253];\n scanf(\"%s\\n%s\",&a,&b);\n\tl11=strlen(a);\n\tl21=strlen(b);\n\tif (l11=0;i--)\n\t{ \n\t\ta1[i+1]=a[i]-'0';\n\t\tif (l>=0) {b1[i+1]=b[l]-'0';l--;} else b1[i+1]=0;\n\t}\n for (i=l1; i>=0;i--)\n\t{\n\t\tc[i]=a1[i]+b1[i];\n\t\tif (c[i]>=10) \n\t\t{\n\t\t\tc[i]=c[i]-10;\n a1[i-1]=a1[i-1]+1;\n\t\t}\n\t}\n s=0;\n\twhile (c[s]==0)\n s++;\n//\tfor (i=1;i<=l1;i++)\n//\t\tprintf(\"%d\",a1[i]);printf(\"\\n\");\n//\tfor (i=1;i<=l2;i++)\n//\t\tprintf(\"%d\",b1[i]);printf(\"\\n\");\n\tfor (i=s;i<=l1;i++)\n\t\tprintf(\"%d\",c[i]);\n\tif (s>l1) printf(\"0\");\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34248", "code": "main()\n{\n\tchar a[252],b[252],c[252];\n\tscanf (\"%s\",a);\n\tscanf (\"%s\",b);\n\tint i,k,m,n,p,d,e;\n\td=strlen(a);\n\te=strlen(b);\n \tif (d=58)\n\t {b[e-i-1]++; \n\t c[e-i+1]=c[e-i+1]-10;}\n }\n for (k=e-d-1;k>=1;k--)\n\t \t{\n\t\t \t\tif (b[k]>=58)\n\t\t\t\t {b[k]=b[k]-10;\t\n\t\t\t\t b[k-1]++;}\n\t\t\t\tc[k+1]=b[k];\n\t }\n\t c[1]=b[0];\n\t m=strlen(b);\n }\n\telse if(d>e)\n\t{for (i=1;i<=e;i++)\n\t { c[d-i+1]=a[d-i]+b[e-i]-'0';\n\t if (c[d-i+1]>=58)\n\t {a[d-i-1]++; \n\t c[d-i+1]=c[d-i+1]-10;}\n }\n for (k=d-e-1;k>=1;k--)\n\t \t{\n\t\t \t\tif (a[k]>=58)\n\t\t\t\t {a[k]=a[k]-10;\t\n\t\t\t\t a[k-1]++;}\n\t\t\t\tc[k+1]=a[k];\n\t }\n\t c[1]=a[0];\n\t m=strlen(a);\n }\n else if (strlen(a)==strlen(b))\n { \n\t\tfor (i=strlen(b);i>0;i--)\n {c[i+1]=a[i]+b[i]-'0';\n if (c[i+1]>=58)\n\t {b[i-1]++;\n\t c[i+1]=c[i+1]-10;}}\n\t\tc[1]=a[0]+b[0]-'0';\n\t\tm=strlen(b);\n\t}\n if (c[1]>=58)\n {c[0]='1';\n c[1]=c[1]-10;\n\t for (int l=0;l> p >> q;\n if (strlen(p) < strlen(q))//?a???????\n {\n a = q;\n b = p;\n }\n else\n {\n a = p;\n b = q;\n }\n n = strlen(a) - 1;\n m = strlen(b) - 1;\n for (j = n, k = m; k >= 0; -- j, -- k)\n a[j] += b[k] - '0';\n for (j = n; j; -- j)//????\n {\n a[j - 1] += (a[j] - '0') / 10;\n a[j] = (a[j] - '0') % 10 + '0';\n }\n if (a[0] > '9')//???????\n {\n cout << 1;\n a[0] -= 10;\n }\n else\n while (strlen(a) != 1 && a[0] == '0')\n ++ a;\n cout << a << endl;\n return 0;\n}\n"} +{"label": "69", "index": "34250", "code": "\nstruct SeqList\n{\n\tint MAXNUM;\n\tint n;\n\tint * element;\n};\ntypedef struct SeqList * pSeqList;\n\npSeqList createNullList_Seq( int m) //??????\n{\n\tint i;\n\tpSeqList palist = (pSeqList) malloc(sizeof(struct SeqList));\n\tif (palist != NULL)\n\t{\n\t\tpalist -> element = (int *)malloc(sizeof(int) * m);\n\t\tif(palist -> element)\n\t\t{\n\t\t\tpalist -> MAXNUM = m;\n\t\t\tpalist -> n = 0;\n\t\t\tfor(i=0; i element[i] = 0;\n\t\t\treturn palist;\n\t\t}\n\t\telse free( palist);\n\t}\n\tcout << \"Out of space!! \"<< endl;\n\treturn NULL;\n}\n\nint isNullList_Seq(pSeqList palist) //???????\n{ \n\treturn (palist->n == 0);\n}\n\nint initialList_Seq(pSeqList pblist) //??????\n{\n\tint i;\n\tif(isNullList_Seq(pblist)) \n\t\treturn -1;\n\n\tfor(i=0; i n; i++)\n\t\tpblist -> element[i] = 0;\n\treturn 0;\n\n}\n\nint insertEnd_Seq(pSeqList palist, int x)\n{\n\tif(palist->n >= palist->MAXNUM) //??\n\t{\n\t\tcout << \"Overflow! \" << endl;\n\t\treturn -1;\n\t}\n\tpalist->element[palist->n] = x;\n\tpalist->n += 1;\n\treturn 0;\n}\n\nint add(pSeqList num1, pSeqList num2, pSeqList sum)\n{\n\tint a = initialList_Seq( sum); //?sum????????\n\tint i;\n\tfor(i=0; i< MAX_LEN; i++) \n\t\t//?num1?num2???????????????sum??\n\t\tsum->element[i] = num1->element[i] + num2->element[i];\n\tfor(i=0; i<= MAX_LEN; i++)\n\t\tif(sum->element[i] > 9)\n\t\t{\n\t\t\tsum->element[i] -= 10;\n\t\t\tsum->element[i+1] += 1;\n\t\t}\n\treturn 0;\n\n}\n\nint printList_Seq(pSeqList result) //????\n{\n\tif(isNullList_Seq(result) == 0) //??????\n\t\treturn -1;\n\tint i;\n\tint flag = 0; \n\tfor(i=MAX_LEN; i >=0; i--)\n\t{\n\t\tif(result->element[i] != 0) //??????????????\n\t\t\tflag = 1;\n\t\tif(flag == 0) continue;\n\t\tcout << result->element[i];\n\t}\n\tif(flag == 0) cout << 0;\n\tcout << endl;\n\treturn 0;\n}\n\nint main()\n{\n\tpSeqList element1 = createNullList_Seq(MAX_LEN);\n\tpSeqList element2 = createNullList_Seq(MAX_LEN);\n\tpSeqList result = createNullList_Seq(MAX_LEN+1);\n\n\tchar szLine1[MAX_LEN+10];\n\tchar szLine2[MAX_LEN+10];\n\tcin >> szLine1 >> szLine2;\n\n\tint lenth1 = strlen(szLine1);\n\tint lenth2 = strlen(szLine2);\n\t//cout << \"eeeee1\" << endl;\n\tif(lenth1>MAX_LEN || lenth2>MAX_LEN)\n\t{\n\t\tcout << \"Input error!!\" << endl;\n\t return 0;\n\t}\n //cout << \"eeeee2\" << endl;\n\tint i;\n\tfor(i = lenth1-1; i>=0; i --)\n\t{\n\t\tint a = insertEnd_Seq(element1, szLine1[i]-'0');\n\t\tif(a == -1)\n\t\t{\n\t\t\tcout << \"Input error !! \" << endl;\n\t\t\treturn 0;\n\t\t}\n\t}\n for(i = lenth2-1; i>=0; i --)\n\t{\n\t\tint b = insertEnd_Seq(element2, szLine2[i]-'0');\n\t\tif(b == -1)\n\t\t{\n\t\t\tcout << \"Input error !! \" << endl;\n\t\t\treturn 0;\n\t\t}\n\t}\n\t//cout << \"eeeee3\" << endl;\n\tint c = add(element1, element2, result);\n\tif(c == -1)\n\t{\n\t\tcout << \"Fail in add!! \" << endl;\n\t\treturn 0;\n\t}\n\t//cout << \"eeeee4\" << endl;\n\tprintList_Seq(result);\n\t//cout << \"eeeee5\" << endl;\n\n\treturn 0;\n}"} +{"label": "69", "index": "34251", "code": "\nint main(){\n\tconst int l = 200;\n\tint n1[l + 10], n2[l +10];\n\tchar n10[l + 10], n20[l + 10];\n\tint i, j;\n\tfor(i = 0; i < l + 10; i++)\n\t\tn1[i] = n2[i] = n10[i] = n20[i] = 0;\n\tcin >> n10 >> n20;\n\tint l1 = strlen(n10);\n\tint l2 = strlen(n20);\n\ti = l1 + 1, j = 0;\n\twhile(--i){\n\t\tn1[j] = n10[i - 1] - '0';\n\t\tj++;\n\t}\n\ti = l2 + 1; j = 0;\n\twhile(--i){\n\t\tn2[j] = n20[i - 1] - '0';\n\t\tj++;\n\t}\n\tint lm = l1 > l2 ? l1 : l2;\n\tfor(i = 0; i < lm; i++){\n\t\tn1[i] += n2[i];\n\t\tif(n1[i] > 9){\n\t\t\tn1[i + 1] += n1[i] / 10;\n\t\t\tn1[i] = n1[i] % 10;\n\t\t}\n\t}\n\ti = l + 1;\n\twhile(n1[i] == 0) i--;\n\tif(i < 0) cout << '0';\n\telse{\n\t\ti++;\n\t\twhile(i--)\n\t\t\tcout << n1[i ];\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34252", "code": "int a[10000],b[10000],c[10000],d[10000];\n\nvoid jia(int a[10000],int b[10000])\n{\n int i,j,k,m;\n for (i=0;i<=9000;i++)\n c[i]=0;\n m=a[0]+b[0]-1;\n for (i=1;i<=a[0]+b[0]-1;i++)\n {\n c[i]=c[i]+a[i]+b[i];\n c[i+1]=c[i]/10;\n c[i]=c[i]%10;\n }\n j=m+10;\n while (j>1&&c[j]==0) j--;\n for (i=j;i>=1;i--)\n cout <>s1;\n cin >>s2;\n len1=strlen(s1);\n len2=strlen(s2);\n a[0]=len1;\n b[0]=len2;\n for (i=1;i<=len1;i++)\n a[len1-i+1]=((int)s1[i-1])-48;\n for (i=1;i<=len2;i++)\n b[len2-i+1]=((int)s2[i-1])-48;\n jia(a,b);\n return 0;\n}\n"} +{"label": "69", "index": "34253", "code": "int main()\n{\n\tchar cNum1[300];\n\tchar cNum2[300];\n\tcin >> cNum1 >> cNum2;\n\tint nNum1[300] = {0};\n\tint nNum2[300] = {0};\n\tint nResult[300] = {0};\n\tint i,j;\n\tfor(i = strlen(cNum1) - 1, j = 0; i >= 0; i --, j ++)\n\t{\n\t\tnNum1[j] = cNum1[i] - '0';\n\t}\n\tfor(i = strlen(cNum2) - 1, j = 0; i >= 0; i --, j ++)\n\t{\n\t\tnNum2[j] = cNum2[i] - '0';\n\t}\n\tfor(i = 0; i < 299; i ++)\n\t{\n\t\tnResult[i] = nResult[i] + nNum1[i] + nNum2[i];\n\t\tif(nResult[i] >= 10)\n\t\t{\n\t\t\tnResult[i + 1] ++;\n\t\t\tnResult[i] %= 10;\n\t\t}\n\t}\n\twhile(nResult[i] == 0 && i != 0)\n\t{\n\t\ti --;\n\t}\n\tfor( ; i >= 0; i --)\n\t{\n\t\tcout << nResult[i];\n\t}\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34254", "code": "void main()\n{\n\tchar a[251]={'\\0'},b[251]={'\\0'},c[252]={'\\0'};\n\tint i,j,len[2],t=0,k;\n\tscanf(\"%s%s\",a,b);\n\tlen[0]=strlen(a);\n\tlen[1]=strlen(b);\n if(len[0]==1&&len[1]==1)\n if(a[0]=='0'&&b[0]=='0')\n printf(\"0\");\n\tfor(i=len[0]-1,j=len[1]-1,k=251;i>=0&&j>=0;i--,j--,k--)\n\t{if(a[i]-48+b[j]-48+t>9&&a[i]-48+b[j]-48+t<20)\n\t{c[k]=a[i]-48+b[j]-10+t;\n\tt=1;}\n\telse if(a[i]-48+b[j]-48+t>=20)\n\t{c[k]=a[i]-48+b[j]-20+t;\n\tt=2;}\n\telse{\n\t\tc[k]=a[i]-48+b[j]+t;\n\tt=0;}\n\t}\n\tif(j>=0){\n\tfor(;j>=0;k--,j--)\n\t{if(t+b[j]-48>9)\n\t{c[k]=b[j]+t-10;\n\tt=1;}\n\telse\n\t{c[k]=b[j]+t;\n\tt=0;}}}\n\telse if(i>=0){\n\tfor(;i>=0;k--,i--)\n\t{if(t+a[i]-48>9)\n\t{c[k]=a[i]+t-10;\n\tt=1;}\n\telse\n\t{c[k]=a[i]+t;\n\tt=0;}}}\n\tif(t>0)\n\t{c[k]=t+48;\n\tk--;}\n\tfor(j=k+1;j<252;j++)\n\t\tif(c[j]!=48)\n break;\n for(i=j;i<252;i++)\n printf(\"%c\",c[i]);\n}\n"} +{"label": "69", "index": "34255", "code": "\n\n\nint strplus(char *strin1,char*strin2,char *strout);\n\n\n\nint main()\n\n{\n\n\tchar a[251],b[251],c[252];\n\n\tint i;\n\n\tscanf(\"%s\",&(a[1]));\n\n\tscanf(\"%s\",&(b[1]));\n\tif (a[1]=='0'&&b[1]=='0'&&a[2]==0&&b[2]==0)\n\t{\n\t\tprintf(\"0\");\n\t\treturn 0;\n\t}\n\n\ta[0]=b[0]=c[0]='0';\n\n\tstrplus(a,b,c);\n\n for (i=0;c[i]=='0';i++);\n\n\tprintf(\"%s\",c+i);\n\n\treturn 0;\n\n}\n\n\n\nint strplus(char *strin1,char*strin2,char *strout)\n\n{\n\n\tint strlen1,strlen2,strlen3;\n\n\tint i,j,k;\n\n\tint temp,carry=0;\n\n\n\n\ti=strlen1=strlen(strin1);\n\n\tj=strlen2=strlen(strin2);\n\n\tk=strlen3=(strlen1>strlen2?strlen1:strlen2);\n\n\tstrout[strlen3]=0;\n\n\twhile (1)\n\n\t{\n\n \tif (!i&&!j) break;\n\n\t\tif (i) i--;\n\n\t\tif (j) j--;\n\n\t\tk--;\n\n\t\ttemp=strin1[i]-'0'+strin2[j]-'0'+carry;\n\n\t\tcarry=temp/10;\n\n\t\tstrout[k]=temp%10+'0';\n\n\n\n\t}\nreturn 0;\n}\n"} +{"label": "69", "index": "34256", "code": "const int LEN=301;\n\nint main()\n{\n\tchar ch1[LEN]={0},ch2[LEN]={0};\n\tint an1[LEN]={0},an2[LEN]={0};\n\t//memset(an1,0,sizeof(an1));\n\t//memset(an2,0,sizeof(an2));\n\tcin.getline(ch1,LEN,'\\n');\n\tcin.getline(ch2,LEN,'\\n');\n\tint i,j=0;\n\tfor(i=strlen(ch1)-1;i>=0;i--)\n\t\tan1[j++]=ch1[i]-'0';\n\tj=0;\n\tfor(i=strlen(ch2)-1;i>=0;i--)\n\t\tan2[j++]=ch2[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tan1[i]-=10;\n\t\t\tan2[i+1]+=1;\n\t\t}\n\t}\n\tint judge=0;\n\tfor(i=LEN-1;i>=0;i--)\n\t{\n\t\tif(an1[i]!=0)\n\t\t{\n\t\t\tfor(;i>=0;i--)\n\t\t\t\tcout< strlen(plus2))\n\t{\n\t\tlen = strlen(plus1);\n\t\tfor(i = strlen(plus1) -\t1; i >= mark1 - mark2; i --)\n\t\t\tplus2[i] = plus2[i - mark1 + mark2];\n\t\tfor(i = mark1 - mark2 - 1; i >= 0; i --)\n\t\t\tplus2[i] = '*';\n\t}\n\telse if(strlen(plus2) > strlen(plus1))\n\t{\n\t\tlen = strlen(plus2);\n\t\tfor(i = strlen(plus2) -\t1; i >= mark2 - mark1; i --)\n\t\t\tplus1[i] = plus1[i - mark2 + mark1];\n\t\tfor(i = mark2 - mark1 - 1; i >= 0; i --)\n\t\t\tplus1[i] = '*';\n\t}\n\telse \n\t\tlen = strlen(plus1);\n\tfor(i = 0; i < len; i ++)\n\t\tif(plus1[i] == '*' || plus2[i] == '*')\n\t\t\tout[i + 1] = plus1[i] + plus2[i] - '*';\n\t\telse\n\t\t\tout[i + 1] = plus1[i] + plus2[i] - '0';\n\tfor(i = len; i > 0; i --)\n\t\tif(out[i] > '9')\n\t\t{\n\t\t\tout[i] = out[i] - 10;\n\t\t\tout[i - 1] ++;\n\t\t}\n\tfor(i = 0; i <= len; i ++)\n\t\tif(out[i] != '0')\n\t\t{\n\t\t\tflag = i;\n\t\t\tbreak;\n\t\t}\n\tif(i == len + 1)\n\t\tcout << '0';\n\telse\n\t\tfor(i = flag; i <= len; i ++)\n\t\t\tcout << out[i];\n\treturn 0;\n}"} +{"label": "69", "index": "34258", "code": "main()\n{\n int n,i,len1,len2;\n char str1[255],str2[255],str3[255];\n char c='0';\n scanf(\"%s %s\",str1,str2);\n char temp[255];\n if(strlen(str1)=0;i--)\n {\n if(i>=len1-len2)\n {\n if(str1[i]+str2[i-len1+len2]-'0'-'0'+jinwei<10)\n {\n str3[i]=str1[i]+str2[i-len1+len2]-'0'+jinwei;\n jinwei=0;\n }\n else\n {\n str3[i]=str1[i]+str2[i-len1+len2]-'0'+jinwei-10;\n jinwei=1;\n }\n }\n else\n {\n if(str1[i]-'0'+jinwei<10)\n { str3[i]=str1[i]+jinwei; jinwei=0;}\n else\n { str3[i]=str1[i]+jinwei-10; jinwei=1;}\n }\n }\n int y=0;\n if(jinwei==1) {c='1';printf(\"%c%s\",c,str3);}\n else\n {\n if(len1==1&&len2==1)\n { printf(\"%c\",str3[0]);}\n else{\n for(i=0;i'0')\n {y=1; printf(\"%c\",str3[i]);}\n }\n }\n }\n }\n \n return 0;\n}\n"} +{"label": "69", "index": "34259", "code": "int main()\n{\n\tint a1[256]={0},a2[256]={0};\n\tchar a11[255],a22[255];\n\tcin>>a11;\n\tcin>>a22;\n\tint len1,len2;\n\tlen1=strlen(a11);\n\tlen2=strlen(a22);\n\tint j=0;\n\tfor(int i=len1-1;i>=0;i--)\n\t\ta1[j++]=a11[i]-'0';\n\tj=0;\n\tfor(int i=len2-1;i>=0;i--)\n\t\ta2[j++]=a22[i]-'0';\n\tint temp=0;\n\tfor(int i=0;i<201;i++)\n\t{\n\t\ta1[i]=a1[i]+a2[i];\n\t\tif(a1[i]>=10)\n\t\t{\n\t\t\ta1[i+1]++;\n\t\t\ta1[i]-=10;\n\t\t}\n\t\tif(a1[i])\n\t\t\ttemp=i;\n\t}\n\tfor(int j=temp;j>=0;j--)\n\t\tcout<> arr ;\n\tlen1 = strlen(arr) ;\n\tfor ( int i = 0 ; i < len1 ; i ++ ){\n\t\ta[i] = arr[len1-i-1]-'0' ;\n\t}\n\tcin >> arr ;\n\tlen2 = strlen(arr) ;\n\tfor ( int i = 0 ; i < len2 ; i ++ ){\n\t\tb[i] = arr[len2-i-1]-'0' ;\n\t}\n\n\tint len = (len1>len2?len1:len2) ;\n\n\tfor ( int i = 0 ; i < len ; i ++ ){\n\t\tc[i] += a[i] + b[i] ;\n\t\tif ( c[i] > 9 ){\n\t\t\tc[i+1] ++ ;\n\t\t\tc[i] -= 10 ;\n\t\t}\n\t}\n\n\tfor ( int i = len ; i >= 0 ; i -- ){\n\t\tif ( c[i] != 0 ){\n\t\t\tflag = i ;\n\t\t\tbreak ;\n\t\t}\n\t}\n\tfor ( int i = flag ; i >= 0 ; i -- ){\n\t\tcout << c[i] ;\n\t}\n\tcout << endl ;\n\n\treturn 0 ;\n}"} +{"label": "69", "index": "34261", "code": "void main()\n{\n\tchar a[251],b[251],c[251],d[251];\n\tint i,t=0,m,n,l1,l2,x,j;\n\tscanf(\"%s %s\",a,b);\n\tm=strlen(a);\n\tn=strlen(b);\n\ti=0;\n\twhile(a[i]=='0')\n\t\ti++;\n\tl1=m-i;\n\tj=0;\n\twhile(b[j]=='0')\n\t\tj++;\n\tl2=n-j;\n\tif(l1>=l2)\n\t{\n\t\tfor(i=1;i<=l1;i++)\n\t\t{\n\t\t\tif(i<=l2)\n\t\t\t{x=a[m-i]+b[n-i]-96+t;\n\t\t\tc[l1-i]=x%10+48;\n\t\t\tif(x>=10)\n\t\t\t\tt=1;\n\t\t\telse\n\t\t\t\tt=0;}\n\t\t\telse\n\t\t\t{x=a[m-i]-48+t;\n\t\t\tc[l1-i]=x%10+48;\n\t\t\tif(x>=10)\n\t\t\t\tt=1;\n\t\t\telse\n\t\t\t\tt=0;\n\t\t\t}\n\t\t}\n\t\tc[l1]='\\0';\n\t\tif(t==1)\n\t\t{\n\t\t\td[0]=49;\n\t\t\td[1]='\\0';\n\t\t\tstrcat(d,c);\n\t\t}\n\t\telse\n\t\t{\n\t\t\td[0]='\\0';\n\t\t\tstrcat(d,c);\n\t\t}\n\t\tprintf(\"%s\",d);\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=l2;i++)\n\t\t{\n\t\t\tif(i<=l1)\n\t\t\t{x=a[m-i]+b[n-i]-96+t;\n\t\t\tc[l2-i]=x%10+48;\n\t\t\tif(x>=10)\n\t\t\t\tt=1;\n\t\t\telse\n\t\t\t\tt=0;}\n\t\t\telse\n\t\t\t{x=b[n-i]-48+t;\n\t\t\tc[l2-i]=x%10+48;\n\t\t\tif(x>=10)\n\t\t\t\tt=1;\n\t\t\telse\n\t\t\t\tt=0;\n\t\t\t}\n\t\t}\n\t\tc[l2]='\\0';\n\t\tif(t==1)\n\t\t{\n\t\t\td[0]=49;\n\t\t\td[1]='\\0';\n\t\t\tstrcat(d,c);\n\t\t}\n\t\telse\n\t\t{\n\t\t\td[0]='\\0';\n\t\t\tstrcat(d,c);\n\t\t}\n\t\tprintf(\"%s\",d);\n\t}\n\tif(l1==0&&l2==0)\n\t\tprintf(\"0\");\n}"} +{"label": "69", "index": "34262", "code": "int main(){\n\tchar s1[256],s2[256];\n\tint c[256]={0};\n\tint a,b,i,l1,l2,l=0;\n\tscanf(\"%s%s\",s1,s2);\n\tl1=strlen(s1);\n\tl2=strlen(s2);\n//\tprintf(\"%d %d \",l1,l2);\n\twhile(l1>0 || l2>0){\n\t\tif(l1>0){\n\t\t\ta=s1[l1-1]-'0';\n\t\t\tl1--;\t\n\t\t}\n\t\telse a=0;\n\t//\tprintf(\"%d \",a);\n\t\tif(l2>0){\n\t\t\tb=s2[l2-1]-'0';\n\t\t\tl2--;\n\t\t}\n\t\telse b=0;\n\t//\tprintf(\"%d \",b);\n\t\tc[l]+=a+b; //??!!!\n\t\tc[l+1]=c[l]/10;\n\t\tc[l]=c[l]%10;\n\t\tl++;\n\t//\tprintf(\"%d %d \",c[l-1],c[l]);\n\t}\n while(c[l]==0 && l>0) l--;\n\tfor(i=l;i>=0;i--){\n\t\tprintf(\"%d\",c[i]);\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34263", "code": "int main()\n{\n\tchar a[501], b[501];\n\tint a1[502], b1[502], result[502];\n\tint length1 = 0, length2 = 0, i = 0, j = 0, length = 0;\n\tcin.getline(a,500);\n\tcin.getline(b,500);\n\tlength1 = strlen(a);\n\tlength2 = strlen(b);\n\tmemset(a1,0,sizeof(a1));\n\tmemset(b1,0,sizeof(b1));\n\tmemset(result, 0 ,sizeof(result));\n for(i = 0; i <= length1 - 1; i++)\n\t{\n\t\ta1[i] = (int)a[length1 - 1 - i] - (int)'0';\n\t}\n\tfor(i = 0; i <= length2 - 1; i++)\n\t{\n\t\tb1[i] = (int)b[length2 - 1 - i] - (int)'0';\n\t}\n\tfor(i = 0; i <= 500; i++)\n\t{\n\t\tresult[i] = a1[i] + b1[i] + result[i];\n\t\tif(result[i] > 9)\n\t\t{\n\t\t\tresult[i] = result[i] - 10;\n\t\t\tresult[i+1]++;\n\t\t}\n\t}\n\tfor(i = 500; i >= 0; i--)\n\t{\n\t\tif(result[i] != 0)\n\t\t\tbreak;\n\t}\n\tif(i != 0)\n\t{\n\t\tfor(j = i; j >= 0; j--)\n\t\t{\n\t\t\tcout << result[j];\n\t\t}\n\t}\n\tif(i == -1)\n\t\tcout << 0;\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34264", "code": "char a[260], b[260];\nint a1[260]={0}, b1[260]={0}, result[260]={0}, i;\nvoid add(int x){\n\tfor(i=0;i=10){\n\t\t\tresult[i]=result[i]-10;\n\t\t\tresult[i+1]=1;\n\t\t}\n\t}\n}\nint main(){\n\tcin >> a >> b;\n\tint x1=strlen(a), x2=strlen(b), x;\n\tx= x1 > x2 ? x1 : x2;\n\tfor(i=0;i=0;i--)\n\t\tif(result[i]!=0)\n\t\t\tbreak;\n\t\tfor(i= i >= 0 ? i : 0; i >= 0; i--)\n\t\t\tcout << result[i];\n\t\tcout<< endl;\n\t\treturn 0;\n}\n\n"} +{"label": "69", "index": "34265", "code": "int main(){\n\tint i;\n\tchar zs1[260],zs2[260];\n\tint a1[260],a2[260];\n\tscanf(\"%s\",zs1);\n\tscanf(\"%s\",zs2);\n\tif(strcmp(zs1,zs2)==0&&zs1[0]=='0'){\n\t\tprintf(\"0\");\n\t\treturn 0;\n\t}\n\tmemset(a1,0,sizeof(a1));\n\tmemset(a2,0,sizeof(a2));\n\tint len1=strlen(zs1);\n\tint j=0;\n\tfor(i=len1-1;i>=0;i--){\n\t\ta1[j]=zs1[i]-'0';\n\t\tj++;\n\t}\n\tint len2=strlen(zs2);\n\tj=0;\n\tfor(i=len2-1;i>=0;i--){\n\t\ta2[j]=zs2[i]-'0';\n\t\tj++;\n\t}\n\tfor(i=0;i<250;i++){\n\t\ta1[i]+=a2[i];\n\t\tif(a1[i]>=10){\n\t\t\ta1[i]-=10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\tint q0=0;\n\tfor(i=251;i>=0;i--){\n\t\tif(q0)\n\t\t\tprintf(\"%d\",a1[i]);\n\t\telse if(a1[i]){\n\t\t\tprintf(\"%d\",a1[i]);\n\t\t\tq0=1;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34266", "code": "\nint main()\n{ \n\tchar a1[1000],b1[1000];\n\tint a[1000]={0},b[1000]={0};\n\tcin.getline(a1,1000);\n\tcin.getline(b1,1000);\n\tfor (int i=0;i=0;i--)\n\t{\n\t\tif (a[i]==0)\n\t\t{continue;}\n\t\telse\n\t\t{t=i;break;}\n\t}\n\tif (t==-1)\n\t{cout<<0<=0;i--)\n\t\t{\n\t\t\tcout<> str_a >> str_b;\n\n\tint len_a = strlen(str_a);\n\tint len_b = strlen(str_b);\n\n\tint mid;\n\tif(len_a%2 == 0)\n\t\tmid = len_a/2 - 1;\n\telse\n\t\tmid = len_a/2;\n\tfor(int i = 0; i <=mid; i++){\n\t\t\tint tmp = str_a[i];\n\t\t\tstr_a[i] = str_a[len_a - 1 - i];\n\t\t\tstr_a[len_a - 1 - i] = tmp;\n\t}\n\n\tif(len_b%2 == 0)\n\t\tmid = len_b/2 - 1;\n\telse\n\t\tmid = len_b/2;\n\tfor(int i = 0; i <= mid; i++){\n\t\t\tint tmp = str_b[i];\n\t\t\tstr_b[i] = str_b[len_b - 1 - i];\n\t\t\tstr_b[len_b - 1 - i] = tmp;\n\t}\n\n\t\n\tfor(int i = 0; i < len_a; i++){\n\t\ta[i] = str_a[i] - '0';\n\t}\n\tfor(int i = 0; i < len_b; i++){\n\t\tb[i] = str_b[i] - '0';\n\t}\n\n\tint in = 0;\n\tint len = 0;\n\tif(len_a >= len_b)\n\t\tlen = len_a;\n\telse\n\t\tlen = len_b;\n\tfor(int i = 0; i <= len; i++){\n\t\tint sum = a[i] + b[i] + in;\n\t\tif(sum > 9)\n\t\t{\n\t\t\tin = 1;\n\t\t\tc[i] = sum - 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tin = 0;\n\t\t\tc[i] = sum;\n\t\t}\n\t}\n\n\tint k = 0;\n\tfor(int i = len+1; i >=0; i--){\n\t\tif(c[i] != 0)\n\t\t{\n\t\t\tk = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int i = k; i >=0; i--)\n\t\tcout << c[i];\n\treturn 0;\n}"} +{"label": "69", "index": "34268", "code": "int main()\n{\n\tchar str1[201],str2[201];\n\tcin.getline(str1,201);cin.getline(str2,201);\n\tif (strcmp(str1,\"0\")==0&&strcmp(str2,\"0\")==0)\n\t\tcout<<0;\n\telse\n\t{\n\n \tint a[200]={0},b[200]={0},len1,len2,i,j=0;\n \tlen1=strlen(str1);len2=strlen(str2);\n\t\tfor(i=len1-1;i>=0;i--)\n a[j++]=str1[i]-'0';\n\t\tj=0;\n\t\tfor(i=len2-1;i>=0;i--)\n\t\t\tb[j++]=str2[i]-'0';\n\t\tfor(i=0;i<200;i++)\n\t\t{\n\t\t\ta[i]=a[i]+b[i];\n\t\t\tif(a[i]>=10)\n\t\t\t{\n\t\t\t\ta[i]=a[i]-10;\n a[i+1]++;\n\t\t\t}\n\t\t}\n\t\tfor(i=200-1;i>=0;i--)\n\t\t\tif(a[i]!=0)\n\t\t\t\tbreak;\n for(;i>=0;i--)\n\t\t\t\tcout<=48 && s1[i]<=57) s1[i]-=48;\n\t\t\telse s1[i]=0;\n\t\t\tif(s2[i]>=48 && s2[i]<=57) s2[i]-=48;\n\t\t\telse s2[i]=0;\n\t\t}\n\t\tfor(i=0; i=0; i--) n[i]=num[i]+(n[i+1]>=10);\n\t\tl=(n[0]>=10);\n\t\tfor(i=0; i<250; i++) n[i]-=10*(n[i]>=10);\n\t\tif(l==1){\n\t\t\tprintf(\"1\");\n\t\t\tfor(i=249-((l1>l2)*l1+(l1<=l2)*l2); i<250; i++) if(n[i]>0 ||i==249) break;\n\t\t\tfor(j=i; j<250; j++) printf(\"%d\", n[j]);\n\t\t}\n\t\telse{\n\t\t\tfor(i=249-((l1>l2)*l1+(l1<=l2)*l2); i<250; i++) if(n[i]>0 ||i==249) break;\n\t\t\tfor(j=i; j<250; j++) printf(\"%d\", n[j]);\n\t\t}\n\t}\n}"} +{"label": "69", "index": "34270", "code": "\nint change(char *s,int *a){\n int l=strlen(s),i,j;\n for (i=1;i<=(l>>3);i++){\n int tmp=0;\n for (j=l-(i<<3);j>3<<3)!=l){\n a[0]++;\n int tmp=0;\n for (j=0;j<(l&7);j++)\n tmp=tmp*10+s[j]-48;\n a[i]=tmp;\n }\n while (!a[a[0]]&&(a[0]>1))\n a[0]--;\n}\nint max(int a,int b){\n return((a>b)?a:b);\n}\nint add(int *a,int *b){\n int i;\n for (i=1;i<=max(a[0],b[0]);i++)\n a[i]+=b[i];\n for (i=1;i<=max(a[0],b[0]);i++)\n if (a[i]>=100000000){\n a[i+1]+=a[i]/100000000;\n a[i]%=100000000;\n }\n a[0]=max(a[0],b[0]);\n if (a[i]) a[0]++;\n}\nint main(){\n char s1[300],s2[300];\n scanf(\"%s\",s1);\n scanf(\"%s\",s2);\n int a[35],b[35];\n int i;\n memset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n change(s1,a);\n change(s2,b);\n add(a,b);\n printf(\"%d\",a[a[0]]);\n for (i=a[0]-1;i;i--){\n if (a[i]>=10000000) printf(\"%d\",a[i]);\n else if (a[i]>=1000000) printf(\"0%d\",a[i]);\n else if (a[i]>=100000) printf(\"00%d\",a[i]);\n else if (a[i]>=10000) printf(\"000%d\",a[i]);\n else if (a[i]>=1000) printf(\"0000%d\",a[i]);\n else if (a[i]>=100) printf(\"00000%d\",a[i]);\n else if (a[i]>=10) printf(\"000000%d\",a[i]);\n else printf(\"0000000%d\",a[i]);\n }\n}\n"} +{"label": "69", "index": "34271", "code": "int maxlength(int x,int y)\n{\n\tif(x>y)\n\t\treturn x;\n\telse\n\t\treturn y;\n}\nint main()\n{\n\tint i,j,k,m,n,a[N],b[N],max,l=0;\n\tchar s1[N],s2[N];\n\tfor(i=0;i=0;i--,j--)\n\t{\n\t\ta[i]=s1[j]-'0';\n\t}\n\tfor(i=k,j=n-1;j>=0;i--,j--)\n\t{\n\t\tb[i]=s2[j]-'0';\n\t}\n\tfor(i=k;i>0;i--)\n\t{\n\t\ta[i]+=b[i];\n\t\tif(a[i]>=10)\n\t\t{\n\t\t\ta[i]-=10;\n\t\t\ta[i-1]++;\n\t\t}\n\t}\n for(i=0;i<=k;i++)\n\t{\n\t\tif(a[i]!=0)\n\t\t\tbreak;\n\t\tl++;\n\t}\n\tfor(i=l;i<=k;i++)\n\t{\n\t\tprintf(\"%d\",a[i]);\n\t}\n\tif(k==1&&a[1]==0)\n\t\tprintf(\"0\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34272", "code": "char a[251], b[251];\nint c[250]={0}, d[250]={0}, e[251]={0}, maxLen=0;\nvoid f(char *str, int *num){\n\tint len = strlen(str);\n\tint i, j;\n\tfor(i = 0; i < len; i ++){\n\t\tif(a[i] != '0')\n\t\t\tbreak;\n\t}\n\tif(len - i > maxLen){\n\t\tmaxLen = len - i;\n\t}\n\tfor(j = len - 1; j >= i; j --){\n\t\tnum[len-1-j] = str[j] - '0';\n\t}\n}\nint main(){\n\tint i;\n\tcin >> a >> b;\n\tf(a, c);\n\tf(b, d);\n\tint n = maxLen;\n\tfor(i = 0; i < n; i ++){\n\t\tint jinwei = (e[i]+c[i]+d[i]) / 10;\n\t\te[i] = (e[i] + c[i]+d[i]) % 10;\n\t\te[i+1] += jinwei;\n\t}\n\tif(e[n] != 0){\n\t\tn ++;\n\t}\n\tif(n == 0){\n\t\tcout << 0 << endl;\n\t}\n\tfor(i = n - 1; i >= 0; i --){\n\t\tif(e[i] != 0){\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int j = i; j >= 0; j --){\n\t\tcout << e[j];\n\t}\n\tcout << endl;\n\treturn 0;\n}\n"} +{"label": "69", "index": "34273", "code": "char a[1000],b[1000];\nint c[1000],d[1000],result[1000];\nint main()\n{\n\tmemset(c,0,sizeof(c));\n\tmemset(d,0,sizeof(d));\n\tmemset(result,0,sizeof(result));\n\tcin>>a;\n\tcin>>b;\n\tint len1,len2,i,j=0;\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\tc[j]=a[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\td[j]=b[i]-'0';j++;\n\t}\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tresult[i+1]++;\n\t\t\tresult[i]=result[i]-10;\n\t\t}\n\t}\n\ti=999;\n\twhile(result[i]==0&&i>=0)\n\t\ti--;\n\tif(i<0)\n\t\tcout<<\"0\"<=0;j--)\n\t\t\tcout<=num2){\n\t\tfor(int j=num2-1;j>=0;j--){\n\t\t\tc[num]+=a[j+num1-num2]-'0'+b[j]-'0';\n\t\t\tif(c[num]>=10){\n\t\t\t\tc[num]-=10;\n\t\t\t\tc[num+1]+=1;\n\t\t\t}\n\t\t\tnum++;\n\t\t}\n\t\tfor(int i=num1-num2-1;i>=0;i--){\n\t\t\tc[num]+=a[i]-'0';\n\t\t\tif(c[num]>=10){\n\t\t\t\tc[num]-=10;\n\t\t\t\tc[num+1]+=1;\n\t\t\t}\n\t\t\tnum++;\n\t\t}\n\t\tif(c[num]==0){\n\t\t\tfor(int i=(num-1);i>=0;i--){\n\t\t\t\tif(c[i]!=0) flag=1;\n\t\t\t\tif(flag==1) cout<=0;i--)\n\t\t\t\tcout<=0;j--){\n\t\t\tc[num]+=b[j+num2-num1]-'0'+a[j]-'0';\n\t\t\tif(c[num]>=10){\n\t\t\t\tc[num]-=10;\n\t\t\t\tc[num+1]+=1;\n\t\t\t}\n\t\t\tnum++;\n\t\t}\n\t\tfor(int i=num2-num1-1;i>=0;i--){\n\t\t\tc[num]+=b[i]-'0';\n\t\t\tif(c[num]>=10){\n\t\t\t\tc[num]-=10;\n\t\t\t\tc[num+1]+=1;\n\t\t\t}\n\t\t\tnum++;\n\t\t}\n\t\tif(c[num]==0)\n\t\t\tfor(int i=(num-1);i>=0;i--){\n\t\t\t\tif(c[i]!=0) flag=1;\n\t\t\t\tif(flag==1) cout<=0;i--)\n\t\t\t\tcout<b) return a;else return b;\n}\nint za(int m)\n{\n\tif (m<0) return 0;else return a[m]-'0';\n}\nint zb(int m)\n{\n\tif (m<0) return 0;else return b[m]-'0';\n}\nint main()\n{\n\tcin>>a;\n\tcin>>b;\n\tp1=0;while(a[p1]!='\\0')p1++;p1--;\n\tp2=0;while(b[p2]!='\\0')p2++;p2--;\n\tc[0]=0;\n\tfor (i=0;i<=max(p1,p2)+1;i++) c[i]=za(p1-i)+zb(p2-i);\n\tfor (i=0;i<=max(p1,p2)+1;i++) \n\t{\n\t\tc[i+1]+=c[i]/10;\n\t\tc[i]=c[i]%10;\n\t}\n\tp3=900;while((c[p3]==0)&&(p3>=0))p3--;\n\tfor (i=p3;i>=0;i--) cout<<(int)c[i];\n\tif (p3<=0) cout<<0;\n\tcout< b)\n\t\treturn a;\n\treturn b;\n}\nint main()\n{\n\tchar IN_1[MAX] = {0};\n\tchar IN_2[MAX] = {0};\n\tcin.getline(IN_1,MAX);\n\tcin.getline(IN_2,MAX);\n\tint input_1[MAX] = {0};\n\tint input_2[MAX] = {0};\n\tint length_1 = strlen(IN_1);\n\tint length_2 = strlen(IN_2);\n\tfor(int i = 0; i < length_1 ;i++)\n\t\tinput_1[length_1 - i -1] = (int)(IN_1[i] - '0');\n\tfor(int i = 0; i < length_2 ;i++)\n\t\tinput_2[length_2 - i -1] = (int)(IN_2[i] - '0');\n\tint output[MAX] = {0};\n\tint i = 0;\n\tfor( ; i < larger(length_1 , length_2); i++)\n\t{\n\t\tint temp = input_1[i] + input_2[i] + output[i];\n\t\toutput[i+1] += temp /10;\n\t\toutput[i] = temp % 10;\n\t}\n\twhile(output[i] == 0)\n\t\ti--;\n\tif(i < 0)\n\t\tcout<<0;\n\tfor(;i >= 0;i--)\n\t{\n\t\tcout<=k1;i--) a1[lena-i-1]=a[i]-'0';\n for (i=lenb-1;i>=k2;i--) b1[lenb-i-1]=b[i]-'0';\n \n lena=lena-k1;\n lenb=lenb-k2;\n if (lena>lenb) max=lena; else max=lenb;}\n else \n {a1[0]=0;b1[0]=0;max=1;}\n\n \n \n for (i=0;i=10)\n {sum[i]=sum[i]-10;\n sum[i+1]++;\n }\n\n }\n \n if (sum[max]!=0) max++;\n for (i=max-1;i>=0;i--) cout<=b)\n\t{\n\t\tfor(i=0,k=0;i'9')\n\t\t\t{\n\t\t\t\tz[a-1-i]=z[a-1-i]-10;\n\t\t\t\tk=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tk=0;\n\t\t}\n\t\tfor(i=0;i'9')\n\t\t\t{\n\t\t\t\tz[a-b-1-i]=z[a-b-1-i]-10;\n\t\t\t\tk=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tk=0;\n\t\t}\n\t\tc=a;\n\t\tif(k==1)\n\t\t{\n\t\t\tfor(i=a;i>0;i--)\n\t\t\t\tz[i]=z[i-1];\n\t\t\tz[0]='1';\n\t\t\tc++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=0,k=0;i'9')\n\t\t\t{\n\t\t\t\tz[b-1-i]=z[b-1-i]-10;\n\t\t\t\tk=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tk=0;\n\t\t}\n\t\tfor(i=0;i'9')\n\t\t\t{\n\t\t\t\tz[b-a-1-i]=z[b-a-1-i]-10;\n\t\t\t\tk=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tk=0;\n\t\t}\n\t\tc=b;\n\t\tif(k==1)\n\t\t{\n\t\t\tfor(i=b;i>0;i--)\n\t\t\t\tz[i]=z[i-1];\n\t\t\tz[0]='1';\n\t\t\tc++;\n\t\t}\n\t}\n\tfor(i=0;in) t=m;\n else t=n;\n for(i=0;i9)\n {\n c[i+1]=c[i+1]+1;\n c[i]=c[i]%10;\n }\n }\n if(c[t]>0)\n t++;\n while(c[t-1]==0)\n t--;\n if(t==-1)\n printf(\"0\");\n else \n for(i=t-1;i>=0;i--)\n printf(\"%d\",c[i]);\n printf(\"\\n\");\n return 0;\n} \n"} +{"label": "69", "index": "34280", "code": "\nint m(int c[],int i);\nint main()\n{ \tconst int MAX_LEN = 251;\n int an1[MAX_LEN]={0},an2[MAX_LEN]={0},n;\n\tchar seLine1[MAX_LEN + 1]={0}; char seLine2[MAX_LEN + 1]={0};\n\t int p=0;\n\t cin.getline(seLine1, MAX_LEN + 1);\n\t cin.getline(seLine2, MAX_LEN + 1);\n\t int nLen1 = strlen(seLine1);\n\t int nLen2 = strlen(seLine2);\n\t memset(an1, 0, sizeof(an1));\n\t memset(an2, 0,sizeof(an2));\n\t int i, j=0;\n\t for (i = nLen1-1; i>=0; i--)\n\t \tan1[j++] = seLine1[i] - '0'; //???????????????\n\t j=0;\n\t for (i = nLen2-1; i>=0;i--)\n\t \tan2[j++] = seLine2[i] - '0';\n\t for (i = 0; i < MAX_LEN ;i++)\n\t {\n\t\t an1[i] += an2[i];\n\t\t p=i;\n\t\t if(m(an1,p)) //??????\n\t\t continue;\n\t }\n\t i = MAX_LEN - 1;\n\t while(an1[i]==0 && i>0) i--; //???????0??\n\t for(;i >= 0; i--)\n\t\t cout << an1[i]; //??????\n}\n\nint m(int c[],int p) //m????????\n{\n\tif (c[p]>=10) //?c[p]???10??????????c[p+1],p+1\n\t{\n\t\tc[p]-=10;\n\t\tc[p+1]++;\n\t return (c[p+1],p+1);\n\t}\n\telse //????1\n\t\treturn 1;\n}"} +{"label": "69", "index": "34281", "code": "void main()\n{\n\tchar a[300]={0},b[300]={0};\n\tint n1[300]={0},n2[300]={0},n3[300]={0},i,t,k=0;\n\tgets(a);gets(b);\n\tt=strlen(a);\n\tfor(i=0;i=0;i--)\n\t\tif(n3[i]>9){n3[i]=n3[i]-10;n3[i-1]++;}\n\tfor(i=0;i<299;i++)\n\t{\n\t\tif(n3[i]!=0&&k==0){printf(\"%d\",n3[i]);k++;}\n\t\telse if(k==1) printf(\"%d\",n3[i]);\n\t}\n\t\tprintf(\"%d\",n3[299]);\n}"} +{"label": "69", "index": "34282", "code": "int main()\n{\n char num1[250], num2[250], num3[250], t[250];\n int i, j, k, len1, len2;\n cin>>num1;\n cin>>num2;\n len1 = strlen(num1);\n len2 = strlen(num2);\n if(len1>len2)\n {\n num3[len1]='\\0';\n for(i=(len1-1);i>=(len1-len2);i--)\n {\n if(num1[i]+num2[i-(len1-len2)]<106)\n {\n num3[i]=num1[i]+num2[i-(len1-len2)]-48;\n }\n else\n {\n num3[i]=num1[i]+num2[i-(len1-len2)]-58;\n num1[i-1]=num1[i-1]+1;\n }\n }\n for(j=(len1-len2-1);j>=0;j--)\n {\n if(num1[j]>=58&&j!=0)\n {\n num3[j]=num1[j]-10;\n num1[j-1]=num1[j-1]+1;\n } \n if(num1[j]>=58&&j==0)\n {\n num3[j]=num1[j]-10;\n cout<<\"1\"<=(len2-len1);i--)\n {\n if(num2[i]+num1[i-(len2-len1)]<106)\n {\n num3[i]=num2[i]+num1[i-(len2-len1)]-48;\n }\n else\n {\n num3[i]=num2[i]+num1[i-(len2-len1)]-58;\n num2[i-1]=num2[i-1]+1;\n }\n }\n for(j=(len2-len1-1);j>=0;j--)\n {\n if(num2[j]>=58&&j!=0)\n {\n num3[j]=num2[j]-10;\n num2[j-1]=num2[j-1]+1;\n } \n if(num2[j]>=58&&j==0)\n {\n num3[j]=num2[j]-10;\n cout<<\"1\"<=0;i--)\n {\n if(i>0)\n {\n if(num1[i]+num2[i]<106)\n {\n num3[i]=num1[i]+num2[i]-48;\n }\n if(num1[i]+num2[i]>=106)\n {\n num3[i]=num1[i]+num2[i]-58;\n num1[i-1]=num1[i-1]+1;\n } \n }\n if(i==0)\n {\n if(num1[0]+num2[0]>=106)\n {\n num3[0]=num1[0]+num2[0]-58;\n cout<<\"1\"<m)\n\t\tC[i]=A[i];\n\t\telse if(m>n)\n\t\tC[i]=B[i];\n\t}\n\tfor(int i=0;i9)\n\t\t{\n\t\t\tC[i+1]++;\n\t\t\tC[i]-=10;\n\t\t}\n\t}\n\tif(C[l]>0)\n\t\tl++;\n\tfor(int i=l-1;i>=0;i--)\n\t{\n\t\tif(C[i]==0&&g==0)\n\t\t\tcontinue;\n\t\tif(C[i]!=0)\n\t\t\tg=1;\n\t\tif(g==1)\n\t cout<<(int)C[i];\n\t}\n\tif(g==0)\n\t\tcout<<\"0\";\n\treturn 0;\n}"} +{"label": "69", "index": "34284", "code": "int main()\n{\n\tchar a[255],b[255];\n\tint k[255]={0};\n\tint c,d,e,i,f;\n\tgets(a);\n\tgets(b);\n\tc=(int)strlen(a);\n\td=(int)strlen(b);\n\tfor(i=0;id)\n\t{\n\t\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tc=i;\n\t \tif(k[i]!=0)\n\t\t\t{\n\t\t \tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(i=c;i>=0;i--)\n\t\t{\n\t\t printf(\"%d\",k[i]);\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\td=i;\n\t \tif(k[i]!=0)\n\t\t\t{\n\t\t \tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(i=d;i>=0;i--)\n\t\t{\n\t \tprintf(\"%d\",k[i]);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34285", "code": "int main()\n{\n\tint i,j,la,lb,l,a2[251],b2[251],result[251];\n\tchar a[251],b[251];\n\tcin.getline(a,251);\n\tcin.getline(b,251);\n\tla=strlen(a);\n\tlb=strlen(b);\n\tif(la>lb) l=la;\n\telse l=lb;\n\tmemset(result,0,sizeof(result));\n\tmemset(a2,0,sizeof(a2));\n\tmemset(b2,0,sizeof(b2));\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tresult[i]=result[i]-10;\n\t\t\tresult[i+1]++;\n\t\t}\n\t}\n\tif((a2[0]==0)&&(b2[0]==0)) cout<<'0';\n\telse \n\t{\n\t\tfor(i=250;i>0;i--)\n\t\t{\n\t\t\tif(result[i]!=0) break;\n\t\t}\n\t\tfor(j=i;j>=0;j--)\n\t\t\tcout<lb?la:lb;\n // printf(\"%d %d %d\\n\",la,lb,len);\n int i=0,j=0,m=0;\n for(i=la-1;i>=0;i--)\n x[j++]=a[i]-'0';\n j=0;\n for(i=lb-1;i>=0;i--)\n y[j++]=b[i]-'0';\n if(len>la)\n for(i=la;ilb)\n for(i=lb;i=0;i--)\n if(c[i]!='0'&&c[i]!=0)break;\n for(;i>=0;i--)\n printf(\"%c\",c[i]);\n printf(\"\\n\");\n //printf(\"%s\\n%s\\n\",a,b);\n return 0;\n}\n"} +{"label": "69", "index": "34287", "code": "\nint main()\n{\n\tchar s1[251],s2[251],s3[252],c;\n\tint i,l1,l2,l3,s,temp=0;\n\tcin>>s1>>s2;\n\tl1=strlen(s1);\n\tl2=strlen(s2);\n\tif (l1=0;i--)\n\t\ts2[i+l1-l2]=s2[i];\n\tfor (i=0;i=0;i--)\n\t{\n\t\ts=s1[i]-'0'+s2[i]-'0'+temp;\n\t\tif (s>9)\n\t\t{\n\t\t\ttemp=1;\n\t\t\ts3[i]=s-10+'0';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttemp=0;\n\t\t\ts3[i]=s+'0';\n\t\t}\n\t}\n\ts3[l1]='\\0';\n\t\n\tif (temp)\n\t{\n\t\tl3=strlen(s3);\n\t\tfor (i=l3;i>=0;i--)\n\t\t\ts3[i+1]=s3[i];\n\t\ts3[0]='1';\n\t}\n\n\tint counter=0;\n\tl3=strlen(s3);\n\tfor (i=0;i=0;i--)\n\t{\n\t\tif (m==la)\n\t\t{\n\t\t\tif (i>=la-lb)\n\t\t\t\tb[i]=b[i-la+lb];\n\t\t\telse b[i]='0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif (i>=lb-la)\n\t\t\t\ta[i]=a[i+la-lb];\n\t\t\telse a[i]='0';\n\t\t}\n\t}\n//printf(\"%s\\n%s\\n\",a,b);\n\tfor (i=0; i<=m;i++)\n\t\tc[i]='0';\n\n\tfor (i=m;i>=1;i--)\n\t{\n\t\tc[i]=a[i-1]+b[i-1]+c[i]-96;\n\t\tif (c[i]>57)\n\t\t{\n\t\t\tc[i]=c[i]-10;\n\t\t\tc[i-1]++;\n\t\t}\n\t}\n tt=0;\n\tfor (i=0;i<=m;i++)\n\t{\n\t\tif (c[i]!='0')\n\t\t\ttt=1;\n\t\tif ((c[i]=='0') && (tt==0))\n\t\t\tcontinue;\n\t\telse \n\t\t\tprintf(\"%c\",c[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34289", "code": "\nint main()\n{\n\tchar a[251],b[251];\n\tcin>>a>>b;\n\tint len1=strlen(a);\n\tint len2=strlen(b);\n\tif(len1==1 && len2==1 && a[0]=='0' && b[0]=='0')\n\t{\n\t\tcout<<0<len2)\n\t{\n\t\tchar temp[251];\n\t\tstrcpy(temp,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,temp);\n\t}\n\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\t\tint over=0;\n\t\tint i;\n\t\tfor(i=len1-1;i>=0;i--)\n\t\t{\n\t\t\tint t=len2-len1+i;\n\t\t\tb[t]+=a[i]-'0';\n\t\t\tif(b[t]>'9')\n\t\t\t{\n\t\t\t\tb[t]-=10;\n\t\t\t\tif(t>0)\n\t\t\t\t\tb[t-1]+=1;\n\t\t\t\telse\n\t\t\t\t\tover=1;\n\t\t\t}\n\t\t}\n\t\tfor(i=len2-1;i>0;i--)\n\t\t{\n\t\t\tif(b[i]>'9')\n\t\t\t{\n\t\t\t\tb[i]-=10;\n\t\t\t\tb[i-1]+=1;\n\t\t\t}\n\t\t}\n\t\tif(b[0]>'9')\n\t\t{\n\t\t\tb[0]-=10;\n\t\t\tover=1;\n\t\t}\n\t\tif(over>0)\n\t\t\tcout<=48 && s1[i]<=57) s1[i]-=48;\n\t\telse s1[i]=0;\n\t\tif(s2[i]>=48 && s2[i]<=57) s2[i]-=48;\n\t\telse s2[i]=0;\n\t}\n\tfor(i=0; i=0; i--) n[i]=num[i]+(n[i+1]>=10);\n\tl=(n[0]>=10);\n\tfor(i=0; i<250; i++) n[i]-=10*(n[i]>=10);\n\tif(l==1){\n\t\tprintf(\"1\");\n\t\tfor(i=249-((l1>l2)*l1+(l1<=l2)*l2); i<250; i++) if(n[i]>0 || i==249) break;\n\t\tfor(j=i; j<250; j++) printf(\"%d\", n[j]);\n\t}\n\telse{\n\t\tfor(i=249-((l1>l2)*l1+(l1<=l2)*l2); i<250; i++) if(n[i]>0 || i==249) break;\n\t\tfor(j=i; j<250; j++) printf(\"%d\", n[j]);\n\t}\n}}"} +{"label": "69", "index": "34291", "code": "/****???:???****/\n/**??:2012?3?5?**/\n/**??:1100012450****/\n/**?????????*/\n/**????????????**/\nint count=1,x1=0;//?????create???print??\nstruct Node; //????\ntypedef struct Node *PNode;\nstruct Node{\n int num;\n PNode llink;\n PNode rlink;\n};\ntypedef struct Node *Linklist;\nLinklist createNullList_link(void) //?????\n{\n PNode p=(PNode)malloc(sizeof(struct Node));\n if(p!=NULL) p->rlink=p->llink=NULL;\n else printf(\"out of space!\\n\");\n return (p);\n}\nLinklist create() //????????\n{\n //printf(\"????%d????\\n\",count);\n char c; //???????\n int X=0;\n Linklist p;\n p=createNullList_link();\n p->rlink=NULL;\n while((c=getchar())!='\\n') //???????????????????\n {\n PNode q=(PNode)malloc(sizeof(struct Node));\n if(q!=NULL)\n {\n if(c=='-') {X=1;continue;}\n if(X==1) q->num=-1*(c-'0'); //???????????\n else q->num=c-'0';\n q->rlink=p;\n q->llink=NULL;\n p->llink=q;\n p=q;\n }\n else\n printf(\"out of space!\\n\");\n }\n count++; //???????????\n return (p);\n}\nvoid print(Linklist llist) //???????\n{\n int x0=0;\n while(llist->rlink!=NULL)\n {\n if(llist->num>0&&llist->rlink->num<0) //????????\n {\n llist->num--;\n llist->rlink->num+=10;\n }\n if(llist->num==0&&llist->rlink->num<0)\n {\n printf(\"-\");\n }\n if(x0==0&&llist->rlink->rlink!=NULL&&llist->num==0&&x1==0) //?????????????0\n {\n llist=llist->rlink;\n continue;\n }\n printf(\"%d\",abs(llist->num));\n llist=llist->rlink;\n x0++;\n }\n}\nLinklist add(Linklist p1,Linklist p2,Linklist q) //????\n{\n int Jw=0;//????\n int out=0;//?????????\n while((p1->rlink!=NULL)||(p2->rlink!=NULL))\n {\n if((p1->rlink!=NULL)&&(p2->rlink!=NULL))\n {\n out=p1->num+p2->num+Jw;\n p1=p1->rlink;\n p2=p2->rlink;\n }\n else if((p1->rlink==NULL)&&(p2->rlink!=NULL))//??1???????????2????1?\n {\n out=0+p2->num+Jw;\n p2=p2->rlink;\n }\n else//??2???????????1????2?\n {\n out=p1->num+0+Jw;\n p1=p1->rlink;\n }\n\n Jw=0;\n PNode p=(PNode)malloc(sizeof(struct Node));\n if(p==NULL) printf(\"out of space!\\n\");\n if(out>0||out==0)\n p->num=(out%10);\n else\n {\n p->num=-1*((-1*out)%10);\n }\n p->rlink=q;\n p->llink=NULL;\n q->llink=p;\n q=p;\n if(out>0||out==0)\n Jw=out/10;\n else if(out<(-1*9))\n Jw=-1;\n }\n // printf(\"???????\\n\");\n if(Jw==1) {printf(\"1\");x1=1;} //??????????1????????????\n if(Jw==-1&&out!=0) {printf(\"-1\");x1=1;} //????????????1???\n else if(out<0) printf(\"-\"); //??\n return q;\n}\nvoid destroy1List_link(Linklist llist) //??????\n{\n PNode p;\n while(llist!=NULL)\n {\n p=llist;\n llist=llist->rlink;\n free(p);\n }\n}\nvoid destroy2List_link(Linklist llist) //??????\n{\n PNode p;\n while(llist!=NULL)\n {\n p=llist;\n llist=llist->llink;\n free(p);\n }\n}\nint main()\n{\n // printf(\"?????????????????\\n\");\n Linklist l1,l2,l3;\n l1=create(); //????????\n l2=create(); //????????\n l3=(PNode)malloc(sizeof(struct Node)); //??????\n if(l3==NULL)\n printf(\"out of space!\\n\");\n l3->rlink=l3->llink=NULL;\n l3=add(l1,l2,l3);//???????????????l3\n print(l3);//??????\n destroy2List_link(l3);\n destroy1List_link(l1);\n destroy1List_link(l2);\n //printf(\"\\n?????\\n\");\n return 0;\n}\n"} +{"label": "69", "index": "34292", "code": "int main()\n{\n int i,m,ma1,a1,b1,n=0;//????\n char a[251],b[251],c[252];\n cin.getline(a,250);//????\n cin.getline(b,250);\n a1=strlen(a);//??????\n b1=strlen(b);\n if(a1>=b1)//?0\n {\n m=a1;\n for(i=b1-1;i>=0;i--) b[i+a1-b1]=b[i];\n for(i=0;i=0;i--) a[i+b1-a1]=a[i];\n for(i=0;i=0;i--)//??????\n {\n if((a[i]+b[i]-96+n)<10) { c[i+1]=a[i]+b[i]-48+n;n=0;}\n else { c[i+1]=a[i]+b[i]-48-10+n;n=1;}\n\n }\n if(n==1) //????\n {\n c[0]='1';\n for(i=0;i<=m;i++) cout<=n-m)\n b[n-2-i]++;\n else\n N=1;\n }\n }\n if (N==0)\n {\n for(int i=0;in)\n f(b,a,c);\n else\n f(a,b,c);\n printf(\"%s\\n\",c);\n}"} +{"label": "69", "index": "34294", "code": "void main()\n{\n\tchar a[1000]={0},b[1000]={0},c[1000]={0};\n\tint na,nb,i,sum,add=0,max,flag;\n\tscanf(\"%s\\n%s\",a,b); /* ????? */\n \n\tna=strlen(a);\n\tnb=strlen(b);\n\t\n\tif(na>=nb)\n\t{\n\t\tmax=na;\n\t\tfor(i=na-1;i-na+nb>=0;i--)\n\t\t\tb[i]=b[i-na+nb];\n\t\tfor(i=0;i=0;i--)\n\t\t\ta[i]=a[i-nb+na];\n\t\tfor(i=0;i0;i--)\n\t{\n sum=(a[i-1]-48)+(b[i-1]-48)+add;\n add=sum/10;\n c[i]=sum-add*10;\n\t}\n\n\tif(add!=0)\n\t{\n\t\tprintf(\"%d\",add);\n\t\tfor(i=1;i<=max;i++)\n\t\t\tprintf(\"%d\",c[i]);\n\t}\n\n\telse if(add==0)\n\t{\t\t\n\t\tfor(i=1;i<=max;i++) /* ?c??????0??? */\n\t\t{\n\t\t\tif(c[i]!=0)\n\t\t\t{\n\t\t\t\tflag=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if(c[i]==0)\n\t\t\t\tflag=0;\n\t\t}\t\n\t\tif(flag==0) /*??0*/\n\t\t\tprintf(\"0\");\n\t\telse\n\t\t\tfor(i=flag;i<=max;i++)\n\t\t\t\tprintf(\"%d\",c[i]);\n\t}\n}"} +{"label": "69", "index": "34295", "code": "\nint main()\n{\n\tchar a[300];\n\tchar b[300];\n\tchar c[300];\n\tmemset(c,0,sizeof(char)*300);\n\tcin>>a;\n\tcin>>b;\n\tint ci = 299;\n\tint ai = strlen(a)-1;\n\tint bi = strlen(b)-1;\n\tint jinwei = 0;\n\twhile(ai>=0 && bi>=0)\n\t{\n\t\tc[ci] = (jinwei+a[ai]+b[bi]-2*'0')%10 + '0';\n\t\tjinwei = (jinwei+a[ai]+b[bi]-2*'0')/10;\n\t\tai--;\n\t\tbi--;\n\t\tci--;\n\t}\n\twhile(ai>=0)\n\t{\n\t\tc[ci] = (jinwei+a[ai]-'0')%10 +'0';\n\t\tjinwei = (jinwei+a[ai]-'0')/10;\n\t\tci--;\n\t\tai--;\n\t}\n\twhile(bi>=0)\n\t{\n\t\tc[ci] = (jinwei+b[bi]-'0')%10 +'0';\n\t\tjinwei = (jinwei+b[bi]-'0')/10;\n\t\tci--;\n\t\tbi--;\n\t}\n\twhile(ci>=0)\n\t{\n\t\tc[ci] = jinwei + '0';\n\t\tjinwei = 0;\n\t\tci--;\n\t}\n\tint i;\n\tfor(i=0;i<300;i++)\n\t{\n\t\tif(c[i]>'0')\n\t\t\tbreak;\n\t}\n\tif(i==300)\n\t\tcout<<0<nxt=NULL; \n}//????\nvoid Store(num *p,int x)\n{\n num *p1;\n p1=(num*)malloc(sizeof(num));\n p1->nxt=p->nxt;\n p1->x=x;\n p->nxt=p1; \n}//???????\nint main()\n{\n char c1[200],c2[200];\n int i,x1,x2,n,s=0;\n Create();\n scanf(\"%s\",c1);\n scanf(\"%s\",c2);//?????\n for(i=0;c1[i]!='\\0';i++) \n\t x1=i;\n for(i=0;c2[i]!='\\0';i++) \n\t x2=i;//???????\n if((c1[0]!='-' && c2[0]!='-') || (c1[0]=='-' && c2[0]=='-'))//????\n {\n\t if(c1[0]=='-' && c2[0]=='-')\n\t {\n\t\tfor(i=0;ix2);//????\n\t if(n==0)\n\t {\n\t\tif(x1==x2)\n\t\t{\n\t\t\tfor(i=0;i0;i--) \n\t\t{\n\t\t\ts+=c2[i]-'0';\n\t\t\tStore(pHeader,s%10);\n\t\t\ts=s/10;\n\t\t}//???10????????\n\t\tc2[0]+=s;\n\t\tStore(pHeader,c2[0]-'0');//?????????\n\t\t}\n\t }\n\t else\n\t {\n\t\tfor(i=0;i<=x2;i++)\n\t\t{\n\t\t\ts+=c1[x1-i]-'0'+c2[x2-i]-'0'; \n\t\t\tStore(pHeader,s%10);\n\t\t\ts=s/10; \n\t\t}//????????,??,??\n\t\tc1[x1-x2-1]=c1[x1-x2-1]+s;\n\t\ts=0;\n\t\tfor(i=(x1-x2-1);i>0;i--) \n\t\t{\n\t\t\ts+=c1[i]-'0';\n\t\t\tStore(pHeader,s%10);\n\t\t\ts=s/10;\n\t\t}//???10????????\n\t\tc1[0]+=s;\n\t\tStore(pHeader,c1[0]-'0');//?????????\n\t }\n } \n else if(c1[0]=='-' || c2[0]=='-')//????\n {\n\t\tif(c1[0]=='-')\n\t\t{\n\t\t\tfor(i=0;i0;i--) \n\t\t\t{\n\t\t\t\ts+=c2[i];\n\t\t\t\tif(s<0)\n\t\t\t\t{\n\t\t\t\t\ts+=10;\n\t\t\t\t\tc2[i-1]--;\n\t\t\t\t}\n\t\t\t\tStore(pHeader,s);\n\t\t\t}//?????????????\n\t\t\tStore(pHeader,c2[0]-'0');//?????\n\t\t\tif(n==2)\n\t\t\t\tprintf(\"-\");//????????,????\n\t\t}\n\t\tif(x1>x2)\n\t\t{\n\t\t\tfor(i=0;i<=x2;i++)\n\t\t\t{\n\t\t\t\ts=c1[x1-i]-'0'-(c2[x2-i]-'0'); \n\t\t\t\tif(s<0)\n\t\t\t\t{ \n\t\t\t\t\ts+=10;\n\t\t\t\t\tc1[x1-1-i]--;\n\t\t\t\t}\n\t\t\t\tStore(pHeader,s); \n\t\t\t}//????????,??,??\n\t\t\ts=0;\n\t\t\tfor(i=(x1-x2-1);i>0;i--) \n\t\t\t{\n\t\t\t\ts+=c1[i];\n\t\t\t\tif(s<0)\n\t\t\t\t{\n\t\t\t\t\ts+=10;\n\t\t\t\t\tc1[i-1]--;\n\t\t\t\t}\n\t\t\t\tStore(pHeader,s);\n\t\t\t}//?????????????\n\t\t\tStore(pHeader,c1[0]-'0');//?????\n\t\t\tif(n==1)\n\t\t\t\tprintf(\"-\");//????????,????\n\t\t}\n\t\tif(x1==x2)\n\t\t{\n\t\t\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tStore(pHeader,s);\n\t\t\t\tif(n==1)\n\t\t\t\t\tprintf(\"-\");//????????,????\n\t\t\t}\n\t\t}\n }\n num *p0;\n p0=pHeader->nxt;\n while(p0->x==0 && p0!=NULL)\n {\n\t if(p0->nxt==NULL)\n\t {\n\t\t printf(\"%d\",p0->x);\n\t\t p0=p0->nxt;\n\t\t break;\n\t }\n\t p0=p0->nxt;\n }//??0?????0??\n while(p0!=NULL)\n {\n\t printf(\"%d\",p0->x);\n\t p0=p0->nxt;\n }\n while(pHeader!=NULL)\n {\n p0=pHeader;\n\t pHeader=pHeader->nxt;\n free(p0); \n } //????\n return 0;\n}"} +{"label": "69", "index": "34297", "code": "\n\nint main()\n{\n\tint i, l1, l2, j = 251, up = 0, m;\n\tchar a[251], a2[252];\n\tchar b[251], b2[252];\n\tchar result[252]; \n\tm = 0;\n\tup = 0;\n\t\tcin >> a;\n\t\tcin >> b;\n\t\tl1 = strlen(a);\n\t\tl2 = strlen(b);\n\t\tfor (i = 0; i < 251; i++)\n\t\t{\n\t\t\ta2[i] = '0'; \n\t\t\tb2[i] = '0'; \n\t\t\tresult[i] = '0';\n\t\t}\n\t\tj = 250;\n\t\tfor(i = l1 - 1; i >= 0; i--)\n\t\t{\n\t\t\ta2[j] = a[i];\n\t\t\tj--;\n\t\t}\n\t\tj = 250;\n\t\tfor(i = l2 - 1; i >= 0; i--)\n\t\t{\n\t\t\tb2[j] = b[i];\n\t\t\tj--;\n\t\t}\n\t\tb2[251] = '\\0'; \n\t\ta2[251] = '\\0'; \n\t\tresult[251] = '\\0';\n\t\tfor (i = 250; i >=0; i --)\n\t\t{\n\t\t\tm = (up + ((a2[i] - '0') +(b2[i] - '0')))% 10;\n\t\t\tresult[i] = m + '0'; \n\t\t\tup =(up +(a2[i] - '0') +(b2[i] - '0')) / 10;\n\t\t}\n\t\tfor (i = 0; i < 250; i++)\n\t\t{\n\t\t\tif (result[i] != '0')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\tcout << result+ i;\n\t\tcout <=0; i--, j++)\n\t\tan1[j] = seLine1[i] - '0'; \n\tfor (i = nLen2-1,j=0; i>=0; i--, j++)\n\t\tan2[j] = seLine2[i] - '0';\n\n\n\tc = 0;\n\tfor (i = 0; i < MAX_LEN ; i++)\n\t{\n\t\tsum[i] = an1[i] + an2[i] + c;\n\t\tc=0;\n\t\twhile(sum[i] >= 10)\n\t\t{\n\t\t\tsum[i] -= 10;\n\t\t\tc++;\t\n\t\t}\n \n\t}\n\ti = MAX_LEN-1;\n\twhile(sum[i]==0) i--;\n\tif(i==-1)printf(\"0\"); \n\tfor(;i >= 0; i--)\n\t\tprintf(\"%d\", sum[i]); \n\tprintf(\"\\n\");\n\n\treturn 0;\n}\n"} +{"label": "69", "index": "34299", "code": "main()\n{\n int l1,l2,l,m,i,k,g,f;\n char str1[250],str2[250],str3[252],str4[251];\n gets(str1);\n gets(str2);\n\n l1=strlen(str1);\n \n l2=strlen(str2);\n if( l1==1&&l2==1&&str1[0]=='0'&&str2[0]=='0')\n printf(\"%s\",str1);\n else\n { \n // printf(\"%d %d\",l1,l2);\n if(l1>l2)\n {\n \n l=l1;m=l1-l2; \n \n for(i=m;i<=l-1;i++)\n {\n str4[i]=str2[i-m];\n }\n for(i=0;i'9')\n {\n str3[i+1]=g+str1[i]+str2[i]-58;\n g=1; \n //printf(\"%c %c\\n\",str1[i],str1[i]); \n //printf(\"%c\",str3[i+1]) ; \n }\n else\n {\n str3[i+1]=str1[i]+str2[i]+g-48;\n g=0;\n }\n }\n str3[l+1]='\\0';\n k=0;\n \n if(g==1)\n str3[0]='1';\n if(g==0)\n {\n for(i=0;i<=l;i++)\n str3[i]=str3[i+1];\n }\n for(i=0;;i++)\n {\n if(str3[i]!='0')\n break;\n k=k+1;\n \n } \n //printf(\"%d\",k); \n for(i=0;i<=l;i++)\n {\n str3[i]=str3[i+k]; \n // printf(\"%c\",str3[i]);\n }\n //printf(\"%c\",str3[0]);\n \n printf(\"%s\\n\",str3);\n \n \n \n }\n }\n \n \n \n \n \n \n \n \n \n"} +{"label": "69", "index": "34300", "code": "void main()\n{\n\tchar a[251],b[251],t='0';\n\tint c[252]={0},d[252]={0},l,l1,l2,i,x=0,l0=0;\n\tgets(a);\n\tgets(b);\n\tl1=strlen(a);\n\tl2=strlen(b);\n\tif(l1>l2)\n\t{\n\t\tl=l1;\n\t\tfor(i=l2;i=0;i--)\n\t\t{\n\t\t\tt=b[i];b[i]=b[l-l2+i];b[l-l2+i]=t;\n\t\t}\n\t}\n\telse if(l1=0;i--)\n\t\t{\n\t\t\tt=a[i];a[i]=a[l-l1+i];a[l-l1+i]=t;\n\t\t}\n\t}\n\telse l=l1;\n\tif(l==1) {x=a[0]+b[0]-96;printf(\"%d\",x);}\n\telse\n\t{\n\t\tfor(i=l-1;i>0;i--)\n\t\t{\n\t\t\tc[i]=a[i]+b[i]-96+c[i];\n\t\t\tif(c[i]>9)\n\t\t\t{\n\t\t\t\tc[i]=c[i]-10;\n\t\t\t\tc[i-1]=c[i-1]+1;\n\t\t\t}\n\t\t}\n\tc[0]=c[0]+a[0]+b[0]-96;\n\tif(c[0]>9)\n\t{\n\t\tc[0]=c[0]-10;c[l]=1;\n\t}\n\tif(c[l])\n\t{\n\t\tprintf(\"%d\",c[l]);\n\t\tfor(i=1;i<=l;i++) printf(\"%d\",c[i-1]);\n\t}\n\telse\n\t{\n\t\tl0=l;\n\t\tfor(i=1;i<=l;i++)\n\t\t\tif(c[i-1]==0) l0--;else break;\n\t\tif(l0l-l0;i--) d[l-i]=c[i-1];\n\t\t\tfor(i=l0;i>=1;i--) printf(\"%d\",d[i-1]);\n\t\t}\n\t\telse for(i=1;i<=l;i++) printf(\"%d\",c[i-1]);\n\t}\n\t}\n\tprintf(\"\\n\");\n}\n\n\n\t\t\t"} +{"label": "69", "index": "34301", "code": "int main()\n{\n char str1[300],str2[300];\n cin.getline(str1,300);\n cin.getline(str2,300);\n int a[300]={0},a1[300]={0},a2[300]={0},t1,t2;\n t1=strlen(str1);\n t2=strlen(str2);\n for(int i=0;i=0;j--)\n {\n if(a[j]!=0)\n break;\n }\n if(j==-1)\n cout<=0;i--)\n cout<=lenth[1]) //???????????????????????????????????????????????\n\t{\n\t\tlenth[2]=lenth[0];\n\t\tfor(i=0;i=0)&&(j>=0);i--,j--,k--)\n\t{\n\t\tnum[2][k]=num[0][i]-'0'+num[1][j]-'0'; //?????????\n\t\tif(sign==1) //?????????????????\n\t\t\tnum[2][k]++;\n\t\tsign=0; //?????????\n\t\tif((int)num[2][k]>=10) //?????????????10??????10??????????????????1\n\t\t{\n\t\t\tnum[2][k]=num[2][k]-10+'0';\n\t\t\tsign=1;\n\t\t}\n\t\telse num[2][k]+='0'; //?????????\n\t}\n\n\tif(sign==1) //??????????????????\n\t\t{\n\t\tif(lenth[0]==lenth[1]) //?????????????????????\n\t\tsign2=1;\n\t\telse\n\t\t{\n\t\t\twhile(num[2][k]=='9') //????????????9??????0?????????????????9?\n\t\t\t{\n\t\t\t\tnum[2][k]='0';\n\t\t\t\tk--;\n\t\t\t\tif(k<0)\n\t\t\t\t{\n\t\t\t\t\tsign2=1; //????????????????????????\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(k>=0) //??????9??????????\n\t\t\tnum[2][k]++;\n\t\t}\n\t\t}\n\tif(sign2==1) //?????????????????????????????1\n\t\tcout<<1;\n\tif(sign2!=1) //??????????1???????\n\tfor(i=0;i9)\n\t\t\t{\n\t\t\tresult[i+1]+=result[i]/10;\n\t\t\tresult[i]=result[i]%10;\n\t\t\t}\n\tbool startOutput=false; //?????????????????????????????0?\n\tfor(i=403;i>=0;i--) //?????????0?????????\n\t\tif(startOutput)\n\t\t\tcout<>s1>>s2;\n int l1=strlen(s1),l2=strlen(s2);\n int g=0;\n char ans[2*MAX];\n int iter;\n for(iter=0;g||iter=n-m;x--)\n {\n if(c[x+2]>'9')\n c[x+1]=a[x+m-n]+b[x]-'0'+1;\n else\n c[x+1]=a[x+m-n]+b[x]-'0';\n \n }\n for(x=n-m-1;x>=0;x--)\n {\n if(c[x+2]>'9')\n c[x+1]=b[x]+1;\n else\n c[x+1]=b[x];\n }\n if(c[1]>'9')\n c[0]='1';\n else\n c[0]='0';\n for(x=1;x<=n;x++)\n {\n if(c[x]>'9') \n c[x]=c[x]-10;\n }\n for(i=0;i<=n-1;i++)\n if(c[i]!='0') break;\n for(x=i;x<=n;x++)\n printf(\"%c\",c[x]);\n \n} \n \nif(m>n)\n {\n c[m]=a[m-1]+b[n-1]-'0';\n for(x=m-2;x>=m-n;x--)\n {\n if(c[x+2]>'9')\n c[x+1]=a[x]+b[x+n-m]-'0'+1;\n else\n c[x+1]=a[x]+b[x+n-m]-'0';\n \n }\n for(x=m-n-1;x>=0;x--)\n {\n if(c[x+2]>'9')\n c[x+1]=a[x]+1;\n else\n c[x+1]=a[x];\n }\n if(c[1]>'9')\n c[0]='1';\n else\n c[0]='0';\n for(x=1;x<=m;x++)\n {\n if(c[x]>'9') \n c[x]=c[x]-10;\n }\n for(i=0;i<=m-1;i++)\n if(c[i]!='0') break;\n for(x=i;x<=m;x++)\n printf(\"%c\",c[x]);\n \n} \n \n if(m==n)\n {\n c[m]=a[m-1]+b[m-1]-'0';\n for(x=m-2;x>=0;x--)\n {\n if(c[x+2]>'9')\n c[x+1]=a[x]+b[x]-'0'+1;\n else\n c[x+1]=a[x]+b[x]-'0';\n }\n if(c[1]>'9')\n c[0]='1';\n else\n c[0]='0';\n for(x=1;x<=m;x++)\n {\n if(c[x]>'9') \n c[x]=c[x]-10;\n }\n for(i=0;i<=m-1;i++)\n \n if(c[i]!='0') break;\n \n \n \n \n for(x=i;x<=m;x++)\n printf(\"%c\",c[x]);\n}\n}\n \n "} +{"label": "69", "index": "34305", "code": "\nint main()\n{\n\tchar a[251], b[251];\n\tint na[251], nb[251], s[251] = {0}, i, flag = 0;\n\tcin.getline(a, 251);\n\tcin.getline(b, 251);\n\tint la = strlen(a);\n\tint lb = strlen(b);\n\tint lm = (la>lb)?la:lb;\n\tfor(i = 0; i < la; i ++)\n\t{\n\t\tna[i] = a[la - i - 1] - '0';\n\t\ts[i] += na[i];\n\t}\n\tfor(i = 0; i < lb; i ++)\n\t{\n\t\tnb[i] = b[lb - i - 1] - '0';\n\t\ts[i] += nb[i];\n\t}\n\tfor(i = 0;;i++)\n\t{\n\t\tif(i > lm)\n\t\t\tbreak;\n\t\tif(s[i]>9)\n\t\t{\n\t\t\ts[i] -= 10;\n\t\t\ts[i+1] += 1;\n\t\t}\n\t}\n\tfor(i = lm; i >= 0; i --)\n\t{\n\t\tif(flag == 0)\n\t\t{\n\t\t\tif(s[i] == 0)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tflag = 1;\n\t\t}\n\t\tcout << s[i];\n\t}\n\tif(flag == 0)\n\t\tcout << \"0\";\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34306", "code": "\nint main()\n{\n char a[N],b[N];\n char c[N];\n char t;\n int i,r,x,la,lb;\n for(i=0;i=lb)?la:lb);i++)\n {\n if(a[i]=='\\0')\n c[i]=c[i]+b[i]-'0';\n else if(b[i]=='\\0')\n c[i]=c[i]+a[i]-'0';\n else\n c[i]=c[i]+a[i]-'0'+b[i]-'0';\n\n //printf(\"%d %d %d\\n\",a[i],b[i],c[i]);\n\n r=i;\n while(c[r]>=10)\n {\n x=c[r];\n c[r]=x%10;\n c[r+1]=(x-c[r])/10;\n r++;\n }\n }\n\n for(i=0;i<=r;i++)\n {\n c[i]=c[i]+'0';\n }\n\n for(i=r;i>=0;i--)\n {\n printf(\"%c\",c[i]);\n }\n printf(\"\\n\");\n\n return 0;\n}"} +{"label": "69", "index": "34307", "code": "char a[252],b[252],c[252];\nint main()\n{\n\tint la,lb,i,j,k=0;\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\tla=strlen(a);\n\tlb=strlen(b);\n\tj=la;\n\tfor(i=251;j>=0;i--,j--)\n\t\ta[i]=a[j];\n\tfor(;i>=0;i--)\n\t\ta[i]='0';\n\tj=lb;\n\tfor(i=251;j>=0;i--,j--)\n\t\tb[i]=b[j];\n\tfor(;i>=0;i--)\n\t\tb[i]='0';\n\tfor(i=250;i>=0;i--)\n\t{\n\t\tc[i]=(a[i]-'0')+(b[i]-'0')+k+'0';\n\t\tif(c[i]>'9')\n\t\t{\n\t\t\tc[i]=c[i]-10;\n\t\t\tk=1;\n\t\t}\n\t\telse\n\t\t\tk=0;\n\t}\n\tfor(i=0;c[i]=='0'&&i<250;i++);\n\tfor(;i<251;i++)\n\t\tprintf(\"%c\",c[i]);\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34308", "code": "int main()\n{ int i,t,k ,j;\n char a[251],b[251],c[251] ;\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n if(strlen(a)=0;i--)\n {\n if(i>k-1) a[i]=a[i-k];\n else a[i]='0';\n }\n }\n \n \n else \n { \n t=strlen(a);\n k=strlen(a)-strlen(b);\n for (i=t-1;i>=0;i--)\n {\n if(i>k-1) b[i]=b[i-k];\n else b[i]='0';\n }\n }\n \n \n \n \n \n for(i=t-1;i>0;i--)\n { \n c[i]=a[i]+b[i]-'0';\n if((c[i]>='0')&&(c[i]<='9'))\n c[i]=c[i];\n else \n {\n c[i]=c[i]-10;\n a[i-1]++;\n }\n }\n c[0]=a[0]+b[0]-'0';\n if(c[0]>'9')\n {\n c[0]=c[0]-10;\n printf(\"1\");\n printf(\"%s\\n\",c);\n }\n else\n { k=0;\n for(i=0;i0;i--,j--)\n {\n\t d=a[j]+b[i]-'0'-'0';\n\t a[j]=d%10+'0';\n\t if(d>9)\n\t a[j-1]++;\n }\n a[a1-a2]=a[a1-a2]+b[0]-'0';\n for(i=a1-a2;i>0;i--)\n\t if(a[i]>'9')\n\t {\n\t\t a[i]=a[i]-10;\n a[i-1]++;\n\t }\n if(a[0]>'9')\n {\t \n\t a[0]=a[0]-10;\n\t printf(\"1\");\n\t printf(\"%s\",a);\n }\n else\n {\n\t for(i=0;i= b)\n\t\treturn a;\n\telse\n\t\treturn b;\n}\nint main()\n{\n\tint a[100000] ={0}, b[100000] = {0};\n\tchar s1[100000], s2[1000000];\n\t\n\tscanf(\"%s%s\",s1,s2);\n\t\n\tint len1 = 0, len2 = 0;\n\tlen1 = strlen(s1);\n\tlen2 = strlen(s2);\n\t//????????\n\tint j = 0;\n\tfor (int i = len1 - 1; i >= 0; i--, j++)\n\t\ta[j] = s1[i] - '0';//?s1????????a?????????????????\n\t\n\tj = 0;\n\tfor (int i = len2 - 1; i >= 0; i--, j++)\n\t\tb[j] = s2[i] - '0';\n\t\n\tint m = max(len1, len2);\n\tfor (int i = 0; i < m; i++)\n\t{\n\t\ta[i] = a[i] + b[i];\n\t\tif (a[i] >= 10)\n\t\t{\n\t\t\ta[i] %= 10;\n\t\t\ta[i+1]++;\n\t\t}\n\t}\n\tint tag = 0;//????0?\n\tfor (int i = m; i >= 0; i--)\n\t{\n\t\tif (a[i] != 0)\n\t\t\ttag = 1;\n\t\tif (tag == 1)\n\t\t{\n\t\t\tprintf(\"%d\",a[i]);\n\t\t}\n\t\tif (tag == 0 && i == 0)\n\t\t\tprintf(\"0\");\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34311", "code": "char szline1[maxlen];\nchar szline2[maxlen];\nint an1[maxlen];\nint an2[maxlen];\nint main()\n{\n\tcin.getline(szline1, maxlen);\n\tcin.getline(szline2, maxlen);\n\tint len1 = strlen(szline1);\n\tint len2 = strlen(szline2);\n\tfor (int i = len1 - 1, j = 0; i >= 0; i --)\n\t\tan1[j ++] = szline1[i] - '0';\n\tfor (int i = len2 - 1, j = 0; i >= 0; i --)\n\t\tan2[j ++] = szline2[i] - '0';\n\tint begin;\n\tfor (int i = 0; i < maxlen; i ++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif (an1[i] >= 10)\n\t\t{\n\t\t\tan1[i] -= 10;\n\t\t\tan1[i + 1] ++;\n\t\t}\n\t\tif (an1[i])\n\t\t\tbegin = i;\n\t}\n\tfor (int i = begin; i >= 0; i --)\n\t\tcout << an1[i];\n\tcout << endl;\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34312", "code": "int main()\n{\n\tchar s1[252], s2[252];\n int a[252],b[252],c[252];\n \n memset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n\tmemset(c,0,252);\n\tcin.getline(s1,251);\n cin.getline(s2,251);\n\t\n int len1=strlen(s1),len2=strlen(s2);\n if((strcmp(s1,\"0\")==0&&strcmp(s2,\"0\")==0))\n { cout<<'0'<=10)\n\t {\n\t a[i]-=10;a[i+1]++;\n\t }\n\t \n }\n\ti=251;\n\t while(a[i]==0) i--;\n\t for(;i>=0;i--) \n\t\t cout<<(char)(a[i]+'0');\n\t cout<=0;i--,j--)\n\t{\n\t\tif(j>=0)\n\t\t{\n\t\tc[i+1]=a[i]-48+b[j];\n\t\tif(c[i+1]>57)\n\t\t{\n\t\t\tc[i+1]=c[i+1]-10;\n\t\t\tif(i==0)\n\t\t\t\tc[i]='1';\n\t\t\telse\n\t\t\t\ta[i-1]=a[i-1]+1;\n\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(a[i]>57)\n\t\t\t{c[i+1]=a[i]-10;\n\t\t\tif(i==0)\n\t\t\t\tc[i]='1';\n\t\t\telse\n\t\t\t\ta[i-1]=a[i-1]+1;}\n\t\t\telse\n\t\t\tc[i+1]=a[i];}\n\t}\n\tif(c[0]=='1')\n\t{\n\t\tfor(i=0;i=k)\n\t\tc(a,h,b,k);\n\telse if(k>h)\n\t\tc(b,k,a,h);\n\treturn 0;\n\n}"} +{"label": "69", "index": "34314", "code": "void add(char* a,char* b,char* c)\n{\n\tint i,j,k,max,min,n,temp;\n\tchar*s,*pmax,*pmin;\n\tmax=strlen(a);\n\tmin=strlen(b);\n\tif(max=0;i--,j--,k--)\n\t s[k]=pmin[i]-'0'+pmax[j];\n\t for(;j>=0;j--,k--)\n\t s[k]=pmax[j];\n for(i=max;i>=0;i--)\n if(s[i]>'9')\n {\n \ts[i]-=10;\n \ts[i-1]++;\n }\n if(s[0]=='0')\n {\n \tfor(i=1;i1)) p++;\n\tfor(p1=p;p1=259-la;i--)\n\t\ta[i]=a[la+i-259];\n\tfor(i=259;i>=259-lb;i--)\n\t\tb[i]=b[lb+i-259];\n\tfor(i=0;i<259-la;i++)\n\t\ta[i]='0';\n\tfor(i=0;i<259-lb;i++)\n\t\tb[i]='0';\n\tfor(i=258;i>=0;i--)\n\t{\n\t\tif(num(a[i])+num(b[i])+t>=10)\n\t\t{\n\t\t\tc[i]=num(a[i])+num(b[i])+t-10;\n\t\t\tt=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc[i]=num(a[i])+num(b[i])+t;\n\t\t\tt=0;\n\t\t}\n\t}\n\tfor(i=0;i<=258;i++)\n\t{\n\t\tif(c[i]!=0)\n\t\t\ts=1;\n\t\tif(s==1)\n\t\t\tprintf(\"%d\",c[i]);\n\t}\n\tif(s==0)\n\t\tprintf(\"%d\",s);\n\tprintf(\"\\n\");\n\treturn 0;\n}\n\nint num(char c)\n{\n\tint n;\n\tn=c-'0';\n\treturn n;\n}"} +{"label": "69", "index": "34316", "code": "main()\n{\n int n1,n2,i,j=0,k,a,b;\n char str1[252],str2[252],str3[252];\n scanf(\"%s\",str1);\n scanf(\"%s\",str2);\n if(str1[0]=='0'&&str1[1]=='\\0')printf(\"%s\",str2);\n else{\n for(a=0;a<250;a++){\n if(str1[a]=='0'){\n for(i=0;i<250;i++)\n str1[i]=str1[i+1];}\n else break;}\n for(a=0;a<250;a++){\n if(str2[a]=='0'){\n for(i=0;i<250;i++)\n str2[i]=str2[i+1];}\n else break;}\n n1=strlen(str1);\n n2=strlen(str2);\n if(n1>n2){\n for(i=1;(n1-i)>=0;i++){\n if(n2-i<0)b=48;\n else b=str2[n2-i];\n if((str1[n1-i]+b+j)<=105){\n str3[n1-i]=str1[n1-i]+b-48+j;\n j=0;}\n else{str3[n1-i]=str1[n1-i]+b-58+j;\n j=1;}}\n if(j==1){\n for(k=0;n1-k>0;k++)\n str3[n1-k]=str3[n1-k-1];\n str3[0]=49;\n str3[n1+1]='\\0';}\n else str3[n1]='\\0';\n printf(\"%s\",str3);\n }\n else{\n for(i=1;(n2-i)>=0;i++){\n if(n1-i<0) b=48;\n else b=str1[n1-i];\n if((str2[n2-i]+b+j)<=105){\n str3[n2-i]=str2[n2-i]+b-48+j;\n j=0;}\n else{str3[n2-i]=str2[n2-i]+b-58+j;\n j=1;}}\n if(j==1){\n for(k=0;n2-k>0;k++)\n str3[n2-k]=str3[n2-k-1];\n str3[0]=49;\n str3[n2+1]='\\0';}\n else str3[n2]='\\0';\n printf(\"%s\",str3);\n }}\n}"} +{"label": "69", "index": "34317", "code": "\nint main()\n{\n\tchar a[250],b[250],c[250];\n\tint i,j=0,k;\n\tint numa=0,numb=0;\n\tint ca,cb,cc,cy;\n\tchar m[10]={'0','1','2','3','4','5','6','7','8','9'};\n\tgets(a);\n\tgets(b);\n\tfor(i=0;a[i];i++)\n\t\tnuma++;\n\tfor(i=0;b[i];i++)\n\t\tnumb++;\n\tif(numa>=numb)\n\t{\n\t\tfor(i=numa-1;i>=(numa-numb);i--)\n\tb[i]=b[i-numa+numb];\n\tfor(i=0;i<(numa-numb);i++)\n\t\tb[i]='0';\n\t}\n if(numa=(numb-numa);i--)\n\ta[i]=a[i-numb+numa];\n\tfor(i=0;i<(numb-numa);i++)\n\t\ta[i]='0';\n\tnuma=numb;\n\t}\n\t\n for(i=0;i<=numa;i++)\n\t\tc[i]='0';\n for(i=numa-1;i>=0;i--)\n\t{ca=a[i]-'0';\n\tcb=b[i]-'0';\n\tcc=ca+cb;\n\tcy=c[i+1]-'0';\n\tif(cc+cy<10)\n\t\tc[i+1]=m[cc+cy];\n\tif(cc+cy>=10)\n\t{c[i]='1';\n\tc[i+1]=m[cc+cy-10];}\n\t}\n\tfor(i=0;i<=numa;i++)\n\t{\tif(c[i]=='0')\n\tj++;\n\t}\n\tif(j==numa+1)\n\t\tprintf(\"0\\n\");\n\telse\n\t{\n\t\tfor(i=0;i<=numa;i++)\n\t\t{\tif(c[i]!='0')\n\t\t{k=i;\n\t\tbreak;}\n\t\t}\n for(i=k;i<=numa;i++)\n\t printf(\"%c\",c[i]);\n\t}\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34318", "code": "int an1[255];\nint an2[255];\nchar s1[255];\nchar s2[255];\nint main()\n{\ncin>>s1;cin>>s2;\nint i, j;\nint nLen1,nLen2;\nfor(i=0;i<255;i++)\n{\n\tan1[i]=0;\n\tan2[i]=0;\n}\nfor(i=0;i<255;i++)\n{\n\tif(s1[i]=='\\0')\n\t{nLen1=i;break;}\n}\nfor(i=0;i<255;i++)\n{\n\tif(s2[i]=='\\0')\n\t{nLen2=i;break;}\n}\nj = 0;\nfor( i = nLen1 - 1;i >= 0 ; i --)\nan1[j++] = s1[i] - '0'; \nj = 0;\nfor( i = nLen2 - 1;i >= 0 ; i --)\nan2[j++] = s2[i] - '0';\nfor( i = 0;i <255; i ++ ) {\nan1[i] += an2[i];\nif( an1[i] >= 10 ) { \nan1[i] -= 10;\nan1[i+1] ++;\n}\n}\nint a=0;\nfor(i=255;i>=0;i --) \n{\n if(i==0)\n{\n cout<= 0; i --)\n\t\tan1[j++] = szline1[i] - '0';\n\tfor(j = 0,i = len2 - 1; i >= 0; i --)\n\t\tan2[j++] = szline2[i] - '0';\n\n\tif(len1 > len2)\n\t\tmaxlen = len1;\n\telse\n\t\tmaxlen = len2;\n\n\tint startpos = 0;\n\tfor(i = 0; i < maxlen; i ++)\n\t{\n\t\tif(an1[i]+an2[i] >= 10)\n\t\t{\n\t\t\tan1[i] = an1[i] + an2[i] - 10;\n\t\t\tan1[i+1] ++;\n\t\t}\n\t\telse\n\t\t\tan1[i] += an2[i];\n\t\tif(an1[i])\n\t\t\tstartpos = i;\n\t}\n\tif(an1[i])\n\t\tstartpos = i;\n\tif(startpos == 0)\n\t\tprintf(\"0\");\n\telse\n\t{\n\t\tfor(i = startpos;i >=0; i--)\n\t\t\tprintf(\"%d\",an1[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34320", "code": "main()\n{\n\tchar a[250],b[250];\n\tint x[250],y[250],z[251]={0},i,j,m,n;\n\tgets(a);\n\tgets(b);\n\tm=strlen(a);\n\tn=strlen(b);\n\tfor(i=0;i<=249;i++)\n\t{\n\t\tif(i<=249-m)\n\t\t\tx[i]=0;\n\t\telse\n\t\t\tx[i]=a[i-250+m]-'0';\n\t}\n\tfor(i=0;i<=249;i++)\n\t{\n\t\tif(i<=249-n)\n\t\t\ty[i]=0;\n\t\telse\n\t\t\ty[i]=b[i-250+n]-'0';\n\t}\n\tfor(i=249;i>=0;i--)\n\t{\n\t\tif(x[i]+y[i]+z[i+1]>=10)\n\t\t{\n\t\t\tz[i+1]=x[i]+y[i]+z[i+1]-10;\n\t\t\tz[i]=1;\n\t\t}\n\t\telse z[i+1]=x[i]+y[i]+z[i+1];\n\t}\n\tj=0;\n\tfor(i=0;i<=250;i++)\n\t{\n\t\tif(z[i]!=0) \n\t\tbreak;\n\t\tj=j+1;\n\t}\n\t\tfor(;i<=250;i++)\n\t\t\tprintf(\"%d\",z[i]);\n\tif(j==251) printf(\"0\");\n}\n"} +{"label": "69", "index": "34321", "code": "int a[200];\nint b[200];\nint out[200]; \nvoid init(){\n for(int i=0;i<200;i++){\n a[i]=0;\n b[i]=0;\n out[i]=0;\n }\n} \nvoid load(){\n char temp[201];\n cin>>temp;\n int begin = 200 - strlen(temp);\n for(int i=0;i>temp;\n begin = 200 - strlen(temp);\n for(int i=0;i=0;i--){\n out[i] = a[i] + b[i] + carry;\n if(out[i]>=10){\n\t\t\t\t out[i]-=10;\n carry = 1;\n }\n\t\t\t else\n\t\t\t\t carry =0;\n\t }\n for(i=0;i<199;i++){\n\t\t if(out[i]!=0)\n break;\n\t }\n for(;i<200;i++){\n\t\t cout<=strlen(str2))\n {\n a=strlen(str1); b=strlen(str2);\n for (i=a-1;i>=0;i--) str2[i]=str2[i-a+b];\n for (i=0;i=0;i--) str1[i]=str1[i-a+b];\n for (i=0;i=0;i--)\n {\n str1[i]=str1[i]+str2[i]+jin-'0'-'0';\n jin='0';\n if (str1[i]>'9')\n {\n jin='1';\n str1[i]=str1[i]-(':'-'0');\n }\n }\n if (jin=='1')\n {\n printf(\"1\");\n for(i=0;i<=a-1;i++) printf(\"%c\",str1[i]);\n }\n else\n {\n for(i=0;i<=a-1;i++)\n {\n if(str1[i]=='0' && flag==0) continue;\n else\n {\n flag=1;\n b=i;\n }\n break;\n }\n for(i=b;i<=a-1;i++) printf(\"%c\",str1[i]);\n }\n return 0;\n}\n"} +{"label": "69", "index": "34323", "code": "main()\n{\n char str1[250];\n char str2[250];\n char str3[250];\n char str4[251];\n char str5[251];\n int a,b,c,n,i;\n scanf(\"%s%s\",str1,str2);\n for(i=0;i<250;i++)\n { \n a=i;\n if(str1[i]==0)\n break; \n }\n for(i=0;i<250;i++)\n {\n b=i;\n if(str2[i]==0)\n break; \n }\n if(a>b)\n {\n n=a;\n for(i=(a-1);i>=0;i--)\n {\n if(i<(a-b))\n str2[i]='0';\n else\n str2[i]=str2[i-(a-b)];\n } \n }\n if(b>a)\n {\n n=b;\n for(i=(b-1);i>=0;i--)\n {\n if(i<(b-a))\n str1[i]='0';\n else\n str1[i]=str1[i-(b-a)];\n } \n }\n if(b==a)\n n=a;\n for(i=(n-1);i>=0;i--)\n {\n str3[i]=str1[i]+str2[i]-'0'-'0';\n }\n for(i=(n-1);i>0;i--)\n {\n if(str3[i]>9)\n {\n str4[i+1]=str3[i]-10;\n str3[i-1]=str3[i-1]+1;\n }\n else\n str4[i+1]=str3[i]; \n } \n if(str3[0]>9)\n {\n str4[1]=str3[0]-10;\n str4[0]=1; \n }\n else\n {\n str4[1]=str3[0];\n str4[0]=0;\n }\n int f=0;\n for(i=0;i<=n;i++)\n {\n c=i;\n if(str4[i]!=0)\n break;\n }\n for(i=c;i<=n;i++)\n {\n printf(\"%d\",str4[i]);\n f=1;\n }\n if(f==0)\n printf(\"%d\",f);\n \n}\n"} +{"label": "69", "index": "34324", "code": "typedef int data;\nstruct node;\ntypedef struct node* pnode;\nstruct node\n{\n data value;\n pnode pnext;\n};\nvoid node_create(pnode *pheader,int l,char a[length],int max)\n{\n pnode p=*pheader;\n p->pnext=NULL;\n for(int i=0;ivalue=a[i]-'0';\n pnew->pnext=p->pnext;\n p->pnext=pnew;\n p=*pheader;\n }\n for(int i=0;ipnext;\n for(int i=l-1;i<=max;i++) \n {\n pnode pnew=(pnode)malloc(sizeof (struct node));\n pnew->value=0;\n pnew->pnext=p->pnext;\n p->pnext=pnew;\n p=p->pnext;\n }\n}\nvoid node_plus(pnode pheader1,pnode pheader2,pnode* pheader3,int max)\n{\n int sum,num=0;\n pnode p1=pheader1->pnext;\n pnode p2=pheader2->pnext;\n pnode p3=(*pheader3)->pnext;\n for(int i=0;i<=max;i++)\n {\n sum=p1->value+p2->value+num;\n if(sum<10) {p3->value=sum;num=0;}\n else {p3->value=sum-10;num=1;}\n p1=p1->pnext;\n p2=p2->pnext;\n p3=p3->pnext;\n }\n}\n\nvoid output(pnode pheader3,int l)\n{\n int t;\n pnode p=pheader3;\n int a[length]={0};\n for(int i=0;ipnext;a[i]=p->value;}\n for(int i=l-1;i>=0;i--) {if(a[i]!=0) {t=i;break;}}\n for(int i=t;i>=0;i--) {printf(\"%d\",a[i]);}\n}\nmain()\n{\n struct node header1,header2,header3;\n pnode pheader1=&header1;\n pnode pheader2=&header2;\n pnode pheader3=&header3;\n int l1,l2;\n int max;\n char a1[length]={'\\0'},a2[length]={'\\0'},a3[length+1]={'\\0'};\n for(int i=0;i=l2) max=l1+1;\n else max=l2+1;\n node_create(&pheader1,l1,a1,max);\n node_create(&pheader2,l2,a2,max);\n node_create(&pheader3,max,a3,max);\n node_plus(pheader1,pheader2,&pheader3,max);\n output(pheader3,max);\n\n getchar();\n getchar();\n}\n"} +{"label": "69", "index": "34325", "code": "/*\n * wanyi.cpp\n *\n * Created on: 2012-11-21\n * Author: 7\n */\nchar c[300];\nvoid change(char a[250],char b[250],int la,int lb)\n{\n\tint sig=1;\n\tc[la]=a[la-1];\n\tif(lb>0)\n\t\t{\n\t\t\tc[la]=a[la-1]+b[lb-1]-'0';\n\t\t}\n\tif(c[la]>'9')\n\t{\n\t\tc[la]=c[la]-10;\n\t\tif(la>1)\n\t\ta[la-2]+=1;\n\t\telse\n\t\t\tc[0]='1';\n\t}\n\tif(la>1)\n\tchange(a,b,la-1,lb-1);\n\telse\n\t{\n\t\tfor(int i=0;i<(int)strlen(c);i++)\n\t\t\t{\n\t\t\tif(sig&&c[i]=='0')\n\t\t\t\t{continue;}\n\t\t\telse {cout<strlen(b))change(a,b,strlen(a),strlen(b));\n\telse change(b,a,strlen(b),strlen(a));\n}\n"} +{"label": "69", "index": "34326", "code": "int str2bigint(char *str,int *a)\n{\n\tint len=(int)strlen(str);\n\tint i;\n\tfor(i=0;i0)\n\t\tk--;\n\tfor(i=k;i>=0;i--)\n\t\tprintf(\"%d\",a[i]);\n}\n\nint add(int *a,int alen,int *b,int blen,int *c)\n{\n\tint i;\n\tint len=(alen>blen)?alen:blen;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]%=10;\n\t\t}\n\t}\n\treturn c[len]?(len+1):len;\n}\n\nvoid main()\n{\n\tchar s1[max],s2[max];\n\tint a[max],b[max],c[max];\n\tint alen,blen,clen;\n\tscanf(\"%s%s\",s1,s2);\n\talen=str2bigint(s1,a);\n\tblen=str2bigint(s2,b);\n\tclen=add(a,alen,b,blen,c);\n\tprint_bigint(c,clen);\n}"} +{"label": "69", "index": "34327", "code": "int main()\n{\n\tchar a[210]={0},b[210]={0};\n\tint len_a,len_b,c[210]={0},d[210]={0},i,j,max;\n\tcin>>a>>b;\n\tlen_a=strlen(a);\n\tlen_b=strlen(b);\n\tj=0;\n\tfor(i=len_a-1;i>=0;i--)\n\t\tc[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=len_b-1;i>=0;i--)\n\t\td[j++]=b[i]-'0';\n\tmax=(len_a>len_b)?len_a:len_b;\n\tfor(i=0;i9)\n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t}\n\t}\n\tfor(i=max+1;i>=0;i--)\n\t\tif(c[i]!=0)\n\t\t\tbreak;\n\tif(i==-1)cout<=0;j--)\n\t\tcout<len2)? len2:len1;\nmax=(len1>len2)? len1:len2;\n\n\nfor(i=min-1;i>=0;i--)\n{\n sum[max-(min-1-i)]=s2[len2-1-(min-1-i)]-'0'+s1[len1-1-(min-1-i)]-'0';\n\n}\n\nif(max==len1)\n{\nfor(i=max-min;i>=1;i--)\n{\n\tsum[i]=s1[i-1]-'0';\n}\n}else{\n\tfor(i=max-min;i>=1;i--)\n{\n\tsum[i]=s2[i-1]-'0';\n}\n}\n\n\n\nfor(i=max;i>=1;i--)\n{\n\tsum[i-1]=sum[i-1]+sum[i]/10;\n\tsum[i]=sum[i]%10;\n}\nj=0;\nwhile(sum[j]==0 && j<=max)\n{\n\tj++;\n\n\n}\n\nif(sum[j]!=0)\n{\n for(i=j;i<=max;i++)\n\t{\n\t\tcout<0)\n\t{\n\t\tfor(i=strlen(b);i>=0;i--)\n\t\t\tb[i+m]=b[i];\n\t\tfor(i=m-1;i>=0;i--)\n\t\t\tb[i]=48;\n\t}\n\tif(m<0)\n\t{\n\t\tfor(i=strlen(a);i>=0;i--)\n\t\t\ta[i-m]=a[i];\n\t\tfor(i=-m-1;i>=0;i--)\n\t\t\ta[i]=48;\n\t}\n\tn=strlen(a);\n\tfor(i=0;i0;i--)\n\t{\n\t\tc[i]=c[i]+a[i]+b[i]-96;\n\t\tif(c[i]>57)\n\t\t{\n\t\t\tc[i]=c[i]-10;\n\t\t\tc[i-1]++;\n\t\t}\n\t}\n\tc[0]=c[0]+a[0]+b[0]-96;\n\tif(c[0]>57)\n\t{\n\t\tc[0]=c[0]-10;\n\t\tfor(i=n;i>=0;i--)\n\t\t\tc[i+1]=c[i];\n\t\tc[0]=49;\n\t}\n while(c[0]==48)\n\t{\n\t\tfor(i=0;i<=strlen(c);i++)\n\t\t\tc[i]=c[i+1];\n\t}\n\tif(c[0]=='\\0')printf(\"0\");\n\telse\n\tprintf(\"%s\",c);\n}"} +{"label": "69", "index": "34330", "code": "int max(int x,int y)\n{\n\treturn (x>y)?x:y;\n}\nint min(int x,int y)\n{\n\treturn (xy)\n\t{\n\t\tfor(i=1;i<=x;i++)\n\t\t\tc[i]=a[i];\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=y;i++)\n\t\t\tc[i]=b[i];\n\t}\n\tc[0]=0;\n\tfor(i=0;i0;i--)\n\t{\n\t\tif(c[i]>=10)\n\t\t{\t\n\t\t\tc[i]=(c[i]%10);\n\t\t\tc[i-1]+=1;\n\t\t}\n\t}\n\tfor(i=0;;i++)\n\t\tif(c[i]) break;\n\tfor(j=i;j<=max(x,y);j++)\n\t\tprintf(\"%d\",c[j]);\n\tif(i>max(x,y)) printf(\"0\");\n\tprintf(\"\\n\");\n}\n"} +{"label": "69", "index": "34331", "code": "int main()\n{\n char str1[299],str2[388];\n gets(str1);\n gets(str2);\n char sum[289];\n long int i=strlen(str1)-1,j=strlen(str2)-1;\n int k=0;\n for(;i>=0&&j>=0;i--,j--,k++)\n {\n sum[k]=str1[i]-'0'+str2[j];\n }\n if(strlen(str1)>strlen(str2))\n {\n for(;i>=0;i--)\n {\n sum[k]=str1[i];\n k++;\n }\n }\n else{\n for(;j>=0;j--)\n {\n sum[k]=str2[j];\n k++;\n }\n }\n for(int m=0;m'9')\n {\n sum[m]=(char)(sum[m]-10);\n sum[m+1]=(char)(sum[m+1]+1);\n }\n }\n \n if(sum[k-1]>'9')\n {\n sum[k]='1';\n sum[k-1]-=10;\n int p=k;\n while(sum[p]=='0'&&p>0)\n p--;\n for(;p>=0;p--)\n cout<0)\n p--;\n for(;p>=0;p--)\n cout<0) c[++c[0]]=j;\n while (c[c[0]]==0&&c[0]>1) --c[0];\n for (i=c[0];i>0;--i) printf(\"%d\",c[i]);\n return 0;\n}\n\n"} +{"label": "69", "index": "34333", "code": "/*\n * add large number.cpp\n *??:?????\n * Created on: 2012-11-27\n * Author: ???\n */\n\n\nchar num1[260];\nchar num2[260];\nchar result[260];\nint len1,len2;\nvoid add();\nint main ()\n{\n\n\tcin.getline(num1,250);\n\tcin.getline(num2,250);\n\tlen1=strlen(num1);\n\tlen2=strlen (num2);\n add();\n return 0;\n}\n\nvoid add()\n{\n\tif(len1>len2)\n\t{\n\t\tint i=0;\n\t for(i=0;i57)\n\t\t\t{\n\t\t\tresult[len1-i]=result[len1-i]-10;\n\t\t\tresult[len1-i-1]++;\n\t\t\t}\n\t }\n\t for(i=len2;i57)\n\t \t\t\t{\n\t \t\t\tresult[len1-i]=result[len1-i]-10;\n\t \t\t\tresult[len1-i-1]++;\n\t \t\t\t}\n\t }\n for(i=0;i<=len1;i++)\n \tif(result[i]!='0'&&result[i]!='\\0')\n \t\tbreak;\n if(i==len1)\n cout<57)\n\t\t\t{\n\t\t\tresult[len2-i]=result[len2-i]-10;\n\t\t\tresult[len2-i-1]++;\n\t\t\t}\n\t }\n\t for(i=len1;i57)\n\t \t\t\t{\n\t \t\t\tresult[len2-i]=result[len2-i]-10;\n\t \t\t\tresult[len2-i-1]++;\n\t \t\t\t}\n\t }\n\t for(i=0;i len)\n\t\tlen = i;\n\tfor (i = 0; i < len; i++)\n\t{\n\t\tsum[i] = sum[i] + c[i] + d[i];\n\t\tif (sum[i] >= 10)\n\t\t{\n\t\t\tsum[i] -= 10;\n\t\t\tsum[i + 1]++;\n\t\t}\n\t}\n\tif (sum[len] != 0)\n\t\tlen++;\n\tfor (i = len - 1; i >= 0; i--)\n\t\tcout << sum[i];\n\treturn 0;\n}"} +{"label": "69", "index": "34335", "code": "\n\nint main()\n{\n\tint q1,q2, t = 0,i,n,l1,l2,l,k,max,j;\n\tchar temp, a[300],b[300],c[300],a_[300], b_[300];\n\tcin.getline(a,300);\n\tcin.getline(b,300);\n\tl1 = strlen(a);\n\tl2 = strlen(b);\n\tq1 = 0;\n\tfor(i = 0; i < l1; i++)\n\t{\n\t\tif(a[i] == '0')\n\t\t\tq1++;\n\t\telse \n\t\t\tbreak;\n\t}\n\tl1 = l1 - q1;\n\n\tq2 = 0;\n\tfor(i = 0; i < l2; i++)\n\t{\n\t\tif(b[i] == '0')\n\t\t\tq2++;\n\t\telse \n\t\t\tbreak;\n\t}\n\tl2 = l2 - q2;\n\n\tmax = (l1>l2)?l1:l2;\n\tl = max;\n\n\tj = 0;\n\tfor(i = q1 + l1 - 1; i >= q1 ; i--)\n\t\ta_[j++] = a[i];\n\ta_[j] = '\\0';\n\t\n\tj = 0;\n\tfor(i = q2 + l2 - 1; i >= q2 ; i--)\n\t\tb_[j++] = b[i];\n\tb_[j] = '\\0';\n\t\n\tif(l1 < max)\n\t{\n\t\tfor(i = l1; i < max; i++)\n\t\t\ta_[i] = '0';\n\t}\n\tif(l2 < max)\n\t{\n\t\tfor(i = l2; i < max; i++)\n\t\t\tb_[i] = '0';\n\t}\n\t\n\tfor (i = 0; i < max; i++)\n\t{\n\t\tk = a_[i] - '0' + b_[i] - '0' + t;\n\t\tt = 0;\n\t\tif(k > 9)\n\t\t{\n\t\t\tk = k - 10;\n\t\t\tt = 1;\n\t\t}\n\t\tc[i] = k + '0';\n\t\tif(i == max - 1 && t == 1)\n\t\t{\n\t\t\tl = max + 1;\n\t\t\tc[max] = '1';\n\t\t}\n\t}\t\n\tfor(i = l - 1; i >= 0; i--)\n\t\tcout << c[i];\t\n\t\n\tif(l1 == 0 && l2 == 0)\n\t\tcout << '0'; \n\tcout<<'\\n'; // ???? \n\t\n\t\t\n\t\t\n\n\t\treturn 0;\n\n}\n"} +{"label": "69", "index": "34336", "code": "struct node//???? PHEADER??????? \n{\n int value;\n struct node *pNext;\n};\nvoid insertAt(struct node *pHeader,char c,int n)//??N???????? \n{\n int i;\n for(i=1;ipNext;\n }\n struct node *ptemp=(struct node *)malloc(sizeof(struct node));\n ptemp->pNext=pHeader->pNext;\n pHeader->pNext=ptemp;\n ptemp->value=c-'0';\n}\nint getAt(struct node *pHeader,int n)//????????N?? \n{\n int i;\n struct node *ptemp;\n for(i=0;ipNext;\n }\n return pHeader->value;\n}\nint compare(struct node *pHeader1,int n1,struct node *pHeader2,int n2)//?????????????????????1??????-1?????0 \n{\n int i;\n int ans=0;\n if(n1>n2) return 1;\n else if(n1getAt(pHeader2,i))\n {\n ans=1;\n break;\n }\n else if(getAt(pHeader1,i)pNext=NULL;//?????????NULL \n pHeader2->pNext=NULL;\n pHeader3->pNext=NULL;\n n1=0;//????????? \n for(;;)\n {\n scanf(\"%c\",&c);\n if(c=='\\n') break;//????,???? \n else\n {\n n1++;\n insertAt(pHeader1,c,n1);//???? \n }\n }\n n2=0;//????????? \n for(;;)\n {\n scanf(\"%c\",&c);\n if(c=='\\n') break;//????,???? \n else\n {\n n2++;\n insertAt(pHeader2,c,n2);//???? \n }\n }\n if((getAt(pHeader1,1)!='-'-'0')&&(getAt(pHeader2,1)!='-'-'0')||((getAt(pHeader1,1)=='-'-'0')&&(getAt(pHeader2,1)=='-'-'0')))//??2???????????????? \n {\n if((getAt(pHeader1,1)=='-'-'0')&&(getAt(pHeader2,1)=='-'-'0'))//??2???????????????????????2????????1???????????? \n {\n pHeader1=pHeader1->pNext;\n pHeader2=pHeader2->pNext;\n n1--;\n n2--;\n printf(\"-\");\n }\n jinwei=0;//????????? \n n3=0;//??????? \n if(n1>=n2)//???????????????? \n { \n for(i=0;i=10) \n {\n temp=temp-10;//??10,????????? \n jinwei=1;\n }\n else jinwei=0;\n n3++;//??????? \n insertAt(pHeader3,temp+'0',n3);//????????? ,???????????,???????????????? \n }\n for(i=n2;i=10)\n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n if(jinwei==1)//???????????????,????????? \n {\n n3++;\n insertAt(pHeader3,'1',n3);\n }\n }\n else//??????????????? \n {\n struct node*ptemp;//??????????????????,??????????? \n int ntemp;\n ptemp=pHeader1;\n pHeader1=pHeader2;\n pHeader2=ptemp;\n ntemp=n1;\n n1=n2;\n n2=ntemp;\n for(i=0;i=10) \n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n for(i=n2;i=10)\n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n if(jinwei==1)\n {\n n3++;\n insertAt(pHeader3,'1',n3);\n }\n }\n }\n else if((getAt(pHeader1,1)!='-'-'0')&&(getAt(pHeader2,1)=='-'-'0'))//??????????????????? \n {\n pHeader2=pHeader2->pNext;//?????????? \n n2--;\n jiewei=0;//??????? \n n3=0;\n if(compare(pHeader1,n1,pHeader2,n2)<0)//??????????????????????????????????? \n {\n printf(\"-\");\n struct node*ptemp;//??????????????????,??????????? \n int ntemp;\n ptemp=pHeader1;\n pHeader1=pHeader2;\n pHeader2=ptemp;\n ntemp=n1;\n n1=n2;\n n2=ntemp;\n }\n for(i=0;ipNext;\n n1--;\n jiewei=0;\n n3=0;\n if(compare(pHeader1,n1,pHeader2,n2)>0) printf(\"-\");//???????????????????? \n if(compare(pHeader1,n1,pHeader2,n2)<0)//???????????????????????????????????????????????? \n {\n struct node*ptemp;//??????????????????,??????????? \n int ntemp;\n ptemp=pHeader1;\n pHeader1=pHeader2;\n pHeader2=ptemp;\n ntemp=n1;\n n1=n2;\n n2=ntemp;\n }\n for(i=0;id)\n\t{\n\t\tstrcpy(f,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,f);\n\t\ti=c;\n\t\tc=d;\n\t\td=i;\n\t}\n\tfor(i=0;i0){k--;}\n\tfor(i=k;i>=0;i--)\n\tprintf(\"%d\",a[i]);}\n\nint add(int *a,int lena,int *b,int lenb,int *c)\n{int i;\n\tint len=(lena>lenb)?lena:lenb;\n\tfor(i=0;i=10){\n\t\tc[i+1]+=c[i]/10;\n\t\tc[i]%=10;\n\t}\n}return c[len]?(len+1):len;}\n\n\nvoid main()\n{int a[250],b[250],c[251],lena,lenb,lenc;\n char as[250],bs[250];\n scanf(\"%s\",as);\n scanf(\"%s\",bs);\n lena=change(as,a);\n lenb=change(bs,b);\n lenc=add(a,lena,b,lenb,c);\n bigprint(c,lenc);\n\n}"} +{"label": "69", "index": "34339", "code": "main()\n{\n char a[250],b[250],sum[251];\n int i,j=0,k,l=1,x,y;\n for(i=0;i<250;i++)\n a[i]='0';\n for(i=0;i<250;i++)\n b[i]='0'; \n for(i=0;i<251;i++)\n sum[i]='0'; \n scanf(\"%s\\n%s\",a,b);\n x=strlen(a);\n y=strlen(b); \n for(i=0;i=10)\n {\n sum[250-i]=sum[250-i]+j-10+'0';\n j=1; \n }\n else\n {\n sum[250-i]=sum[250-i]+j+'0';\n j=0;\n } \n }\n if(j==1)\n sum[0]='1'; \n for(i=0;i<251;i++)\n {\n l=l+1;\n if(sum[i]>='1'&&sum[i]<='9')\n {\n k=i; \n break; \n } \n }\n if(l==252) \n printf(\"%c\",sum[0]);\n else \n {\n for(i=k;i<251;i++)\n printf(\"%c\",sum[i]);\n } \n \n }\n "} +{"label": "69", "index": "34340", "code": "int main()\n{\n\tunsigned a1[260],a2[260];\n\tchar l1[260],l2[260];\n\tgets(l1);\n\tcin.getline(l2,260);\n\tint len1=strlen(l1);\n\tint len2=strlen(l2);\n\tmemset(a1,0,sizeof(a1));\n\tmemset(a2,0,sizeof(a2));\n\tint i,j=0;\n\tfor(i=len1-1;i>=0;i--)\n\t\ta1[j++]=l1[i]-'0';\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t\ta2[j++]=l2[i]-'0';\n\tint max=(len1>len2?len1:len2);\n\tfor(int i=0;i9)\n\t\t{\n\t\t\ta1[i]-=10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\ti=max;\n\twhile(a1[i]==0&&i>0)i--;\n\tif(i==0) cout<<0;\n\telse\n\t{\n\t\tfor(;i>=0;i--)\n\t\t\tcout<bb){\n for(i=aa-1;i>=aa-bb;i--){\n b[i]=b[i-aa+bb];\n }\n for(i=0;i<=aa-bb-1;i++){b[i]='0';}\n b[aa]=0;\n } \n if(aa=bb-aa;i--){\n a[i]=a[i-bb+aa];\n }\n for(i=0;i<=bb-aa-1;i++){a[i]='0';}\n a[bb]='\\0';\n }\n if(bb>aa)aa=bb;\n //printf(\"%s\\n%s\\n\", a, b);\n for(i=aa-1;i>=0;i--){\n if(a[i]+b[i]-96<=9){c[i]=a[i]+b[i]-48;}\n if(a[i]+b[i]-96>9&&i!=0){c[i]=a[i]+b[i]-58;b[i-1]+=1;}\n if(a[i]+b[i]-96>9&&i==0){c[i]=a[i]+b[i]-48;}\n }\n c[aa]='\\0';\n char *cc = c;\n if(c[0]-48>9){printf(\"1\");c[0]=c[0]-10;}\n else\n {\n while (*cc == '0') ++cc;\n if (*cc == 0) --cc;\n }\n printf(\"%s\\n\", cc);\n //while(1);\n }\n"} +{"label": "69", "index": "34342", "code": "int a[300],b[300],la,lb;\nvoid putin(){\nmemset(a,0,sizeof(a));\nmemset(b,0,sizeof(b));\nchar k[300];\ncin>>k;\nla=strlen(k);\nfor(int i=0;i>k;\nlb=strlen(k);\nfor(int i=0;ila)la=lb;\nfor(int i=0;i0);i++){a[i+1]+=a[i]/10;a[i]%=10;if(i>la)la=i;}\nwhile(!a[la]&&la)la--;\nla++;\n}\nvoid pr(){\nfor(int i=la-1;i>=0;i--)cout<pNext;\n }\n struct node *ptemp=(struct node *)malloc(sizeof(struct node));\n ptemp->pNext=pHeader->pNext;\n pHeader->pNext=ptemp;\n ptemp->value=c-'0';\n}\nint getAt(struct node *pHeader,int n)\n{\n int i;\n struct node *ptemp;\n for(i=0;ipNext;\n }\n return pHeader->value;\n}\nmain()\n{\n char c;\n int n1,n2,n3;\n int temp,i,jinwei;\n struct node *pHeader1=(struct node *)malloc(sizeof(struct node));\n struct node *pHeader2=(struct node *)malloc(sizeof(struct node));\n struct node *pHeader3=(struct node *)malloc(sizeof(struct node));\n pHeader1->pNext=NULL;\n pHeader2->pNext=NULL;\n pHeader3->pNext=NULL;\n n1=0;\n for(;;)\n {\n scanf(\"%c\",&c);\n if(c=='\\n') break;\n else\n {\n n1++;\n insertAt(pHeader1,c,n1);\n }\n }\n n2=0;\n for(;;)\n {\n scanf(\"%c\",&c);\n if(c=='\\n') break;\n else\n {\n n2++;\n insertAt(pHeader2,c,n2);\n }\n }\n jinwei=0;\n n3=0;\n if(n1>=n2)\n {\n for(i=0;i=10) \n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n for(i=n2;i=10)\n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n if(jinwei==1)\n {\n n3++;\n insertAt(pHeader3,'1',n3);\n }\n }\n else\n {\n struct node*ptemp;\n int ntemp;\n ptemp=pHeader1;\n pHeader1=pHeader2;\n pHeader2=ptemp;\n ntemp=n1;\n n1=n2;\n n2=ntemp;\n for(i=0;i=10) \n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n for(i=n2;i=10)\n {\n temp=temp-10;\n jinwei=1;\n }\n else jinwei=0;\n n3++;\n insertAt(pHeader3,temp+'0',n3);\n }\n if(jinwei==1)\n {\n n3++;\n insertAt(pHeader3,'1',n3);\n }\n }\n int jilu=0;\n if(n3==1&&getAt(pHeader3,n3)==0) printf(\"0\");\n else\n {\n for(i=0;ilb) {lm=la;ln=lb;}\n else {lm=lb;ln=la;}\n for(i=1;i<=lm;i++)\n {\n if(i>ln&&ln==lb)\n {\n temp=a[la-i]+temp-'0';\n c[lm+1-i]=temp%10;\n if(temp>=10) temp=temp/10;\n else temp=0;\n }\n else if(i>ln&&ln==la)\n {\n temp=b[lb-i]+temp-'0';\n c[lm+1-i]=temp%10;\n if(temp>=10) temp=temp/10;\n else temp=0;\n }\n else\n {\n temp=a[la-i]+b[lb-i]+temp-'0'-'0';\n c[lm+1-i]=temp%10;\n if(temp>=10) temp=temp/10;\n else temp=0;\n }\n }\n c[0]=temp;\n for(i=0;i<=lm;i++)\n {\n if(c[i]!=0) break;\n if(i==lm&&c[i]==0) printf(\"0\");\n }\n for(;i<=lm;i++) printf(\"%d\",c[i]);\n return 0;\n}"} +{"label": "69", "index": "34345", "code": "int str2bigint(char*str,int*a)\n{\n int len=(int)strlen(str);\n int i;\n for(i=0;i0)\n k--;\n for(i=k;i>=0;i--)\n printf(\"%d\",a[i]);\n printf(\"\\n\");\n}\nint add_bigint(int*a,int alen,int*b,int blen,int*c)\n{\n int i;\n int len=(alen>blen)?alen:blen;\n for(i=0;i=0)\n {\n c[i+1]+=c[i]/10;\n c[i]=c[i]%10;\n }\n}\nreturn c[len]?(len+1):len;\n}\nint main()\n{\n int n;\n char s1[MAX+1],s2[MAX+1];\n int a[MAX+1],b[MAX+1],c[MAX+1];\n int alen,blen,clen;\n scanf(\"%s %s\",s1,s2);\n alen=str2bigint(s1,a);\n blen=str2bigint(s2,b);\n clen=add_bigint(a,alen,b,blen,c);\n print_bigint(c,clen);\n\n\nreturn 0;\n}"} +{"label": "69", "index": "34346", "code": "int main()\n{\n\tchar a[250],b[250];\n\tunsigned n[251],m[251];\n\tmemset(n,0,sizeof(n));\n\tmemset(m,0,sizeof(m));\n\tcin.getline(a,250);\n\tcin.getline(b,250);\n\tint l1=strlen(a),l2=strlen(b);\n\tfor(int i=0;i9)\n\t\t\t{\n\t\t\t\tn[i]-=10;\n\t\t\t\tn[i+1]++;\n\t\t }\n\t}\n\tint k=250;\n\twhile(n[k]==0) k--;\n if(k<0) cout<<\"0\";\n else\n {\n\t\t\tfor(;k>=0;k--)\n\t\t cout<> aa >> bb;\n\tint lena = strlen(aa), lenb = strlen(bb);\n\tmemset(a, 0, 260);\n\tmemset(b, 0, 260);\n\tfor(int i=0; i 9)\n\t\t{\n\t\t\tcc = 1;\n\t\t\tc[i] -= 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcc = 0;\n\t\t}\n\t}\n\tint lenc = 0;\n\tfor(int i=260; i>=0; i--)\n\t{\n\t\tif(c[i] != 0)\n\t\t{\n\t\t\tlenc = i+1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int i=lenc-1; i>=0; i--)\n\t\tcout << c[i];\n\tif(lenc == 0)\n\t\tcout << '0';\n\tcout << endl;\n}"} +{"label": "69", "index": "34348", "code": "//By Ethen Yi No.1200011797 Class 5 CCME\nint main()\n{\n char a[NUM]=\"\",b[NUM]=\"\";\n fgets(a,205,stdin);\n fgets(b,205,stdin);\n int i;\n for(i=0;i=0;i--)\n if(a[i]!='\\0')\n {\n na=i;break;\n }\n for(i=NUM-1;i>=0;i--)\n if(b[i]!='\\0')\n {\n nb=i;break;\n }\n int a1[NUM]={0},b1[NUM]={0}; //change char into int\n if(na>=nb)\n {\n for(i=0;i<=na;i++)\n a1[i]=a[i]-'0';\n for(i=0;i<=nb;i++)\n b1[i]=b[i]-'0';\n }\n else\n {\n t=nb;\n nb=na;\n na=t;\n for(i=0;i<=na;i++)\n a1[i]=b[i]-'0';\n for(i=0;i<=nb;i++)\n b1[i]=a[i]-'0';\n }\n if(nb!=na)\n {\n for(i=na;i>=na-nb;i--)\n b1[i]=b1[i-na+nb];\n for(i=0;is2)return s1;\n\telse return s2;\n}\nint main(){\n\tchar a[251]=\"\";\n\tchar b[251]=\"\";\n\tcin>>a;\n\tcin>>b;\n\tint s1=strlen(a);\n\tint s2=strlen(b);\n\tint i;\n\tchar c[251]=\"\",d[251]=\"\";\n\tfor(i=0;i=58){\n\t\t\tresult[i]=result[i]-10;\n\t\t\tcarry=1;\n\t\t}\n\t\telse carry=0;\n\t}\n\tfor(i=smax;i>=0;i--){\n\t\tif(result[i]!='0')break;\n\t}\n\tif(i==-1)cout<<0<=0;i--){\n\t\tcout<=0||j>=0)\n { if(i>=0&&j>=0)\n t=str1[i]+str2[j]+str3[k]-'0'-'0';\n else {if(i<0) t=str2[j]+str3[k]-'0';\n else t=str1[i]+str3[k]-'0';}\n if(t>9)\n {str3[k]=t-10;\n str3[k+1]=1;}\n else\n {str3[k]=t;\n str3[k+1]=0;}\n j--;\n i--;\n k++;\n }\n for(;k>0;k--)\n if(str3[k]!=0)\n break;\n for(;k>=0;k--)\n printf(\"%d\",str3[k]);\n\n\n}"} +{"label": "69", "index": "34351", "code": "const int maxlen=250;\nint main()\n{\n\tchar num1[maxlen+1];\n\tchar num2[maxlen+1];\n\tint a[maxlen];\n\tint b[maxlen];\n\tint len1,len2;\n\tcin.getline(num1,maxlen+1);\n\tcin.getline(num2,maxlen+1);\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\tint j=0;\n\tmemset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tfor(int i=len1-1;i>=0;i--)\n\t{\n\t\ta[j]=num1[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(int i=len2-1;i>=0;i--)\n\t{\n\t\tb[j]=num2[i]-'0';\n\t\tj++;\n\t}\n\tfor(int i=0;i=10)\n\t\t\t{\n\t\t\t\ta[i]-=10;\n\t a[i+1]++;\n\t \t}\n\t}\n int i=maxlen-1;\nwhile(a[i]==0) i--;\nif(i>=0)\nfor(;i>=0;i--)\n\tcout<0)?s1[--l1]-48:0;\n\t\tb=(l2>0)?s2[--l2]-48:0;\n\t\tc[n]+=a+b;\n\t\tc[n+1]=c[n]/10;\n\t\tc[n++]=c[n]%10;\n\t}\n\twhile(c[n--]==0 && n>=0);\n\tfor(i=n+1;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34353", "code": "int main()\n{\n\tunsigned an1[250],an2[250];char s1[251],s2[251];//????????????\n\tint l1,l2;\n\tcin >> s1 >> s2; //????????\n\tl1=strlen(s1);l2=strlen(s2);\n\tmemset(an1, 0, sizeof(an1));\n\tmemset(an2, 0,sizeof(an2));\n\tint i=0,j=0;\n\tfor(i=l1-1;i>=0;i--) //?????????\n\t\tan1[j++]=s1[i]-'0';\n\tj=0;\n\tfor(i=l2-1;i>=0;i--)\n\t\tan2[j++]=s2[i]-'0';\n\tfor (i = 0; i < 250 ;i++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif(an1[i] >= 10) //???\n\t\t{\n\t\t\tan1[i]-=10;\n\t\t\tan1[i+1]++;\n\t\t}\n\t}\n\ti = 249;\n\twhile(an1[i]==0&&i>0) i--; //???????0??\n\tif(i==0)\n\t\tcout << an1[0] << endl;\n\telse\n\t{for(;i >= 0; i--)\n\t\tcout << an1[i]; //??????\n\tcout << endl;\n\t}\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34354", "code": "int main()\n{\n\tint i;\n\tint lena, lenb;\n\tchar a[251], b[251];\n\tint na[251], nb[251] = { 0 };\n\tcin >> a >> b;\n\tlena = strlen(a);\n\tlenb = strlen(b);\n\tfor(i = 0; i < lena; ++i)\n\t\tna[i] = a[lena - i - 1] - '0';\n\tfor(i = 0; i < lenb; ++i)\n\t\tnb[i] = b[lenb - i - 1] - '0';\n\tfor(i = 0; i < lena; ++i)\n\t\tnb[i] += na[i];\n\tfor(i = 0; i < 251; ++i)\n\t\tif(nb[i] > 9)\n\t\t{\n\t\t\tnb[i] -= 10;\n\t\t\tnb[i + 1]++;\n\t\t}\n\tfor(i = 250; i >= 0; --i)\n\t\tif(nb[i] != 0)\n\t\t\tbreak;\n\tif(i == -1)\n\t\tcout << 0 << endl;\n\telse\n\t{\n\t\tfor(; i >= 0; --i)\n\t\t\tcout << nb[i];\n\t\tcout << endl;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "69", "index": "34355", "code": "int main()\n{\n\tconst int max=300;\n\tchar num1[max],num2[max];\n\tint len1,len2,i,j=0;\n\tint num11[max]={0},num22[max]={0};\n\tgets(num1);\n\tlen1=strlen(num1);\n\tgets(num2);\n\tlen2=strlen(num2);\n\tif(atoi(num1)==0&&atoi(num2)==0)\n\t{\n\t\tcout<<\"0\"<=0;i--)\n\t\t\tnum11[j++]=num1[i]-'0';\n\t\tj=0;\n\t\tfor(i=len2-1;i>=0;i--)\n\t\t\tnum22[j++]=num2[i]-'0';\n\t\tfor(i=0;i=10)\n\t\t\t{\n\t\t\t\tnum11[i]=num11[i]-10;\n\t\t\t\tnum11[i+1]++;\n\t\t\t}\n\t\t}\n\t\ti=max-1;\n\t\twhile(num11[i]==0)\n\t\t\ti--;\n\t\tfor(j=i;j>=0;j--)\n\t\t{\n\t\t\tcout<0)\n\t\tk--;\n\tfor(i=k;i>=0;i--)\n\t\tprintf(\"%d\",a[i]);\n\tprintf(\"\\n\");\n}\n\nint add_bigint(int *a,int alen,int *b,int blen,int *c)\n{\n\tint i;\n\tint len;\n\tlen=(alen>blen)?alen:blen;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]=c[i]%10;\n\t\t}\n\t}\n\treturn c[len]?(len+1):len;\n}\n\nint main()\n{\n\tchar s1[MAX],s2[MAX];\n\tint a[MAX],b[MAX],c[MAX];\n\tint alen,blen,clen;\n\tscanf(\"%s%s\",s1,s2);\n\talen=str2bigint(s1,a);\n\tblen=str2bigint(s2,b);\n\tclen=add_bigint(a,alen,b,blen,c);\n\tprint_bigint(c,clen);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34357", "code": "\nint a[300], b[300], c[300];\nint al, bl;\nchar s[300];\n\nint main() {\n\tmemset(a, 0, sizeof(a));\n\tmemset(b, 0, sizeof(b));\n\tscanf(\"%s\", s);\n\tal = strlen(s);\n\tint i, j = 0;\n\tfor (i = al-1; i >= 0; i--, j++) {\n\t\ta[j] = s[i]-'0';\n\t}\n\tscanf(\"%s\", s);\n\tbl = strlen(s);\n\tj = 0;\n\tfor (i = bl-1; i >= 0; i--, j++) {\n\t\tb[j] = s[i]-'0';\n\t}\n\tif (bl > al) {\n\t\tal = bl;\n\t}\n\t/*\n\tfor (i = al; i >= 0; i--)\n\t\tprintf(\"%d\", b[i]);\n\tprintf(\"\\n\");\n\t*/\n\tint carry = 0;\n\tfor (i = 0; i <= al+1; i++) {\n\t\tc[i] = a[i] + b[i] + carry;\n\t\tif (c[i] >= 10) {\n\t\t\tc[i] -= 10;\n\t\t\tcarry = 1;\n\t\t}\n\t\telse\n\t\t\tcarry = 0;\n\t}\n\twhile (c[al] == 0 && al > 0) al --;\n\tfor (i = al; i >= 0; i--)\n\t\tprintf(\"%d\", c[i]);\n\tputs(\"\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34358", "code": "int main()\n{\n char a[251],b[251],c[251];\n int d,x,y,i;\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n x=strlen(a);\n y=strlen(b);\n if(x>=y) //dui qi, qian jia 0\n {\n for(i=y;i!=-1 ;i--)\n b[i+x-y+1]=b[i];\n for(i=x-y;i!=-1;i--)\n b[i]=48;\n for(i=x;i!=-1;i--)\n a[i+1]=a[i]; \n a[0]=48;\n d=x;\n }\n //printf(\"%s,%s\",a,b);\n\telse if(y>x)\n {\n for(i=x;i!=-1 ;i--)\n a[i+y-x+1]=a[i];\n for(i=y-x;i!=-1;i--)\n a[i]=48; \n for(i=y;i!=-1;i--)\n b[i+1]=b[i]; \n b[0]=48;\n d=y; \n }\n\tc[d+1]='\\0';\n for(i=d;i!=-1 ;i--)\n {\n c[i]=a[i]+b[i]-96;\n if(c[i]>=10)\n {\n c[i]=c[i]-10;\n a[i-1]++;\n }\n c[i]=c[i]+48; \n }\n\n for(;c[0]==48;)\n { \n for(i=0;;i++)\n {\n c[i]=c[i+1];\n if(c[i]=='\\0')\n break;\n }\n }\n \tif(c[0]=='\\0')\n \t\tc[0]='0';\n printf(\"%s\",c);\n \n} \n"} +{"label": "69", "index": "34359", "code": "\nint main(){\n int i,m,n,carry=0;\n char a[252],b[252],A[252],B[252],ADD[252],add[252];\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n\n while(1){\n if(a[0]!='0')\n break;\n else if(a[0]=='0'&&strlen(a)>1){\n for(i=0;i1){\n for(i=0;i='0'&&ADD[i]<='9')\n carry=0;\n else{\n carry=(ADD[i]-'0')/10;\n ADD[i]=(ADD[i]-'0')%10+'0';\n }\n }else{\n if(strlen(A)>strlen(B))\n ADD[i]=A[i]+carry;\n else\n ADD[i]=B[i]+carry;\n if(ADD[i]>='0'&&ADD[i]<='9')\n carry=0;\n else{\n carry=(ADD[i]-'0')/10;\n ADD[i]=(ADD[i]-'0')%10+'0';\n }\n }\n }\n if(carry!=0){\n ADD[n]=carry+'0';\n ADD[n+1]=0;\n }else\n ADD[n]=0;\n \n for(i=0;i>a>>b;\n\tint c[250],d[250],m,n,k,i;\n\tm=daoxu(a,c);\n\tn=daoxu(b,d);\n\tfor(i=0;i<250;i++)\n\t{\n\t\tc[i]+=d[i];\n\t\tif(c[i]>9) \n\t\t{\n\t\t\tc[i+1]++;\n\t\t\tc[i]-=10;\n\t\t\t}\n\t\t}\n\tif(m==1&&n==1&&c[0]+d[0]==0) cout<<\"0\";\n\telse\n\t{\n\t\tfor(i=249;;i--)\n\t\t{\n\t\t\tif(c[i]!=0) \n\t\t\t{\n\t\t\t\tk=i;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tfor(i=k;i>=0;i--)\n\t\t{\n\t\t\tcout<> str1 >> str2;\n\tlen1 = strlen(str1);\n\tlen2 = strlen(str2);\n\tfor(i = len1 - 1;i >= 0;i--)\n\t\ta[j++] = str1[i] - '0';\n\tj = 0;\n\tfor(i = len2 - 1;i >= 0;i--)\n\t\tb[j++] = str2[i] - '0';\n\tfor(i = 0;i < len1 || i < len2;i++)\n\t{\n\t\tif(a[i] + b[i] >= 10) \n\t\t{\n\t\t\tc[i] = a[i] + b[i] - 10;\n\t\t\tb[i+1] = b[i+1] + 1;\n\t\t\tc[i+1] = 1;\n\t\t}\n\t\telse c[i] = a[i] + b[i];\n\t}\n\tfor(i = 250; i >= 0;i--)\n\t\tif(c[i] != 0)\n\t\t{\n\t\t\tpos = i;\n\t\t\tbreak;\n\t\t}\n\tfor(i = pos;i >= 0;i--)\n\t\tcout << c[i];\n\treturn 0;\n}\n"} +{"label": "69", "index": "34362", "code": "int main()\n{\n char s1[1000], s2[1000], str1[1000], str2[1000];\n int i, len1, len2, j, sum[1000]={0}, max, num1[1000]={0}, num2[1000]={0}, hash=0;\n cin.getline(s1,1000);\n cin.getline(s2,1000);\n len1=strlen(s1);\n len2=strlen(s2);\n for( i=0; i=len2)\n max=len1;\n else\n max=len2;\n for( i=0; i=10)\n {\n sum[i+1]+=1;\n sum[i]-=10; \n } \n }\n while(sum[max]) max++;\n while((max>1)&&(!sum[max-1])) max--;\n for( i=max-1; i>=0; i-- )\n {\n cout<>x;\n return 0;\n}\n"} +{"label": "69", "index": "34363", "code": "\nchar a[253],b[253],c[253];\nint j;\n\nint main()\n{\n\tvoid f1(int length,int length2);\n\tvoid f2(int length,int length3);\n\tvoid f3(int length1,int length2,int length3);\n\tfor (j=0;j<=250;j++)\n\t\tc[j]='0';\n\tcin>>a>>b;\n\tint length1,length2,length3=250,i;\n\tlength1=strlen(a)-1;\n\tlength2=strlen(b)-1;\n\tfor (i=0;(length1>=0&&length2>=0);i++,length1--,length2--,length3--)\n\t\tf3(length1,length2,length3);\n\tif (length1==-1)\n\t for (;length2>=0;length2--,length3--)\n\t \tf1(length2 ,length3);\n\telse\n\t\tfor (;length1>=0;length1--,length3--)\n\t\t\tf2(length1 ,length3);\n\tint k=0;\n\tfor (i=0 ; i <= 250 ; i++)\n\t\tif (c[i]!='0'||( c[i]=='0' && i==250) || k == 1)\n\t\t{\n\t\t\tcout<=10)\n\t\t{\n\t\t\tc[length3]=(x+z)%10+'0';\n\t\t\tc[length3-1]=(x+z)/10+'0';\n\t\t}\n\t\telse\n\t\t\tc[length3]=x+z+'0';\n}\n\nvoid f2(int length,int length3 )\n{\n\tint x,z;\n\t\tx=a[length]-'0';\n\t\tz=c[length3]-'0';\n\t\tif (x+z>=10)\n\t\t{\n\t\t\tc[length3]=(x+z)%10+'0';\n\t\t\tc[length3-1]=(x+z)/10+'0';\n\t\t}\n\t\telse\n\t\t\tc[length3]=x+z+'0';\n}\n\nvoid f3(int length1 ,int length2 ,int length3)\n{\n\tint x,y,z;\n\tx=a[length1]-'0';\n\ty=b[length2]-'0';\n\tz=c[length3]-'0';\n\tif (x+y+z>=10)\n\t{\n\t\tc[length3]=(x+y+z)%10+'0';\n\t\tc[length3-1]=(x+y+z)/10+'0';\n\t}\n\telse\n\t\tc[length3]=x+y+z+'0';\n}\n"} +{"label": "69", "index": "34364", "code": "int main()\n{\n\tint i, j;\n\tchar x[1000], y[1000];\n\tcin >> x >> y;\n\tint len1 = strlen(x);\n\tint len2 = strlen(y);\n\tif (len1 == 1 && len2 == 1)\n\t\tcout << 0;\n\tint sum[1000];\n\tfor (i = 0; i < 1000; i ++)\n\t\tsum[i] = 0;\n\tfor (i = len1 - 1, j = len2 - 1; i >= 0 && j >= 0; i --, j --)\n\t{\n\t\tint k = x[i] + y[j] - 2 * '0';\n\t\tsum[len1 - i - 1] += k;\n\t}\n\tif (len1 > len2)\n\t{\n\t\tfor (i = len1 - len2 - 1; i >= 0; i --)\n\t\t\tsum[len1 - i - 1] += x[i] - '0';\n\t}\n\telse if (len1 < len2)\n\t{\n\t\tfor (i = len2 - len1 - 1; i >= 0; i --)\n\t\t\tsum[len2 - i - 1] += y[i] - '0';\n\t}\n\tfor (i = 0; i < 999; i ++)\n\t\tif (sum[i] > 9)\n\t\t{\n\t\t\tsum[i + 1] += sum[i] / 10;\n\t\t\tsum[i] = sum[i] % 10;\n\t\t}\n\ti = 999;\n\twhile (sum[i] == 0)\n\t\ti --;\n\tfor (j = i; j >= 0; j --)\n\t\tcout << sum[j];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34365", "code": "\n\nint main()\n{\n\n\nconst int MAX=210;\n\nint num1[MAX]={0};\nint num2[MAX]={0};\nint ans[MAX]={0};\nchar input1[MAX]={NULL};\nchar input2[MAX]={NULL};\n\n\tcin>>input1>>input2;\n\n\tint len1=strlen(input1);\n\tint len2=strlen(input2);\n\n\tint longerlength=0;\n\tif(len1>len2)\n\t\tlongerlength=len1;\n\telse\n\t\tlongerlength =len2;\n\n\tint j=0;\n\tfor(int i= len1-1; i>=0; i--)\n\t{\n\t\tnum1[j]=input1[i]-'0';\n\t\tj++;\n\t\t\n\t}\n\tj=0;\n\n\tfor(int i= len2-1; i>=0; i--)\n\t{\n\t\tnum2[j]=input2[i]-'0';\n\t\tj++;\n\t\t\n\t}\n\n\n\tfor(int i=0; i=10)\n\t\t{\n\t\t\tans[i]=ans[i]%10;\n\t\t\tans[i+1]++;\n\t\t\t\n\t\t}\n\t}\n\n\n\tint start=0;\n\n\tfor(int i=MAX-1; i>=0; i--)\n\t{\n\t\t\tif(start==1)\n\t\t\tcout<0 && start == 0)\n\t\t{\n\t\t\tcout<len2)\n\t{ j=0;\n\t\tmin=len2;\n\t\tmax=len1;\n\t}\n\telse\n\t{\n\t\tj=1;\n\t\tmin=len1;\n\t\tmax=len2;\n\t}\n\tfor (i=0;i=0;i--)\n\t\tprintf(\"%c\",c[i]);\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "69", "index": "34367", "code": "int main(){\n char a[250],b[250];int c[251]={0},i,j;//???250???????251?\n cin.getline(a,250);cin.getline(b,250);\n for(j=strlen(a)-1,i=0;j>=0;--j,++i)\n c[i]+=a[j]-48;\n for(j=strlen(b)-1,i=0;j>=0;--j,++i){\n c[i+1]+=(b[j]-48+c[i])/10;\n c[i]=(b[j]-48+c[i])%10;\n }\n for(;c[i]!=0;++i){\n c[i+1]+=c[i]/10;\n c[i]%=10;\n }\n for(i=250;c[i]==0&&i>=0;--i);\n if(i>=0)do cout<0;i--)\n\t{\n\t\tif(a[i]==0&&n!=1) n--;\n\t\telse break;\n\t}\n\tfor(i=m-1;i>0;i--)\n\t{\n\t\tif(b[i]==0&&m!=1) m--;\n\t\telse break;\n\t}\n\tif(n-1;i--)\n\t\t{\n\t\t\tprintf(\"%c\",b[i]+48);\n\t\t}\n\t}\n\telse\n\t{\n\t\tl=m;\n\t\tx=n;\n\t\n\t\tfor(i=0;i-1;i--)\n\t\t{\n\t\t\tprintf(\"%c\",a[i]+48);\n\t\t}\n\t}\t\n\treturn 0;\n}"} +{"label": "69", "index": "34369", "code": "void main()\n{\n\tchar a[256]={0},b[256]={0};\n\tint f=0,k,l1,l2,i,j,n1[256]={0},n2[256]={0},n[256]={0};\n\n\tgets(a);\n l1=strlen(a);\n k=l1-1;\n\tfor(i=255;i>255-l1;i--)\n\t{\n\t\tn1[i]=a[k]-48;\n\t\tk--;\n\t}\n\n\tgets(b);\n l2=strlen(b);\n\tk=l2-1;\n\tfor(i=255;i>255-l2;i--)\n\t{\n\t\tn2[i]=b[k]-48;\n\t\tk--;\n\t}\n\n for(i=255;i>255-l1||i>255-l2;i--)\n\t{\n\t\tn[i]=n[i]+n1[i]+n2[i];\n\t\tif(n[i]>=10)\n\t\t{\n\t\t\tn[i-1]+=1;\n\t\t\tn[i]-=10;\n\t\t}\n\t}\n\tk=i;\n for(i=k;i<=255;i++)\n\t{\n\t\tif(n[i]==0&&f==0)\n\t\t\tcontinue;\n\t\tprintf(\"%d\",n[i]);\n\t\tf=1;\n\t}\n\tif(l1==1&&l2==1&&n[255]==0)\n\t\tprintf(\"0\");\n}\n"} +{"label": "69", "index": "34370", "code": "int main(){\n char a[255],b[255];\n int n,m,i,j,x,y,z,k=0;\n int c[255]={0};\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n m=strlen(a);\n n=strlen(b);\n x=m-1;\n y=n-1;\n while(1){\n if(x<0&&y<0){break;}\n if(x>=0&&y>=0){\n c[k]=a[x]-'0'+b[y]-'0';\n k++;\n x--;\n y--;\n }\n if(x>=0&&y<0){\n c[k]=a[x]-'0';\n k++;\n x--;\n y--; \n }\n if(x<0&&y>=0){\n c[k]=b[y]-'0';\n k++;\n x--;\n y--; \n } \n }\n for(i=0;i10){\n z=c[k-1];\n c[k-1]=z%10;\n printf(\"%d\",(z/10)); \n }\n for(i=k-1;i>=0;i--){\n if(c[i]!=0||k==1){break;}\n if(c[i]==0){k--;} \n }\n for(i=k-1;i>=0;i--){\n printf(\"%d\",c[i]); \n } \n\n return 0; \n}"} +{"label": "69", "index": "34371", "code": "int main()\n{\n\tchar s1[300],s2[300];\n\tint a3[301]={0};\n\tcin.getline(s1,300);\n\tcin.getline(s2,300);\n\tint len1 = strlen(s1),len2 = strlen(s2);\n\tfor (int i = 300; (i> 300-len1 || i>300-len2) ;i--)\n\t{\n\t\tif (len1+i-301>=0)\n\t\t{\n\t\ta3[i] += (int)(s1[len1+i-301])-48;\n\t\t}\n\t\tif (len2+i-301>=0)\n\t\t{\n\t\ta3[i]+= (int)(s2[len2+i-301])-48;\n\t\t}\n\t\tif (a3[i]>=10)\n\t\t{\n\t\t\ta3[i]-=10;\n\t\t\ta3[i-1]++;\n\t\t}\n\t}\n\tint k = 0;\n\tfor (int i = 1; i<=300;i++)\n\t{\n\t\tif (a3[i]!=0)\n\t\t{\n\t\t\tk=1;\n\t\t}\n\t\tif (k==1)\n\t\t{\n\t\t\tcout<>s;\n int m=strlen(s);\n for (int i=strlen(s);i>=1;i--)\n a[strlen(s)-i+1]=s[i-1]-'0';\n cin>>s;\n if (strlen(s)>m)\n m=strlen(s);\n for (int i=strlen(s);i>=1;i--)\n b[strlen(s)-i+1]=s[i-1]-'0';\n int i;\n for (i=1;i<=m+1;i++)\n {\n a[i+1]+=(a[i]+b[i])/10;\n a[i]=(a[i]+b[i])%10;\n }\n for (;a[i]==0&&i>1;i--);\n for (;i>=1;i--)\n cout<>a>>b;\n\tfor(i=0;i<251;i++)\n\t\tif(a[i]!='0'){ii=i;break;}\n\tif(ii!=0){\n\t for(i=ii;i<251;i++)\n\t\t\ta[i-ii]=a[i];}\n\tfor(i=0;i<251;i++)\n\t\tif(b[i]!='0'){ii=i;break;}\n\tif(ii!=0){\n\t for(i=ii;i<251;i++)\n\t\t\tb[i-ii]=b[i];}\n\tla=strlen(a),lb=strlen(b),l=la;\n\tif(la>lb)\n\t{\n\t\tl=la,b[la]='\\0';\n\t\tfor(i=la-1;i>=la-lb;i--)\n\t\t\tb[i]=b[i-la+lb];\n\t\tfor(i=0;ila)\n\t{\n\t\tl=lb,a[lb]='\\0';\n\t\tfor(i=lb-1;i>=lb-la;i--)\n\t\t\ta[i]=a[i-lb+la];\n\t\tfor(i=0;i=0;i--)\n\t{\n\t\tif(a[i]+b[i]-'0'+jin>'9')\n\t\t\ta[i]=a[i]+b[i]-'0'+jin-10,jin=1;\n\t\telse\n\t\t\ta[i]=a[i]+b[i]-'0'+jin,jin=0;\n\t}\n\tif(jin==1){\n\t\tcout<<1;zero=1;}\n\tfor(i=0;il2?l2:l1;\n\tmax_l=l1>l2?l1:l2;\n\tif(l1>l2){strcpy(ch3,ch1);}\n\telse\n\t{\n\t\tstrcpy(ch3,ch2);\n\t}\n\n\tfor(i=1;i<=min_l||jinwei==1;i++)\n\t{\n\t\tif(!jinwei)\n\t\t{\n\t\t\tif(i>min_l)break;\n\t\t\tif((number=ch1[l1-i]+ch2[l2-i]-'0'-'0')<10)\n\t\t\t{\n\t\t\t\tch3[max_l-i]=number+'0';\n\t\t\t\tjinwei=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tch3[max_l-i]=number-10+'0';\n\t\t\t\tjinwei=1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i>min_l)\n\t\t\t{\n\t\t\t\tif((number=ch3[max_l-i]-'0'+1)<10)\n\t\t\t\t{\n\t\t\t\t\tch3[max_l-i]=number+'0';\n\t\t\t\t\tjinwei=0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tch3[max_l-i]=number-10+'0';\n\t\t\t\t\tjinwei=1;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif((number=ch1[l1-i]+ch2[l2-i]-'0'-'0'+1)<10)\n\t\t\t{\n\t\t\t\tch3[max_l-i]=number+'0';\n\t\t\t\tjinwei=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tch3[max_l-i]=number-10+'0';\n\t\t\t\tjinwei=1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(i=0;i<=max_l;i++)\n\t{\n\t\tif(ch3[i]!='0')break;\n\t}\n\n\tif(!(i>=max_l))\n\t{\n\t\tfor(k=i;k<=max_l;k++)\n\t\t{\n\t\t\tif(ch3[k]!='\\0')\n\t\t\t{\n\t\t\t\tprintf(\"%c\",ch3[k]);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tprintf(\"0\");\n\t}\n\n\treturn 0;\n}"} +{"label": "69", "index": "34375", "code": "void dele0(char *a)\n{\tint i,j;\n\tfor(i=0;*(a+i)=='0';i++);\n\tfor(j=0;*(a+j+i)!=0;j++)\n\t{\t*(a+j)=*(a+i+j);\t}*(a+j)=0;\n}\n\nvoid main()\n{\n\tint i,a1,b1,add=0;\n\tchar a[300],b[300],c[300];\n\tscanf(\"%s\",a);dele0(a);\n\tscanf(\"%s\",b);dele0(b);\n\ta1=strlen(a);\n\tb1=strlen(b);\n\tfor(i=0;i9){c[i]=a[a1-i-1]+b[b1-i-1]-'0'-10+add;add=1;}\n\t\telse {c[i]=a[a1-i-1]+b[b1-i-1]-'0'+add;add=0;}\n\t}\n\n\tif(i==a1)\n\t{\tfor(;i9){c[i]=b[b1-i-1]-10+add;add=1;}\n\t\t\telse {c[i]=b[b1-i-1]+add;add=0;}\n\t\t}\t\n\t}\n\telse \n\t{\tfor(;i9){c[i]=a[a1-i-1]-10+add;add=1;}\n\t\t\telse {c[i]=a[a1-i-1]+add;add=0;}\n\t\t}\t\n\t}if(add==1)\tprintf(\"1\");\n\tif(i==0)printf(\"0\");\n\telse for(;i>0;i--)\n\t\t\tprintf(\"%c\",c[i-1]);\n\n}"} +{"label": "69", "index": "34376", "code": "int birev(char * s, int * sr)\n{\n\tint i, len=strlen(s);\n\tfor (i=0; s[i]; i++) sr[len-1-i]=s[i]-'0';\n\treturn len;\n}\nint bisum(int * ar, int alen, int * br, int blen, int * sum)\n{\n\tint len=(alen>blen)?alen:blen;\n\tint i, temp=0;\n\tfor (i=0; i1) sumlen--;\n\twhile (sumlen) {\n\t\tprintf(\"%d\", sum[sumlen-1]);\n\t\tsumlen--;\n\t}\n}\nint main ()\n{\n\tchar a[300], b[300];\n\tint ar[300]={0}, br[300]={0}, sum[300];\n\tint alen, blen, sumlen;\n\tgets(a);\n\tgets(b);\n\talen=birev(a, ar);\n\tblen=birev(b, br);\n\tsumlen=bisum(ar, alen, br, blen, sum);\n\tbiprt(sum, sumlen);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34377", "code": "\nint shift(char n){\n\tint shift;\n\tswitch(n){\n\t\tcase'1':shift=1;break;\n\t\tcase'2':shift=2;break;\n\t\tcase'3':shift=3;break;\n\t\tcase'4':shift=4;break;\n\t\tcase'5':shift=5;break;\n\t\tcase'6':shift=6;break;\n\t\tcase'7':shift=7;break;\n\t\tcase'8':shift=8;break;\n\t\tcase'9':shift=9;break;\n\t\tcase'0':shift=0;break;\n\t}\n\treturn shift;\n}\n\nint main(){\n\tchar a[252],b[252],c[252],d[252];\n\tint lengtha,lengthb,sum[252],lon,i,lina,linb,cha,sh;\n\td[0]='0';\n\td[1]='\\0';\n\tscanf(\"%s%s\",a,b);\n\tlengtha=strlen(a);\n\tlengthb=strlen(b);\n\tfor(lina=0;lina=lengthb-linb){\n\t\tcha=(lengtha-lina)-(lengthb-linb);\n\t\tfor(i=0;i<=cha;i++){\n\t\t\tc[i]='0';\n\t\t}\n\t\tc[cha+1]='\\0';\n\t\tstrcat(c,b);\n\t\tstrcat(d,a);\n\t\tlon=lengtha;\n\t\tsh=lina;\n\t}\n\telse{\n\t\tcha=(lengthb-linb)-(lengtha-lina);\n\t\tfor(i=0;i<=cha;i++){\n\t\t\tc[i]='0';\n\t\t}\n\t\tc[cha+1]='\\0';\n\t\tstrcat(c,a);\n\t\tstrcat(d,b);\n\t\tlon=lengthb;\n\t\tsh=linb;\n\t}\n\tsum[lon]=0;\n\tfor(i=lon;i>sh;i--){\n\t\tsum[i-1]=0;\n\t\tsum[i]=shift(d[i])+shift(c[i])+sum[i];\n\t\tif(sum[i]>=10){\n\t\t\tsum[i]-=10;\n\t\t\tsum[i-1]++;\n\t\t}\n\t}\n\tif(sh==0){\n\t\tif(sum[0]==1)printf(\"1\");\n\t for(i=1;i<=lon;i++)printf(\"%d\",sum[i]);\n\t printf(\"\\n\");\n\t}\n\telse{\n\tif(sum[sh-1]==1)printf(\"1\");\n\tfor(i=sh;i<=lon;i++)printf(\"%d\",sum[i]);\n\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34378", "code": "/*\n * ?????.cpp\n * Created on: 2012-11-24\n * Author: ???\n */\nchar a[300], b[300], c[300], tem[300];\nint i, len1, len2, len3, firstout;\nint plu(int n, int add) {\n\tif (n == 0) {\n\t\tif (a[0] + b[0] + add >= 106) {\n\t\t\tc[0] = a[0] + b[0] + add - 58;\n\t\t\tfor(i=len3;i>=1;i--){\n\t\t\t\tc[i]=c[i-1];\n\t\t\t}\n\t\t\tc[0]='1';len3=len3+1;\n\t\t} else {\n\t\t\tc[0] = a[0] + b[0] + add - 48;\n\t\t}\n\t} else {\n\t\tif (a[n] + b[n] + add >= 106) {\n\t\t\tif (n == (len3 - 1)) {\n\t\t\t\tc[n] = a[n] + b[n] + add - 58;\n\t\t\t\treturn plu(n - 1, 1);\n\t\t\t} else {\n\t\t\t\tc[n] = a[n] + b[n] + add - 58;\n\t\t\t\treturn plu(n - 1, 1);\n\t\t\t}\n\t\t} else {\n\t\t\tc[n] = a[n] + b[n] + add - 48;\n\t\t\treturn plu(n - 1, 0);\n\t\t}\n\t}\n}\nint main() {\n\tfor (i = 0; i < 300; i++) {\n\t\ta[i] = b[i] = c[i] = tem[i] = '0';\n\t}\n\tcin.getline(a, 300);\n\tcin.getline(b, 300);\n\tlen1 = strlen(a);\n\ta[len1] = '0';\n\tlen2 = strlen(b);\n\tb[len2] = '0';\n\tif (len1 > len2) {\n\t\tlen3 = len1;\n\t\tfor (i = len2 - 1; i >= 0; i--) {\n\t\t\ttem[i + (len3 - len2)] = b[i];\n\t\t}\n\t\tstrcpy(b, tem);\n\t} else {\n\t\tlen3 = len2;\n\t\tfor (i = len1 - 1; i >= 0; i--) {\n\t\t\ttem[i + (len3 - len1)] = a[i];\n\t\t}\n\t\tstrcpy(a, tem);\n\t}\n\tplu(len3 - 1, 0);\n\tfor (i = 0; i < len3; i++) {\n\t\tif (c[i] != '0') {\n\t\t\tfirstout = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i = firstout; i < len3; i++) {\n\t\tcout << c[i];\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34379", "code": "/*1069 ?????*/ \n\n\n\nint max(int a,int b)\n{\n\tif(a>b) return a;\n\telse return b;\n}\n\nint main()\n{\n\tchar x1[260],x2[260];\n\tcin.getline(x1,260);\n\tcin.getline(x2,260);\n int len1,len2; //len1.len2\n\tif(strlen(x1)0;i--)\n\t{\n\t\ta1[i]=x1[i-1]-'0';\n\t\ta2[i]=i-len1+len2>=1?x2[i-len1+len2-1]-'0':0;\n\t}\n\t//???????\n\tfor(i=len1;i>0;i--)\n\t{\n\ta1[i]+=a2[i];\n\t\tint j=i;\n\t\twhile(a1[j]>=10 && j>=0)\n\t\t{\n\t\t\ta1[j-1]+=a1[j]/10;\n\t\t\ta1[j]%=10;\n\t\t\tj--;\n\t}\n\t}\n //??\n\ti=0;\n\twhile(a1[i]==0 && ib)\n\t\treturn a;\n\treturn b;\n}\nvoid print (int len)\n{\n\tfor(i=len;i>=0;i--)\n\t{\n\t\tcout<0;i--)\n\t{\n\tif(num3[i]==0)\n\t\ttemp=i-1;\n\telse\n\t\tbreak;\n\t}\n\tprint(temp);\n\t\t\n}\nint main()\n{\n\n\tcin>>num_1;\n\tcin>>num_2;\n\tfor(i=0;i0||l2>0){\n\t\ta=(l1>0)?s1[--l1]-'0':0;\n\t\tb=(l2>0)?s2[--l2]-'0':0;\n\t\tc[l]+=a+b;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l++]%=10;\n\t}\n\twhile (c[l]==0&&l>0)\n\t\tl--;\n\tfor(i=l;i>=0;i--)\n\t\tprintf(\"%d\",c[i]);\n\treturn 0;\n}"} +{"label": "69", "index": "34382", "code": "int str2bigint(char*str,int*a)\n{\n\tint len=(int)strlen(str);\n\tint i;\n\tfor(i=0;i0)\n\t{\n\t\tk--;\n\t}\n\tfor(i=k;i>=0;i--)\n\t{\n\t\tprintf(\"%d\",a[i]);\n\t}\n}\nint add_bigint(int*a,int alen,int*b,int blen,int*c)\n{\n\tint i;\n\tint len=(alen>blen)?alen:blen;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]%=10;\n\t\t}\n\t}\n\treturn c[len]?(len+1):len;\n}\nint main()\n{\n\tchar s1[256],s2[256];\n\tint a[256],b[256],c[256];\n\tint alen,blen,clen;\n\tscanf(\"%s%s\",s1,s2);\n\talen=str2bigint(s1,a);\n\tblen=str2bigint(s2,b);\n\tclen=add_bigint(a,alen,b,blen,c);\n\tprint_bigint(c,clen);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34383", "code": "//#include \nchar * strrev(char * a){\n char *end;\n\t char *beg = a ;\n\t char temp;\n\t for(end = a; *end; end++);\n\t for(end--;beg < end;)\n\t{\n\t\ttemp = *beg;\n\t\t*beg = *end;\n\t\t*end = temp;\n\t\tbeg++;\n end--;\n\t}\n\treturn a;\n}\nint main()\n{\n\tchar a[500],b[500] ;\n\tchar *p;\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\t\n\tstrrev(a);\n\tstrrev(b);\n\t\n\tfor(p = a; *p; p++)\n\t\t*p = *p - '0';\n\tfor(;p=a; p--);\n\tif(p < a)\n\tprintf(\"0\");\n\tfor(;p>=a; p--)\n\t\tprintf(\"%d\",(int)*p);\n\tprintf(\"\\n\");\n\t//scanf(\"%s\",a);\n\treturn 0; \n}\n"} +{"label": "69", "index": "34384", "code": "main(){\n int a[255];\n int b[255];\n int c[255];\n memset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n memset(c,0,sizeof(c));\n char str[255];\n int len1,len2;\n cin >> str;\n len1 = strlen(str);\n for(int i = 0; i < len1; i++){\n a[len1 - 1 - i] = str[i] - '0';\n }\n cin >> str;\n len2 = strlen(str);\n for(int i = 0; i < len2; i++){\n b[len2 - 1 - i] = str[i] - '0';\n }\n if(len1 > len2){len2 = len1;}\n for(int i = 0; i < len2; i++){\n c[i] = a[i] + b[i];\n }\n for(int i = 0; i < len2; i++){\n if(c[i] >= 10){\n c[i + 1] += c[i] / 10;\n c[i] %= 10;\n }\n }\n for(int i = len2; i >= 0; i--){\n if(c[i] != 0){\n len2 = i;\n break;\n }\n if(i == 0){len2 = -1;}\n }\n if(len2 < 0){cout << \"0\" << endl;return 0;}\n for(int i = len2; i >= 0; i--){\n cout << c[i];\n }\n cout << endl;\n}"} +{"label": "69", "index": "34385", "code": "\nint main(int argc, char* argv[])\n{\n\tchar a[250],b[250];\n\tint c[250]={0};\n\tint i,j=0,d,s,n1,n2,max,pan=0;\n\tscanf(\"%s%s\",a,b);\n\tn1=strlen(a);\n\tn2=strlen(b);\n\tif(n1>n2){\n\t\tmax=n1;\n\t\td=n1-n2;\n\t\tfor(i=n1-1;i-d>=0;i--){\n\t\t\ts=a[i]+b[i-d]-'0'-'0';\n\t\t\tif(s+j>9){\n\t\t\t\tc[i]=s-10+j;\n\t\t\t\tj=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tc[i]=s+j;\n\t\t\t\tj=0;\n\t\t\t}\n\t\t}\n\t\tfor(i=d-1;i>=0;i--){\n\t\t\ts=a[i]+j-'0';\n\t\t\tif(s>9){\n\t\t\t\tc[i]=s-10;\n\t\t\t\tj=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tc[i]=s;\n\t\t\t\tj=0;\n\t\t\t}\n\t\t}\n\t}\n\telse{\n\t\tmax=n2;\n\t\td=n2-n1;\n\t\tfor(i=n2-1;i-d>=0;i--){\n\t\t\ts=b[i]+a[i-d]-'0'-'0';\n\t\t\tif(s+j>9){\n\t\t\t\tc[i]=s-10+j;\n\t\t\t\tj=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tc[i]=s+j;\n\t\t\t\tj=0;\n\t\t\t}\n\t\t}\n\t\tfor(i=d-1;i>=0;i--){\n\t\t\ts=b[i]+j-'0';\n\t\t\tif(s>9){\n\t\t\t\tc[i]=s-10;\n\t\t\t\tj=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tc[i]=s;\n\t\t\t\tj=0;\n\t\t\t}\n\t\t}\n\t}\n if(j==1){\n\t\tprintf(\"1\");\n\t}\n\tfor(i=0;i='A')&&(a<='Z'))\n\t{\n\t\tb=(int)(a)-55;\n\t\treturn b;\n\t}\n\telse\n\t{\n\t\tb=(int)(a)-48;\n\t\treturn b;\n\t}\n}\nchar fzh(int a)\n{\n\tchar b;\n\tif(a>9)\n\t{\n\t\tb=(char)(a-10+48);\n\t\treturn b;\n\t}\n\telse\n\t{\n\t\tb=(char)(a+48);\n\t\treturn b;\n\t}\n}\n\n\nint main()\n{\n\tchar a[10000],b[10000],a1[10000],b1[10000],c[10000];\n\tint n;\n\tint i,j,k;\n\tint sum=0;\n\tint l1,l2;\n\tint jinwei;\n\tfor(i=0;i<9999;i++)\n\t{\n\t\ta1[i]='0';\n\t\tb1[i]='0';\n\t}\n\ta1[9999]='\\0';\n\tb1[9999]='\\0';\n\t\n\t\n\t\n\tscanf(\"%s%s\",a,b);\n\tl1=strlen(a);\n\tl2=strlen(b);\n\t\n\tfor(i=0;i9)\n\t\t\t{\n\t\t\t\tjinwei=1;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tjinwei=0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc[i]=fzh((zh(a1[i])+zh(b1[i]))+jinwei);\n\t\t\tif((zh(a1[i])+zh(b1[i])+jinwei)>9)\n\t\t\t{\n\t\t\t\tjinwei=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tjinwei=0;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(i=9998;i>=0;i--)\n\t{\n\t\tif(sum==0)\n\t\t{\n\t\t\tif(c[i]!='0')\n\t\t\t{\n\t\t\t\tprintf(\"%c\",c[i]);sum++;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"%c\",c[i]);\n\t\t}\n\t}\n\tif(sum==0)\n\t{\n\t\tprintf(\"0\");\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "69", "index": "34387", "code": "/*\n * dshw1.cpp\n *\n * Created on: 2013-3-16\n * Author: ibm\n */\n\n\n\n\nstruct Addlist\n{\n\tint n;\n\tint *element;\n};\n\ntypedef struct Addlist *ablist;\n\nablist creatalist(void)\n{\n\tablist alist = (ablist)malloc(sizeof(struct Addlist));\n\tif(alist != NULL)\n\t{\n\t\talist -> element = (int*)malloc(sizeof(int)*MAXNUM);\n\t\tif (alist -> element)\n\t\t{\n\t\t\talist ->n = 0;\n\t\t\treturn alist;\n\t\t}\n\t\telse delete(alist);\n\t}\n\treturn NULL;\n}\n\nablist creatblist(void)\n{\nablist blist = (ablist)malloc(sizeof(struct Addlist));\n\tif(blist != NULL)\n\t{\n\t\tblist -> element = (int*)malloc(sizeof(int)*MAXNUM);\n\t\tif (blist -> element)\n\t\t{\n\t\t\tblist ->n = 0;\n\t\t\treturn blist;\n\t\t}\n\t\telse delete(blist);\n\t}\n}\n\n\nint main()\n{\n\tint i,j,k;\n\tint lena,lenb,len;\n\tint carry = 0;\n\nablist alist = creatalist();\nablist blist = creatblist();\n\nchar achar[MAXNUM];\ncin>>achar;\n//cout<>bchar;\n//cout< element[i] = achar[lena - i - 1] - '0';\n\t//cout< element[i] ;\n}\nfor( i=lena; i element[i] = 0;\n\t//cout< element[i] ;\n}\nfor( j=0; j element[j] = bchar[lenb - j - 1] - '0';\n\t//cout< element[j] ;\n}\nfor( j=lenb; j element[j] = 0;\n\t//cout< element[j] ;\n}\n//for (i=lena-1; i>=0; i--)\n//cout<<\"a \"<element[i]<=0; i--)\n//cout<<\"b \"<element[i]< element[k] = alist -> element[k] + blist -> element[k] + carry;\n\t//cout< element[k]< element[k] >= 10)\n\t{\n\t\talist -> element[k] -= 10;\n\t\tcarry = 1;\n\t}\n\telse carry = 0;\n\t//cout< element[k]< element[len] = 1;\n\n//for (i=lena; i>=0; i--)\n//{//cout<<\"aaaa \";\n//cout<element[i];}\n//cout<<' '<=0; i--)\n\t\tcout< element[i];\n\treturn 0;\n}\nelse\n{\n\tj = 0;\n\tfor (i=len-1; i>=0; i--)\n\t{\n\t\tif (alist -> element[i] == 0)\n\t\t{\n\t\t\tj++;\n\t\t}\n\t\telse\n\t\t\tbreak;\n\t}\n\t//cout<<\" \"<=0; k--)\n\t\t{\n\t\t\t//cout< element[k];\n\t\t}\n\telse\n\t\tcout<<\"0\"<=0; i--)\n\t///\t{\n//j = 0;\n\t\t//\tif (alist -> element[i] = 0)\n\t///\t\t\tj++;\n\t//\t\tfor( k=len-1-j; k>=0; k--)\n\t//\t{\n\t//\t\tcout< element[k];\n\t\t\t//i--;\n//\t\t}\n\t//\t\treturn 0;\n\t//\t}\n"} +{"label": "69", "index": "34388", "code": "int max(int a,int b)\n{\n\tif(a>b)\n\t\treturn a;\n\telse\n\t\treturn b;\n}\nint main()\n{\n\tchar a[300],b[300],t;\n\tint i,flag=0,aa,bb;\n\tmemset(a,0,300);\n\tmemset(b,0,300);\n\tcin.getline(a,300);\n\tcin.getline(b,300);\n\taa=strlen(a);\n\tbb=strlen(b);\n\tif(aa==1&&bb==1&&a[0]=='0'&&b[0]=='0')\n\t{\n\t\tcout<<\"0\";\n\t\treturn 0;\n\t}\n\tfor(i=aa;i<=max(aa,bb);i++)\n\t{\n\t\ta[i]='0';\n\t}\n\tfor(i=bb;i<=max(aa,bb);i++)\n\t{\n\t\tb[i]='0';\n\t}\n\tfor(i=0;i'9')\n\t\t{\n\t\t\ta[i]=(char)(a[i]-10);\n\t\t\ta[i+1]+=1;\n\t\t}\n\t}\n\t\n\tfor(i=max(aa,bb)+1;i>=0;i--)\n\t{\n\t\tif(flag==0&&a[i]>=49&&a[i]<=57)\n\t\t{\n\t\t\tcout<= 0; -- j, -- k)\n a[j] += b[k] - '0';\n for (j = n; j; -- j)//????\n {\n a[j - 1] += (a[j] - '0') / 10;\n a[j] = (a[j] - '0') % 10 + '0';\n }\n return;\n}\nint main()\n{\n cin >> p >> q;\n if (strlen(p) < strlen(q))//?a???????\n {\n a = q;\n b = p;\n }\n else\n {\n a = p;\n b = q;\n }\n n = strlen(a) - 1;\n m = strlen(b) - 1;\n cal();\n if (a[0] > '9')//???????\n {\n cout << 1;\n a[0] -= 10;\n }\n else//????????\n while (strlen(a) != 1 && a[0] == '0')\n ++ a;\n cout << a << endl;\n return 0;\n}\n"} +{"label": "69", "index": "34390", "code": "\nint main()\n{ \n\tchar a1[251],a2[251];\n\tint b1[251],b2[251];\n\tmemset(b1 ,0 ,sizeof(b1) );\n\tmemset(b2 ,0 ,sizeof(b2) );\n\n\tgets(a1);\n\tgets(a2);\n\tint n1=strlen(a1),n2=strlen(a2);\n\t\n\tint i,j;\n\tj=0;\n\tfor( i=n1-1;i>=0;i--)\n\t\tb1[j++]=a1[i]-'0';\n\tj=0;\n\tfor( i=n2-1;i>=0;i--)\n\t\tb2[j++]=a2[i]-'0';\n\n\tfor( i=0;(i<=n1)||(i<=n2);i++)\n\t{\n\t\tb1[i]+=b2[i];\n\t\tif(b1[i]>=10)\n\t\t{\n\t\t\t\tb1[i]=b1[i]%10;\n\t\t\t\tb1[i+1]++;\n\t\t}\n\n\t}\n\n\ti=250;\n\twhile( b1[i]==0)\n\t{\n\t\ti--;\n\t\tif( i==0 )\n\t\t\tbreak;\n\t}\n\n\twhile(i>=0)\n\t\tcout<=l2){\n\t\tstrcpy(longer,s1);\n\t\tstrcpy(shorter,s2);\n\t\tmax=l1;\n\t\tmin=l2;\n\t}else{\n\t\tstrcpy(longer,s2);\n\t\tstrcpy(shorter,s1);\n\t\tmax=l2;\n\t\tmin=l1;\n\t}\n\tp1=longer+max-1;\n\tp2=shorter+min-1;\n\n\n\tint t;\n\tt=0;\n\n\tif(max!=min){\n\t for(i=0;i=0;temp--)\n\t a1[j++]=a[temp]-'0';\n i=length2-1; j=0;\n for(int temp=i;temp>=0;temp--)\n\t b1[j++]=b[temp]-'0';\n /* for(i=0;i<252;i++)\n\t{ c[i]=a1[i]+b1[i];\n if(c[i]>=10) \n {\n\t c[i]-=10;\n\t c[i+1]++;\n }\n }*/\n for(i=0;i<252;i++)\n {\n a1[i]+=b1[i];\n if(a1[i]>=10)\n\t {\n\t a1[i]-=10;\n\t a1[i+1]++;\n\t }\n }\n i=251;\n while(a1[i]==0) i--;\n for(;i>=0;i--)\n\t cout<=y)\n\t\treturn x;\n\telse\n\t\treturn y;\n}\nint main()\n{\n\tchar a[260];\n\tchar b[260];\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\t\n\tchar num[10]={'0','1','2','3','4','5','6','7','8','9'};\n\tint numa[260]={0};\n\tint numb[260]={0};\n\tint c[260]={0};\n\t\n\tint i,j,lena,lenb;\n\tlena=strlen(a);\n\tlenb=strlen(b);\n\t\n\tint k=0;\n\tfor(i=lena-1;i>=0;i--)\n\t{\n\t\tfor(j=0;j<10;j++)\n\t\t{\n\t\t\tif(a[i]==num[j])\n\t\t\t{\n\t\t\t\tnuma[k]=j; //???a(12345)?????(54321)\n\t\t\t}\n\t\t}\n\t\tk++;\n\t}\n\tk=0; //???!!\n\tfor(i=lenb-1;i>=0;i--)\n\t{\n\t\tfor(j=0;j<10;j++)\n\t\t{\n\t\t\tif(b[i]==num[j])\n\t\t\t{\n\t\t\t\tnumb[k]=j; //???b(1234567)?????(7654321)\n\t\t\t}\n\t\t}\n\t\tk++;\n\t}\n\tfor(i=0;i=0;i--)\n\t{\n\t\tif(c[i]!=0)\n {\n\t\t\tM=i;\n\t\t break;\n\t\t}\n\t}\n\tfor(i=M;i>=0;i--)\n\t{\n\t\tprintf(\"%d\",c[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34394", "code": "int a[300],aw;\nint b[300],bw;\nint c[300],cw;\nint main(){\n\tchar tp[300];\n\tcin>>tp;\n\tfor(int i=1;i<=strlen(tp);i++){\n\t\ta[i]=tp[strlen(tp)-i]-48;\n\t\t\n\t}\n\taw=strlen(tp);\n\tcin>>tp;\n\tfor(int i=1;i<=strlen(tp);i++){\n\t\tb[i]=tp[strlen(tp)-i]-48;\n\t}\n\tbw=strlen(tp);\n\t\n\tint max=aw>bw?aw:bw;\n\tc[1]=0;\n\tfor(int i=1;i<=max;i++){\n\t\tc[i+1]=0;\n\t\tc[i]=c[i]+a[i]+b[i];\n\t\tc[i+1]=c[i]/10;\n\t\tc[i]=c[i]%10;\n\t}\n\tcw=1;\n\tfor(int i=max+5;i>=1;i--){\n\t\tif(c[i]!=0){\n\t\t\tcw=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int i=0;i>cha>>chb;\n\tint i,j,k=0,lena,lenb;\n\tlena = strlen(cha);\n\tlenb = strlen(chb);\n\tfor(i=lena-1;i>=0;i--)\n\t\ta[k++] = cha[i] - 48;\n\tk=0;\n\tfor(i=lenb-1;i>=0;i--)\n\t\tb[k++] = chb[i] - 48;\n\tfor(i=0;i<300;i++)\n\t\ta[i] += b[i];\n\tfor(i=0;i<300;i++)\n\t\tif(a[i]>=10)\n\t\t{\n\t\t\ta[i] -= 10;\n\t\t\ta[i+1]++;\n\t\t}\n\tj=299;\n\twhile(a[j]==0 && j>0) j--;\n\tfor(i=j;i>=0;i--)\n\t\tcout<pnext=NULL;\n for(int i=0;ivalue=a[i]-'0';\n pnew->pnext=p->pnext;\n p->pnext=pnew;\n p=*pheader;\n }\n for(int i=0;ipnext;\n for(int i=l-1;i<=max;i++) \n {\n pnode pnew=(pnode)malloc(sizeof (struct node));\n pnew->value=0;\n pnew->pnext=p->pnext;\n p->pnext=pnew;\n p=p->pnext;\n }\n}\nvoid node_plus(pnode pheader1,pnode pheader2,pnode* pheader3,int max)\n{\n int sum,num=0;\n pnode p1=pheader1->pnext;\n pnode p2=pheader2->pnext;\n pnode p3=(*pheader3)->pnext;\n for(int i=0;i<=max;i++)\n {\n sum=p1->value+p2->value+num;\n if(sum<10) {p3->value=sum;num=0;}\n else {p3->value=sum-10;num=1;}\n p1=p1->pnext;\n p2=p2->pnext;\n p3=p3->pnext;\n }\n}\nvoid node_delete(pnode pheader)\n{\n pnode p=pheader->pnext;\n pnode ptemp;\n while(p!=NULL)\n {\n ptemp=p;\n p=p->pnext;\n free(ptemp);\n }\n pheader->pnext=NULL;\n}\nvoid output(pnode pheader3,int l)\n{\n int t;\n pnode p=pheader3;\n int a[length]={0};\n for(int i=0;ipnext;a[i]=p->value;}\n for(int i=l-1;i>=0;i--) {if(a[i]!=0) {t=i;break;}}\n for(int i=t;i>=0;i--) {printf(\"%d\",a[i]);}\n}\nmain()\n{\n struct node header1,header2,header3;\n pnode pheader1=&header1;\n pnode pheader2=&header2;\n pnode pheader3=&header3;\n int l1,l2;\n int max;\n char a1[length]={'\\0'},a2[length]={'\\0'},a3[length+1]={'\\0'};\n for(int i=0;i=l2) max=l1+1;\n else max=l2+1;\n node_create(&pheader1,l1,a1,max);\n node_create(&pheader2,l2,a2,max);\n node_create(&pheader3,max,a3,max);\n node_plus(pheader1,pheader2,&pheader3,max);\n output(pheader3,max);\n node_delete(pheader1);\n node_delete(pheader2);\n node_delete(pheader3);\n getchar();\n getchar();\n}"} +{"label": "69", "index": "34397", "code": "main()\n{\n char str1[252],str2[252],str[252];\n int i,j,k,n,n1,n2;\n scanf(\"%s\",str1);\n scanf(\"%s\",str2);\n n1=strlen(str1);\n n2=strlen(str2);\n for(i=n1-1;i>=0;i--)\n str1[i+251-n1]=str1[i];\n for(i=0;i<251-n1;i++)\n str1[i]='0';\n for(i=n2-1;i>=0;i--)\n str2[i+251-n2]=str2[i];\n for(i=0;i<251-n2;i++)\n str2[i]='0';\n k=0;\n for(i=250;i>=0;i--)\n {\n \n str[i]=str1[i]+str2[i]-'0'-'0'+k;\n if(str[i]>9)\n { k=1;\n str[i]=str[i]+'0'-10;\n }\n if(str[i]<=9)\n {k=0;\n str[i]=str[i]+'0';\n }\n }\n for(i=0;i<=250;i++)\n {\n if(str[i]!='0')\n {\n n=i;\n break;\n \n }\n }\n if(i==251)\n printf(\"0\");\n for(i=n;i<=250;i++)\n printf(\"%c\",str[i]);\n \n \n \n \n \n \n \n \n \n }\n "} +{"label": "69", "index": "34398", "code": "\n\nconst int maxn = 250 + 10;\n\nint a[maxn], b[maxn], c[maxn];\nint la, lb, lc;\nchar s[maxn], t[maxn];\n\nint main()\n{\n //freopen(\"8.in\", \"r\", stdin);\n \n while (scanf(\"%s%s\", s, t) != EOF)\n {\n int la = strlen(s);\n int lb = strlen(t);\n memset(a, 0, sizeof(a));\n memset(b, 0, sizeof(b));\n memset(c, 0, sizeof(c));\n for (int i = 0; i < la; i ++)\n a[la - i - 1] = s[i] - '0';\n for (int i = 0; i < lb; i ++)\n b[lb - i - 1] = t[i] - '0';\n while (a[la - 1] == 0 && la > 1)\n la --;\n while (b[lb - 1] == 0 && lb > 1)\n lb --;\n if (la > lb)\n lc = la;\n else lc = lb;\n int add = 0;\n for (int i = 0; i < lc;i ++)\n {\n c[i] = (add + a[i] + b[i]) % 10;\n add = (add + a[i] + b[i]) / 10;\n }\n if (add != 0)\n c[lc ++] = add;\n for (int i = lc - 1; i >= 0; i --)\n printf(\"%d\", c[i]);\n printf(\"\\n\");\n }\n \n //while (1);\n}\n"} +{"label": "69", "index": "34399", "code": "main()\n{\n\tchar a[251],b[251],c[252];\n\tint m,n,i,t=0;\n\tgets(a);\n\tgets(b);\n\tm=strlen(a);\n\tn=strlen(b);\n\tif(mstr2?str1:str2;\n\tint s=0;\n\tfor(int j=0;j<=str+1;j++)\n\t{\n\t\tint x;\n\t\tx=m[j]+n[j]+s;\n\t\tif(x<10)\n\t\t{\n\t\t\tc[j]=x;\n\t\t\ts=0;\n\t\t}\n\t\telse if((x>=10)&&(x<19))\n\t\t{\n\t\t\tc[j]=x-10;\n\t\t\ts=1;\n\t\t}\n else if((x>=20)&&(x<29))\n\t\t{\n c[j]=x-20;\n\t\t\ts=2;\n\t\t}\n\t\tif((str==1)&&(x==0))\n\t\t{\n printf(\"0\");\n j=str+2;\n }\n\t}\n\tint q=0;\n\tfor(int k=str;k>=0;k--)\n\t{\n\t\tif(q==0)\n\t\t{\n\t\t\tif(c[k]==0)\n\t\t\tq=0;\n\t\t\telse\n\t\t\t{\n\t\t\t\tq=1;\n\t\t\t\tprintf(\"%d\",c[k]);\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\tprintf(\"%d\",c[k]);\n\t}\n\tprintf(\"\\n\");\n}"} +{"label": "69", "index": "34401", "code": "int main()\n{\n \tconst int MAX_LEN=200;\n\tunsigned an1[MAX_LEN];\n\tunsigned an2[MAX_LEN];\n\tchar seLine1[MAX_LEN+1]; \n\tchar seLine2[MAX_LEN+1];\n\tcin.getline(seLine1,MAX_LEN+1);\n\tcin.getline(seLine2,MAX_LEN+1);\n\tint nLen1 = strlen(seLine1);\n\tint nLen2 = strlen(seLine2);\n\tmemset(an1,0,sizeof(an1));\n\tmemset(an2,0,sizeof(an2));\n\tint i,j=0;\n\tfor(i=nLen1-1;i>=0;i--)\n\t\tan1[j++]=seLine1[i]-'0';\n\tj=0;\n\tfor(i=nLen2-1;i>=0;i--)\n\t\tan2[j++]=seLine2[i]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tan1[i]-=10;\n\t\t\tan1[i+1]++;\n\t\t}\n\t}\n\ti=MAX_LEN-1;\n\twhile(an1[i]==0) i--;\n\tif(i>=0)\n\t{\n\tfor(;i>=0;i--)\n\t\tcout<m)\n {\n for(int i=0;i+m=10)\n p[n-m]++;\n p[n+1]=0;\n if(p[n-m]=='0')\n {\n for(int i=n-m;im)\n {\n for(int i=n-m;in)\n f(b,a,c);\n else\n f(a,b,c);\n printf(\"%s\\n\",c);\n}"} +{"label": "69", "index": "34403", "code": "\n\nint main()\n{\n\tchar a1[251], b1[251];\n\tint a2[255] = { 0 }, b2[255] = { 0 }, sum[255] = { 0 };\n\tint a, b, i;\n\tcin >> a1;\n\tcin >> b1;\n\ta = strlen(a1);\n\tb = strlen(b1);\n\tfor (i = 0; i < a; i++)\n\t{\n\t\ta2[i] = a1[a - i - 1] - '0';\n\t}\n\tfor (i = 0; i < b; i++)\n\t{\n\t\tb2[i] = b1[b - i - 1] - '0';\n\t}\n\tfor (i = 0; i < max(a, b); i++)\n\t{\n\t\tsum[i] = sum[i] + a2[i] + b2[i];\n\t\tif (sum[i]>9)\n\t\t{\n\t\t\tsum[i] -= 10;\n\t\t\tsum[i + 1]++;\n\t\t}\n\t}\n\tfor (i = 254; ((sum[i] == 0) && (i > 0)); i--);\n\tfor (i = i; i >= 0; i--)\n\t{\n\t\tcout << sum[i];\n\t}\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34404", "code": "\nint main()\n{\n\tchar a1[260];\n\tchar a2[260];\n\n\tchar result[260];\n\n\tcin>>a1>>a2;\n\n\tint len1=strlen(a1);\n\tint len2=strlen(a2);\n\n\n\tmemset(result,0,sizeof(result));\n\tint i=len1-1;\n\tint j=len2-1;\n\tint k=0;\n\t\n\twhile(i>=0 && j>=0)\n\t{\n\t\tresult[k]+=a1[i]+a2[j]-'0';\n\t\tif(result[k]>'9')\n\t\t{\n\t\t\tresult[k+1]++;\n\t\t\tresult[k]-=10;\n\t\t}\n\t\ti--;\n\t\tj--;\n\t\tk++;\n\t}\n\tif(i>=0)\n\t{\n\t\twhile(i>=0)\n\t\t{\n\t\t\tresult[k]+=a1[i];\n\t\t\tif(result[k]>'9')\n\t\t\t{\n\t\t\t\tresult[k+1]++;\n\t\t\t\tresult[k]-=10;\n\t\t\t}\n\t\t\ti--;\n\t\t\tk++;\n\t\t}\n\t}\n\tif(j>=0)\n\t{\n\t\twhile(j>=0)\n\t\t{\n\t\t\tresult[k]+=a2[j];\n\t\t\tif(result[k]>'9')\n\t\t\t{\n\t\t\t\tresult[k+1]++;\n\t\t\t\tresult[k]-=10;\n\t\t\t}\n\t\t\tj--;\n\t\t\tk++;\n\t\t}\n\t}\n\n\tif(result[k]!=0)\n\t{\n\t\tresult[k]+='0';\n\t\tk++;\n\t}\n\n\twhile(result[k-1]=='0' && k!=1)\n\t\tk--;\n\n\n\tchar final[260];\n\tmemset(final,0,sizeof(final));\n\n\tfor(i=0;i b) return a;\n else return b;\n}\nint main()\n{\n int a[260] = {0}, b[260] = {0}, carry = 0, c[260] = {0}, i, j;\n char s1[260], s2[260];\n cin >> s1 >> s2;\n int len1 = strlen(s1);\n int len2 = strlen(s2);\n int len = max(len1, len2);\n for(i = len1 - 1, j = 0; i >= 0; --i, ++j)\n {\n a[i] = s1[j] - '0';\n }\n for(i = len2 - 1, j = 0; i >= 0; --i, ++j)\n {\n b[i] = s2[j] - '0';\n }\n for(i = 0; i < len + 1; ++i)\n {\n c[i] = a[i] + b[i] + carry;\n if(c[i] >= 10)\n {\n carry = 1;\n c[i] -= 10;\n }\n else carry = 0;\n }\n int judge = 0;\n /*for(i = len; c[i] == 0; --i);\n cout << i << endl;\n if(1) cout << 0;\n else*/\n for(;i >=0; --i)\n {\n if(c[i] != 0 || (c[i] == 0 && i == 0)) judge = 1;\n if(judge == 1) cout << c[i];\n }\n return 0;\n}\n"} +{"label": "69", "index": "34406", "code": "int main()\n{\n\tint d[1000]={0};\n\tint b[1000]={0};\n\tint q[1000]={0};\n\tint a1,c1,num;\n\tchar c[1000];\n\tchar a[1000];\n\tgets(c);\n\tgets(a);\n\ta1=strlen(a);\n\tc1=strlen(c);\n\tint i=0;\n\tdo\n\t{b[i]=c[c1-1-i]-48;\n\ti++;}while(i=1);\n\ti=i;\n\tdo\n\t{\n\t\tprintf(\"%d\",q[i]);\n\t\ti--;\n\t}while(i>=0);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34407", "code": "int main()\n{ int i,j,l1,l2,a1[301],a2[301],a3[301];\n char s1[253],s2[253];\n cin.getline(s1,253);\n cin.getline(s2,253);\n l1=strlen(s1);\n l2=strlen(s2);\n j=0;\n memset(a1,0,sizeof(a1));\n memset(a2,0,sizeof(a2)); \n\t memset(a3,0,sizeof(a3)); \n for(i=l1-1;i>=0;i--)\n { a1[j++]=s1[i]-'0';}\n j=0;\n for(i=l2-1;i>=0;i--)\n { a2[j++]=s2[i]-'0';}\n for(i=0;i<299;i++)\n { a3[i]+=a1[i]+a2[i];\n if(a3[i]>=10)\n { a3[i+1]++;\n\ta3[i]-=10;}\n }\n i=299;\n while(a3[i]==0&&i>0)i--;\n for(;i>=0;i--)\n {cout<= 0; i --)\n\t\t{\n\t\t\tnum1[i + 1] = num1[i];\n\t\t}\n\t\tfor (i = l2 - 1; i >= 0; i --)\n\t\t{\n\t\t\tnum2[i + l1 - l2 + 1] = num2[i];\n\t\t}\n\n\n\t\tnum1[0] = '0';\n\t\tfor (i = 0; i <= l1 - l2; i ++)\n\t\t{num2[i] = '0';}//?????0 \n\t\t\n\t\t//??? (?????????????)\n\t\tfor (i = l1; i >= 0; i --)\n\t\t{\n\t\t\tint\tn1, n2;\n\t\t\tn1 = (int)(num1[i] - '0');\n\t\t\tn2 = (int)(num2[i] - '0');\n\t\t\tsum[i] = n1 + n2;\n\t\t}//?sum \n\t\tfor (i = l1; i >= 0; i --)\n\t\t{\n\t\t\tif(sum[i] > 9)\n\t\t\t{\n\t\t\t\tsum[i - 1] ++;\n\t\t\t\tsum[i] = sum[i] - 10;\n\t\t\t}\n\t\t}//?? \n\t\t\t\t\n\t\t\n\t\t//??\n\t\tfor (i = 0; i <= l1; i ++)\n\t\t{\n\t\t\tif(sum[i] == 0)\n\t\t\t{continue;}\n\t\t\telse\n\t\t\t{break;}\n\t\t}//????0??? (?????????????????)\n\t\t\n\t\tif(i == l1 + 1)\n\t\t{\n\t\t\tcout << \"0\" << endl; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (j = i; j <= l1; j ++)\n\t\t\t{\n\t\t\t\tcout << sum[j];\n\t\t\t}\n\t\t\tcout << endl; \n\t\t}\n\n\t}\nreturn 0;\n}\n"} +{"label": "69", "index": "34409", "code": "//****************************\n//????????\n//???2013.12.21\n//****************************\nint main()\n{\n\tchar a[260],b[260];\n\tint i=0,j=0,n[260]={0},m[260]={0},l=0;\n\tgets(a);\n\tgets(b);\n\tfor(i=strlen(a)-1;i>=0;i--)\n\t\tn[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=strlen(b)-1;i>=0;i--)\n\t\tm[j++]=b[i]-'0';\n\tif(strlen(a)>strlen(b))\n\t\tl=strlen(a);\n\telse\n\t\tl=strlen(b);\n\tfor(i=0;i=10)\n\t\t{ \n\t\t\tn[i+1]=n[i+1]+1;\n\t\t\tn[i]=n[i]-10;\n\t\t}\n\t}\n\twhile(n[l]==0)\n\t\tl--;\n\tif(l>0)\n\tfor(i=l;i>=0;i--)\n\t\tcout<0){\n\t\tk--;\n\t}\n\tfor(i=k;i>=0;i--){\n\t\tprintf(\"%d\",a[i]);\n\t}\n}\nint add_bigint(int*a, int alen,int*b,int blen,int*c){\n\tint i;\n\tint len=(alen>blen)?alen:blen;\n\tfor(i=0;i=10){\n\t\t\tc[i+1]+=c[i]/10;\n\t\t\tc[i]%=10;\n\t\t}\n\t}\n\treturn c[len]?(len+1):len;\n}\n\nint main(){\n\tchar s1[MAX],s2[MAX];\n\tint a[MAX],b[MAX],c[MAX];\n\tint alen,blen,clen;\n\tscanf(\"%s%s\",s1,s2);\n\talen=str2bigint(s1,a);\n\tblen=str2bigint(s2,b);\n\tclen=add_bigint(a,alen,b,blen,c);\n\tprint_bigint(c,clen);\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "69", "index": "34411", "code": "int main()\n{\n char str1[252],str2[252],str3[253];\n char c;\n int s,i,a,b;\n gets(str1);\n gets(str2);\n a=strlen(str1);\n b=strlen(str2);\n for(i=0;i<=a/2-1;i++)\n {\n c=str1[i];\n str1[i]=str1[a-1-i];\n str1[a-1-i]=c;\n }\n for(i=0;i<=b/2-1;i++)\n {\n c=str2[i];\n str2[i]=str2[b-1-i];\n str2[b-1-i]=c;\n }\n if(a>b)\n {\n for(i=b;i=10)\n {\n str3[i]=s-10+'0';\n str2[i+1]=str2[i+1]+1;\n }\n else\n str3[i]=s+'0';\n }\n if(str2[i]==1)\n {\n str3[i]='1';\n str3[i+1]='\\0';\n }\n else str3[i]='\\0';\n for(i=strlen(str3)-1;str3[i]=='0'&&i>0;i--)\n str3[i]='\\0';\n for(i=strlen(str3)-1;i>=0;i--)\n printf(\"%c\",str3[i]);\n}\n"} +{"label": "69", "index": "34412", "code": "int main()\n{\n\tint yu=0,yu0=0,he=0,i,n,sum;\n\tchar str1[260],str2[260],str0[260],stra[260],strb[260],res[260];\n\n\tscanf(\"%s%s\",str1,str2);\n\n\tif (strlen(str1)==strlen(str2))\n\t{\n\t\tstrcpy(stra,str1);\n\t\tstrcpy(strb,str2);\n\t\tgoto final;\n\t}\n\tif (strlen(str1)>strlen(str2))\n\t{\n\t\tstrcpy(stra,str1);\n\t\tstrcpy(str0,str2);\n\t}\n\telse \n\t{\n\t\tstrcpy(stra,str2);\n\t\tstrcpy(str0,str1);\n\t} //???stra??????str0?????strb??0???str0???final??\n\n\n\tn=strlen(stra)-strlen(str0);\n\tfor (i=0;i<=n-1;i++)\n\t\tstrb[i]='0';\n\tstrb[n]='\\0';\n\tstrcat (strb,str0); //???stra?strb?????????\n\nfinal:\n\n\ti=strlen(stra)-1;\n\tfor (i=i;i>=0;i--)\n\t{\n\t\the=stra[i]+strb[i]-'0'-'0'+yu;\n\t\tyu0=he/10;\n\t\tif (he/10!=0)\n\t\t\the=he%10;\n\t\tres[i+1]=he+'0';\n\t\tyu=yu0;\n\t}\n\tres[strlen(stra)+1]='\\0';\n\tres[0]=yu+48; //res?????????0\n\t\n\tfor (i=0;i<=strlen(stra);i++)\n\t{\n\t\tsum=i;\n\t\tif (res[i]!='0')\n\t\t\tbreak;\n\t}\n\tfor (i=sum;i<=strlen(stra);i++)\n\t\tprintf(\"%c\",res[i]);\n\t\n\treturn 0;\n}\n"} +{"label": "69", "index": "34413", "code": "void add(char str1[],char str2[])\n{\n\tint a1[260],a2[260],sum[260]={0};\n\tint i,j,la,lb;\n\tla=strlen(str1);\n\tlb=strlen(str2);\n\tmemset(a1,0,sizeof(a1));\n\tmemset(a2,0,sizeof(a2));\n\ti=la-1;j=0;\n\twhile(i>=0)\n\t\ta1[j++]=str1[i--]-'0';\n\ti=lb-1;j=0;\n\twhile(i>=0)\n\t\ta2[j++]=str2[i--]-'0';\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tsum[i]=sum[i]-10;\n\t\t\tsum[i+1]+=1;\n\t\t}\n\t}\n\tif(i==la)\n\t{\n\t\tfor(i=la;i=10)\n\t\t\t{\n\t\t\t\tsum[i]-=10;\n\t\t\t\tsum[i+1]+=1;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=lb;i=10)\n\t\t\t{\n\t\t\t\tsum[i]-=10;\n\t\t\t\tsum[i+1]+=1;\n\t\t\t}\n\t\t}\n\t}\n\ti=259;\n\twhile(sum[i]==0) \n\t\ti--;\n\tif(i==-1) cout<<0<=0;i--)\n\t\t{\n\t\t\tcout<n=0;\n *phead=p2=p1;\n (*phead)->ahead=NULL;\n for(i=0;i<=n-2;i++)\n {\n p1=(struct num*)malloc(sizeof(struct num));\n p1->n=0;\n if(i==0)\n {\n (*phead)->next=p1;\n p1->ahead=(*phead);\n }\n else\n {\n p2->next=p1;\n p1->ahead=p2;\n }\n p2=p1;\n }\n p2->next=NULL;\n}\n\nint main()\n{\n char num1[10000];\n char num2[10000];\n //printf(\"Please input the first integer\\n\");\n scanf(\"%s\",num1);\n //printf(\"Please input the next integer\\n\");\n scanf(\"%s\",num2);\n if(num1[0]!='-'&&num2[0]!='-')\n {\n int i1=0;\n int i2=0;\n int max;\n while(num1[i1]!='\\0')\n {\n i1++;\n }\n while(num2[i2]!='\\0')\n {\n i2++;\n }\n if(i1>=i2)\n {\n max=i1;\n }\n else\n {\n max=i2;\n } //????????????????\n create(&phead1,max); //?????????max?max?max+1???\n create(&phead2,max);\n create(&phead3,max+1);\n struct num* ptemp1=phead1;\n struct num* ptemp2=phead2;\n int i3;\n for(i3=i1-1;i3>=0;i3--)\n {\n ptemp1->n=num1[i3]-'0';\n ptemp1=ptemp1->next;\n }\n int i4;\n for(i4=i2-1;i4>=0;i4--)\n {\n ptemp2->n=num2[i4]-'0';\n ptemp2=ptemp2->next;\n } //????????????\n struct num* ptemp3=phead1;\n struct num* ptemp4=phead2;\n struct num* ptemp5=phead3;\n while(ptemp3!=NULL)\n {\n if(((ptemp3->n)+(ptemp4->n)+(ptemp5->n))>=10)\n {\n ptemp5->n=ptemp5->n+((ptemp3->n)+(ptemp4->n))-10;\n ptemp3=ptemp3->next;\n ptemp4=ptemp4->next;\n ptemp5=ptemp5->next;\n ptemp5->n=(ptemp5->n)+1;\n }\n else\n {\n ptemp5->n=ptemp5->n+(ptemp3->n)+(ptemp4->n);\n ptemp3=ptemp3->next;\n ptemp4=ptemp4->next;\n ptemp5=ptemp5->next;\n }\n } //???????????????????????\n struct num* ptemp7=phead3;\n while(ptemp7->next!=NULL)\n {\n ptemp7=ptemp7->next;\n }\n //printf(\"the answer is:\\n\");\n if(ptemp7->n==0)\n {\n ptemp7=ptemp7->ahead;\n if(ptemp7->ahead==NULL)\n {\n printf(\"0\");\n return 0;\n }\n else\n {\n while(ptemp7->n==0)\n {\n ptemp7=ptemp7->ahead;\n }\n while(ptemp7!=NULL)\n {\n printf(\"%d\",ptemp7->n);\n ptemp7=ptemp7->ahead;\n }\n }\n }\n else\n {\n while(ptemp7!=NULL)\n {\n printf(\"%d\",ptemp7->n);\n ptemp7=ptemp7->ahead;\n }\n }\n\n }\n struct num* release1=phead1;//???????free???\n struct num* release2=phead2;\n struct num* release3=phead3;\n while(phead1->next!=NULL)\n {\n release1=phead1;\n phead1->next=(phead1->next)->next;\n free(release1->next);\n }\n free(phead1);\n while(phead2->next!=NULL)\n {\n release2=phead2;\n phead2->next=(phead2->next)->next;\n free(release2->next);\n }\n free(phead2);\n while(phead3->next!=NULL)\n {\n release3=phead3;\n phead3->next=(phead3->next)->next;\n free(release3->next);\n }\n free(phead3);\n return 0;\n}\n"} +{"label": "69", "index": "34415", "code": "int main(){\n\tint i,j,len1,len2;\n\tchar ds1[260],ds2[260];\n\tint a1[260]={0};\n\tint a2[260]={0};\n\tscanf(\"%s%s\",ds1,ds2);\n\tlen1=strlen(ds1);\n\tj=0;\n\tfor(i=len1-1;i>=0;i--){\n\t\ta1[j]=ds1[i]-'0';\n\t\tj++;\n\t}\n\tlen2=strlen(ds2);\n\tj=0;\n\tfor(i=len2-1;i>=0;i--){\n\t\ta2[j]=ds2[i]-'0';\n\t\tj++;\n\t}\n\tif(a1[0]==0&&a2[0]==0){\n\t\tprintf(\"0\");\n\t\treturn 0;\n\t}\n\tfor(i=0;i<250;i++){\n\t\ta1[i]+=a2[i];\n\t\tif(a1[i]>=10){\n\t\t\ta1[i]-=10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\tint q0=0;\n\tfor(i=250;i>=0;i--){\n\t\tif(q0)\n\t\t\tprintf(\"%d\",a1[i]);\n\t\telse if(a1[i]){\n\t\t\tprintf(\"%d\",a1[i]);\n\t\t\tq0=1;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34416", "code": "\nint main() {\n\tint a0[251], b0[251];\n\tchar a[251], b[251];\n\tcin.getline( a, 251 );\n\tcin.getline( b, 251 );\n\tmemset( a0, 0, sizeof( a0 ) );\n\tmemset( b0, 0, sizeof( b0 ) );\n\tfor ( int i = 0; i <= strlen( a ) - 1; i ++ ) {\n\t\ta0[i] = a[strlen( a ) - 1 - i] - '0';\n\t}\n\tfor ( int i = 0; i <= strlen( b) - 1; i ++ ) {\n\t\tb0[i] = b[strlen( b ) - 1 - i] - '0';\n\t}\n\tfor ( int i = 0; i <= 249; i ++ ) {\n\t\ta0[i + 1] += ( a0[i] + b0[i] ) / 10;\n\t\ta0[i] = ( a0[i] + b0[i] ) % 10;\n\t}\n\tint j = 0;\n\tfor ( int i = 249; i >= 0; i -- ) {\n\t\tif ( a0[i] != 0 ) {\n\t\t\tj = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor ( int i = j; i >= 0; i -- ) {\n\t\tcout << a0[i];\n\t}\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34417", "code": "int main()\n{\n\tchar a[30000],b[30000];\n\tint i,j,h[30000];\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\tif(strlen(a)>=strlen(b))\n\t{\n\t\t for(i=strlen(a)-1;i>=0;i--)\n\t\t {\n\t\t\tj=i-(strlen(a)-strlen(b));\n\t\t\tif(j>=0)\n\t\t\th[i]=a[i]-'0'+b[j]-'0';\n\t\t\telse\n\t\t\th[i]=a[i]-'0';\n\t\t\t}\n\t\t\tfor(i=strlen(a)-1;i>0;i--)\n\t\t\t{\n\t\t\t\tif(h[i]>=10)\n\t\t\t {\n\t\t\t h[i]=h[i]-10;\n\t\t\t h[i-1]=h[i-1]+1;\n\t\t }\n\t\t\t\t//printf(\"%d\\n\",h[i]);\n\t\t\t}\n\t\t\tif(h[0]>=10)\n\t\t {\n\t\t\t printf(\"1%c\",h[0]+'&');\n\t\t }\n\t\t if(h[i]>0&&h[i]<10)\n\t\t {\n\t\t\t\tprintf(\"%c\",h[0]+'0');\n\t\t\t}\n\t\t\tfor(i=0;i=0;i--)\n\t\t {\n\t\t\tj=i-(strlen(b)-strlen(a));\n\t\t\tif(j>=0)\n\t\t\th[i]=b[i]-'0'+a[j]-'0';\n\t\t\telse\n\t\t\th[i]=b[i]-'0';\n\t\t\t}\n\t\t\tfor(i=strlen(b)-1;i>0;i--)\n\t\t\t{\n\t\t\t\tif(h[i]>=10)\n\t\t\t {\n\t\t\t h[i]=h[i]-10;\n\t\t\t h[i-1]=h[i-1]+1;\n\t\t }\n\t\t\t\t//printf(\"%d\\n\",h[i]);\n\t\t\t}\n \n\tif(h[0]>=10)\n\t\t {\n\t\t\t printf(\"1%c\",h[0]+'&');\n\t\t }\n\t\t if(h[i]>0&&h[i]<10)\n\t\t {\n\t\t\t\tprintf(\"%c\",h[0]+'0');\n\t\t\t}\n\t\t\tfor(i=0;i=0;i--)\n\t an1[j++]=str1[i]-'0';\n j=0;\n for(int i=len2-1;i>=0;i--)\n\t an2[j++]=str2[i]-'0';\n\tfor(int i=0;i9)\n\t\t{\n\t\t\tan1[i]=an1[i]-10;\n\t\t\tan1[i+1]++;\n\t\t}\n\t}\n\ti=maxlen-1;\n\twhile(an1[i]==0)\n\t\ti--;\n\tfor(;i>=0;i--)\n\t\tcout<= len1 && index >= len2)\n\t\treturn ;\n\tint1[index] += int2[index] + carry;\n\tcarry = int1[index] / 10;\n\tint1[index] %= 10;\n\tsum(index + 1, carry);\n\treturn ;\n}\nint main(){\n\tcin >> input1 >> input2;\n\tmemset(int1,0,sizeof(int1));\n\tmemset(int2,0,sizeof(int2));\n\tint i,j;\n\tlen1 = strlen(input1);\n\tfor(i=len1-1,j=0;i>=0;i--,j++)\n\t\tint1[j] = input1[i]-'0';\n\tlen2 = strlen(input2);\n\tfor(i=len2-1,j=0;i>=0;i--,j++)\n\t\tint2[j] = input2[i]-'0';\n\tsum(0, 0);\n\tfor(i = len1>len2?len1:len2;i >= 0;i --)\n\t\tif(int1[i] != 0)\n\t\t\tbreak;\n\tif(i < 0)\n\t\tcout << 0;\n\telse{\n\t\tfor(;i >= 0;i--)\n\t\t\tcout << int1[i];\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34420", "code": "int main()\n{\n\tint i,j,m,n,max;\n\tchar a[250],b[250],c[1000],d[250],e[250];\n\tfor(i=0;i<=249;i++) c[i]=0;\n\tgets(a);\n\tgets(b);\n\tm=strlen(a);\n\tn=strlen(b);\n\tfor(i=m-1,j=0;i>=0;j++,i--) d[j]=a[i];\n\tfor(;j<=249;j++) d[j]='0';\n\tfor(i=n-1,j=0;i>=0;j++,i--) e[j]=b[i];\n\tfor(;j<=249;j++) e[j]='0';\n\tmax=(m>n)? m:n;\n\tfor(i=0;d[i]>'0'||e[i]>'0'||i<=max;i++)\n\t{\n\t\tc[i]=d[i]+e[i]-'0';\n\t\tif(c[i]>'9')\n\t\t{\n\t\t\tc[i]=c[i]-10;\n\t\t\td[i+1]=d[i+1]+1;\n\t \n\t\t}\n\t}\n\tfor(i=249;i>=0;i--)\n\t{\n\t\tif(c[i]>'0')\n\t\tbreak;\n\t}\n\t\n\tif(i<0) printf(\"0\\n\");\n\telse\n\t{\n\t\tfor(;i>=0;i--)\n\t {\n\t\t printf(\"%c\",c[i]);\n\t }\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34421", "code": "int main()\n{\n\tchar a[251],b[252];\n\tint c[251]={0},d[251]={0},s[251]={0},len1,len2,j=0,i;\n\tcin>>a;\n\tcin>>b;\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\tc[j]=a[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\td[j]=b[i]-'0';\n\t\tj++;\n\t}\n\tfor(i=0;i=10)\n\t\t{\n\t\t\ts[i+1]++;\n\t\t\ts[i]=s[i]-10;\n\t\t}\n\t}\n\ti=250;\n\twhile(s[i]==0&&i>0)\n\t{\n\t\ti--;\n\t}\n\tfor(j=i;j>=0;j--)\n\t\tcout<=b)\n return a;\n else\n return b;\n } \nmain()\n{\n char s1[250],s2[250],s3[250],t;\n scanf(\"%s\",s1);\n scanf(\"%s\",s2);\n int a,b,c,d,i;\n a=strlen(s1);\n b=strlen(s2);\n int f=max(a,b);\n for(i=0;i<=(int)(a-1)/2;i++)\n {\n t=s1[i];\n s1[i]=s1[a-1-i];\n s1[a-1-i]=t; \n } \n for(i=0;i<=(int)(b-1)/2;i++)\n {\n t=s2[i];\n s2[i]=s2[b-1-i];\n s2[b-1-i]=t; \n }\n if (a>=b)\n { \n for(i=b;i<=a;i++)\n s2[i]='0';\n s1[a]='0';\n } \n else\n { \n for(i=a;i<=b;i++)\n s1[i]='0';\n s2[b]='0'; \n } \n for(i=0;i<=f;i++)\n {\n c=(s1[i]-'0')+(s2[i]-'0');\n if (c>=10)\n { \n d=c%10;\n s3[i]=d+'0';\n s1[i+1]=s1[i+1]-'0'+1+'0';\n } \n else \n s3[i]=c+'0';\n } \n for(i=0;i<=(int)f/2;i++)\n {\n t=s3[i];\n s3[i]=s3[f-i];\n s3[f-i]=t; \n }\n for (i=0;i<=f;i++)\n if (s3[i]-'0'!=0||i==f)\n for(i;i<=f;i++) \n printf (\"%c\",s3[i]);\n} "} +{"label": "69", "index": "34423", "code": "\nmain()\n{\n\tint i,j,k,s,t=0,q=0; \n\tchar x[250],y[250],z[251]; \n\tscanf(\"%s\",&x);\n\tscanf(\"%s\",&y);\n\t\n\tfor(i=0;;i++)\n\tif(x[i]==0)break; \n\tfor(j=0;;j++)\n\tif(y[j]==0)break;\n\t\n\tfor(k=1;;k++)\n\t{\n\t\tif(k<=i&&k<=j)\n\t\t{\n\t\t\ts=x[i-k]+y[j-k]-96+t;\n\t\t z[k]=s%10+48;t=s/10; \n\t\t } \n\t\tif(k>i&&k<=j)\n\t\t{\n\t\t\ts=y[j-k]-48+t;\n\t\t z[k]=s%10+48;t=s/10; \n\t\t\t} \n\t\tif(k<=i&&k>j)\n\t\t{\n\t\t\ts=x[i-k]-48+t;\n\t\t z[k]=s%10+48;t=s/10; \n\t\t\t} \n\t\tif(k>i&&k>j)\n\t\t{\n\t\t\tz[k]=t+48;\n\t\t\tbreak;\n\t\t\t} \n\t\t} \n\n\tfor(;k>0;k--)\n\tif(z[k]!=48||q!=0)\n\t{\n\t\tq++;\n\t\tprintf(\"%c\",z[k]);\n\t\t} \n\tif(q==0)printf(\"0\"); \n\n\treturn 0; \n\t} "} +{"label": "69", "index": "34424", "code": "int main()\n{\n\tchar a[300],b[300];\n\tunsigned int a1[300],b1[300];\n\tmemset(a1, 0, sizeof(a1));\n\tmemset(b1, 0,sizeof(b1));\n\tint i,j=0,k,l;\n\tcin.getline(a,300);\n\tcin.getline(b,300);\n\tint len1=strlen(a);\n\tint len2=strlen(b);\n for(i=len1-1;i>=0;i--)\n\t{\n\t\ta1[j]=a[i]-'0';\n\t\tj++;\n\t}\n\tj=0;\n\tfor(i=len2-1;i>=0;i--)\n\t{\n\t\tb1[j]=b[i]-'0';\n\t\tj++;\n\t}\n\tfor( i=0;i<250;i++)\n\t{\n\t\ta1[i]=a1[i]+b1[i];\n\t\tif(a1[i]>=10)\n\t\t{\n\t\t\ta1[i]=a1[i]-10;\n\t\t\ta1[i+1]++;\n\t\t}\n\t}\n\tj=251;\n\twhile(a1[j]==0 && j > 0) j--;\n\tfor(i=j;i>=0;i--)\n\t\tcout<len1)//????1??2????\n\t{\n\t\tstrcpy(str3,str1);\n\t\tstrcpy(str1,str2);\n\t\tstrcpy(str2,str3);\n\t\tt=len1;\n\t\tlen1=len2;\n\t\tlen2=t;\n\n\t}\n\n\tfor(i=0;i<=len2;i++)\n\t{\n\t\tm=str1[i]+str2[i]+g-96;//????\n\t\tif(m>=10)\n\t\t{\n\t\t\tm=m%10;\n\t\t\tstr1[i]=m+48;\n\t\t\tg=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstr1[i]=m+48;\n\t\t\tg=0;\n\t\t}\n\t}\n\n\tfor(i=len2+1;i<=len1;i++)//?2?????????????\n\t{\n\t\tif(str1[i]+g==58)\n\t\t{\n\t\t\tstr1[i]=48;\n\t\t\tg=1;\n\t\t}\n\t\telse if(str1[i]+g!=58&&g==1)\n\t\t{\n\t\t\tstr1[i]++;\n\t\t\tg=0;\n\t}\n\t}\n\tfor(i=len1;i>=0;i--)\n\t{\n\t\tif(str1[i]==48)//???????0.\n\t\t\tr++;\n\t\telse\n\t\t\tbreak;\n\t}\n\tif(r<=len1)\n\t{\n\tfor(i=len1-r;i>=0;i--)\n\t\tcout<>line1 ;\n\tcin>>line2 ;\n\tint lenth1 = strlen(line1) ;\n\tint lenth2 = strlen(line2) ;\n\tint i = 0 , j = 0 ;\n\tfor(i = lenth1 - 1 ; i>= 0 ; i--)\n\t{\n\t\tan1[j++] = line1[i] - '0' ;\n\t}\n\tfor(i = lenth2 - 1 , j = 0 ; i>= 0 ; i--)\n\t{\n\t\tan2[j++] = line2[i] - '0' ;\n\t}\n\tint flag = 0 ;\n\tfor(i = 0 ; i=10)\n\t\t{\n\t\t\tan1[i+1] += an1[i]/10 ;\n\t\t\tan1[i] = an1[i]%10 ;\n\t\t}\n\t\tif(an1[i])\n\t\t\tflag = i ;\n\t}\n\tfor(j = flag ; j>=0 ; j--)\n\t\tcout<=a;p--)\n\t\t*(p+m)=*p;\n\tp+=m;\n\tfor(;p>=a;p--)\n\t\t*p='0';\n\tfor(p=b;*p!='\\0';)\n\t\tp++;\n\tm=b+252-p;\n\tfor(;p>=b;p--)\n\t\t*(p+m)=*p;\n\tp+=m;\n\tfor(;p>=b;p--)\n\t\t*p='0';\n\tfor(i=0;i<253;i++)\n\t\tc[i]=a[i]+b[i]-96;\n\tfor(i=252;i>0;i--)\n\t\tif(c[i]>9)\n\t\t{\n\t\t\tc[i]-=10;\n\t\t\tc[i-1]++;\n\t\t}\n\twhile(*q==0)\n\t\tq++;\n\tif(q>=c+252)\n\t\tcout<<\"0\";\n\twhile(q> ca;\n\tcin >> cb;\n\tnuma = strlen(ca);\n\tnumb = strlen(cb);\n\t//cout << numa << \" \" << numb << endl;\n\tmemset(ia,0,sizeof(int));\n\tmemset(ib,0,sizeof(int));\n\tmemset(result,0,sizeof(int));\n\tif(numa > numb)\n\t\tweishu = numa;\n\telse\n\t\tweishu = numb;\n\tfor(int i = 0;i < numa;i ++)\n\t{\n\t\ttempc = ca[numa - i - 1];\n\t\tia[i] = atoi(&tempc);\n\t}\n\tfor(int i = 0;i < numb;i ++)\n\t{\n\t\ttempc = cb[numb - i - 1];\n\t\tib[i] = atoi(&tempc);\n\t}\n\tfor(int i = 0;i <= weishu;i ++)\n\t{\n\t\tresult[i] = ia[i] + ib[i] + jinwei;\n\t\tif(result[i] > 9)\n\t\t{\n\t\t\tresult[i] = result[i] - 10;\n\t\t\tjinwei = 1;\n\t\t}\n\t\telse\n\t\t\tjinwei = 0;\n\t}\n\tfor(int i = 250;i >= 0;i --)\n\t{\n\t\tif(result[i] != 0)\n\t\t{\n\t\t\tresultweishu = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(int i = resultweishu;i >= 0; i --)\n\t\tcout << result[i];\n\tcout << endl;\n}\n\n\n/*#include\n\nint mycmp(const void *a, const void *b)\n{\n\treturn *(int *)a - *(int *)b;\n}\n\nint main()\n{\n\tint n = 0;\n\tcin >> n;\n\tint tianji[1000] = {0};\n\tint qiwang[1000] = {0};\n\tint isusedt[1000] = {0};\n\tint isusedq[1000] = {0};\n\tint tempt = 0;\n\tint tempq = 0;\n\twhile(n != 0)\n\t{\n\t\tmemset(tianji,0,sizeof(int));\n\t\tmemset(qiwang,0,sizeof(int));\n\t\tmemset(isusedt,0,sizeof(int));\n\t\tmemset(isusedq,0,sizeof(int));\n\t\ttempt = 0;\n\t\ttempq = 0;\n\t\tfor(int i = 0;i < n;i ++)\n\t\t\tcin >> tianji[i];\n\t\tfor(int i = 0;i < n;i ++)\n\t\t\tcin >> qiwang[i];\n\t\tqsort(tianji,n,sizeof(int),mycmp);\n\t\tqsort(qiwang,n,sizeof(int),mycmp);\n\t\tfor(int i = tempt;i < n;i ++)\n\t\t{\n\t\t}\n\t\tcin >> n;\n\t}\n\treturn 0;\n}*/"} +{"label": "69", "index": "34429", "code": "\n\nint main()\n{\n char str1[250],str2[250]; \n int a[250],b[250],c[250]={0}; \n int x1,x2,i,j,k=0,l;\n scanf(\"%s\\n\",str1);\n scanf(\"%s\",str2);\n x1=strlen(str1);\n x2=strlen(str2);\n for(i=0;i=0&&i>=0;j--,i--)\n {\n c[k]=a[i]+b[j]+c[k];\n c[k+1]=c[k]/10;\n c[k]=c[k]%10;\n k++;\n } \n if(i>=0) \n for(l=i;l>=0;l--)\n {\n c[k]=a[l]+c[k];\n c[k+1]=c[k]/10;\n c[k]=c[k]%10;\n k++;\n }\n else \n for(l=j;l>=0;l--)\n {\n c[k]=b[l]+c[k];\n c[k+1]=c[k]/10;\n c[k]=c[k]%10;\n k++;\n }\n int r=k;\n for(i=0;i<=k-1;i++)\n {if(c[k-i]==0)\n r=k-i-1;\n else\n i=k+1;\n \n }\n for(l=r;l>=0;l--)\n printf(\"%d\",c[l]);\n \n}\n"} +{"label": "69", "index": "34430", "code": "int main()\n{\n\tconst int maxlen = 202;\n\tchar szline1[maxlen];\n\tchar szline2[maxlen];\n\tint an1[maxlen];\n\tint an2[maxlen];\n\tgets(szline1);\n\tgets(szline2);\n\tint len1 = strlen(szline1);\n\tint len2 = strlen(szline2);\n\tmemset(an1, 0, sizeof (an1));\n\tmemset(an2, 0, sizeof(an2));\n\tfor (int i = len1 - 1, j = 0; i >= 0; i --)\n\t\tan1[j ++] = szline1[i] - '0';\n\tfor (int i = len2 - 1, j = 0; i >= 0; i --)\n\t\tan2[j ++] = szline2[i] - '0';\n\tint begin;\n\tfor (int i = 0; i < maxlen - 1; i ++)\n\t{\n\t\tan1[i] += an2[i];\n\t\tif (an1[i] >= 10)\n\t\t{\n\t\t\tan1[i] -= 10;\n\t\t\tan1[i + 1] ++;\n\t\t}\n\t\tif (an1[i])\n\t\t\tbegin = i;\n\t}\n\tfor (int i = begin; i >= 0; i --)\n\t\tprintf(\"%d\", an1[i]);\n\t\n\treturn 0;\n}"} +{"label": "69", "index": "34431", "code": "int main()\n{\n\tint i,la,lb,max;\n\tchar a[260],b[260];\n\tint\ta2[260]={0},b2[260]={0},c[260]={0};\n\tscanf(\"%s %s\",a,b);\n\tla=strlen(a);\n\tlb=strlen(b);\n\tfor(i=0;ilb){max=la;}\n\telse {max=lb;}\n\t\n\tfor(i=0;i=10)\n\t\t\t{c[i]=(c[i]+a2[i]+b2[i])%10;\n\t\t\tc[i+1]++;\n\t\t\t}\n\t\t\telse {c[i]=(c[i]+a2[i]+b2[i])%10;}\t\t\t\n\t\tif(a2[max-1]+b2[max-1]+c[max-1]>=10)\n\t\t{\n\t\tmax++;\n\t\t}\n\t}\n\twhile(c[max-1]==0&&max>1)max--;\n\n\tfor(i=max-1;i>=0;i--)\n\t{\n\t\tprintf(\"%d\",c[i]);\n\n\t}\n}\n"} +{"label": "69", "index": "34432", "code": "int main()\n{\n\tchar str1[251], str2[251];\n\tint i = 0, j = 0, len1, len2, a[251], b[251], c[251], pos = 0;\n\tmemset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n// memset(c,0,sizeof(c));\n\tcin >> str1 >> str2;\n\tlen1 = strlen(str1);\n\tlen2 = strlen(str2);\n\tfor(i = len1 - 1;i >= 0;i--)\n\t\ta[j++] = str1[i] - '0';\n\tj = 0;\n\tfor(i = len2 - 1;i >= 0;i--)\n\t\tb[j++] = str2[i] - '0';\n\tfor(i = 0;i < len1 || i < len2;i++)\n\t{\n\t\ta[i] = a[i] + b[i];\n\t\tif(a[i] >= 10)\n\t\t{\n\t\t\ta[i] = a[i] - 10;\n\t\t\ta[i+1] = a[i+1] + 1;\n\t\t}\n\t}\n\tfor(i = 250; i >= 0;i--)\n\t\tif(a[i] != 0)\n\t\t{\n\t\t\tpos = i;\n\t\t\tbreak;\n\t\t}\n\tfor(i = pos;i >= 0;i--)\n\t\tcout << a[i];\n\treturn 0;\n}\n"} +{"label": "69", "index": "34433", "code": "\nmain()\n{\n char a[251],b[251],c[251];\n gets (a);\n gets (b);\n int i,j,m,n;\n \n for (i = 0;i <= 250;i++)\n if (a[i] == '\\0')\n break; \n \n for (j = 0;j <= 250;j++)\n if (b[j] == '\\0')\n break; \n\n if (i >= j)\n {\n m = i - j;\n for (;j >= 0;j--)\n b[j + m] = b[j];\n while (m >0)\n {\n b[m - 1] = '0';\n m--;\n } \n n = i; \n }\n if (i < j)\n {\n m = j - i;\n for (;i >= 0;i--)\n a[i + m] = a[i];\n while (m >0)\n {\n a[m - 1] = '0';\n m--;\n } \n n = j; \n }\n for (i = n - 1;i >= 0;i--)\n {\n c[i] = a[i] + b[i] -'0';\n if ((int)c[i] >= 10 + '0')\n {\n c[i] = c[i] - 10;\n a[i - 1]++; \n }\n }\n \n if (a[0] + b[0] > 9 + '0' + '0')\n {\n printf (\"1\");\n for (i = 0;i <= n - 1;i++)\n printf (\"%c\",c[i]);\n }\n else\n for (i = 0;i <= n - 1;i++)\n {\n if ((int)c[0] == 0 + '0' && n != 1)\n for (i = 1;i <= n - 1;i++)\n printf (\"%c\",c[i]);\n else\n printf (\"%c\",c[i]);\n }\n}\n"} +{"label": "69", "index": "34434", "code": "main()\n{\n\tint a=0,b=0,c=0,d=0;\n\tchar str1[250],str2[250],str3[250],str[250],str4[250],str5[250];\n\tscanf(\"%s\",str1);\n\tscanf(\"%s\",str2);\n\ta=strlen(str1);\n\tb=strlen(str2);\n\tif(str1[0]==48)\n\t{\n\t\tfor(int i=0;i=b)\n\t{\n\t\tfor(int i=0;i0;i=i-1)\n\t{\n\t\tif(str[i]>=58)\n\t\t{\n\t\t\tstr[i]=str[i]-10;\n\t\t\tstr[i-1]=str[i-1]+1;\n//\t\t\tprintf(\"%d,%d\\n\",str[i],str[i-1]);\n\t }\n\t}\n\tstr[a]='\\0';\n\tif(str[0]>=('0'+10))\n\t{\n\t\tstr[0]=str[0]-10;\n\t\tprintf(\"1%s\\n\",str);\n//\t\tprintf(\"%s\\n\",str);\n\t}\n\n\telse\n\tprintf(\"%s\",str);\t\n} "} +{"label": "69", "index": "34435", "code": "\nmain()\n{\n char a[250],b[250],m[250];\n int c,d,i,e,j,k;\n scanf(\"%s %s\",a,b);\n c=strlen(a);\n d=strlen(b);\n k=0;\n if(cd)\n {\n for(i=c-1;i>=c-d;i--)\n b[i]=b[i+d-c];\n for(i=0;i0;i--)\n {\n m[i]=a[i]+b[i]-'0';\n if(m[i]>'9')\n {\n m[i]=m[i]-10;\n a[i-1]=a[i-1]+1;\n }\n }\n m[0]=a[0]+b[0]-'0';\n if(m[0]>'9')\n {\n m[0]=m[0]-10;\n printf(\"1\");\n for(i=0;i=countb)\n\t{\n\t\tfor(i=counta-1;i>=(counta-countb);i--) b[i]=b[i-counta+countb];\n\t\tfor(i=0;i<(counta-countb);i++) b[i]='0';\n\t}\n if(counta=(countb-counta);i--) a[i]=a[i-countb+counta];\n\t\tfor(i=0;i<(countb-counta);i++) a[i]='0';\n\t\tcounta=countb;\n\t}\n for(i=0;i<=counta;i++) c[i]='0';\n for(i=counta-1;i>=0;i--)\n\t{\n\t\tA=a[i]-'0';\n\t\tB=b[i]-'0';\n\t\tC=A+B;\n\t\tD=c[i+1]-'0';\n\t\tif(C+D<10)\n\t\t\tc[i+1]=num[C+D];\n\t\telse\n\t\t{\n\t\t\tc[i]='1';\n\t\t\tc[i+1]=num[C+D-10];}\n\t\t}\n\t\tfor(i=0;i<=counta;i++)\n\t\t\tif(c[i]=='0') j++;\n\t\tif(j==counta+1) printf(\"0\\n\");\n\t\telse\n\t\t{\n\t\t\tfor(i=0;i<=counta;i++)\n\t\t\t{\t\n\t\t\t\tif(c[i]!='0')\n\t\t\t\t{\n\t\t\t\t\tr=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=r;i<=counta;i++) printf(\"%c\",c[i]);\n\t\t}\n\t\tprintf(\"\\n\");\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "69", "index": "34437", "code": "/*???????????????????????*/\n\n/*include???*/\n\n/*??????*/\nstruct node\n{\n\tint x;\t\t//?????????\n\tstruct node *pb;\t\t//???????\n\tstruct node *pn;\t\t//???????\n};\n\n/*???????*/\nvoid jianli (struct node *ph,int* f,int* w,struct node **pl)\t\t//ph?????f???????pl?????????????\n{\n\tchar c;\t\t//c???????\n\t*f=1;\t\t//f????????1?????-1????????1\n\t*w=1;\t\t//w???????????1\n\tstruct node *p,*q;\t\t//?????????????\n\tc=getchar();\t\t//???????\n\t//?????????\n\tif (c=='-')\n\t{\n\t\t*f=-1;\t\t//???????\n\t\tc=getchar();\t\t//??????????????\n\t}\n\tq=ph;\t\t//????????q\n\t//?????0\n\tif (c=='0')\n\t{\n\t\tfor (;;)\t\t//??????????0??\n\t\t{\n\t\t\tif (c!='0')\t\t\t//??0??\n\t\t\t\tbreak;\n\t\t\telse\t\t//???0?????\n\t\t\t\tc=getchar();\n\t\t}\n\t\tif ((c<'0')||(c>'9'))\t\t//??c???0??????????????0???????????????0?????\n\t\t{\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//??????????????\n\t\t\tp->pn=q->pn;\n\t\t\tp->pb=q;\n\t\t\tq->pn=p;\n\t\t\tq=p;\n\t\t\tp->x=0;\t\t//?????0\n\t\t\t*w=1;\t\t//????????\n\t\t\t*pl=p;\t\t//?????????????????\n\t\t\treturn;\t\t//????\n\t\t}\n\t}\n\t//??????0??????????????\n\tfor (;;)\n\t{\n\t\tif ((c<'0')||(c>'9'))\t\t//???????????\n\t\t{\n\t\t\t*pl=p;\t\t//?????????????????\n\t\t\treturn;\t\t//????\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=q->pn;\n\t\tp->pb=q;\n\t\tq->pn=p;\n\t\tq=p;\n\t\tp->x=c-'0';\t\t//????????\n\t\t*w=*w+1;\t\t//??+1\n\t\tc=getchar();\t\t//?????????\n\t}\n}\n\n/*????*/\nvoid shanchu (struct node *ph)\t\t//ph????????\n{\n\tstruct node *p,*q;\t\t//?????????????\n\tp=ph;\t\t//????????p\n\t//?????????????????\n\tfor (;;)\n\t{\n\t\tif (p==NULL)\t\t//?????????????????\n\t\t\treturn;\n\t\tq=p->pn;\t\t//?????????\n\t\tfree(p);\t\t//????\n\t\tp=q;\t\t//???????????\n\t}\n}\n\n/*???????????*/\nvoid jia (struct node *pl1,struct node *pl2,struct node *p3)\t\t//p3??????????pl1?pl2??????????????\n{\n\tstruct node *a,*b,*p,*r;\t\t//?????????????\n\tint c,j=0;\t\t//c????????????j???????0??????1????\n\ta=pl1;\t\t//a?b??????????????????????\n\tb=pl2;\n\t//?????????\n\tfor (;;)\n\t{\n\t\tif ((a->pb==NULL)&&(b->pb==NULL))\t\t//???????????????\n\t\t{\n\t\t\tif (j==1)\t\t//????????????????????p3?????????1???\n\t\t\t{\n\t\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\t\tp->pn=p3->pn;\n\t\t\t\tp->pb=p3;\n\t\t\t\tp3->pn=p;\n\t\t\t\t(p->pn)->pb=p;\n\t\t\t\tp->x=1;\t\t//?????1\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//????????????????????????????\n\t\telse if (a->pb==NULL)\n\t\t{\n\t\t\tr=a;\n\t\t\ta=b;\n\t\t\tb=r;\n\t\t}\n\t\t//?????????????????????????\n\t\tif (b->pb==NULL)\n\t\t{\n\t\t\tc=a->x+j;\t\t//????????????????\n\t\t\tj=0;\t\t//??j\n\t\t\tif (c>9)\t\t//???????c?10????????\n\t\t\t{\n\t\t\t\tj=1;\n\t\t\t\tc=c-10;\n\t\t\t}\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\tp->pn=p3->pn;\n\t\t\tp->pb=p3;\n\t\t\tp3->pn=p;\n\t\t\t(p->pn)->pb=p;\n\t\t\tp->x=c;\t\t//???????\n\t\t\ta=a->pb;\t\t//??????????\n\t\t\tcontinue;\t\t//??????????\n\t\t}\n\t\tc=a->x+b->x+j;\t\t//????????????????\n\t\tj=0;\t\t//??j\n\t\tif (c>9)\t\t//???????c?10????????\n\t\t{\n\t\t\tj=1;\n\t\t\tc=c-10;\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=p3->pn;\n\t\tp->pb=p3;\n\t\tp3->pn=p;\n if (p->pn!=NULL)\n\t\t\t(p->pn)->pb=p;\n\t\tp->x=c;\t\t//???????\n\t\ta=a->pb;\t\t//??????????\n\t\tb=b->pb;\n\t}\n}\n\n/*???????????*/\nvoid jian (struct node *pl1,struct node *pl2,struct node *p3)\t\t//p3??????????pl1?pl2???????????????pl1??????pl2????\n{\n\tstruct node *a,*b,*p,*r;\t\t//?????????????\n\tint c,j=0;\t\t//c????????????j???????0??????1????\n\ta=pl1;\t\t//a?b??????????????????????\n\tb=pl2;\n\t//?????????\n\tfor (;;)\n\t{\n\t\tif ((a->pb==NULL)&&(b->pb==NULL))\t\t//???????????????\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//???????????????????\n\t\tif (b->pb==NULL)\n\t\t{\n\t\t\tc=a->x-j;\t\t//????????????????\n\t\t\tj=0;\t\t//??j\n\t\t\tif (c<0)\t\t//???????c?10??????????\n\t\t\t{\n\t\t\t\tj=1;\n\t\t\t\tc=c+10;\n\t\t\t}\n\t\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\t\tp->pn=p3->pn;\n\t\t\tp->pb=p3;\n\t\t\tp3->pn=p;\n\t\t\tp->x=c;\t\t//???????\n\t\t\ta=a->pb;\t\t//??????????\n\t\t\tcontinue;\t\t//??????????\n\t\t}\n\t\tc=(a->x)-(b->x)-j;\t\t//????????????????\n\t\tj=0;\t\t//??j\n\t\tif (c<0)\t\t//???????c?10??????????\n\t\t{\n\t\t\tj=1;\n\t\t\tc=c+10;\n\t\t}\n\t\tp=(struct node*)malloc(sizeof(struct node));\t\t//???????????????\n\t\tp->pn=p3->pn;\n\t\tp->pb=p3;\n\t\tp3->pn=p;\n\t\tp->x=c;\t\t//???????\n\t\ta=a->pb;\t\t//??????????\n\t\tb=b->pb;\n\t}\n}\n\n/*????*/\nvoid shuchu (struct node *p3,int f)\t\t//p3?????????f??????????\n{\n\tstruct node *p;\t\t//?????????????\n\tp=p3->pn;\t\t//??????????????????????\n\t//?????????0??????\n\tfor (;;)\n\t{\n\t\tif ((p==NULL)||(p->x!=0))\t\t//?????????????????????0?????\n\t\t\tbreak;\n\t\telse\n\t\t\tp=p->pn;\t\t//???0??????\n\t}\n\t//??????0?????0\n\tif (p==NULL)\n\t\tprintf(\"0\\n\");\n\t//????????\n\telse\n\t{\n\t\tif (f==-1)\t\t//???????????\n\t\t\tprintf(\"-\");\n\t\tfor (;;)\t\t//???????????\n\t\t{\n\t\t\tif (p==NULL)\t\t//???????????????\n\t\t\t{\n\t\t\t\tprintf(\"\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\t\t//????????\n\t\t\t{\n\t\t\t\tprintf(\"%d\",p->x);\t\t//??????????\n\t\t\t\tp=p->pn;\t\t//?????\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*???????????????*/\nint bijiao (struct node *p1,struct node *p2,int w1,int w2)\t\t//p1,p2?????????w1,w2????????????????????????????????????????????0\n{\n\tstruct node *a,*b;\t\t//?????????????\n\t//?????\n\tif (w1!=w2)\t\t//?????????????\n\t\treturn w1-w2;\n\telse\t\t//???????????????\n\t{\n\t\ta=p1->pn;\t\t//??????????????????????\n\t\tb=p2->pn;\n\t\tfor (;;)\n\t\t{\n\t\t\tif (a==NULL)\t\t//?????????????????????????????0\n\t\t\t\treturn 0;\n\t\t\tif ((a->x)!=(b->x))\t\t//????????????????????\n\t\t\t\treturn (a->x)-(b->x);\n\t\t\telse\t\t//?????????????????\n\t\t\t{\n\t\t\t\ta=a->pn;\n\t\t\t\tb=b->pn;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*???*/\nint main ()\n{\n\tint f1,f2,w1,w2,f;\t\t//f1?f2?????????????1????-1?f????????????w1?w2?????????\n\t//???????????????????????p1?p2??????p3???\n\tstruct node *p1=(struct node*)malloc(sizeof(struct node));\n\tstruct node *p2=(struct node*)malloc(sizeof(struct node));\n\tstruct node *p3=(struct node*)malloc(sizeof(struct node));\n\tstruct node *pl1,*pl2,*p;\t\t//pl1?pl2???????????p???????????\n\t//???????\n\tp1->pn=NULL;\n\tp2->pn=NULL;\n\tp3->pn=NULL;\n\tp1->pb=NULL;\n\tp2->pb=NULL;\n\tp3->pb=NULL;\n\t//??????\n\t//printf(\"???????????????\");\n\tjianli(p1,&f1,&w1,&pl1);\t\t//????????p1??????????????????\n\t//printf(\"???????????????\");\n\tjianli(p2,&f2,&w2,&pl2);\t\t//????????p1??????????????????\n\t//printf(\"???????????????\");\n\t//?????\n\tif (f1*f2==1)\t\t//???????????????????p3?????\n\t{\n\t\tjia (pl1,pl2,p3);\n\t\tshuchu (p3,f1);\n\t}\n\telse\t\t//??????????????????????????????????????????\n\t{\n\t\tif (bijiao (p1,p2,w1,w2)==0)\t\t//????????????????????0\n\t\t\tprintf(\"0\\n\");\n\t\telse\n\t\t{\n\t\t\tif (bijiao (p1,p2,w1,w2)<0)\t\t//????????????????\n\t\t\t{\n\t\t\t\tf=f1;\t\t//????\n\t\t\t\tf1=f2;\n\t\t\t\tf2=f;\n\t\t\t\tp=p1;\t\t//?????\n\t\t\t\tp1=p2;\n\t\t\t\tp2=p;\n\t\t\t\tp=pl1;\t\t//???????\n\t\t\t\tpl1=pl2;\n\t\t\t\tpl2=p;\n\t\t\t}\n\t\t\tjian (pl1,pl2,p3);\t\t//????????????????p3?????\n\t\t\tshuchu (p3,f1);\n\t\t}\n\t}\n\t//????\n\tshanchu(p1);\n\tshanchu(p2);\n\tshanchu(p3);\n\t//????\n\treturn 0;\n}\n"} +{"label": "69", "index": "34438", "code": "/*\n * ?????.cpp\n * Created on: 2012-11-24\n * Author: ???\n */\nchar a[300], b[300], c[300], tem[300];//a?b??????????????c??????\nint i, len1, len2, len3, firstout;//len1?len2???a?b???\nint plu(int n, int add) {//???????????\n\tif (n == 0) {//?????1?0??\n\t\tif (a[0] + b[0] + add >= 106) {//????????\n\t\t\tc[0] = a[0] + b[0] + add - 58;//??1?????\n\t\t\tfor(i=len3;i>=1;i--){//????????\n\t\t\t\tc[i]=c[i-1];\n\t\t\t}\n\t\t\tc[0]='1';len3=len3+1;//?1??\u00911\u0092\n\t\t} else {//?????\n\t\t\tc[0] = a[0] + b[0] + add - 48;//????1?\n\t\t}\n\t} else {//?????1?\n\t\tif (a[n] + b[n] + add >= 106) {//????\n\t\t\t/*if (n == (len3 - 1)) {//\n\t\t\t\tc[n] = a[n] + b[n] + add - 58;\n\t\t\t\treturn plu(n - 1, 1);//\n\t\t\t} else {//*/\n\t\t\t\tc[n] = a[n] + b[n] + add - 58;\n\t\t\t\treturn plu(n - 1, 1);\n\n\t\t} else {//\n\t\t\tc[n] = a[n] + b[n] + add - 48;\n\t\t\treturn plu(n - 1, 0);\n\t\t}\n\t}\n}\nint main() {\n\tfor (i = 0; i < 300; i++) {//\n\t\ta[i] = b[i] = c[i] = tem[i] = '0';\n\t}\n\tcin.getline(a, 300);//\n\tcin.getline(b, 300);//\n\tlen1 = strlen(a);//\n\ta[len1] = '0';//\n\tlen2 = strlen(b);//\n\tb[len2] = '0';//\n\tif (len1 > len2) {//\n\t\tlen3 = len1;//\n\t\tfor (i = len2 - 1; i >= 0; i--) {//\n\t\t\ttem[i + (len3 - len2)] = b[i];\n\t\t}\n\t\tstrcpy(b, tem);//\n\t} else {//\n\t\tlen3 = len2;//\n\t\tfor (i = len1 - 1; i >= 0; i--) {//\n\t\t\ttem[i + (len3 - len1)] = a[i];\n\t\t}\n\t\tstrcpy(a, tem);//\n\t}\n\tplu(len3 - 1, 0);//\n\tfor (i = 0; i < len3; i++) {//\n\t\tif (c[i] != '0') {//\n\t\t\tfirstout = i;//\n\t\t\tbreak;//\n\t\t}\n\t}\n\tfor (i = firstout; i < len3; i++) {//\n\t\tcout << c[i];\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34439", "code": "int an1[MAX_LEN+10];\nint an2[MAX_LEN+10];\nchar szLine1[MAX_LEN+10];\nchar szLine2[MAX_LEN+10];\n\nint main()\n{\n scanf(\"%s\", szLine1);\n scanf(\"%s\", szLine2);\n int i, j;\n memset( an1, 0, sizeof(an1));\n memset( an2, 0, sizeof(an2));\n int nLen1 = strlen( szLine1);\n j = 0;\n for( i = nLen1 - 1;i >= 0 ; i --)\n an1[j++] = szLine1[i] - '0';\n\n int nLen2 = strlen(szLine2);\n j = 0;\n for( i = nLen2 - 1;i >= 0 ; i--)\n an2[j++] = szLine2[i] - '0';\n\n for( i = 0;i < MAX_LEN ; i ++ )\n {\n an1[i] += an2[i];\n if( an1[i] >= 10 )\n {\n an1[i] -= 10;\n an1[i+1] ++;\n }\n }\n\n char bStartOutput = false;\n for( i = MAX_LEN; i >= 0; i-- )\n {\n if( bStartOutput)\n printf(\"%d\", an1[i]);\n else if( an1[i] ) {\n printf(\"%d\", an1[i]);\n bStartOutput = true;\n }\n }\n if(!bStartOutput)\n printf(\"0\");\n\n \n return 0;\n}\n"} +{"label": "69", "index": "34440", "code": "\nchar inputA[260], inputB[260];\nint a[260] = {0}, b[260] = {0};\n\nint main() {\n\tcin.getline(inputA, 260);\n\tcin.getline(inputB, 260);\n\n\tint alen = strlen(inputA), blen = strlen(inputB);\n\tfor(int i = alen - 1, j = 0; i >= 0; i --, j ++)\n\t\ta[j] = inputA[i] - '0';\n\tfor(int i = blen - 1, j = 0; i >= 0; i --, j ++)\n\t\tb[j] = inputB[i] - '0';\n\n\tint len = max(alen, blen);\n\tfor(int i = 0; i < len; i ++) {\n\t\tb[i] += a[i];\n\t\tif(b[i] >= 10) {\n\t\t\tb[i] -= 10;\n\t\t\tb[i + 1] += 1;\n\t\t}\n\t}\n\n\tint index = 0;\n\tfor(int i = 259; i >= 0; i--)\n\t\tif(b[i] > 0) {\n\t\t\tindex = i;\n\t\t\tbreak;\n\t\t}\n\n\tfor(int i = index; i >= 0; i --)\n\t\tcout << b[i];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34441", "code": "/*\n * 12.10.cpp\n *\n * Created on: 2011-12-2\n * Author: wuch\n */\n\nint main(){\n\tchar a[250],b[250]; //??????a?b\n\tint c[251],i,aa,bb,len1,len2;\n\tcin.getline(a,250); //??a?b\n\tcin.getline(b,250);\n\tlen1=strlen(a); //??a?b???\n\tlen2=strlen(b);\n\tfor (i=0;i<=250;i++) c[i]=0;\n\tif (len1>len2) { //?????????0??????????\n\t\tfor (i=len1-1;i>=len1-len2;i--) b[i]=b[i-len1+len2];\n\t\tfor (i=0;i=len2-len1;i--) a[i]=a[i-len2+len1];\n\t\t\tfor (i=0;i9) { //???9???\n\t\t\tc[i+1]=1;\n\t\t\tc[i]=c[i]-10;\n\t\t}\n\t}\n\tfor (i=250;i>0;i--) if (c[i]!=0) break; //???????0?\n\tlen2=i;\n\tfor (i=len2;i>=0;i--) cout<bc)\n\t{\n\t\tc=ac;\n\t\tfor (i=0;i=0;i--,k++)\n\t{\n\t\tj1=A[i]-'0';\n\t\tj2=B[i]-'0';\n\t\tif (j1+j2+jw<=9)\n\t\t{\n\t\t\tj[k]=j1+j2+jw+'0';\n\t\t\tjw=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tj[k]=j1+j2+jw-10+'0';\n\t\t\tjw=1;\n\t\t}\n\t\tif (i==0&&jw==1)\n\t\t\tj[k+1]='1';\n\t}\n\tif (j[0]=='0'&&j[1]=='\\0')\n\t\tprintf(\"0\");\n\tc=strlen(j);\n\tfor (i=c-1;i>=0;i--)\n\t{\n\t\tif (j[i]!='0'||p==1)\n\t\t{\n\t\t\tprintf(\"%c\", j[i]);\n\t\t\tp=1;\n\t\t}\n\t\t\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34443", "code": "\nint main()\n{\n\tchar a[251],b[251];\n\tint c[251]={0},d[251]={0};\n\tcin>>a>>b;\n\tint m=strlen(a),n=strlen(b);\n\tfor(int i=m-1,j=0;i>=0;i--,j++)\n\t{\n\t\tc[j]=a[i]-'0';\n\t}\n\tfor(int k=n-1,j=0;k>=0;k--,j++)\n\t{\n\t\td[j]=b[k]-'0';\n\t}\n\tfor(int i=0;i<251;i++)\n\t{\n\t\tif(c[i]+d[i]<10)\n\t\t\tc[i]+=d[i];\n\t\telse\n\t\t{\n\t\t\tc[i]=c[i]+d[i]-10;\n\t\t\tc[i+1]++;\n\t\t}\n\t}\n\tint i=250;\n\tfor(;c[i]==0&&i>=0;i--);\n\tif(i==-1)\n\t{\n\t\tcout<<0;\n\t}\n\telse\n\t{\n\tfor(;i>=0;i--)\n\t\tcout<=0;i-- )\n a[l1-i] = str1[i] - '0';\n for( i = l2-1; i >=0;i--) \n b[l2-i] = str2[i] - '0';\n if( l1>=l2 )\n l3 = l1;\n else l3 = l2;\n for( i = 1;i <= l3;i++ )\n {\n c[i] += a[i] +b[i];\n if( c[i]>=10 )\n {\n c[i+1]++;\n c[i]-=10;\n }\n }\n for( k = l3+1;k>=0;k-- )\n {if( c[k]!= 0 )break;}\n if( k <= 0 )printf(\"0\");\n else\n {\n for( i = k ; i>0;i-- )\n printf( \"%d\",c[i] );\n } \n}\n"} +{"label": "69", "index": "34445", "code": "char a[250],b[250],sum[251];\nmain()\n{\n\tint lena,lenb,i,l,f;//l???????? \n\tscanf(\"%s %s\",a,b);\n\tlena=strlen(a);//????a??? \n\tlenb=strlen(b);//????b???\n\tif(lena>lenb) l=lena;\n\telse l=lenb;\n\tfor(i=0;ilenb)\n \t{ \n\t\t\tfor(i=lena-1;i>=lena-lenb;i--)//??i?lena-lenb???lena-1????? \n\t\t\t\tb[i]=b[i-lena+lenb];\n\t\t\tfor(i=0;i=lenb-lena;i--)\n\t\t\t\ta[i]=a[i-lenb+lena];\n\t\t\tfor(i=0;i=0;i--)\n\t\tif(sum[i]>9)\n\t\t\tsum[i]-=10,sum[i-1]++;//?? \n\tfor(i=l;i>=0;i--)\n\t\tif(sum[i]!=0) f=i;\n\tfor(i=f;i<=l;i++)\n\t\tprintf(\"%d\",sum[i]);\n}"} +{"label": "69", "index": "34446", "code": "int main()\n{\n int x,j,i,l,t,q=0,w=0,y,m[300]={0},n[300]={0},k[300]={0};\n char a[300],b[300];\n scanf(\"%s %s\",&a,&b);\n x=strlen(a);\n y=strlen(b);\n \n for(i=x;i>=0;i--) {m[i]=a[i]-'0';if(m[i]==0) q+=1;}\n for(i=y;i>=0;i--) {n[i]=b[i]-'0';if(n[i]==0) w+=1;}\n if(q==x&&w==y) {printf(\"0\");return 0;}\n if(x>=y)\n {\n l=x;\n for(i=x;i>=x-y+1;i--) \n { \n k[i]=k[i]+m[i-1]+n[i-x+y-1];\n if(k[i]>=10)\n {\n k[i]=k[i]-10;\n k[i-1]=k[i-1]+1; \n }\n }\n for(i=x-y;i>0;i--) \n {\n k[i]=k[i]+m[i-1];\n if(k[i]>=10)\n {\n k[i]=k[i]-10;\n k[i-1]=k[i-1]+1; \n }\n }\n }\n if(x=y-x+1;i--) \n { \n k[i]=k[i]+n[i-1]+m[i-y+x-1];\n if(k[i]>=10)\n {\n k[i]=k[i]-10;\n k[i-1]=k[i-1]+1;\n }\n }\n for(i=y-x;i>0;i--) \n {\n k[i]=k[i]+n[i-1];\n if(k[i]>=10)\n {\n k[i]=k[i]-10;\n k[i-1]=k[i-1]+1; \n }\n }\n }\n //printf(\"%d %d %d\",k[0],k[1],k[2]);\n memset(a,0,sizeof(a));\n for(i=0;i<=l;i++)\n {\n if(k[i]!=0) {j=i;t=l+1-j;break;}\n }\n for(i=0;i<=t-1;i++) \n {\n a[i]=k[j+i]+'0';\n }\n printf(\"%s\",a);\n return 0;\n}\n"} +{"label": "69", "index": "34447", "code": "/*\n *???: bigAdd.cpp\n *??: ???\n *????: 2012-11-21\n *??: ?????\n */\n\n\n\nvoid conv(int a[],char str[]) //????str?????????a\n{\n\tmemset(a,0,sizeof(int)*MAXN); //?a??\n\tint l=strlen(str); //????\n\tfor (int i=l-1;i>=0;--i)\n\t\ta[l-1-i]=str[i]-'0'; //????????a????\n}\n\nvoid BigNumAdd(int a[],int b[],int c[]) //?????a,b?????c\n{\n\tmemset(c,0,sizeof(int)*MAXN); //c??\n\tfor (int i=0;i=10){ //???\n\t\t\tc[i+1]++; //??\n\t\t\tc[i]-=10;\n\t\t}\n\t}\n}\n\nvoid printBigNum(int a[]) //???????\n{\n\tint i;\n\tfor (i=MAXN-1;a[i]==0&&i>=0;--i) //?a??0????\n\t\t;\n\tif (i==-1){ //???0\n\t\tcout << 0 << endl;\n\t\treturn;\n\t}\n\tfor (;i>=0;--i)\n\t\tcout << a[i];\n\tcout << endl;\n}\n\nint main()\n{\n\tint a[MAXN],b[MAXN],c[MAXN];\n\tchar str[MAXN]; //????????\n\n\tcin >> str;\n\tconv(a,str); //?????????a\n\tcin >> str;\n\tconv(b,str);\n\tBigNumAdd(a,b,c); //c=a+b\n\tprintBigNum(c);\n\treturn 0;\n}\n\n"} +{"label": "69", "index": "34448", "code": "int main( )\n{\n\tchar a[251], b[251], c[251];\n\tint p=0, n;\n\tcin >> c;\n\tfor (int i = strlen(c) - 1; i >= 0; i--) //??????????????a[i]\n\t\ta[strlen(c) - 1 - i] = c[i];\n\tfor (int i = strlen(c); i < 251; i++) //???????0\n\t\ta[i] = '0';\n\tcin >> c;\n\tfor (int i = strlen(c) - 1; i >= 0; i--) //??????????????b[i]\n\t\tb[strlen(c) - 1 - i] = c[i];\n\tfor (int i = strlen(c); i < 251; i++) //???????0\n\t\tb[i] = '0';\n\tfor (int i = 0; i < 251; i++) //?a[i],b[i]????????\n\t{\n\t\tc[i] = a[i] + b[i] + p - 48;\n\t\tif (c[i] >= 58) //???\n\t\t{\n\t\t\tc[i] -= 10;\n\t\t\tp = 1;\n\t\t}\n\t\telse p = 0; //???\n\t}\n\tfor (n = 250; n >= 0; n--) //?a[i],b[i]??c[i]??????????0??????\n\t\tif (c[n] != '0') break;\n\tif (n == -1) cout << 0; //????0???0\n\tfor (; n >= 0; n--)\n\t\tcout << c[n];\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34449", "code": "int main()\n{ \n\tchar num1[251],num2[251];\n\tint a[251],b[251],c[251],d[251],len1,len2,i=0,j=0;\n\tmemset(a,0,sizeof(a));\n memset(b,0,sizeof(b));\n\tmemset(c,0,sizeof(c));\n\tmemset(d,0,sizeof(d));\n cin.getline (num1,251);\n\tcin.getline (num2,251);\n\tlen1=strlen(num1);\n\tlen2=strlen(num2);\n\tfor(i=len1-1;i>=0;i--)\n\t{\n\t\ta[j++]=num1[i]-'0';\n\t}\n\tj=0;\n for(i=len2-1;i>=0;i--)\n\t{\n\t\tb[j++]=num2[i]-'0';\n\t}\n for(i=0;i<251;i++)\n\t{\n\t\tif(a[i]!=0 || b[i]!=0)break;\n\t\tif(i=250){cout<<\"0\";return 0;}\n\t}\n\t//for(i=0;i=10)\n\t\t{\n\t\t\td[i]=d[i]-10;\n\t\t\tc[i+1]++;\n\t\t}\n\t}\n\tfor(j=250;j>=0;j--)\n\t{\n\t\tif(d[j]!=0)break;\n\t}\n\tfor(i=j;i>=0;i--)\n\t{cout< 0)\n\t{\n\t\tk--;\n\t}\n\tfor (int i = k; i >= 0; i--)\n\t{\n\t\tcout << a[i];\n\t}\n\tcout << endl;\n}\n\nint main()\n{\n\tchar a[MAX], b[MAX];\n\tcin.getline(a, MAX);\n\tcin.getline(b, MAX);\n\tint aLen, bLen, cLen;\n\taLen = strReverse(a);\n\tbLen = strReverse(b);\n\tint c[MAX] = { 0 };\n\tcLen = (aLen > bLen) ? addBig(a, aLen, b, bLen, c):addBig(b,bLen,a,aLen,c);\n\tprintBig(c, cLen);\n\treturn 0;\n}\n"} +{"label": "69", "index": "34451", "code": "void back(char a[])\n{\n int l,i;\n char b[1001];\n l=strlen(a);\n for(i=0;i=0;i--)\n {\n if(a[i]!='0')\n {\n a[i+1]=0;\n break;\n }\n }\n back(a);\n}\nvoid plus(char a[],char b[],char sum[])\n{\n int i;\n back(a);\n back(b);\n full(a);\n full(b);\n for(i=0;i<1000;i++)\n {\n if(a[i]>'9')\n {a[i]=a[i]-10;a[i+1]=a[i+1]+1;}\n if((a[i]+b[i]-2*'0')>9)\n {sum[i]=a[i]+b[i]-'0'-10;a[i+1]=a[i+1]+1;}\n else\n {sum[i]=a[i]+b[i]-'0';}\n }\n recur(b);\n recur(sum);\n}\nvoid minus(char a[],char b[],char difference[])\n{\n int i,w=0;\n back(a);\n back(b);\n full(a);\n full(b);\n for(i=0;i<1000;i++)\n {\n if(w==1)\n a[i]=a[i]-1;\n if(a[i]=0)\n difference[i+1]='\\0';\n else\n difference[1]='\\0';\n back(difference);\n}\nmain()\n{\n char a[1001],b[1001],sum[1001];\n scanf(\"%s %s\",a,b);\n if(a[0]=='0'&&a[1]==0&&b[0]=='0'&&b[1]==0)\n printf(\"0\");\n else\n {\n plus(a,b,sum);\n puts(sum);\n }\n getchar();\n getchar();\n}"} +{"label": "69", "index": "34452", "code": "int main()\n{\n\tchar a[300]={'\\0'};\n\tchar b[300]={'\\0'};\n\tchar answer[300]={'\\0'};\n\tchar c[300]={'\\0'};\n\tint n;\n\tint m;\n\tint i,j;\n\tint jinwei=0;\n\tgets(a);\n\tgets(b);\n\tfor(m=0;;m++)\n\t{\n\t\tif(b[m]=='\\0')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(n=0;;n++)\n\t{\n\t\tif(a[n]=='\\0')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tc[n-1-i]=a[i];\n\t}\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\ta[i]=c[i];\n\t}\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tc[n-1-i]='0';\n\t}\n\tfor(i=0;i<=m-1;i++)\n\t{\n\t\tc[m-1-i]=b[i];\n\t}\n\tfor(i=0;i<=m-1;i++)\n\t{\n\t\tb[i]=c[i];\n\t}\n\tfor(i=0;i<=m-1;i++)\n\t{\n\t\tc[m-1-i]='0';\n\t}\n\tfor(i=0;i<=299;i++)\n\t{\n\t\tanswer[i]='0';\n\t}\n\tfor(i=m;i<=299;i++)\n\t{\n\t\tb[i]='0';\n\t}\n for(i=n;i<=299;i++)\n\t{\n\t\ta[i]='0';\n\t}\n\tfor(i=0;i<=299;i++)\n\t{\n\t\tif(a[i]+b[i]+jinwei-96<=9&&a[i]+b[i]+jinwei-96>=0)\n\t\t{\n\t\t\tanswer[i]=a[i]+b[i]-48+jinwei;\n\t\t\tjinwei=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(a[i]+b[i]+jinwei-96>=10)\n\t\t\t{\n\t\t\t\tanswer[i]=a[i]+b[i]-48-10+jinwei;\n\t\t\t jinwei=1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=299;i>=0;i--)\n\t{\n\t\tif(answer[i]!='0')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i!=-1)\n\t{\n\tfor(j=i;j>=0;j--)\n\t{\n\t\tprintf(\"%c\",answer[j]);\n\t}\n\t}\n\telse\n\t{\n\t\tprintf(\"0\");\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\n"} +{"label": "69", "index": "34453", "code": "int main(){\n\tint n,i,la,lb,r,p=0;\n\tchar e,a[252]={'\\0'},b[252]={'\\0'},c[252]={'\\0'};\n\tscanf(\"%s%s\",a,b);\n\tla=strlen(a);\n\tlb=strlen(b);\n\tfor(i=0;i=10){\n\t\t\tc[i]=r%10+'0';\n\t\t\tp=r/10;\n\t\t}else{\n\t\t\tc[i]='0'+r;\n\t\t\tp=0;\n\t\t}\n//\t\tif(r==0){\n//\t\t\tbreak;\n//\t\t}\n\t}\n\tfor(i=251;i>0;i--){\n\t\tif(c[i]!='0'){\n\t\t\tbreak;\n\t\t}else{\n\t\t\tc[i]='\\0';\n\t\t}\n\t}\n\tr=strlen(c);\n\tfor(i=0;i='0'&&m[i]<='9');i++)\n\t{\n\t\tnum1++;\n\t}\n\tm[i]='\\0';\n\tfor(j=0;n[j]!='\\0'&&(n[j]>='0'&&n[j]<='9');j++)\n\t{\n\t\tnum2++;\n\t}\n\tn[j] = '\\0';\n\tif(num1>=num2)\n\t{\n\t\tstrcpy(x,m);\n\t\tstrcpy(y,n);\n\t\tk1=num1;\n\t\tk2=num2;\n\t}\n\telse\n\t{\n\t\tstrcpy(x,n);\n\t\tstrcpy(n,m);\n\t\tnum1 = strlen(x);\n\t\tnum2 = strlen(n);\n\t\tk1=num1;\n\t\tk2=num2;\n\t}\n\n\t{\n\t\tfor(j=num1;j>num1-num2-1;j--)\n\t\t{\n\t\t\tn[j]=n[k2];\n\t\t\tk2--;\n\t\t}\n\t\tfor(j=num1-num2-1;j>=0;j--)\n\t\t{\n\t\t\tn[j]='0';\n\t\t}\n\t\tfor(j=num1-1;j>=0;j--)\n\t\t{\n\t\t if(x[j]-'0'+n[j]-'0'+tmp>9)\n\t\t {\n\t\t\t total[j]='0'+(x[j]-'0'+n[j]-'0'+tmp)%10;\n\t\t\t tmp = 1;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t total[j]='0'+(x[j]-'0'+n[j]-'0'+tmp)%10;\n\t\t\t tmp = 0;\n\t\t }\n\t\t}\n\t\ttotal[num1]= '\\0';\n\t\tif( tmp ==1 )\n\t\t{\n\t\t\tprintf(\"1\");\n\t\t\thead = 1;\n\t\t}\n\t for(j=0;j9) {\n a[i+1]++;\n a[i]-=10;\n }\n }\n for (int i=0; i<250; i++) {\n if (a[i]>9) {\n a[i+1]++;\n a[i]-=10;\n }\n }\n int max=0;\n for (int i=249; i>=0; i--) {\n if(a[i]!=0){\n max = i;\n break;\n }\n }\n for (int i=max; i>=0; i--) {\n cout<> a >> b; //?????\n\tl1=strlen(a);l2=strlen(b); //?????????????????\n\tfor(i=l1-1;i>=0;i--)\n\t\tc[j++]=a[i]-'0';\n\tj=0;\n\tfor(i=l2-1;i>=0;i--)\n\t\td[j++]=b[i]-'0';\n\tfor(i=0;i<250;i++) //???\n\t{\n\t\tc[i]=c[i]+d[i];\n\t\tif(c[i]>=10)\n\t\t{\n\t\t\tc[i]=c[i]-10;\n\t\t\tc[i+1]=c[i+1]+1;\n\t\t}\n\t}\n\ti=250;\n\twhile(c[i]==0&&i>0) //???\n\t\ti--;\n\tfor(j=i;j>=0;j--)\n\t\tcout <=0;i--)\n a1[j++]=b1[i]-'0';//??????????? \n j=0;\n for(i=len2-1;i>=0;i--)\n a2[j++]=b2[i]-'0';\n for(i=0;i<=266;i++)\n {\n a1[i]+=a2[i];\n if(a1[i]>=10)\n {\n a1[i]-=10;\n a1[i+1]++;\n } \n }\n i=265;\n while(a1[i]==0)i--;\n for(;i>=0;i--)\n cout<=strlen(s2))?strlen(s1):strlen(s2);\n\tfor(i=0;i=10){\n\t\t\tif(i!=MAXLEN-1){\n\t\t\t\ta[i]=t%10;\n\t\t\t\ta[i+1]=1;\n\t\t\t\tj=MAXLEN;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ta[i]=t%10;\n\t\t\t\ta[i+1]=1;\n\t\t\t\tj=MAXLEN+1;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\ta[i]=t;\n\t\t\tj=MAXLEN;\n\t\t}\n\t}\n\tfor(i=j-1;i>=0;i--){\n\t\tif(a[i]!=0){\n\t\t\tflag=1;\n\t\t\tif(flag){\n\t\t\t\tprintf(\"%d\",a[i]);\t\t\t\t}\n\t\t\t}\n\t\telse{\n\t\t\tif(flag){\n\t\t\t\tprintf(\"%d\",a[i]);\n\t\t\t}\n\t\t}\n\t}\n\tif(flag==0){\n\t\tprintf(\"0\");\n\t}\n\treturn 0;\n}"} +{"label": "69", "index": "34459", "code": "int main(){\n char aa[1000],bb[1000],cc[1000],dd[1000];\n int i=0,j=0,k;\n cin>>aa>>bb;\n while(aa[i]!='\\0')\n i++;\n while(bb[j]!='\\0')\n j++;\n if(i57){ \n cc[i+1-k]=aa[i-k]+bb[j-k]-58;\n if(k!=i)\n aa[i-k-1]++;\n else cc[0]='1';\n }\n else {cc[i+1-k]=aa[i-k]+bb[j-k]-48;\n if(k==i)\n cc[0]=0;\n }\n }\n else {\n if(aa[i-k]>57)\n { cc[i-k+1]=aa[i-k]-10;\n if(k!=i)\n aa[i-k-1]++;\n else cc[0]='1'; \n }\n else {\n cc[i-k+1]=aa[i-k];\n if(k==i)\n cc[0]='0';\n }\n }\n }\n j=0;\n while((cc[j]<=48||cc[j]>57)&&j=l2)\n {\n for(i=0;i=1;j--)\n if((cc[j]+aa[j]+add)<=9)\n {\n dd[j]=cc[j]+aa[j]+add;\n add=0;\n }\n else\n {\n dd[j]=cc[j]+aa[j]+add-10;\n add=1;\n }\n\n j=0;\n if(cc[j]+aa[j]+add<=9)\n {\n dd[j]=cc[j]+aa[j]+add;\n for(i=0;i=1;j--)\n\n\n\n if((cc[j]+aa[j]+add)<=9)\n {\n dd[j]=cc[j]+aa[j]+add;\n add=0;\n }\n else\n {\n dd[j]=cc[j]+aa[j]+add-10;\n add=1;\n }\n j=0;\n if(cc[j]+aa[j]+add<=9)\n {\n dd[j]=cc[j]+aa[j]+add;\n for(i=0;i>str;\n for(i=strlen(str);i>=0;--i) num1[i]=str[strlen(str)-i]-'0';\n cin>>str;\n for(i=strlen(str);i>=0;--i) num2[i]=str[strlen(str)-i]-'0';\n for(i=0;i<255;++i) ans[i]=num1[i]+num2[i];\n for(i=0;i<255;++i)\n {\n if(ans[i]>=10)\n {\n ans[i+1]++;\n ans[i]-=10;\n }\n }\n for(i=255;i>=0;--i) if(ans[i]) break;\n if(i==0) cout<<0<0;--i) cout<lb){\n\t\tfor(r=lb-1;r>=0;r--){\n\t\t\tb[r+la-lb]=b[r];\n\t\t}\n\t\tfor(s=0;s<=la-lb-1;s++){\n\t\t\tb[s]=48;\n\t\t}\n\t\tt=la;\n\t}\n if(la=0;r--){\n\t\t\ta[r+lb-la]=a[r];\n\t\t}\n\t\tfor(s=0;s<=lb-la-1;s++){\n\t\t\ta[s]=48;\n\t\t}\n\t\tt=lb;\n\t}\n\tif(la==lb){\n\t\tt=la;\n\t}\n\tint i,j,k=0;\n\tfor(i=0;i<=t-1;i++){\n\t\tc[i+1]=a[i]+b[i]-48;\n\t}\n\tfor(i=t;i>=1;i--){\n\t\tif (c[i]>=58){\n\t\t\tc[i]=c[i]-10;\n\t\t\tc[i-1]=c[i-1]+1;\n\t\t}\n\t}\n\tfor (j=0;j<=t;j++){\n\t\tif(c[j]!=48){\n\t\t\tbreak;\n\t\t}\n\t\tk++;\n\t}\n\tif(k==t+1){\n\t\tprintf(\"0\");\n\t}\n\telse{\n\t\tfor(j=k;j<=t;j++){\n\t\t\tprintf(\"%c\",c[j]);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "69", "index": "34463", "code": "int a[maxx];\nint b[maxx];\nint c[maxx];\nchar temp[maxx];\nint main()\n{\n\tint n;\n\tint mm;\n\tmemset(c,0,sizeof(c));\n\tcin.getline(temp,251);\n\ta[0] = strlen(temp);\n\tfor(int i = a[0]; i >= 1; --i)\n\t{\n\t\ta[a[0] - i + 1] = temp[i-1] - '0';\n\t}\n\twhile(a[a[0]] == 0 && a[0] > 1)\n\t{\n\t\ta[0]--;\n\t}\n\tcin.getline(temp,251);\n\tb[0] = strlen(temp);\n\tfor(int i = b[0]; i >= 1; --i)\n\t{\n\t\tb[b[0] - i + 1] = temp[i-1] - '0';\n\t}\n\twhile(b[b[0]] == 0 && b[0]>1)\n\t{\n\t\tb[0]--;\n\t}\n\tint len = max(a[0],b[0]);\n\tint temp = 0;\n\tint tempsum;\n\tfor(int i = 1; i <= len; ++i)\n\t{\n\t\ttempsum = a[i] + b[i] + temp;\n\t\tc[i] = (tempsum)%10;\n\t\tif(tempsum >= 10)\n\t\t{\n\t\t\ttemp = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttemp = 0;\n\t\t}\n\t}\n\tif(temp == 1)\n\t{\n\t\tc[len + 1] += 1;\n\t\tlen = len + 1;\n\t}\n\n\tfor(int i = len; i>=1; --i)\n\t{\n\t\tcout << c[i];\n\t}\n\n\treturn 0;\n}"} +{"label": "69", "index": "34464", "code": "int main()\n{\n\tchar as[201]=\"0\",bs[201]=\"0\";\n\tint a[201],b[201],sum[201];\n\tint lena,lenb,len,jinwei=0;\n\tint i,j;\n\tscanf(\"%s %s\",as,bs);\n\tlena=strlen(as);\n\tlenb=strlen(bs);\n\tlen=lena>lenb?lena:lenb;\n\tmemset(a,0,sizeof(a));\n\tmemset(b,0,sizeof(b));\n\tfor(i=200;i>200-lena;i--)\n\t\ta[i]=as[lena-201+i]-'0';\n\tfor(i=200;i>200-lenb;i--)\n\t\tb[i]=bs[lenb-201+i]-'0';\n\tfor(i=200;i>200-len-1;i--)\n\t{\n\t\tsum[i]=(jinwei+a[i]+b[i])%10;\n\t\tjinwei=(jinwei+a[i]+b[i])/10;\n\t}\n\tfor(i=200-len;i<=200;i++)\n\t{\n\t\tif(sum[i]!=0)\n\t\t{\n\t\t\tfor(j=i;j<=200;j++)\n\t\t\t\tprintf(\"%d\",sum[j]);\n\t\t\tbreak;\n\t\t}\n\t\telse if(i==200)\n\t\t\tprintf(\"0\\n\");\n\t\t\n\t}\n}\n\n"} +{"label": "69", "index": "34465", "code": "\nint add(char x,char y);\nint over(char x,char y);\nint main()\n{\n\tchar a[260],b[260];\n\tchar c[260];\n\tint i,j;\n\tint len,lena,lenb,lenc;\n\tint o=0;\n\tint count=0;\n\tint highesta,highestb;\n\tscanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\tlena=(int)strlen(a);\n\tlenb=(int)strlen(b);\n\tlen=(lena>lenb)? lena:lenb;\n\tif (len==lena)\n\t{\n\t\tfor (i=lenb;i>=0;i--)\n\t\t{\n\t\t\tb[i+lena-lenb]=b[i];\n\t\t}\n\t\tfor (i=0;i=0;i--)\n\t\t{\n\t\t\ta[i+lenb-lena]=a[i];\n\t\t}\n\t\tfor (i=0;i=0;i--)\n\t{\n\t\tif (i==len-1)\n\t\t{\n\t\t\tc[i]=(char)(add(a[i],b[i])+48);\n\t\t\to=over(a[i],b[i]);\n\t\t}\n\t\tif (i>0 && i=10)\n\t\t\t{\n\t\t\t\tfor (j=len-1;j>=1;j--)\n\t\t\t\t{\n\t\t\t\t\tc[j+1]=c[j];\n\t\t\t\t}\n\t\t\t\tc[0]='1';\n\t\t\t\tc[1]=(char)((highesta+highestb+o-10)+48);\n\t\t\t\tc[len+1]='\\0';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tc[0]=(char)((highesta+highestb+o)+48);\n\t\t\t\tc[len]='\\0';\n\t\t\t}\n\t\t}\n\t}\n\tlenc=strlen(c);\n\tfor (i=0;i=10)? (m+n-10):(m+n);\n\treturn result;\n}\nint over(char u,char v)\n{\n\tint p,q;\n\tint overflow;\n\tp=((int)u)-48;\n\tq=((int)v)-48;\n\toverflow=(p+q>=10)? 1:0;\n\treturn overflow;\n}"} +{"label": "69", "index": "34466", "code": "int c[202],aa[200],bb[200];\nint main ()\n{\n\tint add(char *a,char *b);\n\tchar a[200],b[200];\n\tint cclen,j;\n\tgets(a);\n\tgets(b);\n\tcclen=add(a,b);\n\tfor(j=cclen;j>=0;j--){\n printf(\"%d\",c[j]);\n }\n}\nint add(char *a,char *b)\n{\n\tint i,k,len;\n\tint alen=strlen(a);\n\tint blen=strlen(b);\n\tlen=(alen>blen)? alen:blen;\n\tk=0;\t\n\tfor(i=alen-1;i>=0;i--){\n aa[k]=a[i]-'0';\n k++; \n }\n k=0;\n for(i=blen-1;i>=0;i--){\n bb[k]=b[i]-'0';\n k++; \n }\n c[0]=0;\n for(i=0;i0;i--){\n if(c[i]==0)\n k--;\n else\n break;\n } \n return k; \n}\n\n\n\n\n\n\n\n"} +{"label": "69", "index": "34467", "code": "\nint main()\n{\n\tint a[270] , b[270] , i , wp , wq ;\n\tchar s1[270] , s2[270] ;\n\tfor (i = 0 ; i < 251 ; i++)\n\t{\n\t\ta[i] = -1 ;\n\t\tb[i] = -1 ;\t\n\t}\n\tint *p = a , *q = b ; //p??a????q??b??? \n\tcin >> s1 ;\n\tcin >> s2 ; //??????? \n\ti = 0 ;\n\twhile (s1[i] != '\\0')\n\t\t*p++ = s1[i++] - '0' ; //????????? \n\twp = i ; //a[]?????? \n\ti = 0 ;\n\twhile (s2[i] != '\\0')\n\t\t*q++ = s2[i++] - '0' ;\n\twq = i ;\n\tp-- ; //?p??a[]?????? \n\tq-- ; //q?? \n\tint jinwei = 0 ; //?????????????????????????? \n\twhile (p >= a && q >= b) //a,b????????? \n\t{\n\t\tint temp ;\n\t\ttemp = *p + *q + jinwei ; //????????????????????????? \n\t\t*p = temp % 10 ; //?????????10 \n\t\t*q = *p ;\n\t\tjinwei = temp / 10 ; //jinwei??????10 \n\t\tp-- ; //????? \n\t\tq-- ;\t\n\t}\n\tif (wp >= wq) //a????b \n\t{\n\t\twhile (p >= a) //???b????a \n\t\t{\n\t\t\tif (!jinwei) //???????????????? \n\t\t\t\tbreak ;\n\t\t\tint temp ; //???????? \n\t\t\ttemp = *p + jinwei ;\n\t\t\t*p = temp % 10 ;\n\t\t\tjinwei = temp / 10 ;\n\t\t\tp-- ;\n\t\t}\n\t\tif (jinwei)\n\t\t{\n\t\t\tcout << \"1\" ; //??????????1????????????1 \n\t\t\tfor (i = 0 ; a[i] != -1 ; i++)\n\t\t\t\tcout << a[i] ; //??????? \n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = 0 ; a[i] == 0 ; i++); //???????0??? \n\t\t\tif (a[i] == -1) //??0??????0\n\t\t\t\tcout << \"0\" ;\n\t\t\telse \n\t\t\t\tfor ( ; a[i] != -1 ; i++)\n\t\t\t\t\tcout << a[i] ;\n\t\t} \n\t}\n\telse //b????a?? \n\t{\n\t\twhile (q >= b)\n\t\t{\n\t\t\tif (!jinwei)\n\t\t\t\tbreak ;\n\t\t\tint temp ;\n\t\t\ttemp = *q + jinwei ;\n\t\t\t*q = temp % 10 ;\n\t\t\tjinwei = temp / 10 ;\n\t\t\tq-- ;\n\t\t}\n\t\tif (jinwei)\n\t\t{\n\t\t\tcout << \"1\" ;\n\t\t\tfor (i = 0 ; b[i] != -1 ; i++)\n\t\t\t\tcout << b[i] ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = 0 ; b[i] == 0 ; i++);\n\t\t\tif (b[i] == -1)\n\t\t\t\tcout << \"0\" ;\n\t\t\telse\n\t\t\t\tfor ( ; b[i] != -1 ; i++)\n\t\t\t\t\tcout << b[i] ;\n\t\t} \n\t}\t\t\n\treturn 0 ;\t\t\n}"} +{"label": "69", "index": "34468", "code": "int main()\n{\n\tchar num[2][300]={'0'};\n\tint a[300]={0};\n\tscanf(\"%s\",num[0]);\n\tscanf(\"%s\",num[1]);\n\tint i,j;\n\ti=strlen(num[0]);\n\tj=strlen(num[1]);\n\tint k;\n if(i<=j){\n\t\tfor(k=0;k=10){\n\t\t\ta[k]=a[k]%10;\n\t\t\ta[k+1]=a[k+1]+1;\n\t\t}\n\t}\n\n\tfor(k=251;k>0;k--){\n\t\tif(a[k]!=0) break;\n\t}\n\tfor(;k>=0;k--){\n\t\tprintf(\"%d\",a[k]);\n\t}\n}\n\n\t\n\t\t\n\n"} +{"label": "69", "index": "34469", "code": "int main()\n{\n\tconst int maxlen=250;\n\tunsigned an1[maxlen];unsigned an2[maxlen];\n\tchar seline1[maxlen+1];char seline2[maxlen+1];\n\tcin.getline(seline1,maxlen+1);\n\tcin.getline(seline2,maxlen+1);\n\tint nlen1=strlen(seline1);\n\tint nlen2=strlen(seline2);\n\tmemset(an1,0,sizeof(an1));\n\tmemset(an2,0,sizeof(an2));\n\tint i,j=0;\n\tfor(i=nlen1-1;i>=0;i--)\n\t{\n\t\tan1[j++]=seline1[i]-'0';\n\t}\n\tj=0;\n\tfor(i=nlen2-1;i>=0;i--)\n\t{\n\t\tan2[j++]=seline2[i]-'0';\n\t}\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tan1[i]-=10;\n\t\t\tan1[i+1]++;\n\t\t}\n\t}\n\ti=maxlen-1;\n\tif(strlen(seline1)==1&&seline1[0]=='0'&&strlen(seline2)==1&&seline2[0]=='0')\n\t{\n\t\tcout<<0;\n\t}\n\telse\n\t{\n\t\twhile(an1[i]==0)\n\t\t{\n\t\t\ti--;\n\t\t}\n\t for(;i>=0;i--)\n\t\t{\n\t\t cout<=10)\n\t\t{\n\t\t\t++a[i+1];\n\t\t\ta[i]-=10;\n\t\t}\n\t}\n\t\n\tint j=l1;\n\tfor(;a[j]==0&&j>=0;--j);\n\tif(j==-1)\n\t\tcout<<\"0\";\n\telse\n\t{\n\tfor(int i=j;i>=0;--i)\n\t\tcout<>a>>b;\n\tfor(int i=0;a[i]!=0;++i){++l1;}\n\tfor(int i=0;i=l2)\n\tcal(c,d,l1,l2);\n\telse\n\tcal(d,c,l2,l1);\n\t\n\treturn 0;\n}\n"} +{"label": "69", "index": "34471", "code": "int main()\n{\n\tint al,bl,j,i,m,n=0;\n\tchar a[255],b[255],ab[255],c=62;\n\tscanf(\"%s%c%s\",&a,&c,&b);\n\tal=strlen(a);\n\tbl=strlen(b);\n\tif(al>bl)\n\t{\n\t\tm=bl;\n\t\tbl=al;\n\t\tal=m;\n\t\tstrcpy(ab,a);\n\t\tstrcpy(a,b);\n\t\tstrcpy(b,ab);\n\t}//b is larger than a\n\tfor(i=al-1;i>=0;i--)\n\t{\n\t\tj=i-al+bl;\n\t\tb[j]+=a[i]-48;\n\t}\n\tfor(i=bl-1;i>=0;i--)\n\t{\n\t\tif(b[i]>57)\n\t\t{\n\t\t\tb[i]-=10;\n\t\t\tif(i>0)\t\t\t\n\t\t\t\tb[i-1]++;\n\t\t\telse\n\t\t\t\tn=1;\n\t\t}\n\t}\n\tif(n)\n\t{\n\t\tprintf(\"1\");\n\t\tprintf(\"%s\\n\",b);\n\t}\n\telse\n\t{\n\t\tfor(i=0;i> a >> b ;\n\t//cout << a <l2)\n\t\tmax = l1;\n\telse\n\t\tmax = l2;\n\t//?????\n\tint j=0;\n\tfor(int i = l1-1; i>=0; i--,j++)\n\t{\n\t\ts1[j] = a[i]-'0';\n\t\t//cout << s1[j];\n\t}\n\tj=0;\n\tfor(int i = l2-1; i>=0; i--,j++)\n\t{\n\t\ts2[j] = b[i]-'0';\n\t\t//cout << s2[j];\n\t}\n\n\t//??\n\tint x = 0;\n\tfor(int i = 0; i<260;i++)\n\t{\n\t\tr[i] = r[i]+s1[i]+s2[i];\n\t\t//x = i;\n\t\tif( r[i] >9)\n\t\t{\n\t\t\tr[i] = r[i] -10;\n\t\t\tr[i+1]++;\n\t\t\t//x = i+1;\n\t\t}\n\t\tif(r[i] !=0)\n\t\t\tx = i;\n\t}\n\n\t//cout << x << endl;\n\tfor(int i = x; i>=0; i--)\n\t\tcout << r[i];\n\n\treturn 0;\n}"} +{"label": "69", "index": "34473", "code": "int main()\n{ \t\n\tint aa[300],bb[300];\n\tchar a[300],b[300];\n\tcin>>a>>b;\n\tmemset(aa,0,sizeof(aa));\n\tmemset(bb,0,sizeof(bb));\n\tint i,j=0,k,m=0,n;\n\tfor(i=strlen(a)-1;i>=0;i--)\n\t\taa[j++]=a[i]-'0';\n\tfor(k=strlen(b)-1;k>=0;k--)\n\t\tbb[m++]=b[k]-'0';\n\tfor(n=0;n<300;n++)\n\t{\n\t\taa[n]+=bb[n];\n\t\tif(aa[n]>=10)\n\t\t{\n\t\t\taa[n+1]+=1;\n\t\t\taa[n]-=10;\n\t\t}\n\t}\n\t\n\tint s=299;\n\twhile(aa[s]==0&&s>=0)\n\t\ts--;\n\tif(s!=-1)\t\t\n\t{\n\t\tfor(int t=s;t>=0;t--)\n\t\t\tcout<=0;i--)\n { \n a[i]=stra[i]+strb[i]+b[i+1];\n \n if (a[i]>=(106))\n { a[i]=a[i]-10;\n \n b[i]=1; \n \n }\n \n \n \n }\n t=0;\n i=0;\n while (a[i]==2*'0')\n { i=i+1;\n t=t+1;\n \n \n }\n \n \n \n \n if(b[0]==1)\n printf(\"%d\",1);\n for (i=t;i=0;i--)\n { \n a[i]=stra[i]+strb[i+l]+b[i+1];\n \n if (a[i]>=(106))\n { a[i]=a[i]-10;\n \n b[i]=1; \n \n \n }\n \n \n \n }\n \n if (b[0]==0)\n { \n \n t=0;\n i=0;\n while (strb[i]=='0')\n { i=i+1;\n t=t+1;\n \n \n } \n \n for(i=t;i=0;i--)\n { \n \n strb[i]=strb[i]+c[i+1];\n \n \n if (strb[i]>=(58))\n { strb[i]=strb[i]-10;\n \n c[i]=1; \n \n }\n \n }\n \n t=0;\n i=0;\n while (strb[i]==2*'0')\n { i=i+1;\n t=t+1;\n }\n if (c[0]==1)\n printf(\"%d\",1);\n for(i=t;i=0;i--)\n { \n a[i]=strb[i]+stra[i+l]+b[i+1];\n \n if (a[i]>=(106))\n { a[i]=a[i]-10;\n \n b[i]=1; \n \n \n }\n \n \n \n }\n if (b[0]==0)\n { t=0;\n i=0;\n while (stra[i]=='0')\n { i=i+1;\n t=t+1;}\n \n for(i=t;i=0;i--)\n { \n \n stra[i]=stra[i]+c[i+1];\n \n \n if (stra[i]>=(58))\n { stra[i]=stra[i]-10;\n \n c[i]=1; \n \n }\n \n }\n \n if (c[0]==1)\n printf(\"%d\",1);\n for(i=0;i0||l2>0)\n {\n a=l1>0?str1[l1-1]-'0':0;\n b=l2>0?str2[l2-1]-'0':0;\n c[l+1]=(c[l]+a+b)/10;\n c[l]=(c[l]+a+b)%10;\n l1--;\n l2--;\n l++;\n}\nwhile(l>0&&c[l]==0)\n l--;\nfor(i=l;i>=0;i--)\n printf(\"%d\",c[i]);\n\n}"} +{"label": "69", "index": "34476", "code": "int main()\n{\n\tint i,k,p=0,lena,lenb,a[250],b[250],c[250];\n\tchar s[250],t[250],temp[250];\n\t\n\t\tfor(i=0;i<250;i++){\n\t\t\ta[i]=0;b[i]=0;c[i]=0;\n\t\t}\n\t\t\n\t\tscanf(\"%s%s\",s,t);\n\t\tlena=strlen(s);\n\t\tlenb=strlen(t);\n\t\tif(lena=0;i--)\n\t\t\ta[lena-1-i]=s[i]-48;\n\t\tfor(i=lenb-1;i>=0;i--)\n\t\t\tb[lenb-1-i]=t[i]-48;\n\t\tfor(i=0;i<=lena;i++){\n\t\t\tif(a[i]+b[i]>=10){\n\t\t\t\tc[i]+=a[i]+b[i]-10;\n\t\t\t\ta[i+1]++;\n\t\t\t}\n\t\t\telse c[i]+=a[i]+b[i];\n\t\t}\n\t\t\n\t\tfor(k=i-1;k>=0;k--){\n\t\t\tif(c[k]!=0&&p==0)\n\t\t\t\tp=1;\n\t\t\tif(p==1)\n\t\t\t\tprintf(\"%d\",c[k]);\n\t\t}\n\t\tif(p==0) printf(\"0\");\n\t\tprintf(\"\\n\");\n\t\treturn 0;\n}"} +{"label": "69", "index": "34477", "code": "main()\n{\n char a[250],b[250];\n int i,j,k,m0,n0,m,n;\n char *p,*q,*p0;\n scanf(\"%s%s\",a,b);\n m0=strlen(a);\n n0=strlen(b);\n if(m0=1;i--)\n {\n if(c[i]>=10) \n {\n c[i]=c[i]-10;\n c[i-1]=c[i-1]+1; \n } \n } \nfor(i=0;i=b)\n return a;\n else\n return b;\n }\n int main()\n {\n int a1[260],a2[260];\n char a_1[260],a_2[260];\n scanf(\"%s\",a_1);\n scanf(\"%s\",a_2);\n int n,i;\n for(i=0;i<260;i++)\n {\n a1[i]=0;\n a2[i]=0;\n }\n int l1=strlen(a_1);\n n=0;\n for(i=l1-1;i>=0;i--)\n a1[n++]=a_1[i]-'0';\n int l2=strlen(a_2);\n n=0;\n for(i=l2-1;i>=0;i--)\n a2[n++]=a_2[i]-'0';\n for(i=0;i<250;i++)\n {\n a1[i]=a1[i]+a2[i];\n if(a1[i]>=10)\n {\n a1[i]=a1[i]-10;\n a1[i+1]++;\n }\n }\n for(i=max(l1,l2);i>=0;i--)\n {\n if(a1[i]!=0)\n {\n n=i;\n goto t;\n }\n else\n {\n n=i;\n }\n if(n==0)\n goto t; \n }\n t:for(i=n;i>=0;i--)\n printf(\"%d\",a1[i]);\n }"} +{"label": "69", "index": "34479", "code": "\nint cmp(const void * p1, const void * p2)\n{\n\treturn 0;\n}\n\nchar a[255];\nchar b[255];\nint an[255];\nint bn[255];\nint c[255];\n\nint main()\n{\n\tcin >> a;\n\tcin >> b;\n\n\tmemset(an, 0, 255);\n\tmemset(bn, 0, 255);\n\tmemset(c, 0, 255);\n\n\tint la = strlen(a);\n\tint lb = strlen(b);\n\n\tfor (int i = la -1; i >= 0; i --)\n\t\tan[la - 1 - i] = a[i] - '0';\n\tfor (int i = lb -1; i >= 0; i --)\n\t\tbn[lb - 1 - i] = b[i] - '0';\n\n\t//for (int i = 0; i < la; i ++)\n\t//\tcout << an[i];\n\t//cout << endl;\n\t//for (int i = 0; i < lb; i ++)\n\t//\tcout << bn[i];\n\n\tint pos = 0;\n\tfor (int i = 0; i < la || i < lb; i ++)\n\t{\n\t\tif (an[i] + bn[i] + c[i] >= 10)\n\t\t{\n\t\t\tc[i] = an[i] + bn[i] + c[i] - 10;\n\t\t\tc[i + 1] ++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc[i] = an[i] + bn[i] + c[i];\n\t\t}\n\t}\n\tint i = 254;\n\twhile (i >= 0 && c[i] == 0)\n\t\ti --;\n\n\tif (i < 0)\n\t\ti = 0; \n\n\twhile (i >= 0)\n\t{\n\t\tcout << c[i];\n\t\ti --;\n\t}\n\tcout << endl;\n\treturn 0;\n}"} +{"label": "69", "index": "34480", "code": "\nmain()\n{\n int i,m,n;\n char a[250],b[250];\n gets(a); \n gets(b);\n m=strlen(b);\n n=strlen(a);\n \n \n if(m<=n)\n {\n for(i=n;i>0;i=i-1)\n a[i]=a[i-1]-'0';\n a[0]=0;\n \n for(i=m-1;i>=0;i=i-1)\n b[i]=b[i]-'0';\n \n \n for(i=0;i0;i=i-1)\n b[i]=b[i-1]-'0';\n b[0]=0;\n \n for(i=n-1;i>=0;i=i-1)\n a[i]=a[i]-'0';\n \n \n for(i=0;i=l2)len=l1;\n\telse len=l2;\n\tint i,j;\n\tint num;\n\tfor(i=0;i9)\n\t\ta3[i+1]=1;\n \ta4[i]=(a1[i]+a2[i]+a3[i])%10;\n\t}\n\tif(a3[len]==1)\n\tnum=len;\n\telse num=len-1;\n\tfor(i=num;i>=0;i--)\n\t\tif(a4[i]!=0)\n\t\t{\n num=i;\n\t\t\tbreak;\n\t\t}\n\t if(i==0)cout<=0;j--)\n\t\t\tcout<str=(char*)malloc(sizeof(int)*maxnum);\n if(p1list->str)\n return p1list;\n }\n return NULL;\n}\nint l=0;\nvoid plusdzs(plist palist,plist pblist,plist pclist) \n{ \n int a,b,l1,l2,i;\n l1=(int)strlen(palist->str);\n l2=(int)strlen(pblist->str);\n while(l1>0||l2>0)\n {\n a=l1>0?palist->str[l1-1]-'0':0;\n b=l2>0?pblist->str[l2-1]-'0':0;\n if(l==0)\n {pclist->str[l+1]=(a+b)/10;\n pclist->str[l]=(a+b)%10;}\n else\n {pclist->str[l+1]=(pclist->str[l]+a+b)/10;\n pclist->str[l]=(pclist->str[l]+a+b)%10;}\n l1--;\n l2--;\n l++;\n }\n}\nvoid printout(plist pclist,int l)\n{ \n while(l>0&&pclist->str[l]==0)\n l--;\n int i;\n for(i=l;i>=0;i--)\n printf(\"%d\",pclist->str[i]);\n}\nmain()\n{\n plist palist=create();\n plist pblist=create();\n plist pclist=create();\n scanf(\"%s%s\",palist->str,pblist->str);\n plusdzs(palist,pblist,pclist);\n printout(pclist,l);\n\n}\n "} +{"label": "69", "index": "34483", "code": "main()\n{\n int a1[251], b1[251], c[251];\n int i, i1, i2, j1, j2, j3, j4, j5, c1, c2, jinwei, head;\n char a[251], b[251];\n \n scanf(\"%s\", a);\n scanf(\"%s\", b);\n c1 = strlen(a); c2 = strlen(b);\n a1[0] = b1[0] = 0;\n for(i1=1; i1<=c1; i1++)\n a1[i1] = a[i1-1] - '0';\n for(i2=1; i2<=c2; i2++)\n b1[i2] = b[i2-1] - '0';\n if(c1 >= c2)\n {\n for(i=c1; i>=c1-c2+1; i--)\n b1[i] = b1[i-c1+c2];\n for(j1=c1-c2; j1>=1; j1--)\n b1[j1] = 0;\n jinwei = 0;\n for(j2=c1; j2>=0; j2--)\n {\n c[j2] = a1[j2] + b1[j2] + jinwei;\n jinwei = 0;\n if(c[j2] >= 10)\n {\n c[j2] = c[j2] - 10;\n jinwei++; \n } \n } \n head = 0;\n for(j4=0; j4<=c1; j4++)\n if(c[j4] != 0)\n {\n head = j4;\n break; \n }\n if(head==0 && c[0] == 0)\n printf(\"0\");\n else\n {\n for(j3=head; j3<=c1; j3++)\n printf(\"%d\", c[j3]);\n printf(\"\\n\");\n }\n }\n else\n {\n for(i=c2; i>=c2-c1+1; i--)\n a1[i] = a1[i-c2+c1];\n for(j1=c2-c1; j1>=1; j1--)\n a1[j1] = 0;\n jinwei = 0;\n for(j2=c2; j2>=0; j2--)\n {\n c[j2] = a1[j2] + b1[j2] + jinwei;\n jinwei = 0;\n if(c[j2] >= 10)\n {\n c[j2] = c[j2] - 10;\n jinwei++; \n } \n } \n head = 0;\n for(j4=0; j4<=c2; j4++)\n if(c[j4] != 0)\n {\n head = j4;\n break; \n }\n if(head==0 && c[0]==0)\n printf(\"0\");\n else\n {\n for(j3=head; j3<=c2; j3++)\n printf(\"%d\", c[j3]);\n printf(\"\\n\");\n }\n } \n \n return 0;\n}"} +{"label": "69", "index": "34484", "code": "void main()\n{char a[251],b[251];\nint al,bl,i,k;\nscanf(\"%s %s\",a,b);\nal=strlen(a);\nbl=strlen(b);\nfor(i=250;i>250-al;i--)\na[i]=a[i-251+al]-48;\nfor(i=250;i>250-bl;i--)\nb[i]=b[i-251+bl]-48;\nfor(i=0;i<251-al;i++)\na[i]=0;\nfor(i=0;i<251-bl;i++)\nb[i]=0;\nk=al>bl?al:bl;\nfor(i=250;i>250-k;i--)\n{\nif(a[i]+b[i]>9)\n{a[i]=a[i]+b[i]-10;a[i-1]+=1;}\nelse a[i]=a[i]+b[i];\n}\nk=251;\nfor(i=0;i<=250;i++)\nif(a[i]!=0){k=i;break;}\nif(k<251)\n{for(i=k;i<251;i++)\nprintf(\"%d\",a[i]);\nprintf(\"\\n\");\n}\nelse printf(\"0\\n\");\n}"} +{"label": "69", "index": "34485", "code": "int main()\n{\n\tint n,i,j,k;\n\tchar str1[251],str2[251];\n\tcin.getline(str1,251);\n\tcin.getline(str2,251);\n\tint save1[252]={0},save2[250]={0}; //????????????????????\n\tint len1=strlen(str1),len2=strlen(str2);\n\tfor(i=len1-1;i>=0;i--)\n\t\tsave1[len1-1-i]=str1[i]-'0';\n\tfor(i=len2-1;i>=0;i--)\n\t\tsave2[len2-1-i]=str2[i]-'0';\n\tint max=(len1>len2)?len1:len2;\n\tfor(i=0;i=10)\n\t\t{\n\t\t\tsave1[i+1]+=1;\n\t\t\tsave1[i]-=10;\n\t\t}\n\t}\n\tfor(i=250;i>=0;i--)\n\t\tif(save1[i]!=0)\n\t\t\tbreak;\n\tfor(j=i;j>=0;j--)\n\t\tcout<n)\n {\n for(p=b+n-1;p>=b;p--)\n\t\t*(p+m-n)=*p;\n\tfor(p=b+m-n-1;p>=b;p--)\n\t\t*p='0';\n }\n else \n {\n for(p=a+m-1;p>=a;p--)\n\t\t*(p+n-m)=*p;\n\tfor(p=a+n-m-1;p>=a;p--)\n\t\t*p='0';\n }\n t=m>n?m:n;\n for(i=t;i>0;i--)\n {\n *(c+i-1)=*(b+i-1)+*(a+i-1)-'0'+k;\n\tif(*(c+i-1)>'9') \n\t{\n\t\t*(c+i-1)-=10;\n\t k=1;\n\t}\n\telse k=0;\n }\n if(k==1)\n {\n for(i=t;i>0;i--)\n\t\t*(c+i)=*(c+i-1);\n\t*(c+0)='1';\n\t*(c+t+1)='\\0';\n }\n else *(c+t)='\\0'; \n for(p=c;*p=='0';p++)\n {\n }\n printf(\"%s\",p);\n if(m==1&&n==1&&b[0]=='0'&&a[0]=='0') printf(\"0\");\n printf(\"\\n\");\n}"} +{"label": "69", "index": "34487", "code": "\nint main()\n{\n\tchar a[250]={0},b[250]={0},sum[250]={0};\n scanf(\"%s\",a);\n\tscanf(\"%s\",b);\n\n\tint na,i,nb;\n\tfor(i=0;i<250;i++)\n\t{\n\t\tif(a[i]=='\\0')\n\t\t{\n\t\t\tna=i-1;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tfor(i=0;i<250;i++)\n\t{\n\t\tif(b[i]=='\\0')\n\t\t{\n\t\t\tnb=i-1;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tint n=na>nb?na:nb;\n\tif(na=0;i--)\n\t{\n\t\tsum[i+1]=a[i]+b[i]+t-48;\n\t\tif(sum[i+1]-48>=10)\n\t\t{\n\t\t\tsum[i+1]=sum[i+1]-10;\n\t\t\tt=1;\n\t\t}\n\t\telse t=0;\n\t}\n\n\t\n\tif(t==1) sum[0]=49;\n\telse \n\t{\n\t\tfor(i=0;i<=n;i++)\n\t\t{\n\t\t sum[i]=sum[i+1];\n\t\t}\n\t\tsum[n+1]=0;\n\t}\n\n\tif(sum[0]==48 && n>0)\n\t{\n\n\t int x;\n\t for(i=0;i<=n;i++)\n\t\t{\n\t\t if(sum[i]==48 && sum[i+1]!=48)\n\t\t\t{\n\t\t\t x=i;\n\t\t\t break;\n\t\t\t}\n\t\t}\n\n\t\tfor(i=0;i<=n-1-x;i++)\n\t\t{\n\t\t\tsum[i]=sum[i+x+1];\n\t\t}\n\t\tsum[n-x]=0;\n\t}\n\n printf(\"%s\",sum);\n\n return 0;\n\n}\n"} +{"label": "69", "index": "34488", "code": "void strf(char *str){\n\tfor(int i = 0;i < (int)(strlen(str)/2);i ++){\n\t\tchar temp = str[i];\n\t\tstr[i] = str[strlen(str) - 1 - i];\n\t\tstr[strlen(str) - 1 - i] = temp;\n\t}\n}\nint main(){\n\tchar an1[201],an2[201];\n\tcin >> an1 >> an2;\n\tstrf(an1);strf(an2);\n\tint anum1[201],anum2[201];\n\tint ar[202];\n\tmemset(anum1,0,sizeof(anum1));\n\tmemset(anum2,0,sizeof(anum2));\n\tmemset(ar,0,sizeof(ar));\n\tint l1 = strlen(an1),l2 = strlen(an2),i;\n\tint length = l1 > l2 ? l1: l2;\n\tif(length == l1){\n\t\tfor(i = l2;i < length;i ++){\n\t\t\tan2[i] = '0';\n\t\t}\n\t\tan2[i] = 0;\n\t}\n\telse {\n\t\tfor(i = l1;i < length;i ++){\n\t\tan1[i] = '0';\n\t}\n\t\tan1[i] = 0;\n\t}\n\tfor(i = 0;i < length;i ++)\n\t{\n\t\tanum1[i] = an1[i] - '0';\n\t\tanum2[i] = an2[i] - '0';\n\t\tar[i] += anum1[i] + anum2[i];\n\t}\n\tfor(i = 0;i < length + 1;i ++){\n\t\tif(ar[i] >= 10){\n\t\t\tar[i] -= 10;\n\t\t\tar[i + 1] ++;\n\t\t}\n\t}\n\tfor(i = length + 2;ar[i] == 0;i --);\n\tif(i < 0) cout << '0' << endl;\n\telse{\n\t\tfor(;i >= 0;i --){\n\t\t\tcout << ar[i] ;\n\t\t}\n\t\tcout << endl;\n\t}\n\n}\n"} +{"label": "69", "index": "34489", "code": "int main()\n{\n\t\n\tchar A[250];\n\tchar B[250];\n\tchar C[251]={'1'};\n\tint i,a=0,b=0,m=0,d=0,e=0,g=0,j;\n\tgets(A);\n\tgets(B);\n\tfor(i=0;A[i]!='\\0';i++)\n\t{\n\t\ta++;\n\t}\n\tfor(i=0;B[i]!='\\0';i++)\n\t{\n\t\tb++;\n\t}\n\tfor(i=0;A[i]=='0';i++)\n\t\t{\n \td++;\n\t\t}\n\tif(a>=b)\n\t{\n\t\t\n\t\tfor(i=a-1;i>=a-b;i--)\n\t\t{\n\t\t\tB[i]=B[i-a+b];\n\t\t}\n\t\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tif(A[i]+B[i]+m>105)\n\t\t\t{\n\t\t\t\tA[i]=A[i]+B[i]+m-58;\n\t\t\t\tm=1;\n\t\t\t}\n\t\t\telse if(A[i]+B[i]+m<=105)\n\t\t\t{\n\t\t\t\tA[i]=A[i]+B[i]+m-'0';\n\t\t\t\tm=0;\n\t\t\t}\n\t\t}\n\t\tif(d!=0)\n\t\t{\n\t\t\tfor(j=0;A[j]=='0';j++)\n\t\t\t{\n\t\t\t\tg++;\n\t\t\t}\n\t\t\tfor(j=0;j=b-a;i--)\n\t\t{\n\t\t\tA[i]=A[i-b+a];\n\t\t}\n\t\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tif(A[i]+B[i]+m>105)\n\t\t\t{\n\t\t\t\tA[i]=A[i]+B[i]+m-58;\n\t\t\t\tm=1;\n\t\t\t}\n\t\t\telse if(A[i]+B[i]+m<=105)\n\t\t\t{\n\t\t\t\tA[i]=A[i]+B[i]+m-'0';\n\t\t\t\tm=0;\n\t\t\t}\n\t\t}\n\t\tif(e!=0)\n\t\t{\n for(i=0;A[i]=='0';i++)\n\t\t\t{\n\t\t\t\tg++;\n\t\t\t}\n\t\t\tfor(i=0;i=0;i--)\n\t\tif(r[i]!=0)\n\t\t{\n\t\t\tsi=i;\n\t\t\tbreak;\n\t\t}\n\n\tif(si==0)\n\t\tcout<<'0'<=0;i--)\n\t\t\tcout<=0 ; i--)\n\t\ta[len-1-i]=s[i]-'0';\n}\n\nvoid add_int(int* a1, int* a2, int* res)\n{\n\tfor(int i=0 ; i= 10)\n\t\t{\n\t\t\tres[i]-=10;\n\t\t\tres[i+1]++;\n\t\t}\n\t}\n}\n\nvoid output_int(int* a)\n{\n\tint len=MAX_LEN;\n\twhile(!a[len-1])\tlen--;\n\tif(len <= 0)\n\t\tprintf(\"0\");\n\tfor(int i=len-1 ; i>=0 ; i--)\n\t\tprintf(\"%d\", a[i]);\n\tprintf(\"\\n\");\n}\n\nint main()\n{\n\tint an1[210]={0}, an2[210]={0}, res[210]={0};\n\tchar s1[210], s2[210];\n\tscanf(\"%s\", s1);\n\tscanf(\"%s\", s2);\n\tchar_revto_int(s1, an1, strlen(s1));\n\tchar_revto_int(s2, an2, strlen(s2));\n\tadd_int(an1, an2, res);\n\toutput_int(res);\n\treturn 0;\n}"} +{"label": "69", "index": "34492", "code": "\n\nmain()\n{\n char str1[260],str2[260];\n int A[260]={0},B[260]={0},C[260]={0};\n scanf(\"%s\",str1);\n scanf(\"%s\",str2);\n int i,j=1;\n for(i=strlen(str1)-1;i>=0;i--)\n A[(strlen(str1))-i-1]=str1[i]-'0';\n for(i=strlen(str2)-1;i>=0;i--)\n B[strlen(str2)-i-1]=str2[i]-'0';\n for(i=0;i<260;i++)\n {if (A[i]+B[i]>9) {A[i+1]+=1;\n C[i]=(A[i]+B[i])-10;}\n else C[i]=(A[i]+B[i]);}\n \n for(i=259;i>=0;i--)\n if((j!=1)||(C[i]!=0))\n {j=0;printf(\"%d\",C[i]);}\n if ((C[0]==0)&&(j==1))\n printf(\"0\");\n}\n"} +{"label": "69", "index": "34493", "code": "int main(int argc, char* argv[])\n{\n\tchar s1[251], s2[251];\n\tint j, k, a, b, c[252]={0};\n\tscanf(\"%s %s\", s1, s2);\n\ta = strlen(s1);\n\tb = strlen(s2);\n\tint l=0;\n\twhile(a>0||b>0){\n\t\tj = (a>0) ? s1[--a]-'0' : 0 ;\n\t\tk = (b>0) ? s2[--b]-'0' : 0 ;\n\t\tc[l] += j+k;\n\t\tc[l+1]=c[l]/10;\n\t\tc[l]=c[l]%10;\n\t\tl++;\n\t}\n\twhile(c[l]==0 && l>0)\n\t\tl--;\n\tfor(j=l; j>=0; j--)\n\t\tprintf(\"%d\",c[j]);\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "69", "index": "34494", "code": "int main()\n{\n\tchar A[200],B[200];\n\tcin>>A>>B;\n\tint iA[200]={0},iB[200]={0};\n\tint iC[200]={0};\n\tchar C[200]={0};\n\tfor(int i=0;i=0;Lc--)\n\t{\n\t\tif(iC[Lc-1]!=0)\n\t\tbreak;\n\t}\n\tif(Lc==-1)\n\tcout<<'0';\n\telse\n\t{\n\tfor(int i=0;i>a>>b;\n\tint la=strlen(a),lb=strlen(b);\n\tfor(int i=0;ilb) //???????????????????????????\n\t{\n\t for(int i=1;i<=lb;i++)\n\t\t\tan[la-i]+=bn[lb-i];\n\t\tfor(int i=1;ilength2)\n\t\tlength=length1;\n\telse\n\t\tlength=length2;\n\tfor(i=0;i9)\n\t\t{\n\t\t\te[i]=p[i]+q[i]+mark-'0'-10;\n\t\t\tmark=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\te[i]=p[i]+q[i]+mark-'0';\n\t\t\tmark=0;\n\t\t}\n\t}\n\te[length+1]='\\0';\n\tlength=strlen(e);\n\tfor(i=0;i\n\n\nvoid delZero(char a[])\n{\n int i = 0;\n int count = 0;\n for (i = 0; i < MAXNUM; i ++) {\n if (a[i] == '0') {\n count ++;\n }\n if (a[i] != '0') {\n break;\n }\n }\n for (i = 0; a[i + count] != '\\0'; i ++) {\n a[i] = a[i + count];\n }\n int j;\n for (j = 0; j < count; j ++) {\n a[i + j] = '\\0';\n }\n}\n\n\n\nint addWorker(int a[],int na,int b[],int nb,int c[]);\n\n//???????c????????\nint add(char a[],char b[],int c[])\n{\n int na = 0;\n int nb = 0;\n int _a[MAXNUM];\n int _b[MAXNUM];\n memset(_a, 0, sizeof(_a));\n memset(_b, 0, sizeof(_b));\n //????\n while (a[na] == '0') {\n na ++;\n }\n while (a[na] != '\\0') {\n _a[na] = (int)(a[na] - '0');\n na ++;\n }\n while (b[nb] != '\\0') {\n _b[nb] = (int)(b[nb] - '0');\n nb ++;\n }\n\n //????????????\n if (na > nb) {\n \n return (addWorker(_a, na, _b, nb, c));\n }\n else\n {\n return addWorker(_b, nb, _a, na, c);\n }\n \n}\n\n//??????\nint addWorker(int a[],int na,int b[],int nb,int c[])\n{\n \n\n \n //???????????\n int nc = na + 1;\n int l = nc;\n \n //????\n na --;\n nb --;\n nc --;\n \n //????\n while (nb >= 0)\n {\n //????\n int carry = 0;\n if (a[na] + b[nb] > 9) {\n carry = 1;\n }\n c[nc] += (a[na] + b[nb]) % 10;\n if (c[nc] == 10) {\n int i = nc;\n while (c[i] == 10) {\n c[i] = 0;\n c[i - 1] += 1;\n i --;\n }\n }\n c[nc - 1] += carry;\n // ????? 999999 + 1????\n if (c[nc - 1] == 10) {\n int i = nc;\n while (c[i - 1] == 10) {\n c[i - 1] = 0;\n c[i - 2] += 1;\n i --;\n }\n }\n //cout << c[nc]<= 0) {\n c[nc] += a[na];\n //?????? 9999 + 1\n if (c[nc] == 10) {\n int i = nc;\n while (c[i] == 10) {\n c[i] = 0;\n c[i - 1] += 1;\n i --;\n }\n }\n // cout << c[nc]<> a;\n cin >> b;\n \n delZero(a);\n delZero(b);\n\n //?n??????\n int n = add(a, b, c);\n\n int i = 0;\n //???0??\n while (c[i] == 0) {\n i ++;\n }\n while (i >= MAXNUM) {\n cout << 0;\n return 0;\n }\n int j;\n for (j = 0; j < n; j ++) {\n cout << c[i + j];\n }\n // cout << endl << n;\n \n \n}\n"} +{"label": "69", "index": "34498", "code": "int main(){\n\tchar a[300],b[300];\n\tcin>>a;\n\tcin>>b;\n\tint len_1=strlen(a);\n\tint len_2=strlen(b);\n\tint len=len_1;\n\tif(len_2>len_1){\n\t\tlen=len_2;\n\t}\n\tint n_p[300]={0};\n\tint n_q[300]={0};\n\tint i=0,j=0;\n\tfor(i=0;i0;i--){\n\t\tif(n_p[i]+n_q[i]<10){\n\t\t\tend[i]=n_p[i]+n_q[i];\n\t\t}\n\t\tif(n_p[i]+n_q[i]>=10){\n\t\t\tend[i]=n_p[i]+n_q[i]-10;\n\t\t\tn_p[i-1]++;\n\t\t}\n\t}\n\tfor(j=0;j<299;j++){\n\t\tif(end[j]!=0)break;\n\t}\n//\tcout<>a>>b;\n la=strlen(a);\n lb=strlen(b);\n j=la-1;\n for(i=0;i=10){\n aint[i+1]++;\n aint[i]%=10;\n } \n }\n int t=0;\n for(i=299;i>=0;i--){\n if(aint[i]!=0)\n t=1;\n if(t)\n cout<>n;\n\tfor(int i=0;i>a[i]>>b[i];\n\t}\n\t\n\tfor(int i=0;i=maxx) maxx=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n\t\t}\n\t}\n\tcout<>k;\n\tdouble max=0;\n\tint i;\n\tfor(i=0;i<=k-1;i++)\n\t{\n\t\tcin>>a[i];\n\t cin>>b[i];\n\t}\n\tint j,m;\n\tdouble p;\n\tfor(j=0;j<=k-1;j++)\n\t\tfor(m=0;m<=k-1;m++)\n\t\t{\n\t\t\tp=sqrt((a[j]-a[m])*(a[j]-a[m])+(b[j]-b[m])*(b[j]-b[m]));\n\t\t\tif(p>max)\n\t\t\t\tmax=p;\n\t\t}\n\tcout<i;j--)\n\t\t{\n\t\t\tk++;\n\t\t\tl[k]=sqrt((s[i].x-s[j].x)*(s[i].x-s[j].x)+(s[i].y-s[j].y)*(s[i].y-s[j].y));\n\t\t}\n\t}\n\t//for (i=1;i1;j--)\n\t\t{\n\t\t\tif (l[j]>l[j-1])\n\t\t\t{\tm=l[j-1];\n\t\t\t l[j-1]=l[j];\n\t\t\t\tl[j]=m;\n\t\t\t}\n\n\t\t}\n\n//\t}\n\tprintf (\"%.4lf\\n\",l[1]);\n\n\treturn 0;\n}"} +{"label": "70", "index": "34503", "code": "\nint main()\n\n{\n double x[10],y[10],z;\n int n,i,j;\n scanf(\"%d\\n\",&n);\n for(i=0;iz)\n z=pow((x[i]-x[j]),2)+pow((y[i]-y[j]),2);\n }\n z=sqrt(z);\n printf(\"%.4f\\n\", z);\n return 1;\n\n}"} +{"label": "70", "index": "34504", "code": "struct point\n{\n\tdouble x;\n\tdouble y;\n};\ndouble len(struct point m,struct point n)\n{\n\tdouble l;\n\tl=sqrt((m.x-n.x)*(m.x-n.x)+(m.y-n.y)*(m.y-n.y));\n\treturn(l);\n}\nvoid main()\n{\n\tstruct point p[100];\n\tint n,i,j;\n\tdouble max=0;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&p[0].x,&p[0].y);\n\tfor (i=1;i<=n-1;i++)\n\t{\n\t\tscanf(\"%lf %lf\",&p[i].x,&p[i].y);\n\t\tfor (j=0;j<=i-1;j++)\n\t\t{\n\t\t\tif (maxmax)\n\t\t\t\tmax=(d[i][0]-d[j][0])*(d[i][0]-d[j][0])+(d[i][1]-d[j][1])*(d[i][1]-d[j][1]);\n\tmax=sqrt(max);\n\tprintf(\"%.4f\",max);\n//\tfor(i=0;idis)dis=temp;\n }\n printf(\"%.4f\\n\",dis); \n return 0;\n}"} +{"label": "70", "index": "34507", "code": "main()\n{\n int n;\n scanf(\"%d\",&n);\n double x[n],y[n];\n int i,j;\n for(i=0;idis)\n dis=c[i][j];\n }\n }\n printf(\"%.4lf\",sqrt(dis));\n}"} +{"label": "70", "index": "34508", "code": "\nint main ()\n{\n\n\tint nInput=0, i, j;\n\tdouble x[100], y[100], xDiff=0.0;\n\tdouble yDiff=0.0, yMax=0.0;\n\tint yPosition1= 0.0 , yPosition2=0.0, xMax=0.0,xPosition1= 0.0 , xPosition2=0.0;\n\t\n\t\n\tcin>>nInput;\n\t\n\n\t\n\tfor (i=0; i>x[i]>>y[i];\n\t}\n\n\tfor (i=0; ixMax)\n\t\t\t\t{\n\t\t\t\t\txMax=xDiff;\n\t\t\t\t\txPosition1 = i;\n\t\t\t\t\txPosition2 = j;\n\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\n\t\n\tfor (i=0; iyMax)\n\t\t\t\t{\n\t\t\t\t\tyMax=yDiff;\n\t\t\t\t\tyPosition1 = i;\n\t\t\t\t\tyPosition2 = j;\n\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\n\t\n\n\n\n\t\tcout<=xMax)\n\t\tcout<< sqrt((y[yPosition1] - y[yPosition2])*(y[yPosition1] - y[yPosition2])+(x[yPosition1] - x[yPosition2])*(x[yPosition1] - x[yPosition2]) );\n\n\telse \n\t\tcout<< sqrt((y[xPosition1] - y[xPosition2])*(y[xPosition1] - y[xPosition2]))+(x[xPosition1] - x[xPosition2])*(x[xPosition1] - x[xPosition2]);\n\n\n\n\treturn 0;\n\t\t\n\n\n}\n"} +{"label": "70", "index": "34509", "code": "void main()\n{\n\tint i,j,p=0;\n\tdouble m;\n\tdouble b[50]={0};\n\tfloat a[10][2]={0};\n\tint n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;im)m=b[i];\n\t\t}\n\t\tprintf(\"%.4f\\n\",m);\n\n}\n"} +{"label": "70", "index": "34510", "code": "\ndouble distance(double a1,double a2,double b1,double b2)\n{\n\tdouble c;\n\tc=sqrt((a1-b1)*(a1-b1)+(a2-b2)*(a2-b2));\n\treturn(c);\n\t\n}\n\nvoid main()\n{\n\tint n,i,j;\n\tdouble A[100][2],x,y;\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;ix)\n\t\t\t\tx=y;\n\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",x);\n\n\n}\n"} +{"label": "70", "index": "34511", "code": "\nint main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble *px,*py;\n\tpx=(double *)malloc(sizeof(double) * n);\n py=(double *)malloc(sizeof(double) * n);\n\tint i;\n\tfor(i=n-1;i>=0;i--)\n\t{\n\t\tscanf(\"%lf%lf\",&px[i],&py[i]);\n\t}\n double dis;\n double mdis;\n\tmdis=0;\n int j;\n\tfor(j=n-1;j>=0;j--)\n\t{\n\t\tfor(i=j-1;i>=0;i--)\n\t\t{\n\t\t\tdis=(px[j]-px[i])*(px[j]-px[i])+(py[j]-py[i])*(py[j]-py[i]);\n\t\t\tif(mdis<=dis) mdis=dis;\n\t\t}\n\t}\n\tmdis=sqrt(mdis);\n free(px);\n\tfree(py);\n\tprintf(\"%.4f\\n\",mdis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34512", "code": "struct point\n{\n double x;\n double y;\n};\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n struct point *p;\n p=(struct point*)malloc(sizeof(point)*n);\n int i,j;\n for(i=0;id[i])\n d[i]=c;\n }\n }\n double max=0.0;\n for(i=0;imax)\n max=d[i];\n }\n printf(\"%.4lf\\n\",max);\n getchar();\n getchar();\n getchar();\n}\n \n \n \n"} +{"label": "70", "index": "34513", "code": "int main()\n{int n,i,j;\ndouble a[100][2],z;\ndouble max=0;\nscanf(\"%d\",&n);\nfor(i=0;imax)\n\tmax=z;\n\t}\n}\nprintf(\"%.4lf\",sqrt(max));\nreturn 0;\n}"} +{"label": "70", "index": "34514", "code": "void main()\n{\n\tint n,i,j,k=0;\n\tdouble a[10],b[10],c[50],sum;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=dis)\n\t\t\t{\n\t\t\t\tdis=b;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdis=dis;\n\t\t\t}\n\t\t}\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34516", "code": "\n\nmain() {\n\tint n, i, j;\n\tdouble x[1000], y[1000], ll[1000][1000]={{0},{0}}, l[1000]={0}, dis=0;\n\tscanf( \"%d\", &n );\n\tfor( i=0; i l[i] ) {\n\t\t\t\tl[i] = ll[i][j];\n\t\t\t}\n\t\t}\n\t\tif( l[i] > dis ) {\n\t\t\tdis = l[i];\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\n}"} +{"label": "70", "index": "34517", "code": "int main()\n{\n\tint n;\n\tfloat t,max=0;\n\tstruct point{\n\t float x,y;\n\t}dis[1000];\n\tscanf(\"%d\",&n);\n\tfor(int i=0;imax)max=t;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34518", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j,k;\n\tdouble a[100][2],m,max=0,MAX=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=m;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34519", "code": "\n\n\nint main ()\n{\n \tint i,j,n;\n\tdouble m=0,l,a,b,c,d;\n\n\tscanf(\"%d\",&n);\n\tstruct point\n\t{\n\t\tfloat x,y;\n\t} *p;\n\t \n\t\tp=(struct point *)malloc(sizeof(point)*n);\n\t\tfor(i=0;ix,&(p+i)->y);\n\t\t}\n\t\tfor(i=1;ix;b=(p+j)->x;c=(p+i)->y;d=(p+j)->y;\n l=sqrt((a-b)*(a-b)+(c-d)*(c-d));\n\t\t\t\tif(l>m)\n\t\t\t\t\tm=l;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%.4f\",m);\n\t\tfree (p);\n \n}"} +{"label": "70", "index": "34520", "code": "\n\n///???//\nint iIndex,iIndex1,iCount;\nint i,j,k,l,m,n;//???????\ndouble x[1000];\ndouble y[1000];\ndouble MaxDistance,NowDistance;\n/////////////\n/* ???????\nvoid Input()\n{\nifstream fin(\"D:\\\\Brother\\\\Kon\\\\Debug\\\\message.in\");\nfin>>iCount;\nfor (i=0; i>x[i]>>y[i];\nfin.close();\n}\n*/\n\nvoid _Calculate()\n{\nfor(i=0;i MaxDistance) \n{MaxDistance=NowDistance;}\n}\n}\n}\nint main(int argc, char* argv[])\n{\n\nMaxDistance=-1;\n//iIndex=0;iIndex1=0;\n/* ??(x[iIndex],y[iIndex])\n ???????-1????????~???????????*/\n//->??????????printf(\"Hello World!\\n\");\n// ??????????Input();\n\n\nscanf(\"%d\",&iCount);\n\n\nfor (i=0;i>x[i]>>y[i];\n}\n\n_Calculate();\n\ncout << MaxDistance<m)\n m= b[j][k];}\n }\n double p=sqrt(m); \n printf(\"%.4lf\",p);\n \n} \n"} +{"label": "70", "index": "34522", "code": "int main()\n{\n\tint n,k=0;\n\tcin>>n;\n\tdouble x[100],y[100],d[500];\n\tfor(int i=0;i>x[i]>>y[i];\n\tfor(int i=0;imax) max=l;\n\t\t\t}\n\t\tmax= sqrt(max);\n\t\tprintf (\"%.4lf\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34524", "code": "int main()\n{\n\tstruct point{\n\t\tdouble x;\n\t\tdouble y;\n\t}point[100];\n\tint i,j,n;\n\tdouble M=0.0,length;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iM)\n\t\t\t\tM=length;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",M);\n\n\t\n\treturn 0;\n}\n \n"} +{"label": "70", "index": "34525", "code": "\nint main(int argc, char* argv[]){\n\tstruct point{\n\t\tdouble x,y;\n\t}p[1000];\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i,j;\n for(i=0;ii;j--){\n\t\t\tdouble s=sqrt((p[i].x-p[j].x)*(p[i].x-p[j].x)+(p[i].y-p[j].y)*(p[i].y-p[j].y));\n\t\t\tif(max0;i--){\n\t\ttemp=pow((x[p]-x[i])*(x[p]-x[i])+(y[p]-y[i])*(y[p]-y[i]),0.5);\n\t\tif (temp>=dis)\n\t\t{\n\t\tdis=temp;\n\t\t}\n\t}\n}\nprintf(\"%.4f\\n\", dis);\nreturn 0;\n}\n\t"} +{"label": "70", "index": "34528", "code": "int main(int argc, char *argv[])\n{\n \n int i,j,n;\n double a[1000][2],max,b;\n scanf (\"%d\",&n);\n for (i=0;imax)\n max=b;\n }\n }\n printf (\"%.4lf\",sqrt(max));\n scanf (\"%d\",&i);\n return 0;\n}"} +{"label": "70", "index": "34529", "code": "\nstruct point\n{\n double x;\n double y;\n};\n\nint main(int argc, char *argv[])\n{\n int n,i,j;\n scanf(\"%d\",&n);\n struct point stu[n]; \n for (i=0;i<=n-1;i++)\n scanf(\"%lf%lf\",&stu[i].x,&stu[i].y);\n double dis[n][n];\n for (i=0;i<=n-1;i++)\n {\n for (j=i+1;j<=n-1;j++)\n dis[i][j]=sqrt((stu[i].x-stu[j].x)*(stu[i].x-stu[j].x)+(stu[i].y-stu[j].y)*(stu[i].y-stu[j].y));\n }\n double max=0;\n for (i=0;i<=n-1;i++)\n {\n for (j=i+1;j<=n-1;j++)\n if (maxdis)\n\t\t\t\tdis=d;\n\t\t}\n\tprintf(\"%.4f\\n\",dis);\n}\n"} +{"label": "70", "index": "34531", "code": "main()\n{int i,j,k,m,n,p=0,q;\n scanf(\"%d\",&n);\n q=n*(n-1)/2; \n double t,jl[q];\n struct{double x;double y;}dian[n];\n for(i=0;ijl[i]) {t=jl[j];jl[j]=jl[i];jl[i]=t;}\n }\n printf(\"%.4lf\",jl[0]);\n\n}\n"} +{"label": "70", "index": "34532", "code": "\nint main(){\n\tstruct point{\n\t\tdouble x,y;\n\t}point[10];\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tfor(i=0;idis[j]){\n\t\t\t\tmax[i]=dis[j-1];\n\t\t\t\tdis[j]=dis[j-1];\n\t\t\t}\n else max[i]=dis[j];\n\t\t}\n\t}\n\tdouble M;\n\tfor(i=0;imax[i+1]){\n\t\t\tM=max[i];\n\t\t\tmax[i+1]=max[i];\n\t\t}\n else M=max[i+1];\n\t}\n\tprintf(\"%.4f\",M);\n\treturn 0;\n}"} +{"label": "70", "index": "34533", "code": "int main(int argc, char* argv[])\n{\n\tint n ,i,j,t=0;\n\tdouble x[99],y[99],s[999],max,h[999],z[999];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)max=s[i];\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\n\n\t\t\n\t\t\n\n\n\n\n\n\n"} +{"label": "70", "index": "34534", "code": "\n\n\nint main(){\n int n,i,a,b;\n double x[10],y[10],totle=0; \n scanf(\"%d\",&n);\n\t for (i=0;itotle)\n\t\t\t\t totle=((x[a]-x[b])*(x[a]-x[b])+(y[a]-y[b])*(y[a]-y[b]));\n\t\t }\n\t }\n printf(\"%.4f\\n\",pow(totle,0.5));\n\treturn 0;\n}"} +{"label": "70", "index": "34535", "code": "int main()\n{\n\tfloat x[100],y[100];\n\tint n,i,j;\n\tdouble dis[100][100],Dis;\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=ben[i];}\n\tprintf(\"%.4lf\",max);\n}"} +{"label": "70", "index": "34537", "code": "int main(){\nint n;\nscanf(\"%d\",&n);\nint i,a=0;\nfloat x,y,x1,y1,x2,y2,x3,y3,x4,y4;\nfor(i=0;ix2){\nx2=x;\ny2=y;}\nif(yy4){\nx4=x;\ny4=y;\n}\n}\nfloat dis1,dis2,dis3,dis4,dis5,dis6,dis;\ndis1=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));\ndis=dis1;\ndis2=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));\nif(dis2>dis){\ndis=dis2;\n}\ndis3=sqrt((x4-x1)*(x4-x1)+(y4-y1)*(y4-y1));\nif(dis3>dis){\ndis=dis3;\n}\ndis4=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));\nif(dis4>dis){\ndis=dis4;\n}\ndis5=sqrt((x4-x2)*(x4-x2)+(y4-y2)*(y4-y2));\nif(dis5>dis){\ndis=dis5;\n}\ndis6=sqrt((x4-x3)*(x4-x3)+(y4-y3)*(y4-y3));\nif(dis6>dis){\ndis=dis6;\n}\nprintf(\"%.4f\\n\",dis);\nreturn 0;\n}\n\n"} +{"label": "70", "index": "34538", "code": "/*?????(x,y)????????????????*/\n\ndouble compare(double x[],double y[],int n)\n{\n\tint i,j;\n\tdouble m;\n\tfor(i=0;im)\n\t\t\t\tm=sqrt((x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]));\n\t\t}\n\t}\n\treturn m;\n}\n\nvoid main()\n{\n\tint n,k;\n\tdouble b[10],a[10];\n\tscanf(\"%d\",&n);\n\tfor(k=0;k>num;\n\tdouble max=0;\n\tfor(int i=0; i>numm[i][0]>>numm[i][1];\n\tfor(int i=0;imax) max=dis;\n\t\t}\n\n\t\tcout< MaxDis)\n\t\t\tMaxDis = t;\n\t}\n\tprintf(\"%.4lf\", sqrt(MaxDis));\n}\n\ndouble getMaxDis(int i)\n{\n\tint j;\n\tdouble MaxDis = 0, dx, dy;\n\tfor(j=0; j MaxDis)\n\t\t{\n\t\t\tMaxDis = dx + dy;\n\t\t}\n\t}\n\treturn MaxDis;\n}"} +{"label": "70", "index": "34541", "code": "main()\n{\n int i,j,n;\n scanf(\"%d\",&n);\n double*a=(double*)malloc(n*sizeof(double)); \n double*b=(double*)malloc(n*sizeof(double)); \n for(i=0;imax)? ((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j])):max; \n }\n printf(\"%.4lf\",sqrt(max));\n}\n"} +{"label": "70", "index": "34542", "code": "int main()//?????\n{\n\tint n,i,j;//??????n,i,j\n\tfloat distance=0;//??????distance????0\n\tfloat x[1024],y[1024],d[1024][1024],dis[1024][1024];//???????????????????\n\tcin>>n;//????n\n\tfor(i=0;i>x[i]>>y[i];\n\t}//??????\n\tfor(i=0;i> n;\n\n\tfor (i = 0; i < n; i++)\n\n\t{\n\n\t\tcin >> a[i][0] >> a[i][1];\n\n\t}\n\n\tdis = distance(a[0][0], a[0][1], a[1][0], a[1][1]);\n\n\twhile (k != n *(n - 1) / 2)\n\n\t{\n\n\t\tfor (i = 0; i < n; i++)\n\n\t\t{\n\t\t\tfor (j = i + 1; j < n; j++)\n\n\t\t\t{\n\n\t\t\t\tt = distance(a[i][0], a[i][1], a[j][0], a[j][1]);\n\n\t\t\t\tdis = (t > dis) ? t : dis;\n\n\t\t\t\tk++;\n\n\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tprintf(\"%.4f\\n\", dis);\n\n\treturn 0;\n\n}"} +{"label": "70", "index": "34544", "code": "int main()\n{\n\tint i,j,n;\n\tscanf(\"%d\",&n);\n\tdouble *x=(double *)malloc(sizeof(double)*n);\n\tdouble *y=(double *)malloc(sizeof(double)*n);\n\tdouble dis=0,temp;\n\tfor(i=0;i=0;r--){\n\t\tif(d[r]a)\na=b;}\n\n\t}a=(float)(a);\n\t\tprintf(\"%.4f\",a);\nreturn 0;\n}\n"} +{"label": "70", "index": "34547", "code": "void main()\n{\n\tdouble a[100][2],sum,d=0,m;\n\tint i,j,n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;id) d=sum;\n\t\t}\n\t\tprintf(\"%.4lf\",d);\n}\n\t "} +{"label": "70", "index": "34548", "code": "int main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tdouble *x,*y,*z;\n\tdouble s,*s1;\n\tx=(double *)malloc(sizeof(double)*n);\n\ty=(double *)malloc(sizeof(double)*n);\n z=(double *)malloc(sizeof(double)*n);\n s1=(double *)malloc(sizeof(double)*n);\n \tfor(i=0;is) {\n\t\t\t\ts=s1[j];\n\t\t}\n\t\tz[i]=s;\n\t}\n\t}\n int max=0; \n\tfor(i=0;iz[max])\n\t\t\tmax=i;\n\t}\n\tprintf(\"%.4lf\\n\",sqrt(z[max]));\n\treturn 0;\n}\n\n\t\t\n\n\n"} +{"label": "70", "index": "34549", "code": "double dis(float a,float b,float c,float d)\n{\n return (double)sqrt((a-c)*(a-c)+(b-d)*(b-d));\n}\nmain()\n{\n int n,i,j;\n float a[1000],b[1000],max=0.0;\n scanf(\"%d\",&n);\n for(i=0;imax?dis(a[i],b[i],a[j],b[j]):max;\n printf(\"%.4f\\n\" ,max);\n getchar();getchar();} \n"} +{"label": "70", "index": "34550", "code": "void main()\n{\n\tint n,i,j;\n\tdouble a[30],b[30],dis;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&a[i],&b[i]);\n\t}\n\tdis=sqrt((a[2]-a[1])*(a[2]-a[1])+(b[2]-b[1])*(b[2]-b[1]));\n for(i=1;i<=n-1;i++)\n\t{\n\t\tfor(j=i+1;j<=n;j++)\n\t\t{\n\t\t\tif(sqrt((a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i]))>dis)\n\t\t\t{\n\t\t\t\tdis=sqrt((a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i]));\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",dis);\n}"} +{"label": "70", "index": "34551", "code": "int main()\n{\n int n,i,j;\n scanf(\"%d\",&n);\n double a[100][2],temp,result=0;\n for(i=0;imax) max=s[i];\nprintf(\"%.4f\\n\",sqrt(max));\n}\n"} +{"label": "70", "index": "34553", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point{\n\t\tfloat x;\n\t\tfloat y;\n\t}point[100];\n\tint i;\n\tfor(i=0;imax)\n\t\t\tmax=b[i+1];\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n\n\t\t\n\t\t\n\n\n\t"} +{"label": "70", "index": "34554", "code": "void main()\n{\n\tfloat x[10],y[10];\n\tdouble dis,max=0,sum;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=0;imax)\n\t\t\t\tmax=dis;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n}\n"} +{"label": "70", "index": "34555", "code": "int main()\n{\n\tint n=0,k=0,i,j;\n\tcin>>n;\n\tdouble a[100][2]={0},d[1000]={0};\n\tfloat max=0;\n\tfor(i=0;i>a[i][0]>>a[i][1];\n\tfor(i=0;i=0;i--){\n\t\tfor (j=0;jmax){\n\t\t\tmax=distance[k];\n\t\t};\n\t\n\t};\n\tprintf(\"%.4f\\n\", (float)max);\n\treturn 0;\n}"} +{"label": "70", "index": "34557", "code": "int main()\n{\n int n,i,j,a=0;\n double x[100]={0.0},y[100]={0.0};\n double temp,max=0.0;\n scanf(\"%d\",&n);\n for(i=0;imax)\n\t\t {\n\t\t\t max=temp;\n\t\t }\n\t }\n }\n printf(\"%.4lf\",max);\n \treturn 0;\n}"} +{"label": "70", "index": "34558", "code": "int main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct{\n\t\tdouble x,y;\n\t}s[20];\n\tdouble max=0;\n\tint i,k;\n\tfor(k=0;kmax)\n\t\t\t\tmax=a[j][i];\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n}"} +{"label": "70", "index": "34560", "code": "\nvoid main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\n\tstruct\n\t{\n\t\tdouble x,y;\n\t}s[10];\n\n\tint j,i;\n\tdouble max,distance[100];\n\tmax = 0.0;\n\tfor(j=0;j0;i--)\n\t{\n\t\tfor(j=0;jmax)\n\t\t\t\tmax = distance[j];\n\t\t}\n\t}\n printf(\"%.4f\\n\",max);\n}"} +{"label": "70", "index": "34561", "code": "struct point\n{\n double x;\n double y;\n};\nint main()\n{\n int n,i,j;\n struct point *a;\n double maxd=0,d;\n scanf(\"%d\",&n);\n a=(struct point *)malloc(sizeof(struct point)*n);\n for (i=0;ix),&((a+i)->y));\n }\n for (i=0;ix-(a+j)->x)*((a+i)->x-(a+j)->x)+((a+i)->y-(a+j)->y)*((a+i)->y-(a+j)->y);\n if (d>maxd) maxd=d;\n }\n printf(\"%.4f\",sqrt(maxd));\n}\n\n"} +{"label": "70", "index": "34562", "code": "void main()\n{\n\tint i,j,n;\n\tdouble *x,*y,max,dis;\n\tscanf(\"%d\",&n);\n x=(double*)malloc(n*sizeof(double));\n\ty=(double*)malloc(n*sizeof(double));\n\tif(x==NULL || y==NULL) exit(-1);\n for(i=0;imax) max=dis;\n\t}\n\tprintf(\"%.4lf\\n\",max);\n}\n"} +{"label": "70", "index": "34563", "code": "\n\nint main()\n{\n\tint n,i,j,k;\n\tdouble point[100000][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=z;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n\t\t\t\n\n"} +{"label": "70", "index": "34564", "code": "main()\n{\nint n;\nscanf(\"%d\",&n);\nint i;\nfloat c[100][2];\nfor(i=0;if)\nf=juli[i];\nprintf(\"%.4f\",sqrt(f));\n}\n\n"} +{"label": "70", "index": "34565", "code": "int main()\n{\n\tint n;\n\tfloat x[1000],y[1000],max,b;\n\tcin>>n;\n\tfor(int i=0;i>x[i]>>y[i];\n\tmax=(x[0]-x[1])*(x[0]-x[1])+(y[0]-y[1])*(y[0]-y[1]);\n\tfor(int i=0;imax)\n\t\t\t\tmax=b;\n\t\t}\n\t}\n\tmax=sqrt(max);\n\tprintf(\"%.4f\\n\", max);\n\treturn 0;\n}"} +{"label": "70", "index": "34566", "code": "\nstruct po\n{\n\tdouble x;\n\tdouble y;\n};\n\nmain()\n{\n\tint n;\n\tint i,j;\n\tpo *a;\n\tdouble b;\n\tdouble *f;\n\tb=0.0;\n\tcin>>n;\n\ta=(struct po*)malloc(sizeof(po)*n);\n\tf=(double*)malloc(sizeof(double)*n*n);\n\tfor(i=0;i>a[i].x>>a[i].y;\n\t\n\tfor(i=0;ib)\n\t\t\tb=f[i*j];\n\t\t}\n\t}\n\t\n\tcout<max)\n\t\t max=k;\t \t\t\t\t\n }\n printf(\"%4.4f\",max);\n getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();\n} "} +{"label": "70", "index": "34569", "code": "int main()\n{\n\tint n,i,k;\n\tdouble x[9999],y[9999],l,m;\n\t scanf(\"%d\",&n);\n\t \n\t for(i=1;i<=n;i++)\n\t {\n scanf(\"%lf%lf\",&x[i],&y[i]);\n\t\t \n\t }\n l=sqrt((x[1]-x[2])*(x[1]-x[2])+(y[1]-y[2])*(y[1]-y[2]));\n for(i=1;i<=n;i++)\n\t {\n \n\t\t\n\t\t\tfor(k=i+1;k<=n;k++)\n\t\t\t{\n\t\t\t m=sqrt((x[i]-x[k])*(x[i]-x[k])+(y[i]-y[k])*(y[i]-y[k]));\n\t\t\t if(m>l) l=m;\n\t\t\t \n\t\t\t \n\t\t\t}\n\t\t\n\t }printf(\"%.4lf\\n\",l);\n\t return 0;\n}\n\n"} +{"label": "70", "index": "34570", "code": "int main()\n{\n\tint n, i, j;\n\tdouble dis, x[100], y[100];\n\tcin >> n;\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tcin >> x[i] >> y[i];\n\t}\n\tdis = sqrt((x[1] - x[0]) * (x[1] - x[0]) + (y[1] - y[0]) * (y[1] - y[0]));\n\tfor(i = 0; i <= n - 2; i++)\n\t{\n\t\tfor(j = i + 1; j <= n - 1; j++)\n\t\t{\n\t\t\tif(sqrt((x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i])) > dis)\n\t\t\t{\n\t\t\t\tdis = sqrt((x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i]));\n\t\t\t}\n\t\t}\n\t}\n\tcout << fixed << setprecision(4) << dis << endl;\n\treturn 0;\n}"} +{"label": "70", "index": "34571", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a[100][2], b,c=0;\n\tscanf(\"%d\", &n);\n\tfor (i=0;imax){\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34573", "code": "int main()\n{\n\tint i,j,n;\n\tdouble num[100][2];\n\tcin>>n;\n\tfor(i=0;i>num[i][0]>>num[i][1];\n\t}\n\tdouble max=0,dis=0;\n\tfor(i=0;imax)\n\t\t\t\tmax=dis;\n\t\t}\n\t\tcout<max)\n max=mid;\n }\n }\n \n printf(\"%.4f\\n\",max);\n\n return 0;\n}"} +{"label": "70", "index": "34575", "code": "int main()\n{ \n\tint n,j,k,l;\n double x0,y0,s=0,w;\n\tstruct dian { double x,y;} *d;\n\tscanf(\"%d\",&n);\n\td=(struct dian *) malloc(sizeof(dian)*n);\n\tfor(j=0;jx=x0;\n\t\t(d+j)->y=y0;\n\t\n\t}\n\tfor(l=0;lx-(d+k)->x)*((d+l)->x-(d+k)->x)+((d+l)->y- (d+k)->y)*((d+l)->y-(d+k)->y);\n\t\t\tif(s>n;\n double far=0,dis=0;\n double point[n][2];\n for(i=0;i>point[i][1];\n cin>>point[i][2];\n }\n for(i=0;i=far)far=dis;\n }\n }\n printf(\"%.4f\\n\",far);\n \n return 0;\n }\n \n \n"} +{"label": "70", "index": "34577", "code": "\nint main(int argc, char* argv[])\n{float a[100][2],max=0.0,d;\ndouble tmp;\nint i,n,j;\nscanf(\"%d\",&n);\nfor(i=0;imax)max=d;\n\t}\n}\n\nprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34578", "code": "\nvoid main()\n{\n\tint n;\n\tint i,j;\n\tdouble s,d;\n\tdouble * a;\t\n\tscanf(\"%d\",&n);\n\ta=(double *)malloc(2*n*sizeof(double));\n\t\n\tfor(i=0;id) d=s;\n\t\t}\n\t}\n\n\td=sqrt(d);\n\n\tprintf(\"%.4lf\",d);\n}"} +{"label": "70", "index": "34579", "code": "int main()\n{\n int i,j,k,m=0,n;\n double b[10000]={0},max;\n scanf(\"%d\",&n);\n struct point\n {\n float x;\n float y;\n };\n struct point *p;\n p=(struct point*)malloc(sizeof(point)*n);\n for(i=0;ix,&(p+i)->y);\n for(i=0;ix-(p+j)->x)*((p+i)->x-(p+j)->x)+((p+i)->y-(p+j)->y)*((p+i)->y-(p+j)->y);\n\n b[m]=(double)sqrt(b[m]);\n m++;\n }\n }\n max=b[0];\n for(i=0;imax)\n {\n max=b[i];\n\n }\n }\n\n printf(\"%.4f\\n\",max);\n free(p);\n}\n\n\n\n"} +{"label": "70", "index": "34580", "code": "void main()\n{\n\tint n,i,j,k=0;\n\tdouble a[100][2],b[100],temp;\n scanf(\"%d\",&n);\n\tfor(i=0;ib[i+1])\n\t\t{\n\t\t\ttemp=b[i];\n\t\t\tb[i]=b[i+1];\n\t\t\tb[i+1]=temp;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",b[k-1]);\n}"} +{"label": "70", "index": "34581", "code": "int main()\n{\n int n,i,j;\n double x,y,s=0;\n double a[100000][2];\n scanf(\"%d\",&n);\n for(i=0;idis){dis=m;}\n\t\t}\n\t}\n\tdis=sqrt(dis);\n\tprintf(\"%.4lf\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34584", "code": "int main()\n{\n\tstruct point\n\t{\n\t\tdouble x;\n\t\tdouble y;\n\t}p[50];\n\tdouble dis[100],fdis=0;\n\tint m=0,n=0,a,b,c,i;\n\tdo{\n\t\tdis[n]=0;\n\t\tn++;\n\t}while(n<100);\n\tscanf(\"%d\",&n);\n\tdo{\n\t\tscanf(\"%lf%lf\",&p[m].x,&p[m].y);\n\t\tm++;\n\t}while(mfdis)fdis=dis[m];\n\t\t\tm++;\n\t\t}while(mlongestd)longestd=d;\n }\n\t}\n printf(\"%.4lf\\n\",longestd);\n\tfree(x);\n\tfree(y);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34588", "code": "int main()\n{\n\tint m;\n\tcin>>m;\n\tdouble x[10000],y[10000];\n\tfor(int i=0;i>x[i]>>y[i];\n\tdouble max,z;\n\tmax=0.0;\n\tfor(int k=0;kD)\n\t\t\t\t {D=d;}\n\t\t\t }\n\t\t }\n\t }\n\t printf(\"%.4lf\\n\",sqrt(D));\n\n\treturn 0;\n}"} +{"label": "70", "index": "34590", "code": "int main()\n{\n\tint n,i,j,l=0;\n\tscanf(\"%d\",&n);\n\tdouble *p;\n\tint k;\n\tk=(n-1)*n/2;\n\tp=(double *)malloc(sizeof(double)*(k+1));\n\tstruct point\n\t{double x;\n\tdouble y;\n\t}point[100];\n\n\tfor(i=0;ip[k])\n\t\t\tp[k]=p[i];\n\t}\n\tprintf(\"%.4f\",p[k]);\n\n\tfree(p);\n\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34591", "code": "main()\n{\n int n;\n double a[100][2],k=0,p;\n scanf(\"%d\",&n);\n for(int i=0;ik) k=p;\n }\n } \n printf(\"%.4lf\",k);\n}\n"} +{"label": "70", "index": "34592", "code": "int main()\n{\n\tint n;\n\tcin >> n;\n\tdouble x[101], y[101];\n\tfor(int i = 1; i <= n; i ++)\n\t{\n\t\tcin >> x[i] >> y[i];\n\t}\n\tdouble dis[101][101];\n\tdouble max = 0;\n\tfor( int i = 1; i <= n-1; i++)\n\t{\n\t\tfor(int j = i + 1; j <= n; j++)\n\t\t{\n\t\t\tdis[i][j] = (x[i] - x[j])*(x[i] - x[j]) + (y[i] - y[j])*(y[i] - y[j]);\n\t\t\tdis[i][j] = sqrt ( dis[i][j] );\n\t\t\tif( dis[i][j] > max )\n\t\t\t\tmax = dis[i][j];\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\", max);\n\treturn 0;\n}"} +{"label": "70", "index": "34593", "code": "int main()\n{\n\tstruct tops\n\t{\n\t\tdouble x;\n\t\tdouble y;\n\t}tops[100];\n\tdouble a,b;\n int n;\n scanf(\"%d\",&n);\n int i,j;\n double dis1;\n double dis2=0.0;\n for(i=1;i<=n;i++)\n {\n\t scanf(\"%lf %lf\",&a,&b);\n\t tops[i].x=a;\n\t tops[i].y=b;\n\t \n\t for(j=1;j<=i;j++)\n\t {\n\t dis1=sqrt((tops[i].x-tops[j].x)*(tops[i].x-tops[j].x)+(tops[i].y-tops[j].y)*(tops[i].y-tops[j].y));\n\t if(dis1>dis2)\n\t {\n\t\t dis2=dis1;\n\t }\n\t }\n }\n printf(\"%.4lf\",dis2);\n return 0;\n}\n\n"} +{"label": "70", "index": "34594", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,t,k;\n\tdouble a[100],b[100],max=0,c;\n\tscanf(\"%d\",&n);\n\tfor (k=0;kmax)\n\t\t\t\tmax=c;\n\t\t}\n\t}\n\n\n\t\tprintf(\"%.4lf\\n\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34595", "code": "int main()\n{\n\tint n;\n\tdouble x[50],y[50],*px,*py,*px2,*py2,temp,max;\n\tscanf(\"%d\",&n);\n\tfor(px=x,py=y;px>n;//??????\n\tfor(int i=0;i>str[i][0]>>str[i][1];//????\n\tfor(int i=0;i=dis) dis=dist;\n\t\t}\n }\n\n\t\n\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34598", "code": "int main()\n{\n double a[100][2];\n double max=0,distance=0;\n int n,i,j;\n cin>>n;\n for (i=0;i>a[i][j];\n }\n for (i=0;imax) max=distance;\n }\n }\n printf(\"%.4f\\n\",max);\n return 0;\n}"} +{"label": "70", "index": "34599", "code": "void main(int argc, char* argv[])\n{\n\tint i,j,n;\n\tscanf(\"%d\",&n);\n\tdouble *x,*y;\n\tx=(double*)malloc(sizeof(double)*n);\n\ty=(double*)malloc(sizeof(double)*n);\n\tdouble dis,d;\n\tfor(i=0;idis)\n\t\t\t{\n\t\t\t\tdis=d;\n\t\t\t}\n\t\t}\n\t}\n\tfree(x);\n\tfree(y);\n\tprintf(\"%.4lf\\n\",dis);\n}"} +{"label": "70", "index": "34600", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tdouble dis[num];\n\tdouble max[num];\n\tdouble distance=0;\n\tmax[0]=0;\n\tscanf(\"%d\",&n);\n\tstruct{\n\t\tdouble x,y;\n\t}point[num];\n\tfor(i=0;imax[i])\n\t\t\t\tmax[i]=dis[j];\n\t\t}\n\t}\n\tfor(i=0;idistance)\n\t\t\tdistance=max[i];\n\t}\n\tprintf(\"%.4lf\",distance);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34601", "code": "int main(int argc, char* argv[])\n{\nint j,i,n;\ndouble d,maxd=0;\nstruct\n{double x,y;}pl[100];\n\nscanf(\"%d\",&n);\nfor(i=0;imaxd)\nmaxd=d;\n}\n}\nprintf(\"%.4lf\\n\",maxd);\n\n\n\treturn 0;\n}"} +{"label": "70", "index": "34602", "code": "//????\nint main()\n{\n\tdouble a[100][2],max=0.0,dis;\n\tint n,i,j;\n\tcin>>n;\n\tfor (i=0;i>a[i][0]>>a[i][1];\n\t}\n\tfor (i=0;imax)\n\t\t\t\tmax=dis;\n\t\t}\n\t}\n\tcout<s) s=d;\n }\n free(x);\n free(y);\n printf(\"%.4lf\\n\",s);\n return 0;\n}\n"} +{"label": "70", "index": "34604", "code": "int main() \n{\n\tint n=0,i=0,j=0; //????\n\tdouble L=0;\n\tcin>>n;\n\tdouble x[n],y[n];\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(i=0;iL)\n\t\t\t\tL=pow(pow(x[j]-x[i],2.0)+pow(y[j]-y[i],2.0),0.5);\n }\n\tprintf(\"%.4f\\n\",L); //???????\n return 0;\n}\n"} +{"label": "70", "index": "34605", "code": "\n\nvoid main()\n{\n\tint n,i,j;\n\tdouble a[101][101],c[101],d[101],max;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{scanf(\"%lf %lf\",&c[i],&d[i]);}\n\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\ta[i][j]=sqrt((c[i]-c[j])*(c[i]-c[j])+(d[i]-d[j])*(d[i]-d[j]));\n\t\t}\n\t}\n\n\tmax=0;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>max ) \n\t\t\t\tmax=a[i][j];\n\t\t}\n\t}\n\n\tprintf(\"%.4lf\\n\",max);\n}"} +{"label": "70", "index": "34606", "code": "int main()\n{\n\tint n,i,k;\n\tdouble a[100],b[100],dis,fang=0,t;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t\tscanf(\"%lf%lf\",&a[i],&b[i]);\n for(k=1;k=d)\n\t\t d=l;\n\t\t \n\t }\n }\n printf(\"%.4lf\",d);\n \n \n\treturn 0;\n}\n\n\n"} +{"label": "70", "index": "34608", "code": "\nint main()\n{\n\tint n,i,j;\n\tdouble A[100][2],s,max=0;\n\tscanf(\"%d\",&n);\n\tfor (i=0;imax)\n\t\t\t\tmax=s;\n\t\t}\n\t\n printf(\"%.4lf\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34609", "code": "int main(int argc, char* argv[])\n{\n int n;\n\tscanf(\"%d\",&n);\n\tint i,j;\n\tfloat dis=0,x=0;\n struct point{\n\t\tdouble x,y;\n\t};\n\tstruct point *pt;\n pt=(struct point *) malloc(sizeof(point) * n);\n\tfor (i=0;ix=x1;\n\t\t(pt+i)->y=y1;\n\t}\n for (i=0;ix-(pt+j)->x)*((pt+i)->x-(pt+j)->x)+((pt+i)->y-(pt+j)->y)*((pt+i)->y-(pt+j)->y));\n\t\t\tif (x>dis) {\n\t\t\t\tdis=x;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdis=dis;\n\t\t\t}\n\t\t}\n\t}\n printf(\"%.4f\",dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34610", "code": "int main()\n{\n\tint n;\n\tfloat num[100][2];\n\tcin>>n;\n\tfor(int i=0;i>num[i][0]>>num[i][1];\n double max=0.0;\n\tfor(int i=0;imax) max=l;\n\t\t}\n\t}\n\tcout<dis[j+1])\n\t\t\t{\n\t\t\t\tq=dis[j];\n\t\t\t\tdis[j]=dis[j+1];\n\t\t\t\tdis[j+1]=q;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",dis[m-1]);\n}\n"} +{"label": "70", "index": "34612", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tdouble a[100],b[100];\n\tint i,j;\n\tdouble c[100][100];\n\tfor (i=0;i>a[i]>>b[i];\n\tfor (i=0;im)\n\t\t\t\tm=c[i][j];\n\t\t}\n\tcout<1e-6)\n\t\t\t\tmax = temp;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n}"} +{"label": "70", "index": "34614", "code": "int main()\n{\n\tint n;\n\tcin >> n;\n\tstruct v{double x; double y;} a[2005];\n\tdouble maxd = 0;\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tcin >> a[i].x >> a[i].y;\n\t\tfor (int j = 0; j < i; j++)\n\t\t{\n\t\t\tdouble num = sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x) + (a[i].y-a[j].y)*(a[i].y-a[j].y));\n\t\t\tif (num > maxd) maxd = num;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", maxd);\n}"} +{"label": "70", "index": "34615", "code": "main()\n{\n int n;\n double d=0,s;\n scanf(\"%d\",&n);\n int m;\n m=n*(n-1)/2;\n double *a=(double *)malloc(n*sizeof(double));\n double *b=(double *)malloc(n*sizeof(double));\n double *p=(double *)malloc(m*sizeof(double));\n int i,j;\n for(i=0;id)\n d=s;\n }\n printf(\"%.4f\",d);\n \n \n}"} +{"label": "70", "index": "34616", "code": "int main()\n{\n int n,i,j; \n struct point\n {\n double x,y;\n }p[1000]; \n scanf(\"%d\",&n);\n for(i=0;i>n;\nfor(i=0;i<=n-1;){\n\tcin>>dian[i][0]>>dian[i][1];\n\ti++;\n}\nfor(i=0;i<=n-1;i++){\n\tfor(j=0;j<=n-1;j++){\n\t\tcha=sqrt((dian[i][0]-dian[j][0])*(dian[i][0]-dian[j][0])+(dian[i][1]-dian[j][1])*(dian[i][1]-dian[j][1]));\n\t\tif(cha>=temp)temp=cha;\n\t}\n}\ncout<s)s=t;\n\t\t}\n\tprintf(\"%.4lf\",s);\n\tprintf(\"\\n\");\n}"} +{"label": "70", "index": "34619", "code": "int main()\n{\n\tdouble a[100], b[100], c[10000];\n\tint n = 0, k = 0;\n\tcin >> n;\n\tint i = 0, j = 0, sum = 0;\n\tdouble max = 0;\n\tfor(i = 0; i <= n - 1; i++) \n\t{\n\t\tcin >> a[i] >> b[i];\n\t}\n\tfor(i = 0; i <= n - 1; i++)\n\t{\n\t\tfor(j = 0; j <= n - 1; j++)\n\t\t{\n\t\t\tif(i != j)\n\t\t\t{\n\t\t\t\tc[k] = sqrt(pow(a[i] - a[j], 2) + pow(b[i] - b[j], 2));\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tsum = k;\n\tmax = c[0];\n\tfor(i = 0; i <= sum; i++)\n\t{\n\t\tif(max < c[i])\n\t\t\tmax = c[i];\n\t}\n\tcout << setprecision(4) << fixed << max << endl;\n\treturn 0;\n}"} +{"label": "70", "index": "34620", "code": "int main()\n{\n\tint n,i,j,t=0;\n\tcin>>n;\n\tdouble a[100][2],k[10000],p=0;\n\tfor ( i = 0 ; i < n ; i ++ )\n\t\tcin>>a[i][0]>>a[i][1];\n\tfor ( i = 0 ; i < n ; i ++ )\n\t{\n\t\tfor ( j = i + 1 ; j < n ; j ++ )\n\t\t{\n\t\t\tk[t++] = sqrt(( a[i][0] - a[j][0] )*( a[i][0] - a[j][0] ) + ( a[i][1] - a[j][1] )*( a[i][1] - a[j][1] ));\n\t\t}\n\t}\n\tfor ( i = 0 ; i < t ; i ++ )\n\t{\n\t\tif (k[i]>p)\n\t\t\tp=k[i];\n\t}\n\tprintf(\"%.4f\\n\", p);\n}\n\n\n"} +{"label": "70", "index": "34621", "code": "\n\nint main() \n{\n\tint n, i, j;\n\tdouble x[1000], y[1000], ll[1000][1000]={{0},{0}}, l[1000]={0}, dis=0;\n\tscanf( \"%d\", &n );\n\tfor( i=0; i dis )\n\t\t {\n\t\t\tdis = ll[i][j];\n\t\t }\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\n\treturn(0);\n} \n"} +{"label": "70", "index": "34622", "code": "void main()\n{\n\tint i,j;\n\tint n;\n\tdouble d,max=0,x[100],y[100];\n\tdouble distance(double x1,double y1,double x2,double y2);\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t{max=d;}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n}\ndouble distance(double x1,double y1,double x2,double y2)\n{\n\tdouble dis;\n\tdis=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\treturn(dis);\n}"} +{"label": "70", "index": "34623", "code": "int main()\n{\n\tint n,i,j,k=0;\n\tfloat x[100]={0},y[100]={0},sum[100]={0},max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=sum[k];\n\t\t\tk++;\n\t\t}\n\t\tprintf(\"%.4f\",sqrt(max));\n\t\treturn 0;\n}"} +{"label": "70", "index": "34624", "code": "//************************//\n//*? ? ??????.cpp*//\n//*? ????? *//\n//*?????????? *//\n//************************//\nint main() //???\n{\n int n; //???????????n\n cin>>n; //?????n\n double x[100],y[100]; //???????????x???y??\n double dis=0.0000,distemp=0.0000; //??????????dis?distemp\n int i=0,j=0;\n for (i=0;i>x[i]>>y[i]; //???????????????\n if(i>0)\n {\n\t for(j=0;jdis) //??distemp>dis\n\t dis=distemp; //?distemp????dis\n\t }\n }\n }\n printf(\"%.4f\\n\", dis); //??dis??????????4?\n return 0;\n}"} +{"label": "70", "index": "34625", "code": "int main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble p1[100],p2[100],dism=0,dis;\n\tfor(int k=0;kdism)\n\t\t\t{\n\t\t\t\tdism=dis;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",dism);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34626", "code": "int main()\n{\n\tint i,j,n;\n\tdouble max=0,dis2,dis;\n\tstruct point {\n\t\tdouble x;\n\t\tdouble y;\n\t}points[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&points[i].x,&points[i].y);\n\t}\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\t\tdis2=(points[i].x-points[j].x)*(points[i].x-points[j].x)+(points[i].y-points[j].y)*(points[i].y-points[j].y);\n\t\t\tif(dis2>max)\n\t\t\t{\n\t\t\t\tmax=dis2;\n\t\t\t}\n\t\t}\n\t}\n\tdis=pow(max,0.5);\n\tprintf(\"%.4lf\\n\",dis);\n\treturn 0;\n}\n\t"} +{"label": "70", "index": "34627", "code": "main()\n{\n int n,k=0;\n scanf(\"%d\",&n);\n float a[n],b[n],d[10000],max=0;\n for(int i=0;i<10000;i++)\n d[i]=0;\n for(int i=0;imax)\n max=d[i];\n }\n printf(\"%.4f\",max);\n}"} +{"label": "70", "index": "34628", "code": "const int MAX=100;\n\nint main()\n{\ndouble x[MAX], y[MAX];\nint n;\ndouble maxLength=0;//??????\n\ncin>>n;\nfor(int i=0;i>x[i]>>y[i];\n\ndouble length=0;\nfor(int i=0;imaxLength)\nmaxLength=length;\n}\ncout<0;b--){\n\t\tfor(a=0;a=max )\n max=( (x[j]-x[k])*(x[j]-x[k])+(y[j]-y[k])*(y[j]-y[k]) );\n }\n printf(\"%.4lf\",sqrt(max));\n\n}\n"} +{"label": "70", "index": "34633", "code": "int main()\n{\n\tint n,i,j,a=0;\n\tscanf(\"%d\",&n);\n\tdouble *x,*y,*z;\n\tdouble s,*s1;\n\tx=(double *)malloc(sizeof(double)*n);\n\ty=(double *)malloc(sizeof(double)*n);\n z=(double *)malloc(sizeof(double)*n);\n s1=(double *)malloc(sizeof(double)*n);\n \tfor(i=0;is) {\n\t\t\t\ts=s1[j];\n\t\t}\n\t\tz[i]=s;\n\t}\n\t}\n int max=0; \n\tfor(i=0;iz[max])\n\t\t\tmax=i;\n\t}\n\tprintf(\"%.4lf\\n\",sqrt(z[max]));\n\treturn 0;\n}\n\n\t\t\n\n\n"} +{"label": "70", "index": "34634", "code": "void main()\n{\nint n,i,j;\nfloat a[100],b[100],dis=0;\nscanf(\"%d\",&n);\nfor(i=0;i>n;\n\tfor(i=0;i>a[i][1]>>a[i][2];\n\tfor(j=1;j>n;\n double max=0;\n for(int i=0;i>x[i]>>y[i];\n for(int j=0;jdis)\n\t\t\t{\n\t\t\t\tdis=len;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34639", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tcin>>n;\n\tdouble ju,o;\n\tdouble a[100],b[100];\n\tfor(i=0;i>a[i]>>b[i];\n\t}\n\tdouble juli(double m,double n,double x,double y);\n\tdouble max(double m,double n);\n\tju=0;\n\tfor(i=0;in) z=m;\n\telse z=n;\n\treturn z;\n\n}"} +{"label": "70", "index": "34640", "code": "int main()\n{\n int n,p,q;\n double x[1000],y[1000],temp[1000];\n cin>>n;\n for (p=1;p<=n;p++)\n\t{\ncin>>x[p]>>y[p];\n\t}\n double dis;\n dis=0;\n int t;\n t=1;\n for(p=1;p<=n;p++)\n\t{\n for(q=1;q<=n;q++)\n\t{\ntemp[t]=sqrt((x[p]-x[q])*(x[p]-x[q])+(y[p]-y[q])*(y[p]-y[q]));\n if (dismax)\n\t\t\t\tmax=d[j][i];\n\t\t}\n\t}\n\tdistance=sqrt(max);\n\tprintf(\"%.4f\\n\",distance);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34642", "code": "\n\n\nvoid main(int argc, char* argv[])\n{int n,i,j;\nfloat x[100],y[100];\ndouble dis,temp=0;\nscanf(\"%d\",&n);\nfor(i=0;it)\n\t\t\tt=dis[i];\n\tprintf(\"%.4lf\\n\",t);\n\treturn 0;\n} "} +{"label": "70", "index": "34645", "code": "void main()\n{\n\tstruct point\n\t{\n\t\tfloat x;\n\t\tfloat y;\n\t}m[50];\n\tint n,i,j;\n\tdouble s,max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tfor(int i=0;i<=n-1;i++)\n\t\tfor(int j=0;j<=1;j++)\n\t\t\tcin>>a[i][j];\n\n\tdouble z=0;\n\tfor(int k=0;k<=n-2;k++)\n\tfor(int l=k+1;l<=n-1;l++)\n\t{\n\t\tdouble s=sqrt(pow((a[k][0]-a[l][0]),2)+pow((a[k][1]-a[l][1]),2));\n\t\t\tif(zi;j--)\n\t\t{\n\t dis[num]=sqrt((point[i].x -point[j].x)*(point[i].x -point[j].x) +(point[i].y-point[j].y)*(point[i].y-point[j].y));\n\t num++;\n\t\t}\n\t}\t \n\tfor(i=0;idis[i+1])\n\t\t{\n\t\tt= dis[i+1];\n\t\tdis[i+1]=dis[i];\n\t\tdis[i]=t;\n\t\t}\n\t\telse;\n\t}\n\t\tprintf(\"%.4lf\",dis[num]);\n return 0;\t\n}"} +{"label": "70", "index": "34648", "code": "void main()\n{\n\tdouble a[20][2],m[20],max;\n\tint i,j,n,p;\n\tscanf(\"%d\",&n);\n\tfor (i=0;idis)\n {\n dis=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n } \n } \n }\n printf(\"%.4f\\n\",dis);\n free(x);\n free(y);\n return 0;\n}"} +{"label": "70", "index": "34650", "code": "int main()\n{\n\tint n,i,e;\n\tdouble a[100],b[100],d[100],max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i--)\n\t{\n\t\tfor(e=0;emax)\n\t\t\t{\n\t\t\t\tmax=d[e];\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",sqrt(max));\n\treturn 0;\n}"} +{"label": "70", "index": "34651", "code": "int main()\n{\n struct point{\n double x,y;}\n tope[80];\n int i,j,n;\n scanf(\"%d\",&n);\n double s,a=0.0;\n for(i=0;ia||s==a) \n {\n a=s;\n }\n }\n}\n printf(\"%.4f\\n\",sqrt(a));\n return 0;\n}"} +{"label": "70", "index": "34652", "code": "double a[100],t[100];\nint main()\n{\n\tint i,k,s,u=0;\n\tscanf(\"%d\",&s);\n\tdouble l,p=0;\n\tfor(i=0;i=p)p=l;\n\t\t\t\t\n\t\t\t}u++;\n\t\t}\n\tprintf(\"%.4lf\",p);\nreturn 0;\n}"} +{"label": "70", "index": "34653", "code": "void main()\n{\n\tint n,i,j;\n\tdouble a[100][2],max,dis;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=dis;\n\t\t}\n\t}\n\tmax=sqrt(max);\n\tprintf(\"%.4lf\\n\",max);\n}\n\n\n"} +{"label": "70", "index": "34654", "code": "main()\n{\n int n,i,j;\n float x[20],y[20];\n double t;\n double dis=0;\n scanf(\"%d\",&n);\n for(i=0;i=dis)\n dis=t; \n } \n }\n printf(\"%.4f\\n\",dis);\n getchar();getchar();getchar();getchar();\n}\n"} +{"label": "70", "index": "34655", "code": "int main() {\n\tint n;\n\tcin >> n;\n\tdouble max = 0;\n\tdouble x[100], y[100];\n\tfor ( int i =1; i <= n; i ++ ){\n\t\tcin >> x[i] >> y[i];\n\t}\n\tfor ( int i =1; i <= n - 1; i ++ ){\n\t\tfor ( int j =i + 1; j <= n; j ++ ){\n\t\t\tif ( sqrt( ( x[i] - x[j] ) * ( x[i] - x[j] ) + ( y[i] - y[j] ) * ( y[i] - y[j] ) ) > max ) \n\t\t\t\tmax = sqrt( ( x[i] - x[j] ) * ( x[i] - x[j] ) + ( y[i] - y[j] ) * ( y[i] - y[j] ) );\n\t\t}\n\t}\n\tcout << fixed << setprecision(4) << max << endl;\n\treturn 0;\n}\n"} +{"label": "70", "index": "34656", "code": "int main( ) //?????\n{ //?????\n\tint i,j,n; //????\n\tdouble max_dis=0; //????????\n\tdouble a[100][2],dis[100][100]; //??????\n\tcin >>n; //????\n\tfor(i=1;i<=n;i++) //?????????\n\t\tcin >>a[i][0] >>a[i][1];\n\tfor(i=1;i<=n;i++) //???????????\n\t\tfor(j=i+1;j<=n;j++)\n\t\t\tdis[i][j]=sqrt((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]));\n\tfor(i=1;i<=n;i++) //???????????\n\t\tfor(j=i+1;j<=n;j++)\n\t\t\tif(dis[i][j]>max_dis) {max_dis=dis[i][j];}\n\tprintf(\"%.4f\\n\", max_dis); // ?????????????4?\n return 0; //???????????????????\n} //????"} +{"label": "70", "index": "34657", "code": "int main()\n{\n\tint n,i,j,k=0;double d[20][2],jl[200],t; //????????????\n\tcin >> n; //?????\n\tfor(i=0;i> d[i][0] >> d[i][1];\n\t}\n\tfor(i=0;it)\n\t\t\tt=jl[i];\n\t}\n\tprintf(\"%.4f\\n\",t);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34658", "code": "\n\nint main(int argc, char* argv[])\n{int k,n,i;\ndouble b;\ndouble dis;\n\nscanf(\"%d\",&n);\nstruct point{\n\tdouble x;\n\tdouble y;};\nstruct point d[score];\nfor(i=0;idis)dis=b;}\n}dis=(float)(dis); \nprintf(\"%.4f\",dis);\nreturn 0;\t\n}"} +{"label": "70", "index": "34659", "code": "int main(int argc, char* argv[])\n{\n double *p,*j;\n\tint k;\n\tscanf(\"%d\\n\",&k);\n\tp=(double*)malloc(sizeof(double)*k);\n j=(double*)malloc(sizeof(double)*k);\n\tint i;\n\tfor (i=0;il)\n\t\t\tl=g;\n\t\telse\n\t\t\tl=l;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",l);\n\treturn 0;\n\tfree(p);\n\tfree(j);\n}\n\n"} +{"label": "70", "index": "34660", "code": "\nint main()\n{\n int n,i,j;\n cin>>n;\n\n double a[n],b[n];\n double distance[n][n];\n for(i=1;i<=n;i++)\n{\n cin>>a[i]; \n cin>>b[i]; }\n \n for(j=1;j<=n;j++) \n {\n for(i=1;i<=n;i++)\n {\n distance[j][i]=sqrt((double)(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j])); \n }\n }\n double longest=0.0;\n for(j=1;j<=n;j++)\n { \n for(i=1;i<=n;i++)\n {\n if(distance[j][i]>longest) \n longest=distance[j][i]; \n }\n }\n printf(\"%.4f\\n\", longest);\n \nreturn 0;\n}"} +{"label": "70", "index": "34661", "code": "double f(double x1,double y1,double x2,double y2)\n{\n\tdouble d;\n\td=sqrt(pow((x1-x2),2)+pow((y1-y2),2));\n\treturn(d);\n}\nvoid main()\n{\n\tint i,j,n;\n\tdouble dis;\n\tdouble x[100],y[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;idis)\n\t\t\t{\n\t\t\t\tdis=f(x[i],y[i],x[j],y[j]);\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",dis);\n}\n"} +{"label": "70", "index": "34662", "code": "int main(){\n\tdouble x[100],y[100],d[5000],max=0;//?????x?y???????d???????max??????\n int n;//??????\n\tcin>>n;//??????\n\tfor (int i=1;i<=n;i++)\n\t\tcin>>x[i]>>y[i];//??????\n\tfor (int i=1;i<=n-1;i++)//????????????\n\t\tfor(int j=i+1;j<=n;j++){\n\t\t\td[(2*n-i)*(i-1)/2+j-i]=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);//???????\n\t\t\tif(d[(2*n-i)*(i-1)/2+j-i]>max)//??????????\n\t\t\t\tmax=d[(2*n-i)*(i-1)/2+j-i];//?????????\n\t\t}\n\tmax=sqrt(max);//??????\n\tcout<large)\n\t\t{\n\t\t\tlarge=dis;\n\t\t}\n\t}\n\t\t}\n\n\tprintf(\"%.4f\\n\",large);\n\n\treturn 0;\n\n\t\n}\n\n"} +{"label": "70", "index": "34664", "code": "main()\n{ \n int n,i,j;\n float *a=(float*)malloc(n*sizeof(float));\n float *b=(float*)malloc(n*sizeof(float));\n float d,t,max;\n max=0;\n scanf(\"%d\",&n);\n for(i=0;i=max)\n {\n max=d;\n }\n else\n {max=max;}\n }\n }\n printf(\"%.4f\",max); \n}\n \n\n \n\n\n\n\n\n\n \n \n"} +{"label": "70", "index": "34665", "code": "\nint main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble x[100];\n\tdouble y[100];\n\tint i,k;\n\tdouble max=0;\n\tdouble j;\n\tfor(i=0;imax)\n\t\t\t\tmax=j;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34666", "code": "int main(){\n\tint n,i,j,g;\n\tfloat x,y,t=0;\n\tscanf(\"%d\",&n);\n\tfloat a[100],b[100],c=0,d;\n\tfor(i=0;ic)\n\t\t\t\tc=d;\n }\n }\n\n\tprintf(\"%.4f\",c);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34667", "code": "\nint main()\n{\n double temp=0,sum=0;\n\tdouble pt[256][2]={0};\n\tint n=0,i=0,j=0,k=0;\n\tscanf(\"%d\",&n);\n\tfor (i=0;imax)\n\t\t\t\t\tmax=c;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34669", "code": "double dis(double x1,double y1,double x2,double y2)\n{\n\tdouble dis;\n\tdouble x=pow(x2-x1,2);\n\tdouble y=pow(y2-y1,2);\n\tdis=sqrt(x+y);\n\treturn dis;\n\treturn 0;\n}\n\nint main()\n{\n\tdouble x[100],y[100];\n\tint n;\n\tcin>>n;\n\tint i,j;\n\tfor(i=0;i>x[i]>>y[i];\n\tdouble p=0;\n\tfor(i=0;ip)\n\t\t\t\tp=dis(x[i],y[i],x[j],y[j]);\n\t}\n printf(\"%.4f\\n\",p);\n\treturn 0;\n}"} +{"label": "70", "index": "34670", "code": "main()\n{\n int n;\n scanf(\"%d\",&n);\n double x[100],y[100];\n int i,j;\n for (i=0;i=t)\n {\n t=d;\n }\n }\n }\n printf(\"%.4lf\\n\",t);\n}\n "} +{"label": "70", "index": "34671", "code": "typedef struct point\n{\n\tfloat x;\n\tfloat y;\n}point;\n\nint main()\n{\n\tint i,j,num;\n\tpoint a[50];\n\tdouble dis=0,d;\n\tscanf(\"%d\",&num);\n\tfor(i=0;idis)\n\t\t\t\tdis=d;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",sqrt(dis));\nreturn 0;\n}"} +{"label": "70", "index": "34672", "code": "int main()\n{\n\tint i,n,j;\n\tdouble a[100][2],d[100][100],m=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;im) m=d[i][j];\n\t}\n\tm=sqrt(m);\n\tprintf(\"%.4f\\n\",m);\n}\n "} +{"label": "70", "index": "34673", "code": "struct point\n{\n float x;\n float y;\n};\nfloat d(struct point a,struct point b)\n{\n return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));\n}\nint main()\n{\n int i,j,n;\n float m=0;\n struct point a[100];\n scanf(\"%d\",&n);\n for(i=0;im)\n m=d(a[i],a[j]);\n printf(\"%.4f\\n\",m);\n}\n"} +{"label": "70", "index": "34674", "code": "void main()\n{\n\tint n;\n\tdouble x[100]={0.0},y[100]={0.0};\n\tdouble r[100]={0.0};\n\tdouble cx=0.0,tx=0.0,cy=0.0,ty=0.0,maxr=0.0,maxd=0.0;\n\tint i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imaxr)\n\t\t{\n\t\t\tmaxr=r[i];\n\t\t}\n\t}\n\tfor(i=0;i maxd)\n\t\t\t{\n\t\t\t\tmaxd = sqrt( (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]) );\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",maxd);\n}\n"} +{"label": "70", "index": "34675", "code": "int main()\n{\n\tint n,i,j;\n\tdouble max,d,y[100],x[100];\n\tmax=0;\n\tcin>>n;\n\tfor(i=0;i>x[i]>>y[i];\n\t for(i=0;i=max)max=d;\n\t\t}\n\t}\n\tprintf(\"%.4f\",sqrt(max));\n\n\n\n}\n"} +{"label": "70", "index": "34677", "code": "double max(double a[],int k)\n{\n\tint i;\n\tdouble maxdis=a[0];\n\tfor(i=1;i>n;\n\tdouble a[100001],b[19991],ans=0.0;\n\tint mmax=0;\n\t\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i]>>b[i];\n\t}\n\tfor(int i=1;i<=n;i++)\n\tfor(int j=i+1;j<=n;j++)\n\t{\n if((sqrt)((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]))>ans)\n\t\t{\n\t\t\tans=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\t\t\n\t\t\tmmax=i;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",ans);\n}\n"} +{"label": "70", "index": "34679", "code": "int main()\n{\n\tint n,i=0,j=0,k=0;\n\tdouble x[10000],y[10000],dis[10000],max=0;\n\tcin>>n;\n\tfor(i=0;i>x[i]>>y[i];\n\t}\n\tfor(i=0;i>n;\n for(i=1; i<=n; i++)\n {\n cin>>x[i]>>y[i]; \n }\n for(i=1; imax)\n max=d; \n } \n }\n cout<>q;\n return 0;\n}"} +{"label": "70", "index": "34681", "code": "int main(int argc, char *argv[])\n{\n int n,i,j;\n double a[10000][2],m,b;\n scanf (\"%d\",&n);\n for (i=0;im)\n m=b;\n }\n }\n printf (\"%.4lf\",sqrt(m));\n scanf (\"%d\",&i);\n return 0;\n }"} +{"label": "70", "index": "34682", "code": "\nint main(int argc, char* argv[])\n{\n\tfloat a[100][2],max,distance,b,c,d,e;\n\tint i,j,n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=2)\n\t{\n\t\tfor(i=n-1;i>=0;i--)\n\t\t{\n\t\t\tscanf(\"%lf%lf\",&px[i],&py[i]);\n\t\t}\n\t}\n\tint j;\n\tfor(j=0;jmax)\n\t\tmax=sq(a[i],b[i],a[j],b[j]);\n}\n}\nprintf(\"%.4lf\",max);\nreturn 0;\n}\ndouble sq(double c,double d,double e,double f){\n\tdouble s;\n\ts=(c-e)*(c-e)+(d-f)*(d-f);\n\ts=sqrt(s);\n\treturn s;\n}"} +{"label": "70", "index": "34686", "code": "int main(int argc, char* argv[])\n{\n\tstruct{\n\t\tdouble x,y;\n\t}point[50];\n\tint i;\n\tint n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=dis;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34687", "code": "void main()\n{\n\tint i,j,n;\n\tfloat a[20][2];\n\tdouble dis[20][20],max;\n\n\tscanf(\"%d\",&n);\n\n\tfor(i=0;i=max)\n\t\t\t\t max=dis[i][j];\n\n\t\t\t printf(\"%.4lf\\n\",max);\n}"} +{"label": "70", "index": "34688", "code": "double f(double x1,double y1,double x2,double y2)\n{\n return sqrt(pow(x1-x2,2)+pow(y1-y2,2));\n}\ndouble x[10000]={0},y[10000]={0};\ndouble d[10000]={0};\nint i=0,j=0,k=0,n; \nmain()\n{\n scanf(\"%d\",&n);\n for(i=0;i<=n-1;i++,j++)\n scanf(\"%lf%lf\",&x[i],&y[i]);\n for(i=0;i<=n-1;i++)\n {\n for(j=i;j<=n-1;j++)\n {\n d[k]=f(x[i],y[i],x[j],y[j]);\n k++;\n }\n }\n for(i=k-1;i>=1;i--)\n if(d[i]>d[i-1])\n d[i-1]=d[i];\n printf(\"%.4f\\n\",d[0]);\n getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();\n}\n"} +{"label": "70", "index": "34689", "code": "int main()\n{\n\tint n;\n\tint m=0;\n\tcin>>n;\n\tdouble x[10000],y[10000];\n\tfor(int i=0;i>x[i]>>y[i];\n\tdouble max,z;\n\tmax=0.0;\n\tfor(int k=0;kmax)\n\t\t\tmax=z;}\n\t}\n\tprintf(\"%.4f\\n\", max);\n}\n\t\t"} +{"label": "70", "index": "34691", "code": "struct point\n{\n\tdouble x;\n\tdouble y;\n};\ndouble dis(struct point a,struct point b)\n{\n\treturn((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));\n}\nvoid main()\n{\n\tint i,j,n;\n\tdouble max;\n\tstruct point p[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=dis(p[i],p[j]);\n\t\t}\n\t}\n\tprintf(\"%.4f\",sqrt(max));\n}"} +{"label": "70", "index": "34692", "code": "//******************************\n//*????jmyhhx.cpp*\n//*??????*\n//*?????2010?10?9?*\n//*?????????????*\n//****************************\n\nint main()\n{\n\tint n=0,i=0,j=0,k=0;\n\tfloat a[10000]={0.0},b[10000]={0.0},max=0.0,s=0.0,S=0.0;\n\tcin>>n;\n\tfor(i=0;i>a[i]>>b[i];\n\t}\n\tfor(j=0;j=max)\n\t\t\tmax=s;\n\t\t}\n\t}\n\tcout<> n;\n\tfor (i = 0; i < n; i++)\n\t\tcin >> x[i] >> y[i];\n\tfor (i = 0; i < n - 1; i++)\n\t\tfor (j = i + 1; j < n; j++)\n\t\t\tl[i][j] = pow(abs(x[i] - x[j]), 2) + pow(abs(y[i] - y[j]), 2);\n\tmax = l[0][1];\n\tfor (i = 0; i < n - 1; i++)\n\t\tfor (j = i + 1; j < n; j++)\n\t\t{\n\t\t\tif (max < l[i][j])\n\t\t\t\tmax = l[i][j];\n\t\t}\n\tcout << sqrt(max) << endl;\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34694", "code": "int main()\n{\n\tint n;\n\tdouble dis=0,x[101],y[101];\n\tcin>>n;\n\tfor(int i=1;i<=n;i++)\n\t\tcin>>x[i]>>y[i];\n\tfor(int i=1;i<=n;i++)\n\t{\tfor(int j=1;j!=i&&j<=n;j++)\n\t\t{\n\t\t\tif(dis< sqrt( (x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]) ))\n\t\t\t\tdis=sqrt( (x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\nreturn 0;\n}"} +{"label": "70", "index": "34695", "code": "\n\nstruct point{\n\tdouble x;\n\tdouble y;\n}point[1000];\n\nint main(){\n\tint n;\n\tcin>>n;\n\tfor(int i=0;i>point[i].x>>point[i].y;\n\tdouble max;\n\tfor(int i=0;imax)\n\t\t\t\tmax=temp;\n\t\t}\n\tcout<>n;\n double a[n][2];\n for (i=0;i>a[i][0]>>a[i][1];\n cout<dis?max:dis);\n }\n printf(\"%.4f\\n\", max);\n return 0; \n}\n"} +{"label": "70", "index": "34697", "code": "int main()\n{\n\tint n,i,j;\n\tdouble d,max,max1;\n\tstruct distance{\n\t\tdouble x,y;\n\t}*num;\n\tscanf(\"%d\",&n);\n\tnum=(struct distance*)malloc(sizeof(int)*n);\n\tfor(i=0;ix),&((num+i)->y));\n\t}\n\tfor(i=0;ix-(num+j)->x)*((num+i)->x-(num+j)->x)+((num+i)->y-(num+j)->y)*((num+i)->y-(num+j)->y));\n\t\t\t if(j==i+1)\n\t\t\t \t max=d;\n\t\t\t else\n\t\t\t\t\t{\n\t\t\t\t if(d>max)\n\t\t\t\t\t max=d;\n\t\t\t\t\t}\t\n\t\t\t }\n\t\t\t max1=max;\n\t\t}\n\t\telse \n\t\t{\n\t\t for(j=i+1;jx-(num+j)->x)*((num+i)->x-(num+j)->x)+((num+i)->y-(num+j)->y)*((num+i)->y-(num+j)->y));\n\t\t\t if(j==i+1)\n\t\t\t \t max=d;\n\t\t\t else\n\t\t\t\t\t{\n\t\t\t\t if(d>max)\n\t\t\t\t\t max=d;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t } \n\t\t\tif(max>max1)\n\t\t\tmax1=max;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max1);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34698", "code": "int main()\n{\n\tint n,i,j;\n scanf(\"%d\",&n);\n\tdouble num[10][2]={0},a=0,b,dis;\n\tfor(i=0;i=a)\n\t\t\t{\n\t\t\t\tdis=b;\n\t\t\t\ta=b;\n\t\t\t}\n\n\t\t}\n\t}\n\tprintf(\"%.4f\",dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34699", "code": "int main()\n{ \n int n;\n double a[100][2];\n int i,j;\n cin>>n;\n for(i=0;i>a[i][0]>>a[i][1];\n double dis=0;\n for(i=0;idis )\n\t\t\tdis=sqrt( (a[i][0]-a[j][0])*(a[i][0]-a[j][0]) + (a[i][1]-a[j][1])*(a[i][1]-a[j][1]) );\n\t}\n\tprintf(\"%.4f\\n\", dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34700", "code": "int main()\n{\n double a[10][2];\n int n,i,j;\n double x,y;\n double l[10][10];\n\tdouble max=0;\n scanf(\"%d\",&n);\n for(i=0;i=max)max=l[i][j];\n }\n }\n printf(\"%.4lf\\n\",max);\n return 0;\n} \n "} +{"label": "70", "index": "34701", "code": "main()\n{\n int n,i,t;double x[100],y[100],e,f[100][100],g[100],k;f[0][0]=0;\n scanf(\"%d\",&n);\n for(i=0;ig[i+1])\n { k=g[i];g[i]=g[i+1];g[i+1]=k;}}\n printf(\"%.4lf\",g[n-1]);\n getchar(); getchar(); getchar(); getchar();\n }\n "} +{"label": "70", "index": "34702", "code": "int main()\n{\n int n = 0 ;\n cin >> n ;\n double a[10000][2] ; \n int i = 0 , j = 0 ;\n for( i = 0 ; i <= n - 1 ; i ++ )\n cin >> a[i][0] >> a[i][1] ;\n double Max = 0.0 , temp = 0.0 ; \n for( i = 0 ; i <= n - 1 ; i ++ )\n for( j = 0 ; j <= n - 1 ; j ++ )\n {\n temp = sqrt ( ( a[i][0] - a[j][0] ) * ( a[i][0] - a[j][0] ) + ( a[i][1] - a[j][1] ) * ( a[i][1] - a[j][1] ) ) ;\n if( temp > Max )\n Max = temp ;\n }\n printf(\"%.4f\\n\", Max) ;\nreturn 0 ;\n} "} +{"label": "70", "index": "34703", "code": "int main()\n{int n;\nscanf(\"%d\",&n);\nint i;\ndouble x[100],y[100];\nfor(i=0;imdis)\n\t\tmdis=dis;\n\tif(kdis)\n\t\t\t\tdis=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t}\n\tprintf(\"%.4lf\",dis);\n}"} +{"label": "70", "index": "34705", "code": "int main()\n{\n\tdouble x[100]={0};\n\tdouble y[100]={0};\n\tint i,j,n;\n\tdouble dis[100][100]={0};\n\tcin >> n;\n\tdouble maxdis=0;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin >> x[i] >> y[i];\n\t}\n\tfor(i=1;i<=n;i++)\n\t\tfor(j=1;j<=n;j++)\n\t {\n\t \tdis[i][j]=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t\tif(dis[i][j]>maxdis)\n\t\t\t\tmaxdis=dis[i][j];\n \t}\n\t\tprintf(\"%.4f\\n\",maxdis);\n\t\treturn 0;\n}"} +{"label": "70", "index": "34706", "code": "\nstruct point\n{\n double x, y;\n};\n\ndouble dis(double x1, double y1, double x2, double y2)\n{\n return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n}\n\nint main()\n{\n int n, i, j;\n double ans, t;\n scanf(\"%d\", &n);\n struct point *data;\n data=(struct point *)malloc(sizeof(point)*(n+10));\n for(i=0; ians) ans=t;\n }\n printf(\"%.4lf\\n\", ans);\n free(data);\n return 0;\n}\n"} +{"label": "70", "index": "34707", "code": "main()\n{ int n;\n scanf(\"%d\",&n);\n float*a=(float*)malloc((n+1)*sizeof(float));\n float*b=(float*)malloc((n+1)*sizeof(float)); \n a[0]=b[0]=0;\n float length=0;\n for(int i=1;i<=n;i++)\n {scanf(\"%f %f\",&a[i],&b[i]);} \n for(int i=1;i<=n;i++)\n for(int j=i+1;j<=n;j++)\n {float temp=0;\n float temp1=a[i]-a[j];\n float temp2=b[i]-b[j];\n temp=sqrt(temp1*temp1+temp2*temp2);\n if(temp>length)\n length=temp;\n }\n printf(\"%.4f\",length); \n \n \n \n \n}"} +{"label": "70", "index": "34708", "code": "int N;\ndouble X[21003],Y[20113],Ans = 0;\ndouble Max(double X,double Y)\n{\n\treturn X > Y ? X : Y;\n}\nint main()\n{\n\tcin >> N;\n\tint K = 1;\n\tfor (int I = 1; I <= N; I ++) cin >> X[I] >> Y[I];\n\tfor (int I = 1; I <= N; I ++)\n\t\tfor (int J = I + 1; J <= N; J ++) Ans = Max(Ans,(X[I] - X[J])*(X[I] - X[J]) + (Y[I] - Y[J])*(Y[I] - Y[J]));\n\tprintf(\"%.4f\\n\",sqrt(Ans));\n}"} +{"label": "70", "index": "34709", "code": "void main()\n{\n\tint n,i,j;\n\tdouble a[100],b[100],d,max=0,d2;\n\tscanf(\"%d\",&n);\n\tfor(i=0;id?max:d;\n\t\t}\n\t\tprintf(\"%.4lf\",max);\n}"} +{"label": "70", "index": "34710", "code": "double f(double x,double y)\n{\n\treturn (x*x+y*y);\n}\nint main()\n{\n\tint i,j,n;\n\tdouble max=0,d,x[100],y[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)max=d;\n\t\t\t\n\n\t\t}\n\tprintf(\"%.4lf\\n\",max);\n return 0;\n\t\n}\n"} +{"label": "70", "index": "34711", "code": "int main()\n{\n\tint i,n,t;\n\tdouble dis=0.0,dis1=0.0;\n double poi[100][2]={0};\n\tscanf(\"%d\",&n);\n\tfor(i=0;idis)\n\t\t\t\tdis=dis1;\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34712", "code": "\nstruct dot\n{\n\tdouble x;\n\tdouble y;\n}*p;\n\ndouble distance ( int i , int j )\n{\n\tdouble re;\n\tre = sqrt ( (p[i].x-p[j].x) * (p[i].x-p[j].x) + (p[i].y-p[j].y) * (p[i].y-p[j].y) );\n\treturn re;\n}\n\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble max = 0;\n\tp = ( struct dot * ) malloc ( sizeof ( struct dot ) * n );\n\tint i;\n\tfor ( i = 0 ; i < n ; i ++ )\n\t{\n\t\tscanf(\"%lf %lf\",&p[i].x,&p[i].y);\n\t}\n\tint j;\n\tfor ( i = 0 ; i < n ; i++ )\n\t{\n\t\tfor ( j = i + 1 ; j < n ; j++ )\n\t\t{\n\t\t\tif ( distance ( i,j) > max )\n\t\t\t{\n\t\t\t\tmax = distance ( i,j );\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\tfree(p);\n\treturn 0;\n}"} +{"label": "70", "index": "34713", "code": "int main()\n{\n\tdouble x[100],y[100],a[1000],t=0.0,result=0.0;\n\tint n,j,i,k=0;\n\tcin>>n;\n\t\tfor(j=0;j>x[j]>>y[j];}\n\t\tfor(j=0;jt) t=a[k];\n\t result=pow(t,0.50);\n\t printf(\"%.4f\\n\",result);\n\t return 0;\n}"} +{"label": "70", "index": "34714", "code": "int main(int argc, char* argv[])\n{\n\tdouble l;\n\tdouble min1,min2,max1,max2;\n\tint n,i;\n\tmin1=100.0;\n\tmin2=100.0;\n\tmax1=0.0;\n\tmax2=0.0;\n\tstruct{\n\t\tdouble x,y;\n\t}p[100];\n\tscanf(\"%d\\n\",&n);\n\tfor (i=0;imax2)max2=p[i].y;\n\t\tif(p[i].ymax1)max1=p[i].x;\n\t\tif(p[i].x6){l-=2.2890;}\n\tprintf(\"%.4f\\n\",l);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34715", "code": "int main ()\n{\n\tint n;\n\tcin >> n;\n\tdouble x[100],y[100],s=0;\n\tfor(int i=0;i>x[i]>>y[i];\n\t}\n\tfor(int i=0;is) s=pow((x[i]-x[j]),2)+pow((y[i]-y[j]),2);\n\tcout<max[i])\n\t\tmax[i]=c[j];\n}\n}\nlen=max[0];\nfor(i=0;ilen)\n\t\tlen=max[i];\n}\nprintf(\"%g\",len);\n}\n"} +{"label": "70", "index": "34717", "code": "void main()\n{\n\tint n,v,i,j;\n\tdouble max=0;\n\tdouble x[100],y[100];\n\tdouble distance[100];\n\tscanf(\"%d\",&n);\n\tfor(v=0;v=max)\n\t\t\t\tmax=distance[j];\n\t\t}\n\t}\n\tprintf(\"%.4f\",max);\n}\t\n"} +{"label": "70", "index": "34718", "code": "int main()\n{\nint i, j, k, l, n;\ndouble x[100], y[100], dis, sum, xj, yj, zdj=0;\nscanf(\"%d\", &n);\nfor(i=0;izdj)\n\t{\n\t\tzdj=dis;\n\t}\n\t}\n}\n\tprintf(\"%.4lf\", zdj);\n\t\treturn 0;\n}"} +{"label": "70", "index": "34719", "code": "\n\nint main()\n{\n\tint i,j,n;\n\tdouble m=0,l;\n\n\tscanf(\"%d\",&n);\n\tstruct point\n\t{\n\t\tfloat x,y;\n\t} *p;\n\t \n\t\tp=(struct point *)malloc(sizeof(point)*n);\n\t\tfor(i=0;ix,&(p+i)->y);\n\t\t}\n\t\tfor(i=0;ix)-((p+j)->x))*(((p+i)->x)-((p+j)->x)))+((((p+i)->y)-((p+j)->y))*(((p+i)->y)-((p+j)->y))));\n\t\t\t\tif(l>m)\n\t\t\t\t\tm=l;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%.4f\",m);\n\t\tfree (p);\n}\n"} +{"label": "70", "index": "34720", "code": "int main()\n{\n int n,i,j;\n double m=0;\n double a[110],b[110],c[110];\n double max=0;\n double s[110][110];\n cin>>n; \n for (i=0;i>a[i]>>b[i];\n for (i=0;imax) \n max=s[i][j];\n }\n \n cout<=f)\n\t\t\t\tf=b[i][t];\n\t\t}\n\tprintf(\"%.4lf\",f);\n\n\n\treturn 0;\n}"} +{"label": "70", "index": "34722", "code": "int main()\n{\n\tint n,i,j;\n\tdouble max=0,lmax,a[100],b[100],s[100][100];\n cin>>n; //????\n\tfor(i=0;i>a[i]>>b[i]; //??????\n\tfor(i=0;imax) max=s[i][j]; //?????????????\n\t\t}\n\t}\n lmax=sqrt(max); \n\tprintf(\"%.4f\\n\",lmax); //????????\n\treturn 0;\n}"} +{"label": "70", "index": "34723", "code": "\nint main()\n{\n\tint n;\n\tint i,j;\n\tdouble max;\n\tdouble a[1000][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=0;j--)\n\t\t{\n\t\t\tif(sqrt((a[i][0]-a[j][0]) * (a[i][0]-a[j][0]) + (a[i][1]-a[j][1]) * (a[i][1]-a[j][1]))>max)\n\t\t\tmax=sqrt((a[i][0]-a[j][0]) * (a[i][0]-a[j][0]) + (a[i][1]-a[j][1]) * (a[i][1]-a[j][1]));\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\t\n\treturn 0;\n}\n"} +{"label": "70", "index": "34724", "code": "int main(int argc, char* argv[])\n{\nint n;\nscanf(\"%d\\n\",&n);\ndouble *px,*py;\npx=(double *)malloc(sizeof(double) * n);\npy=(double *)malloc(sizeof(double) * n);\nint i;\nfor(i=0;i0;j--){\n\tfor(i=0;ians)ans=dis(x[i],y[i],x[j],y[j]);\n }\n printf(\"%.4lf\",ans);\n return 0;\n }\n"} +{"label": "70", "index": "34726", "code": "void main()\n{\n\tstruct p\n\t{\n\t\tdouble x;\n\t\tdouble y;\n\t}dot[50];\n\tdouble l,max=0;\n int n,i,j;\t\n scanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t {max=distance[p];}\n\t\t else max=max;\n\t\t p++;\n\t\t}\n\t\t}\n\t\t printf(\"%.4f\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34728", "code": "main()\n{\n double a[100][2];\n int n;\n int i,j;\n double x2,y2;\n double distance=0;\n double dis;\n scanf(\"%d\",&n);\n for(i=0;i=distance)\n distance=dis;\n }\n }\n printf(\"%.4f\",distance);\n\n}\n"} +{"label": "70", "index": "34729", "code": "struct spot\n{\n\tdouble x;\n\tdouble y;\n}pts[100];\nvoid main()\n{\n\tint n,i,j;\n\tdouble a,b,s,max=0.0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)max=s;\n\t\t}\n\tprintf(\"%.4lf\\n\",max);\n}"} +{"label": "70", "index": "34730", "code": "int main()\n{\n\tint n;\n\tcin>>n;\ndouble a[1000],b[1000],c[100000];\nfor(int i=0;i<=n-1;i++)\n{\n\tcin>>a[i]>>b[i];\n}\nint j=0;\nfor(int s=0;s<=n-2;s++)\n{\n\tfor(int t=s+1;t<=n-1;t++)\n\t{\n\t\tc[j]=sqrt((a[s]-a[t])*(a[s]-a[t]) + (b[s]-b[t]) * (b[s]-b[t]));\n\t j++;\n\t}\n}\n\ndouble h;\nfor(int d=0;dc[f+1])\n\t{\n\t\th=c[f];\n\t\tc[f]=c[f+1];\n\t\tc[f+1]=h;\n\t}\n}\ncout<>n;\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(i=0;i max)\n\t\t\t\tmax = sqrt(pow(x[i]-x[j],2)+pow(y[i]-y[j],2));\n\tcout<>n;\n for(i=0;i>x[i]>>y[i];\n for(j=0;jdis)dis=d[j][k];}\n printf(\"%.4f\\n\",dis);\n return 0;}"} +{"label": "70", "index": "34733", "code": "int main()\n{\n\tint n,i,j;\n\tdouble x[999],y[999],s[9999],z=0.0;\n\tscanf(\"%d\",&n);\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&x[i],&y[i]);\n\t}\n\tfor (j=1;jz) z=s[j+i-1];\n\t\t} \n\t}\n\tprintf(\"%.4f\\n\",z);\n\treturn 0;\n}\n\n\n\n"} +{"label": "70", "index": "34734", "code": "double dis(double a[2],double b[2]){\n\tdouble distance;\n\tdistance=sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]));\n\treturn distance;}\nint main(){\n\tint n,i,j,k;\n\tdouble x[100][2],d[500],max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=d[k];\n\tprintf(\"%.4lf\",max);\n}"} +{"label": "70", "index": "34735", "code": "int main()\n{\n\tint n,i,j,k,m,p;\n\tscanf(\"%d\",&n);\n\n\tfloat a[100];\n\tfloat b[100];\n\tfloat c[5000];\n\tdouble q;\n\tfloat max;\n\n\tfor (i=0;imax)\n max=ss;\n //printf(\"ss%lf\\n\",ss);\n }\n printf(\"%.4lf\",sqrt(max));\n //scanf(\"%d\",&n);\n}\n"} +{"label": "70", "index": "34737", "code": "int main(int argc, char* argv[])\n{struct point\n{\n\tdouble x,y;\n}point[10];\nint n,i,j,m;\ndouble d[10][10];\ndouble max=0.0,dis;\nscanf(\"%d\\n\",&n);\nfor(i=0;imax)\n\t\t\tmax=d[m][j];\n\t}\n}\n\tprintf(\"%.4f\",sqrt(max));\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34738", "code": "struct point\n{\n double x;\n double y;\n};\nint main()\n{\n struct point p[100];\n int n,i,j;\n double d,max;\n max=0;\n scanf(\"%d\",&n);\n for(i=0;imax)\n {\n max=d;\n }\n }\n }\n printf(\"%.4lf\",max);\n return 0;\n}\n"} +{"label": "70", "index": "34739", "code": "int main()\n{\ndouble a[200];\ndouble b[200];\ndouble c[200];\nint n,i;\ndouble max=0;\nscanf(\"%d\\n\",&n);\nfor(i=0;imax)\nmax=sqrt((a[j]-a[k])*(a[j]-a[k])+(b[j]-b[k])*(b[j]-b[k]));\n}\n}\nprintf(\"%.4lf\\n\", max);\n}"} +{"label": "70", "index": "34740", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n double x[100],y[100],z[100][100],max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\tmax=z[i][j+1];\n\t }\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34741", "code": "\ntypedef struct\n{\n double x;\n double y;\n} point;\n\nint main (void)\n{\n int n, i, j;\n double distance = 0, temp;\n \n scanf (\"%i\", &n);\n point p[n];\n for (i = 0; i < n; i++)\n scanf (\"%lf %lf\", &p[i].x, &p[i].y);\n for (i = 0; i < n - 1; i++)\n for (j = i + 1; j < n; j++) {\n temp = sqrt ((p[i].x - p[j].x) * (p[i].x - p[j].x) + (p[i].y - p[j].y) * (p[i].y - p[j].y));\n distance = distance >= temp ? distance : temp;\n }\n printf (\"%.4f\\n\", distance);\n \n return 0;\n}\n"} +{"label": "70", "index": "34742", "code": "struct point\n{\n\tdouble x;\n\tdouble y;\n}a[100];\nvoid main()\n{\n\tdouble di(double x1,double y1,double x2,double y2);\n\tint n,i,j,k=0;\n\tdouble max,b[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t}\n\tprintf(\"%.4lf\",max);\n}\ndouble di(double x1,double y1,double x2,double y2)\n{\n\treturn(sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));\n}\n\n\n"} +{"label": "70", "index": "34743", "code": "double distance(double a,double b,double c,double d)\n{\n\tdouble t;\n\tt=sqrt((a-c)*(a-c)+(b-d)*(b-d));\n\treturn(t);\n}\nvoid main()\n{\n\tint n,i,j;\n\tdouble a[10],b[10],max,h;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{ \n\t\tscanf(\"%lf%lf\",&a[i],&b[i]);\n\t}\n\tmax=distance(a[0],b[0],a[1],b[1]);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tfor(j=1;j<=n-1;j++)\n\t\t{\n\t\t\th=distance(a[i],b[i],a[j],b[j]);\n\t\t\tif(h>max)max=h;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n}\n"} +{"label": "70", "index": "34744", "code": "int main(int argc, char* argv[])\n{\n\tint i,j,n;\n\tdouble x[100],y[100];\n\tdouble s[100][100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;id)\n\t\t{\n\t\t\td=s[i][j];\n\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",d);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34745", "code": "\nint main()\n{\n\tint n;\n\tdouble x[1000],y[1000],d[1000][1000],dis=0;\n\tcin>>n;\n\tfor (int i=0;i>x[i]>>y[i];\n\tfor (int i=0;idis)\n\t\t\t\tdis=d[i][j];\n\tdis=sqrt(dis);\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34746", "code": "int main()\n{\n double a[100][2];\n double dis=0;\n int i,j;\n double distance(double x1,double y1,double x2,double y2);\n double max(double d1,double d2);\n int n;\n scanf(\"%d\",&n);\n for(i=0;id2)\n max=d1;\n return max;\n }\n"} +{"label": "70", "index": "34747", "code": "double distance(double a,double b,double c,double d)\n{\n\tdouble q;\n\tq=sqrt((a-c)*(a-c)+(b-d)*(b-d));\n\treturn(q);\n}\nvoid main()\n{\n\tint i,j,n;\n double a[100],b[100],d;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tfor (i=0; i>x[i]>>y[i];\n\tdouble ans=0.0;\n\tfor (i=0; i ans)\n\t\t\t\tans = dist;\n\t\t}\n\tprintf(\"%.4lf\\n\", ans);\n\treturn 0;\n}"} +{"label": "70", "index": "34749", "code": "double length(double x1,double y1,double x2,double y2)\n{\n\treturn sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n}\nvoid main()\n{\n\tdouble length(double,double,double,double);\n\tdouble num[100][2],max,temp;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(i=0;id*d)\n\t\t\t\td=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", d);\n\treturn 0;\n}"} +{"label": "70", "index": "34751", "code": "main()\n{\n int n;\n double a[50000],b[50000],k=0;\n scanf(\"%d\",&n);\n for(int i=1;i<=n;i++)\n {\n scanf(\"%lf %lf\",&a[i],&b[i]);\n }\n for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n double s;\n s=(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]);\n s=sqrt(s);\n if(s>k)\n k=s;\n }\n }\n printf(\"%.4lf\",k);\n\n}\n"} +{"label": "70", "index": "34752", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a[100][2],b[100];\n\tdouble h=0,q=0;\n\tscanf(\"%d\\n\",&n);\n\tfor(i=1;i<=n;i++)\n\t scanf(\"%lf %lf\",&a[i][1],&a[i][2]);\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tfor(j=i+1;j<=n;j++)\n\t\t{\n\t\t\tif(sqrt(pow(a[j][1]-a[i][1],2)+pow(a[j][2]-a[i][2],2))>h)\n\t\t\t h=sqrt(pow(a[j][1]-a[i][1],2)+pow(a[j][2]-a[i][2],2));\n\t\t};\n\t\tb[i]=h;\n\t};\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(b[i]>q)\n\t\t\tq=b[i];\n\t};\n\tprintf(\"%.4lf\",q);\n\treturn 0;\n}"} +{"label": "70", "index": "34753", "code": "struct area\n{\n double x;\n double y;\n}a[101];\nmain ()\n{\n int n,i,j;\n float b[101],d;\n scanf (\"%d\",&n);\n for (i=1;i<=n;i++)\n {\n scanf (\"%lf %lf\",&a[i].x,&a[i].y);\n }\n d=sqrt((a[2].x-a[1].x)*(a[2].x-a[1].x)+(a[2].y-a[1].y)*(a[2].y-a[1].y));\n for (i=2;i<=n;i++)\n {\n b[i]=sqrt((a[i].x-a[1].x)*(a[i].x-a[1].x)+(a[i].y-a[1].y)*(a[i].y-a[1].y));\n for (j=2;jb[i])\n {\n b[i]=sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)*(a[i].y-a[j].y));\n }\n }\n }\n for (i=2;i<=n;i++)\n if (b[i]>d) {d=b[i];}\n printf (\"%.4lf\\n\",d);\n}"} +{"label": "70", "index": "34754", "code": "int main()\n{\n\tdouble a[100], b[100], c[100][100], d[10000], e[10000];\n\tint i, j, k, n;\n\tscanf(\"%d\", &n);\n\tfor (i=1; i<=n; i++)\n\t{\n\t\tscanf(\"%lf%lf\", &a[i], &b[i]);\n\t}\n\tfor (i=1; i<=n; i++)\n\t{\n\t\tfor (j=1; j<=n; j++)\n\t\t{\n\t\t\tc[i][j] = sqrt((a[i] - a[j])*(a[i] - a[j]) + (b[i] - b[j])*(b[i] - b[j]));\n\t\t}\n\t}\n\tk = 1;\n\tfor (i=1; i<=n; i++)\n\t{\n\t\tfor(j=1; j<=n; j++)\n\t\t{\n\t\t\t\td[k] = c[i][j];\n\t\t\t\tk += 1;\n\t\t}\n\t}\n\tfor (i=1; i<=n*n; i++)\n\t{\n\t\tk = 1;\n\t\tfor (j=1; j<=n*n; j++)\n\t\t{\n\t\t\tif(d[i]>d[j]) k += 1;\n\t\t}\n\t\te[k] = d[i];\n\t}\n\tprintf(\"%.4lf\", e[n*n-1]);\n\treturn 0;\t\n}"} +{"label": "70", "index": "34755", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tdouble r=0,tmp=0;\n\tstruct point{\n\t\tdouble x;\n\t\tdouble y;\n\t}*num;\n\tnum=(struct point*)malloc(sizeof(struct point)*n);\n\tint i,j;\n\tfor(i=0;ix,&(num+i)->y);\n\t}\n\tfor(i=0;ix-(num+j)->x)*((num+i)->x-(num+j)->x)+((num+i)->y-(num+j)->y)*((num+i)->y-(num+j)->y));\n if(tmp>r)\n\t\t\t\tr=tmp;\n\t\t}\n\t}\n printf(\"%.4lf\\n\",r);\n\tfree(num);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34756", "code": "void main()\n{\n\tint n,i,j;\n\tfloat a[1000],b[1000],s=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n max=d; \n }\n }\n printf(\"%.4lf\",max);\n getchar();\n getchar();\n}\n"} +{"label": "70", "index": "34759", "code": "int main ()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point\n\t{\n\t\tdouble x,y;\n\t};\n\tpoint *pp;\n\tpp=(struct point *)malloc(sizeof(point)*n);\n\tint i;\n\tfor(i=0;ix=tmp1;\n (pp+i)->y=tmp2;\n\t}\n\tdouble dis=0;\n\tfor(i=0;ix)-((pp+j)->x);\n\t\t\tdeltay=((pp+i)->y)-((pp+j)->y);\n\t\t\ttmpdis=sqrt(deltax*deltax+deltay*deltay);\n\t\t\tif(tmpdis>dis)\n\t\t\t\tdis=tmpdis;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",dis);\n\tfree(pp);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34760", "code": "void main()\n{\n\tint n,i,j;\t\n\tdouble x,y,s,dis=0;\n\tscanf(\"%d\",&n);\n\tif(n>=2)\n\t{\n\t\tstruct point \n\t\t{ \n\t\t\tdouble x, y;\n\t\t} points[1000];\n\t\tfor (i=0;i=dis)\n\t\t\t\t{\n\t\t\t\t\tdis=s;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprintf(\"%.4lf\",dis);\n\t}\n}\n\n\n\n"} +{"label": "70", "index": "34761", "code": "int main()\n{int i,j,n;\n double max,m;\n double a[100][2];\n double d(float x1,float y1,float x2,float y2);\n\n scanf(\"%d\",&n);\n for(i=0;imax) max=m;\n\t\t }\n\t }\n\t printf(\"%.4f\\n\",max);\n\t return 0;\n}\n\ndouble d(float x1,float y1,float x2,float y2)\n{double k,p;\n p=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);\n k=sqrt(p);\n\treturn k;\n}"} +{"label": "70", "index": "34762", "code": "\nint main()\n{\n\tint n, i, j;\n\tcin >> n;\n\tdouble x[1000], y[1000], d[1000][1000], max;\n\tmax = 0;\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tcin >> x[i] >> y[i];\n\t}\n\tfor (i = 0; i < n - 1; i++)\n\t{\n\t\tfor (j = i + 1; j < n; j++)\n\t\t{\n\t\t\td[i][j] = sqrt((x[j] - x[i])*(x[j] - x[i]) + (y[j] - y[i])*(y[j] - y[i]));\n\t\t\tif (d[i][j]>max)\n\t\t\t\tmax = d[i][j];\n\t\t}\n\t}\n\tcout << fixed;\n\tcout << setprecision(4) << max << endl;\nreturn 0;\n}"} +{"label": "70", "index": "34763", "code": "\nint main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point{\n\t\tfloat x;\n\t\tfloat y;\n\t}point[1000];\n\tint i=0;\n\tdo{\n\t\tscanf(\"%f %f\",&point[i].x,&point[i].y);\n\t\ti++;\n\t\t}while(idistance)\n\t\t\t\tdistance=a;\n\t\t\telse\n\t\t\t\tdistance=distance;\n\t\t\ti++;\n\t\t}while(i0;j--)\n\t{\n\t\tif (distance[j]>max)\n\t\t{\n\t\t\tmax=distance[j];\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34765", "code": "double juli(double a1,double b1,double a2,double b2);\nvoid main(){\n\tdouble a[20],b[20];\n\tint m,i,j;\n\tdouble d=0;\n\tscanf(\"%d\",&m);\n\tfor(i=0;i=d)\n\t\t\t\td=juli(a[i],b[i],a[j],b[j]);\n\t\t\tprintf(\"%.4lf\\n\",d);\n}\n\tdouble juli(double a1,double b1,double a2,double b2){\n\t\tdouble d;\n\t\td=sqrt((a1-a2)*(a1-a2)+(b1-b2)*(b1-b2));\n\t\treturn(d);\n\t}\n\n"} +{"label": "70", "index": "34766", "code": "int main()\n{\n\tdouble x[100],y[100],d,maxd;\n\tint i,j,k,m;\n\tmaxd=0;\n\tcin>>k;\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(j=0;jmaxd)\n\t\t\t\tmaxd=d;\n\t\t\t}\n\t}\n \tcout<>n;\nfor(i=0;i>a[i][0]>>a[i][1];\ndouble max=0,temp;\nfor(i=0;imax)max=temp;\n}\ncout<max)\n\t\t max=a[i][j];\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34769", "code": "int main()\n{\n\tint i,j,n;\n\tstruct point{\n\t\tfloat x,y;\n\t}p[num];\n\tdouble max=0,a;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=a;\n\t\t}\n\t}\n\tprintf(\"%.4f\",max);\n\treturn 0;\n}\n\t\t\n\n"} +{"label": "70", "index": "34770", "code": "int main()\n{\n\tdouble x[10],y[10];\n\tint n,i,j;\n\tdouble a,b,d,dmax=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;idmax)\n\t\t\t{\n\t\t\t\tdmax=d;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\",dmax);\n}\n\n"} +{"label": "70", "index": "34771", "code": "main()\n{\n int n;\n int i,j,k;\n double s,t;\n scanf(\"%d\",&n);\n double*p=(double*)malloc(n*sizeof(double));\n double*q=(double*)malloc(n*sizeof(double));\n for(i=0;is)s=t;\n } \n printf(\"%.4lf\\n\",s);\n \n}"} +{"label": "70", "index": "34772", "code": "void main()\n{\n\tint n,i,j;\n\tdouble a[100],b[100],c,d,max=0,e;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=d;}\n printf(\"%.4f\\n\",max);\n}"} +{"label": "70", "index": "34773", "code": "\nint main()\n{ \n\tint n;\n\tcin>>n;\n\tdouble x[50],y[50],max=0;\n\tfor(int i=0;i>x[i]>>y[i];\n\n\t}\n\tfor(int i=0;imax)\n\t\t\t{\n\t\t\t\tmax=m;\n\t\t\t}\n\n\t\t}\n\t\tcout<max)\n\t\t\t\tmax=sqrt(pow((x[i]-x[p]),2)+pow((y[i]-y[p]),2));\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34775", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,k,i;\n\tdouble max;\n\tscanf(\"%d\",&n);\n\tstruct{\n\t\tdouble x,y,dis[1000];\n\t}a[1000];\n\tfor(k=1;k<=n;k++)\n\t{\n scanf(\"%lf %lf\",&a[k].x,&a[k].y);\n\t}\n for(k=1;k<=n;k++)\n\t{\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n a[k].dis[i]=(a[k].x-a[i].x)*(a[k].x-a[i].x)+(a[k].y-a[i].y)*(a[k].y-a[i].y);\n\t\t if(a[k].dis[i]>=max)\n\t\t {\n\t\t\t max=a[k].dis[i];\n\t\t }\n\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",sqrt(max));\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34776", "code": "int main()\n{\n\tint n,i,j;\n\tdouble dis=0,x[100],y[100],temp;\n\tcin>>n;\n\tfor(i=0;i>x[i]>>y[i];\n\t}\n\tfor(i=0;idis)\n\t\t\t{\n\t\t\t\tdis=temp;\n\t\t\t}\n\t\t}\n\t}\n printf(\"%.4f\\n\", dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34777", "code": "struct point{\n\t\tdouble x,y;\n\t};\n struct point point[1000];\nint main(){\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=s;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34778", "code": "void main()\n{double l[2000],d;int n,b,i,j;float q[50],w[50];\nscanf(\"%d\",&n);\nfor(i=1;i<=n;i++)\n{\nscanf(\"%f%f\",&q[i],&w[i]);\n}\nb=1;\nfor(i=1;i<=n;i++)\nfor(j=1;j<=n;j++)\n{l[b]=(double)((q[i]-q[j])*(q[i]-q[j])+(w[i]-w[j])*(w[i]-w[j]));b=b+1;}\nd=l[1];\nfor(j=1;jmax)\n max=ca(x[j]-x[i],y[j]-y[i]);\n }\n }\n printf(\"%.4lf\\n\",sqrt(max));\n\n }\n"} +{"label": "70", "index": "34780", "code": "\nint main()\n{\n\tdouble a,b,c,d=0,e,f;\n\tstruct dis{\n\t\tdouble x,y;}*number;\n\tint n,i,j;\n\n\tscanf(\"%d\",&n);\n number=(struct dis*)malloc(sizeof(int)*n);\n\n\tfor(i=0;ix=a;\n\t\t(number+i)->y=b;\n\n\t}\n\tfor(i=0;ix-(number+j)->x;\n\t\tf=(number+i)->y-(number+j)->y;\n\t\tc=e*e+f*f;\n\t\t\n\t\tif(c>d)\n\t\t{\n\t\t\td=c;\n\t\t}\n\t\t}\n\t}\n\n\tprintf(\"%.4lf\",sqrt(d));\n\n\treturn 0;\n}"} +{"label": "70", "index": "34781", "code": "int main()\n{\n\tint n;\n\tcin>>n;\n\tfloat x[n],y[n];\n\tfloat dis=0;\n\tfor(int i=0;i>x[i]>>y[i];\n\tfor(int i=0;i=dis)dis=a;\n\t\t}\n\tcout<=dis) dis=dist[i][j];\n\t\t}\n }\n\n\t\n\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34783", "code": "double x[1005],y[1005];\nint main()\n{\nint n,i,j;\ndouble max=0;\nscanf (\"%d\",&n);\nfor (i=0;imax)\nmax=dist;\n}\nprintf(\"%.4lf\\n\",sqrt(max));\nreturn 0;\n}"} +{"label": "70", "index": "34784", "code": "double dis(double a,double b,double c,double d)\n{\n\treturn (sqrt((a-c)*(a-c)+(b-d)*(b-d)));\n}\nint main()\n{\n\tdouble a[100][2];\n\tdouble temp1,n;\n\tint i,j;\n\tcin>>n;\n\ttemp1=0;\n\tfor(i=0;i>a[i][0]>>a[i][1];\n\t}\n\tfor(i=0;imax)\n max=(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]);\n }\n }\n printf (\"%.4f\\n\",sqrt(max));\n \n}"} +{"label": "70", "index": "34786", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j,m,d=1;\n\tdouble a[99][2];\n\tdouble max=0,x;\n\tscanf (\"%d\",&n);\n\tfor (i=0;imax)\n\t\t\t\t\tmax=(a[i][0]-a[m][0])*(a[i][0]-a[m][0])+(a[i][1]-a[m][1])*(a[i][1]-a[m][1]);\t\t\t\t\n\t\t\t}\n\t\t\td++;\n\t\t}\n\t\tprintf (\"%.4lf\\n\",sqrt(max));\n\treturn 0;\n}\n"} +{"label": "70", "index": "34787", "code": "int main()\n{\ndouble c[100][100],a[500],b[500],max;\nint i,j,n;\nscanf(\"%d\",&n);\nfor (i=1;i<=n;i++)\n scanf(\"%lf %lf\",&a[i],&b[i]);\n for (i=1;i<=n;i++)\n {\n for (j=i+1;j<=n;j++)\n {\n c[i][j]=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n }\n }\n for (i=1;i<=n;i++)\n {\n for (j=i+1;j<=n;j++)\n {\n if (maxpow((a[i][0]-a[j][0]),2)+pow((a[i][1]-a[j][1]),2))\n\t\t\t\tp=p;\n\t\t\telse\n\t\t\t\tp=pow((a[i][0]-a[j][0]),2)+pow((a[i][1]-a[j][1]),2);\n\t\t\n\tprintf(\"%.4f\\n\",sqrt(p));\n}"} +{"label": "70", "index": "34789", "code": "float distance(float x1,float y1,float x2,float y2)\n{\n\tfloat z;\n\tz=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);\n\tfloat d;\n\td=sqrt(z);\n\treturn d;\n}\n\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\n\tstruct {\n\t\tfloat x,y;\n\t} zuobiao[100];\n\n\tfloat dist;\n\tint i,j;\n\tfloat dis=0;\n\n\tfor(i=0;i=dis) dis=dist;\n\t\t}\n }\n\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34790", "code": "int main()\n{\n\tint n,i,j;\n\tdouble t;\n\tstruct\n\t{\n\tdouble x;\n\tdouble y;\n\tdouble z;\n\t}a[100];\n\tdouble b[100];\nscanf(\"%d\",&n);\nfor(i=0;i=0;i--)\n{\n\tfor(j=0;ja[j].z)\n{\n\tt=a[j-1].z;\n\ta[j-1].z=a[j].z;\n\ta[j].z=t;\n}\n}\nb[i]=a[n-1].z;\n}\nfor(j=1;jb[j])\n{\n\tt=b[j-1];\n\tb[j-1]=b[j];\n\tb[j]=t;\n}\n}\nprintf(\"%.4lf\\n\",b[n-1]);\nreturn 0;\n}"} +{"label": "70", "index": "34791", "code": "int main()\n{\t\n\tint n;\n\tdouble maxx= 0 ;\n\tcin >> n;\n\tdouble *x = (double*) malloc( (n+1) * sizeof(double));\n\tdouble *y = (double*) malloc( (n+1) * sizeof(double));\n\n\t\n\tfor ( int i = 0 ; i < n ; i++ ) {\n\t\tcin >> x[i] >> y[i];\n\t}\n\n\tfor ( int i = 0 ; i < n ; i++) {\n\t for ( int j = 0 ; j < n ; j++ ) {\n\t\t double temp = sqrt(sqr(x[i]-x[j]) + sqr(y[i]-y[j]));\n\t\t if (temp > maxx) {\n\t\t maxx = temp;\n\t\t }\n\t \n\t }\n\t\n\t}\n\n\tcout << maxx << endl; \n\nreturn 0;\n}"} +{"label": "70", "index": "34792", "code": "struct Point\n{\n\tdouble x;\n\tdouble y;\n};\n\nint main(void)\n{\n\tint n;\n\tdouble distant,max=0;\n\t\n\tstruct Point point[100];\n\tscanf(\"%d\",&n);\n\tfor(int i=0;imax)\n\t\t\t{\n\t\t\t\tmax=distant;\n\t\t\t}\n\t\t}\n\t}\n\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34793", "code": "void main()\n{\n\tint n,k,i,j;\n\tdouble x[20],y[20],m[200],a;\n\tscanf(\"%d\",&n);\n\tfor(k=0;km[k+1])\n\t\t{\n\t\t\ta=m[k];\n\t\t\tm[k]=m[k+1];\n\t\t\tm[k+1]=a;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",m[k]);\n}\n\t\t\t\n\n "} +{"label": "70", "index": "34794", "code": "int main(int argc, char* argv[])\n{ \n\tint n,i,k,p,q,t,m;\n double sta[10][2],dis[45],s,x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;idis[q+1]){\n\t\t\ts=dis[q+1];\n\t\t\tdis[q+1]=dis[q];\n\t\t\tdis[q]=s;\n\t\t}\n\t}\n\tprintf(\"%.4f\",dis[m-1]);\n\treturn 0;\n}"} +{"label": "70", "index": "34795", "code": "int main()\n{\n\tint n;\n\tdouble x[100],y[100],d[5000];\n\tdouble m=0;\n\tint i,j,k=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%lf\",&x[i]);\n\t\tscanf(\"%lf\",&y[i]);\n\t\td[i]=sqrt(x[i]*x[i]+y[i]*y[i]);\n\t}\n\tfor(i=0;i<=n-2;i++)\n\t\tfor(j=i+1;j<=n-1;j++)\n\t\t{\n\t\t\td[k]=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t\tk++;\n\t\t}\n\tfor(i=0;i<=k-1;i++)\n\t\tif(d[i]>m)\n\t\t\tm=d[i];\n\tprintf(\"%.4f\\n\",m);\n\treturn 0;\n}"} +{"label": "70", "index": "34796", "code": "\nint main()\n{\n\tint n,i,j;\n\tdouble a[50][2];\n\tdouble b;\n\tdouble dis;\n\tcin>>n;\n\tcin>>a[0][0]>>a[0][1];\n\tfor(i=1;i>a[i][0]>>a[i][1];\n\t\tfor(j=0;jdis)\n\t\t\t\tdis=b;\n\n\t\t}\n\t}\n printf(\"%.4f\\n\", dis);\n\t\treturn 0;\n}\n\t\n"} +{"label": "70", "index": "34797", "code": "int main()\n{\n\tint n=0,i=0,j=0;\n\tdouble x[100],y[100],dis=0,temp=0;\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>x[i-1];\n\t\tcin>>y[i-1];\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=i;j<=n;j++)\n\t\t{\n\t\t\ttemp=sqrt((x[i-1]-x[j-1])*(x[i-1]-x[j-1])+(y[i-1]-y[j-1])*(y[i-1]-y[j-1]));\n\t\t\tif(temp>dis)\n\t\t\t{\n\t\t\t\tdis=temp;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34798", "code": "int main()\n{\n int n,i,j,a=0;\n double b,s[5000];\n struct distance{ double x,y;\n }dis[100];\n scanf(\"%d\",&n);\n for(i=0;i0;i--)\n for(j=0;js[j+1])\n {\n b=s[j+1];\n s[j+1]=s[j];\n s[j]=b;\n }\n printf(\"%.4f\\n\",s[a-1]);\n return 0;\n}\n "} +{"label": "70", "index": "34799", "code": "struct point{\n\tdouble x;\n\tdouble y;\n};\nstruct point dian[101];\ndouble dis(struct point dian[],int i,int j){\n\tdouble x=dian[i].x-dian[j].x;\n\tdouble y=dian[i].y-dian[j].y;\n\tdouble dis=(x*x+y*y);\n\treturn sqrt(dis);\n}\nint main()\n{\n\tint n,i,j;\n\tint t=0,k=0;\n\tdouble a[102];\n\tcin>>n;\n\tfor(i=0;i>dian[i].x>>dian[i].y;\n\t for(i=0;i1e-6)t++;\n\t\t if(t==k+1){\n\t\t a[k]=dis(dian,i,j);\n\t\t k++;\n\t\t }\n\t }\n\t for(i=0;imax)\n\t\tmax=s[j];}\n printf(\"%.4f\\n\",max);\n return 0;\n}"} +{"label": "70", "index": "34802", "code": "\nint main(){\n\tint i,j,n;\n\tfloat x[100],y[100],dis=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=s) \n\t\t {s=b;}\n\t\t }\n\t }\n printf(\"%.4lf\",s);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34804", "code": "\nstruct po\n{\n\tfloat x;\n\tfloat y;\n};\n\nvoid main()\n{\n\tstruct po p[10];\n\tint n;\n\tint i,j;\n\tdouble d=0,a;\n\tscanf(\"%d\",&n);\n\tfor(i=0;id) d=a;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",d);\n}\n"} +{"label": "70", "index": "34805", "code": "main()\n{\n int n,i,j,k;\n double x[1000],y[1000],d[10000],max=0;\n scanf(\"%d\",&n);\n for(i=0;imax){\n\t\t max=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n}"} +{"label": "70", "index": "34807", "code": "\n\n\nint main()\n{\n double max=0;\n int n;\n double x[10000],y[10000];\n cin>>n;\n for(int i=0;i!=n;i++)\n {\n\t cin>>x[i]>>y[i];\n\t if(i>=1)\n\t {\n\t\t for(int j=0;j!=i;j++)\n\t\t {\n\t\t\t if(sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]))>max)\n\t\t\t\t max=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t }\n\t }\n }\n printf(\"%.4f\\n\", max);\n\n return 0;\n}\n"} +{"label": "70", "index": "34808", "code": "main()\n{\n int n,i,j;\n double d,maxd=0;\n struct\n {\n double x,y;\n }pts[100];\n scanf(\"%d\",&n);\n for(i=0;imaxd)\n maxd=d;\n }\n }\n printf(\"%.4lf\",maxd);\n getchar();\n getchar();\n getchar();\n}"} +{"label": "70", "index": "34809", "code": "int main()\n{int n,i,j;\n scanf(\"%d\",&n);\n struct a{double x,y;}*p;\n p=(struct a*)malloc(sizeof(struct a)*n);\n for(i=0;ix,&(p+i)->y);\n\t }\n double dis=0;\n for(i=0;ix-(p+j)->x),2)+pow(((p+i)->y-(p+j)->y),2));\n\t\t if(t>dis)\n\t\t\t dis=t;\n\t\t }\n\t \n\t }\n\t printf(\"%.4f\",dis);\n return 0;\n}\n"} +{"label": "70", "index": "34810", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tdouble *x,*y,d;\n\tscanf(\"%d\",&n);\n\tx=(double*)malloc(sizeof(double)*n);\n\ty=(double*)malloc(sizeof(double)*n);\n for(i=0;id)\n\t\t\t\t\td=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));\n\t\t\t}\t\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",d);\n\treturn 0;\n}"} +{"label": "70", "index": "34811", "code": "int main()\n{\nint n,i,j;\ndouble a,b,dis;\nstruct points{\ndouble x,y;\n }point[N];\nscanf(\"%d\\n\",&n);\nfor(i=0;imax)\n max=dis;\n }\n }\n printf(\"%.4lf\",max);\n getchar();\n getchar();\n}\n"} +{"label": "70", "index": "34813", "code": "int main()\n{\n\tint n,i,k;\n\tdouble x[100][2],y[100][100],z;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=s;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\tscanf(\"%d\",i);\n\treturn 0;\n\n}"} +{"label": "70", "index": "34815", "code": "\nvoid main()\n{\n\tint b=0,i,j,n;\n\tdouble max=0,dis;\n\tscanf(\"%d\", &n);\n\n\tstruct point\n\t{\n\t\tfloat x,y;\n\t}p[100];\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%f %f\", &p[i].x,&p[i].y);\n\t}\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tfor (j=i+1; j<=n;j++)\n\t\t{\n\t\t\tdis=(double)sqrt( (p[i].x-p[j].x)*(p[i].x-p[j].x) + (p[i].y-p[j].y)*(p[i].y-p[j].y));\t\n if (maxi+1;j--)\n\t\t{\n\t\t\tdis=sqrt((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]));\n\t\t\tif(dis>k)\n\t\t\t{\n\t\t\t\tk=dis;}\n \n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t}\nprintf(\"%.4f\\n\",k);\n}"} +{"label": "70", "index": "34817", "code": "double dis(double a,double b,double c,double d)\n{\n\tdouble l=(a-c)*(a-c)+(b-d)*(b-d);\n\treturn(l);\n}\nmain()\n{\n\tint n,m=0,i,j,k,r;\n\tdouble p[10][2],res[100];\n\tscanf(\"%d\",&n);\n\tfor (i=0;i>n;\n\tfor(i=0;i>x[i]>>y[i];\n\t}\n\tfor(i=0;im)\n\t\t\tm=d;\n\t}\n\t}\n\tcout<>n;\n\tfor(int i=0;i>dian[i].x>>dian[i].y;\n\t}\n\tfor(int i=0;idmax)\n\t\t\t\tdmax=d;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",dmax);\n\treturn 0;\n}"} +{"label": "70", "index": "34820", "code": "int main()\n{\n int n;\n\tdouble a[100][3];\n\tint i,j,k;\n\tdouble d;\n\tdouble max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t {\n\t\t\t max=d;\n\t\t\t }\n\t\t }\n\t}\n\tmax=pow(max,0.5);\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34821", "code": "void main()\n{\n\tint i,j,n;\n\tdouble a[20][2],d;\n\tscanf(\"%d\\n\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=2;j++)\n\t\t{\n\t\t\tscanf(\"%lf\",&a[i][j]);\n\t\t}\n\t}\n\td=0;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=i+1;j<=n;j++)\n\t\t{\n\t\t\tif(ds[w+1])a=a;\n\t else a=s[w+1];\n }\n printf(\"%.4f\\n\",a);\n \n return 0;\n }\n \n"} +{"label": "70", "index": "34823", "code": "void main()\n{\n\tdouble t[1000],y[1000],max,s;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=1;i<=n;i++)\n\t{scanf(\"%lf\",&t[i]);\n\t scanf(\"%lf\",&y[i]);\n\t}\n\tmax=0;\n\tfor (i=1;i<=n;i++)\n\tfor (j=i;j<=n;j++)\n {s=sqrt((t[i]-t[j])*(t[i]-t[j])+(y[i]-y[j])*(y[i]-y[j]));\n if (s>=max) max=s;\n\t}\n\tprintf(\"%.4f\",max);\n}\n\n"} +{"label": "70", "index": "34824", "code": "main()\n{\nint n,m;\nscanf(\"%d\",&n);\nm=n*(n-1)/2;\ndouble a[n][2],dis[m];\nint i,j,k;\nk=0;\nfor(i=0;imax)\nmax=dis[k];\n}\nprintf(\"%.4f\",max);\n}\n\n\n\n"} +{"label": "70", "index": "34825", "code": "int main()\n{ \n\tdouble n,x[100],y[100],distance[100][100],max=0;\n\tint i,j;\n\tcin>>n;\n\tfor(i=0;i>x[i]>>y[i];\n\t}\n for(i=0;imax)\n\t\tmax=distance[i][j];}\n\tcout<>n;\n\tfor(i=0;i>a[i]>>b[i];\n\t}\n\tfor(i=0;idis*dis)\n\t\t\t{\n\t\t\t\tdis=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\n}"} +{"label": "70", "index": "34827", "code": "double x[1000], y[1000];\ndouble Calc_Dis(int i,int j)\n{\n\tdouble ret;\n\tret = sqrt( (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]) );\n\treturn ret;\n}\n\nint main()\n{\n\tint n;\n\tcin >> n;\n\tfor(int i = 0; i < n; i++)\n\t\tcin >> x[i] >> y[i];\n\tdouble dis, maxd = 0;\n\tfor(int i = 0; i < n; i++)\n\t{\n\t\tfor(int j = i+1; j < n; j++)\t\n\t\t{\n\t\t\tdis = Calc_Dis(i,j);\n\t\t\tif(dis > maxd)\n\t\t\t\tmaxd = dis;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",maxd);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34828", "code": "int main() //????\n{\n\tint n,i,j,I; //??????n?????i,j,I???\n\tcin>>n;\n\tif(n<2)\n\t\treturn 0;\n\telse\n\t{\n\t\tdouble dis=0,temp1,temp2,temp3; //??????dis?????temp1,temp2,temp3???????\n\t\tdouble a[100][2];\n\t\tfor(I=0;I>a[I][0]>>a[I][1];\n\t\tfor(i=0;i>n;\n\tif(n<2)\n\t\treturn 0;\n\tdouble a[100][2];\n\t{\n\t for(i=0;i>a[i][j];\n\t\t \n\t}\n\tint k;\n\tdouble m,temp,dis;\n\tdis=0;\n\tfor(i=0;imax)\n max=sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)*(a[i].y-a[j].y));\n }\n printf(\"%.4lf\\n\",max);\n\n return 0;\n}"} +{"label": "70", "index": "34832", "code": "int main()\n{\n int n,i,j;\n double a[100][2],s,max=0;\n scanf(\"%d\",&n);\n for(i=0;imax) max=s;}\n \n }\n printf(\"%.4lf\",sqrt(max));\n return 0;\n}\n\n"} +{"label": "70", "index": "34833", "code": "int main()\n{\nint i,j,n;\ndouble a[100][2],m,dis;\ncin>>n;\nfor (i=0;i<=n;i++)\ncin>>a[i][0]>>a[i][1];\nm=0;\nfor (i=0;im)\nm=dis;\n}\ncout<max)max=temp;\n}\n"} +{"label": "70", "index": "34835", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tdouble l,max;\n\tmax=0;\n\n\tstruct {\n\t\tdouble a,b;\n\t} s[100];\n\tscanf (\"%d\",&n);\n\tfor (i=0;imax) max=l;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\t"} +{"label": "70", "index": "34836", "code": "int main()\n{\n double *x,*y,t;\n int n,i,j;\n scanf(\"%d\",&n);\n x=(double*)(malloc(n*sizeof(int)));\n y=(double*)(malloc(n*sizeof(int)));\n for(i=0;it)\n t=pow((x[j]-x[i]),2)+pow((y[j]-y[i]),2);\n }\n }\n printf(\"%.4f\\n\",sqrt(t));\n return 0;\n}\n"} +{"label": "70", "index": "34837", "code": "double f(double a,double b)\n{\n\tdouble z;\n\tz=sqrt(a*a+b*b);\n\treturn(z);\n}\nvoid main()\n{\n\tint n,i,j;\n\tdouble a[100],b[100],c[100],max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic[i])\n\t\t\t\tc[i]=f(a[j]-a[i],b[j]-b[i]);\n\t\t}\n\t}\n\tfor(i=0;imax)\n\t\t\tmax=c[i];\n\t}\n\tprintf(\"%.4f\",max);\n}\n\n\n\n\n"} +{"label": "70", "index": "34838", "code": "double k[1000][2];\ndouble work(int i,int j)\n{\n\tdouble result;\n\tresult=sqrt( pow(k[i][0]-k[j][0],2) +pow( k[i][1] - k[j][1] ,2 ) );\n\treturn result;\n}\nint main()\n{\n\tdouble max=0;\n\tint m,i=0,j;\n\tcin>>m;\n\tdouble s;\n\tfor(i=0;i>k[i][0]>>k[i][1];\n\t}\n\tfor(i=0;imax)\n\t\t\t\tmax=s;\n\t\t}\n\t}\n\tcout<d)\n\t\t\t\td=f(a[i],a[j],b[i],b[j]);\n\t\t}\n\t}\n\td=(float)d;\n\tprintf(\"%.4f\\n\",d);\n}\ndouble f(float x,float y,float z,float w)\n{\n\tdouble s;\n\ts=sqrt((x-y)*(x-y)+(z-w)*(z-w));\n\treturn(s);\n}\n"} +{"label": "70", "index": "34840", "code": "double len(double a,double b,double c,double d)\n{ double le1,le2,op;\n le1=(a>c?a:c)-(ad?b:d)-(b>n; //??????\n\tmax=0;\n\tfor(i=0;i>x[i]>>y[i]; //???????\n\tfor(i=0;i=max)max=m;\n\t\t\tj++;\n\t\t};\n\t\ti++;\n\t};\n\tprintf(\"%.4f\\n\",max); //??\n\treturn 0;\n}"} +{"label": "70", "index": "34842", "code": "int main()\n{\n int n=0,k=0,max=0;\n cin>>n;\n double x[200],y[200],dis[2000];\n for(int i=0;i>x[i]>>y[i];\n for(int i=0;imax)\n max=l;\n }\n d[i][2]=max;\n max=0;\n }\n for(int i=0;imax)\n max=d[i][2];\n }\n printf(\"%.4f\",sqrt(max));\n}\n"} +{"label": "70", "index": "34844", "code": "int main()\n{\n\tint n,i,j,k;//????\n\tdouble a[100]={0},t=0,d;//????\n\tcin>>n;//????n\n\tfor(i=1;i<=2*n;i++)\n\t\tcin>>a[i];//??????\n\tfor(j=1;j<=n;j++)\n\t{\n\t\tfor(k=j+1;k<=n;k++)\n\t\t{\n\t\t\td=sqrt((a[2*j-1]-a[2*k-1])*(a[2*j-1]-a[2*k-1])+(a[2*j]-a[2*k])*(a[2*j]-a[2*k]));//??????????\n\t\t if(d>t)t=d;//??d>t,t=d\n\t\t}\n\t}\n\tcout<max)\n\t\t\t\tmax=a;\n printf(\"%.4lf\\n\",sqrt(max));\n}"} +{"label": "70", "index": "34846", "code": "int main()\n{\n\tstruct point{\n\t\tdouble x;\n\t\tdouble y;\n\t};\n\tstruct point point[500];\n\tdouble distance[500];\n\tint n,i,j;\n\tdouble max=0,Max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=distance[j];\n\t\t}\n\t\tif(max>Max)\n\t\t\tMax=max;\n\t}\n\tprintf(\"%.4lf\\n\", Max);\n\treturn 0;\n}"} +{"label": "70", "index": "34847", "code": "void main()\n{\n\tint i,j,k;\n\tint n;\n\tdouble dot[100][2];\n\tdouble distf=0;\n\tdouble ld=0;\n\tdouble dist=0;\n\tdouble x,y;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ild)\n\t\t\t\tld=dist;\n\t\t\t}\n\t\tprintf(\"%.4f\\n\",ld);\n}\n \n \n \n"} +{"label": "70", "index": "34848", "code": "int main(int argc, char* argv[])\n{\n\tstruct point{\n\t\tdouble x,y;\n\t}dian[1000];\n\tint n,i,j;\n\tdouble mdis=0,dis;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=d;\n }\n }\n printf(\"%.4lf\\n\", max);\n return 0;\n}\n "} +{"label": "70", "index": "34850", "code": "struct point\n{ double x;\n double y;\n};\nvoid main()\n{\n\tstruct point a[50];\n\tint i,j,n,k=0;\n\tdouble max,b[50];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\n\t}\n\tprintf(\"%.4lf\\n\",max);\n}\n\t\t\t\n"} +{"label": "70", "index": "34851", "code": "struct dian { double a; double b; }dia[20]; \nvoid main() \n { \nint n,i,j; double max,dis; scanf(\"%d\",&n); \nfor(i=0;imax) \n max=(dia[i].a-dia[j].a)*(dia[i].a-dia[j].a)+(dia[i].b-dia[j].b)*(dia[i].b-dia[j].b); \n } \n} \n dis=sqrt(max); \nprintf(\"%.4lf\",dis); \n} "} +{"label": "70", "index": "34852", "code": "int main()\n{\n\tint n,i,j,k;\n\tcin>>n;\n\tdouble x,y,z=0,l,a[100],b[100];\n\tfor (i=0;i>x>>y;\n\t\ta[i]=x,b[i]=y;\n\t}\n\tfor (j=0;jz)\n\t\t\t\tz=l;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",pow(z,0.5));\n\treturn 0;\n}"} +{"label": "70", "index": "34853", "code": "int main(int argc, char* argv[])\n{int n,i=0;\n\tint p,j;\n\t\n\tscanf(\"%d\\n\",&n);\n\tstruct point{\n\t\tfloat x,y;\n\t}top[1000];\n \n\tdouble distance,max1=0;\n\tfor(i=0;i=max1){\n\t\t\t\tmax1=distance;\n\t}\n\t}\n\t}\n\tprintf(\"%.4f\\n\",max1);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34854", "code": "int main()\n{\n int n;\n double a[2000],b[2000];\n int i,j;\n cin>>n;\n for(i=1;i<=n;i++)\n cin>>a[i]>>b[i];\n double max=0;\n for(i=1;i<=n-1;i++)\n for(j=i+1;j<=n;j++)\n if(sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]))>max)\n max=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n cout<dis)?ans:dis);\n }\n }\n printf (\"%.4f\\n\",ans);\n}"} +{"label": "70", "index": "34856", "code": "int main()\n{\n\tint i,j,n;\n\tscanf(\"%d\",&n);\n\tdouble m=0,a[n],b[n];\n\tfor(i=0;im)\n\t\t\t m=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n\t\t}\n\t}\n\tprintf(\"%.4lf\",m);\n\t\n}"} +{"label": "70", "index": "34857", "code": "void main()\n{double a[10][2],dis,t;\nint n,i,j;\nscanf(\"%d\",&n);\nfor(i=0;imax)\n\t\t\t\tmax=length;\n\t\t}\n\t\n\tprintf(\"%.4lf\",max);\n return 0;\n}\n\n"} +{"label": "70", "index": "34859", "code": "double x[1000],y[1000],s[1000][1000],m[1000];\nint main()\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(j=1;j<=n;j++)\n\t scanf(\"%lf%lf\",&x[j],&y[j]);\n\tfor(j=1;j<=n;j++)\n\t{\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t\ts[j][i]=sqrt((x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]));\n\t\t}\n\t}\n\tfor(j=1;j<=n;j++)\n\t{\n s[j][j]=0;\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t if(s[j][i]>s[j][i-1])\n\t\t {\n\t\t\t m[j]=s[j][i];\n\t\t }\n\t \telse\n\t\t\t{\n s[j][i]=s[j][i-1];\n\t\t \tm[j]=s[j][i];\n\t\t\t}\n\t\t}\n\t}\n\tdouble d=m[1];\n\tfor(j=2;j<=n;j++)\n\t{\n\t\t if(m[j]>m[j-1])\n\t\t\t d=m[j];\n\t \telse\n\t\t\t{\n m[j]=m[j-1];\n\t\t \td=m[j];\n\t\t\t}\n\t\t}\n\t printf(\"%.4f\\n\", d);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34860", "code": "int main()\n{ \n\tint n,i,j;\n\tdouble x[999],y[999],z[999],max=0.0;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&x[i],&y[i]);\n\t}\n\tfor(j=1;jmax)\n\t\t\t\t max=z[i+j];\n\t }\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34861", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tstruct point{\n\t\tdouble x,y;\n\t};\n struct point point[100];\n\tfor(i=0;ip)\n\t\t\tp=c[i];\n\t\t\t\n\t}\n\tprintf(\"%.4f\",p);\n}\n\t\t\n\t"} +{"label": "70", "index": "34863", "code": "/*?? - ??(13.7) ???? \n ?? POJ 2693?PG1009 \n?? \n?????(x,y)????????????????\n ???? \n??????n?n????2? \n?????????????????x y???\n ???? \n??????????????? \n ???? \n6\n34.0 23.0\n28.1 21.6\n14.7 17.1\n17.0 27.2\n34.7 67.1\n29.3 65.1\n ???? \n53.8516\n ?? \n????????????double???????? \n??printf(\"%.4f\\n\", dis)?????????????4?? \n*/\nvoid main()\n{\n\tint n,i,j;\n\tdouble max,a;\n\tdouble x[10],y[10],s[10];\n\tdouble f(double,double,double,double);\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(i=0;imax)\n\t\t\tmax=dis[i];\n\t\telse\n\t\t\tcontinue;\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34865", "code": "// ????.cpp : ??????????????\n//\n\n\nint main()\n{\n\tint m,n,i,j,l;\n\tdouble a[LEN][2],b[LEN],c;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic)\n\t {\n\t c=b[i];\n\t }\n\t}\n\tprintf(\"%.4lf\",c);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34866", "code": "int main()\n{\tint q=0;\n\tint k=0;\n\tint n=0;\n\tint i=0;\n\tdouble x[100];\n\tdouble y[100];\n\tdouble s[100];\n\tdouble Max=0.0;\n\tdouble Maxx=0.0;\n\tcin>>n;\n\tfor (q=0;q>x[q]>>y[q];}\n\tfor (q=0;qMax)\n\t{Max=s[i];}\n\tif(Maxxi;j--)\n {if(((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)*(a[i].y-a[j].y))>t)\n t=(a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)*(a[i].y-a[j].y);}\n }\n printf(\"%.4lf\", sqrt(t));\n return 0;\n} "} +{"label": "70", "index": "34868", "code": "int main()\n{\n\tint n,i,j;\n\tcin>>n;\n\tdouble a[100],b[100],max=0;\n\tfor(i=0;i>a[i]>>b[i];\n\t}\n\tfor(i=0;imax)\n\t\t\t{\n\t\t\t\tmax=(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]);\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",sqrt(max));\n\treturn 0;\n}\n"} +{"label": "70", "index": "34869", "code": "int main(int argc, char* argv[])\n{\n\tint i,j,n,k;\n\tscanf(\"%d\",&n);\n\tdouble a[100][2],b[100][100],max;\n\tfor (i=0;imax)\n\t\t\tmax=b[i][k];\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",max);\n\n\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34870", "code": "void main()\n{\n\tint i,j,n;\n\tdouble x[100],y[100],max,t;\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&x[0],&y[0]);\n\tscanf(\"%lf %lf\",&x[1],&y[1]);\n\tmax=pow(x[0]-x[1],2.0)+pow(y[0]-y[1],2.0);\n\tfor(i=2;imax) max=t;\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",sqrt(max));\n}"} +{"label": "70", "index": "34871", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tfloat a,dis=0;\n\tstruct point\n\t{\t\n\t\tfloat x,y;\n\t}p[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=dis)\n\t\t\t{\n\t\t\t\tdis=a;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34872", "code": "int main()\n{\n\tdouble a[10],b[10],c,max=0.0;\n\tint n,i=0,j=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=c;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34873", "code": "float max(float*d)\n{\n\tfloat maxd=0;\n\tfor(int i=0;i<1000;i++)\n\t{\n\t\tif(d[i]>maxd)\n\t\t\tmaxd=d[i];\n\t}\n\treturn maxd;\n}\nmain()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tfloat p[100][2];\n\tfloat d[1000];\n\tint i,j,k=0;\n\tfor(i=0;i<1000;i++)\n\t\td[i]=0;\n\tfor(i=0;i>n;\n\tdouble num[100][2];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>num[i][0]>>num[i][1];\n\t}\n\tdouble Mdis=0.0,dis;\n\tfor(i=1;i<=n-1;i++){\n\t\tfor(j=i+1;j<=n;j++){\n\t\t\tdis=sqrt(pow(num[i][0]-num[j][0],2)+pow(num[i][1]-num[j][1],2));\n\t\t\tif(Mdisx=a;\n\t\t(num+i)->y=b;\n\t}\n\tfor(i=0;ix-(num+j)->x)*((num+i)->x-(num+j)->x)+((num+i)->y-(num+j)->y)*((num+i)->y-(num+j)->y));\n\t\t\t if(j==i+1)\n\t\t\t \t maxd=d;\n\t\t\t else\n\t\t\t\t\t{\n\t\t\t\t if(d>maxd)\n\t\t\t\t\t maxd=d;\n\t\t\t\t\t}\t\n\t\t\t }\n\t\t\t maxd1=maxd;\n\t\t}\n\t\telse \n\t\t{\n\t\t for(j=i+1;jx-(num+j)->x)*((num+i)->x-(num+j)->x)+((num+i)->y-(num+j)->y)*((num+i)->y-(num+j)->y));\n\t\t\t if(j==i+1)\n\t\t\t \t maxd=d;\n\t\t\t else\n\t\t\t\t\t{\n\t\t\t\t if(d>maxd)\n\t\t\t\t\t maxd=d;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t } \n\t\t\tif(maxd>maxd1)\n\t\t\tmaxd1=maxd;\n\t\t}\n\t}\n\tprintf(\"%.4lf\",maxd1);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34876", "code": "int main()\n{\n int n,i,j;\n scanf(\"%d\",&n);\n double *p;double* q;double *r;\n r=(double*)malloc((n*(n-1)/2)*sizeof(double));\n p=(double*)malloc((n)*sizeof(double));\n q=(double*)malloc((n)*sizeof(double));\n for(i=0;ir[0])\n r[0]=r[i];\n }\n printf(\"%0.4f\\n\",r[0]);\n return 0;\n}\n"} +{"label": "70", "index": "34877", "code": "void main()\n{\n int n,i,j;\n double a[100][2],max;\n scanf(\"%d\",&n);\n for(i=0;imax)max=(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]);\n\t }\n }\n max=sqrt(max);\n printf(\"%.4f\\n\",max);\n}"} +{"label": "70", "index": "34879", "code": "main()\n{\n int n,i,j;\n double d,maxd=0;\n struct\n {\n double x,y;\n }pts[100];\n scanf(\"%d\",&n);\n for(i=0;imaxd)maxd=d;\n }\n }\n printf(\"%.4lf\",maxd);\n return 0;\n}\n\n"} +{"label": "70", "index": "34880", "code": "\nfloat distance(float x1,float y1,float x2,float y2)\n{\n\tfloat z;\n\tz=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);\n\tfloat d;\n\td=sqrt(z);\n\treturn d;\n}\n\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\n\tstruct {\n\t\tfloat x,y;\n\t} zuobiao[100];\n\tfloat dist[100][100];\n\t\n\tint i,j;\n\tfor(i=0;i=dis) dis=dist[i][j];\n\t\t}\n\t}\n\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34881", "code": "//\n// main.cpp\n// ????\n//\n// Created by ???? on 13-12-25.\n// Copyright (c) 2013? ????. All rights reserved.\n//\n\nint main()\n{\n int n;\n struct dis\n {\n int x;\n int y;\n double dis;\n } a[2000];\n \n double num[2000][2];\n double max=0;\n \n cin>>n;\n for(int i=1;i<=n;i++)\n {\n cin>>num[i][0]>>num[i][1];\n }\n \n int t=1;\n \n for(int i=1;i<=n;i++)\n {\n for(int j=i;j<=n;j++)\n {\n a[t].x=i;\n a[t].y=j;\n a[t].dis=sqrt( (num[i][0]-num[j][0])*(num[i][0]-num[j][0])\n + (num[i][1]-num[j][1])*(num[i][1]-num[j][1]) );\n t++;\n //cout<=max)\n max=a[i].dis;\n //cout<>n;\n\tdouble x[100],y[100];\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>x[i]>>y[i];\n\t}\n\tdouble max=d(x[1],y[1],x[2],y[2]);\n\tfor(int i=1;i<=n;i++){\n\t\tfor(int j=i+1;j<=n;j++){\n\t\t\tif(d(x[i],y[i],x[j],y[j])>max) max=d(x[i],y[i],x[j],y[j]);\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34883", "code": "double dist(double x1,double y1,double x2,double y2)\n{\n double dist;\n dist=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n return dist;\n}\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n int i,j,k;\n double length[n][n];\n double x[n],y[n];\n for(i=0;it)\n t=length[i][j];\n }\n }\n printf(\"%.4lf\",t);\n getchar();\n getchar();\n}"} +{"label": "70", "index": "34884", "code": "int main()\n{\n\tdouble max=0,m,x[1000],y[1000];\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=m;\n\t\t}\n\t\tprintf(\"%.4lf\\n\",sqrt(max));\n\t\treturn 0;\n}\n"} +{"label": "70", "index": "34885", "code": "main()\n{\nint n,i,j;\nfloat a[100][2];\nfloat s,max=0;\nscanf(\"%d\",&n);\nfor(i=1;i<=n;i++)\nscanf(\"%f %f\",&a[i][0],&a[i][1]);\nfor(i=1;i<=n;i++)\nfor(j=i+1;j<=n;j++)\n{\nif(((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]))>max)\nmax=(a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]);\n}\ns=sqrt(max);\nprintf(\"%0.4f\",s);\ngetchar();\ngetchar();\ngetchar();\n}\n"} +{"label": "70", "index": "34886", "code": "int main(int argc, char* argv[])\n{\n\tstruct point{\n\t\tfloat x;\n\t\tfloat y;\n\t}a[5000];\n\tint n,i,j;\n\tfloat q;\n\tdouble l=0,m=0,m1,m2,m3;\n\tscanf(\"%d\",&n);\n for(i=0;i=m)\n\t\t\tm=l;\t\t\t\n\t\t}\n\t}\n\tq=(float)m;\n\tprintf(\"%.4f\",q);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34887", "code": "int main()\n{\n\tint n,i,j,p=1;\n\tfloat a[100],b[100],c[10000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic[0]) {\n\t\t\t c[0]=c[p];\n\t\t\t\tp++;\n\t\t }\n\t\t}\n\t\tprintf(\"%.4f\\n\",c[0]);\n\t\treturn 0;\n}\n\n\n"} +{"label": "70", "index": "34888", "code": "int main()\n{\n\tint n, i, j;\n double t, s[1000][1000];\n\tstruct point{\n\t\tdouble x;\n\t\tdouble y;\n\t\t\n\t}place[10000];\n scanf(\"%d\", &n);\n\tfor(i=0; is[0][0])\n\t\t\t{\n\t\t\t\tt=s[0][0];\n\t\t\t\ts[0][0]=s[i][j];\n\t\t\t\ts[i][j]=t;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t\n\tprintf(\"%.4lf\\n\", s[0][0]);\n\treturn 0;\n}"} +{"label": "70", "index": "34889", "code": "\nint main(int argc, char* argv[])\n{\n\tint num,i,a,b,na=1;\n\t double x[50],y[50],z[400];\n\t double dis=0;\n\t\n\tscanf(\"%d\",&num);\n for (i=1;i<=num;i++) { \n scanf(\"%lf\",&x[i]);\n scanf(\"%lf\",&y[i]);\n\t}\n\n\tfor (a=1;a<=num;a++){\n\t\tfor(b=a+1;b<=num;b++){\n\t z[na]=(x[a]-x[b])*(x[a]-x[b])+(y[a]-y[b])*(y[a]-y[b]);\n\t\t if (z[na]>dis) {\n\t\t\t dis=z[na];}\n\t\t na++;\t\t \n\t\t}\n\t}\t\n\tprintf(\"%.4lf\\n\",sqrt(dis));\n\treturn 0;\n}\n"} +{"label": "70", "index": "34890", "code": "double x[1000],y[1000],s[1000][1000],m[1000];\nint main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint j,i;\n\tfor(j=1;j<=n;j++)\n\t{\n\t scanf(\"%lf%lf\",&x[j],&y[j]);\n\t}\n\tfor(j=1;j<=n;j++)\n\t{\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t\ts[j][i]=sqrt((x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]));\n\t\t}\n\t}\n\tfor(j=1;j<=n;j++)\n\t{\n s[j][j]=0;\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t if(s[j][i]>s[j][i-1])\n\t\t {\n\t\t\t m[j]=s[j][i];\n\t\t }\n\t \telse\n\t\t\t{\n s[j][i]=s[j][i-1];\n\t\t \tm[j]=s[j][i];\n\t\t\t}\n\t\t}\n\t}\n\tdouble d=m[1];\n\tfor(j=2;j<=n;j++)\n\t{\n\t\t if(m[j]>m[j-1])\n\t\t {\n\t\t\t d=m[j];\n\t\t }\n\t \telse\n\t\t\t{\n m[j]=m[j-1];\n\t\t \td=m[j];\n\t\t\t}\n\t\t}\n\t printf(\"%.4f\\n\", d);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34891", "code": "int main()\n{\n\tint k,i,j; //?????k??????\n\tdouble a[10000],b[10000],dissq=0; //???????????X,Y?dissq???????\n\tcin>>k; //??k?\n\tfor(i=0;i>a[i]>>b[i]; //???????X,Y?\n\t}\n\tfor(i=0;idissq)\n\t\t\t{dissq=(a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i]);} //??????????\n\t\t}\n\t}\n\t\n\tcout<>n;\n double max=0.0;\n int sum=n*(n-1)/2;\n double array[101][2];\n double distance[5001];\n for(int i=0;i>array[i][0]>>array[i][1];\n int k=0;\n for(int i=0;id) d=c[k];\n\t\t\tk++;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",d);\n}"} +{"label": "70", "index": "34894", "code": "int main()\n{\n\tint n,i,j,k;\n\tdouble distance[100],b,x[100][2],c,first;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic)\n\t\t\t\t{\n\t\t\t\t\tc=b;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdistance[k]=c;\n\t\t}\n\t}\n\tfor(k=1;kfirst)\n\t\t\t{\n\t\t\t\tfirst=distance[i];\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",first);\n\treturn 0;\n}"} +{"label": "70", "index": "34895", "code": "int main(int argc, char* argv[])\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point{\n\t\tdouble x,y;\n\t};\n\tstruct point *pp;\n\tpp=(struct point*)malloc(sizeof(point)*n);\n\tint i,j;\n\tdouble temp=0;\n\tfor(i=0;ix),&((pp+i)->y));\n\t}\n for(i=0;ii;j--)\n\t\t{\n\t\t\tif(temp<(((pp+i)->x)-((pp+j)->x))*(((pp+i)->x)-((pp+j)->x))+(((pp+i)->y)-((pp+j)->y))*(((pp+i)->y)-((pp+j)->y)))\n\t\t\t{\n\t\t\t\ttemp=(((pp+i)->x)-((pp+j)->x))*(((pp+i)->x)-((pp+j)->x))+(((pp+i)->y)-((pp+j)->y))*(((pp+i)->y)-((pp+j)->y));\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",sqrt(temp));\n\treturn 0;\n}"} +{"label": "70", "index": "34896", "code": "\n\nint main()\n{\n\tint i,n,j,m;\n\tdouble x[100],y[100],d[100][100],t=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;it){\n\t\t\t\tt=d[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",t);\nreturn 0;\n}\n"} +{"label": "70", "index": "34897", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tdouble x[9999],y[9999],ls,l;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ils) ls=l;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",ls);\n\treturn 0;\n}"} +{"label": "70", "index": "34898", "code": "int main()\n{\n\tint n,i,j;\n\tfloat x,y;\n\tstruct point\n\t{\n\t\tfloat x;\n\t\tfloat y;\n\t}p[100];\n\tdouble s;\n\tdouble smax = 0;\n\tscanf(\"%d\", &n);\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tscanf (\"%f%f\", &x, &y);\n\t\tp[i].x = x;\n\t\tp[i].y = y;\n\t}\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tfor (j=0; j < n; j++)\n\t\t{\n\n\t\t s= sqrt ( (p[i].x-p[j].x) * (p[i].x-p[j].x) + (p[i].y-p[j].y) * (p[i].y-p[j].y) );\n\t\t if (smax >= s)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsmax = s;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\" , smax);\n\treturn 0;\n}"} +{"label": "70", "index": "34899", "code": "int main()\n{\n\tint n,i,j;\n\tdouble x[1000],y[1000],s[1000][1000],max=0,d;\n\tcin>>n;\n\tfor(i=0;i>x[i]>>y[i];\n for(i=0;imax)max=s[i][j];\n\t\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34900", "code": "int main()\n{\n\tint n,i,j;\n\tdouble a[2000],b[2000],k,max=0;\n\tcin>>n;\n\tfor(i=0;i>a[i]>>b[i];\n\tfor(i=0;imax)\n\t\t\t\tmax=k;\n\t\t}\n\t\tmax=sqrt(max);\n\tcout<=c)\n c=juli(a[i][0],a[i][1],a[j][0],a[j][1]);\n }\n printf(\"%.4lf\",c);\n}\n"} +{"label": "70", "index": "34902", "code": "int main() {\n int n,N,i,j,s=0;\n cin>>n;\n\n N=n*(n-1)/2;\n \n float a[n],b[n];\n double dis[N],max=0;\n\n for(i=0; i>a[i]>>b[i];\n }\n \n for(i=0; imax) max=dis[s];\n }\n \n \n printf(\"%.4f\\n\",max);\n\n return 0;\n \n\n}\n"} +{"label": "70", "index": "34903", "code": "void main()\n{\n\tint n,i,j;\n\tdouble a[100][2],b[100][100],m=0.0;\n scanf(\"%d\",&n);\n\tfor(i=0;im)\n\t\t\t m=b[i][j];\n\t\t}\n\tprintf(\"%.4f\\n\",m);\n}"} +{"label": "70", "index": "34904", "code": "main()\n{\n int n,k,i,j; \n double s,m,x,y;\n scanf(\"%d\",&n);\n double *a=(double *)malloc((n+1)*sizeof(double));\n double *b=(double *)malloc((n+1)*sizeof(double));\n for(i=1;i<=n;i++)\n {\n scanf(\"%lf %lf\",&a[i],&b[i]);\n }\n for(m=0,i=1;i<=n-1;i++)\n {\n for(j=i+1;j<=n;j++)\n {\n x=a[j]-a[i]; y=b[j]-b[i];\n s=x*x+y*y;\n if(s>=m) m=s;\n }\n }\n double dis=sqrt(m);\n printf(\"%.4f\",dis);\n}"} +{"label": "70", "index": "34905", "code": "main()\n{\n double x[2011],y[2011],k,l,max;\n int n,j,i;\n scanf(\"%d\",&n);\n for(i=0;imax)max=k;\n }\n printf(\"%.4lf\\n\",max);\n //getchar();\n //getchar();\n } \n"} +{"label": "70", "index": "34906", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point\n\t{\n\t\tdouble x;\n\t\tdouble y;\n\t}p[100];\n \n\n\tdouble d;\n\tint i=0,j=0;\n\t\n\tdouble max=0;\n\tfor (i=0;imax)\n\t\t {\n\t\t\t max=d;\n\n\t\t }\n }\n }\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n\n}"} +{"label": "70", "index": "34907", "code": "\nint main(int argc, char* argv[])\n{\n\tdouble a,b,t;\n double max=0.0;\n\tint n,i,j;\n scanf(\"%d\",&n);\n\n double s[100][2];\n\t\n for(i=0;i<=n-1;i++)\n\t{ \n\t\tscanf(\"%lf%lf\",&s[i][0],&s[i][1]);\t\n\t}\n\n for(j=0;j<=n-2;j++)\n\t{\n\t\tfor(i=0;i<=n-j-1;i++)\n\t\t{\n\t\t\ta=(s[j][0]-s[j+i][0])*(s[j][0]-s[j+i][0]);\n b=(s[j][1]-s[j+i][1])*(s[j][1]-s[j+i][1]);\n\t\t t=sqrt(a+b);\n if(t>max)\n\t max=t;\t\n\t\t}\n\n\n\n\t}\n\n printf (\"%.4f\\n\",max);\n\n\n\treturn 0;\n}\n\t\n"} +{"label": "70", "index": "34908", "code": "double dis(double x,double y)\n{\n double s;\n s=sqrt(x*x+y*y);\n return s; \n}\nmain()\n{\n double a[L]={0},b[L]={0},S[L]={0};\n int n,i,j,k;\n double D;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%lf %lf\",&a[i],&b[i]); \n }\n for(i=1;imax)\n max=s; \n }\n S[i]=max; \n }\n for(i=1;iD)\n D=S[i]; \n }\n printf(\"%.4lf\",D);\n getchar();\n getchar(); \n getchar();\n getchar();\n}\n"} +{"label": "70", "index": "34909", "code": "main()\n{\n int n,i,j;\n float dis;\n scanf(\"%d\",&n);\n float d[n][2];\n for(i=0;idis)\n dis=(d[i][0]-d[j][0])*(d[i][0]-d[j][0])+(d[i][1]-d[j][1])*(d[i][1]-d[j][1]);\n \n }\n }\n dis=sqrt(dis);\n printf(\"%.4f\\n\",dis);\n \n}\n "} +{"label": "70", "index": "34910", "code": "//?????\n\nvoid main()\n{\n\tint n,i,j,k=0;\n\tdouble dot[100][2],dis[4950],t,m;\n\tdouble max(double a[],int n);\n\tscanf(\"%d\",&n);\n\tfor(i=0;it)\n\t\t\tt=a[i];\n\t}\n\treturn(t);\n}"} +{"label": "70", "index": "34911", "code": "//????\nint main()\n{\n\tint n,i,j;\n\tdouble max=0,lmax,a[100],b[100],s[100][100];\n cin>>n; //????\n\tfor(i=0;i>a[i]>>b[i]; //??????\n\tfor(i=0;imax) max=s[i][j]; //?????????????\n\t\t}\n\t}\n lmax=sqrt(max); \n\tcout<max){\n\t\t\t\t\tmax=d;\n\t\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34914", "code": "void main()\n{\n\tint n, i = 1, j = 1;\n\tdouble dis, x[100], y[100], d[100][100];\n\t\t\tscanf(\"%d\\n\", &n);\n /*??????*/\n\tfor(i = 1; i <= n; i++)\n\t\tscanf(\"%lf %lf\\n\", &x[i], &y[i]);\n\n /*????????*/\n\tfor(i = 1; i <= n; i++)\n\t{\n\t\tfor(j = 1;j <= n; j++)\n\t\t\td[i][j] = sqrt((x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i]));\n\t}\n /*???????*/\n\tdis = d[1][1];\n\tfor(i = 1; i <= n; i++)\n\t{\n\t\tfor(j = 1;j <= n; j++)\n\t\t{\n\t\t\tif (d[i][j] >= dis)\n\t\t\t\tdis = d[i][j];\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\t\n}"} +{"label": "70", "index": "34915", "code": "double dis(double a,double b,double c,double d)\n{\n\tdouble k;\n\tk=sqrt((a-c)*(a-c)+(b-d)*(b-d));\n\treturn(k);\n}\nvoid main()\n{\n\tint n,j,i;\n\tdouble a[100],b[100],max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=dis(a[i],b[i],a[j],b[j]);\n\t\t}\n\tprintf(\"%.4f\\n\",max);\n}\n\n\n\n"} +{"label": "70", "index": "34916", "code": "int main(int argc, char* argv[])\n{ \n\tint n;\n double x0,y0,s=0,w;\n\tstruct dian { double x,y;} *d;\n\tscanf(\"%d\",&n);\n\td=(struct dian *) malloc(sizeof(dian)*n);\n\tfor(int j=0;jx=x0;\n\t\t(d+j)->y=y0;\n\t\n\t}\n\tfor( int l=0;lx-(d+k)->x)*((d+l)->x-(d+k)->x)+((d+l)->y-(d+k)->y)*((d+l)->y-(d+k)->y);\n\t\t\tif(s=max1){\nmax1=dis;\n}\n}\nif(max1>=max2){\nmax2=max1;\n}\n}\nprintf(\"%.4f\",max2);\nreturn 0;\n}"} +{"label": "70", "index": "34918", "code": "\nint main()\n{\n\tint n, i, m, j, l, k;\n\tdouble a[100][2];\n\tdouble b[100][100];\n\tdouble dis=0;\n\tscanf (\"%d\", &n);\n\tfor (i=0; idis )\n\t\t\t{\n\t\t\t\tdis=b[k][l];\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\", dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34919", "code": "int main(int argc, char* argv[])\n{\n\tstruct point\n\t{double x,y;}p[100];\n\t\n\tint i,j,n;\n\tdouble maxd =0.0, d;\n\tscanf(\"%d\", &n);\n\tfor (i=0; i maxd)\n\t\t\t\tmaxd = d;\n\t\t}\n\t}\n\tprintf (\"%.4lf\\n\",maxd);\n\n\treturn 0;\n}\n"} +{"label": "70", "index": "34920", "code": "struct location\n{\ndouble x;\ndouble y;\n};\nstruct location a[1000];\nint main ()\n{\nint n,i,j;\ndouble max=0;\nscanf (\"%d\",&n);\nfor (i=0;imax)\nmax= sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)*(a[i].y-a[j].y));\n}\n}\nprintf (\"%.4lf\",max);\n}"} +{"label": "70", "index": "34921", "code": "int main()\n{\n\tint n,i,j;\n\tdouble s,a[10][2],x=0;\n\tcin>>n;\n for(i=0;i>a[i][j];}\n\tfor(i=0;ix) x=s;}}\n\tprintf(\"%.4f\\n\",x);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34922", "code": "main()\n{\n \n int n,i,j;\n scanf(\"%d\",&n);\n double a[n],b[n],max;\n for(i=0;imax)\n max=sqrt((a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i]));\n }\n }\n printf(\"%.4lf\\n\",max);\n} \n \n"} +{"label": "70", "index": "34923", "code": "int main()\n{\n\tint i,n,a,c;\n\tdouble x[100],y[100],l[1000],lmax,u,v,r;\n\tscanf(\"%d\",&n);\n\tc=1;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&x[i],&y[i]);\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(i>=2)\n\t\t{\n\t\t\tfor(a=1;a=2)\n\t\t\t\t{\n\t\t\t\t\tif(l[c-1]>lmax)\n\t\t\t\t\t{\n\t\t\t\t\t\tlmax=l[c-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(c-1==1)\n\t\t\t\t{\n\t\t\t\t\tlmax=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",lmax);\n\treturn 0;\n}"} +{"label": "70", "index": "34924", "code": "void main ( )\n{\n\tint m,i,j;\n\tfloat a[100],b[100],c[100],d;\n\tscanf(\"%d\",&m);\n\tfor(i=0;ic[i])\n\t\t\t\tc[i]=d;\n\t\t}\n\t}\n\t\tfor(i=0;ic[i+1])\n\t\t\t{\n\t\t\t\td=c[i];\n\t\t\t c[i]=c[i+1];\n\t\t\t\tc[i+1]=d;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%.4f\\n\", c[m-2]);\n}\n\n\n\t\t\t"} +{"label": "70", "index": "34925", "code": "struct raul\n\t{\n\t\tdouble a1;\n\t\tdouble a2;\n\t\tdouble b1;\n\t\tdouble b2;\n\t\tdouble c;\n\t}dian[100],t;\n\nint main()\n{\n\tint n;\n\tcin>>n;\n\tint i;\n\tdouble a[50][2];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i][0]>>a[i][1];\n\t}\n\tint j,m=1;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=i+1;j<=n;j++)\n\t\t{\n\t\t\tdian[m].a1=a[i][0];\n\t\t\tdian[m].a2=a[i][1];\n\t\t\tdian[m].b1=a[j][0];\n\t\t\tdian[m].b2=a[j][1];\n\t\t\tdian[m].c=(a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]);\n\t\t\tdian[m].c=sqrt(dian[m].c);\n\t\t\tm++;\n\t\t}\n\t}\n\tdouble max=dian[1].c;\n\tfor(i=2;i<=m;i++)\n\t{\n\t\tif(dian[i].c>max)\n\t\t\tmax=dian[i].c;\n\t}\n\tcout<>N;\n double f[100][2],m=0;\n for (int i=1;i<=N;i++){\n cin>>f[i][0]>>f[i][1];\n for (int j=1;jmaxd) maxd=d;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",maxd);\n\tfree(point);\n\n\treturn 0;\n}\n"} +{"label": "70", "index": "34929", "code": "int main(){\n\tint n,i,r;\n\tdouble M,L;\n\tdouble max[10];\n\tdouble x[10];\n\tdouble y[10];\n\tscanf(\"%d\",&n);\n for(i=0;i=max[i-1])\n\t\t\t\tM=max[i];\n\t\t\telse {\n\t\t\t\tmax[i]=max[i-1];\n\t\t\t M=max[i];\n\t\t\t}\n\t\t};\n\t\t\n\t};\n\tL=sqrt(M);\n\tprintf(\"%.4f\\n\",L);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34930", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i;\n\tdouble x[1000],y[1000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;idi)\n\t\t\t{\n\t\t\t\tdi=d;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",di);\n\n\n\treturn 0;\n}\n"} +{"label": "70", "index": "34931", "code": "\ndouble d(double x1,double y1,double x2,double y2)\n{\n double k;\n k=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n return k;\n}\n\nmain()\n{\n int n;\n int i,j,k;\n double x,y;\n double a[100];\n double b[100];\n double c[100];\n scanf(\"%d\",&n);\n for(i=0;imax)\n max=c[i];\n }\n printf(\"%.4f\\n\",max);\n \n \n}\n"} +{"label": "70", "index": "34932", "code": "int main(int argc,char*argv[])\n{\n\tint i,j,n;\n\tdouble*x,*y,max=0,l;\n\tscanf(\"%d\",&n);\n\tx=(double*)malloc(sizeof(double)*n);\n\ty=(double*)malloc(sizeof(double)*n);\n\tscanf(\"%lf%lf\",&x[0],&y[0]);\n\tfor(i=1;imax)\n\t\t\t{\n\t\t\t\tmax=l;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\",max);\n\treturn 0;\n}\n\n\n\t\n\n"} +{"label": "70", "index": "34933", "code": "\nint main(int argc, char* argv[])\n{int z=0,n,x,y,i,b,k;\ndouble dis;\n\tfloat dian[100][100];\n double bijiao[100];\n\n\tscanf(\"%d\",&n);\n for (x=0;xdis)\n\t\t\t\t{dis=bijiao[b];}\n\t\telse {dis=dis;}\n\t\t}\n\tprintf(\"%.4f\\n\",dis);\n\t\t\t\n\treturn 0;\n}\n"} +{"label": "70", "index": "34934", "code": "\nint main(int argc, char* argv[])\n{\n\tint n, i, j, a;\n\tdouble x[1000], y[1000];\n\tdouble d, D=0;\n\tscanf(\"%d\", &n);\n\tfor(a=1;a<=n;a++)\n\t{\n\t\tscanf(\"%lf%lf\", &x[a], &y[a]);\n\t}\n for(i=1;ibi)\n\t\tbi=x[i];\n\t}\n\treturn(bi);\n}\n\n\t"} +{"label": "70", "index": "34936", "code": "int main()\n{\n\tint i,n,k=0,j;\n\tcin>>n;\n double x[100],y[100],d[1000],dis=0;\n\tfor(i=0;i<=999;i++) d[i]=0;\n\tfor(i=0;i>x[i]>>y[i];\n\t}\n\tfor(i=0;idis)\n\t\t dis=d[k];\n\t}\n printf(\"%.4f\\n\", dis);\n\t\treturn 0;\n}\n\t"} +{"label": "70", "index": "34937", "code": "main()\n{\n int n;\n double max=0,d;\n scanf(\"%d\",&n);\n double *a=(double *)malloc(n*sizeof(double ));\n double *b=(double *)malloc(n*sizeof(double ));\n for(int i=0;imax)\n max=d;\n }\n printf(\"%.4lf\\n\",max);\n free(a);\n free(b);\n}\n"} +{"label": "70", "index": "34938", "code": "void main()\n{\n\tdouble len,lenmax,x[100],y[100];\n\tint i,j,n;\n\tlenmax=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&x[i],&y[i]);\n\t}\n\tfor(i=0;i<=n-2;i++)\n\t{ \n for(j=i+1;j<=n-1;j++)\n\t\t{\n len=sqrt((x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]));\n\t\t if(len>lenmax)\n\t\t\t lenmax=len;\n\n\t\t}\n\t}\n\t\n printf(\"%.4lf\\n\", lenmax);\n}"} +{"label": "70", "index": "34939", "code": "\nint main()\n{\n\t\tint n;\n\t\tdouble z,x[1000],y[1000];\n\t\tcin>>n;\n\t\tfor (int i=1;i<=n;i++) cin>>x[i]>>y[i];\n\n\t\tfor (int i=1;i<=n;i++)\n\t\tfor (int j=1;j<=n;j++)\n\t\t\t\tif ((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])>z)\n\t\t\t\tz=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);\n\t\t \tcout<>n;}\n"} +{"label": "70", "index": "34940", "code": "\nint main()\n{\n\tstruct {\n\t\tdouble x,y;\n\t} a[PI];\n\n\tint i,j,num;\n\tdouble max,tmp1,tmp2;\n\n\tscanf(\"%d\",&num);\n\tmax=0;\n\tfor (i=0;imax)\n\t\t\t{\n\t\t\t\tmax=(float)tmp2;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\",max);\t\n\treturn 0;\n}"} +{"label": "70", "index": "34941", "code": "int main()\n{\n int n;\n scanf(\"%d\",&n);\n double x[1000],y[1000];\n double dt,dtmax=0;\n for(int m=0;m=b&&a>=m) m=a;\n\t\t if(b>a&&b>=m) m=b;\n\t\t if(m>a&&m>b) m=m;\n\t\t}\n\t}\n\tprintf(\"%.4f\",sqrt(m));\n\treturn 0;\n}"} +{"label": "70", "index": "34943", "code": "int main()\n{\n int n,i,j;\n double a[200],b[200],d[200][200],k=0;\n scanf(\"%d\",&n);\n for(i=0;imax) max=dis[a];\n\t }\n\t printf(\"%.4f\\n\",max);\n \n\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34945", "code": "double length(double a,double b,double c,double d)\n{\n\tdouble l;\n\tl=(a-c)*(a-c)+(b-d)*(b-d);\n\tl=sqrt(l);\n\treturn l;\n}\nint main()\n{\n\tint n;\n\tcin>>n;\n\tdouble a[1000];\n\tdouble b[1000];\n\tint i,j;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a[i]>>b[i];\n\t}\n\tdouble max=0;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=i;j<=n;j++)\n\t\t{\n\t\t \tif(length(a[i],b[i],a[j],b[j])>max)\n\t\t \tmax=length(a[i],b[i],a[j],b[j]);\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", max);\n\treturn 0;\n\t\n}"} +{"label": "70", "index": "34946", "code": "int main()\n{\n\tint n,i,j;\n\tfloat farest;\n\tfloat a[100][2],d[100][100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;id[i][j+1])\n\td[i][j+1]=d[i][j];};}\n\tfor(i=0;id[i+1][n-1])\n\td[i+1][n-1]=d[i][n-1];}\n\n\tfarest=sqrt(d[n-1][n-1]);\n\tprintf(\"%.4f\\n\",farest);\n\treturn 0;\n}"} +{"label": "70", "index": "34947", "code": "main()\n{\n int n,i,j;\n double *px,*py,f=0,d;\n scanf(\"%d\",&n);\n px=(double *)malloc(n*sizeof(double));\n py=(double *)malloc(n*sizeof(double));\n for(i=0;im) m=l;\n\t\t}\n\t}\n\tM=sqrt(m);\n\tprintf(\"%.4lf\\n\",M);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34949", "code": "int main()\n{\nint n,m,i,j;\ndouble s=0,l=0;\ndouble x[1000],y[1000];\nscanf(\"%d\",&n);\nfor(m=0;ms[i]?max:s[i];\n\tmax=pow(max,0.5);\n\tprintf(\"%.4f\",max);\n}"} +{"label": "70", "index": "34951", "code": "int main()\n{\n\tint n,sum=0,i,j;\n\tdouble points[2][100]={0},dis[200]={0},max=0;\n\tcin>>n;\n\tfor(i=0;i>points[0][i]>>points[1][i];\n\tfor(i=0;imax)\n\t\t\tmax=dis[i];\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34952", "code": "int main(int argc, char* argv[])\n{\n\tstruct {\n\t\tdouble x,y;\n\t}zb[number];\n\t int n;\n\t\tdouble dis;\n\t\tdouble max=0.0;\n\tint i,j;\n\tscanf(\"%d/n\",&n);\n\tfor(i=0; imax){\n\t\t\tmax=dis;\n\t\t\t}\n\t\t}\n\t\t\t}\n\tprintf(\"%.4f\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34953", "code": "\n\nint main()\n{int i,j,n,t=0;\ndouble x ,a[1000],b[1000],c[1000][1000];\nscanf(\"%d\",&n);\nfor(i=0;imax)max=d;\n\t\t\t\n\n\t\t}\n\tprintf(\"%.4lf\\n\",max);\n\t\n}\n\t"} +{"label": "70", "index": "34955", "code": "void main()\n{\nint m;\ndouble k;\nscanf(\"%d\",&m);\nif(m==6)\nk=53.8516;\nif(m==9)\nk=56.3285;\nprintf(\"%.4f\\n\",k);\n}"} +{"label": "70", "index": "34956", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i,j,m;\n\tint num;\n\tdouble *dis,a;\n\tstruct point\n\t{\n\t double x,y;\n\t};\n\tpoint *dot;\n\tscanf(\"%d\",&n);\n\tdot=(struct point*)malloc(sizeof(point)*n);\n\t\n\t\n\tfor(i=0;ix),&((dot+i)->y) );\n\t} //?????\n\n num=(n*(n-1)/2);\n\tdis=(double*)malloc(sizeof(double)*num);//????????\n\n \n for (m=0,i=0;ix-(dot+j)->x)*((dot+i)->x-(dot+j)->x) + ((dot+i)->y-(dot+j)->y)*((dot+i)->y-(dot+j)->y) );\n\t\t}\n\t}//?????????\n\n\n for(m=0;m<(num-1);m++)\n\t{\n\t\tif(dis[m]>dis[m+1])\n\t\t{\n\t\t a=dis[m+1];\n\t dis[m+1]=dis[m];\n\t\t dis[m]=a;\n\t\t}\n\t}//?????????\n\n \tprintf(\"%.4f\\n\",dis[num-1]);\n\tfree(dot);\n\tfree(dis);\n\treturn 0;\n}\n"} +{"label": "70", "index": "34957", "code": "\nvoid main()\n{\n\tint i,j,num;\n\tdouble mid,max=0;\n\tfloat point[100][2];\n\n\tscanf(\"%d\",&num);\n\n\tfor(i=0;imax)\n\t\t\t{\n\t\t\t\tmax=mid;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",sqrt(fabs(max)));\n}"} +{"label": "70", "index": "34958", "code": "void main()\n{\n\tint n,i,j,k;\n\tdouble a[100][2],dis[5000],max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\t\tmax=dis[i];\n\t\t\t\tprintf(\"%.4lf\\n\",max);\n}\n\n\n"} +{"label": "70", "index": "34959", "code": "int main()\n{\n int n;\n cin>>n;\n double x[100],y[100],dis[10000];\n for(int i=0;i>x[i]>>y[i];\n }\n int count=0;\n for(int i=0;imax)\n\t\tmax=dis[start];\n }\n cout<>n;\n if(n<2)\n return 0;\n double x[n],y[n],m; //?????? ????????? \n for(int i=0;i>x[i]>>y[i];\n m=sqrt((x[1]-x[2])*(x[1]-x[2])+(y[1]-y[2])*(y[1]-y[2])) ;\n for(int i=0;i>n;\n for(i=1;i<=n;i++)\n {\n cin>>a[i]>>b[i];\n }\n for(i=1;i<=n-1;i++)\n {\n for(j=i+1;j<=n;j++)\n {\n ll[i][j]=pow((a[i]-a[j]),2)+pow((b[i]-b[j]),2);\n if(ll[i][j]>max) max=ll[i][j];\n }\n }\n printf(\"%.4f\\n\",sqrt(max));\n return 0;\n}\n"} +{"label": "70", "index": "34962", "code": "int main()\n{\n int num;\n double x[100],y[100];\n cin>>num;\n for(int i=1;i<=num;i++)\n {\n cin>>x[i]>>y[i];\n }\n double dis[100][100]={0,};\n double temp_dis=0;\n for(int i=1;ik)\n k=z[i][j];\n } \n printf(\"%.4f\",k);\n \n }"} +{"label": "70", "index": "34964", "code": "main()\n{\n int n;\n scanf(\"%d\",&n);\n float a[n][2];\n for(int i=0;idis)\n dis=sqrt((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]));\n }\n }\n printf(\"%.4f\\n\",dis);\n}"} +{"label": "70", "index": "34965", "code": "int main()\n{\n\n int n=0,i=0,a=0,b=0;\n double d=0,s=0;\n double x[5000],y[5000];\n cin>>n;\n for(i=0;i>x[i]>>y[i];\n\n\n for(a=0;amax)\n\t\t\t\tmax=y;\n\t\t}\n\t\t\n\t\tprintf(\"%.4lf\\n\",max);\n\t\treturn 0;\n\t\t\n\n}\n\n"} +{"label": "70", "index": "34967", "code": "\n\ndouble dist( double x1, double y1, double x2, double y2 ){\n\tdouble f;\n\tf = sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );\n\treturn(f);\n}\n\nchar main() {\n\tint n, i, j;\n\tdouble x[1000], y[1000], ll[1000][1000]={{0},{0}}, l[1000]={0}, dis=0;\n\tscanf( \"%d\", &n );\n\tfor( i=0; i l[i] ) {\n\t\t\t\tl[i] = ll[i][j];\n\t\t\t}\n\t\t}\n\t\tif( l[i] > dis ) {\n\t\t\tdis = l[i];\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", dis);\n}\n\n"} +{"label": "70", "index": "34968", "code": "main()\n{\n\tint n,i,k,p;\n\tscanf(\"%d\\n\",&n);\n\tdouble a[100];\n\tdouble b[100];\n\tfor(i=0;ic[l+1])\n\t\t{\n\t\t\tc[l+1]=c[l];\n\t\t}\n\t}\n\tprintf(\"%.4lf\",sqrt(c[k-1]));\n}\n"} +{"label": "70", "index": "34969", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j,diji=0;\n\tdouble a,b,distance,d,max=0;\n\tstruct point{\n\t double x;\n\t\tdouble y;\n\t};\n\tstruct point*dian;\n\tscanf(\"%d\",&n);\n\tdian=(struct point*)malloc(sizeof(struct point)*n);\n\tfor(i=0;imax)max=distance;\n\t\t}\n\t}\n printf(\"%.4f\\n\",max);\n\n\n\treturn 0;\n}\n"} +{"label": "70", "index": "34970", "code": "int main(){\n\tint n,i=0,j=0,m=1;\n\tdouble dis,dist=0;\n\tscanf(\"%d\",&n);\n\tdouble plx[n],ply[n];\n\tfor(i=0;i=dist){\n\t\t\t\tdist=dis;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",dist);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34971", "code": "\nint main() {\n\tdouble distance = 0;\n\tdouble max = 0;\n\tdouble point[200][2] = {0};\n\tint n;\n\tcin >> n;\n\tfor(int i = 0; i < n; i++) { // store the position of each point\n\t\tcin >> point[i][0] >> point[i][1];\n\t}\n\tfor(int i = 0; i < n - 1; i++)\n\t\tfor(int j = i + 1; j < n; j++) { // calculate the distances\n\t\t\tdistance = (point[i][0] - point[j][0]) * (point[i][0] - point[j][0]) + (point[i][1] - point[j][1]) * (point[i][1] - point[j][1]);\n\t\t\tif(distance > max) max = distance;\n\t\t}\n\tmax = sqrt(max);\n\tprintf(\"%.4f\\n\", max);\n\tgetchar();\n\tgetchar();\n\treturn 0;\n}"} +{"label": "70", "index": "34972", "code": "int main()\n{\n\tdouble t,a[100][2],dd[100];\n\tint n,i,j,cnt=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;idis)\n\t\t dis=d[num];}\n\tprintf(\"%.4f\\n\",dis);\n\treturn 0;\n}"} +{"label": "70", "index": "34974", "code": "\ndouble point[2][100];\ndouble distance(int i,int j);\nvoid main ()\n{\n\tint n,i,j;\n\tdouble dis=0;\n\n\tscanf(\"%d\",&n);\n\tscanf(\"%lf %lf\",&point[0][0],&point[1][0]);\n\t\n\tfor(i=1;i>n; //??n\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>x[i]>>y[i]; //??????x[i],y[i]\n\t}\n\n\tint k=1;\n for (i=1;i<=n;i++) //???????n???\n\t{\n for (j=1;j<=n;j++) //?????\n\t\t \t\n\t\t\t { dis[k]=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])); //?????????\n\t\t\t\t k=k+1; //?k??1\n\t\t\t\t}\n\t\t \n\t}\n\n\t\t\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\tdouble max=0;\t\t //???max\t \n\t\t\t\t \n\t\t\t\t \n\tfor (k=1;k<=10000;k++) //????\n\n\t\t\n\t\t\n\t\t\t if (maxmax)\n\t{\n\t\tmax=c;\n\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\",max);\n\treturn 0;\n}"} +{"label": "70", "index": "34978", "code": "void main()\n{\n\tint i,j,k=0,n;\n\tdouble t,x[100],y[100],d[500];\n\tscanf(\"%d\",&n);\n\tfor(i=0;idistance) distance=sqrt(d);\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",distance);\n\tfree(p);\n\treturn 0;\n}\n\n\n"} +{"label": "70", "index": "34981", "code": "void main()\n{\n\tint n,i,j,k,l=0;\n\tfloat a[100],b[100],c[100],max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=(n-1);i++)\n\t\tscanf(\"%f%f\",&a[i],&b[i]);\n\tfor(j=0;j<=(n-2);j++)\n\t\tfor(k=(j+1);k<=(n-1);k++)\n\t\t{\n\t\t\tc[l]=(a[k]-a[j])*(a[k]-a[j])+(b[k]-b[j])*(b[k]-b[j]);\n\t\t l++;\n\t\t}\n\t\tmax=c[0];\n\t\tfor(i=1;i<=(l-1);i++)\n\t\tif(c[i]>max)\n\t\t max=c[i];\n\t\tprintf(\"%.4f\\n\",sqrt(max));\n}"} +{"label": "70", "index": "34982", "code": "int main()\n{\n\tint n,i,j;\n\tint k=0;\n\tdouble a[10000],b[10000],l[10000];\n\tdouble max=0.0000;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf%lf\",&a[i],&b[i]);\n\t}\n\tfor(i=1;i=2)\n\t\t{\n\t\t for(j=1;j=2)\n\t\t\t{\n\t\t\t if(l[k]>max)\n\t\t\t\t{\n\t\t\t\t max=l[k];\n\t\t\t\t}\n\t\t\t}\n\t\t\t if(k==1)\n\t\t\t {\n\t\t\t\t max=0;\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\t\treturn 0;\n}\n\n"} +{"label": "70", "index": "34983", "code": "int main(int argc, char* argv[])\n{\n\tint i,n,j;\n\tscanf(\"%d\\n\",&n);\n\tdouble a[100],b[100],max,s[1000];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%lf %lf\",&a[i],&b[i]);\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=i+1;j<=n;j++)\n\t\t{\n\t\t\ts[j-i+(2*n-i)*(i-1)/2]=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]));\n\t\t}\n\t}\n\tmax=s[1];\n\tfor(i=1;i<=(n-1)*n/2;i++)\n\t{\n\t\tif(maxi;j--){\n\t value[number]=sqrt( pow((point[i].x -point[j].x),2) +pow((point[i].y-point[j].y),2));\n\t number++;\n\t\t}\n\t}\n\t \n\tfor(i=0;ivalue[i+1]){\n\t\tturn= value[i+1];\n\t\tvalue[i+1]=value[i];\n\t\tvalue[i]=turn;\n\t\t}\n\t\telse;\n\t}\n\t\n\t\tprintf(\"%.4lf\",value[number]);\n \n return 0;\n\t\n}\n\n"} +{"label": "70", "index": "34985", "code": "void main()\n{\n\tint n,i,j;\n\tdouble y[100][99],k,x[100][2];\n\t\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy[i][j+1])\n\t\t\t {\n\t\t\t\tk=y[i][j];\n\t\t\t\ty[i][j]=y[i][j+1];\n\t\t\t\ty[i][j+1]=k;\n\t\t\t }\n\t\t}\n\t\tfor(i=0;iy[i+1][n-1])\n\t\t\t{\n \tk=y[i][n-1];\n\t\t\t\ty[i][n-1]=y[i+1][n-1];\n\t\t\t\ty[i+1][n-1]=k;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%.4lf\\n\",y[n-1][n-1]);\n}"} +{"label": "70", "index": "34986", "code": "int main()\n{ \n\nint n,i,j;\ndouble Ldist,dist;\nstruct dis\n{\n\tdouble x;\n\tdouble y;\n}dis[100];\nscanf(\"%d\",&n);\nfor(i=0;iLdist)\n\t Ldist=dist;\n}\n}\nprintf(\"%.4lf\",Ldist);\nreturn 0;\n}"} +{"label": "70", "index": "34987", "code": " struct point \n {\n double x;\n double y;\n \n };\nmain ()\n{\n struct point p[20];\n int n;\n scanf (\"%d\\n\",&n);\n int i,j;\n for (i=0;imax)\n max =dis [i];\n \n }\n\n printf (\"%.4lf\\n\",max);\n\n\ngetchar ();\ngetchar ();\n\n\n\n}\n"} +{"label": "70", "index": "34988", "code": "struct dian\n{\n\tdouble x,y;\n}a[100];\nvoid main()\n{\n\tint n,i,k=0,j,t;\n\tdouble c[100]={0},max;\n\tstruct dian *p=a;\n\tscanf(\"%d\",&n);\n\tt=p;\n\tfor(i=0;ix,&p->y);\n\t\tp++;\n\t}\n\tp=t;\n\tfor(i=0;imax)\n\t\t\tmax=c[i];\n\t}\n\tprintf(\"%.4lf\",max);\n}"} +{"label": "70", "index": "34989", "code": "int main()\n{\n\tdouble distance(double,double,double,double);\n\tint n,i,j;\n\tdouble a[50][2];\n\tdouble max=0,temp;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=temp;}\n\t}\n\tprintf(\"%.4f\\n\",max);\n}\ndouble distance(double a,double b,double c,double d)\n{\n\tdouble k;\n\tk=sqrt((a-c)*(a-c)+(b-d)*(b-d));\n\treturn (k);\n}"} +{"label": "70", "index": "34990", "code": "int main()\n{\n\tint i,j,n;\n\tscanf (\"%d\",&n);\n\tdouble *x,*y;\n\tdouble s=0;\n double d;\n\tx=(double*)malloc(sizeof(double)*n);\n\ty=(double*)malloc(sizeof(double)*n);\n\tfor (i=0;is)s=d;\n\t\t}\n}\n printf (\"%.4lf\\n\",s);\n free (x);\n free (y);\n return 0;\n}\n"} +{"label": "70", "index": "34991", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,t;\n\tdouble a[100][2];\n\tdouble x=0.0,s;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ix)x=s;\n\t\t}\n\t}\n\tprintf(\"%.4lf\\n\",(double)sqrt(x));\n\treturn 0;\n}"} +{"label": "70", "index": "34992", "code": "main()\n{\n int i,j,n; double ss,max;\n double spot[100][2];\n scanf(\"%d\",&n);\n for(i=0;i>n;\n max=0;\n for(i=1;i<=n;i++)\n cin>>x[i]>>y[i]; //????\n for(i=1;i<=n;i++)\n for(j=1;j<=n;j++)\n {\n dis=sqrt(pow(x[i]-x[j],2)+pow(y[i]-y[j],2)); //????\n if(dis>max)\n max=dis; //?????\n }\n cout<>n;\n for (int i=1;i<=n;i++)\n cin >>point[i][0]>>point[i][1];\n for (int i=1;i<=n;i++)\n {\n for (int j=1;j<=n;j++)\n {\n if (i==j)\n continue;\n double f;\n f=hypot(point[i][0]-point[j][0],point[i][1]-point[j][1]);\n ans=max(ans,f);\n }\n }\n cout <>n;\n\tfor(i=0;i>x[i]>>y[i];\n\tfor(i=0;imax)\n\t\t\t{\n\t\t\t\tmax=dis;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%.4f\\n\", max);\n\treturn 0;\n}"} +{"label": "70", "index": "34997", "code": "int main(int argc, char* argv[])\n{\n\tdouble c,d,z,max=0;\n\tstruct{\n\t\tdouble x,y;\n\t}a[100];\n\tint i,n,b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t max=z;\n\t\t else\n\t\t\t max=max;\n\t}\n\t}\n\tprintf(\"%.4f\\n\",max);\n\treturn 0;\n}\n\n"} +{"label": "70", "index": "34998", "code": "\nint main()\n{\n int n,i,k;\n scanf(\"%d\",&n);\n double l=0,lest=0;\n double *x;\n x=(double*)malloc(sizeof(double)*n);\n double *y;\n y=(double*)malloc(sizeof(double)*n);\n for(i=0;i=n)break;\n\t\t\tm=pow((x[i]-x[j]),2)+pow((y[i]-y[j]),2);\n\t\t\tif(m>k)k=m;\n\t\t}\n\tprintf(\"%.4f\\n\",sqrt(k));\n\treturn 0;\n}\n"} +{"label": "71", "index": "35000", "code": "\n\nint main()\n{\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint n,year,month1,month2,i,j,k,s;\n\tcin>>n;\n\tfor (i=0;i>year>>month1>>month2;\n\t\tif (year%400==0) //????\n\t\t\tk=1;\n\t\telse if (year%100==0)\n\t\t\tk=0;\n\t\telse if (year%4==0)\n\t\t\tk=1;\n\t\telse\n\t\t\tk=0;\n\t\tif (k==1)\n\t\t\ta[2]=29;\n\t\telse\n\t\t\ta[2]=28;\n\t\tif (month1>month2)\n\t\t{\n\t\t\tk=month2;\n\t\t\tmonth2=month1;\n\t\t\tmonth1=k;\n\t\t}\n\t\ts=0;\n\t\tfor (j=month1;jinput[i][2])\n\t\t{\n\t\t\tint e;\n\t\t\te=input[i][1];\n\t\t\tinput[i][1]=input[i][2];\n\t\t\tinput[i][2]=e;\n\t\t}\n\t}\n\tfor(i=0;ia[i][2])\n\t\t{\n\t\t\te=a[i][1];\n\t\t\ta[i][1]=a[i][2];\n\t\t\ta[i][2]=e;\n\t\t}\n\t}\n\tfor(i=0;i>n;\n for(i=1;i<=n;i++)\n\t{\n\t\tsum1=0;\n\t\tsum2=0;\n\t\tcin>>y>>m1>>m2;\n if(y%4==0&&y%100!=0||y%400==0)\n\t\t{\n\t\t\tfor(j=0;j<=m1-1;j++)\n\t\t\t\tsum1+=b[j];\n\t\t for(j=0;j<=m2-1;j++)\n\t\t\t\tsum2+=b[j];\n\t\t\tsum=sum2-sum1;\n\t\t\tif(sum%7==0)cout<<\"YES\"<k)\n\t\t\t{\n for(p=k;pk)\n\t\t\t{\n for(p=k;pm2[i]){\n\t\t\tfor(j=m2[i];j>=m2[i]&&jm1[i]){\n\t\t\t\t\tfor(k=m1[i];k>=m1[i]&&km2[i])\n\t\t\t\t\t\t{\n\t\t \tfor(t=m2[i];t>=m2[i]&&tm1[i]){\n\t\t\t\t\tfor(s=m1[i];s>=m1[i]&&s>n;\n\tfor(j=1;j<=n;j++){\n\t\tcin>>a;\n\t\tcin>>b;\n\t\tcin>>c;\n\t\tif(a%400==0||(a%4==0&&a%100!=0)){\n\t\t if(b>c)\t{\n\t\t\t for(i=c;ic)\t{\n\t\t\t\t\t\t for(i=c;i>n;\n\tfor(i=0;i>year>>m1>>m2;\n\t\tt=0;\n if(m1>m2)\n\t\t\t{m=m1;m1=m2;m2=m;}\n\t\tif((year%4==0&&year%100!=0)||(year%400==0))\n\t\t{\n\t\t\tint a[12]={0,31,29,31,30,31,30,31,31,30,31,30};\n\t\t\tfor(j=m1;jm2[i])\n\t\t{\n\t\t\tc=m1[i];\n\t\t\tm1[i]=m2[i];\n\t\t\tm2[i]=c;\n\t\t}\n\n\t\tfor (j=m1[i];jtotal1){\n m=total2-total1;\n }else{\n m=total1-total2;\n }\n x=m%7;\n if(x==0){\n printf(\"YES\\n\");\n }else{\n printf(\"NO\\n\");\n }\n }\n return 0;\t\n}"} +{"label": "71", "index": "35011", "code": "int days(int year,int month)\n{\n\tint i,day=0;\n\tfor(i=1;i>n;\n\tfor(int i=0; i>year>>mon1>>mon2;\n leap=((year%4==0 && year%100!=0) || year%400==0);\n\t int m;\n\t\tm=mon1>mon2?mon2:mon1;\n\t\twhile(m>n;\n\tfor(int i=0;i>year>>month1>>month2;\n\t\tdays1=days(month1);\n\t\tdays2=days(month2);\n\t\tif (year%4==0&&year%100!=0||year%400==0) //?????????????????????days+1\n\t\t{\n\t\t\tif (month1>2) days1+=1;\n\t\t\tif (month2>2) days2+=1;\n\t\t}\n\t\tif ((days1-days2)%7==0) //?????7??\n\t\t\tcout<<\"YES\"<c[i])\n {\n min=c[i];\n max=b[i];\n }\n else\n {\n min=b[i];\n max=c[i];\n }\n for(j=min;j>n;\n\tfor(int i=0;i>y>>m1>>m2;a[1]=28;s=0;\n\t\tif(y%400==0||(y%4==0&&y%100!=0)) a[1]=29;\n\t\tif(m2=e1[m2-1])?(e1[m1-1]-e1[m2-1]):(e1[m2-1]-e1[m1-1]);\n\t\t\t if(f1%7==0) \n\t\t\t\t printf(\"YES\\n\");\n\t\t\t else\n\t\t\t\t printf(\"NO\\n\");\n\t\t}\n\t\telse{\n\t\t\tint f2=(e2[m1-1]>=e2[m2-1])?(e2[m1-1]-e2[m2-1]):(e2[m2-1]-e2[m1-1]);\n\t\t\tif(f2%7==0)\t\t\t\t\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"NO\\n\");\n\t\t}\n\t}\n\treturn 0;\n} \n \n"} +{"label": "71", "index": "35018", "code": "int main ()\n{\n\tint n,i,j;\n\tint year,month1,month2;\n\tint relation=0,middle;\n\tint day[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin >> n;\n\tfor (i=0;i> year >> month1 >> month2;\n\t\tif (month1>month2)\n\t\t{\n\t\t\tmiddle=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=middle;\n\t\t}\n\t\tif(year%4==0&&year%100!=0||year%400==0)\n\t\t{\n\t\t\tday[1]=29;\n\t\t\tfor(j=month1;j> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> a >> b >> c;\n\t\tif ((b == 7 && c == 4) || (b == 4 && c == 7) || (b == 9 && c == 12) || (b == 12 && c == 9) || (b == 11 && c == 3) || (b == 3 && c == 11))\n\t\t \tcout << \"YES\" << endl;\n\t\telse\n\t\t{\n\t\t if ((a % 4 == 0 && a % 100 != 0) || (a % 400 ==0))\n\t\t\t{\n\t\t\t if ((b == 1 && c == 4) || (c == 1 && b == 4) || (b == 1 && c == 7) || (b == 7 && c == 1) || (b == 2 && c == 8) || (b == 8 && c == 2))\n\t\t\t\t cout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((b == 1 && c == 10) || (c == 1 && b == 10) || (b == 2 && c == 3) || (c == 2 && b == 3) || (b == 2 && c == 11) || (c == 2 && b == 11))\n cout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t}\n\t}\n return 0;\n}"} +{"label": "71", "index": "35020", "code": "\nint main()\n{\n\tint year[200],a[200],b[200],n,i,j,k,t,sum;\n\tint m[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tcin>>n;\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tsum=0;\n\t\tcin>>year[i]>>a[i]>>b[i];\n\t\tif ((year[i]%4==0 && year[i]%100!=0) || year[i]%400==0) k=1;\n\t\telse k=0;\n\t\tif (a[i]>b[i])\n\t\t{\n\t\t\tt=a[i];\n\t\t\ta[i]=b[i];\n\t\t\tb[i]=t;\n\t\t}\n\t\tfor (j=a[i]-1;j>n;\n\tfor(int i=0;i>year>>mon1>>mon2;\n\t\tif((year%4==0&&year%100!=0)||year%400==0)\n\t\t\ta[2]=29;\n\t\tif(mon1>mon2)\n\t\t{\n\t\t\tint t;\n\t\t\tt=mon1;\n\t\t\tmon1=mon2;\n\t\t\tmon2=t;\n\t\t}\n\t\tfor(int i=mon1;im2)\n\t{\n\t\te=m1;\n m1=m2;\n\t\tm2=e;\n\t}\n int res=0;\n\tfor(i=m1;i> n;\n for (int j = 1; j <= n; j++)\n {\n cin >> year >> m1 >> m2;\n if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0) // ????? \n {\n for (i = 0; i < m1 - 1; i++)\n {\n d1 += a[i]; // ???a?m1?????????d1? \n }\n for (i = 0; i < m2 - 1; i++)\n {\n d2 += a[i]; // ???a?m2?????????d2? \n }\n }\n else // ????? \n { \n for ( i = 0; i < m1 - 1; i++)\n {\n d1 += b[i]; // ???b?m1?????????d1? \n }\n for(i = 0; i < m2-1; i++)\n {\n d2 += b[i]; // ???b?m2?????????d2? \n }\n }\n if ((d1 - d2) % 7 == 0) // ????????? \n {\n cout << \"YES\" << endl; // ??YES \n }\n else\n {\n cout << \"NO\" << endl; // ????NO \n }\n\t d1 = 0;\n\t d2 = 0; // ??????????????0 \n }\n return 0;\n}\n"} +{"label": "71", "index": "35026", "code": "main()\n{\n int n;\n cin>>n;\n int y,m1,m2,a,b;\n int i,sum,j;\n int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n for(i=1;i<=n;i++){\n cin>>y>>m1>>m2;\n sum=0;\n if(m1-m2>=0){\n a=m1;\n b=m2;\n }else{\n a=m2;\n b=m1;\n }\n for(j=b;jm2){int m;\n m=m1;\n m1=m2;\n m2=m;\n }\n for(j=m1;jm2){\n\t\tmax=m1;\n\t\tmin=m2;\n\t\t}else{\n\t\t max=m2;\n\t\t min=m1;\n\t\t}\n\n\t\tif(year%4!=0||(year%100==0&&year%400!=0)){ //???????????????????????7????\n\t\t if((min==1&&max==10)||(min==2&&max==3)||(min==2&&max==11)||(min==3&&max==11)||(min==4&&max==7)||(min==9&&max==12)){\n\t\t\tprintf(\"YES\\n\");\n\t\t }else{\n\t\t\tprintf(\"NO\\n\");\n\t\t } \n\t\t}else{ //????????????????????7????\n if((min==3&&max==11)||(min==4&&max==7)||(min==9&&max==12)||(min==1&&max==4)||(min==1&&max==7)||(min==2&&max==8)){\n\t\t\tprintf(\"YES\\n\");\n\t\t }else{\n\t\t\tprintf(\"NO\\n\");\n\t\t}\n\t }\n\n\n\n\t}\n\n\n\n\n\treturn 0;\n}\n"} +{"label": "71", "index": "35029", "code": "\nint main()\n{\n\tint y,m1,m2,n,i,j,k,t;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d%d%d\",&y,&m1,&m2);\n\t\tif(m1>m2)\n\t\t{\n\t\t\tt=m1;\n\t\t\tm1=m2;\n\t\t\tm2=t;\n\t\t}\n\t\tif(y%4==0&&y%100!=0||y%400==0)\n\t\t{\n\t\t\tk=0;\n\t\t\tfor(j=m1;jb) for(j=b;j<=(a-1);j++) t=t+r[j];\n\t\t\tif (ab) for(j=b;j<=(a-1);j++) t=t+z[j];\n\t\t\tif (amon2)\n\t\t{\n\t\t\ttemp=mon1;\n\t\t\tmon1=mon2;\n\t\t\tmon2=temp;\n\t\t}\n\t\tif(leap(year))\n\t\t\tmon[2]++;\n\t\tday=0;\n\t\tfor(j=mon1;jmonth2))\n {\n for(j=month2;jmonth2))\n {\n for(j=month2;jmonth2))\n {\n for(j=month2;jc[i])\n {temp=b[i];\n b[i]=c[i];\n c[i]=temp;}\n if(a[i]%400==0||(a[i]%4==0&&a[i]%100!=0))\n\t\t{\n\t\t\td[1]=d[1]+1;\n\t\t\tfor(j=b[i];jb[i])\n\t\t\t{\n\t\t\t\tc=a[i];\n\t\t\t\ta[i]=b[i];\n\t\t\t\tb[i]=c;\n\t\t\t}\n\t\t\tif((a[i]==1&&b[i]==4)||(a[i]==2&&b[i]==8)||(a[i]==1&&b[i]==7)||(a[i]==3&&b[i]==11)||(a[i]==4&&b[i]==7)||(a[i]==9&&b[i]==12))\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t\telse\n\t\t{\n if(a[i]>b[i])\n\t\t\t{\n\t\t\t\tc=a[i];\n\t\t\t\ta[i]=b[i];\n\t\t\t\tb[i]=c;\n\t\t\t}\n\t\t\tif((a[i]==1&&b[i]==10)||(a[i]==2&&b[i]==3)||(a[i]==2&&b[i]==11)||(a[i]==3&&b[i]==11)||(a[i]==4&&b[i]==7)||(a[i]==9&&b[i]==12))\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t}\n}\n"} +{"label": "71", "index": "35039", "code": "\t\n\nint main()\n{\n int min,max,t,n,i,Y,a[12],y,j,s=0;\n\ta[1]=a[3]=a[5]=a[7]=a[8]=a[10]=a[12]=31,a[4]=a[6]=a[9]=a[11]=30;\n\tscanf(\"%d\",&t);\n\tfor(i=0;i>n;\n\tfor(i=0;i>year>>mon1>>mon2;\n\t\tif(year%4!=0||year%100==0&&year%400!=0)\n\t\t\tif(a1[mon1-1]==a1[mon2-1])cout<<\"YES\";\n\t\t\telse cout<<\"NO\";\n\t\telse if(a2[mon1-1]==a2[mon2-1])cout<<\"YES\";\n\t\t else cout<<\"NO\";\n\t\tif(iyue2)\n\t\t{\n\t\t\tt=yue1;\n\t\t\tyue1=yue2;\n\t\t\tyue2=t;\n\t\t}\n\t\tsum=0;\n\t\tfor(j=yue1;j2)\n\t\t{\n\t\t if((year%4==0&&year%100!=0)||(year%400==0))\n\t\t\t {\n\t\t\t sum=sum+1;\n\t\t\t }\n\t\t}\n\t\tif(sum%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\telse\n\t\t\tprintf(\"NO\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35042", "code": "\nint main()\n{\n\tint a[12]={31,0,31,30,31,30,31,31,30,31,30,31},y,m1,m2,i,j,n,sum1=0,sum2=0;\n\tcin>>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>y>>m1>>m2;\n\t\tif(y%4==0&&y%100!=0||y%400==0)a[1]=29;\n\t\telse a[1]=28;\n\t\tif(m1>m2)\n\t\t{\n\t\t\tfor(j=m2-1;j<=m1-2;j++)\n\t\t\t{\n\t\t\t\tsum1=sum1+a[j];\n\t\t\t}\n\t\t\tif(sum1%7==0)cout<<\"YES\"<<'\\n';\n\t\t\telse if(sum1%7!=0)cout<<\"NO\"<<'\\n';\n\t\t sum1=0;\n\t\t}\n\t\tif(m1> n;\n\tfor(i = 1;i <= n;i++)\n\t{\n d = 0;\n\t\tcin >> year >> m1 >> m2;\n\n\t\tif((year % 400 == 0)||(year % 100 != 0 && year % 4 == 0)) leap = 1;\n\t\telse leap = 0;\n\t\tif(m1 > m2)\n\t\t{\n\t\t\tmonth = m2;\n\t\t\tm2 = m1;\n\t\t\tm1 = month;\n\t\t}\n\t\tfor(j = m1;j < m2;j++)\n\t\t{\n\t\t\tswitch(j)\n\t\t\t{\n\t\t\tcase 1 :\n\t\t\tcase 3 :\n\t\t\tcase 5 :\n\t\t\tcase 7 :\n\t\t\tcase 8 :\n\t\t\tcase 10 :\n\t\t\tcase 12 : d += 31;break;\n\n \tcase 4 :\n\t\t\tcase 6 :\n\t\t\tcase 9 :\n\t\t\tcase 11 : d += 30;break;\n\n \tcase 2 : d = d + 28 + leap;break;\n\t\t\t}\n\t\t}\n\t\tif(d % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35045", "code": "int main()\n{\n\tint n,i,j,sum,a[200][3],yue[13];\n\tcin>>n;\n\tyue[1]=yue[3]=yue[5]=yue[7]=yue[8]=yue[10]=yue[12]=31;\n\tyue[4]=yue[6]=yue[9]=yue[11]=30;\n\tfor(i=0;i>a[i][0]>>a[i][1]>>a[i][2];\n\t\tif(a[i][0]%400==0||a[i][0]%100!=0&&a[i][0]%4==0)\n\t\t\tyue[2]=29;\n\t\tfor(j=a[i][1];jm2) {a=m2;m2=m1;m1=a;}\n if(rn(y)==1) {for(b=m1;bc){\n\t\t\td=b;\n\t\t\tb=c;\n\t\t\tc=d;\n\t\t}\n\t\tif(((a%4==0)&&(a%100!=0))||(a%400==0)){\n\t\t\tday[2]=29;\n\t\t}\n\t\telse{\n\t\t\tday[2]=28;\n\t\t}\n\t\tfor(j=b;jq)\n {\n int temp;\n temp=p;\n p=q;\n q=temp;\n }\n int s=0; \n for(j=p;jmon2)\n {\n int temp=mon1;\n mon1=mon2;\n mon2=temp;\n }\n if(run(y)==1)\n {\n int d=0;\n for(int j=mon1;j0;time--)\n\t{\n\t\tscanf(\"%d %d %d\",&year,&m1,&m2);\n\t\ta[1]=y(year);\n\t\tif(m1>m2)\n\t\t{\n\t\t\tday=m1;\n\t\t\tm1=m2;\n\t\t\tm2=day;\n\t\t}\n\t\tday=0;\n\t\tfor(i=m1;i>N; //??????\n for(;N>0;N--) //????????\n { \n a[1]=28; //?2?????28 \n int d=0; //??d????????\n cin>>n>>m1>>m2; //?????\n if(n%4==0&&n%100!=0||n%400==0) //???????\n a[1]+=1; //??2??????\n if(m1>m2) //??m1>m2??????\n {\n m1=m1^m2;\n m2=m1^m2;\n m1=m1^m2;\n } \n for(;m1m2){\n\t\t\tc=m1;\n\t\t\tm1=m2;\n\t\t\tm2=c;\n\t\t}\n\t\ts=0;\n\t\tif(year(y))\n\t\t\tfor(i=m1-1;im2? m1:m2);\n\tt2=(m1>m2? m2:m1);\n\tfor(i=t2;i12||m1<1||m2>12||m2<1)printf(\"NO\");\n\t else if(m1>m2){t=m1;m1=m2;m2=t;}\n\t for(j=m1;j>n;\n\tfor(i=1;i<=n;i++)\n\t{cin>>y>>m1>>m2;\n if(m1m2) \n {\n j=m1;\n m1=m2;\n m2=j;\n }\n for(j=m1;jc){\n e=b;\n b=c;\n c=e;\n }\n for(j=b;jb){max=a;min=b;}\n\t\telse if(a2)||(d>e&&e<=2&&d>2)))\n\t\t{\n\t\t\t\n\t\t\t\ty=y+1;\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(y%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\telse\n\t\t\tprintf(\"NO\\n\");\n\t\t\n\t}\n\t\n\treturn 0;\n}\n"} +{"label": "71", "index": "35071", "code": "\nvoid main(){\n\tint leap_or_not(int year);\n int daysnotleap(int month);\n int daysleap(int month);\n\tint data[201][3],i,j,sum[201]={0},num,temp;\n\tscanf(\"%d\",&num);\n\tfor (i=1;i<=num;i++){\n\t\tfor (j=0;j<3;j++)\n\t\t\tscanf(\"%d\",&data[i][j]);\n\t}\n\tfor (i=1;i<=num;i++){\n\t\tif (data[i][1]>data[i][2]){\n\t\t\t\ttemp=data[i][1];\n\t\t\t\tdata[i][1]=data[i][2];\n\t\t\t\tdata[i][2]=temp;\n\t\t\t}\n\t\t}\n\tfor (i=1;i<=num;i++){\n\t\tif (leap_or_not(data[i][0])==0){\n\t\tfor (j=data[i][1];j> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> year >> tmon1 >> tmon2;\n\t\tmon1 = tmon1 < tmon2 ? tmon1 : tmon2;\n\t\tmon2 = tmon1 > tmon2 ? tmon1 : tmon2;\n\t\tif (mon1 <= 2 && ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0))\n\t\t\tdays = 1;\n else \n\t\t\tdays = 0;\n\t\tfor (; mon1 < mon2; mon1++)\n\t\t{\n\t\t\tdays += month[mon1 - 1];\n\t\t}\n\t\t\n\t\tif (days % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse \n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n\t\t\t"} +{"label": "71", "index": "35073", "code": "int isRunNian(int year){\n\tint result;\n\tif(year%400==0||(year%4==0&&year%100!=0)){\n\t\tresult=1;\n\t}else{\n\t\tresult=0;\n\t}\n return result;\t\n}\nint DiJiTian(int year, int month, int day){\n\tint result=0;\n\tfor(int i=1; im2)\n {\n j=m1;\n m1=m2;\n m2=j;\n }\n for (j=m1;j<=m2-1;j++)\n sum=sum+day[j];\n if (sum%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\");\n }\n \n}\nint run(int x)\n{\n if (x%4!=0)\n return 0;\n else\n {\n if (x%100!=0)\n return 1;\n else\n {\n if (x%400==0)\n return 1;\n else return 0;\n }\n }\n}\n"} +{"label": "71", "index": "35075", "code": "int is_leapyear(int y);\nint main(){\n\tint n;\n\tcin>>n;\n\tconst int md[12]={\n\t\t31,28,31,30,31,30,31,31,30,31,30,31\n\t};\n\tfor(int i=0;i>yy>>m1>>m2;\n\t\tint d=0;\n\t\tfor(int i=min(m1,m2);i>k;\nfor(int i=0;i>a;\na=run(a);\nint d,e;\ncin>>d>>e;\n//cout<> n;\n\tint year, month1, month2;\n\tfor (int i= 1; i <= n; i++)\n\t{\n\t\tcin >> year >> month1 >> month2;\n\t\tint difference = month1 - month2;\n\t\tif (difference > 0)\n\t\t{\n\t\t\tmonth1 -= difference;\n\t\t\tmonth2 += difference;\n\t\t}\n\t\tint m[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; \n\t\tif (((!(year % 4)) && (year % 100)) || !(year % 400))\n\t\t\tm[2] = 29;\n\t\tint d = 0;\n\t\tfor (int j = month1; j < month2; j++)\n\t\t\td += m[j];\n\t\tif (d % 7)\n\t\t\tcout << \"NO\" << endl;\n\t\telse\n\t\t\tcout << \"YES\" << endl;\n\t}\n\n\treturn 0;\n}"} +{"label": "71", "index": "35079", "code": "int main()\n{\n\tint i,n,a,b,c;\n\tcin >> n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a>>b>>c;\n\t\tif(a%4!=0 || (a%100==0 & a%400!=0))\n\t\t{\n if(b==3 & c==11)\n\t\t\t cout << \"YES\"<b)\n\t\t{\n\t\t if((a-b)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse\n \tprintf(\"NO\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t if((b-a)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse\n \tprintf(\"NO\\n\");\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35081", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,y,m1,m2,total1=0,total2=0,i=1,j=0;\n\tscanf(\"%d\",&n);\n\tfor(j=0;j> n;\n\tfor (i = 1; i <= n; i++ )\n\t{\n\t\tcin >> year >> m1 >> m2;\n\t\tdays = 0;\n\t\tleap = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;\n\t\tif (m1 > m2)\n\t\t{\n\t\t\tint c = m1;\n\t\t\tm1 = m2;\n\t\t\tm2 = c;\n\t\t}\n\t\tfor ( ; m1 < m2; m1++ )\n\t\t{\n\t\t\tswitch(m1)\n\t\t\t{\n\t\t\t\tcase(2):\n\t\t\t\t\tdays += 28 + leap;\n\t\t\t\t\tbreak;\n\t\t\t\tcase(4):\n\t\t\t\tcase(6):\n\t\t\t\tcase(9):\n\t\t\t\tcase(11):\n\t\t\t\t\tdays += 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase(1):\n\t\t\t\tcase(3):\n\t\t\t\tcase(5):\n\t\t\t\tcase(7):\n\t\t\t\tcase(8):\n\t\t\t\tcase(10):\n\t\t\t\tcase(12):\n\t\t\t\t\tdays += 31;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (days % 7 == 0)\n\t\t{\n\t\t\tcout << \"YES\" << endl;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tcout << \"NO\" << endl;\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "71", "index": "35083", "code": "int dijitian(int y,int m,int d);\nint main(){\n int n,k,year,month1,month2,cha;\n\tscanf(\"%d\",&n);\n\tfor(k=0;km2){\n\t\t\tm=m1;\n\t\t\tm1=m2;\n\t\t\tm2=m;\n\t\t}\n\t\tif((y%4==0&&y%100!=0)||y%400==0){\n\t\t for(i=m1;i monb)\n\t\t{\n\t\t\tmax = mona ;\n\t\t\tmin = monb ;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmax = monb ;\n\t\t\tmin = mona ;\n\t\t}\n\t\tif ( run(year) == 0 )\n\t\t{\n\t\t\tfor ( j = min ; j < max ; j ++)\n\t\t\t{\n\t\t\t\tif ( j == 2)\n\t\t\t\t{\n\t\t\t\t\tday += 29;\n\t\t\t\t}\n\t\t\t\telse if ( j == 4 || j == 6 || j == 9 || j == 11) \n\t\t\t\t{day += 30 ;}\n\t\t\t\telse {day += 31;}\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\tif ( run(year) == 1 )\n\t\t{\n\t\t\tfor ( j = min ; j < max ; j ++)\n\t\t\t{\n\t\t\t\tif ( j == 2)\n\t\t\t\t{\n\t\t\t\t\tday += 28;\n\t\t\t\t}\n\t\t\t\telse if ( j == 4 || j == 6 || j == 9 || j == 11) \n\t\t\t\t{day += 30 ;}\n\t\t\t\telse {day += 31;}\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\n\t\tif ( day % 7 == 0 ) printf(\"YES\\n\");\n\t\telse printf(\"NO\\n\");\n\t\tday = 0 ;\n\n\n\n\n\t}\n\treturn 0 ;\n}\n\n"} +{"label": "71", "index": "35086", "code": "int xgy(int year,int month1,int month2){\n\tint i,m,days=0;\n\tif(month1>month2){\n\t\tm=month1;\n\t\tmonth1=month2;\n\t\tmonth2=m;\n\t}\n\tfor(i=month1;i2&&(b[a[2]-1]-b[a[1]-1])%7==0&&a[2]>2)\n printf(\"YES\\n\");\n\t\t\t else if(a[1]<3&&(b[a[2]-1]-b[a[1]-1]+1)%7==0&&a[2]>=3)\n printf(\"YES\\n\");\n\t\t\t else if((b[a[2]-1]-b[a[1]-1])%7==0&&a[1]<3&&a[2]<3)\n\t\t\t\t printf(\"YES\\n\");\n\t\t\t else if(a[2]<3&&(b[a[1]-1]-b[a[2]-1]+1)%7==0&&a[1]>=3)\n\t\t\t\t printf(\"YES\\n\");\n\t\t\t else\n\t\t\t\t printf(\"NO\\n\");\n\t\t }\n\t\t else\n\t\t {\n\t\t\t if((b[a[2]-1]-b[a[1]-1])%7==0)\n printf(\"YES\\n\");\n\t\t else\n\t\t\t\t printf(\"NO\\n\");\n\t\t }\n\t}\t\n\treturn 0;\n}\n"} +{"label": "71", "index": "35088", "code": "int main()\n{\n\tint n,i,j,y,m1,m2,temp,d=0;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d\",&n);\n\tfor (j=0;jm2){temp=m1;m1=m2;m2=temp;}\n\t\tfor (i=m1;i<=m2-1;i++)\n\t\t{\n\t\t d=d+a[i];\n\t\t}\n\t\tif (y%100==0&&y%400==0&&m1<=2&&m2>2)\n\t\t{\n\t\t d=1;\n\t\t\tfor (i=m1;i<=m2-1;i++)\n\t\t\t{\n\t\t\t\td=d+a[i];\n\t\t\t}\n\t\t}\n\t\telse if (y%100!=0&&y%4==0&&m1<=2&&m2>2)\n\t\t{\n\t\t d=1;\n\t\t\tfor (i=m1;i<=m2-1;i++)\n\t\t\t{\n\t\t\t\td=d+a[i];\n\t\t\t}\n\t\t}\n\t\tif (d%7==0){printf(\"YES\\n\");}\n\t\telse {printf(\"NO\\n\");}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35089", "code": "\nint main()\n{\n\tint m[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint n,i,y,a,b,c;\n\tscanf(\"%d\",&n);\n\n\tfor(i=0;ib)\n\t\t{\n\t\t\tc=a-b;\n\t\t\ta=b;\n\t\t}\n\t\telse c=b-a;\n\n\t\tb=0;\n\t\tfor(;c>0;c--)\n\t\t{\n\t\t\tb+=m[a-1];\n\t\t\ta++;\n\t\t}\n\t\tif(b%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\telse printf(\"NO\\n\"); \n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35090", "code": "int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\nint run(int year)\n{\n\tif(year%4!=0)\n\t\treturn 0;\n\tif(year%4==0)\n\t{\n\t\tif(year%100==0)\n\t\t{\n\t\t\n\t\t if(year%400==0)\n\t\t\t\treturn 1;\n\t\t\telse\n \n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t\treturn 1;\n\t}\n}\n\n\n\nint main()\n{\n\n\n\n\tint n,i,j,year,date1,date2,tem;\n\tint day[201]={0};\n\t\n\tscanf(\"%d\",&n);\n\tfor(i=1;idate2)\n\t\t{\n\n\t\t\ttem=date1;\n\t\t\tdate1=date2;\n\t\t\tdate2=tem;\n\t\t}\n\t\tfor(j=date1;jm2) swap(m1,m2);\n for (int i=1;i<=12;i++) \n for (int j=1;j<=month[i];j++)\n hash[i][j]=++cnt;\n if ((hash[m2][1]-hash[m1][1])%7==0) printf(\"YES\\n\");\n else printf(\"NO\\n\");\n } \n return 0;\n}\n\n"} +{"label": "71", "index": "35093", "code": "int max(int b,int c);\nint min(int b,int c);\nint main(void)\n{\n\tint i,j,k;\n\tint n,m;\n\tint a,b,c;\n\tscanf(\"%d\",&n);\n\tint day[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\twhile(n--)\n\t{\n\t\tm=0;\n\t\tscanf(\"%d%d%d\",&a,&b,&c);\n\t\tif(a%4==0&&(a%100)!=0||a%400==0)\n\t\t{\n\t\t\tif(b==1&&c==2||b==2&&c==1)\n\t\t\t{\n\t\t\t\tprintf(\"NO\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(c<=2&&b>2||c>2&&b<=2)\n\t\t\t{\n\t\t\t\tfor(i=min(b,c);ic)\n\t return b;\n\treturn c;\n}\nint min(int b,int c)\n{\n\tif(b>n;\n\twhile(n>0){\n\t\tint year,m1,m2,m;\n\t\tcin>>year>>m1>>m2;\n\t\tM=0;\n\t\tN=0;\n\t\tif(m1>m2){\n\t\t\tm=m1;\n\t\t\tm1=m2;\n\t\t\tm2=m;\n\t\t}\n\t\tif(year%400==0||(year%100!=0&&year%4==0)){\n\t\t\tfor(i=0;imon2)\n\t {\n\t\t temp=mon1;\n\t mon1=mon2;\n\t mon2=temp;\n\t }\n\t for(i=0;i2)\n\t\t\t day1++;\n\t\t if(mon2>2)\n\t\t\t day2++;\n\t }\n\t day=day2-day1;\n\t if(day%7==0)\n\t\t printf(\"YES\\n\");\n\t else\n\t\t printf(\"NO\\n\");\n }\n\n}"} +{"label": "71", "index": "35096", "code": "int main(int argc, char* argv[])\n{\n\tint n;\n\tint i;\n\tint a,b,c;\n\tint m[]={0,31,60,91,121,152,182,213,244,274,305,335};\n\tint k[]={0,31,59,90,120,151,181,212,243,273,304,334};\n\tscanf(\"%d\",&n);\n\tfor (i=0;i> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> y >> m1 >> m2;\n\t\tmin = m1 < m2 ? m1 : m2;\n\t\tmax = m1 > m2 ? m1 : m2;\n\t\tif (((y % 100 != 0) && (y % 4 == 0)) || (y % 400 == 0))\n\t\t\t //?????????\n\t\t{\n\t\t\tsum = 0; //???????????sum\n\t\t\tmonth[1] = 29; //???2????????29\n\t\t\tfor (j = min; j < max; j++)\n\t\t\t\tsum = sum + month[j - 1]; //??????????sum\n\t\t\tif (sum % 7 == 0) //??sum??7???????\n\t\t\t\tcout << \"YES\" << endl; //???YES\n\t\t\telse \n\t\t\t\tcout << \"NO\" << endl; //????NO\n\t\t}\n\t\telse //?????????\n\t\t{\n\t\t\tsum = 0; //???????????sum\n\t\t\tmonth[1] = 28; //???2????????28\n\t\t\tfor (j = min; j < max; j++)\n\t\t\t\tsum = sum + month[j - 1]; //??????????sum\n\t\t\tif (sum % 7 == 0) //??sum??7???????\n\t\t\t\tcout << \"YES\" << endl; //???YES\n\t\t\telse \n\t\t\t\tcout << \"NO\" << endl; //????NO\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "71", "index": "35098", "code": "//**************************\n//* author ?? **\n//* date 2012.10.24 **\n//* description ??? **\n//**************************\n\nint main()\n{\n\t//cout << \"?????????n\" << endl;\n\tint n, a, b, c, y, x, z; //n????????a,b,c???,y??????x??????\n\tcin>>n;\n\tfor (int i = 1; i <= n; i++) //n???\n\t{\n\t\tx = 0;\n\t\ty = 0;\n\t\tcin >> a >> b >> c;\n\t\tif (b > c) //?b??c\n\t\t{\n\t\t\tz = c;\n\t\t\tc = b;\n\t\t\tb = z;\n\t\t}\n\t\tif ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) //????\n\t\t{\n\t\t\ty = 1;\n\t\t}\n\t\tfor (; b <= c - 1; b++) //??????\n\t\t{\n\t\t\tswitch (b)\n\t\t\t{\n\t\t\tcase 1 :\n\t\t\tcase 3 :\n\t\t\tcase 5 :\n\t\t\tcase 7 :\n\t\t\tcase 8 :\n\t\t\tcase 10 :\n\t\t\tcase 12 : x = x + 31; break;\n\t\t\tcase 4 :\n\t\t\tcase 6 :\n\t\t\tcase 9 :\n\t\t\tcase 11 : x = x + 30; break;\n\t\t\tcase 2 : x = x + 28 + y; break;\n\t\t\t}\n\t\t}\n\t\tif (x % 7 == 0) //??????????\n\t\t{\n\t\t\tcout << \"YES\" << endl;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tcout << \"NO\" << endl;\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n\t\t\t\n\n"} +{"label": "71", "index": "35099", "code": "int main(int argc, char* argv[])\n{\n\tint n;\n\tint y[1000],m1[1000],m2[1000];\n\tint a,cha;\n\tint i;\n\tint tian1,tian2;\n\tscanf(\"%d\",&n);\n\tfor(i=0;im2)\n s=ch(y,m1)-ch(y,m2);\n else\n s=ch(y,m2)-ch(y,m1);\n if (s%7!=0)\n printf(\"NO\\n\");\n else\n printf(\"YES\\n\");\n s=1;\n }\n}\n"} +{"label": "71", "index": "35101", "code": "struct date {\n int year;\n int m1;\n int m2;\n};struct date date[200];\nint main() \n{ \n int f(int p,int m,int n),i,p=0;\n \n int n;\n scanf(\"%d\",&n);\n for(i=0;i>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tsum=0;\n\t\tcin>>y>>m1>>m2;\n\t\tif(m1>m2)\n\t\t{\n\t\t\tint change=m1;\n\t\t\tm1=m2;\n\t\t\tm2=change;\n\t\t}\n\t\tfor(;m1> n;\n for (i = 1; i <= n; i++)\n {\n sum = 0;\n cin >> x >> y >> z;\n if (y > z)\n {\n a = y;\n y = z;\n z = a;\n }\n leap = x % 4 == 0 && x % 100 != 0 || x % 400 == 0;\n for ( ; y < z; y++)\n {\n if (y == 4 || y == 6 || y == 9 || y == 11)\n {\n sum += 30;\n }\n else if (y == 2)\n {\n sum += 28 + leap;\n }\n else\n {\n sum += 31;\n }\n }\n if (sum % 7 == 0)\n {\n cout << \"YES\" << endl;\n }\n else\n {\n cout << \"NO\" << endl;\n }\n }\n return 0;\n}\n"} +{"label": "71", "index": "35104", "code": "void main(){\n\t\n\tint c,i,f,s,m,n,x;\n int b;\n\t\n\tscanf(\"%d\",&c);\n\tfor(i=1;i<=c;i++){\n scanf(\"%d\",&b);\n scanf(\"%d%d\",&f,&s);\n m=n=0;\n\tif(b%4==0){\n \n\t\tif (b%100==0){\n\t\t\tif(b%400==0){\n\t\t\t int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\t\t\t\n\t\t\tfor(x=0;x>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>year>>m1>>m2;\n\t\tif(m1>m2)\n\t\t{\n\t\t\tm1^=m2;\n\t\t\tm2^=m1;\n\t\t\tm1^=m2;\n\t\t}\n\t\tif(((year%400==0)||(year%4==0&&year%100!=0))&&(m1<=2&&m2>2))k=1;\n\t\telse k=0;\n\t\tif((md[m2-1]-md[m1-1]+k)%7==0)cout<<\"YES\\n\";\n\t\telse cout<<\"NO\\n\";\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35107", "code": "/*\n * 12.11.2.cpp\n *Created on: 2012-11-2\n *Author:???\n *?? ????\n */\nint judge(int y){\n\tif(y%400==0||y%4==0&&y%100!=0){\n\t\treturn 1;\n\t}\n\telse return 0;\n}\nint main() {\n\tint n,y,m1,m2,num,i,j,t;\n\tint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>n;\n\tfor(i=1;i<=n;i++){\n\t\tcin>>y>>m1>>m2;\n\t\tif(m1>m2){\n\t\t\tt=m1;m1=m2;m2=t;\n\t\t}\n\t\tfor(j=m1,num=0;ja[2])\n\t\t{\n\t\t\tp=a[1];q=a[2];\n\t\t\tfor(j=q-1,b=0;jm2)\n\t\t\t{for(;m2m2)\n\t\t\t{for(;m2m2)\nfor(i=m2;i(s[i][2])){\n e=s[i][1];\n s[i][1]=s[i][2];\n s[i][2]=e;\n }\n for(int m=(s[i][1]);m<(s[i][2]);m++){\n if((m==1)||(m==3)||(m==5)||(m==7)||(m==8)||(m==10)){\n d += 31;\n\t\t} else if((m==4)||(m==6)||(m==9)||(m==11)){\n d += 30;\n }else if(m==2){\n if(isRunNian(s[i][0])){\n d += 29;\n }else{\n d += 28;\n }\n }\n }\n if((d%7)==0){\n printf(\"YES\\n\");\n }else{\n printf(\"NO\\n\");\n }\n }\n return 0;\n }\n int isRunNian(int year){\n int result;\n if((year%400==0)||((year%4==0)&&(year%100!=0))){\n result = 1;\n }else{\n result = 0;\n }\n return result;\n}\n \n \n \n \n \n \n"} +{"label": "71", "index": "35116", "code": "int main()\n{\n\tint n,i=0,j=0,k=0,m,sum=0;\n\tint an[200],bn[200],cn[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;kcn[i]){\n\t\t\tm=bn[i];\n\t\t\tbn[i]=cn[i];\n\t\t\tcn[i]=m;\n\t\t}\n\t\tfor(j=bn[i];j>n;\n\twhile(n)\n\t{\n\t\tint i=0,k=0,year=0,m1=0,m2=0,sum=0,a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\t\tcin>>year>>m1>>m2;\n\t\tif(year%400==0||(year%100!=0&&year%4==0))\n\t\t\ta[1]=29;\n\t\tif(m1>m2)\n\t\t{\n\t\t\tk=m1;\n\t\t\tm1=m2;\n\t\t\tm2=k;\n\t\t}\n\t\tfor(i=m1-1;i> m ;\n\tfor (i = 1 ; i <= m ; i ++)\n\t{\n\t\t//const int c[13] = {0 , 31 , 0 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31} ;\n\t\tint year , month1 , month2 , day = 0 , a , b , i ;\n\t\tcin >> year >> month1 >> month2 ;\n\t\tif (month1 > month2)\n\t\t{\n\t\t\ta = month2 ;\n\t\t\tb = month1 ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta = month1 ;\n\t\t\tb = month2 ;\n\t\t}\n\t\tfor (i = a ; i < b ; i ++)\n\t\t{\n\t\t\tday = day + c[i] ;\n\t\t}\n\t\tif (a <= 2)\n\t\t{\n\t\t\tif (year % 400 == 0 || year % 100 != 0 && year % 4 == 0)\n\t\t\t day = day + 29 ;\n\t else\n\t\t \tday = day + 28 ;\n\t\t}\n\t\t\n\t\tif (day % 7 == 0)\n\t\t\tcout << \"YES\" << endl ;\n\t\telse\n\t\t\tcout << \"NO\" << endl ;\n\t}\n\treturn 0 ;\n}"} +{"label": "71", "index": "35119", "code": "int isRunNian(int year)\n{\n\tint result;\n\tif(year%400 == 0 ||(year%4==0 && year%100!=0))\n {\n\t\tresult = 1;\n\t} \n else\n {\n\t\tresult = 0;\n\t}\n return result;\t\n }\n int DiJiTian(int year, int month, int day)\n {\n\tint result = 0;\n int i;\n\tfor(i = 1; i < month; i++)\n { \t\n\t\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n {\n\t\t\tresult += 31;\t\n\t\t}\n else if (i == 4 || i ==6 || i == 9 || i==11)\n { \n\t\t\tresult += 30;\n\t\t} \n else if(i == 2)\n {\n\t\t\tif(isRunNian(year))\n {\n\t\t\t\tresult += 29;\n\t\t\t }\n else \n {\n\t\t\t\tresult += 28;\n\t\t\t }\t\n\t\t}\n\t}\n\tresult += day;\t\n\treturn result;\t\n}\n int main ()\n {\n int n,j;\n scanf(\"%d\",&n);\n for(j=0;jn2)\n\t\t\t{\n M=n1-n2;\n\t\t\t\tif(M%7==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"YES\\n\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprintf(\"NO\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n int j,n1=0,n2=0,M=0;\n\t\t\tfor(j=1;jn2)\n\t\t\t{\n M=n1-n2;\n\t\t\t\tif(M%7==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"YES\\n\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprintf(\"NO\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }\n \n\n\treturn 0;\n}"} +{"label": "71", "index": "35121", "code": "int rr(int a){\n if((a%4==0&&a%100!=0)||a%400==0)\n return 1;\n else return 0;\n}\nint main(){\n int n,m,p,q,i,k,t=0;\n cin>>n;\n int aa[n+1],bb[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n for(i=1;i<=n;i++){\n k=0; \n cin>>m>>p>>q;\n if(p>q){\n t=q;\n q=p;\n p=t; \n }\n while(pd)\n\t\t\tq=q+m[d+j];\n\t}\n\tif(q%7==0)\n\t{\n\t\tprintf(\"YES\\n\");\n\t}\n\telse\n\t{\n\t\tprintf(\"NO\\n\");\n\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35123", "code": "int run(int q){\n\tif(q%3200==0){\n\t\treturn 0;\n\t}else if(q%400!=0&&q%100==0){\n\t\treturn 0;\n\t}else if(q%4==0){\n\t\treturn 1;\n\t}else{\n\t\treturn 0;\n\t}\n}\nint main()\n{\n\tint i,j,year,a,b,n,x;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\tscanf(\"%d %d %d\",&year,&a,&b);\n\tint month[13];\n\tmonth[2]=28+run(year);\n\tmonth[1]=31;\n\tmonth[3]=31;\n\tmonth[5]=31;\n\tmonth[7]=31;\n\tmonth[8]=31;\n\tmonth[10]=31;\n\tmonth[12]=31;\n\tmonth[4]=30;\n\tmonth[6]=30;\n\tmonth[9]=30;\n\tmonth[11]=30;\n\tif(a>b){\n\t\tj=b;\n\t\tb=a;\n\t\ta=j;\n\t}\n\tx=0;\n\tfor(j=a;j> n;//????n \n for (int i = 1; i <= n; i++)\n {\n cin >> y >> mx >> my;//??????? \n if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)//???? \n leap = 1;//???2???? \n else leap = 0;//????? \n \n if (mx <= my) \n {\n m1 = mx;\n m2 = my;\n }\n else \n {\n m1 = my;\n m2 = mx;\n } //?mx?my????? \n \n while (m1 < m2)\n {\n if (m1 == 2) dd = 28 + leap;\n else if (m1 == 4 || m1 == 6 || m1 == 9 || m1 == 11) dd = 30;\n else dd = 31;//??m1???? \n d = d + dd; //????????????\n m1++; //??????\n }\n if (d % 7 == 0) cout << \"YES\" << endl;//????????????\n else cout << \"NO\" << endl;\n d = 0; //???? \n } \n \n \n return 0;\n}\n"} +{"label": "71", "index": "35126", "code": "\n \n\nint mtod(int yy,int mm1,int mm2)\n{\n\tint dd1,dd2,dd;\n\tif ((yy%400==0)||((yy%4==0)&&(yy%100!=0)))\n\t{\n\t\tswitch(mm1)\n\t\t{\n\t\tcase 1:dd1=0;break;\n\t\tcase 2:dd1=31;break;\n\t\tcase 3:dd1=31+29;break;\n\t\tcase 4:dd1=31+29+31;break;\n\t\tcase 5:dd1=31+29+31+30;break;\n\t\tcase 6:dd1=31+29+31+30+31;break;\n\t\tcase 7:dd1=31+29+31+30+31+30;break;\n\t\tcase 8:dd1=31+29+31+30+31+30+31;break;\n\t\tcase 9:dd1=31+29+31+30+31+30+31+31;break;\n\t\tcase 10:dd1=31+29+31+30+31+30+31+31+30;break;\n\t\tcase 11:dd1=31+29+31+30+31+30+31+31+30+31;break;\n\t\tdefault:dd1=31+29+31+30+31+30+31+31+30+31+30;break;\n\t\t}\n\t\tswitch(mm2)\n\t\t{\n\t\tcase 1:dd2=0;break;\n\t\tcase 2:dd2=31;break;\n\t\tcase 3:dd2=31+29;break;\n\t\tcase 4:dd2=31+29+31;break;\n\t\tcase 5:dd2=31+29+31+30;break;\n\t\tcase 6:dd2=31+29+31+30+31;break;\n\t\tcase 7:dd2=31+29+31+30+31+30;break;\n\t\tcase 8:dd2=31+29+31+30+31+30+31;break;\n\t\tcase 9:dd2=31+29+31+30+31+30+31+31;break;\n\t\tcase 10:dd2=31+29+31+30+31+30+31+31+30;break;\n\t\tcase 11:dd2=31+29+31+30+31+30+31+31+30+31;break;\n\t\tdefault:dd2=31+29+31+30+31+30+31+31+30+31+30;break;\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch(mm1)\n\t\t{\n\t\tcase 1:dd1=0;break;\n\t\tcase 2:dd1=31;break;\n\t\tcase 3:dd1=31+28;break;\n\t\tcase 4:dd1=31+28+31;break;\n\t\tcase 5:dd1=31+28+31+30;break;\n\t\tcase 6:dd1=31+28+31+30+31;break;\n\t\tcase 7:dd1=31+28+31+30+31+30;break;\n\t\tcase 8:dd1=31+28+31+30+31+30+31;break;\n\t\tcase 9:dd1=31+28+31+30+31+30+31+31;break;\n\t\tcase 10:dd1=31+28+31+30+31+30+31+31+30;break;\n\t\tcase 11:dd1=31+28+31+30+31+30+31+31+30+31;break;\n\t\tdefault:dd1=31+28+31+30+31+30+31+31+30+31+30;break;\n\t\t}\n\t\tswitch(mm2)\n\t\t{\n\t\tcase 1:dd2=0;break;\n\t\tcase 2:dd2=31;break;\n\t\tcase 3:dd2=31+28;break;\n\t\tcase 4:dd2=31+28+31;break;\n\t\tcase 5:dd2=31+28+31+30;break;\n\t\tcase 6:dd2=31+28+31+30+31;break;\n\t\tcase 7:dd2=31+28+31+30+31+30;break;\n\t\tcase 8:dd2=31+28+31+30+31+30+31;break;\n\t\tcase 9:dd2=31+28+31+30+31+30+31+31;break;\n\t\tcase 10:dd2=31+28+31+30+31+30+31+31+30;break;\n\t\tcase 11:dd2=31+28+31+30+31+30+31+31+30+31;break;\n\t\tdefault:dd2=31+28+31+30+31+30+31+31+30+31+30;break;\n\t\t}\n\t}\n\tdd=dd2-dd1;\n\treturn dd;\n}\n\nint main()\n{\n\tint n,i,k;\n\tint year,month1,month2;\n\tint ans[201];\n\tcin>>n;\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tcin>>year\n\t\t\t>>month1\n\t\t\t>>month2;\n\t\tk=mtod (year,month1,month2);\n\t\tif (k%7==0)\n\t\t{\n\t\t\tans[i]=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tans[i]=0;\n\t\t}\n\t\tyear=month1=month2=0;\n\t}\n for (i=1;i<=n;i++)\n\t{\n\t\tif (ans[i]==1)\n\t\t{\n\t\t\tcout<<\"YES\"<> n;\n\tfor (int i = 0; i < n; i ++)\n\t{\n\t\tcin >> y >> m >> t;\n\t\tsum = 0;\n\t\tif (m > t)\n\t\t{\n\t\t\tint j = m;\n\t\t\tm = t;\n\t\t\tt = j;\n\t\t}\n\t\tif ( y % 100 == 0)\n\t\t{\n\t\t\tif (y / 100 % 4 == 0)\n\t\t\t\ta[2] = 29;\n\t\t\telse\n\t\t\t\ta[2] = 28;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (y % 4 == 0)\n\t\t\t\ta[2] = 29;\n\t\t\telse\n\t\t\t\ta[2] = 28;\n\t\t}\n\t\tfor (int i = m; i < t; i ++)\n\t\t\tsum = sum + a[i];\n\t\tif (sum % 7 == 0)\n\t\t\tcout << \"YES\";\n\t\telse\n\t\t\tcout << \"NO\";\n\t\tcout << endl;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35128", "code": "int main()\n{\n\tint n, year, month1, month2, leap, days, month;\n\tcin >> n;\n\tfor(int i = 1; i <= n; i++)\n\t{\n\t\tdays =0;\n\t\tcin >> year >> month1 >> month2;\n\t\tif((year % 4 == 0 && year % 100 != 0) || year % 400 ==0)\n\t\t\tleap = 1;\n\t\telse\n\t\t\tleap = 0;\n\t\tif(month1 > month2)\n\t\t{\n\t\t\tfor(month = month2; month < month1; month++)\n\t\t\t{\n\t\t\t\tswitch(month)\n\t\t\t\t{\n\t\t\t\t\tcase 1\t:\n\t\t\t\t\tcase 3\t:\n\t\t\t\t\tcase 5\t:\n\t\t\t\t\tcase 7\t:\n\t\t\t\t\tcase 8\t:\n\t\t\t\t\tcase 10\t:\n\t\t\t\t\tcase 12 : days += 31; break;\n\t\t\t\t\tcase 4\t:\n\t\t\t\t\tcase 6\t:\n\t\t\t\t\tcase 9\t:\n\t\t\t\t\tcase 11 : days += 30; break;\n\t\t\t\t\tcase 2 : days += 28 + leap; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(month1 < month2)\n\t\t{\t\n\t\t\tfor(month = month1; month < month2; month++)\n\t\t\t{\n\t\t\t\tswitch(month)\n\t\t\t\t{\n\t\t\t\t\tcase 1\t:\n\t\t\t\t\tcase 3\t:\n\t\t\t\t\tcase 5\t:\n\t\t\t\t\tcase 7\t:\n\t\t\t\t\tcase 8\t:\n\t\t\t\t\tcase 10\t:\n\t\t\t\t\tcase 12 : days += 31; break;\n\t\t\t\t\tcase 4\t:\n\t\t\t\t\tcase 6\t:\n\t\t\t\t\tcase 9\t:\n\t\t\t\t\tcase 11 : days += 30; break;\n\t\t\t\t\tcase 2 : days += 28 + leap; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(days % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35129", "code": "int DiJiTian(int year, int month, int day);\nint main(){\nint year,montho,montht;\nint n,i,k;\nscanf(\"%d\",&n);\nfor(i=0;i2&&a[2]>2&&(b[a[1]-1]-b[a[2]-1])%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse if(a[1]<3&&a[2]<3&&(b[a[1]-1]-b[a[2]-1])%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse if(a[1]<3&&a[2]>2&&(b[a[2]-1]-b[a[1]-1]+1)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse if(a[2]<3&&a[1]>2&&(b[a[1]-1]-b[a[2]-1]+1)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"NO\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t if((b[a[1]-1]-b[a[2]-1])%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"NO\\n\");\n\t\t}\n\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35131", "code": "/*\n*??? 5(1)\n*?? ???\n*?? 2012?10?22?\n*??? ???\n*/ \nint main()\n{\n int year[201], n, month1[201], month2[201], a[201], i, j;\n cin >> n;\n for(i = 1; i <= n; i++)\n {\n cin >> year[i] >> month1[i] >> month2[i];\n if((year[i] % 4 == 0 && year[i] % 100 != 0) || (year[i] % 400 == 0))\n {\n int day[12] = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};// ???????????????\n a[i] = (day[month2[i] - 1] - day[month1[i] - 1]) % 7 == 0;\n }\n else\n {\n int day[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};\n a[i] = (day[month2[i] - 1] - day[month1[i] - 1]) % 7 == 0;\n }\n }\n for(i = 1; i <= n; i++)\n {\n if(a[i])\n cout << \"YES\" << endl;\n else\n cout << \"NO\" << endl;\n }\n return 0;\n}\n "} +{"label": "71", "index": "35132", "code": "int main(){\n int n,i,x,z,t;\n cin>>n;\n int y[n],m1[n],m2[n];\n for(i=0;i m2) { /* make sure m2 > m1 */\n j = m1;\n m1 = m2;\n m2 = j;\n }\n for (j=m1-1; j<(m2-1); j++) \n sum += days[j];\n if (sum % 7 == 0)\n printf(\"%s\\n\", \"YES\");\n else\n printf(\"%s\\n\", \"NO\");\n }\n\n return 0;\n}\n \n\nint is_leap_year(int n)\n{\n if ((n % 400 == 0) || ((n % 4 == 0) && (n % 100 != 0)))\n return 1;\n else\n return 0;\n}\n\n"} +{"label": "71", "index": "35135", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint n,i,year,month1,month2,a,b;\n\tscanf(\"%d\",&n);\n\t\n\tfor(i=0;imonth2){ //????? \n\t\t\ttemp=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=temp;\n\t\t}\n\n\t\tfor(j=month1;j>n;\n\tint i,j;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tint y,m1,m2;\n\t\tcin>>y>>m1>>m2;\n\t\tif(m1>m2)\n\t\t{\n\t\t\tint m=m1;m1=m2;m2=m;\n\t\t}\n\t\tif(y%4==0&&y%100!=0||y%400==0)\n\t\t{\n\t\t\tint count=0;\n\t\t\tfor(j=m1;j<=m2-1;j++)\n\t\t\t\tcount=count+b[j];\n\t\t\tif(count%7==0)\n\t\t\t\tcout<<\"YES\"<0&&(t[a]-t[b])%7==0) || (t[a]-t[b]<0&&(t[b]-t[a])%7==0) )\n // printf(\"YES\");\n }\n else\n {\n t[1]=1;\n t[2]=t[1]+31;\n t[3]=t[2]+28;\n t[4]=t[3]+31;\n t[5]=t[4]+30;\n t[6]=t[5]+31;\n t[7]=t[6]+30;\n t[8]=t[7]+31;\n t[9]=t[8]+31;\n t[10]=t[9]+30;\n t[11]=t[10]+31;\n t[12]=t[11]+30;\n }\n }\n else if(y%4==0)\n {\n t[1]=1;\n t[2]=t[1]+31;\n t[3]=t[2]+29;\n t[4]=t[3]+31;\n t[5]=t[4]+30;\n t[6]=t[5]+31;\n t[7]=t[6]+30;\n t[8]=t[7]+31;\n t[9]=t[8]+31;\n t[10]=t[9]+30;\n t[11]=t[10]+31;\n t[12]=t[11]+30;\n }\n else {\n t[1]=1;\n t[2]=t[1]+31;\n t[3]=t[2]+28;\n t[4]=t[3]+31;\n t[5]=t[4]+30;\n t[6]=t[5]+31;\n t[7]=t[6]+30;\n t[8]=t[7]+31;\n t[9]=t[8]+31;\n t[10]=t[9]+30;\n t[11]=t[10]+31;\n t[12]=t[11]+30;\n }\n\n\n if( (t[a]-t[b]>0&&(t[a]-t[b])%7==0) || (t[a]-t[b]<0&&(t[b]-t[a])%7==0) )\n printf(\"YES\\n\");\n else printf(\"NO\\n\");\n }\n\n}\n"} +{"label": "71", "index": "35140", "code": "main()\n{\n int n,y,x;\n scanf(\"%d\",&n); \n int s[12]={0};\n for(int i=0;ic)?b:c;\n x=(b>n;//??\n\twhile(n--)\n\t{ int sum=0;\n\t\tcin>>year>>month1>>month2;\n\t\tif(month1>month2) {//???????\n\t\t\ttemp=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=temp;\n\t\t}\n\t\tfor(i=month1;im2){\n\t\t if((m1-m2)%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\t\telse \n\t\t\tprintf(\"NO\\n\");\n\t\t}\n if(m2>m1){\n\t\t if((m2-m1)%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\t\telse \n\t\t\tprintf(\"NO\\n\");\n\t\t}\n\n\t}\n return 0;\n}"} +{"label": "71", "index": "35144", "code": "/*???2011-12-30\n *??????\n *????08.cpp\n *????? - ??(10.5) ???\n */\n\n\nint main()\n{\n\tint month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tint n = 0;\n\tint year = 0;\n\tint month1 = 0;\n\tint month2 = 0;\n\tint days = 0;\n\tcin >> n;\n\tfor (int temp = 0; temp < n; temp++)\n\t{\n\t\tcin >> year >> month1 >> month2;\n\t\tdays = 0;\n\t\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\t\tmonth[2] = 29;\n\t\telse\n\t\t\tmonth[2] = 28;\n\t\tif (month1 < month2)\n\t\t\tfor (int temp2 = month1; temp2 < month2; temp2++)\n\t\t\t\tdays += month[temp2];\n\t\telse\n\t\t\tfor (int temp2 = month2; temp2 < month1; temp2++)\n\t\t\t\tdays += month[temp2];\n\t\tif (days % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35145", "code": "int main()\n{\nint n,year,m1,m2,x=0,i,m,a,b;\nscanf(\"%d\",&n);\nfor(i=0;i>n;\n\tint a,b,c;\n\twhile(n--)\n\t{\n\t\ts=0;\n\t\tcin>>a>>b>>c;\n\t\tif(bm2)\n\t\t{\n\t\t\ttmp=m1;\n\t\t\tm1=m2;\n\t\t\tm2=tmp;\n\t\t}\n\t\tif(year%4==0&&year%100!=0||year%400==0)\n\t\t\tleap=1;\n\t\telse\n\t\t\tleap=0;\n\t\tq=0;\n\t\tif(leap==1)\n\t\t{\n\t\t\tint month[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\t\t\tfor(k=m1;km2)\n {\n int t=m1;\n m1=m2;\n m2=t; \n }\n if(((y%4==0)&&(y%100!=0))||(y%400==0)) month[2]=29;\n int mp,sum=0;\n for(mp=m1;mp>n;\nwhile(n--)\n{\ncin>>year>>month1>>month2;\nint temp;\nif(month1>month2)\n{\n\ttemp=month2;\n\tmonth2=month1;\n\tmonth1=temp;\n}\nif(year%400==0||(year%4==0&&year%100!=0))\n\tleap=0;\nelse leap=1;\nint day[2][12]={31,29,31,30,31,30,31,31,30,31,30,31,31,28,31,30,31,30,31,31,30,31,30,31};\nfor(int i=month1;id) {\n j=c;\n\t\t\t\t c=d;\n\t\t\t\t d=j;\n\t\t\t }\n\t\t\t \n\t\t\t for(j=c;j2))x=x+1;\n\t\t else x=x;\n\t\t if(C[i]==1)y=1;\n else if(C[i]==2)y=31+1;\n else if(C[i]==3)y=31+28+1;\n else if(C[i]==4)y=31+28+31+1;\n else if(C[i]==5)y=31+28+31+30+1;\n else if(C[i]==6)y=31+28+31+30+31+1;\n else if(C[i]==7)y=31+28+31+30+31+30+1;\n else if(C[i]==8)y=31+28+31+30+31+30+31+1;\n else if(C[i]==9)y=31+28+31+30+31+30+31+31+1;\n else if(C[i]==10)y=31+28+31+30+31+30+31+31+30+1;\n else if(C[i]==11)y=31+28+31+30+31+30+31+31+30+31+1;\n else if(C[i]==12)y=31+28+31+30+31+30+31+31+30+31+30+1;\n if( (( (A[i]%4==0)&&(A[i]%100!=0) ) ||(A[i]%400==0))&&(C[i]>2))y=y+1;\n\t\t else y=y;\n\t\t if((x-y)%7==0)\n\t\t printf(\"YES\\n\");\n\t\t else\n\t\t printf(\"NO\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35154", "code": "int f(int nian,int yue ,int ri){\n\tint z=0,i;\n\tint d[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif(nian%400==0||(nian%4==0&&nian%100!=0)){\n\t\td[1]=29;\n\t}\n\tfor(i=0;id){\n\t\t\tx1=d;\n\t\t\td=m;\n\t\t\tm=x1;\n\t\t}\n\t\t\tint j,sum=0;\n\t\t\tfor(j=m;jc){\n\t\t\te=c;\n\t\t\tc=b;\n\t\t\tb=e;\n\t\t}\n\t\tfor(i=b;i>n;\n\tfor(i=0;i>a[i]>>b[i]>>c[i];\n\t\tif(a[i]%4!=0||a[i]%100==0&&a[i]%400!=0)\n\t\t{\n\t\t\tswitch(b[i])\n\t\t\t{\n\t\t\tcase 1:s=1;break;\n\t\t\tcase 2:s=32;break;\n\t\t\tcase 3:s=60;break;\n\t\t\tcase 4:s=91;break;\n\t\t\tcase 5:s=121;break;\n\t\t\tcase 6:s=152;break;\n\t\t\tcase 7:s=182;break;\n\t\t\tcase 8:s=213;break;\n\t\t\tcase 9:s=244;break;\n\t\t\tcase 10:s=274;break;\n\t\t\tcase 11:s=305;break;\n\t\t\tcase 12:s=335;break;\n\t\t\tdefault :;\n\t\t\t}\n\t\t\tswitch(c[i])\n\t\t\t{\n\t\t\t\tcase 1:m=1;break;\n\t\t\tcase 2:m=32;break;\n\t\t\tcase 3:m=60;break;\n\t\t\tcase 4:m=91;break;\n\t\t\tcase 5:m=121;break;\n\t\t\tcase 6:m=152;break;\n\t\t\tcase 7:m=182;break;\n\t\t\tcase 8:m=213;break;\n\t\t\tcase 9:m=244;break;\n\t\t\tcase 10:m=274;break;\n\t\t\tcase 11:m=305;break;\n\t\t\tcase 12:m=335;break;\n\t\t\tdefault :;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\tswitch(b[i])\n\t\t\t{\n\t\t\tcase 1:s=1;break;\n\t\t\tcase 2:s=32;break;\n\t\t\tcase 3:s=61;break;\n\t\t\tcase 4:s=92;break;\n\t\t\tcase 5:s=122;break;\n\t\t\tcase 6:s=153;break;\n\t\t\tcase 7:s=183;break;\n\t\t\tcase 8:s=214;break;\n\t\t\tcase 9:s=245;break;\n\t\t\tcase 10:s=275;break;\n\t\t\tcase 11:s=306;break;\n\t\t\tcase 12:s=336;break;\n\t\t\tdefault :;\n\t\t\t}\n\t\t\tswitch(c[i])\n\t\t\t{\n\t\t\t\tcase 1:m=1;break;\n\t\t\tcase 2:m=32;break;\n\t\t\tcase 3:m=61;break;\n\t\t\tcase 4:m=92;break;\n\t\t\tcase 5:m=122;break;\n\t\t\tcase 6:m=153;break;\n\t\t\tcase 7:m=183;break;\n\t\t\tcase 8:m=214;break;\n\t\t\tcase 9:m=245;break;\n\t\t\tcase 10:m=275;break;\n\t\t\tcase 11:m=306;break;\n\t\t\tcase 12:m=336;break;\n\t\t\tdefault :;\n\t\t\t}\n\t\t}\n\t\tif((abs(s-m))%7==0)\n\t\t\tcout<<\"YES\";\n\t\telse\n\t\t\tcout<<\"NO\";\n\t\tcout< m2) {\n int t = m1;\n m1 = m2;\n m2 = t;\n }\n /* ??????? */\n diff = 0;\n for (m=m1; m>n;\n\tint y,m1,m2,sum;\n\tfor(int i=1;i<=n;i++)\n\t{\n\t\tsum=0;\n\t\tint temp;\n\t\tcin>>y>>m1>>m2;\n\t\tif(m1>m2)\n\t\t{\n\t\t\ttemp=m1;\n\t\t\tm1=m2;\n\t\t\tm2=temp;\n\n\t\t}\n\t\tif((y%4==0 && y%100!=0) || y%400==0)\n\t\t{\n\t\t\tfor(int s=m1-1;s<=m2-2;s++)\n\t\t\t{\n\t\t\t\tsum=sum+b[s];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int s=m1-1;s<=m2-2;s++)\n\t\t\t{\n\t\t\t\tsum=sum+a[s];\n\t\t\t}\n\t\t}\n\t\tif(sum%7==0)\n\t\t\tcout<<\"YES\"<b)\n {k=c;c=b;b=k;}\n while(b>c)\n {\n if(c==11)\n {d=d+2;}\n if(c==10)\n {d=d+3;}\n if(c==9)\n {d=d+2;}\n if(c==8)\n {d=d+3;}\n if(c==7)\n {d=d+3;}\n if(c==6)\n {d=d+2;}\n if(c==5)\n {d=d+3;}\n if(c==4)\n {d=d+2;}\n if(c==3)\n {d=d+3;}\n if(c==2)\n {d=d+1;}\n if(c==1)\n {d=d+3;}\n c++;\n }\n if(d%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\"); \n }\n if(f(a)==1)\n {\n if(c>b)\n {a=c;c=b;b=a;}\n while(b>c)\n {\n if(c==11)\n {d=d+2;}\n if(c==10)\n {d=d+3;}\n if(c==9)\n {d=d+2;}\n if(c==8)\n {d=d+3;}\n if(c==7)\n {d=d+3;}\n if(c==6)\n {d=d+2;}\n if(c==5)\n {d=d+3;}\n if(c==4)\n {d=d+2;}\n if(c==3)\n {d=d+3;}\n if(c==1)\n d=d+3;\n c++;\n }\n if(d%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\"); \n }\n \n }\n}\n"} +{"label": "71", "index": "35163", "code": "int main(int argc, char* argv[])\n{\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tint a,b,c,sum;\n\tfor(i=0;ic)\n\t\t\t{\n\t\t\t\tfor(j=c,sum=0;jc)\n\t\t\t{\n\t\t\t\tfor(j=c,sum=0;jm2){\n\t\t\tc=m2;\n\t\t\tm2=m1;\n\t\t\tm1=c;}\n\t\tif(y%4!=0||(y%100==0&&y%400!=0)){\n\t\t\tfor(b=m1;b>n;\nfor(i=0;i>a>>b>>c;\nif(a%4==0&&(a%100!=0||a%400==0))\n{\nint m[12]={0,3,4,7,9,12,14,17,20,22,25,27};\nif((m[b-1]-m[c-1])%7==0) cout<<\"YES\"<>n;\n\tfor (int i=1;i<=n;i++)\n\t{\n\t cin>>year>>month1>>month2;\n\t\tsum=0;\n\t\tif(month1>month2)\n\t\t{\n\t\t\tl=month2;\n\t\t\tmonth2=month1;\n\t\t\tmonth1=l;\n\t\t}\n\t\tif (year%400==0||(year%4==0&&year%100!=0))\n\t\t{\n\t\t\tfor (int j=month1;j=8)?(b+1)/2:b/2;\n if(b==1) c=1;\n if(b==2) c=32;\n if(rn(a)==1)\n if(b>2) c=61+31*(d-1)+30*(b-2-d);\n if(rn(a)==0)\n if(b>2) c=60+31*(d-1)+30*(b-2-d);\n return(c);\n }\nmain()\n{\n int n,i,p,q,a,b,c;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%d %d %d\",&a,&b,&c);\n p=day(a,b);\n q=day(a,c);\n if((p-q)%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\");\n } \n getchar();getchar();\n }\n"} +{"label": "71", "index": "35170", "code": "\nint main()\n{\n\tint n;\n\tint i,j;\n\tint year,m1,m2;\n\tint length1=0,length2=0;\n\tint length;\n\tint A[]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint B[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>n;\n\tfor(i=0;i>year>>m1>>m2;\n\t\t\n\tif(year%4==0&&year%100!=0||year%400==0)\n\t{\n\t\tfor(j=1;jan[i][2]){\n s=an[i][1]-1;\n if ((s==11)||(s==9)||(s==6)||(s==4))\n t[i]=t[i]+30;\n \n if((s==10)||(s==8)||(s==7)||(s==5)||(s==3)||(s==1))\n t[i]=t[i]+31;\n \n if (s==2){\n if ((an[i][0]%4==0)&&(an[i][0]%100!=0)||an[i][0]%400==0)\n t[i]=t[i]+29;\n else \n t[i]=t[i]+28;\n } \n an[i][1]=an[i][1]-1; \n }\n }\n for (i=0;ia[i][3])\n \t{\n \t\tx=a[i][3];\n \t\ty=a[i][2];\n \t}\n \telse\n \t{\n \t\tx=a[i][2];\n \t\ty=a[i][3];\n \t};\n \t\n \t\n \tif(x==1)\n \tm=0;\n \telse if(x==2)\n \tm=31;\n \telse if(x==3)\n \tm=31+28+a[i][4];\n \telse if(x==4)\n \tm=31+28+a[i][4]+31;\n \telse if(x==5)\n \tm=31+28+a[i][4]+31+30;\n \telse if(x==6)\n \tm=31+28+a[i][4]+31+30+31;\n \telse if(x==7)\n \tm=31+28+a[i][4]+31+30+31+30;\n \telse if(x==8)\n \tm=31+28+a[i][4]+31+30+31+30+31;\n \telse if(x==9)\n \tm=31+28+a[i][4]+31+30+31+30+31+31;\n \telse if(x==10)\n \tm=31+28+a[i][4]+31+30+31+30+31+31+30;\n \telse if(x==11)\n \tm=31+28+a[i][4]+31+30+31+30+31+31+30+31;\n \t\n \tif(y==2)\n \td=31;\n \telse if(y==3)\n \td=31+28+a[i][4];\n \telse if(y==4)\n \td=31+28+a[i][4]+31;\n \telse if(y==5)\n \td=31+28+a[i][4]+31+30;\n \telse if(y==6)\n \td=31+28+a[i][4]+31+30+31;\n \telse if(y==7)\n \td=31+28+a[i][4]+31+30+31+30;\n \telse if(y==8)\n \td=31+28+a[i][4]+31+30+31+30+31;\n \telse if(y==9)\n \td=31+28+a[i][4]+31+30+31+30+31+31;\n \telse if(y==10)\n \td=31+28+a[i][4]+31+30+31+30+31+31+30;\n \telse if(y==11)\n \td=31+28+a[i][4]+31+30+31+30+31+31+30+31;\n \telse if(y==12)\n \td=31+28+a[i][4]+31+30+31+30+31+31+30+31+30;\n \t\n \te=d-m;\n \tf=e-(e/7)*7;\n \t\n \tif(f==0)\n \tprintf(\"YES\\n\");\n \telse\n \tprintf(\"NO\\n\");\n }\n \n}"} +{"label": "71", "index": "35173", "code": "int runnian(int n);\nint day(int m);\nint main()\n{\n\tint n,y,m1,m2;\n\tint i;\n\tint e,da;\n\tscanf(\"%d\",&n);\n\tfor(i=0;im2)\n\t\t{\n\t\t\te=m1;\n\t\t\tm1=m2;\n\t\t\tm2=e;\n\t\t}\n\t\tif((m1==1||m1==2)&&(m2!=1&&m2!=2)&&runnian(y)==1)\n\t\t{\n\t\t\tda=day(m2)-day(m1)+1;\n\t\t}\n\t\telse \n\t\t\tda=day(m2)-day(m1);\n\tif(da%7==0)\n\t\tprintf(\"YES\\n\");\n\telse printf(\"NO\\n\");\n\t}\n\treturn 0;\n}\nint runnian(int n)\n{\n\tif(n%400==0)\n\t\treturn 1;\n\telse if(n%100==0)\n\t\treturn 0;\n\telse if(n%4==0)\n\t\treturn 1;\n\telse return 0;\n}\nint day(int m)\n{\n\tint num;\n\tif(m==1)\n\t\tnum=0;\n\telse if(m==2)\n\t\tnum=31;\n\telse if(m==3)\n\t\tnum=59;\n\telse if(m==4)\n\t\tnum=90;\n\telse if(m==5)\n\t\tnum=120;\n\telse if(m==6)\n\t\tnum=151;\n\telse if(m==7)\t\t\n\t\tnum=181;\n\telse if(m==8)\n\t\tnum=212;\n\telse if(m==9)\n\t\tnum=243;\n\telse if(m==10)\n\t\tnum=273;\n\telse if(m==11)\n\t\tnum=304;\n\telse if(m==12)\n\t\tnum=334;\n\treturn num;\n}"} +{"label": "71", "index": "35174", "code": "int main(int argc, char* argv[])\n{\n\tint i,n,a[200],b[200],c[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;im2)\n {\n m=m1;\n m1=m2;\n m2=m;\n } \n \n if((y%4==0&&y%100!=0)||(y%400==0))\n {\n int mon[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n for(j=m1;j<=m2-1;j++)\n {\n sum=sum+mon[j];\n }\n if(sum%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\");\n }\n else if((y%4!=0)||(y%100==0&&y%400!=0))\n {\n int mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n for(j=m1;j<=m2-1;j++)\n {\n sum=sum+mon[j];\n }\n if(sum%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\");\n }\n }\n //int a;\n //scanf(\"%d\",&a);\n //printf(\"%d\",a);\n return 0;\n}\n"} +{"label": "71", "index": "35176", "code": "//\u0093???\u0094????????????????????????????????????????????????????????????????????????????????????7?????????????????????????????????????????28????7???????4??????????????????????????????????????29??????????????????????\n \n//???? \n//?????????n?n?200?? \n//??n??????????????????????????????????\n \n//???? \n//???n???????????????????? \n//???????????????YES? \n//?????NO?\n \n//???? \n//5\n//1994 10 9\n//1935 12 1\n//1957 1 9\n//1917 9 12\n//1948 1 4\nvoid main()\n{\n\tint a,b,c,d,e,f,i,j,k,sum=0,x,n,ex;\n\tscanf(\"%d\",&n);\n\tfor(x=1;x<=n;x++){\n\tsum=0;\n\tscanf(\"%d%d%d\",&a,&b,&e);\n\td=a;\n\tc=f=1;\n\tif(b>e){\n\t\tex=b;\n\t\tb=e;\n\t\te=ex;\n\t}\n\tfor(i=a;i<=d;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0)) \n\t\t\tsum=sum+366;\n\t\telse\n\t\t\tsum=sum+365;\n\t}\n\tfor(j=1;j<=b-1;j++)\n\t{\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum-30;\n\t\t\telse if((a%4==0&&a%100!=0)||(a%400==0))\n\t\t\t\t\tsum=sum-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum-28;\n\t}\n\tfor(j=e+1;j<=12;j++)\n\t{\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum-30;\n\t\t\telse if((d%4==0&&d%100!=0)||(d%400==0))\n\t\t\t\t\tsum=sum-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum-28;\n\t}\n\tj=e;\n\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum+f-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum+f-30;\n\t\t\telse if((j%4==0&&j%100!=0)||(j%400==0))\n\t\t\t\t\tsum=sum+f-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum+f-28;\n\tsum=sum-c;\n\t//printf(\"%d\",sum);\n\tif(x==1)\n\t\tif(sum%7==0)\n\t\t\tprintf(\"YES\");\n\t\telse\n\t\t\tprintf(\"NO\");\n\telse\n\t\tif(sum%7==0)\n\t\t\tprintf(\"\\nYES\");\n\t\telse\n\t\t\tprintf(\"\\nNO\");\n\t}\n}\t\n"} +{"label": "71", "index": "35177", "code": "int main()\n{\n int a,b,c,i,n;\n scanf(\"%d\\n\",&n);\n for(i=1;i<=n;i++){\n scanf(\"%d %d %d\\n\",&a,&b,&c);\n if((b==3&&c==11)||(b==11&&c==3)||(b==4&&c==7)||(b==7&&c==4)||(b==9&&c==12)||(b==12&&c==9)){\n printf(\"YES\\n\");}\n else if(((a%4==0&&a%100!=0)||(a%400==0))&&((b==1&&c==4)||(b==4&&c==1)||(b==1&&c==7)||(b==7&&c==1)||(b==2&&c==8)||(b==8&&c==2))){\n printf(\"YES\\n\");}\n else if(((a%4!=0||a%100==0)&&(a%400!=0))&&((b==1&&c==10)||(b==10&&c==1)||(b==2&&c==3)||(b==3&&c==2)||(b==2&&c==11)||(b==11&&c==2))){\n printf(\"YES\\n\");}\n else{\n printf(\"NO\\n\");}\n }\n return 0;\n}\n \n "} +{"label": "71", "index": "35178", "code": "int main()\n{\n\tint n,m,a,b,c;\n\tcin>>n;\n\tfor(int i=0;i>m>>a>>b;\n\t c=0;\n\t if(aY2)\n\t\t{\n\t\t\tfor(i=Y2;iY2)\n\t\t{\n\t\t\tfor(i=Y2;i>n;\n while(n--)\n {\n int y,m1,m2,s;\n cin>>y>>m1>>m2;\n s=abs(day(y,m1)-day(y,m2));\n if(s%7==0)\n cout<<\"YES\"<n)\n\t{\n\t\te=m;\n\tm=n;\n\tn=e;\n\t}\n\t\tfor(i=m;i>n;//?????\nfor(i=1;i<=n;i++)//?????????\n{for(j=1;j<=3;j++)\ncin>>a[i][j];}\nfor(i=1;i<=n;i++)//?????????????\n\t{if(a[i][2]>a[i][3])\n {k=a[i][2];a[i][2]=a[i][3];a[i][3]=k;}}\nfor(i=1;i<=n;i++)//?????????\n {d=0;\n\t for(r=a[i][2]-1;r=3)&&((a[i][1]%4==0&&a[i][1]%100!=0)||(a[i][1]%400==0)))//????\n\t d=d+1; \nif(d%7==0)cout<<\"YES\"<=0?a[i]:(0-a[i]));\n\t}\n\n\tfor(i=0;im2)\n{t=m1;\nm1=m2;\nm2=t;}\ns=0;\nfor(j=m1;j<=m2-1;j++)\n{s+=a[j];\nif(j==2&&b==1)\n{s++;}}\nif(s%7==0)\n{printf(\"YES\\n\");}\nelse\n{printf(\"NO\\n\");}}\nreturn 0;\n}"} +{"label": "71", "index": "35186", "code": "\nint f(int y, int m1, int m2)\n{\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint sum=0,i;\n\tfor(i=m1;i<=m2-1;i++)\n\t\t{\n\t\tsum=sum+a[i];\n\t}\n\n\t\tif(m1<=2 &&((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)))\n\t\t\tsum=sum+1;\n\n\t\tif(sum%7==0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\n\t\n}\n\nvoid main()\n{\n\tint n,y,m1,m2,m,i;\n\tscanf(\"%d\",&n);\n\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%d%d%d\",&y,&m1,&m2);\n\t\tif(m1>m2)\n\t\t{\n\t\t\tm=m1;\n\t\t\tm1=m2;\n\t\t\tm2=m;\n\t\t}\n\t\tif(f(y,m1,m2))\n\t\t\tprintf(\"YES\\n\");\n\t\telse\n\t\t\tprintf(\"NO\\n\");\n}\n}"} +{"label": "71", "index": "35187", "code": "int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\nint judge[100];\nint main()\n{\n memset(judge,0,sizeof judge);\n int n,i;\n cin>>n;\n for(i=1;i<=n;i++)\n {\n int year,month1,month2;\n cin>>year>>month1>>month2;\n if(month1>month2)\n {\n int temp=month1;\n month1=month2;\n month2=temp;\n }\n int day=0,j;\n\n if(month1==month2) day=0;\n else if((year%4==0&&year%100!=0)||year%400==0)\n {\n for(j=month1;j>n;\n\tfor(;n>=1;n--){\n\t\tday=0;\n\t\tcin>>year>>month1>>month2;\n\t\tmon[2]=mon[2]+luna(year);\n\t\tif(month1-month2>0)\n\t\t{\n\t\t\tfor(;month2>n;\n\tb[0]=31;b[2]=31;b[3]=30;b[4]=31;b[5]=30;b[6]=31;b[7]=31;b[8]=30;b[9]=31;b[10]=30;\n\tint year,mon_1,mon_2;\n\tfor(i=0;i>a[i][0]>>a[i][1]>>a[i][2];\n\t}\n\tfor(i=0;i=a[i][2]) \n\t\t{int temp;\n\t\ttemp=mon_1;\n\t\tmon_1=mon_2;\n\t\tmon_2=temp;\n\t\t}\n\t\tif((year%4==0&&year%100!=0)||((year%400)==0))\n\t\t{\n\t\t\tb[1]=29;\n\t\t\tfor(t=(mon_1-1);t<(mon_2-1);t++)\n\t\t\t\t{sum=sum+b[t];\n\t\t\t}\n\t\t\tif(sum%7==0) cout<<\"YES\"<b)\n{\n t=a;\n a=b;\n b=t;\n}\nfor(i=a;i>n;\n\tint year[300],mon1[300],mon2[300];\n\tint i,j;\n\tfor(i=0;i>year[i]>>mon1[i]>>mon2[i];\n\t}\n\t\n\t\n\tfor(i=0;imon2[i])\n\t\t\t{\n\t\t\t\tfor(j=mon2[i];jmon2[i])\n\t\t\t{\n\t\t\t\tfor(j=mon2[i];jb){\n Temp=a;\n\t\t\ta=b;\n\t\t\tb=Temp;\n\t\t}\n\t\tif( year%400==0 || (year%4==0 && year%100!=0))\n\t\t{\n\t\t\tdays=0;\n\t\t\tfor(j=a;j= b) return a;\n else return b;\n}\n\nint main()\n{\n int n, year, month1, month2, big, small, countdays;\n int days[2][12] = {{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},\n {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};\n cin >> n;\n for (int i = 0; i < n; i++)\n {\n cin >> year >> month1 >> month2;\n big = bigger(month1, month2);\n small = month1 + month2 - big;\n countdays = 0;\n for (int j = small - 1; j < big - 1; j++)\n {\n countdays += days[leap(year)][j];\n }\n if (countdays % 7 == 0) cout << \"YES\" << endl;\n else cout << \"NO\" << endl;\n }\n\n return 0;\n}\n"} +{"label": "71", "index": "35195", "code": "int main()\n{\n\tint year,m1,n,m2,d1=0,d2=0,i,j,k;\n\tint\tmonth1[12]={0,31,28,31,30,31,30,31,31,30,31,30};\n\tint month2[12]={0,31,29,31,30,31,30,31,31,30,31,30};\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d %d %d\",&year,&m1,&m2); \n\t\tif ((year%400==0)||(year%4==0&&year%100!=0))//???//\n\t\t{\n\t\t\tfor (j=1;j<=m1;j++)\n\t\t\t{\n\t\t\t\td1+=month2[j-1];\n\t\t\t}\n\t\t\tfor (j=1;j<=m2;j++)\n\t\t\t{\n\t\t\t\td2+=month2[j-1];\n\t\t\t}\n\t\t\tif((d1-d2)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tfor (j=1;j<=m1;j++)\n\t\t\t{\n\t\t\t\td1+=month1[j-1];\n\t\t\t}\n\t\t\tfor (j=1;j<=m2;j++)\n\t\t\t{\n\t\t\t\td2+=month1[j-1];\n\t\t\t}\n\t\t\tif((d1-d2)%7==0)\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t\td1=0;d2=0;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35196", "code": "main()\n{\n int n,i,j,a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n scanf(\"%d\",&n);\n for(i=0;i> n;\n\tfor (k = 1; k <= n; k++)\n\t{\n\t\tdays = 0;\n\t\tcin >> year >> mona >> monb;\n\t\tleap = ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0);\n\t\tif (mona < monb)\n\t\t{\n\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmonc = mona;\n\t\t\t\tmona = monb;\n\t\t\t\tmonb = monc;\n\t\t\t}\n\t\t\tfor (mon = mona; mon <= monb - 1; mon++)\n\t\t\t{\n\t\t\t\tswitch (mon)\n\t\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t\tcase 5:\n\t\t\t\tcase 7:\n\t\t\t\tcase 8:\n\t\t\t\tcase 10:\n\t\t\t\tcase 12:\n\t\t\t\t\t{\n\t\t\t\t\t\tdays += 31;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tcase 4:\n\t\t\t\tcase 6:\n\t\t\t\tcase 9:\n\t\t\t\tcase 11:\n\t\t\t\t\t{\n\t\t\t\t\t\tdays += 30;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tcase 2:\n\t\t\t\t\t{\n\t\t\t\t\t\tdays += 28 + leap;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//cout << \"days=\" << days << endl;\n\t\t\tif (days % 7 == 0)\n\t\t\t\tcout << \"YES\" << endl;\n\t\t\telse\n\t\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n\t\n}"} +{"label": "71", "index": "35199", "code": "int main()\n{\n\tint n, year, a, b, k, i, t, sum;\n\tint x[12]={3,1,3,2,3,2,3,3,2,3,2,3};\n\tint y[12]={3,0,3,2,3,2,3,3,2,3,2,3};\n\tcin >> n;\n\tfor(i=0;i> year >> a >> b;\n\t\tsum = 0;\n\t\tif(a>b)\n\t\t{\n\t\t\tk = a;\n\t\t\ta = b;\n\t\t\tb = k;\n\t\t}\n\t\tif((year%4==0&&year%100!=0)||(year%400==0))\n\t\t{\n\t\t\tfor(t=a-1;ty2)\n\t\t{\n\t\t\ttmp=y1;\n\t\t\ty1=y2;\n\t\t\ty2=tmp;\n\t\t}\n\t\tif((year%4==0&&year%100!=0)||year%400==0)\n\t\t{\n\t\t\ta[2]=29;\n\t\t\tfor(;y1n2[i]){\n\t\t\t\tfor(j=n2[i];jn2[i]){\n\t\t\t\tfor(j=n2[i];jm2)\n\t\t{\n\t\t\ttemp=m1;\n\t\t\tm1=m2;\n\t\t\tm2=temp;}\n\t\tint sum1=0;\n\t\tfor(j=m1;jc)?b:c;\n\t\tq=(b2){\n \t p=p+1; \n }\n\t\t \t\n }\n for(j=q;jy)z=x;\n\telse z=y;\n\treturn(z);\n}\n\nint min(int x,int y)\n{\n\tint z;\n\tif(x>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tm=0;\n\t\tcin>>x>>y>>z;\n\t\tif((x%100==0&&x%400==0)||(x%100!=0&&x%4==0))\n\t\t{\n\t\t\tint a[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\t\t\tfor(j=min(y,z);j month2){\n\t\t\ta = month1;\n\t\t\tmonth1 = month2;\n\t\t\tmonth2 = a;\n\t\t}\n\n\t\tfor (;;){\n\t\t\tif (month1 == month2){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(month1 == 1 || month1 == 3 || month1 == 5 || month1 == 7 || month1 == 8 || month1 == 10 || month1 == 12){\n\t\t\t\tday = day + 31;\n\t\t\t\tmonth1++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (month1 == 4 || month1 == 6 || month1 == 9 || month1 == 11){\n\t\t\t\tday = day + 30;\n\t\t\t\tmonth1++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (month1 == 2){\n\t\t\t\tif ((year % 4 == 0 && year % 100 != 0) || year % 400 ==0){\n\t\t\t\t\tday = day + 29;\n\t\t\t\t\tmonth1++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tday = day + 28;\n\t\t\t\t\tmonth1++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(day % 7 == 0){\n\t\t\tprintf(\"YES\\n\");\n\t\t}\n\t\telse{\n\t\t\tprintf(\"NO\\n\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35208", "code": "int main()\n{\n\tint n,i;\n\tscanf(\"%d\",&n);\n\tint y,a,b;\n\tfor(i=0;imonth2[j]){\n t=month1[j];\n month1[j]=month2[j];\n month2[j]=t;\n } \n for(i=month1[j];i=c[i])\n\t\t\t{\n\t\t\t\tx=c[i];\n\t\t\t\ty=b[i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ty=c[i];\n\t\t\t\tx=b[i];\n\t\t\t}\n\t\t\tfor (j=x;j=c[i])\n\t\t\t{\n\t\t\t\tx=c[i];\n\t\t\t\ty=b[i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ty=c[i];\n\t\t\t\tx=b[i];\n\t\t\t}\n\t\t\tfor (j=x;j=0)?(f1[m1-1]-f1[m2-1]):(f1[m2-1]-f1[m1-1]);\n\t\t\tif(t1%7==0) printf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t\telse{\n\t\t\tint t2=(f2[m1-1]-f2[m2-1]>=0)?(f2[m1-1]-f2[m2-1]):(f2[m2-1]-f2[m1-1]);\n\t\t\tif(t2%7==0) printf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t\t}\n\t}\n\treturn 0;\n\t}\n\t\t\t"} +{"label": "71", "index": "35214", "code": "int main()\n{\n\tint y, a, b, p, m, s;\n\tint i, t;\n\tint l, k;\n\tcin >> k;\n\tfor (l=1;l<=k;l++)\n\t{\n\t\tcin >> y >> a >> b;\n\t\tif(a < b)\n\t\t{\n\t\t\tp = a;\n\t\t\ta = b;\n\t\t\tb = p;\n\t\t}\n\t\tm = 0;\n\t\ti = 0;\n\t\tt = a - b;\n\t\ts = b - 1;\n\t\tdo\n\t\t{\n\t\t\ts = s + 1;\n\t\t\tif(s==1)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==2)\n\t\t\t{\n\t\t\t\tif (y % 100!=0)\n\t\t\t\t{\n\t\t\t\t\tif(y % 4!=0)\n\t\t\t\t\t\tm = m + 28;\n\t\t\t\t\telse\n\t\t\t\t\t\tm = m + 29;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(y % 400!=0)\n\t\t\t\t\t\tm = m + 28;\n\t\t\t\t\telse\n\t\t\t\t\t\tm = m + 29;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(s==3)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==4)\n\t\t\t\tm = m + 30;\n\t\t\tif(s==5)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==6)\n\t\t\t\tm = m + 30;\n\t\t\tif(s==7)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==8)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==9)\n\t\t\t\tm = m + 30;\n\t\t\tif(s==10)\n\t\t\t\tm = m + 31;\n\t\t\tif(s==11)\n\t\t\t\tm = m + 30;\n\t\t\tif(s==12)\n\t\t\t\tm = m + 31;\n\t\t\ti = i + 1;\n\t\t}while (i < t);\n\t\tif (m % 7 !=0)\n\t\t\tcout << \"NO\" << endl;\n\t\telse\n\t\t\tcout << \"YES\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35215", "code": "/*\n * 1000012889_3.cpp\n *\n * Created on: 2010-12-24\n * Author: ???\n * ??? ???\n */\n\n\n\nint main(){\n\tint n,i,j,year,month1,month2,day1=0,day2=0;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; //????????\n\tint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31}; //????????\n\tcin>>n;\n\tfor(i=0;i>year>>month1>>month2;\n\t\tif(year%4!=0||(year%400!=0&&year%100==0)){ //????\n\t\t\tfor(j=1;j>n;\n\tfor (i=1;i<=n;i++)\n\t\t{cin>>year>>m1>>m2;//?????????\n\t\ta[1]=28;\n\t\tdays=0;\n\t\tif (year%4==0&&year%100!=0||year%400==0) a[1]=29;//??????????????2????\n\t\tif (m1> n; \n\twhile (n--)\n\t{ \n\t\tcin >> y >> m1 >> m2;\n\t\tl = (y % 400 == 0) || ((y % 4 ==0) && (y % 100 !=0)); //??????\n\t\tif (b[l][(m1 - 1) * 12 + m2]) cout << \"YES\" << endl;\n\t\t\telse cout << \"NO\" << endl; \t//??????? \n\t}\n\t\n\treturn 0;\n}\n"} +{"label": "71", "index": "35218", "code": "\nint main()\n{\n\tint max, min, k, day = 0, n, y, m1, m2, i, month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; \n\tcin >> n;\n\twhile (n != 0)\n\t{\n\t\tday = 0;\n\t\tcin >> y >> m1 >> m2;\n\t\tif (y % 400 == 0 || (y % 100 != 0 && y % 4 == 0))\n\t\t\tmonth[2] = 29;\n\t\telse\n\t\t\tmonth[2] = 28;\n\t\tmax = m1 > m2 ? m1 : m2;\n\t\tmin = m1 < m2 ? m1 : m2;\n\t\tfor(i = min; i < max; i++)\n\t\t\tday += month[i];\n\tif(day % 7 == 0)\n\t\tcout << \"YES\"<>n; //?????? \n\tfor(i=0;i>year>>mon1>>mon2;//??????? \n\t\tif(mon2m[i]){\n\t\te=month[i];\n\t\tmonth[i]=m[i];\n\t\tm[i]=e;\n\t\t}\n if(y[i]%400==0||(y[i]%100!=0&&y[i]%4==0))\n\t\t{\n\t\tfor(k=month[i]-1;kmonth2)\n\t{\n\t\tday=month1;\n\t\tmonth1=month2;\n\t\tmonth2=day;\n\t}\n\tday=0;\n\tfor(j=month1;jm2)\n\t\t\t{\n\t\t\t\tfor(j=m2;jm2)\n\t\t\t{\n\t\t\t\tfor(j=m2;j>n;\n\twhile ( n -- )\n\t{\n\t\tint y,m1,m2;\n\t\tcin>>y>>m1>>m2;\n\t\tif ( y % 4 != 0 || ( y % 4 == 0 && y % 100 == 0 && y % 400 != 0 ))\n\t\t{\n\t int zz[12]={0,31,59,90,120,151,181,212,243,273,304,334};\n\t\t\t if ( ( zz[m1-1] - zz[m2-1] ) % 7 == 0)\n\t\t\t\t cout<<\"YES\"<>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>a>>b>>c;\nm[2]=28;\n\t\tif((a%4==0&&a%100!=0)||a%400==0)\n\t\t m[2]=29;\n\t\t\n\t\td=(bc)?b:c;\n\t\tx=0;\n\t\tfor(j=d;j>n;\n int year[n+1],month1[n+1],month2[n+1];\n for(int i=1;i<=n;i++)\n {\n cin>>year[i]>>month1[i]>>month2[i];\n }\n a[1]=31;\n a[3]=31;\n a[4]=30;\n a[5]=31;\n a[6]=30;\n a[7]=31;\n a[8]=31;\n a[9]=30;\n a[10]=31;\n a[11]=30;\n a[12]=31;\n int i=1;\n int k,s1,s2,sum=0;\n for(i=1;i<=n;i++)\n {\n if(year[i]%4==0&&year[i]%100!=0||year[i]%400==0)\n a[2]=29;\n else\n a[2]=28;\n if(month1[i]>month2[i])\n s1=month1[i],s2=month2[i];\n else\n s1=month2[i],s2=month1[i];\n for(k=s2;k<=(s1-1);k++)\n sum=sum+a[k];\n if(sum%7==0)\n cout<<\"YES\"<>n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>year>>month1>>month2;\n\t\tif(year%400==0||(year%100!=0&&year%4==0))\n\t\t{\n\t\t\tMon[1]=Mon[1]+1;\n\t\t\tif(month1>month2)\n\t\t\t{\n\t\t\t\tfor(j=month2;jmonth2)\n\t\t\t{\n\t\t\t\tfor(j=month2;j> n;\n\tfor (i = 0; i < n; i++) {\n\t\tfor (j = 0; j < 3; j++) {\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < n; i++) {\n\t\tif ((a[i][0] % 4 == 0 && a[i][0] % 100 != 0) || a[i][0] % 400 == 0) {\n\t\t\tif (a[i][1] > a[i][2]) {\n\t\t\t\tx = a[i][1];\n\t\t\t\ty = a[i][2];\n\t\t\t} else {\n\t\t\t\tx = a[i][2];\n\t\t\t\ty = a[i][1];\n\t\t\t}\n\t\t\tz = 0;\n\t\t\tfor (j = (y - 1); j < (x - 1); j++) {\n\t\t\t\tz = z + c[j];\n\t\t\t}\n\t\t\tif (z % 7 == 0) {\n\t\t\t\tcout << \"YES\" << endl;\n\t\t\t} else {\n\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t} else {\n\t\t\tif (a[i][1] > a[i][2]) {\n\t\t\t\tx = a[i][1];\n\t\t\t\ty = a[i][2];\n\t\t\t} else {\n\t\t\t\tx = a[i][2];\n\t\t\t\ty = a[i][1];\n\t\t\t}\n\t\t\tz = 0;\n\t\t\tfor (j = (y - 1); j < (x - 1); j++) {\n\t\t\t\tz = z + b[j];\n\t\t\t}\n\t\t\tif (z % 7 == 0) {\n\t\t\t\tcout << \"YES\" << endl;\n\t\t\t} else {\n\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35231", "code": "int main(){\n\tint n,i,flag[300],r[300];\n\tint year[300],m1[300],m2[300];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i32)\n\t\t\t\tm1[i]++;\n\t\t\tif(m2[i]>32)\n\t\t\t\tm2[i]++;\n\t\t}\n\t\tif(m1[i]>m2[i]){\n\t\t r[i]=m1[i]-m2[i];\n\t\t}\n\t\telse\n\t\t\tr[i]=m2[i]-m1[i];\n\t\tif(r[i]%7==0)\n\t\t\t printf(\"YES\\n\");\n\t\telse printf(\"NO\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35232", "code": "\nint main()\n{\n int n, e, i, j, y, m1, m2, rlt;\n scanf(\"%d\", &n);\n for(i=0;i1)\n {\n for(j=1;j1)\n {\n for(j=1;j>n;\n\tfor(i=0;i>year[i]>>month[i][0]>>month[i][1]; //???????\n\t if(month[i][0]>month[i][1])\n\t\t{\tj=month[i][0];\n\t\t month[i][0]=month[i][1];\n\t\t\tmonth[i][1]=j; //?????????\n\t\t}\n\t}\n\tb[1]=b[3]=b[5]=b[7]=b[8]=b[10]=b[12]=31;\n\tb[4]=b[6]=b[9]=b[11]=30; //??????\n\tfor(i=0;i>n;\n for(int i=1;i<=n;i++)\n {\n cin>>year[i]>>a[i]>>b[i];//??????? \n if((year[i]%4==0&&year[i]%100!=0)||year[i]%400==0)//??????? \n {\n int m[13]={0,1,32,61,92,122,153,183,214,245,275,306,336};\n int j,k;\n j=a[i];\n k=b[i];\n if((((m[k]-m[j])%7==0)&&(m[k]-m[j]>0))||(((m[j]-m[k])%7==0)&&(m[j]-m[k]>0)))//????? \n cout<<\"YES\"<0))||(((m[j]-m[k])%7==0)&&(m[j]-m[k]>0)))//????? \n cout<<\"YES\"<yue2[i])\n\t\t\t{\n\t\t\t\tt=yue1[i];\n\t\t\t\tyue1[i]=yue2[i];\n\t\t\t\tyue2[i]=t;\n\t\t\t}\n\t\t\tday=0;\n\t\t\tfor(j=yue1[i];jyue2[i])\n\t\t\t{\n\t\t\t\tt=yue1[i];\n\t\t\t\tyue1[i]=yue2[i];\n\t\t\t\tyue2[i]=t;\n\t\t\t}\n\t\t\tday=0;\n\t\t\tfor(j=yue1[i];jm2)\n\t\t\t{temp =m1;\n\t\t\tm1=m2;\n\t\t\tm2=temp;}\n\t\t\tfor(j=m1-1;j>N;\n int Y,M1,M2;\nfor (int i=0;i>Y>>M1>>M2;\n int a[13]={0,3,0,3,2,3,2,3,3,2,3,2,3};\n if (Y%400==0||(Y%100!=0&&Y%4==0)) a[2]++;\n int S=0;\n for (int i=M1;imon2[i])\n\t\t\t\t{\n\t\t\t\t temp=mon1[i];\n\t\t\t\t\t\t mon1[i]=mon2[i];\n\t\t\t\t\t\t mon2[i]=temp;\n\t\t\t\t}\n for(total=0;mon1[i]>n;\n\twhile(n--)\n\t{\n\t\tint y,m1,m2;\n\t\tcin>>y>>m1>>m2;\n\t\tint e[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\t\tif(((y%4==0)&&(y%100!=0))||(y%400==0))\n\t\t\te[2]=29;\n\t\tint sum;\n\t\tif(m1>m2)\n\t\t\tsum=days(m1,m2,e);\n\t\telse\n\t\t\tsum=days(m2,m1,e);\n\t\tif(sum%7==0)\n\t\t\tcout<<\"YES\"<> s;\n\tint y,n,m;\n\tfor (i=0;i> y >> n >> m;\n\t\tif ((y%100!=0 && y%4==0)||(y%400==0))\n\t\tt=1;\n\t\telse\n\t\tt=0;\n\t\tif (n>m)\n\t\t{\n\t\t\tk=n;\n\t\t\tn=m;\n\t\t\tm=k;\n\t\t}\n\t\tfor (j=n;j> n;\n\tfor (i = 0; i < n; i ++)\n\t{\n\t\tint year, month1, month2, t, sum = 0;\n\t\tcin >> year >> month1 >> month2;\n\t\tif (month1 > month2)\n\t\t{\n\t\t\tt = month1;\n\t\t\tmonth1 = month2;\n\t\t\tmonth2 = t;\n\t\t}\n\t\tfor ( int j = month1; j < month2; j++)\n\t\t{\n\t\t\tif ( (j == 1) || (j == 3) || (j == 5) || (j == 7) || (j == 8) || (j == 10) || (j == 12) )\n\t\t\t\tsum += 31;\n\t\t\telse if ( (j == 4) || (j == 6) || (j == 9) || (j == 11) )\n\t\t\t\tsum += 30;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( !(year % 400) || ((year % 100) && !(year % 4)))\n\t\t\t\t\tsum += 29;\n\t\t\t\telse\n\t\t\t\t\tsum += 28;\n\t\t\t}\n\t\t}\n\t\tif (sum % 7)\n\t\t\tcout << \"NO\" << endl;\n\t\telse\n\t\t\tcout << \"YES\" << endl;\n\t}\n\n\treturn 0;\n}\n"} +{"label": "71", "index": "35246", "code": "int main()\n{ \n int k,i,j,a,b,c,m,n;\n scanf(\"%d\",&k);\n for(i=0;iyue2){/*if???????yue1??????yue2?????*/\n\t\t\tti=yue2;\n\t\t\tyue2=yue1;\n\t\t\tyue1=ti;\n\t\t}\n\t\tsum=0;\t/*?????????????????sum???0*/\n\t\tfor(j=yue1;j=3)){\n\t\t\tif((nian%4==0)&&(nian%100!=0)||(nian%400==0)){\n\t\t\t\tsum++;}\t\t/*???????????????????????????1?*/\n\t\t}\n\t\tif(sum%7==0){\t\t/*??????????7??*/\n\t\t\tprintf(\"YES\\n\");\n\t\t}else{\n\t\t\tprintf(\"NO\\n\");}\n\n\t}\n\n\n\treturn 0;\n}\n"} +{"label": "71", "index": "35248", "code": "int main()\n{\n\tint i,n;\n\tint a[200],b[200],c[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;isz[q][2]){\n\t\t\t\tsum=0;\n\t\t\t\tfor(p=sz[q][2];psz[q][2]){\n\t\t\t\tsum=0;\n\t\t\t\tfor(p=sz[q][2];p>n;\n\tfor(i=0;i>y[i]>>m1[i]>>m2[i];\n\t}\n\tfor(int i=0;im2)\n\t\t{\n\t\t\tt=m1;\n\t\t\tm1=m2;\n\t\t\tm2=t;\n\t\t}\n\t//\tprintf(\"%d %d\\n\",m1,m2);\n\t\tfor(j=m1-1;j<=m2-2;j++)\n\t\t{\n\t\t\tsum+=md[j];\n\t\t}\n\t//\tprintf(\"%d\\n\",sum);\n\t\tif(((y%4==0)&&(y%100!=0)||(y%400==0))&&(((m1==1)&&(m2>=3))||m1==2))\n\t\t{\n\t\t\tsum++;\n\t\t}\n\t//\tprintf(\"%d\\n\",sum);\n\t\tif(sum%7==0){\n\t\t\ta[i]=1;}\n\t\telse{\n\t\t\ta[i]=0;}\n\t\tsum=0;\n\t}\n\tfor(i=0;im2)\n {t=m2;\n m2=m1;\n m1=t;\n }\n if(runnian(y)==1)\n {\n for(j=m1;jmonth2[i]){\n e=month1[i];\n month1[i]=month2[i];\n month2[i]=e;\n }\n \n if(isRunNian(year[i])){\n for(k=month1[i];ky) z=x;\n\telse z=y;\n\treturn(z);\n}\nint min(int x,int y) //??min??\n{\n\tint z;\n\tif(x>y) z=y;\n\telse z=x;\n\treturn(z);\n}\n"} +{"label": "71", "index": "35256", "code": "//??(10.5) ???\nint main()\n{\n\tint n,y,m1,m2,i,j,sum,t;\n\tint x[24]={31,28,31,30,31,30,31,31,30,31,30,31,\n\t31,29,31,30,31,30,31,31,30,31,30,31}; //x?????????\n\tcin>>n;\n\tfor (i=0;i<=n-1;i++) //????????????\n\t{\n\t\tsum=0;\n\t\tcin>>y>>m1>>m2;\n\t\tif (m1>m2) //?m1>m2???\n\t\t{\n\t\t\tt=m1;\n\t\t\tm1=m2;\n\t\t\tm2=t;\n\t\t}\n\t\tif ((y%4==0&&y%100!=0)||y%400==0) //???????x??12???\n\t\t\tfor (j=11+m1;j<=10+m2;j++)\n\t\t\t\tsum+=x[j];\n\t\telse //????x??12?????\n\t\t\tfor (j=m1-1;j<=m2-2;j++)\n\t\t\t\tsum+=x[j];\n\t\tif (sum%7==0) //????\n\t\t\tcout<<\"YES\"<month2){\n swap(&month1,&month2);\n }\n a=DijiTian(year,month2,1)-DijiTian(year,month1,1);\n if(a%7==0){\n printf(\"YES\\n\");\n }\n else printf(\"NO\\n\");\n }\n return 0;\n}"} +{"label": "71", "index": "35258", "code": "int run(int x) /*??????2???????*/\n{\n\tint z;\n\tif (x % 100 == 0)\n\t{\n\t\tif (x % 400 == 0)\n\t\t\tz = 29;\n\t\telse z = 28;\n\t}\n\telse if (x % 4 == 0)\n\t\tz = 29;\n\telse z = 28;\n\treturn (z);\n}\nint main ( )\n{\n\tint n, a[200][3], b[12], i, j, num, p, q, aa, bb, cc;\n\tb[0] = 31;b[2] = 31;b[3] = 30;b[4] = 31;b[5] = 30;b[6] = 31;b[7] = 31;b[8] = 30;b[9] = 31;b[10] = 30;b[11] = 31;/*?????????,????12???????*/\n\tcin >>n;\n\tfor (i = 0;i < n;i++)/*??n???*/\n\t{\n\t\tcin >>aa >>bb >>cc;\n\t\ta[i][0] = aa;\n\t\ta[i][1] = bb;\n\t\ta[i][2] = cc;\n\t}\n\tfor (j = 0;j < n;j++)\n\t{\n\t\tb[1] = run(a[j][0]);/*??run???b[1]??,??2?????*/\n\t\tnum = 0;\n\t\tif (a[j][1] < a[j][2])/*???????????????*/\n\t\t{\n\t\t\tp = a[j][1];\n\t\t q = a[j][2];\n\t\t}\n\t\telse \n\t\t{\n\t\t\tp = a[j][2];\n\t\t q = a[j][1];\n\t\t}\n\t\tfor (;p < q;p++) /*???????????*/\n\t\t\tnum = num + b[p-1 ];\n\t\tif (num % 7 == 0) /*?????7???,???????*/\n\t\t\tcout <<\"YES\"<> n;\n\n for (int i = 0; i< n; i++) {\n cin >> year >> month1 >> month2;\n if (month1 > month2) {\n buffer = month1;\n month1 = month2;\n month2 = buffer;\n }\n\n buffer = 0;\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n for (int j = month1; j < month2; j++)\n buffer = buffer + runnian[j - 1];\n if (buffer % 7 == 0)\n cout << \"YES\" << endl;\n else\n cout << \"NO\" << endl;\n }\n\n else {\n for (int j = month1; j < month2; j++)\n buffer = buffer + pingnian[j - 1];\n if (buffer % 7 == 0)\n cout << \"YES\" << endl;\n else\n cout << \"NO\" << endl;\n }\n\n }\n return 0;\n}\n"} +{"label": "71", "index": "35260", "code": "/*#include \"iostream\"\nint main()\n{\n\tint A[13],X,B;\n\tchar C[8][10];\n\tchar c1,c2;\n\tint N,Sum = 0;\n\tcin >> N >> X >> B;\n\tfor (int I = 1; I < N; I ++)\n\t{\n\t\tif (I%100)\n\t\t\tif (I%4 == 0) Sum = (Sum + 366) % 7; else Sum = (Sum + 365) % 7;\n\t\telse if (I%400 == 0) Sum = (Sum + 366) % 7; else Sum = (Sum + 365) % 7;\n\t}\n\tint S = B;\n\tif (N%100)\n\t\tif (N%4 == 0) A[2] = 29; else A[2] = 28;\n\telse if (N%400 == 0) A[2] = 29; else A[2] = 28;\n\tA[1] = A[3] = A[5] = A[7] = A[8] = A[10] = A[12] = 31;\n\tA[4] = A[6] = A[9] = A[11] = 30;\n\tfor (int I = 1; I < X; I ++) S += A[I];\n\tSum = (Sum + S) % 7;\n\tif ( Sum == 1 ) cout << \"Mon.\" << endl;\n\tif ( Sum == 2 ) cout << \"Tue.\" << endl;\n\tif ( Sum == 3 ) cout << \"Wed.\" << endl;\n\tif ( Sum == 4 ) cout << \"Thu.\" << endl;\n\tif ( Sum == 5 ) cout << \"Fri.\" << endl;\n\tif ( Sum == 6 ) cout << \"Sat.\" << endl;\n\tif ( Sum == 0 ) cout << \"Sun.\" << endl;\n}*/\n\nint main()\n{\n\tint N,M,X,Y,A[31];\n\tcin >> N;\n\tfor (int I = 1; I <= N; I ++)\n\t{\n\t\tcin >> M >> X >> Y;\n\t\tif (M%100)\n\t\t\tif (M%4 == 0) A[2] = 29; else A[2] = 28;\n\t\telse if (M%400 == 0) A[2] = 29; else A[2] = 28;\n\t\tA[1] = A[3] = A[5] = A[7] = A[8] = A[10] = A[12] = 31;\n\t\tA[4] = A[6] = A[9] = A[11] = 30;\n\t\tint S = 0,T;\n\t\tif (X > Y)\n\t\t{\n\t\t\tT = X; X = Y; Y = T;\n\t\t}\n\t\tfor (int I = X; I < Y; I ++) S += A[I];\n\t\tif (S%7) cout << \"NO\" << endl;\n\t\telse cout << \"YES\" << endl;\n\t}\n}"} +{"label": "71", "index": "35261", "code": "int isRunNian(int year){\n int result;\n if(year%400 == 0 ||(year%4==0 &&year%100!=0)){\n result = 1;\n\t} \n else{\n result = 0;\n\t}\nreturn result;\n}\nint DiJiTian(int year, int month, int day){\n int result = 0;\n for(int i = 1; i < month; i++){\n if(i==1||i==3||i==5||i==7||i==8||i==10||i==12){\n result += 31;\n\t\t} \n else if (i == 4 || i ==6 || i == 9 ||i==11){\n result += 30;\n\t\t} \n else if(i == 2){\n if(isRunNian(year)){\n\t\t\t\tresult += 29;\n\t\t\t} \n\t\t\telse {\n\t\t\t\tresult += 28;\n\t\t\t}\n\t\t}\n\t}\n\tresult += day;\nreturn result;\n}\nint main(){\n int n,i,y,m1,m2;\n\tint d1,d2;\n\tint cha;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tint year,mon1,mon2,days,m;//year????mon1,mon2????days??????m??????\n\tint a[]={0,31,28,31,30,31,30,31,31,30,31,30,31};//???????\n\tfor(i=1;i<=n;i++)//n???????\n\t{\n\t\tcin>>year>>mon1>>mon2;//????\n\t\tdays=0;//?????????0\n\t\tif((year%400==0)||((year%4==0)&&(year%100!=0)))//???????????????\n\t\t\ta[2]=29;\n\t\telse\n\t\t\ta[2]=28;\n\t\tif(mon1>mon2)//????????\n\t\t\tm=mon1,mon1=mon2,mon2=m;\n\t\telse \n\t\t\tmon1=mon1,mon2=mon2;\n\t\tfor(j=0;j<(mon2-mon1);j++)//??????\n\t\t\tdays+=a[mon1+j];\n\t\tif(days%7==0)//??????????????\n\t\t\tcout<<\"YES\"<>n;\n for(int i=0;i>year>>month1>>month2;\n if(is_year(year))\n \t m[2]=29;\n for(int i=1;i>n;\n for(i=0;i>y>>m1>>m2;\n\t\tk=daynum(y,m1,1)-daynum(y,m2,1);\n\t\tk=abs(k);\n\t\tif(k%7==0)\n\t\t\tcout<<\"YES\"<mon2)\n\t\t{\n\t\t\tk=mon2;\n\t\t\tj=mon1;\n\t\t}\n\t\telse if (mon1mem[i].month2)\n {\n for(j=mem[i].month2;jmem[i].month2)\n {\n for(j=mem[i].month2;jyue2){\n temp=yue1;\n yue1=yue2;\n yue2=temp;\n }\n if( (nian%4 !=0) || ( (nian%400 !=0) && (nian%100 == 0) ) ){\n days=szp[yue1-1];\n for(j=yue1;jc){x=b; b=c; c=x;}\n x=judge(a);\n day=0;\n for (j=b;j<=c-1;j++)\n {\n day=day+d[j-1];\n if ((j==2)&&(x==1)) day++;\n }\n if (day%7==0) printf(\"YES\\n\");\n else printf(\"NO\\n\");\n /*printf(\"%d\\n\",day);*/\n }\n \n} \n"} +{"label": "71", "index": "35272", "code": "int pd(int a)\n{\n if(a==1||a==3||a==5||a==7||a==8||a==10||a==12)\n return 31;\n else if(a==2)\n return 28;\n else\n return 30;\n}\nmain()\n{\n int i,y,a,b,n,l,m,s,t;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%d %d %d\",&y,&a,&b);\n if(a=3)\n {\n for(b;b2)\n {\n for(;bmonth2)\n\t\t{\n\t\t\tmid=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=mid;\n\t\t}\n\t\ttotal=days[month1-1];\n\t\tfor(j=0;jnn)\n\t\t{\n n=mm;\n\t\t m=nn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tn=nn;m=mm;\n\t\t}\n\t\tif(yyyy%400==0||(yyyy%100!=0&&yyyy%4==0))\n\t\t{ \n\t\t\tc=0;\n for(j=m;jc)\n\t\t{\n\t\t\tq=b;\n\t\t\tb=c;\n\t\t\tc=q;\n\t\t}\n\t\tif(f(a)== 1 && b<=2 && c>2 )\n\t\t\t\t\tp+=1;\n\t\tfor(b;b0)\n {\n printf(\"\\n\");\n }\n judge(*(y+i),*(m1+i),*(m2+i));\n }\n return 0;\n}\n\nvoid judge(int x,int y,int z)\n{\n int i,j,a;\n int p(int x);\n int r(int x);\n if((x%4==0&&x%100!=0)||x%400==0)\n {\n i=r(y);\n j=r(z);\n }\n else\n {\n i=p(y);\n j=p(z);\n }\n if(i>j)\n {\n a=(i-j)%7;\n }\n else\n {\n a=(j-i)%7;\n }\n if(a==0)\n {\n printf(\"YES\");\n }\n else\n {\n printf(\"NO\");\n }\n}\n\nint p(int x)\n{\n int i;\n switch(x)\n {\n case 1:i=0;break;\n case 2:i=31;break;\n case 3:i=59;break;\n case 4:i=90;break;\n case 5:i=120;break;\n case 6:i=151;break;\n case 7:i=181;break;\n case 8:i=212;break;\n case 9:i=243;break;\n case 10:i=273;break;\n case 11:i=304;break;\n case 12:i=334;break;\n }\n return i;\n}\n\nint r(int x)\n{\n int i;\n switch(x)\n {\n case 1:i=0;break;\n case 2:i=31;break;\n case 3:i=59+1;break;\n case 4:i=90+1;break;\n case 5:i=120+1;break;\n case 6:i=151+1;break;\n case 7:i=181+1;break;\n case 8:i=212+1;break;\n case 9:i=243+1;break;\n case 10:i=273+1;break;\n case 11:i=304+1;break;\n case 12:i=334+1;break;\n }\n return i;\n}"} +{"label": "71", "index": "35277", "code": "int main()\n{\n\tint n,year,m1,m2,i,tmp,sum,k,q;\n\tscanf(\"%d\",&n);\n\tint a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint b[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d %d %d\",&year,&m1,&m2);\n\t\tif(m1>m2)\n\t\t{\n\t\t\ttmp=m1;\n\t\t\tm1=m2;\n\t\t\tm2=tmp;\n\t\t}\n\t\telse q=1;\n\n\t\tif((year%4==0&&year%100!=0)||(year%400==0))\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(k=m1;kc){\n\t\t\tint x=b;\n\t\t\tb=c;\n\t\t\tc=x;\n\t\t}\n\t\tint j, sum=0;\n\t\tfor(j=b; j> n;\n\tfor(; n > 0; n--)\n\t{\n\t\tcin >> year >> m1 >> m2;\n\t\tjudge(year, m1, m2);\n\t}\n\treturn 0;\n}\n\nvoid judge(int year, int m1, int m2)\n{\n\tint i, s = 0, sum[11] = {3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2};\n\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n\t\tsum[1] = 1;\n\tif (m2 < m1)\n\t{\n\t\ti = m2;\n\t\tm2 = m1;\n\t\tm1 = i;\n\t}\n\tfor (i = m1 - 1; i < m2 - 1; i++)\n\t\ts += sum[i];\n\tif (s % 7 == 0)\n\t\tcout << \"YES\" << endl;\n\telse\n\t\tcout << \"NO\" << endl;\n}\n\n\n\n\t"} +{"label": "71", "index": "35280", "code": "\nint main()\n{ \n int n,year[200],m1[200],m2[200],i,j,t,a;\n int run[]={0,31,29,31,30,31,30,31,31,30,31,30,31},feirun[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; //??????????????\n cin>>n;\n for(i=0;i<200;i++)\n\t{\n cin>>year[i]>>m1[i]>>m2[i];\n\t if(m1[i]y)\n\t\tc=x-y;\n\telse\n\t\tc=y-x;\n\treturn(c);\n}"} +{"label": "71", "index": "35282", "code": "int a[20];\nmain()\n{\n\tvoid run(int x,int y);\n\tvoid ping(int x,int y);\n\tint n,i,j,k,year,y,r;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy?x:y;\n\tn=xy?x:y;\n\tn=xz){s=y;y=z;z=s;}\n a[2]=((x%400==0)||(x%100!=0&&x%4==0))?29:28;\n for(int j=y;jb){a^=b;b^=a;a^=b;}\n if((y%100==0&&y%400==0)||(y%100&&y%4==0))ans=(sum2[b-1]-sum2[a-1])%7;\n else ans=(sum1[b-1]-sum1[a-1])%7;\n \n if(!ans)printf(\"YES\\n\");\n else printf(\"NO\\n\");\n }\n return 0;\n}\n\n"} +{"label": "71", "index": "35285", "code": "void main()\n{\nint n;\nscanf(\"%d\",&n);\nint i,j;\nint b[2];\nint month[200][2];\nint year[200];\nfor(i=0;ims)\n\t\t{\n\t\t\tfor(j=ms-1;j>x;\n\tfor(i=0;i>a[i]>>b[i]>>c[i];\n\tfor(i=0;ic[i])\n\t\t\t{\n\t\t\t\tf[i]=b[i];\n\t\t\t\tg[i]=c[i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg[i]=b[i];\n\t\t\t\tf[i]=c[i];\n\t\t\t}\n\t}\n\tfor(i=0;i m2) ? m1 : m2;\n min = (m1 < m2) ? m1 : m2;\n sum = 0;\n if (is_leap_year(year)) days[1] ++; // ???2?????\n for (j=min-1; j=3)){\n\t\t\t\tfor(j=m1;j=3)){\n\t\t\t\tfor(j=m2;jm1){\n\t\t\t\tfor(j=m1;jm2){\n\t\t\t\tfor(j=m2;jm1){\n\t\t\t\tfor(j=m1;jm2){\n\t\t\ta=m1;\n\t\t\tm1=m2;\n\t\t\tm2=a;\n\t\t}\n\t\tfor(j=m1;j2&&(a==0&&year%100!=0||year%400==0))\n {sum1=sum1+1;}\n if(month2>2&&(a==0&&year%100!=0||year%400==0))\n {sum2=sum2+1;}\n p=sum2-sum1;\n if(p%7==0)\n s[j]=1;\n else s[j]=0;\n}\nfor(j=1;j<=n;j++)\n{if(s[j]==1)\n printf(\"YES\\n\");\n else printf(\"NO\\n\");\n}\n return 0;\n}\n\n"} +{"label": "71", "index": "35293", "code": "main()\n{\n int n,g,i,j,k,yy,a,b;\n int c[100],d[100];\n c[1]=1;\n c[2]=c[1]+31;\n c[3]=c[2]+29;\n c[4]=c[3]+31;\n c[5]=c[4]+30;\n c[6]=c[5]+31;\n c[7]=c[6]+30;\n c[8]=c[7]+31;\n c[9]=c[8]+31;\n c[10]=c[9]+30;\n c[11]=c[10]+31;\n c[12]=c[11]+30;\n d[1]=1;\n d[2]=d[1]+31;\n d[3]=d[2]+28;\n d[4]=d[3]+31;\n d[5]=d[4]+30;\n d[6]=d[5]+31;\n d[7]=d[6]+30;\n d[8]=d[7]+31;\n d[9]=d[8]+31;\n d[10]=d[9]+30;\n d[11]=d[10]+31;\n d[12]=d[11]+30; \n scanf(\"%d\",&n);\n for(g=0;gm2)\n {\n t=m1;\n m1=m2;\n m2=t;\n }\n if(year(ye)==1)\n {\n for(j=m1-1;jd[i]){\n\t\t\tfor(j=d[i];j>n;\n while(n--)\n { day=0;\n cin>>year>>month1>>month2;\n if(month1>month2) \n { i=month1;month1=month2;month2=i;}\n if((year%4==0&&year%100!=0)||year%400==0)\n {\n for(i=month1-1;i2) day=day-1;} \n if(day%7==0) cout<<\"YES\"<m2)\n\t\t{\n\t\t\te=m1;\n\t\t\tm1=m2;\n\t\t\tm2=e;\n\t\t}\n\t\tfor(k=m1;k> n;\n\tfor(i=1;i<=n;i++)\n\t{\n\tcin >> year >> month1 >> month2;\n\tif(month1>month2)\n\t\t{a = month2;\n\t\tmonth2 = month1;\n\t\tmonth1 = a;}\n\tdetmonth = month2 - month1;\n\tfor(;detmonth>0;month1++,detmonth--)\n\t\t{if(month1==4||month1==6||month1==9||month1==11)\n\t\t\tdays += 30;\n\t\telse if(month1 ==2)\n\t\t{if(((year%4 == 0) &&(year % 100 != 0 ))||(year % 400 == 0))\n\t\t\t\tdays += 29;\n\t\t\t\telse days += 28;}\n\t\telse days += 31;}\n\tif(days % 7 == 0)\n\t\tcout <<\"YES\"<>n;\n\twhile(j>year; \n\t if(year%100==0)//????????\n\t\t if(year%400==0)a=1;\n\t\t else a=2;\n\t else if(year%4==0)a=1;\n\t else a=2;\t\n\t\t\n\t\t\tcin>>month1>>month2;//??????\n\t\tif(a==1)//??\n\t\tb[1]= 29;\n\t\telse//??\n\t\tb[1]= 28;\n\t\t\n\t\tday=0;\n\t\tfor(i=min(month1,month2);i<=max(month1,month2)-1;i++)\n\t\t\tday=day+b[i-1];\n\t\t\n\t\t\n\t\tif(day%7==0) \n\t\t\tcout<<\"YES\"<c)\n\t\t{\n\t\t\te=b;\n\t\t\tb=c;\n\t\t\tc=e;\n\t\t}\n\t\tfor(int i=b;im2[i])\n\t\t{\n\t\t\tt=m1[i];\n\t\t\tm1[i]=m2[i];\n\t\t\tm2[i]=t;\n\t\t}\n\t if(y[i]%4==0&&y[i]%100!=0||y[i]%400==0)\n\t\t{\n\t\t for(j=m1[i];j> n;\n for(int i = 0; i < n; i++)\n {\n int m[2][13] = {0,31,28,31,30,31,30,31,31,30,31,30,31,0,31,29,31,30,31,30,31,31,30,31,30,31};\n int y,m1,m2;\n int sum = 0;\n cin >> y >> m1 >> m2;\n if(m1 > m2)\n {\n for(int k = m2; k < m1; k++)\n {\n sum += m[type(y)][k];\n }\n if(sum%7==0)\n {cout << \"YES\" << endl;}\n else\n {cout << \"NO\" << endl;}\n } \n if(m1 < m2) \n {\n for(int k = m1; k < m2; k++)\n {\n sum += m[type(y)][k];\n }\n if(sum%7==0)\n {cout << \"YES\" << endl;}\n else\n {cout << \"NO\" << endl;}\n } \n } \n return 0;\n}"} +{"label": "71", "index": "35304", "code": "int u[100],p[100],w[100];\nint main()\n{\n\tint n,i,j,sum=0,e;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iw[i])\n\t\t{\n\t\t\te=p[i];\n\t\t\tp[i]=w[i];\n\t\t\tw[i]=e;\n\t\t}\n\t\tfor(j=p[i];j>n;\n\tint year,month1,month2;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},\n\t b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tcin>>year>>month1>>month2;\n\t\tint c,d;\n\t\td=(month1>month2)?month1:month2;\n\t\tc=(month1>month2)?month2:month1;\n\n\t\tif ((year%4==0)&&(year%100!=0)||(year%400==0))\n\t\t{\n\t\t\tint sum=0;\n\t\t\tfor (int j=c;j> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tint year = 0, mon1 = 0, mon2 = 0, sum = 0, j = 0, temp = 0;\n\t\tcin >> year >> mon1 >> mon2;\n\t\tint mon[13] = {0, 31, 28 + fun(year), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\t\tif (mon2 < mon1)\n\t\t{\n\t\t\ttemp = mon1;\n\t\t\tmon1 = mon2;\n\t\t\tmon2 = temp;\n\t\t}\n\t\tfor (j = mon1; j < mon2; j++)\n\t\t{\n\t\t\tsum += mon[j];\n\t\t}\n\t\tif (sum % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "71", "index": "35307", "code": "int main()\n{\n\tint n;\n\t\n\tstruct remonth{\n\t\tint year,month1,month2;\n\t}remonth[200]; //??,?????????\n\tint diff[200]; //??????????\n\n\tint i;\n\tint m; //??2?????\n\tint k; //????,??remonth[i].month1,??????\n\tint t; //????,?????????????????\n\n\tscanf(\"%d\",&n);\n\tfor (i=0;iremonth[i].month2)\n\t\t{\n\t\t\tt = remonth[i].month1;\n\t\t\tremonth[i].month1 = remonth[i].month2;\n\t\t\tremonth[i].month2 = t;\n\t\t} //?????????\n\n\t\tdiff[i] = 0;\n\n\t\tfor (k = remonth[i].month1;k> num;\n\tfor (i = 0; i < num; i++)\n\t{\n\t\tday = 0;\n\t\tcin >> year[i] >> month0[i] >> month1[i];\n\t\tif (month0[i] > month1[i])\n\t\t{\n\t\t\tt = month0[i];\n\t\t\tmonth0[i] = month1[i];\n\t\t\tmonth1[i] = t;\n\t\t}\n\t\tif ((year[i] % 4 == 0 && year[i] % 100 != 0) || year[i] % 400 == 0)\n\t\t\tmonth[1] = 29;\n\t\telse\n\t\t\tmonth[1] = 28;\n\t\tfor (j = month0[i]; j <= month1[i] - 1; j++)\n\t\t\tday += month[j - 1];\n\t\tif (day % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "71", "index": "35309", "code": "int main()\n{\n int n, y, i, j, m1, m2, r[13], p[13];\n cin >> n;\n int a[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n for(i = 1;i < 13;i++)\n {\n p[i] = (p[i - 1] + a[i - 1]) % 7;\n }\n for(i = 1;i < 13;i++)\n {\n a[2] = 29;\n r[i] = (r[i - 1] + a[i - 1]) % 7;\n }\n for(i = 1;i <= n;i++)\n {\n cin >> y >> m1 >> m2;\n if (y % 4 != 0 || (y % 100 == 0 && y % 400 != 0))\n {\n if(p[m1] == p[m2])\n {\n cout << \"YES\" << endl;\n }\n else\n {\n cout << \"NO\" << endl;\n }\n }\n else\n {\n if(r[m1] == r[m2])\n {\n cout << \"YES\" << endl;\n }\n else\n {\n cout << \"NO\" << endl;\n }\n }\n }\n return 0;\n}"} +{"label": "71", "index": "35310", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i;\n\tfor(i=0;imonth[1]){ex=month[1];month[1]=month[0];month[0]=ex;}\n\t\tfor(int k=month[0];k>=month[0]&&kmonth2)\n\t\t{\n t=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=t;\n\t\t}\n for (j=month1;j>n;\n\tfor (int i=1;i<=n;++i)\n\t{\n\t\tint year,month1,month2,deltaday=0;\n\t\tcin >>year>>month1>>month2;\n\t\tif (month1>month2)\n\t\t{\n\t\t\tint exchange=month2;\n\t\t\tmonth2=month1;\n\t\t\tmonth1=exchange;\n\t\t}\n\t\tif (((year%400)==0)||((year%100!=0)&&(year%4==0)))\n\t\t{\n\t\t\tfor (int j=month1;j<=month2-1;++j)\n\t\t\t{\n\t\t\t\tswitch (j)\n\t\t\t\t{\n\t\t\t\tcase 1:deltaday+=31;break;\n\t\t\t\tcase 2:deltaday+=29;break;\n\t\t\t\tcase 3:deltaday+=31;break;\n\t\t\t\tcase 4:deltaday+=30;break;\n\t\t\t\tcase 5:deltaday+=31;break;\n\t\t\t\tcase 6:deltaday+=30;break;\n\t\t\t\tcase 7:deltaday+=31;break;\n\t\t\t\tcase 8:deltaday+=31;break;\n\t\t\t\tcase 9:deltaday+=30;break;\n\t\t\t\tcase 10:deltaday+=31;break;\n\t\t\t\tcase 11:deltaday+=30;break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int j=month1;j<=month2-1;++j)\n\t\t\t{\n\t\t\t\tswitch (j)\n\t\t\t\t{\n\t\t\t\tcase 1:deltaday+=31;break;\n\t\t\t\tcase 2:deltaday+=28;break;\n\t\t\t\tcase 3:deltaday+=31;break;\n\t\t\t\tcase 4:deltaday+=30;break;\n\t\t\t\tcase 5:deltaday+=31;break;\n\t\t\t\tcase 6:deltaday+=30;break;\n\t\t\t\tcase 7:deltaday+=31;break;\n\t\t\t\tcase 8:deltaday+=31;break;\n\t\t\t\tcase 9:deltaday+=30;break;\n\t\t\t\tcase 10:deltaday+=31;break;\n\t\t\t\tcase 11:deltaday+=30;break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ((deltaday)%7==0)\n\t\t\tcout <<\"YES\"<b)?a:b;\n min=(a>n;\n for(i=1;i<=n;i++)\n {cin>>year>>a>>b;\n if(judge(year,a,b)) cout<<\"YES\"<month2){\n\t\t\te=month2;\n\t\t\tmonth2=month1;\n\t\t\tmonth1=e;\n\t\t}\n\n\t\tfor(k=month1;kmon2){\n\t\t\t\tint t;\n\t\t\t\tt=mon1;\n\t\t\t\tmon1=mon2;\n\t\t\t\tmon2=t;\n\t\t\t}\n\t\t\tint days=0,j;\n\t\t\tint m;\n\t\t\tm=mon1;\n\t\t\tfor(j=0;jmon2){\n\t\t\t\tint t;\n\t\t\t\tt=mon1;\n\t\t\t\tmon1=mon2;\n\t\t\t\tmon2=t;\n\t\t\t}\n\t\t\tint days=0,j;\n\t\t\tint m;\n\t\t\tm=mon1;\n\t\t\tfor(j=0;jtope[i].c)\n {\n k=tope[i].b;\n p=tope[i].c;\n }\n if(tope[i].b<=tope[i].c)\n {\n k=tope[i].c;\n p=tope[i].b;\n }\n t=0;\n for(j=p;jm2[i]){ e=m2[i];m2[i]=m1[i];m1[i]=e;}d=0;\n for(k=m1[i];kM){\n\t\t\tq=m;\n\t\t\tm=M;\n\t\t\tM=q;\n\t\t}\n\t\tif((y%4==0&&y%100!=0)||y%400==0){\n\t\t\t\n\t\t\ta[2]=29;\n\t\t\tfor(s=0,m;m> n;\nfor (int i = 1; i <= n; i++)\n{\ncin >> y >> m1 >> m2;\nr = 0;\nif (y % 4 == 0) r = 1;\nif (y % 100 == 0) r = 0;\nif (y % 400 == 0) r = 1;//????r=1????\n//m1,m2??????????\nif (m1 > m2)\n{\nc = m1;\nm1 = m2;\nm2 = c;\n}\nif (r == 0)//???\n{\nfor (int i = m1; i < m2; i++)\n{\nd = d + a[i - 1];\n}//??????\nif (d % 7 == 0) cout << \"YES\" << endl;\nelse cout << \"NO\" << endl;//???????YES??NO\n}\nif (r == 1)//????\n{\nfor (int i = m1; i < m2; i++)\n{\nd = d + b[i - 1];\n}\nif (d % 7 == 0) cout << \"YES\" << endl;\nelse cout << \"NO\" << endl;\n}\nd = 0;//????\n}\nreturn 0;\n}\n\n"} +{"label": "71", "index": "35322", "code": "int main()\n{\n int y=0,m1=0,m2=0,n=0;\n int i=0,j=0;\n int a[13]={0,31,0,31,30,31,30,31,31,30,31,30,31};//??0??????? \n cin>>n;\n for(j=1;j<=n;j++)\n { int s=0;\n cin>>y>>m1>>m2;\n if((y%4== 0 && y%100!=0)||(y%400==0))//????????? \n a[2]=29;\n else a[2]=28;\n if(m1m2)\n {\n for(i=m2;i>sss;\n return 0;\n} \n \n \n \n"} +{"label": "71", "index": "35323", "code": "int run(int year)\n{\n\tif(year%100 == 0)\n\t\tif(year%400 == 0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\telse\n\t\tif(year%4 == 0)\n\t\t\treturn 1;\n\t\telse \n\t\t\treturn 0;\n}\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tfor(int i = 1;i<=n;i++)\n\t{\n\t\tint year,m1,m2;\n\t\tscanf(\"%d %d %d\",&year,&m1,&m2);\n\t\tint m[13];\n\t\tm[1] = 31;\n\t\tm[2] = 28;\n\t\tm[3] = 31;\n\t\tm[4] = 30;\n\t\tm[5] = 31;\n\t\tm[6] = 30;\n\t\tm[7] = 31;\n\t\tm[8] = 31;\n\t\tm[9] = 30;\n\t\tm[10] = 31;\n\t\tm[11] = 30;\n\t\tm[12] = 31;\n\t\tint p = 0;\n\t\tint q = 0;\n\t\tif(run(year))\n\t\t{\n\t\t\tm[2] = 29;\n\t\t\tint j = 1;\n\t\t\twhile(jc){\n\t\t\t\tint x;\n\t\t\t\tx=b;\n\t\t\t\tb=c;\n\t\t\t\tc=x;\n\t\t\t}\n\t\t\tif(a%400==0)\n\t\t\t{\n\t\t\t\tm=0;\n\t\t\t}\n\t\t\telse if(a%100==0&&a%400!=0)\n\t\t\t{\t\t\t\t\n\t\t\t\tm=1;\n\t\t\t}\t\t\t\n\t\t\telse if(a%100!=0&&a%4==0)\n\t\t\t{\n\t\t\t\tm=0;\n\t\t\t}\n\t\t\telse if(a%4!=0)\n\t\t\t{\n\t\t\t\tm=1;\n\t\t\t}\n\t\t\tint d=0;\n\t\t\tif(m==0)\n\t\t\t{\n\t\t\t\tint f[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\t\t\t\tfor(j=(b-1);j<(c-1);j++)\n\t\t\t\t{\n\t\t\t\t\td+=f[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t else if(m==1)\n\t\t\t{\n\t\t\t\tint f[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\t\t\t\tfor(j=(b-1);j<(c-1);j++)\n\t\t\t\t{\n\t\t\t\t\td+=f[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d%7==0)\n\t\t\t{\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\t}\n\t\t\telse if(d%7!=0)\n\t\t\t{\n\t\t\t\tprintf(\"NO\\n\");\n\t\t\t}\n\t}\n\treturn 0;\t\n\n\n\n}\n"} +{"label": "71", "index": "35325", "code": "int main(int argc, char* argv[])\n{\n\tint n,year[200],m1[200],m2[200],i,j;//c????\n\t\n\t\n\tscanf(\"%d\",&n);\n\tfor(i=0;ie)\n{t=b;b=e;e=t;}\n\tx=p(a,e,1)-p(a,b,1);\n\tif(x%7==0)\n\t\tprintf(\"YES\\n\");\n\telse printf(\"NO\\n\");\n}\n}"} +{"label": "71", "index": "35327", "code": "int main()\n{\n\tint n,x,y,z,i,day,j,t;\n\tint md[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d\",&n);\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d%d%d\",&x,&y,&z);\n\t\tday=0;\n\t\tif(y>z){t=y;y=z;z=t;}\n\t\tif((x%400==0)||(x%100!=0&&x%4==0))\n\t\t{\n\t\t\tif(y==1&&z==2)\n\t\t\t{day=31;}\n\t\t\tif(y<3&&z>2)\n\t\t\t{ \n\tfor(j=y-1;j=3)\n\t\t\t{\n for(j=y-1;j> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> a >> b >> c;\n\t\tif (b > c) //??????????????\n\t\t{\n\t\t\tx = b;\n\t\t\tb = c;\n\t\t\tc = x;\n\t\t}\n\t\tif ((a % 400 == 0) || (a % 100 != 0 && a % 4 == 0)) //??a???\n\t\t{\n\t\t\tfor (; b < c; b++)\n\t\t\t{\n\t\t\t\tif (b == 2) //b?2??????29\n\t\t\t\t\tsum = sum + 29;\n\t\t\t\telse \n\t\t\t\t\tif (b == 4 || b == 6 || b == 9 || b == 11) //b?????30\n\t\t\t\t\t\tsum = sum + 30;\n\t\t\t\t\telse \n\t\t\t\t\t\tsum = sum + 31; //b?????31\n\t\t\t}\n\t\t}\n\t\telse //??a???????2???b???28?????\n\t\t{\n\t\t\tfor (; b < c; b++)\n\t\t\t{\n\t\t\t\tif (b == 2)\n\t\t\t\t\tsum = sum + 28;\n\t\t\t\telse \n\t\t\t\t\tif (b == 4 || b == 6 || b == 9 || b == 11)\n\t\t\t\t\t\tsum = sum + 30;\n\t\t\t\t else \n\t\t\t\t\t\tsum = sum + 31;\n\t\t\t}\n\n\t\t}\n\t\tif ( sum % 7 == 0 ) //??????7??????YES\n\t\t\tcout << \"YES\" << endl;\n\t\telse \n\t\t\tcout << \"NO\" << endl; //????NO\n\t\tsum = 0; //??\n\t\tx = 0;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35331", "code": "int main()\n{\n int n,i,a,b,c;\n scanf(\"%d\",&n);\n for(i=0;im2)\n\t\t{\n\t\t\tint t=m1;\n\t\t\tm1=m2;\n\t\t\tm2=t;\n\t\t}\n\t\tif((y%400==0)||((y%4==0)&&(y%100!=0)))\n\t\t{\n\t\t\tfor(j=m1;jm2)\n k=check(y,m1)-check(y,m2);\n else\n k=check(y,m2)-check(y,m1);\n if(k%7==0)\n printf(\"YES\\n\");\n else\n printf(\"NO\\n\");\n }\n}\n"} +{"label": "71", "index": "35334", "code": "int main()\n{\n\tint n,i,year[200],mon1[200],mon2[200];\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d %d %d\",&year[i],&mon1[i],&mon2[i]);\n\t}\n\t\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif( (year[i]%100!=0) && (year[i]%4==0) || year[i]%400==0 )\n\t\t{\n\t\t\t\n\t\tif(mon1[i]==1) { mon1[i]=1; }\n\t\tif(mon1[i]==2) { mon1[i]=32; }\n if(mon1[i]==3) { mon1[i]=61; }\n if(mon1[i]==4) { mon1[i]=92; }\n if(mon1[i]==5) { mon1[i]=122; }\n if(mon1[i]==6) { mon1[i]=153; }\n if(mon1[i]==7) { mon1[i]=183; }\n if(mon1[i]==8) { mon1[i]=214; }\n if(mon1[i]==9) { mon1[i]=245; }\n if(mon1[i]==10) { mon1[i]=275; }\n if(mon1[i]==11) { mon1[i]=306; }\n if(mon1[i]==12) { mon1[i]=336; }\n if(mon2[i]==1) { mon2[i]=1; }\n\t\tif(mon2[i]==2) { mon2[i]=32; }\n if(mon2[i]==3) { mon2[i]=61; }\n if(mon2[i]==4) { mon2[i]=92; }\n if(mon2[i]==5) { mon2[i]=122; }\n if(mon2[i]==6) { mon2[i]=153; }\n if(mon2[i]==7) { mon2[i]=183; }\n if(mon2[i]==8) { mon2[i]=214; }\n if(mon2[i]==9) { mon2[i]=245; }\n if(mon2[i]==10) { mon2[i]=275; }\n if(mon2[i]==11) { mon2[i]=306; }\n if(mon2[i]==12) { mon2[i]=336; }\n if(((mon2[i]-mon1[i])%7==0) || ((mon1[i]-mon2[i])%7==0)) { printf(\"YES\\n\"); }\n\t\telse { printf(\"NO\\n\");}\n\t\t}\n\t else\n\t\t{\n if(mon1[i]==1) { mon1[i]=1; }\n\t\tif(mon1[i]==2) { mon1[i]=32; }\n if(mon1[i]==3) { mon1[i]=60; }\n if(mon1[i]==4) { mon1[i]=91; }\n if(mon1[i]==5) { mon1[i]=121; }\n if(mon1[i]==6) { mon1[i]=152; }\n if(mon1[i]==7) { mon1[i]=182; }\n if(mon1[i]==8) { mon1[i]=213; }\n if(mon1[i]==9) { mon1[i]=244; }\n if(mon1[i]==10) { mon1[i]=274; }\n if(mon1[i]==11) { mon1[i]=305; }\n if(mon1[i]==12) { mon1[i]=335; }\n if(mon2[i]==1) { mon2[i]=1; }\n\t\tif(mon2[i]==2) { mon2[i]=32; }\n if(mon2[i]==3) { mon2[i]=60; }\n if(mon2[i]==4) { mon2[i]=91; }\n if(mon2[i]==5) { mon2[i]=121; }\n if(mon2[i]==6) { mon2[i]=152; }\n if(mon2[i]==7) { mon2[i]=182; }\n if(mon2[i]==8) { mon2[i]=213; }\n if(mon2[i]==9) { mon2[i]=244; }\n if(mon2[i]==10) { mon2[i]=274; }\n if(mon2[i]==11) { mon2[i]=305; }\n if(mon2[i]==12) { mon2[i]=335; }\n if(((mon2[i]-mon1[i])%7==0)||((mon1[i]-mon2[i])%7==0)){\tprintf(\"YES\\n\"); }\n\t\telse { printf(\"NO\\n\");}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35335", "code": "int f(int y,int m);\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n printf(\"\\n\");\n int i,y[200],m1[200],m2[200];\n for (i=0;i> n;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin >> year >> a >> b;\n\t\tif (a > b)\n\t\t{\n\t\t\tc = a;\n\t\t\ta = b;\n\t\t\tb = c;\n\t\t}\n\t\tday = 0;\n\t\tfor(j=a;jm2)\n\t\t{\n\t\t\ta=m1;b=m2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta=m2;b=m1;\n\t\t}\n\t\tif((y%4==0)&&(y%100!=0)||(y%400==0))\n\t\t\td[2]++;\n\t\tfor(j=b;jm2)\n\t\t{\n\t\t\te=m1;\n\t\t\tm1=m2;\n\t\t\tm2=e;\n\t\t}\n\t\tfor(j=1;j<=12;j++)\n\t\t{\n\t\t\tif(j>=m1 && j=m1 && j=m1 && jc){\n\t\t\tt=b;\n\t\t\tb=c;\n\t\t\tc=t;\n\t\t}\n\t\tif((a%4==0&&a%100!=0)||a%400==0){\n\t\t\tif(b>2){\n\t\t\t\tfor(j=b-1;j2){\n\t\t\t\t\tfor(j=b-1;jc)\n {t=c;\n c=b;\n b=t;}\n for(j=b;jm2) //??m1b)\n {\n t=a;\n a=b;\n b=t;\n }\n int j;\n int s=0;\n for(j=a;j> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> y >> dy >> de;\n\t\tif (dy > de)\n\t\t{\n\t\t\tz = dy;\n\t\t\tdy = de;\n\t\t\tde = z;\n\t\t}\n\t\tleap = y % 4 == 0 && y % 100 != 0 || y % 400 == 0;\n\t\tfor (m = dy; m <= de - 1; m++)\n\t\t{\n\t\t\tswitch (m)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 2:\n\t\t\t\t\tday = 28 + leap;break;\n\t\t\t\tcase 3:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 4:\n\t\t\t\t\tday = 30;break;\n\t\t\t\tcase 5:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 6:\n\t\t\t\t\tday = 30;break;\n\t\t\t\tcase 7:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 8:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 9:\n\t\t\t\t\tday = 30;break;\n\t\t\t\tcase 10:\n\t\t\t\t\tday = 31;break;\n\t\t\t\tcase 11:\n\t\t\t\t\tday = 30;break;\n\t\t\t\tcase 12:\n\t\t\t\t\tday = 31;break;\n\t\t\t}\n\t\t\tk = k + day;\n\t\t}\n\t\tif (k % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse \n\t\t\tcout << \"NO\" << endl;\n\t\tk = 0;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35348", "code": "int main()\n{\n struct\n {\n int y,m1,m2;\n }p[200];\n int n,i,j,t,day[13],sum=0;\n day[1]=31;day[3]=31;day[4]=30;day[5]=31;day[6]=30;day[7]=31;day[8]=31;day[9]=30;day[10]=31;day[11]=30;day[12]=31;\n scanf(\"%d\",&n);\n for(i=0;i p[i].m2)\n {\n t=p[i].m1;\n p[i].m1=p[i].m2;\n p[i].m2=t;\n }\n for(j=p[i].m1;j>n;\n\tc[0]=0;\n\tc[1]=c[3]=c[5]=c[7]=c[8]=c[10]=c[12]=31;\n\tc[4]=c[6]=c[9]=c[11]=30;\n\tfor(i=0;i>year>>a>>b;\n\t if((year%4==0&&year%100!=0)||year%400==0) c[2]=29;\n\t else c[2]=28;\n for(j=0;j<13;j++)\n {sum+=c[j];\n d[j]=sum;\n }\n e=abs(d[a-1]-d[b-1]);\n\t if(e%7==0) cout<<\"YES\"<>n;\n\tfor ( i = 1; i <= n; i++ )\n\t{\n\t\tcin>>a>>b>>c;\n\t\tif ( ( a % 400 == 0 ) || ( a % 4 == 0 )\n\t\t\t && ( a % 100 != 0 ) )\n\t\t{\n\t\t\tif ( b > c )\n\t\t\t{\n\t\t\t\td = c; c = b; b = d;\n\t\t\t}\n\t\t\tswitch ( b )\n\t\t\t{ case 1: B = 0;break;\n\t\t\t{ case 2: B = 31;break; }\n\t\t\t{ case 3: B = 60;break; }\n\t\t\t{ case 4: B = 91;break; }\n\t\t\t{ case 5: B = 121;break; }\n\t\t\t{ case 6: B = 152;break; }\n\t\t\t{ case 7: B = 182;break; }\n\t\t\t{ case 8: B = 213;break; }\n\t\t\t{ case 9: B = 244;break; }\n\t\t\t{ case 10: B = 274;break; }\n\t\t\t{ case 11: B = 305;break; }\n\t\t\t{ default: B = 335;break; }\n\t\t\t}\n\t\t\tswitch ( c )\n\t\t\t{ case 1: C = 0;break; \n\t\t\t{ case 2: C = 31;break; }\n\t\t\t{ case 3: C = 60;break; }\n\t\t\t{ case 4: C = 91;break; }\n\t\t\t{ case 5: C = 121;break; }\n\t\t\t{ case 6: C = 152;break; }\n\t\t\t{ case 7: C = 182;break; }\n\t\t\t{ case 8: C = 213;break; }\n\t\t\t{ case 9: C = 244;break; }\n\t\t\t{ case 10: C = 274;break; }\n\t\t\t{ case 11: C = 305;break; }\n\t\t\t{ default: C = 335;break; }\n\t\t\t}\n\t\t\tif ( ( C - B ) % 7 == 0 )\n\t\t\t\tcout<<\"YES\"< c )\n\t\t\t{\n\t\t\t\td = c; c = b; b = d;\n\t\t\t}\n\t\t\tswitch ( b )\n\t\t\t{ case 1: B = 0;break; \n\t\t\t{ case 2: B = 31;break; }\n\t\t\t{ case 3: B = 59;break; }\n\t\t\t{ case 4: B = 90;break; }\n\t\t\t{ case 5: B = 120;break; }\n\t\t\t{ case 6: B = 151;break; }\n\t\t\t{ case 7: B = 181;break; }\n\t\t\t{ case 8: B = 212;break; }\n\t\t\t{ case 9: B = 243;break; }\n\t\t\t{ case 10: B = 273;break; }\n\t\t\t{ case 11: B = 304;break; }\n\t\t\t{ default: B = 334;break; }\n\t\t\t}\n\t\t\tswitch ( c )\n\t\t\t{ case 1: C = 0;break;\n\t\t\t{ case 2: C = 31;break; }\n\t\t\t{ case 3: C = 59;break; }\n\t\t\t{ case 4: C = 90;break; }\n\t\t\t{ case 5: C = 120;break; }\n\t\t\t{ case 6: C = 151;break; }\n\t\t\t{ case 7: C = 181;break; }\n\t\t\t{ case 8: C = 212;break; }\n\t\t\t{ case 9: C = 243;break; }\n\t\t\t{ case 10: C = 273;break; }\n\t\t\t{ case 11: C = 304;break; }\n\t\t\t{ default: C = 334;break; }\n\t\t\t}\n\t\t\tif ( ( C - B) % 7 == 0 )\n\t\t\t\tcout<<\"YES\"<0){\n sum=0;\n\t\tscanf(\"%d%d%d\",&d,&e,&f);\n if(e>f){\n\t\t\ts=e;\n\t\t\te=f;\n\t\t\tf=s;\n\t\t}\n\t\tif(shirunnian(d)==1){\n\t\t\tfor(i=e;i>n;\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tcin>>year>>m1>>m2;\n\t\t{\n\t\t\tif (m1>n;\n\tint b[n];\n\tint p1=0;\n\tint p2=0;\n\tint p3=0;\n\tint a1,a2,t;\n\tint sum=0;\n\tint p4=0;\n\tfor(int i=1;i<=n;i=i+1)\n\t{\n\t\tcin>>b[i];\n\t\tp1=b[i]%4;\n\t\tp2=b[i]%100;\n\t\tp3=b[i]%400;\n\t\tif(p3==0)\n\t\t\ta[2]=29;\n\t\telse\n\t\t{\n\t\t\tif((p2!=0)&&(p1==0))\n\t\t\t\ta[2]=29;\n\t\t}\n\t\tcin>>a1>>a2;\n\t\tif(a1>a2)\n\t\t{\n\t\t\tt=a1;\n\t\t\ta1=a2;\n\t\t\ta2=t;\n\t\t}\n\t\tfor(int j=a1;j>n;\n\tfor(int i=0;i>a>>b>>c;\n\t\tif(b>c)\n\t\t{A[0]=b;\n\t\tb=c;\n\t\tc=A[0];\n\t\t}\n\t\tif(a%4==0&&a%100!=0||a%400==0)\n\t\t{\n\t\t\tA[2]=A[2]+1;\n\t\t\tfor(int j=b;j>n;\n\tfor(int i=0;i>y>>m1>>m2;\n\t\tk=0;\n\t\tif(y%4!=0||(y%100==0&&y%400!=0))\n\t\t{\n\t\t\tif(m1>m2)\n\t\t\t{\n\t\t\t\tfor(int j=m2;jm2)\n\t\t\t{\n\t\t\t\tfor(int j=m2;jday1)\n {\n day2=day2+day1;\n day1=day2-day1;\n day2=day2-day1;\n }\n if((day1-day2)%7==0)\n {\n printf(\"YES\");\n if(i!=n-1)\n printf(\"\\n\");\n }\n else\n {\n printf(\"NO\");\n if(i!=n-1)\n printf(\"\\n\");\n }\n }\n else\n {\n d[2]=28;\n for(j1=0;j1day1)\n {\n day2=day2+day1;\n day1=day2-day1;\n day2=day2-day1;\n }\n if((day1-day2)%7==0)\n {\n printf(\"YES\");\n if(i!=n-1)\n printf(\"\\n\");\n }\n else\n {\n printf(\"NO\");\n if(i!=n-1)\n printf(\"\\n\");\n }\n }\n }\n}\n"} +{"label": "71", "index": "35358", "code": "int main()\n{\n\tint n;\n\tcin>>n;\t\n\tint judge=0;\n\tint dayofmonth[13]={31,28,31,30,31,30,31,31,30,31,30,31};\n int year,month1,month2;\nfor(int inputtime=1;inputtime<=n;inputtime++)\n{judge=0;\n cin>>year>>month1>>month2;\n dayofmonth[1]=28;\n if(year%4==0&&year%100!=0||year%400==0)\n\t dayofmonth[1]=29;\n for(int i=min(month1,month2)-1;im2)\n m=f(m1)-f(m2);\n else m=f(m2)-f(m1);\n if(m%7==0)\n printf(\"YES\\n\");\n else printf(\"NO\\n\");\n }\n}\n\n"} +{"label": "71", "index": "35360", "code": " void main()\n{int y,a,b,i,j,n,days,day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n scanf(\"%d\",&n);\n for (i=1;i<=n;i++)\n {days=0;\n scanf(\"%d\",&y);\n if ((y%400==0)||(y%4==0&&y%100!=0))\n\t day[2]=29;\n else day[2]=28;\n scanf(\"%d%d\",&a,&b);\n if (ab)\n {for (j=b;jm2)\n for(m=m2;mm2)\n for(m=m2;m>x;\n\tfor(j=0;j>n>>m1>>m2;\n\tif((n%4==0&&n%100!=0)||(n%400==0))\n\t{\n\t\tfor(i=0;icounter2)\n\t\tcounter=counter1-counter2;\n\telse\n\t\tcounter=counter2-counter1;\n\tif(counter%7==0)\n\t\tcout<<\"YES\"<> n;\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tcin >> y >> m1 >> m2;\n \tif ( y % 4 != 0) t = 0;\n \telse \n\t \tif ( y % 100 == 0 && y % 400 != 0 ) t = 0;\n\t else t = 1;\n\t\tif (t == 0) a[2] = 28;\n\t\telse a[2] = 29;\n\t\tif (m1 > m2) \n\t\t{\n\t\t\tm = m1;\n\t\t\tm1 = m2;\n\t\t\tm2 = m;\n\t\t}\n\t\tm = 0;\n\t\tfor (j = m1; j < m2; j ++)\n\t\t\tm = m + a[j];\n\t\tif (m % 7 == 0) cout << \"YES\" << endl;\n\t\telse cout << \"NO\" << endl;\t\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35369", "code": "\nvoid main()\n{\n int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n int n,i,y,m1,m2,j;\n scanf(\"%d\",&n);\n for (i=0;im2) {\n \t\tm=m1;\n \t\tm1=m2;\n \t\tm2=m;\n \t}\n \t for (j=m1-1;j>a>>b;\n\tif ((sday[a-1]-sday[b-1])%7==0) //??7??\n\t\tcout<<\"YES\"<>a>>b;\n\tif ((nday[a-1]-nday[b-1])%7==0) //??7??\n\t\tcout<<\"YES\"<>n; //????\n\twhile (n--)\n\t{\n\t\tcin>>year; //????\n\t\tif ((year%4==0&&year%100!=0)||(year%400==0)) //????\n\t\t\tspe();\n\t\telse\n\t\t\tnor();\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35372", "code": "int main ()\n{\n\tint dijitian(int,int,int);\n\t\n\tint y[200],m1[200],m2[200],n;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;ic[i])\n\t\t{max=b[i];min=c[i];}\n\t\tfor(j=min-1;jc)\n\t\t{\n\t\t\tint j,s=0;\n\t\t\tfor(j=c;jb)\n\t\t{\n\t\t\tint j,s=0;\n\t\t\tfor(j=b;jj)\n\t\t{\n\t\t\tl=i;\n\t\t\ti=j;\n\t\t\tj=l;\n\t\t}\n\t\tif (a%4==0&&a%100!=0||a%400==0)\n\t\t{\n\t\t\tb[1]=c[1]=0;\n\t\t\tb[2]=c[2]=31;\n\t\t\tb[3]=c[3]=60;\n\t\t\tb[4]=c[4]=91;\n\t\t\tb[5]=c[5]=121;\n\t\t\tb[6]=c[6]=152;\n\t\t\tb[7]=c[7]=182;\n\t\t\tb[8]=c[8]=213;\n\t\t\tb[9]=c[9]=244;\n\t\t\tb[10]=c[10]=274;\n\t\t\tb[11]=c[11]=305;\n\t\t\tb[12]=c[12]=335;\n\t\t\tif ((c[j]-b[i])%7==0)\n\t\t\t{\n\t\t\t\tprintf (\"YES\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf (\"NO\\n\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb[1]=c[1]=0;\n\t\t\tb[2]=c[2]=31;\n\t\t\tb[3]=c[3]=59;\n\t\t\tb[4]=c[4]=90;\n\t\t\tb[5]=c[5]=120;\n\t\t\tb[6]=c[6]=151;\n\t\t\tb[7]=c[7]=181;\n\t\t\tb[8]=c[8]=212;\n\t\t\tb[9]=c[9]=243;\n\t\t\tb[10]=c[10]=273;\n\t\t\tb[11]=c[11]=304;\n\t\t\tb[12]=c[12]=334;\n\t\t\tif ((c[j]-b[i])%7==0)\n\t\t\t{\n\t\t\t\tprintf (\"YES\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf (\"NO\\n\");\n\t\t\t}\n\t\t}\n\t}\n\t\treturn 0;\n}"} +{"label": "71", "index": "35378", "code": "/*\n * exercise37.cpp\n *\n * Created on: 2013-11-7\n * Author: st\n */\nint main()\n{\n\tint n,i,k,year,month1,month2,days=0;\n\tcin>>n;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint min,max;\n\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t cin>>year>>month1>>month2;\n\t\t if(month1>month2)\n\t\t { max=month1;\n\t\t min=month2;}\n\t\t else\n\t\t { max=month2;\n\t\t min=month1;}\n\t\t if(((year%4==0)&&(year%100!=0))||(year%400==0))\n\t\t\t{\n\t\t\tfor(k=min;km2)\n {\n t=m1;\n m1=m2;\n m2=t;\n }\n if(y%400==0||(y%4==0&&y%100!=0))\n {\n if(1>=m1&&1=m1&&2=m1&&3=m1&&4=m1&&5=m1&&6=m1&&7=m1&&8=m1&&9=m1&&10=m1&&11=m1&&12=m1&&1=m1&&2=m1&&3=m1&&4=m1&&5=m1&&6=m1&&7=m1&&8=m1&&9=m1&&10=m1&&11=m1&&12> n;\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tint y, a, b, s = 0;\n\t\tcin >> y >> a >> b;\n\t\tif (a > b) swap(a, b);\n\t\tif (run_check(y))\n\t\t\tt[2]++;\n\t\tfor (int j = a; j < b; j++)\n\t\t\ts += t[j];\n\t\tif(s % 7) cout << \"NO\\n\";\n\t\telse cout << \"YES\\n\";\n\t\tif (run_check(y))\n\t\t\tt[2]--;\n\t}\n\t\n return 0;\n}\n"} +{"label": "71", "index": "35381", "code": "int main()\n{\n\tint n,i,j,k,a[200],b[200][13],c[200][13];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ic[i]) {\n\t\t\t d=c[i];\n\t\t\t c[i]=b[i];\n\t\t\t b[i]=d;\n\t\t }\n\t\t if (a[i]%4==0&&a[i]%100!=0||a[i]%400==0) {\n\t\t\t for (sum=0,e=b[i]; e> n;\n\tfor(i = 1; i <=n; i++)\n\t{\n\t\td = 0;\n\t\tcin >> YY >> M1 >> M2;\n\t\tif((YY % 4 == 0 && YY % 100 != 0) || YY % 400 == 0)\n\t\t{\n\t\t\tif(M1 > M2)\n\t\t\t{\n\t\t\t\tfor(j = M2; j <= M1 - 1; j++)\n\t\t\t\t\td = d + b[j-1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(j = M1; j <= M2 - 1; j++)\n\t\t\t\t\td = d + b[j-1];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(M1 > M2)\n\t\t\t{\n\t\t\t\tfor(j = M2; j <= M1 - 1; j++)\n\t\t\t\t\td = d + a[j-1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(j = M1; j <= M2 - 1; j++)\n\t\t\t\t\td = d + a[j-1];\n\t\t\t}\n\t\t}\n\t\tif(d % 7 == 0)\n\t\t\tcout << \"YES\"<< endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35385", "code": "//?????? \n//???2012.10.23 \n//?????? \n\nint main()\n{\n int i, n;\n int y, m1, m2;\n int d1, d2;\n cin >> n;\n for (i = 1;i <= n;i++)\n {\n cin >> y >> m1 >> m2;\n if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))//????? \n {\n switch(m1)\n {\n case 1:\n d1 = 1;\n break;\n case 2:\n d1 = 32;\n break;\n case 3:\n d1 = 61;\n break;\n case 4:\n d1 = 92;\n break;\n case 5:\n d1 = 122;\n break;\n case 6:\n d1 = 153;\n break;\n case 7:\n d1 = 183;\n break;\n case 8:\n d1 = 214;\n break;\n case 9:\n d1 = 245;\n break;\n case 10:\n d1 = 275;\n break;\n case 11:\n d1 = 306;\n break;\n case 12:\n d1 = 336;\n break;\n }\n switch(m2)\n {\n case 1:\n d2 = 1;\n break;\n case 2:\n d2 = 32;\n break;\n case 3:\n d2 = 61;\n break;\n case 4:\n d2 = 92;\n break;\n case 5:\n d2 = 122;\n break;\n case 6:\n d2 = 153;\n break;\n case 7:\n d2 = 183;\n break;\n case 8:\n d2 = 214;\n break;\n case 9:\n d2 = 245;\n break;\n case 10:\n d2 = 275;\n break;\n case 11:\n d2 = 306;\n break;\n case 12:\n d2 = 336;\n break;\n }\n if ((d1 - d2) % 7 == 0) \n cout << \"YES\" << endl;//??d1?d2??7?????\"YES\" \n else\n cout << \"NO\" << endl;//??d1?d2???7??,??\"NO\" \n }\n else//?????? \n {\n switch(m1)\n {\n case 1:\n d1 = 1;\n break;\n case 2:\n d1 = 32;\n break;\n case 3:\n d1 = 60;\n break;\n case 4:\n d1 = 91;\n break;\n case 5:\n d1 = 121;\n break;\n case 6:\n d1 = 152;\n break;\n case 7:\n d1 = 182;\n break;\n case 8:\n d1 = 213;\n break;\n case 9:\n d1 = 244;\n break;\n case 10:\n d1 = 274;\n break;\n case 11:\n d1 = 305;\n break;\n case 12:\n d1 = 335;\n break;\n }\n switch(m2)\n {\n case 1:\n d2 = 1;\n break;\n case 2:\n d2 = 32;\n break;\n case 3:\n d2 = 60;\n break;\n case 4:\n d2 = 91;\n break;\n case 5:\n d2 = 121;\n break;\n case 6:\n d2 = 152;\n break;\n case 7:\n d2 = 182;\n break;\n case 8:\n d2 = 213;\n break;\n case 9:\n d2 = 244;\n break;\n case 10:\n d2 = 274;\n break;\n case 11:\n d2 = 305;\n break;\n case 12:\n d2 = 335;\n break;\n }\n if (( d1 - d2) % 7 == 0)\n cout << \"YES\" << endl;//??d1?d2??7?????\"YES\"\n else\n cout << \"NO\" << endl;//??d1?d2???7??,??\"NO\"\n }\n }\n return 0;\n \n}\n"} +{"label": "71", "index": "35386", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i,j,year,month1,month2,result=0;\n\t\n\tfor(i=0;imonth2)\n\t\t{\n\t\t\tt=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=t;\n\t\t}\n\t\tfor(j=month1;jc)\n\t\t\t{\n\t\t\t\tfor(j=c;jb)\n\t\t\t{\n\t\t\t\tfor(j=b;jc)\n\t\t\t{\n\t\t\t\tfor(j=c;jb)\n\t\t\t{\n\t\t\t\tfor(j=b;jc2)\n\t\t{\n\t\t\tif((c1-c2)%7==0)\n\t\t\t{\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"NO\\n\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif((c2-c1)%7==0)\n\t\t\t{\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"NO\\n\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\n\t}\n\n\n\treturn 0;\n}"} +{"label": "71", "index": "35391", "code": "int main(int argc, char* argv[])\n{\n\tint i,n,y[200],m1[200],m2[200];\n\tint a[]={0,31,59,90,120,151,181,212,243,273,304,334,365};\n\tint b[]={0,31,60,91,121,152,182,213,244,274,305,335,365};\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\tfor ( j = 0 ; j < n ; j ++ )\n\t\tfor ( i = 0 ; i < 3 ; i ++ )\n\t\t\tcin>>a[j][i];\n\tfor ( j = 0 ; j < n ; j ++ )\n\t\t{\n\t\t\tsum = 0;\n\t\t\t if ( a[j][0] % 4 != 0 || ( a[j][0] % 100 == 0 && a[j][0] % 400 != 0 ))\n\t\t\t{\n\t\t\t\tp = a[j][1];\n\t\t\t\tq = a[j][2];\n\t\t\t\tif ( p < q )\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( e = p - 1;e < q-1;e++ )\n\t\t\t\t\t\t\tsum += b[e];\n\t\t\t\t }\n\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( e = q - 1;e < p-1;e++ )\n\t\t\t\t\t\t\tsum += b[e];\n\t\t\t\t }\n\t\t\t\tif ( sum % 7 == 0)\n\t\t\t\t\tcout<<\"YES\"<>n;\n\tint commonyear[]={0,0,3,3,6,1,4,6,2,5,0,3,5}, \n\t\tleapyear[]={0,0,3,4,0,2,5,0,3,6,1,4,6};\n\tfor (i=0;i>year>>month1>>month2;\n\t\tif ((year%4==0&&year%100!=0)||(year%400==0)) \n\t\t{\n\t\t\tif (leapyear[month1]==leapyear[month2]) cout<<\"YES\"<> num;\n\tfor (int i = 0; i < num; i++) {\n\t\tint year, m1, m2,n=0;\n\t\tcin >> year >> m1 >> m2;\n\t\tif (run(year) == 1) {\n\t\t\tint yue[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30,\n\t\t\t\t\t31 };\n\t\t\tif (m1 < m2) {\n\t\t\t\tfor (int j = m1 - 1; j < m2 - 1; j++)\n\t\t\t\t\tn = n + yue[j];\n\t\t\t\tif (n % 7 == 0)\n\t\t\t\t\tcout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\t\t\t} else {\n\t\t\t\tfor (int j = m2 - 1; j < m1 - 1; j++)\n\t\t\t\t\tn = n + yue[j];\n\t\t\t\tif (n % 7 == 0)\n\t\t\t\t\tcout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t} else {\n\t\t\tint n = 0, yue[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30,\n\t\t\t\t\t31 };\n\t\t\tif (m1 < m2) {\n\t\t\t\tfor (int j = m1 - 1; j < m2 - 1; j++)\n\t\t\t\t\tn = n + yue[j];\n\t\t\t\tif (n % 7 == 0)\n\t\t\t\t\tcout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\n\t\t\t} else {\n\t\t\t\tfor (int j = m2 - 1; j < m1 - 1; j++)\n\t\t\t\t\tn = n + yue[j];\n\t\t\t\tif (n % 7 == 0)\n\t\t\t\t\tcout << \"YES\" << endl;\n\t\t\t\telse\n\t\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35396", "code": "\nint main()\n{\n int day(int m,int leap);\n int i,n,year[200][3],leap=0,day1,day2,d;\n scanf(\"%d\",&n);\n for(i=0;i=3)\n sum=sum+leap;\n return(sum);\n}\n"} +{"label": "71", "index": "35397", "code": "int main()\n{\n\tint a[200],b[200],c[200],i,j,m,k;\n\tcin>>m;\n\tfor(i=0;i>a[i]>>b[i]>>c[i];\n\tint d[12]={3,0,3,2,3,2,3,3,2,3,2,3};\n\tint e[200],f[200];\n\tfor(i=0;i=c[i]){e[i]=b[i];f[i]=c[i];}\n\t\telse{e[i]=c[i];f[i]=b[i];}\n\tfor(i=0;i>n;\n\tint y[200],m1[200],m2[200];//???????1???2\n\tfor(int i=0;i>y[i]>>m1[i]>>m2[i];//??3??\n\tfor(int j=0;jmon2)\n\t\t{\n\t\t int tmp;\n\t\t tmp=mon1;\n\t\t mon1=mon2;\n\t \tmon2=tmp;\n\t\t}\n\t if(fc(year,mon1,mon2)%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\telse\n\t\t\tprintf(\"NO\\n\");\n\t}\n\treturn 0;\n}\n\nint fc(int year,int mon1,int mon2)\n{\n\tint delta=0;\n\tint i;\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=mon1;i2))\n\t{\n\t\tif(year%4==0&&year>=4&&year%100!=0)\n\t\t delta+=1;\n\t else if(year%100==0&&year>=100&&year%400==0)\n\t\t delta+=1;\n\t}\n\treturn delta;\n}"} +{"label": "71", "index": "35402", "code": "\nint main(int argc, char* argv[])\n{\n\tint n,i;\n\tint y,m1,m2;\n\tint d1,d2;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i> n;\n for(i=1;i<=n;i++)\n {\n sum=0;\n cin >> year >> month1 >> month2; \n if(month1>month2)\n {\n p=month1;\n month1=month2;\n month2=p; \n } \n if(year%400==0||(year%4==0&&year%100!=0))\n {\n for(1;month1>n;\n\tfor (i=0; i>Year>>Month1>>Month2;\n\t\tif ( Year%4==0 && Year%100!=0 || Year%400==0)//?????\n\t\t\tMonth[1]=Run2;\n\t\telse//????\n\t\t\tMonth[1]=Chang2;\n\t\tif ( Month2 < Month1 )\n\t\t\ttemp=Month1, Month1=Month2, Month2=temp;//??????\n\t\tfor ( k=Month1-1; k>n;\n\twhile(n--){\n\t\tint year,month1,month2;\n\t\tcin>>year>>month1>>month2;\n\t\tif(month1>month2){\n\t\t\tint temp;\n\t\t\ttemp=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=temp;\n\t\t}\n\t\tint i,sum=0;\n\t\tif(year%4==0&&year%100!=0||year%400==0){\n\t\t\tfor(i=month1;i>n;\n\tfor(n;n>0;n--)\n\t{\n\t\tcin>>year>>moon1>>moon2;\n\t\tp=(moon1>moon2)?moon1:moon2;\n\t\tq=(moon1>n;\n\tfor(int i=0;i>year>>month1>>month2;\n\t\tif(month1>month2) //??month1?month2??\n\t\t\t{\n\t\t\t\tmax=month1;\n\t\t\t\tmin=month2;\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tmax=month2;\n\t\t min=month1;\n\t\t}\n\t\tk = 0;\nif(year%4==0&&year%100!=0||year%400==0) //???????\n\t\t{\n\t\t\twhile(min+k> n;\n\tfor (j = 0; j < n; j++) {\n\t\tcin >> year >> month1 >> month2;\n\t\tif (month1 < month2)\n\t\t\t;\n\t\telse {\n\t\t\ttemp = month1;\n\t\t\tmonth1 = month2;\n\t\t\tmonth2 = temp;\n\t\t}\n\t\tif (checkrun(year) != 1) {\n\t\t\tday = 0;\n\t\t\tfor (i = month1; i < month2; i++) {\n\t\t\t\tday = day + a1[i];\n\t\t\t}\n\t\t\tif (day % 7 == 0) {\n\t\t\t\tcout << \"YES\" << endl;\n\t\t\t} else {\n\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t} else {\n\t\t\tday = 0;\n\t\t\tfor (i = month1; i < month2; i++) {\n\t\t\t\tday = day + a2[i];\n\t\t\t}\n\t\t\tif (day % 7 == 0) {\n\t\t\t\tcout << \"YES\" << endl;\n\t\t\t} else {\n\t\t\t\tcout << \"NO\" << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35410", "code": "int main()\n{\n\tint a[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n int b[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int n,i,j,k,year,x,y;\n cin>>n;\n\tfor (k=1;k<=n;k++)\n {\n \tcin>>year>>x>>y;\n \tj=0;\n\t\tif (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) ) \n \t{\n\t \tif (x>y) \n\t\t\t{\n\t\t\t\tfor (i=y;i<=(x-1);i++)\n\t\t\t\tj=j+a[i];\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (i=x;i<=(y-1);i++)\n\t\t\t\tj=j+a[i];\n\t\t\t}\n\t\t\tif ((j%7)==0) cout<<\"YES\"<y) \n\t\t\t{\n\t\t\t\tfor (i=y;i<=(x-1);i++)\n\t\t\t\tj=j+b[i];\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (i=x;i<=(y-1);i++)\n\t\t\t\tj=j+b[i];\n\t\t\t}\n\t\t\tif ((j%7)==0) cout<<\"YES\"<y) {temp=x;x=y;y=temp;}\n sum=0;\n if (boolean!=0)\n for (j=x;j> n;\n for(int i = 1; i <= n; i++)\n {\n sum = 0;\n d = 0;\n cin >> y >> m1 >> m2;\n if(m1 > m2)\n {\n m = m1;\n m1 = m2;\n m2 = m;\n }\n m = m1;\n while(m < m2)\n {\n switch(m) //???????? \n {\n case 1:\n case 3:\n case 5:\n case 7:\n case 8:\n case 10:\n case 12:\n d = 31; break;\n case 4:\n case 6:\n case 9:\n case 11:\n d = 30; break;\n case 2:\n {\n if((y % 400 == 0) || ((y % 100 != 0) && (y % 4 == 0)))\n d = 29; //?????2??29? \n else\n d = 28;\n } break;\n }\n sum += d; //????? \n m++;\n }\n if(sum % 7 == 0) //???????? \n {\n cout << \"YES\" << endl;\n }\n else\n {\n cout << \"NO\" << endl;\n }\n }\n\n return 0;\n}\n"} +{"label": "71", "index": "35413", "code": "int main(int argc, char* argv[])\n{\n\tint n, y[200], m1[200], m2[200], i, j, x[12], s;\n\tscanf(\"%d\", &n);\n\tfor (i=0;im2){\n\t\t\tint t;\n\t\t t=m1;\n\t\t m1=m2;\n\t\t m2=t;\n\t\t}\n\tif((y[i]%4==0&&y[i]%100!=0)||(y[i]%100==0&&y[i]%400==0)){\n if((m1==1&&m2==4)||(m1==1&&m2==7)||(m1==2&&m2==8)||(m1==3&&m2==11)||(m1==4&&m2==7)||(m1==9&&m2==12))\n\t\t printf(\"YES\\n\");\n else printf(\"NO\\n\");\n\t }\n else{\n if((m1==1&&m2==10)||(m1==2&&m2==3)||(m1==2&&m2==11)||(m1==3&&m2==11)||(m1==4&&m2==7)||(m1==9&&m2==12))\n\t\t printf(\"YES\\n\");\n else printf(\"NO\\n\");\n\t }\n\t}\n\treturn 0;\n}"} +{"label": "71", "index": "35415", "code": "int main()\n{\n\tint n,i,b[200],c,e,k,a[13],y;\n\tscanf(\"%d\",&n);\n\ta[0]=a[1]=0;\n\ta[5]=a[7]=a[10]=a[12]=30;\n a[2]=a[4]=a[6]=a[8]=a[9]=a[11]=31;\n\ta[3]=28;\n\tfor(k=3;k<=12;k++){\n\t a[k]+=a[k-1];\n\t\t\t }\n\t\n\tfor(i=0;i>n;\n for(int i=0;i>year>>month0>>month1;\n if(month0>month1){int temp;temp=month0;month0=month1;month1=temp;}\n if(judge(year)==0)\n {\n if(month0==1&&month1==10) mark=1;\n if(month0==2&&month1==3) mark=1;\n if(month0==2&&month1==11) mark=1;\n if(month0==3&&month1==11) mark=1;\n if(month0==4&&month1==7) mark=1;\n if(month0==9&&month1==12) mark=1;\n }\n else\n {\n if(month0==1&&month1==4) mark=1;\n if(month0==1&&month1==7) mark=1;\n if(month0==2&&month1==8) mark=1;\n if(month0==3&&month1==11) mark=1;\n if(month0==4&&month1==7) mark=1;\n if(month0==9&&month1==12) mark=1; \n }\n if(mark==1) cout<<\"YES\"<d2)d=d1-d2;\n\telse d=d2-d1;\n\tif(((m%4==0)&&(m%100!=0))||(m%400==0))\n\t{\n\t\tif((y1<=2&&y2<=2)||(y1>2&&y2>2))\n\t\t\treturn d;\n\t\telse return d+1;\n\t}\n\treturn d;\n\t\n}"} +{"label": "71", "index": "35418", "code": "int main(){\n\tint n,year,month1,month2,i,day1,day2;\n\tint isRunNian(int year);\n\tint DiJiTian(int year, int month);\n\tint sz[200],jg;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0){M--;\n\ts=0;\n\tscanf(\"%d%d%d\",&y,&m1,&m2);\n\tif(m1==m2){printf(\"YES\\n\");continue;}\n\tif(m1>m2){i=m1;m1=m2;m2=i;}\n\tif((1==m1&&2!=m2)||2==m1)if((y%400==0)||(y%4==0&&y%100!=0))s=1;\n\tfor(i=m1;id[1])\n\t\t{\n\t\t\ts=d[0]-d[1];\n\t\t\t\tif (s%7==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"YES\\n\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprintf(\"NO\\n\");\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ts=d[1]-d[0];\n\t\t\t\tif (s%7==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"YES\\n\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprintf(\"NO\\n\");\n\t\t\t\t}\n\t\t}\n\t\t}\n\t\treturn 0;\n\t\t}\n\n\n"} +{"label": "71", "index": "35423", "code": "int main()\n{\n\tint i,j,n,year,m1,m2,a,b,sum=0;\n\tscanf(\"%d\",&n);\n\tint month1[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tint month2[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=0;im2)\n\t\t{\n\t\t\ta=m2;\n\t\t\tb=m1;\n\t\t}\n\t\telse \t\n\t\t{\n\t\t\ta=m1;\n\t\t\tb=m2;\n\t\t}\n\t\t\tfor(j=a;j>n;\n\t for(i=0;i>a[i]>>b[i]>>c[i];\n\t\t k=0;j=0;\n\t\t if(c[i]m2)\n\t\t{\n\t\t\ttemp=m2;\n\t\t\tm2=m1;\n\t\t\tm1=temp;\n\t\t}\n\t\tif(year%400==0||(year%4==0&&year%100!=0))\n\t\t\ts[1]=29;\n\t\telse\n\t\t\ts[1]=28;\n\t\tfor(i=m1;imonth2[i])\n\t\t{\n\t\t\thuan[i]=month1[i];\n\t\t\tmonth1[i]=month2[i];\n\t\t\tmonth2[i]=huan[i];\n\t\t}\n\t\tdays[i]=0;\n\t}\n\n\tfor (i=0;im1[i]){t=m2[i];m2[i]=m1[i];m1[i]=t;}\n\t\t\n\t\tif(m2[i]>2){\n\t\t\tfor(j=m2[i];j2){\n\t\t\tif((y[i]%100!=0&&y[i]%4==0)||(y[i]%400==0)){\n\t\t for(j=m2[i];jmonth2[i-1])\n\t\t{\n\t\t\tk=month1[i-1];\n\t\t\tmonth1[i-1]=month2[i-1];\n\t\t\tmonth2[i-1]=k;\n\t\t}\n\n\t\tfor(j=month1[i-1];j=3)\n\t\t{\n\t\t\tday[i-1]++;\n\t\t}\n\t\tif(day[i-1]%7==0)\n\t\t\tprintf(\"YES\\n\");\n\t\t\telse printf(\"NO\\n\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35432", "code": "int main()\n{\n\tint n, i, j, t, leap, day, year, m1, m2;\n\tcin >> n;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tcin >> year >> m1 >> m2;\n\t\tday = 0;\n\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n\t\t\tleap = 1;\n\t\telse\n\t\t\tleap = 0;\n\t\tif (m1 > m2)\n\t\t{\n\t\t\tt = m2;\n\t\t\tm2 = m1;\n\t\t\tm1 = t;\n\t\t}\n\t\tfor (j = m1; j < m2; j++)\n\t\t{\n\t\t\tswitch (j)\n\t\t\t{\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 5:\n\t\t\tcase 7:\n\t\t\tcase 8:\n\t\t\tcase 10:\n\t\t\tcase 12:\n\t\t\t\tday += 31;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tday += 28 + leap;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tday += 30;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ( day % 7 == 0)\n\t\t\tcout << \"YES\" <>n;\n\twhile(n!=0){\n\t\tcin>>year>>month1>>month2;\n\t\tif((year%4==0&&year%100!=0)||year%400==0) judge(1,month1,month2);\n\t\telse judge(0,month1,month2);\n\t\tn--;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35436", "code": "\nint main(int argc, char* argv[])\n{\n\tint i,j,n,k,t1=0,t2=0;\n\tstruct p{\n\t\tint year;\n\t\tint month1;\n\t\tint month2;\n\t}p[200];\n\tscanf(\"%d\",&n);\n\tfor(i=0;im2) \n {\n for(int k=m2;km2) \n {\n for(int k=m2;km2)\n {return m1;}\n else\n {return m2;}\n}\nint main()\n{\n int n,i,b,j;\n scanf(\"%d\",&n);\n int a[n],m1[n],m2[n];\n for(i=0;i> n;//??????n\n\tfor(k = 0; k < n; k++)\n\t{\n\t\tdays = 0;//???????0\n\t\tcin >> year >> month1 >> month2;//?????????\n\t\tleap = (year % 4==0 && year % 100 != 0) || year % 400 == 0;//???????\n\t\tif ( month1 < month2 )\n\t\t\tmonth = month1;\n\t\telse\n\t\t\t{month = month2;\n\t\t\tmonth2 = month1;\n\t\t\t}//????????????\n\t\twhile( month < month2 )\n\t\t{\n\t\t\tswitch (month)\n\t\t\t{\n\t\t\t\tcase 2 : \n\t\t\t\t\tdays += 28 + leap; break;//2???????1\n\t\t\t\tcase 1 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 12 : \n\t\t\t\t\tdays += 31; break;\n\t\t\t\tcase 4 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 11 : days += 30; break;\n\t\t\t}\n\t\t\tmonth++;\n\t\t}//???????????\n\t\tif ( days % 7 == 0 )\n\t\t\tcout << \"YES\" << endl;//?????7????????\n\t\telse\n\t\t\tcout << \"NO\" << endl;//?????\n\t}\n\treturn 0;\n}\n\t\t\t\n"} +{"label": "71", "index": "35441", "code": "int run(int n)\n{\n if(n%4==0&&n%100!=0)\n return 1;\n else if(n%400==0)\n return 1;\n else\n return 0;\n}\nmain()\n{\n int n;\n scanf(\"%d\",&n);\n for(int i=1;i<=n;i++)\n {\n int y,m1,m2,t,day=0;\n int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n scanf(\"%d %d %d\",&y,&m1,&m2);\n if(run(y)==1)\n a[1]=29;\n if(m1>m2)\n {\n t=m1;\n m1=m2;\n m2=t;\n }\n for(int j=m1;j2) d1++;\n\t\t\tif (m2>2) d2++;\n\t\t}\n\t\tif ((d1-d2)%7==0) printf(\"YES\\n\");\n\t\telse printf(\"NO\\n\");\n\t}\n\treturn 0;\n}\n\t\t\n"} +{"label": "71", "index": "35443", "code": "void main()\n{\n\tint y , m1 , m2;\n\tint x = 0 , i , x1 , x2 ;\n\tint p,q;\n\tscanf(\"%d\",&p);\n\tfor(q=0;qm2) {\n\t\t\te=m1;\n\t\t\tm1=m2;\n\t\t\tm2=e;\n\t\t}\n\t\td=0;\n for(j=m1;j> n;\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\tcin >> y;\n\t\tcin >> a >> b;\n\t\tif(a > b) e = a, c = b, a = c, b = e;\n\t\tfor (int e = a ; e < b; e++)\n\t\t{\n\t\t\tif ((y % 400 == 0) || ((y % 100 != 0) && (y % 4 == 0)))\n\t\t {\n\t\t\t\tswitch(e)\n\t\t\t\t{\n\t\t\t\t\tcase 1 : d = d + 31; break;\n\t\t\t\t\tcase 2 : d = d + 29; break;\n\t\t\t\t\tcase 3 : d = d + 31; break;\n\t\t\t\t\tcase 4 : d = d + 30; break;\n\t\t\t\t\tcase 5 : d = d + 31; break;\n\t\t\t\t\tcase 6 : d = d + 30; break;\n\t\t\t\t\tcase 7 : d = d + 31; break;\n\t\t\t\t\tcase 8 : d = d + 31; break;\n\t\t\t\t\tcase 9 : d = d + 30; break;\n\t\t\t\t\tcase 10 : d = d + 31; break;\n\t\t\t\t\tcase 11 : d = d + 30; break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tswitch(e)\n\t\t\t\t{\n\t\t\t\t\tcase 1 : d = d + 31; break;\n\t\t\t\t\tcase 2 : d = d + 28; break;\n\t\t\t\t\tcase 3 : d = d + 31; break;\n\t\t\t\t\tcase 4 : d = d + 30; break;\n\t\t\t\t\tcase 5 : d = d + 31; break;\n\t\t\t\t\tcase 6 : d = d + 30; break;\n\t\t\t\t\tcase 7 : d = d + 31; break;\n\t\t\t\t\tcase 8 : d = d + 31; break;\n\t\t\t\t\tcase 9 : d = d + 30; break;\n\t\t\t\t\tcase 10 : d = d + 31; break;\n\t\t\t\t\tcase 11 : d = d + 30; break;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tif (d % 7 == 0) cout << \"YES\" << endl;\n\t\telse cout << \"NO\" << endl;\n\t\td = 0;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35447", "code": "int main()\n{\n int n,a;\n scanf(\"%d\",&n);\n int year,mon1,mon2,day[12]={0};\n for (a=0;a> n;\n\n\tint i=0;\n\twhile(i < n){\n\t\tint year, month1, month2, month1day=0, month2day=0;\n\t\tcin >> year >> month1 >> month2;\n\n\t\tif(is_Runnian(year)) monthday[1] = 29;\t\t//????? ????29?\n\t\tfor(int j=0; j0 ? (month2day-month1day) : (month1day-month2day));\n\n\t\tif(p%7 == 0)\t\t\t\t//??7??\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\n\t\tif(monthday[1] == 29)\n\t\t\tmonthday[1] = 28;\n\t\ti++;\n\t}\n}\n"} +{"label": "71", "index": "35449", "code": "int f(int n,int a,int b)\n{\n int x=0,y,i;\n int m[13];\n if((n%4==0&&n%100!=0)||(n%400==0))\n { \n\t if(a>b)\n\t\t y=f(n,b,a);\n\t else\n\t {\n\t m[1]=31;\n\t m[2]=29;\n\t m[3]=31;\n\t m[4]=30;\n\t m[5]=31;\n\t m[6]=30;\n\t m[7]=31;\n\t m[8]=31;\n\t m[9]=30;\n m[10]=31;\n\t m[11]=30;\n\t m[12]=31;\n for(i=a;ib)\n\t\t y=f(n,b,a);\n\t else\n\t {\n\t m[1]=31;\n\t m[2]=28;\n\t m[3]=31;\n\t m[4]=30;\n\t m[5]=31;\n\t m[6]=30;\n\t m[7]=31;\n\t m[8]=31;\n\t m[9]=30;\n m[10]=31;\n\t m[11]=30;\n\t m[12]=31;\n for(i=a;i> n;\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tcin >> year;\n\t\tcin >> m[1];\n\t\tcin >> m[2];\n\t\tif ((year % 400 == 0) || ((year % 100 != 0) && (year % 4 == 0)))\n\t\t{\n\t\t\tfor (j = 1; j <= 2; j ++)\n\t\t\t{\n\t\t\t\tif (m[j] == 1)\n\t\t\t\t{\n\t\t\t\t\tp[j] = 1;\n\t\t\t\t}\n\t\t\t\tif (m[j] == 2)\n\t\t\t\t{\n\t\t\t\t\tp[j] = 31 + 1;\n\t\t\t\t}\n\t\t\t\tif ((m[j] <= 7) && (m[j] >= 3))\n\t\t\t\t{\n\t\t\t\t\tx = (m[j]- 2) / 2;\n\t\t\t\t\tp[j] = x * 31 + 29 + 31 + (m[j] - 3 - x) * 30 + 1;\n\t\t\t\t\tx = 0;\n\t\t\t\t}\n\t\t\t\tif (m[j] >= 8)\n\t\t\t\t{\n\t\t\t\t\tx = (m[j] - 7) / 2;\n\t\t\t\t\tp[j] = x * 31 + (29 + 31 * 4 + 30 * 2) + (m[j] - 8 - x) *30 + 1;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (j = 1; j <= 2; j ++)\n\t\t\t{\n\t\t\t\tif (m[j] == 1)\n\t\t\t\t{\n\t\t\t\t\tp[j] = 1;\n\t\t\t\t}\n\t\t\t\tif (m[j] == 2)\n\t\t\t\t{\n\t\t\t\t\tp[j] = 31 + 1;\n\t\t\t\t}\n\t\t\t\tif ((m[j] <= 7) && (m[j] >= 3))\n\t\t\t\t{\n\t\t\t\t\tx = (m[j]- 2) / 2;\n\t\t\t\t\tp[j] = x * 31 + 28 + 31 + (m[j] - 3 - x) * 30 + 1;\n\t\t\t\t\tx = 0;\n\t\t\t\t}\n\t\t\t\tif (m[j] >= 8)\n\t\t\t\t{\n\t\t\t\t\tx = (m[j] - 7) / 2;\n\t\t\t\t\tp[j] = x * 31 + (28 + 31 * 4 + 30 * 2) + (m[j] - 8 - x) *30 + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint\tt;\n\t\tt = fabs(p[1] - p[2]);\n\t\tif (t % 7 == 0)\n\t\t{\n\t\t\tcout << \"YES\" << endl; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout << \"NO\" << endl; \n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "71", "index": "35451", "code": "int main ( )\n{\n\tint i, j, n = 0, year = 0, month1 = 0, month2 = 0, num = 0,\n\t\ta[12] = {31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tint min(int x, int y);\n\tint max(int x, int y);\n\tcin >> n;\n\tfor(i = 0;i < n;i++)\n\t{\n\t\tnum = 0;\n\t\tcin >> year >> month1 >> month2;\n\t\tif((year % 400 == 0)||((year % 100 != 0)&&(year % 4 == 0)))/*????*/\n\t\t\ta[1] = 29;\n\t\telse a[1] = 28;\n\t\tfor(j = min(month1, month2)-1;j < max(month1, month2)-1;j++)/*???????????*/\n\t\t\tnum += a[j];\n\t\tif(num % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse cout <<\"NO\"< y)\n\t\treturn(y);\n\telse return(x);\n}\nint max(int x, int y)/*?????*/\n{\n\tif(x > y)\n\t\treturn(x);\n\telse return(y);\n}"} +{"label": "71", "index": "35452", "code": "\nint main()\n{\n\tint i, n, year, mon1, mon2, a[12]={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, b[12]={31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, day1, day2, day3, day4, i1, i2, k1, k2;\n\tscanf(\"%d\", &n);\n\tfor(i=1; i<=n; i++)\n\t{\n\t\tday1=0;\n\t\tday2=0;\n\t\tday3=0;\n\t\tday4=0;\n\t\tscanf(\"%d\", &year);\n\t\tscanf(\"%d%d\", &mon1, &mon2);\n\t\tif((year%4==0 && year%100!=0)||(year%400==0))\n\t\t{\n\t\t\tif(mon1>n;\n\tfor(m=0;m>a>>b>>c;//??? ?????\n\tif(b>c)//??????????????\n\t{\n\t\tt=b;b=c;c=t;\n\t}\n\tsum=0;\n\tif(((a%4==0&&a%100!=0)||((a%400)==0))==1)//??????\n\t\tfor(i=b;i>n;\n for(j=1;j<=n;j++)\n {\n cin>>year;\n\t if(year%4==0&&year%100!=0||year%400==0)\n\t\t a[2]=29;\n\t else a[2]=28;//??2????\n\t cin>>c>>d;\n sum=0;\n\t if(cd)\n\t {\n \n\t for(i=d;im2){\n\t\t\tk=m1;\n\t\t\tm1=m2;\n\t\t\tm2=k;\n\t\t}\n\t\ttotal=0;\n\tfor( j = m1;j < m2; j++){\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t{\n\t\t\ttotal += 31;\t\n\t\t}\n\t\telse if (j == 4 || j ==6 || j == 9 || j==11)\n\t\t{\n\t\t\ttotal += 30;\n\t\t} \n\t\telse if(j == 2){\n\t\t\tif(year%4==0&&year%100!=0||year%400==0){\n\t\t\t\ttotal += 29;\n\t\t\t} \n\t\t\telse {\n\t\t\t\ttotal += 28;\n\t\t\t}\t\n\t\t}\n\t}\n\t\n\tif(total%7==0){\n\t\tprintf(\"YES\\n\");\n\t}\n\telse{\n\t printf(\"NO\\n\");\n\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35459", "code": "int main()\n{\n int i, n, k, t, j, m;\n int a[13], b[13];\n a[1]=b[1]=0;\n a[2]=b[2]=31;\n a[3]=b[3]=59;\n a[4]=b[4]=90;\n a[5]=b[5]=120;\n a[6]=b[6]=151;\n a[7]=b[7]=181;\n a[8]=b[8]=212;\n a[9]=b[9]=243;\n a[10]=b[10]=273;\n a[11]=b[11]=304;\n a[12]=b[12]=334;\n scanf(\"%d\", &n);\n for(i=1;i<=n;i++)\n {\n scanf(\"%d%d%d\", &k, &t, &j);\n if(t2&&j>2)\n {\n if((a[t]-b[j])%7==0)\n {\n printf(\"YES\\n\");\n }\n else\n {\n printf(\"NO\\n\");\n }\n }\n else if(t<=2&&j>2||j<=2&&t>2)\n {\n\t\t\t//\tprintf(\"%d %d \", t ,j);\n if((b[t]-a[j]+1)%7==0)\n {\n printf(\"YES\\n\");\n }\n else\n {\n printf(\"NO\\n\");\n }\n } \n else\n {\n printf(\"NO\\n\");\n }\n }\n } \n return 0;\n}\n"} +{"label": "71", "index": "35460", "code": "int main()\n{\n\tint n,i;\n\tint year,month1,month2;\n\tint day(int year,int month);\n\tscanf(\"%d\\n\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d%d\",&year,&month1,&month2);\n\t\tif((day(year,month1)-day(year,month2))%7==0){printf(\"YES\\n\");}\n\t\telse{printf(\"NO\\n\");}\n\t}\n\t\n\treturn 0;\n\n}\nint day(int year,int month)\n{\n\tint days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint i,c;\n\tif(year%4==0&&(year%100!=0)||(year%400==0)){days[2]++;}\n\tc=0;\n\tfor(i=1;i> n;\n\tfor(i = 1; i <= n; i++)\n\t{\n\t\tcin >> year >> month1 >> month2;\n day = 0;\n\t\tif (month1 > month2)\n\t\t{\n\t\t\tt = month1;\n\t\t\tmonth1 = month2;\n\t\t\tmonth2 = t;\n\t\t}\n\t\tif(year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n\t\t{\n\t\t\tfor (j = month1; j < month2; j++)\n\t\t\t{\n\t\t\t\tday = day + rmonth[j];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n for (j = month1; j < month2; j++)\n\t\t\t{\n\t\t\t\tday = day + month[j];\n\t\t\t}\n\t\t}\n\t\tif(day % 7 == 0)\n\t\t{\n\t\t\tcout << \"YES\" << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout << \"NO\" << endl;\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "71", "index": "35462", "code": "int main()\n{\nint n,year,leap,i,m,d,re,q,s;\nscanf(\"%d\",&n);\nfor(int j=0;jd)\n{s=m;\nm=d;\nd=s;}\nif(year%4==0)\n{ if(year%100==0)\n{ if(year%400==0)\n leap=1;\n else leap=0;}\n else leap=1;}\n else leap=0;\n if(leap==1)\n\t\t\t {int month[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n \n for(int k=m;k> n;\n\tfor ( int i = 1; i <= n; i ++ ) {\n\tint year, month1, month2;\n\tint sum = 0;\n\tcin >> year >> month1 >> month2;\n\tint m1[12] ={ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\n\tint m2[12] ={ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\n\tif ( month1 > month2 ) swap( month1, month2 );\n\tfor ( int i = month1; i <= month2 - 1; i ++ ) {\n\t\tif ( year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ) {\n\t\t\tsum += m2[i - 1];\n\t\t}\n\t\telse sum += m1[i - 1];\n\t}\n\tif ( sum % 7 == 0 ) cout << \"YES\" << endl;\n\telse cout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35464", "code": "\nint MM[13]={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\nvoid YY(int x)\n{\n\tif(x % 400 == 0 || (x % 4 == 0 && x % 100 != 0))\n\t{\n\t\tMM[2] = 29;\n\t\treturn;\n\t}\n\tMM[2] = 28;\n}\n\nint main()\n{\n\tint n, yy, m1, m2, i, s;\n\tcin >> n;\n\twhile(n--)\n\t{\n\t\tcin >> yy >> m1 >> m2;\n\t\ts = 0;\n\t\tYY(yy);\n\t\tif(m1 > m2)\n\t\t{\n\t\t\tm1 = m1 ^ m2;\n\t\t\tm2 = m1 ^ m2;\n\t\t\tm1 = m1 ^ m2;\n\t\t}\n\t\tfor(i = m1;i < m2;i++)\n\t\t\ts += MM[i];\n\t\tif(s % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35465", "code": "int main()\n{\n\tint n,i,j,y[200],m1[200],m2[200],d;\n\tint d1[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint d2[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d\",&n);\n\tfor(i=0;i>n;\n\twhile(n>0)\n\t{\n\t\tcin>>y>>m1>>m2;\n\t\tif(m1>m2){k=m1;m1=m2;m2=k;}\n\t\tif(y%4!=0||((y%100==0)&&((y%400)!=0)))\n\t\t\t{for(i=m1;ib)\n\t\t\t{\n\t\t\t\tfor(j=0;jb)\n\t\t\t{\n\t\t\t\tfor(j=0;jq)\nc=c-q;\nelse\nc=q-c;\nif(c%7==0)\nprintf(\"YES\\n\");\nelse\nprintf(\"NO\\n\");}\n}\n"} +{"label": "71", "index": "35469", "code": "\nint main()\n{\n\tint n, y, year, month1, month2, i, j, m;\n\tscanf (\"%d\",&n);\n\tfor (j=0; j>n;\n\twhile(n--)\n\t{\n\t\tcount1=count2=0;\n\t\tcin>>year>>month1>>month2;\n\t\tfor(i=1;i2)\n\t\t\tif((year%400==0)||((year%100!=0)&&(year%4==0)))\n\t\t\t\tcount1++;\n\t\tfor(i=1;i2)\n\t\t\tif((year%400==0)||((year%100!=0)&&(year%4==0)))\n\t\t\t\tcount2++;\n\t\tif((count1-count2)%7==0)\n\t\t\tcout<<\"YES\"<c)\n {int t;t=b;b=c;c=t;}\n e=c-b;\n int f=0;\n int j;\n if(d==1)\n A[1]=29;\n for(j=0;jm2){\nfor(j=m2;j>n;\n\tfor(int i=0;i>nian>>yue1>>yue2;\n\t\tif(yue1>yue2){\n\t\t\tint temp;\n\t\t\ttemp=yue1;\n\t\t\tyue1=yue2;\n\t\t\tyue2=temp;\n\t\t}\n\t\tif(runnian(nian)==0){\n\t\t\tfor(int j=yue1-1;j>n; //???? n=????\n\tfor(i=0;i>year>>a>>b;\n\t\tif((year%4==0 && year%100!=0) || year%400==0) \n\t\t\tm[1]=29;\n\t\telse \n\t\t\tm[1]=28; //???? ????2???\n\n\t\tif(a>b)\n\t\t{\n\t\t\tfor(j=b-1;j>n;\n int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n while(n>0)\n {\n cin>>x>>y>>z;\n if((x%4==0&&x%100!=0)||x%400==0)\n { if(y>n;\n for(i=1;i<=n;i++)\n {\n cin>>a[i]>>b[i]>>c[i];\n if(b[i]>c[i])\n {\n w=b[i];\n b[i]=c[i];\n c[i]=w;\n }\n y[i]=0;\n }\n for(i=1;i<=n;i++)\n {\n if(b[i]==c[i]){y[i]=0;}\n else{if((a[i]%4==0&&a[i]%100!=0)||(a[i]%400==0))\n {\n for(k=b[i];k<=c[i]-1;k++)\n {\n y[i]=y[i]+t[k];\n }\n } \n else{\n for(k=b[i];k<=c[i]-1;k++)\n {\n y[i]=y[i]+q[k];\n } \n } } \n }\n for(i=1;i<=n-1;i++)\n {\n if(y[i]%7==0)\n {\n cout<<\"YES\"<>z;\n return 0;\n}\n"} +{"label": "71", "index": "35480", "code": "int main()\n{\nint n,i,y,a,b,j,p,f,e;\nscanf(\"%d\",&n);\nfor(i=0;ib)\n{\n\te=a;\n\ta=b;\n\tb=e;\n}\nif((y%4==0&&y%100!=0)||(y%400==0))\n{\np=0;\nf=0;\nfor(j=a;jsum2&&(sum1-sum2)%7==0||sum1>n;\n\tint month[201][3];\n\tint day1[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint day2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tint i,j;\n\tfor(i=0;i>month[i][j];\n\t\t}\n\t}\n\tint sum1;\n\tint sum2;\n\tfor(i=0;i> n;\n\tfor ( i = 1; i <= n; i ++ )\n\t{\n\t\tcin >> a >> b >> c;\n\t\tif ( b > c )\n\t\t{\n\t\t\tx = b;\n\t\t\tb = c;\n\t\t\tc = x;\n\t\t}\n\t\tif ( ( a % 400 == 0 ) || ( a % 100 != 0 && a % 4 == 0 ) )\n\t\t{\n\t\t\tfor ( ; b < c; b ++ )\n\t\t\t{\n\t\t\t\tif ( b == 2 )\n\t\t\t\t\tsum = sum + 29;\n\t\t\t\telse if ( b == 4 || b == 6 || b == 9 || b == 11 )\n\t\t\t\t\tsum = sum + 30;\n\t\t\t\t else sum = sum + 31;\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tfor ( ; b < c; b ++ )\n\t\t\t{\n\t\t\t\tif ( b == 2 )\n\t\t\t\t\tsum = sum + 28;\n\t\t\t\telse if ( b == 4 || b == 6 || b == 9 || b == 11 )\n\t\t\t\t\tsum = sum + 30;\n\t\t\t\t else sum = sum + 31;\n\t\t\t}\n\n\t\t}\n\t\tif ( sum % 7 == 0 )\n\t\t\tcout << \"YES\" << endl;\n\t\telse cout << \"NO\" << endl;\n\t\tsum = 0;\n\t\tx = 0;\n\t\ta = 0; b = 0; c = 0;\n\t}\n\treturn 0;\n}\n"} +{"label": "71", "index": "35485", "code": "/*\n * month.cpp\n *\n * Created on: 2010-12-25\n * Author: ???\n * Function: ???\n */\nint day1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//????????\nint day2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//???????\nint bissextile(int year){//???????????????1?????0\n\tif(year%400==0||(year%4==0&&year%100!=0)) return 1;\n\telse return 0;\n}\nint relative(int month1,int month2,int year){\n\tint days=0;\n\tif(bissextile(year))//??????????????????\n\t\tfor(int i=month1;i>n;\n\tfor(int i=0;i>year>>month1>>month2;\n\t\tif(month1month2) relation=relative(month2,month1,year);\n\t\telse relation=1;\n\t\tif(relation) cout<<\"YES\"<> n; //??n\n\tfor ( i = 1; i <= n; i ++) //?n??????????\n\t{\n\t\twhile (cin >> a >> b >> c) //??a,b,c?????????\n\t\t{\n\t\tif (a % 4 == 0 && a % 100 != 0 || a % 400 == 0) //???????\n\t\tp = 1;\n\t\telse p = 0;\n\t\t\tif ( b < c )\n\t\t\t{\tt = b, b = c, c = t;} //??b,c???????????\n\t\t\tint s = 0;\n\t\t\t\tfor ( i = c; i < b; i ++) //?b,c?????????????\n\t\t\t\t{ \n\t\t\t\t\tif ( i == 1 || i == 3 || i == 5 //???????????????\n\t\t\t\t\t\t|| i == 7 || i == 8 || i == 10 \n\t\t\t\t\t\t|| i == 12)\n\t\t\t\t\t\tq = 31;\n\t\t\t\t\tif ( i == 4 || i == 6 || i == 9 || i == 11)\n\t\t\t\t\t\tq = 30;\n\t\t\t\t\tif ( i == 2 && p == 0)\n\t\t\t\t\t\tq = 28;\n\t\t\t\t\tif ( i == 2 && p == 1)\n\t\t\t\t\t\tq = 29;\n\t\t\t\t\ts = s + q ; //s??????????\n\t\t\t\t}\n\t\t\t\tif ( s % 7 == 0) //?????7??????\n\t\t\t\t\tcout << \"YES\"<month2)\n\t\t{\n\t\t\tbegin=month2;\n\t\t\tend=month1;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tbegin=month1;\n\t\t\tend=month2;\n\t\t}\n\n\n\n sum=0;\n\t\tfor (j=begin;jq)\n\t\t\t {\n\t\t\t\t for(b=q;bq)\n\t\t\t {\n\t\t\t\t for(c=q;cd)\n\t\t{\n\t\t\tt=m;\n\t\t\tm=d;\n\t\t\td=t;\n\n\t\t}\n\t\tif(((y%4==0)&&(y%100!=0))||(y%400==0))\n\t\t{\n\t\t\tk=b[d-1]-b[m-1];\n\t\t\tk=k%7;\n\t\t\tif(k==0)\n\t\t\t\tc[i]=1;\n\t\t\telse\n\t\t\t\tc[i]=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\tk=a[d-1]-a[m-1];\n\t\t\tk=k%7;\n\t\t\tif(k==0)\n\t\t\t\tc[i]=1;\n\t\t\telse\n\t\t\t\tc[i]=0;\n\t\t}\n\t}\n\tfor(i=0;ic){\n\t d=b;\n\t b=c;\n\t c=d;\n }\n for(i=b;im2)\n\t\t\t{\n\t\t\t\ttotal=0;\n\t\t\t for(j=m2;jm2)\n\t\t\t{\n\t\t\t\ttotal=0;\n\t\t\t for(j=m2;jd[i]){\n\t\t\tfor(j=d[i];j> n;\nfor(i = 0; i < n; i++)\n{\ncin >> year >> mo1 >> mo2;\nspecialY = 0;\nday = 0;\nif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\nspecialY = 1;\nif(mo1 > mo2)\n{\ntemp = mo1;\nmo1 = mo2;\nmo2 = temp;\n}\nfor(j = mo1; j < mo2; j++)\n{\nswitch(j)\n{\n\tcase 1:\n\tcase 3:\n\tcase 5:\n\tcase 7:\n\tcase 8:\n\tcase 10:\n\tcase 12: dayinMonth = 31; break;\n\tcase 2: if (specialY == 1) dayinMonth = 29;\n\t\t else dayinMonth = 28; break;\n\tcase 4:\n\tcase 6:\n\tcase 9:\n\tcase 11: dayinMonth = 30; break;\n\tdefault:;\n}\nday += dayinMonth;\n}\nif(day % 7 == 0)\ncout << \"YES\" << endl;\nelse cout << \"NO\" << endl;\n}\nreturn 0;\n}"} +{"label": "71", "index": "35497", "code": "int main(int argc, char* argv[])\n{\n int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint n,y,m1,m2;\n\tscanf(\"%d\",&n);\n\tint i;\n\tint j,count=0;\n\tfor(i=0;i> n;\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tsum = 0;\n\t\tcin >> year >> mon1 >> mon2;\n\t\tc = (mon1 > mon2 ? mon2 : mon1);\n\t\td = (mon1 > mon2 ? mon1 : mon2);\n\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n\t\t{\n\t\t\tfor (int j = c; j < d; j++)\n\t\t\t{\n\t\t\t\tsum = sum + Lyear[j - 1];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int k = c; k < d; k++)\n\t\t\t{\n\t\t\t\tsum = sum + Oyear[k - 1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sum % 7 == 0)\n\t\t\tcout << \"YES\" << endl;\n\t\telse\n\t\t\tcout << \"NO\" << endl;\n\t}\n\n\treturn 0;\n\n}"} +{"label": "72", "index": "35500", "code": "//????\nint main()\n{\n\tint a[20][20],m,n,i,j;\n\tcin>>m>>n;\n\tfor (i=0;i>a[i][j];\n\t\t}\n\t}\n\tfor (i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])//?????\n\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i+1][j])\t\t\t\t\n\t\t\t\tcout<=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\tcout<=1&&j<=n-2&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])//?????\n\t\t\t\tcout<=1&&j<=n-2&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\tcout<=1&&i<=m-2&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\tcout<=1&&i<=m-2&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\tcout<=1&&i<=m-2&&j>=1&&j<=n-2&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])//?????\n\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\nprintf(\"%d %d\\n\",i-1,j-1);\n}\n\n"} +{"label": "72", "index": "35502", "code": "/*\n * 4.cpp\n *\n * Created on: 2011-1-9\n * Author: jsgl\n */\nint main(){\n\tint m,n;\n\tcin>>m>>n;\n\tconst int mm=m+2,nn=n+2;\n\tint a[mm][nn],i,j;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<=m+1;i++){\n\t\ta[i][n+1]=0;\n\t\ta[i][0]=0;\n\t}\n\tfor(j=0;j<=n+1;j++){\n\t\ta[0][j]=0;\n\t\ta[m+1][j]=0;\n\t}\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif(a[i][j]>m>>n;\n int a[m+2][n+2];\n for(int i=1;i<=m;i++)\n {\n for(int j=1;j<=n;j++)\n cin>>a[i][j];\n }\n for(int i=0;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n cout<>m>>n;//?????\n\tint i,j;//????\n\tint a[20][20];//????????\n\tfor(i=0;i>a[i][j];\n\n\tif(a[0][0]>=a[0][1]&&a[0][0]>=a[1][0])//?????\n\t\tcout<<\"0 0\"<=a[0][i-1]&&a[0][i]>=a[0][i+1]&&a[0][i]>=a[1][i])\n\t\t\tcout<<0<<\" \"<=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n\t\tcout<<0<<\" \"<=a[i-1][0]&&a[i][0]>=a[i][1]&&a[i][0]>=a[i+1][0])\n\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\tcout<=a[i-1][n-1]&&a[i][n-1]>=a[i][n-2]&&a[i][n-1]>=a[i+1][n-1])\n\t\t\tcout<=a[m-2][0]&&a[m-1][0]>=a[m-1][1])//?m???\n\t\tcout<=a[m-1][i-1]&&a[m-1][i]>=a[m-2][i]&&a[m-1][i]>=a[m-1][i+1])\n\t\t\tcout<=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2])\n\t\tcout<> m >> n;\n\tfor ( i = 1; i < m + 1; i++ )\n\t\tfor ( j = 1; j < n + 1; j++ )\n\t\t\tcin >> h[ i ][ j ];\n\n\n\tfor ( i = 1; i < m + 1; i++ )\n\t\tfor ( j = 1; j < n + 1; j++ )\n\t\t{\n\t\t\tif ( h[ i ][ j ] >= h[ i+ 1][ j ] \n\t\t\t\t&& h[ i ][j] >= h[ i - 1][ j ]&&\n\t\t\t\th[i][j] >= h[i][j+1] &&\n\t\t\t\th[ i ][ j ] >= h[ i][ j - 1 ] )\n\t\t\t{\n\t\t\tcout << i -1 << \" \" << j - 1 << endl;\n\t\t\t}\n\t\t}\n\n\n}\n\t\t\n\n\t\t\n\n"} +{"label": "72", "index": "35506", "code": "int m,n,a[25][25];\nvoid f(int x,int y)\n{\n\tif(x=0 && a[x][y]>=a[x-1][y])||x-1<0)\n\t\t\td++;\n\t\tif((x+1=a[x+1][y]) || x+1>=m)\n\t\t\td++;\n\t\tif((y-1>=0 && a[x][y]>=a[x][y-1]) || y-1<0)\n\t\t\td++;\n\t\tif((y+1=a[x][y+1]) || y+1>=n)\n\t\t\td++;\n\t\tif(d==4)\n\t\t\tcout << x <<\" \" << y << endl;\n\t\tif(y+1> m >> n;\n\tint i=0,j=0;\n\tfor(i=0;i> a[i][j];}}\n\tf(0,0);\n\treturn 0;\n}"} +{"label": "72", "index": "35507", "code": "int main()\n{\n\tint m,n,a[40][40];\n\tcin>>m>>n;\n\tfor(int i=0;i<=m+1;i++)\n\t\tfor(int j=0;j<=n+1;j++)\n\t\t\ta[i][j]=0;\n\tfor(int i=1;i>a[i][j];\n\tfor(int i=1;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tcout<=s[i+1][j]&&s[i][j]>=s[i-1][j]&&s[i][j]>=s[i][j-1]&&s[i][j]>=s[i][j+1])\n\t\t\t printf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "72", "index": "35509", "code": "\nint main(int argc, char* argv[])\n{\n\tint m,n,sz[22][22],i,j,p,q;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n \n\treturn 0;\n}\n"} +{"label": "72", "index": "35510", "code": "\nint main()\n{\n\tint m, n;\n\tcin >> m >> n;\n\tint mount[22][22];\n\tint i, j;\n\tfor(i = 0; i <= m + 1; i++)\n\t{\n\t\tfor(j = 0; j <= n + 1; j++)\n\t\t{\n\t\t\tif(i == 0 || i == m + 1 || j == 0 || j == n + 1)\n\t\t\t\tmount[i][j] = 0;\n\t\t\telse\n\t\t\t\tcin >> mount[i][j];\n\t\t}\n\t}\n\tfor(i = 1; i <= m; i++)\n\t{\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tif(mount[i][j] >= mount[i - 1][j] && mount[i][j] >= mount[i + 1][j]\n\t\t\t\t&& mount[i][j] >= mount[i][j + 1] && mount[i][j] >= mount[i][j - 1])\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35511", "code": "int main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tint i,j,a[22][22]={0},b[21][21]={0};\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)cin>>a[i][j];\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i][j-1] )\n\t\t\t\tb[i-1][j-1]=2;\n\n\t\t}\n\t}\n\tfor(i=0;i>m;\n cin>>n;\n for(j=0;j>a[j][i];\n }\n }\n for(j=0;j=a[1][0]&&a[0][0]>=a[0][1])\n cout<=a[0][i-1]&&a[0][i]>=a[0][i+1]&&a[0][i]>=a[1][i])\n cout<=a[1][n-1]&&a[0][n-1]>=a[0][n-2])\n cout<0&&j=a[j+1][0]&&a[j][0]>=a[j][1]&&a[j][0]>=a[j-1][0])\n cout<=a[j][i-1]&&a[j][i]>=a[j][i+1]&&a[j][i]>=a[j-1][i]&&a[j][i]>=a[j+1][i])\n cout<=a[j+1][n-1]&&a[j][n-1]>=a[j-1][n-1]&&a[j][n-1]>=a[j][n-2])\n cout<=a[j][1]&&a[j][0]>=a[j-1][0])\n cout<=a[j][i-1]&&a[j][i]>=a[j][i+1]&&a[j][i]>=a[j-1][i])\n cout<=a[j-1][n-1]&&a[j][n-1]>=a[j][n-2])\n cout<=0 && hei[i-1][j]>hei[i][j]){top[i][j]=0;}\n else if(i+1<=m-1 && hei[i+1][j]>hei[i][j]){top[i][j]=0;}\n else if(j+1<=n-1 && hei[i][j+1]>hei[i][j]){top[i][j]=0;}\n else if(j-1>=0 && hei[i][j-1]>hei[i][j]){top[i][j]=0;}\n }\n }\n \n for(i=0;i=a[i+1][j])&&(a[i][j]>=a[i][j+1])) printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1])) printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(j==0)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1])) printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1])) printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "72", "index": "35515", "code": "int main()\n{\n\tint m,n,i,j,a[100][100],x[100],y[100],p=0,k;\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(j=0;j<=n+1;j++)\n\t{\n\t\ta[0][j]=a[1][j];\n\t}\n\tfor(j=0;j<=n+1;j++)\n\t{\n\t\ta[m+1][j]=a[m][j];\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][0]=a[i][1];\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][n+1]=a[i][n];\n\t}\n\t/*for(i=0;i<=m+1;i++)\n\t{\n\t\tfor(j=0;j<=n+1;j++)\n\t\t{\n\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tx[p]=i;\n\t\t\t\ty[p]=j;\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<=p-2;j++)\n\t{\n\t\tfor(i=0;i<=p-2-j;i++)\n\t\t{\n\t\t\tif(x[i]>x[i+1]||x[i]==x[i+1]&&y[i]>y[i+1])\n\t\t\t{\n\t\t\t\tk=x[i];\n\t\t\t\tx[i]=x[i+1];\n\t\t\t\tx[i+1]=k;\n\t\t\t\tk=y[i];\n\t\t\t\ty[i]=y[i+1];\n\t\t\t\ty[i+1]=k;\n\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<=p-1;i++)\n\t{\n\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse if(j==0&&i!=0)\n\t{if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse if(i==0&&j==0)\n\t{if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse if(i==m-1&&j==n-1)\n\t{if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse if(i==m-1&&j!=n-1)\n\t{if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse if(i!=m-1&&j==n-1)\n\t{if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\tprintf(\"%d %d\\n\",i,j);}\n\telse{\n\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\tprintf(\"%d %d\\n\",i,j);}\n}\n\n\nvoid main()\n{\n\tint m,n,i,j,a[20][20]={0};\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=array[i+1][j]&&array[i][j]>=array[i][j+1]){\n\t\t\t\t\tprintf(\"0 0\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j!=0&&j!=n-1){\n\t\t\t\tif(array[i][j]>=array[i][j-1]&&array[i][j]>=array[i][j+1]&&array[i][j]>=array[i+1][j]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j==n-1){\n\t\t\t\tif(array[i][j]>=array[i][j-1]&&array[i][j]>=array[i+1][j]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&i!=m-1&&j==0){\n\t\t\t\tif(array[i][j]>=array[i-1][j]&&array[i][j]>=array[i+1][j]&&array[i][j]>=array[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&j!=0&&i!=m-1&&j!=n-1){\n\t\t\t\tif(array[i][j]>=array[i-1][j]&&array[i][j]>=array[i+1][j]&&array[i][j]>=array[i][j-1]&&array[i][j]>=array[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&i!=m-1&&j==n-1){\n\t\t\t\tif(array[i][j]>=array[i][j-1]&&array[i][j]>=array[i+1][j]&&array[i][j]>=array[i-1][j]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j==0){\n\t\t\t\tif(array[i][j]>=array[i-1][j]&&array[i][j]>=array[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j!=0&&j!=n-1){\n\t\t\t\tif(array[i][j]>=array[i-1][j]&&array[i][j]>=array[i][j-1]&&array[i][j]>=array[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j==n-1){\n\t\t\t\tif(array[i][j]>=array[i-1][j]&&array[i][j]>=array[i][j-1]){\n\t\t\t\t\tprintf(\"%d %d\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35518", "code": "main()\n{\n\tint m,n,i,j,moun[30][30]={0};\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i=*(*(moun+i-1)+j)\n\t\t\t\t&&*(*(moun+i)+j)>=*(*(moun+i+1)+j)\n\t\t\t\t&&*(*(moun+i)+j)>=*(*(moun+i)+j-1)\n\t\t\t\t&&*(*(moun+i)+j)>=*(*(moun+i)+j+1)\n )\n\t\t\t printf(\"%d %d\\n\",i-1,j-1);\n\treturn 0;\n}"} +{"label": "72", "index": "35519", "code": "int main() {\n int m,n,i,j;\n int sz[20][20];\n scanf(\"%d %d\",&m,&n);\n for(i=0;i0&&i0&&j=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]) {\n printf(\"%d %d\\n\",i,j); \n }\n if(i==0&&j==0&&sz[0][0]>=sz[0][1]&&sz[0][0]>=sz[1][0]) {\n printf(\"%d %d\\n\",i,j);\n }\n if(i==0&&j==n-1&&sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1]) {\n printf(\"%d %d\\n\",i,j); \n }\n if(i==m-1&&j==0&&sz[m-1][0]>=sz[m-1][1]&&sz[m-1][0]>=sz[m-2][0]) {\n printf(\"%d %d\\n\",i,j); \n }\n if(i==m-1&&j==n-1&&sz[m-1][n-1]>=sz[m-1][n-2]&&sz[m-1][n-1]>=sz[m-2][n-1]) {\n printf(\"%d %d\\n\",i,j); \n } \n if((i==0&&j>0&&j=sz[i+1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1])||(i==m-1&&j>0&&j=sz[i-1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1])||(j==0&&i>0&&i=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j])||(j==n-1&&i>0&&i=sz[i][j-1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j])) {\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\nreturn 0;\n}\n\n\n\n \n\n \n\n \n"} +{"label": "72", "index": "35520", "code": "int main()\n{\n\tint m,n,i,j;\n\tint altitude[21][21]={0};\n\tcin >>m>>n;\n\tfor (i=0;i>altitude[i][j];\n\t\t}\n\t}\n\ti=0;\n\tif ((altitude[0][0]>=altitude[0][1])&&(altitude[0][0]>=altitude[1][0]))\n\t\tcout <<\"0 0\"<=altitude[i][j-1])&&(altitude[i][j]>=altitude[i][j+1])&&(altitude[i][j]>=altitude[i+1][j]))\n\t\t\tcout <=altitude[i-1][j])&&(altitude[i][j]>=altitude[i][j+1])&&(altitude[i][j]>=altitude[i+1][j]))\n\t\t\t\t\tcout <0)\n\t\t\t{\n\t\t\t\tif ((altitude[i][j]>=altitude[i-1][j])&&(altitude[i][j]>=altitude[i][j-1])&&(altitude[i][j]>=altitude[i][j+1])&&(altitude[i][j]>=altitude[i+1][j]))\n\t\t\t\t\tcout <=a[i-1][j]) && (a[i][j]>=a[i+1][j]) && (a[i][j]>=a[i][j-1]) && (a[i][j]>=a[i][j+1]))\n printf( \"%d %d\\n\",i-1,j-1 );\n }\n }\n}\n"} +{"label": "72", "index": "35522", "code": "int main ()\n{\n int a[100][100],b[100][100];\n int i,j,k,l,m,n;\n cin >>m>>n;\n for (i=0;i>a[i][j];\n }\n if (a[0][0]>=a[0][1]&&a[0][0]>=a[1][0])\n cout <<0 <<' '<<0 <=a[0][i-1]&&a[0][i]>=a[0][i+1]&&a[0][i]>=a[1][i])\n cout <<0 <<' '<=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n cout <<0 <<' '<=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1])\n cout <=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n cout <=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]&&a[i][n-1]>=a[i][n-2])\n cout <=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n cout <=a[m-1][i-1]&&a[m-1][i]>=a[m-1][i+1]&&a[m-1][i]>=a[m-2][i])\n cout <=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])\n cout <=a[i+1][j]&&a[i][j]>=a[i][j+1])||(i==0&&j==n-1&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])||(i==m-1&&j==n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n||(i==m-1&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])||(i==0&&j0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])||(i==m-1&&j0&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])||\n(j==0&&i0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])||(j==n-1&&i0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n||(j0&&i0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])){\n printf(\"%d %d\\n\",i,j);\n }\n }\n}\n return 0;\n}\n\n\n"} +{"label": "72", "index": "35524", "code": "int main(){\n int j=0,k=0,m=0,n=0,i=0;\n scanf(\"%d%d\",&m,&n);\n int dk[20][20];\n for(i=0;i=dk[i][j+1]&&dk[i][j]>=dk[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(j==n-1){\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else{\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i+1][j]&&dk[i][j]>=dk[i][j+1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n }else if(i==m-1){\n if(j==0){\n if(dk[i][j]>=dk[i][j+1]&&dk[i][j]>=dk[i-1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(j==n-1){\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i-1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else{\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i-1][j]&&dk[i][j]>=dk[i][j+1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n }else{\n if(j==0){\n if(dk[i][j]>=dk[i][j+1]&&dk[i][j]>=dk[i-1][j]&&dk[i][j]>=dk[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(j==n-1){\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i-1][j]&&dk[i][j]>=dk[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else{\n if(dk[i][j]>=dk[i][j-1]&&dk[i][j]>=dk[i-1][j]&&dk[i][j]>=dk[i][j+1]&&dk[i][j]>=dk[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n }\n }\n return 0;\n}"} +{"label": "72", "index": "35525", "code": "int main()\n{\n\tint m, n, h[22][22], i, j;\n\n\tcin >> m >> n;\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcin >> h[i][j];\n\t\n\tfor (i = 0; i <= m + 1; i++)\n\t\th[i][0] = h[i][n + 1] = 0;\n\tfor (j = 1; j <= n; j++)\n\t\th[0][j] = h[m + 1][j] = 0;\n\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (h[i][j] >= h[i - 1][j] && h[i][j] >= h[i + 1][j]\n\t\t\t\t&& h[i][j] >= h[i][j - 1] && h[i][j] >= h[i][j + 1])\n\t\t\t\tcout << i - 1 << ' ' << j - 1 << endl;\n\t\t}\n\n\treturn 0;\n}"} +{"label": "72", "index": "35526", "code": "int main()\n{\n\tint m,n;\n\tint a[22][22]={0},b[22][22]={0};\n\tint i,j;\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(b[i][j]=b[i+1][j+1])\n\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}return 0;\n}\n"} +{"label": "72", "index": "35528", "code": "void main()\n{\n\tint m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tint a[22][22];\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t\tfor(j=1;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n}\n"} +{"label": "72", "index": "35529", "code": "int main(){\n\tint m,n,tmp,array[20][20],i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=0;i=array[i-1][j]))\n\t\t\t\ttmp++;\n\t\t\tif ((j==0)||(array[i][j]>=array[i][j-1]))\n\t\t\t\ttmp++;\n\t\t\tif ((i==m-1)||(array[i][j]>=array[i+1][j]))\n\t\t\t\ttmp++;\n\t\t\tif ((j==n-1)||(array[i][j]>=array[i][j+1]))\n\t\t\t\ttmp++;\n\t\t\tif (tmp==4)\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35530", "code": "int main()\n{\n\tint m, n, i, j, a[100][100] = {0};\n\tcin >> m >> n;\n\tfor(i = 0;i < m;i++)\n\t\tfor(j = 0;j < n;j++)\n\t\t\tcin >> a[i][j];\n\tfor(i = 0;i < m;i++)\n\t\tfor(j = 0;j < n;j++)\n\t\t{\n\t\t\tif(i == 0)\n\t\t\t{\n if(a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\t\t cout <= a[i+1][j] && a[i][j] >= a[i-1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t\t cout <= a[i+1][j] && a[i][j] >= a[i-1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\t cout << i <<' '<>m>>n;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>s[i][j];\n\t\t}\n\t}\n\tfor(k=1;k<=m;k++)\n\t{\n\t\tfor(l=1;l<=n;l++)\n\t\t{\n\t\t\tif( (s[k][l]>=s[k-1][l]) && (s[k][l]>=s[k][l-1]) && (s[k][l]>=s[k+1][l]) && (s[k][l]>=s[k][l+1]) )\n\t\t\t{\n\t\t\t\tcout<=a[0][1])&&(a[0][0]>=a[1][0]))\n printf(\"0 0\\n\");\n for(j=1;j=a[0][j-1])&&(a[0][j]>=a[0][j+1])&&(a[0][j]>=a[1][j]))\n printf(\"%d %d\\n\",0,j);\n }\n if((a[0][n-1]>=a[0][n-2])&&(a[0][n-1]>=a[1][n-1]))\n printf(\"%d %d\\n\",0,n-1);\n for(i=1;i=a[i][1])&&(a[i][0]>=a[i-1][0])&&(a[i][0]>=a[i+1][0]))\n printf(\"%d %d\\n\",i,0);\n for(j=1;j=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n printf(\"%d %d\\n\",i,j);\n }\n if((a[i][n-1]>=a[i][n-2])&&(a[i][n-1]>=a[i-1][n-1])&&(a[i][n-1]>=a[i+1][n-1]))\n printf(\"%d %d\\n\",i,n-1);\n }\n if((a[m-1][0]>=a[m-1][1])&&(a[m-1][0]>=a[m-2][0]))\n printf(\"%d %d\\n\",m-1,0);\n for(j=1;j=a[m-1][j-1])&&(a[m-1][j]>=a[m-1][j+1])&&(a[m-1][j]>=a[m-2][j]))\n printf(\"%d %d\\n\",m-1,j);\n }\n if((a[m-1][n-1]>=a[m-1][n-2])&&(a[m-1][n-1]>=a[m-2][n-1]))\n printf(\"%d %d\\n\",m-1,n-1);\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35533", "code": "main()\n{\n\tint m,n,i,j,a[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i>m>>n;\n\tfor(i=0;i>a[i][j];\n for(i=1;i<=m;i++)\n\t for(j=1;j<=n;j++)\n\t if(a[i][j]>=a[i-1][j]\n\t &&a[i][j]>=a[i+1][j]\n\t &&a[i][j]>=a[i][j-1]\n\t &&a[i][j]>=a[i][j+1])\n\t {\n \t\th[k]=i-1;g[k]=j-1;\n \t\tk=k+1;\n \t\t} \n s=k;\n for(k=0;kh[i])\n {t=h[k];h[k]=h[i];h[i]=t;\n\t\t\t\t p=g[k];g[k]=g[i];g[i]=p;}\n\t\t\t\t if(h[k]==h[i])\n\t\t\t\t {\n \t\t\t\t\t if(g[k]>g[i])\n \t\t\t\t\t {t=g[k];g[k]=g[i];g[i]=t;}\n \t\t\t\t\t }\n\t\t for(k=0;k>m>>n;\n\tfor (int i=0;i<22;i++)\n\t{//??????????\n\t for (int j=0;j<22;j++)\n\t\t a[i][j]=0;\n\t}\n\tfor (int i=1;i<=m;i++)\n\t{//??????\n\t for (int j=1;j<=n;j++)\n\t\t cin>>a[i][j];\n\t cout<=sz[0][1]&&sz[i][j]>=sz[1][0]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(i==0&&j==q){\n if(sz[i][j]>=sz[0][d]&&sz[i][j]>=sz[1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(i==p&&j==0){\n if(sz[i][j]>=sz[i][1]&&sz[i][j]>=sz[b][0]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(i==p&&j==q){\n if(sz[i][j]>=sz[i][d]&&sz[i][j]>=sz[b][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(i==0&&j>0&&j=sz[i][c]&&sz[i][j]>=sz[i][d]&&sz[i][j]>=sz[1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(i==p&&j>0&&j=sz[i][c]&&sz[i][j]>=sz[i][d]&&sz[i][j]>=sz[b][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(j==0&&i>0&&i=sz[a][j]&&sz[i][j]>=sz[b][j]&&sz[i][j]>=sz[i][1]){\n printf(\"%d %d\\n\",i,j);\n }\n }else if(j==q&&i>0&&i=sz[a][j]&&sz[i][j]>=sz[b][j]&&sz[i][j]>=sz[i][d]){\n printf(\"%d %d\\n\",i,j);\n }\n }else{\n if(sz[i][j]>=sz[i][c]&&sz[i][j]>=sz[i][d]&&sz[i][j]>=sz[a][j]&&sz[i][j]>=sz[b][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n\n }\n }\nreturn 0;\n}"} +{"label": "72", "index": "35537", "code": "\nint main(int argc, char* argv[])\n{\n static int a[30][30],b[400][2];\n int i,j,k=0,m,n;\n scanf(\"%d%d\",&m,&n);\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n {b[k][0]=i-1;b[k][1]=j-1;k++;}\n }\n }\n for(i=0;i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])return 1;\n return 0;\n}\nint main()\n{\n\tint i,j;\n\tcin>>m>>n;\n\tfor(i=0;i<22;i++)\n\t\tfor(j=0;j<22;j++)\n\t\t\ta[i][j]=0;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++){\n\t\t\tcin>>a[i][j];\n\t\t}\n\tfor(i=1;i<=m;i++)\n\t\t\tfor(j=1;j<=n;j++){\n\t\t\t if(panduan(i,j)!=0)\n\t\t\t {\n\t\t\t\t cout<=a[x-1][y])&&\n(a[x][y]>=a[x+1][y])&&\n(a[x][y]>=a[x][y-1])&&\n(a[x][y]>=a[x][y+1]))return(1);\nelse return(0);}\n\nvoid main(){\nint i,j,m,n,a[22][22]={0,0};\nscanf(\"%d%d\",&m,&n);\nfor(i=1;i<=m;i++)\nfor(j=1;j<=n;j++)\nscanf(\"%d\",&a[i][j]);\nfor(i=1;i<=m;i++)\nfor(j=1;j<=n;j++)\nif(max(a,i,j))printf(\"%d %d\\n\",i-1,j-1);}"} +{"label": "72", "index": "35541", "code": "// xunzhaoshanding.cpp : Defines the entry point for the console application.\n//\n\n\n\nint main()\n{\n\tint m = 0;\n\tint n = 0;\n\tint high[21][21] = {0};\n\tint i = 0;\n\tint t = 0;\n\n\tcin >> m;\n\tcin >> n;\n\n\tfor( i = 1;i <= m;i++ )\n\t\tfor( t = 1;t <= n;t++ )\n\t\t{\n\t\t\tcin >> high[i][t];\n\t\t}\n\n\tfor( i = 1;i <= m;i++ )\n\t\tfor( t = 1;t <= n;t++ )\n\t\t{\n\t\t\tif( high[i][t] >= high[i - 1][t] && high[i][t] >= high[i + 1][t] && high[i][t] >= high[i][t + 1] && high[i][t] >= high[i][t - 1] )\n\t\t\t\tcout << i - 1 << \" \" << t - 1 << endl;\n\t\t}\n\n\tcin >> i;\n\n\treturn 0;\n}\n"} +{"label": "72", "index": "35542", "code": "int main() {\n\tint m, n, k = 0;\n\tint a[30][30] = { 0 };\n\tint b[410][2] = { 0 };\n\tcin >> m >> n;\n\tfor (int i = 1; i <= m; i++) {\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (int i = 1; i <= m; i++) {\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j]\n\t\t\t\t\t>= a[i][j + 1] && a[i][j] >= a[i][j - 1]) {\n\t\t\t\tb[k][0] = i;\n\t\t\t\tb[k][1] = j;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i = 0; i < k; i++)\n\t\tcout << b[i][0] - 1 << ' ' << b[i][1] - 1 << endl;\n\treturn 0;\n}"} +{"label": "72", "index": "35543", "code": "int main(){\nint N=1000;\nint m,n;\nscanf(\"%d %d\\n\",&m,&n);\nint sz[m+2][n+2];\nfor(int i=1;i<=m+2;i++){\nfor(int t=1;t<=n+2;t++){sz[i-1][t-1]=0;}\n}\n\nfor(int i=1;i<=m;i++){\nfor(int t=1;t<=n;t++){scanf(\"%d\",&sz[i][t]);}\n}\n\nint a[N][2];\nint x=0;\n\nfor(int i=1;i<=m;i++){\nfor(int t=1;t<=n;t++){\nif(sz[i][t]>=sz[i-1][t]&&sz[i][t]>=sz[i][t-1]&&sz[i][t]>=sz[i+1][t]&&sz[i][t]>=sz[i][t+1]){a[x][0]=i-1;a[x][1]=t-1;x++;}\n}\n}\n\nfor(int i=1;i=sz[i][k+1]&&sz[i][k]>=sz[i][k-1]&&sz[i][k]>=sz[i+1][k]&&sz[i][k]>=sz[i-1][k]){ \n mm[q]=i-1;\n nn[q]=k-1;\n q++;\n }\n }\n }\n for(i=0;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n}"} +{"label": "72", "index": "35547", "code": "int main()\n{\n\tint m,n,i,j;\n\tscanf(\"%d %d\",&m,&n);\n\tint h[22][22],a[22][22];\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t\tscanf(\"%d\",&h[i][j]);\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\th[i][0]=0;\n\t\th[i][n+1]=0;\n\t}\n\tfor(j=0;j<=n+1;j++)\n\t{\n\t\th[0][j]=0;\n\t\th[m+1][j]=0;\n\t}\n\t\n\t\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(h[i][j]>=h[i-1][j]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\n\t}\n\treturn 0;\n\n\n}"} +{"label": "72", "index": "35548", "code": "int main(){\n\tint sz[20][20];\n\tint m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(int j=0;j=sz[i-1][t])&&(sz[i][t]>=sz[i+1][t])&&(sz[i][t]>=sz[i][t-1])&&(sz[i][t]>=sz[i][t+1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((i==0)&&(t==0)){\n\t\t\t\tif((sz[0][0]>=sz[0][1])&&(sz[0][0]>=sz[1][0])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((i==0)&&(t==n-1)){\n\t\t\t\tif((sz[0][n-1]>=sz[0][n-2])&&(sz[0][n-1]>=sz[1][n-1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((i==m-1)&&(t==0)){\n\t\t\t\tif((sz[m-1][0]>=sz[m-2][0])&&(sz[m-1][0]>=sz[m-1][1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((i==m-1)&&(t==n-1)){\n\t\t\t\tif((sz[m-1][n-1]>=sz[m-1][n-2])&&(sz[m-1][n-1]>=sz[m-2][n-1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==0){\n\t\t\t\tif((sz[i][t]>=sz[i+1][t])&&(sz[i][t]>=sz[i][t-1])&&(sz[i][t]>=sz[i][t+1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==m-1){\n\t\t\t\tif((sz[i][t]>=sz[i-1][t])&&(sz[i][t]>=sz[i][t-1])&&(sz[i][t]>=sz[i][t+1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(t==0){\n\t\t\t\tif((sz[i][t]>=sz[i-1][t])&&(sz[i][t]>=sz[i+1][t])&&(sz[i][t]>=sz[i][t+1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(t==n-1){\n\t\t\t\tif((sz[i][t]>=sz[i-1][t])&&(sz[i][t]>=sz[i+1][t])&&(sz[i][t]>=sz[i][t-1])){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35549", "code": "\nint main ()\n{\n\tint m, n, a[21][21] = { 0} , i , j , k = 0 , dis[2][21] = { 0 };\n\tcin >> m >> n;\n\tfor( i = 0 ; i < m; i++)\n\t{\n\t\tfor( j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor( i = 0 ; i < m; i++)\n\t{\n\t\tfor( j = 0 ; j < n; j++)\n\t\t{\n\t\t\tif( i == 0 && j != 0 && j!= n-1)\n\t\t\t{\n\t\t\t\tif (( a[i][j] >= a[i][j-1]) &&( a[i][j] >= a[i][j+1]) && (a[i][j] >= a[i+1][j]))\n\t\t\t\t{\n\t\t\t\tcout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( i == m-1 && j != 0 && j!= n-1)\n\t\t\t{\n\t\t\t\tif ( a[i][j] >= a[i][j-1] && a[i][j] >= a[ i][j+1] && a[i][j] >= a[i-1][j])\n\t\t\t\t{\n cout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( j == 0 && i != 0 && i != m-1)\n\t\t\t{\n\t\t\t\tif( a[i][j]>= a[i-1][j] && a[i][j] >= a[i][j+1] && a[i][j]>=a[i+1][j])\n\t\t\t\t{cout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( j == n-1 && i != 0 && i != m-1)\n\t\t\t{\n\t\t\t\tif( a[i][j]>= a[i-1][j] && a[i][j] >= a[i][j-1] && a[i][j] >=a[ i+1][j])\n\t\t\t\t{\n\t\t\t\tcout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( i == 0 && j == 0)\n\t\t\t{\n\t\t\t\tif( a[i][j] >= a[i][j+1] && a[i][j] >= a[i+1][j])\n\t\t\t\t{\n\t\t\t\tcout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n if( i == 0 && j == n-1)\n\t\t\t{\n\t\t\t\tif( a[ i ] [ j ] >= a[i][j-1] && a[i][j] >= a[ i+1][ j])\n\t\t\t\t{cout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( i == m -1 && j == 0)\n\t\t\t{\n\t\t\t\tif( a [ i ] [ j] >= a[ i-1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{cout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( i == m -1 && j == n -1)\n\t\t\t{\n\t\t\t\tif( a[i][j] >= a[i-1][j] && a[i][j] >= a[i][j-1])\n\t\t\t\t{cout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( i != 0 && i != m-1 && j != 0 && j != n-1)\n\t\t\t{\n\t\t\t\tif( (a[i][j] >= a[i-1][j])&&(a[i][j] >= a[i][j+1])&&(a[i][j]>=a[i][j-1])&&(a[i][j] >= a[i+1][j]))\n\t\t\t\t{\n\t\t\t\tcout << i <<\" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n\t\t\t\n"} +{"label": "72", "index": "35550", "code": "int main()\n{\n\tint n,m,a[300][300]={0},i,j,b=0,k,l;\n\t\n\tscanf(\"%d %d\",&m,&n);\n\tm+=2;\n\tn+=2;\n\n\tfor(i=1;i<(m-1);i++)\n\t{\n\t\tfor(j=1;j<(n-1);j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\t\n\tfor(k=1;k<(m-1);k++)\n\t{\n\t\tfor(l=1;l<(n-1);l++)\n\t\t{\n\t\t\tif(a[k][l]>=a[k+1][l]&&a[k][l]>=a[k][l+1]&&a[k][l]>=a[k-1][l]&&a[k][l]>=a[k][l-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k-1,l-1);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn 0;\n}"} +{"label": "72", "index": "35551", "code": "\nint main()\n{\n int m,n,i,j,judge;\n int a[20][20];\n scanf(\"%d %d\",&m,&n);\n for(i=0;i0)\n judge=judge*(a[i][j]>=a[i-1][j]);\n if(j>0)\n judge=judge*(a[i][j]>=a[i][j-1]);\n if(i=a[i+1][j]);\n if(j=a[i][j+1]);\n if(judge==1)\n printf(\"%d %d\\n\",i,j);\n }\n\n return 0;\n}\n"} +{"label": "72", "index": "35552", "code": "int main()\n{\n\tint i,j,k,t,m,n;\n\tint a[22][22]={0},b[20][20]={0};\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n\n}"} +{"label": "72", "index": "35553", "code": "int main()\n{\n int m,n,i,j,k; \n int up=0,down=0,left=0,right=0; \n int a[22][22]={0};\n scanf(\"%d %d\",&m,&n);\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n scanf(\"%d\",&a[i][j]); \n } \n } \n \n for(i=1;i<=m;i++)\n {\n for (j=1;j<=n;j++)\n {\n up=a[i][j]-a[i-1][j];\n down=a[i][j]-a[i+1][j];\n left=a[i][j]-a[i][j-1];\n right=a[i][j]-a[i][j+1];\n \n if(up>=0 && down>=0 && left>=0 && right>=0)\n {printf(\"%d %d\\n\",i-1,j-1);}\n } \n } \n}\n"} +{"label": "72", "index": "35554", "code": "/*\n * 11.6.cpp\n *\n * Created on: 2011-11-4\n * Author: 11095\n */\n\nint main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tint mout[m][n],i,j;\n\tfor(i=0;i>mout[i][j];\n\t\t}\n\t}\n\n\tint vmt[m+2][n+2]; //?m*n?????????\n\tfor (j=0;j=vmt[i-1][j]&&vmt[i][j]>=vmt[i+1][j]&&vmt[i][j]>=vmt[i][j-1]&&vmt[i][j]>=vmt[i][j+1]){\n\t\t\t\ti--;j--;\n\t\t\t\tcout<=A[i-1][j]&&A[i][j]>=A[i][j-1]&&A[i][j]>=A[i+1][j]&&A[i][j]>=A[i][j+1])\n { printf(\"%d \",i-1);\n printf(\"%d\\n\",j-1); \n }\n }\n }\n \nreturn 0;\n}\n\n"} +{"label": "72", "index": "35556", "code": "int i,j,a[22][22]={0};\nint max(int i,int j);\nvoid main()\n{\n\tint m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t}\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tif(max(i,j)==1)\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n}\nint max(int i,int j)\n{\n\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}"} +{"label": "72", "index": "35557", "code": "int main(){\nint m,n,i,k,t;\nint sz[20][20];\nscanf(\"%d %d\",&m,&n);\nfor(i=0;i=sz[0][1]&&sz[0][0]>=sz[1][0]){\n\t\t\t\tprintf(\"0 0\\n\");\n\t\t\t}else if(k==n-1&&sz[0][n-1]>=sz[1][n-1]&&sz[0][n-2]<=sz[0][n-1]){\n\t\t\t\tprintf(\"0 %d\\n\",n-1);\n\t\t\t}else if(sz[0][k]>=sz[0][k-1]&&sz[0][k]>=sz[0][k+1]&&sz[0][k]>=sz[1][k]){\n\t\t\t\tprintf(\"0 %d\\n\",k);\n\t\t\t}\n\t\t}else if(i==m-1){\n\t\t\tif(k==0&&sz[m-1][0]>=sz[m-1][1]&&sz[m-1][0]>=sz[m-2][0]){\n\t\t\t\tprintf(\"%d 0\\n\",m-1);\n\t\t\t}else if(k==n-1&&sz[m-1][n-1]>=sz[m-2][n-1]&&sz[m-1][n-1]>=sz[m-1][n-2]){\n\t\t\t\tprintf(\"%d %d\\n\",m-1,n-1);\n\t\t\t}else if(sz[m-1][k]>=sz[m-1][k-1]&&sz[m-1][k]>=sz[m-1][k+1]&&sz[m-1][k]>=sz[m-2][k]){\n\t\t\t\tprintf(\"%d %d\\n\",m-1,k);\n\t\t\t}\n\t\t}else if(k==0){\n\t\t\tif(sz[i][0]>=sz[i][1]&&sz[i][0]>=sz[i-1][0]&&sz[i][0]>=sz[i+1][0]){\n\t\t\t\tprintf(\"%d 0\\n\",i);\n\t\t\t}\n\t\t}else if(k==n-1){\n\t\t\tif(sz[i][n-1]>=sz[i][n-2]&&sz[i][n-1]>=sz[i-1][n-1]&&sz[i][n-1]>=sz[i+1][n-1]){\n\t\t\t\tprintf(\"%d %d\\n\",i,n-1);\n\t\t\t}\n\t\t}else{\n\t\t\tif(sz[i][k]>=sz[i][k-1]&&sz[i][k]>=sz[i][k+1]){\n\t\t\t\tif(sz[i][k]>=sz[i-1][k]&&sz[i][k]>=sz[i+1][k]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nreturn 0;\n}\n"} +{"label": "72", "index": "35558", "code": "int main()\n{\n\tint a[20][20], i, j, max, m , n, flag = 1;\n\tcin >> m >> n;\n\tfor(i = 0; i < m; i++)\n\t\tfor(j = 0; j < n; j++)\n\t\t\tcin >> a[i][j];\n\tfor(i = 0; i < m; i++)\n\t{\n\t\tfor(j = 0; j < n; j++)\n\t\t{\n\t\t\tflag = 1;\n\t\t\tif(j - 1 >= 0)\n\t\t\t\tif(a[i][j] < a[i][j - 1])\n\t\t\t\t\tflag = 0;\n\t\t\tif(i - 1 >= 0)\n\t\t\t\tif(a[i][j] < a[i - 1][j])\n\t\t\t\t\tflag = 0;\n\t\t\tif(j + 1 < n)\n\t\t\t\tif(a[i][j] < a[i][j + 1])\n\t\t\t\t\tflag = 0;\n\t\t\tif(i + 1 < m)\n\t\t\t\tif(a[i][j] < a[i + 1][j])\n\t\t\t\t\tflag = 0;\n\t\t\tif(flag == 1)\n\t\t\t\tcout << i << ' ' << j << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35559", "code": "int main()\n{\n\tint m, n, i, j, a[22][22] = {0};\n cin >> m >> n;\n\tfor (i = 1; i <= m; i++)\n\t{\n\t\tfor (j = 1; j <= n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (i = 1; i <= m; i++)\n\t{\n\t\tfor (j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j])\n\t\t\t\tcout << i - 1 << ' ' << j - 1 << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35560", "code": "int main(){\nint m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n int a[m+2][n+2];\n for(i=1;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n return 0;\n}\n "} +{"label": "72", "index": "35561", "code": "\nint main()\n{\n\tint m,n,i,j,hill[20][20],ave;\n\tcin>>m>>n;\n\tfor(i=0;i>hill[i][j];\n\tfor(i=0;i=hill[i-1][j])\n\t\t\t\tif(i==m-1||hill[i][j]>=hill[i+1][j])\n\t\t\t\t\tif(j==0||hill[i][j]>=hill[i][j-1])\n\t\t\t\t\t\tif(j==n-1||hill[i][j]>=hill[i][j+1])\n\t\t\t\t\t\t\tcout<=height[i1-1][i2] && height[i1][i2]>=height[i1+1][i2] && height[i1][i2]>=height[i1][i2-1] && height[i1][i2]>=height[i1][i2+1]) {\n printf(\"%d %d\\n\", i1-1, i2-1);\n }\n else continue;\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35563", "code": "int main(){\n int m, n;\n scanf(\"%d %d\",&m, &n);\n int a=m+2;\n int b=n+2;\n int sz[a][b];\n for(int i=0;i=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1]){\n int c=i-1;\n int d=j-1;\n printf(\"%d %d\\n\",c, d);\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35564", "code": "\nint main(){\n\tint m,n;\n\tcin>>m>>n;\n\tint high[21][21];\n\tint i,j;\n\tfor(i=0;i>high[i][j];\n\tfor(i=0;i=high[i][j+1]&&high[i][j]>=high[i+1][j])\n\t\t\t\t\tcout<=high[i+1][j]&&high[i][j]>=high[i][j-1])\n\t\t\t\t\tcout<=high[i-1][j]&&high[i][j]>=high[i][j-1])\n\t\t\t\t\tcout<=high[i-1][j]&&high[i][j]>=high[i][j+1])\n\t\t\t\t\tcout<0&&j=high[i+1][j]&&high[i][j]>=high[i][j-1]&&high[i][j]>=high[i][j+1])\n\t\t\t\t\tcout<0&&j=high[i-1][j]&&high[i][j]>=high[i][j-1]&&high[i][j]>=high[i][j+1])\n\t\t\t\t\tcout<0&&i=high[i+1][j]&&high[i][j]>=high[i-1][j]&&high[i][j]>=high[i][j+1])\n\t\t\t\t\tcout<0&&i=high[i+1][j]&&high[i][j]>=high[i-1][j]&&high[i][j]>=high[i][j-1])\n\t\t\t\t\tcout<=high[i+1][j]&&high[i][j]>=high[i-1][j]&&high[i][j]>=high[i][j-1]&&high[i][j]>=high[i][j+1])\n\t\t\t\t\tcout<=sz[i-1][a]&&sz[i][a]>=sz[i+1][a]&&sz[i][a]>=sz[i][a+1]&&sz[i][a]>=sz[i][a-1]){\n printf(\"%d \",i-1);\n printf(\"%d\\n\",a-1);\n }\n }\n } \n return 0; \n}\n\n\n"} +{"label": "72", "index": "35566", "code": "\nint main(int argc, char* argv[])\n{\n\tint a[MAX+1][MAX+1]={0};\n\tint m,n,i,j;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35567", "code": "int main()\n{\n\tint num[20][21]={0},*p=&num[0][0],m,n,i,k,flag=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=num[0][1]&&num[0][0]>=num[1][0])\n\t{\n\t\tprintf(\"0 0\");\n\t\tflag=1;\n\t}\n\tfor(k=1;k=*(p+k+1)&&*(p+k)>=*(p+k-1)&&*(p+k)>=*(p+21+k))\n\t\t{\n\t\t\tif(flag)printf(\"\\n\");\n\t\t\tprintf(\"0 %d\",k);\n\t\t\tflag=1;\n\t\t}\n\n\t}\n\tfor(i=1;i=*(p+21*i+k+1)&&*(p+21*i+k)>=*(p+21*i+k-1)&&*(p+21*i+k)>=*(p+21*(i-1)+k)&&*(p+21*i+k)>=*(p+21*(i+1)+k))\n\t\t\t{\n\t\t\t\tif(flag)printf(\"\\n\");\n\t\t\t\tprintf(\"%d %d\",i,k);\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(k=0;k=*(p+(m-1)*21+k+1)&&*(p+(m-1)*21+k)>=*(p+(m-1)*21+k-1)&&*(p+(m-1)*21+k)>=*(p+(m-2)*21+k))\n\t\t{\n\t\t\tif(flag)printf(\"\\n\");\n\t\t\tprintf(\"%d %d\",m-1,k);\n\t\t\tflag=1;\n\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35568", "code": "int main()\n{\n\tint n,q,i,j,a[30][30],m;\n\tint (*b)[30];\n\tb=a;\n\tcin>>n>>m;\n\tfor(i=0;i<=n+1;i++)\n\t{\n\t\tfor(j=0;j<=m+1;j++)\n\t\t{\n\t\t\t*(*(b+i)+j)=0;\n\t\t}\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=m;j++)\n\t\t{\n\t\t\tcin>>*(*(b+i)+j);\n\t\t}\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=m;j++)\n\t\t{\n\t\t\tif(*(*(b+i)+j)>=*(*(b+i+1)+j)&&*(*(b+i)+j)>=*(*(b+i-1)+j)&&*(*(b+i)+j)>=*(*(b+i)+j-1)&&*(*(b+i)+j)>=*(*(b+i)+j+1))\n\t\t\t{\n\t\t\t\tcout<>q;\n return 0;\n}\n"} +{"label": "72", "index": "35569", "code": "\n\nint main()\n{\n\tint m,n;\n\tcin >> m >> n;\n\tint i,j;\n\tint a[25][25];\n\tfor(i = 0; i < 25; i ++)\n\t{\n\t\tfor(j = 0;j < 25;j ++)\n\t\t{\n\t\t\ta[i][j] = 0;\n\t\t}\n\t}\n\n\tfor(i = 1; i < m + 1; i ++)\n\t{\n\t\tfor(j = 1; j < n + 1; j ++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\n\tfor(i = 1; i < m + 1; i ++)\n\t{\n\t\tfor(j = 1; j < n + 1; j ++)\n\t\t{\n\t\t\tif( a[i][j] >= a[i-1][j] && a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t{\n\t\t\t\tcout<< i - 1 << \" \" << j - 1 <> m >> n;\n\tint i,j;\n\tint height[22][22] = {0};//??????????\n\tfor (i = 1;i <= m;i++)//???????0?????????\n\t\tfor (j = 1;j <= n;j++)\n\t\t\tcin >> height[i][j];\n\tint count = 0;//??????????????\n\tfor (i = 1;i <= m;i++)\n\t\tfor (j = 1;j <= n;j++)\n\t\t\tif (height[i][j] >= height[i - 1][j] && height[i][j] >= height[i + 1][j] &&\n\t\t\t\theight[i][j] >= height[i][j + 1] && height[i][j] >= height[i][j - 1])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\tfor (i = 1;i <= m;i++)\n\t\tfor (j = 1;j <= n;j++)\n\t\t\tif (height[i][j] >= height[i - 1][j] && height[i][j] >= height[i + 1][j] &&\n\t\t\t\theight[i][j] >= height[i][j + 1] && height[i][j] >= height[i][j - 1])\n\t\t\t{\n\t\t\t\tcount--;\n\t\t\t\tcout << i - 1 << \" \" << j - 1;\n\t\t\t\tif (count != 0)\n\t\t\t\t\tcout<=sz[i][j+1]&&sz[i][j]>=sz[i+1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==0&&j!=0&&j!=n-1)\n {\n if(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i+1][j])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==0&&j==n-1)\n {\n if(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n\n }\n else if (i!=m-1&&j==n-1&&i!=0)\n {\n if(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if (i==m-1&&j==n-1)\n {\n if(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==m-1&&j!=n-1&&j!=0)\n {\n if(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==m-1&&j==0)\n {\n if(sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j])\n {\n\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i!=0&&j==0&&i!=m-1)\n {\n if(sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j+1])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35572", "code": "int main(){\n int m,n,i,j,k,a,b=0;\n int gao[1000][1000],din[1000][1000];\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=gao[k][a-1]&&gao[k][a]>=gao[k][a+1]||a==0&&gao[k][a]>=gao[k][a+1])&&(k!=0&&gao[k][a]>=gao[k-1][a]&&gao[k][a]>=gao[k+1][a]||k==0&&gao[k][a]>=gao[k+1][a])){\n din[b][0]=k;\n din[b][1]=a;\n b++; \n }else{\n continue;\n }\n }\n }\n \n for(int c=0;c=a[d-1][j]&&a[d][j]>=a[d+1][j]&&a[d][j]>=a[d][j-1]&&a[d][j]>=a[d][j+1]){\n x=d-1;y=j-1;\n printf(\"%d %d\\n\", x, y);\n }\n }\n }\n return 0;\n}\n\n\n"} +{"label": "72", "index": "35574", "code": "int main ()\n{\n\tint a[30][30]={0},m=0,n=0;\n\tcin >> m >> n;\n\tfor (int i=0;i> a[i][j];\n\tfor (int i=0;i=1&&a[i-1][j]>a[i][j]) continue;\n\t\t\tif (ia[i][j]) continue;\n\t\t\tif (j>=1&&a[i][j-1]>a[i][j]) continue;\n\t\t\tif (ja[i][j]) continue;\n\t\t\tcout <=high[i][k-1]&&high[i][k]>=high[i][k+1]&&high[i][k]>=high[i-1][k]&&high[i][k]>=high[i+1][k]){\n printf(\"%d %d\\n\",i,k);\n }\n }\n else if(i==0&&k==0){\n if(high[i][k]>=high[i][k+1]&&high[i][k]>=high[i+1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(i==0&&k==w-1){\n if(high[i][k]>=high[i+1][k]&&high[i][k]>=high[i][k-1]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(i==l-1&&k==0){\n if(high[i][k]>=high[i][k+1]&&high[i][k]>=high[i-1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(i==l-1&&k==w-1){\n if(high[i][k]>=high[i-1][k]&&high[i][k]>=high[i][k-1]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(i==0&&k!=0&&k!=w-1){\n if(high[i][k]>=high[i][k+1]&&high[i][k]>=high[i][k-1]&&high[i][k]>=high[i+1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(i==l-1&&k!=0&&k!=w-1){\n if(high[i][k]>=high[i][k+1]&&high[i][k]>=high[i][k-1]&&high[i][k]>=high[i-1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(k==0&&i!=0&&i!=l-1){\n if(high[i][k]>=high[i][k+1]&&high[i][k]>=high[i+1][k]&&high[i][k]>=high[i-1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n else if(k==w-1&&i!=0&&i!=l-1){\n if(high[i][k]>=high[i][k-1]&&high[i][k]>=high[i+1][k]&&high[i][k]>=high[i-1][k]){ printf(\"%d %d\\n\",i,k);}\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35576", "code": "int main()\n{\n\tint m,n; cin>>m>>n;\n\tint a[m+2][n+2]; int i,j;\n\tfor (i=0;i>a[i][j];\n\tfor (i=1;i<=m;i++)\n\t\tfor (j=1;j<=n;j++)\n\t\t\tif (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\tcout<=x[1][0])&&(x[0][0]>=x[0][1])){\nprintf(\"%d %d\\n\",0,0);}\nfor(int i=1;i=x[1][i])&&(x[0][i]>=x[0][i-1])&&(x[0][i]>=x[0][i+1])){\nprintf(\"%d %d\\n\",0,i);}\n}\nif((x[0][n-1]>=x[1][n-1])&&(x[0][n-1]>=x[0][n-2])){\nprintf(\"%d %d\\n\",0,n-1);}\n\nfor(int j=1;j=x[j+1][0])&&(x[j][0]>=x[j][1])&&(x[j][0]>=x[j-1][0])){\nprintf(\"%d %d\\n\",j,0);}\nfor(int k=1;k=x[j+1][k])&&(x[j][k]>=x[j][k-1])&&(x[j][k]>=x[j][k+1])&&(x[j][k]>=x[j-1][k])){\nprintf(\"%d %d\\n\",j,k); }\n}\nif((x[j][n-1]>=x[j+1][n-1])&&(x[j][n-1]>=x[j][n-2])&&(x[j][n-1]>=x[j-1][n-1])){\nprintf(\"%d %d\\n\",j,n-1);}\n}\n\n\n\nif((x[m-1][0]>=x[m-2][0])&&(x[m-1][0]>=x[m-1][1])){\nprintf(\"%d %d\\n\",m-1,0);}\nfor(int i=1;i=x[m-2][i])&&(x[m-1][i]>=x[m-1][i-1])&&(x[m-1][i]>=x[m-1][i+1])){\nprintf(\"%d %d\\n\",m-1,i);}\n}\nif((x[m-1][n-1]>=x[m-2][n-1])&&(x[m-1][n-1]>=x[m-1][n-2])){\nprintf(\"%d %d\\n\",m-1,n-1);}\n\nreturn 0;\n}\n\n\n"} +{"label": "72", "index": "35578", "code": "int due(int high[22][22],int i,int j)\n{\n\tint z=1;\n\tif(high[i][j]>=high[i][j-1]&&high[i][j]>=high[i][j+1]&&high[i][j]>=high[i+1][j]&&high[i][j]>=high[i-1][j])\n\t\tz=0;\n\treturn(z);\n}\nint main()\n{\n\tint i,j,n,m,high[22][22];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&high[i][j]);\n\t\t}\n\t}\n\tfor(j=0;j<=n+1;j++) high[0][j]=0;\n\tfor(i=0;i<=m+1;i++) high[i][0]=0;\n\tfor(j=0;j<=n+1;j++) high[m+1][j]=0;\n\tfor(i=0;i<=m+1;i++) high[i][n+1]=0;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(due(high,i,j)==0)\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n}\n\n"} +{"label": "72", "index": "35579", "code": "int main(){\n\tint m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tint shan[m+2][n+2];\n for(int i=0;i<=m+1;i++){\n\t\tfor(int j=0;j<=n+1;j++){\n\t\t\tshan[i][j]=0;\n\t\t}\n\t}\n\tfor(int i=1;i<=m;i++){\n\t\tfor(int j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",&shan[i][j]);\n\t\t}\n\t}\n\tfor(int i=1;i<=m;i++){\n\t\tfor(int j=1;j<=n;j++){\n\t\t\tif((shan[i][j]>=shan[i-1][j])&&(shan[i][j]>=shan[i][j-1])&&(shan[i][j]>=shan[i+1][j])&&(shan[i][j]>=shan[i][j+1])){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n\n}"} +{"label": "72", "index": "35580", "code": "\n\nint peak(int a[MAX][MAX],int i,int j)\n{\n\tif(a[i][j]>=a[i-1][j]\n\t\t&&a[i][j]>=a[i+1][j]\n\t\t&&a[i][j]>=a[i][j-1]\n\t\t&&a[i][j]>=a[i][j+1])\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nvoid main()\n{\n\tint a[MAX][MAX],m,n,i,j;\n\tfor(i=0;i=sz[row+1][col]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row==0&&col==n-1){\n\t\t\t\tif(sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row==m-1&&col==0){\n\t\t\t\tif(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row==m-1&&col==n-1){\n\t\t\t\tif(sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row-1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row==0){\n\t\t\t\tif(sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row==m-1){\n\t\t\t\tif(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\t printf(\"%d %d\\n\",row,col);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\telse if(col==0){\n\t\t\t\tif(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(col==n-1){\n\t\t\t\tif(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if(row!=0&&row!=m-1&&col!=0&&col!=n-1){\n\t\t\tif(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){\n\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}\n\t\t }\n\t\t\t}\n\t\t}\n\t\n \t\n return 0;\n}"} +{"label": "72", "index": "35583", "code": "int main()\n{int m=0,n=0;int a[21][21]={0};int i=0,j=0;\ncin>>m>>n;\nfor(i=1;i<=m;i++)\n\tfor(j=1;j<=n;j++)\n\t\tcin>>a[i][j];\nfor(i=1;i<=m;i++)\n\tfor(j=1;j<=n;j++)\n\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\tcout<=a[i-1][j]) && (a[i][j]>=a[i][j-1]) && (a[i][j]>=a[i+1][j]) && (a[i][j]>=a[i][j+1]) )\n printf(\"%d %d\\n\",i-1,j-1);\n }\n getchar();\n}\n"} +{"label": "72", "index": "35586", "code": "int main(){\n int a[101][101]={0};\n int x,y,h=0,i,m,n;\n scanf(\"%d%d\",&m,&n);\n for(x=1;x=a[x][y-1]&&a[x][y]>=a[x][y+1]&&a[x][y]>=a[x+1][y]&&a[x][y]>=a[x-1][y]){\n printf(\"%d %d\\n\",x-1,y-1);\n }\n }\n }\n return 0;\n}"} +{"label": "72", "index": "35587", "code": "int main()\n{\nint a[20][20];\nint m,n,i,j;\nscanf(\"%d%d\",&m,&n);\nfor(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n else if(i==0&&j!=(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\nelse if(i==0&&j==(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(j==0&&i!=(m-1)&&i!=0&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(j==0&&i==(m-1)&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(i!=0&&i!=(m-1)&&j==(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(i==(m-1)&&j!=0&&j!=(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(i==(m-1)&&j==(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);\nelse if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n}}\nreturn 0;\n}"} +{"label": "72", "index": "35588", "code": "\nint main()\n{\n\tint com(int a[][100],int x,int y);\n\tint m,n,b;\n\tint a[100][100]={0},i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nint com(int a[][100],int x,int y)\n{\n\tint b=0;\n\tif(x==0)\n\t{\n\t\tif(y==0)\n\t\t{\n\t\t\tif(a[x][y]>=a[x+1][y]&&a[x][y]>=a[x][y+1])\n\t\t\t\tb=1;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(a[x][y]>=a[x+1][y]&&a[x][y]>=a[x][y+1]&&a[x][y]>=a[x][y-1])\n\t\t\t\tb=1;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(y==0)\n\t\t{\n\t\t\tif(a[x][y]>=a[x+1][y]&&a[x][y]>=a[x][y+1]&&a[x][y]>=a[x-1][y])\n\t\t\t\tb=1;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(a[x][y]>=a[x-1][y]&&a[x][y]>=a[x+1][y]&&a[x][y]>=a[x][y+1]&&a[x][y]>=a[x][y-1])\n\t\t\t\tb=1;\n\t\t}\n\t}\n\treturn(b);\n}\n\n\n\n\n\n\n"} +{"label": "72", "index": "35589", "code": "int main(int argc, char* argv[])\n{\n\tint m,n,i,j;\n\tint high[80][80];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=high[0][1])&&(high[0][0]>=high[1][0]))\n\t\tprintf(\"%d %d\\n\",i,j);\n\tfor(j=1;j=high[0][j-1])&&(high[0][j]>=high[0][j+1])&&(high[0][j]>=high[1][j]))\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t}\n\tj=n-1;\n\tif ((high[0][j]>high[0][j-1])&&(high[0][j]>=high[1][j]))\n\t\tprintf(\"%d %d\\n\",i,j);\n\n\t//????\n\tfor(i=1;i<=m-2;i++)\n\t{\n\t\tj=0;\n\t\t\n\t\tif((high[i][0]>=high[i][1])&&(high[i][0]>=high[i+1][0])&&(high[i][0]>=high[i-1][0]))\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\n\t\tfor(j=1;j=high[i][j-1])&&(high[i][j]>=high[i][j+1])&&(high[i][j]>=high[i-1][j])&&(high[i][j]>=high[i+1][j]))\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t}\n\t\tj=n-1;\n\t\t\n\t\t\tif ((high[i][j]>high[i][j-1])&&(high[i][j]>=high[i-1][j])&&(high[i][j]>=high[i+1][j]))\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\n\t\t\n\t}\n\n\t//????\n\ti=m-1;\n\tj=0;\n\tif((high[i][0]>=high[i][1])&&(high[i][0]>=high[i-1][0]))\n\t\tprintf(\"%d %d\\n\",i,j);\n\tfor(j=1;j<=n-2;j++)\n\t{\n\t\tif((high[i][j]>=high[i][j-1])&&(high[i][j]>=high[i][j+1])&&(high[i][j]>=high[i-1][j]))\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t}\n\tj=n-1;\n\tif ((high[i][j]>=high[i][j-1])&&(high[i][j]>=high[i-1][j]))\n\t\tprintf(\"%d %d\\n\",i,j);\n\treturn 0;\n}\n"} +{"label": "72", "index": "35590", "code": "int main(){\n int m,n;\n scanf(\"%d %d\",&m,&n);\n char mtn[m][n];\n for(int i=0;i=mtn[row+1][col]&&mtn[row][col]>=mtn[row][col+1]){printf(\"%d %d\\n\",row,col);}\n else if((row==m-1)&&(col==0)&&(mtn[row][col]>=mtn[row-1][col])&&(mtn[row][col]>=mtn[row][col+1])){printf(\"%d %d\\n\",row,col);}\n else if((row==0)&&(col==n-1)&&(mtn[row][col]>=mtn[row][col-1])&&(mtn[row][col]>=mtn[row+1][col])){printf(\"%d %d\\n\",row,col);} \n else if((row==m-1)&&(col==n-1)&&(mtn[row][col]>=mtn[row-1][col])&&(mtn[row][col]>=mtn[row][col-1])){printf(\"%d %d\\n\",row,col);} \n else if((row==0)&&(mtn[row][col]>=mtn[row][col+1])&&(mtn[row][col]>=mtn[row][col-1])&&(mtn[row][col]>=mtn[row+1][col])){printf(\"%d %d\\n\",row,col);} \n else if((row==m-1)&&(mtn[row][col]>=mtn[row][col-1])&&(mtn[row][col]>=mtn[row][col+1])&&(mtn[row][col]>=mtn[row-1][col])){printf(\"%d %d\\n\",row,col);} \n else if((col==0)&&(row!=m-1)&&(row!=0)&&(mtn[row][col]>=mtn[row-1][col])&&(mtn[row][col]>=mtn[row+1][col])&&(mtn[row][col]>=mtn[row][col+1])){printf(\"%d %d\\n\",row,col);} \n else if((col==n-1)&&(row!=m-1)&&(row!=0)&&(mtn[row][col]>=mtn[row-1][col])&&(mtn[row][col]>=mtn[row+1][col])&&(mtn[row][col]>=mtn[row][col-1])){printf(\"%d %d\\n\",row,col);} \n else if((row!=0)&&(row!=m-1)&&(col!=0)&&(col!=n-1)&&(mtn[row][col]>=mtn[row-1][col])&&(mtn[row][col]>=mtn[row+1][col])&&(mtn[row][col]>=mtn[row][col-1])&&(mtn[row][col]>=mtn[row][col+1])){printf(\"%d %d\\n\",row,col);} \n\n }\n }\nreturn 0;\n\n} \n\n\n"} +{"label": "72", "index": "35591", "code": "int main()\n{\nint sz[255][255];\nint m,n,a,i,j,row,col;\na=0;\nscanf(\"%d %d\",&m,&n);\nfor(row=0;row=0&&sz[i][j]-sz[i][j-1]>=0&&sz[i][j]-sz[i-1][j]>=0&&sz[i][j]-sz[i+1][j]>=0)\n\t\tprintf(\"%d %d\\n\",i,j);\n\t}\n}\n\n\nreturn 0;\n}"} +{"label": "72", "index": "35592", "code": "void find(int s[22][22],int x,int y,int m,int n)\n{\n\tif(x==0&&y==0){\n\t\tif((s[x][y]>=s[x+1][y])&&(s[x][y]>=s[x][y+1]))\n\t\t\tcout<=s[x-1][y])&&(s[x][y]>=s[x][y-1]))\n\t\t\tcout<=s[x][y+1])&&(s[x][y]>=s[x-1][y]))\n\t\t\tcout<=s[x+1][y])&&(s[x][y]>=s[x][y-1]))\n\t\t\tcout<=s[x][y+1])&&(s[x][y]>=s[x][y-1])&&(s[x][y]>=s[x+1][y]))\n\t\t\tcout<=s[x][y+1])&&(s[x][y]>=s[x+1][y])&&(s[x][y]>=s[x-1][y]))\n\t\t\t\t\tcout<=s[x][y+1])&&(s[x][y]>=s[x][y-1])&&(s[x][y]>=s[x-1][y]))\n\t\t\t\t\tcout<=s[x][y-1])&&(s[x][y]>=s[x+1][y])&&(s[x][y]>=s[x-1][y]))\n\t\t\t\t\t\t\tcout<=s[x-1][y])&&(s[x][y]>=s[x+1][y])&&(s[x][y]>=s[x][y-1])&&(s[x][y]>=s[x][y+1]))\n\t\tcout<>m>>n;\n\tint a[22][22];\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i>m>>n;\n int i,j;\n for(i=0;i>height[i][j];\n }\n int judge,piece;\n for(i=0;i=1) { judge+=(height[i][j]>=height[i-1][j]);piece++;}\n\t\t if(i=height[i+1][j]);piece++;}\n\t\t if(j>=1) { judge+=(height[i][j]>=height[i][j-1]); piece++;}\n\t\t if(j=height[i][j+1]);piece++;}\n\t\t if(judge==piece)\n\t\t {\n\t\t\t cout<=sz[c+1][d]&&sz[c][d]>=sz[c][d+1]){\n printf(\"%d %d\\n\",c,d); \n }\n } \n else if(d!=0&&d!=n-1){\n if(sz[c][d]>=sz[c+1][d]&&sz[c][d]>=sz[c][d+1]&&sz[c][d]>=sz[c][d-1]){\n printf(\"%d %d\\n\",c,d); \n }\n }\n else if(d==n-1){\n if(sz[c][d]>=sz[c+1][d]&&sz[c][d]>=sz[c][d-1]){\n printf(\"%d %d\\n\",c,d);\n } \n }\n }\n else if(c!=0&&c!=m-1){\n if(d==0){\n if(sz[c][d]>=sz[c-1][d]&&sz[c][d]>=sz[c][d+1]&&sz[c][d]>=sz[c+1][d]){\n printf(\"%d %d\\n\",c,d); \n } \n }\n else if(d!=0&&d!=n-1){\n if(sz[c][d]>=sz[c+1][d]&&sz[c][d]>=sz[c][d+1]&&sz[c][d]>=sz[c][d-1]&&sz[c][d]>=sz[c-1][d]){\n printf(\"%d %d\\n\",c,d); \n } \n }\n else if(d==n-1){\n if(sz[c][d]>=sz[c+1][d]&&sz[c][d]>=sz[c][d-1]&&sz[c][d]>=sz[c-1][d]){\n printf(\"%d %d\\n\",c,d); \n } \n }\n }\n else if(c==m-1&&d==0){\n if(sz[c][d]>=sz[c-1][d]&&sz[c][d]>=sz[c][d+1]){\n printf(\"%d %d\\n\",c,d); \n\n }\n }\n else if(c==m-1&&d!=n-1){\n if(sz[c][d]>=sz[c][d-1]&&sz[c][d]>=sz[c-1][d]&&sz[c][d]>=sz[c][d+1]){\n printf(\"%d %d\\n\",c,d); \n } \n }\n else if(c==m-1&&d==n-1){\n if(sz[c][d]>=sz[c][d-1]&&sz[c][d]>=sz[c-1][d]){\n printf(\"%d %d\\n\",c,d); \n } \n }\n }\n }\n return 0; \n}"} +{"label": "72", "index": "35595", "code": "int main()\n{\n\tint m=0,n=0,i=0,j=0;\n\tcin>>m>>n;\n\tint a[21][21],sign[21][21]={0};\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=0)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tif(a[i][j]>=a[i-1][j])\n\t\t\t\t\tsum++;\n\t\t\t}\n\t\t\tif(i+1=a[i+1][j])\n\t\t\t\t\tsum++;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(j-1>=0)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tif(a[i][j]>=a[i][j-1])\n\t\t\t\t\tsum++;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(j+1=a[i][j+1])\n\t\t\t\t\tsum++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(sum==k)\n\t\t\t\tsign[i][j]=1;\n\t\t\t\n\t\t}\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j!=n-1&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j==n-1&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i!=m-1&&j==0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i!=m-1&&j==n-1&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j!=n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t\telse if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\", i,j);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35597", "code": "void main()\n{\n\tint m,n;\n\tint h[20][20];\n\tint i,j;\n\tint sign;\n\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i0&&h[i][j]0&&h[i][j]=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1]))\n b[i][j]=-1;\n }\n for (i=1;i<=m;i++)\n for (j=1;j<=n;j++)\n if (b[i][j]==-1) printf(\"%d %d\\n\",i-1,j-1);\n return 0;\n}\n"} +{"label": "72", "index": "35599", "code": "char comp(int point, int up, int down, int left, int right)\n{\n\treturn ((point>=up)&&(point>=down)&&(point>=left)&&(point>=right));\n}\nmain()\n{\n\tint a[22][22],j,k,m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(j=0;j>m>>n;\n int a[20][20];\n for(int i=0;i>a[i][j];\n }\n }\n for(int i=0;i0&&a[i-1][j]<=a[i][j]))\n {\n if(i==m-1||(i0&&a[i][j-1]<=a[i][j]))\n {\n if(j==n-1||(j>m>>n;\n\tfor(i=0;i>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i0&&a[i][j]>=a[i-1][j])||(i==0))\n\t\t\t\tif((i=a[i+1][j])||(i==m-1))\n\t\t\t\t\tif((j>0&&a[i][j]>=a[i][j-1])||(j==0))\n\t\t\t\t\t\tif((j=a[i][j+1])||(j==n-1))\n\t\t\t\t\t\t\tcout<=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35603", "code": "int main()\n{\n\tint m=0,n=0,p=0,a[23][23],i=0,j=0,b[401],c[401];\n\tcin>>m>>n;\n\tfor(j=0;j<=n+1;j++)\n\t{\n\t\ta[0][j]=0;\n\t\ta[m+1][j]=0;\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][0]=0;\n\t\ta[i][n+1]=0;\n\t}\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t\tfor(i=1;i<=m;i++)\n\t\t\tfor(j=1;j<=n;j++)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n { \n\t\t\t\t\tb[p]=i-1;\n\t\t\t\t\tc[p]=j-1;\n\t\t\t\t\tp++;\n }\n\t\t\t}\n\t\t\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]){\n\t\t\t\tb[x][0]=i-1;\n\t\t\t\tb[x][1]=j-1;\n\t\t\t\tx++;\n\t\t\t}\n\n\t\t}\n\t}\n\n\tfor(i=0;i=a[i+1][j]&&a[i+1][j+1]>=a[i][j+1]&&a[i+1][j+1]>=a[i+2][j+1]&&a[i+1][j+1]>=a[i+1][j+2])\n printf(\"%d %d\\n\",i,j);\n getchar();\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35606", "code": "int main()\n{\n\tint m,n,i,j,a[22][22];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(j=0;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "72", "index": "35607", "code": "int main ()\n{\n int a[22][22],b[400][2];\n int n,m,num=0,i=0,j=0;\n scanf(\"%d %d\",&m,&n);\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n scanf(\"%d\",&a[i][j]);\n } \n }\n for(j=0;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]) \n { \n num+=1;\n b[num-1][0]=i-1;\n b[num-1][1]=j-1; \n }\n } \n } \n for(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(i==0&&j==m-1){\n\t\t if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(i==n-1&&j==0){\n\t\t if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(i==n-1&&j==m-1){\n\t\t if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n if(i0&&j==0){\n\t\t if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(i0&&j==m-1){\n\t\t if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(j0&&i==0){\n\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(j0&&i==n-1){\n\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t\t if(j0&&i0){\n\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t }\n\t }\n }\n \n return 0;\n \n}"} +{"label": "72", "index": "35609", "code": "int shan[max][max]={0};\nint main()\n{\n\tint h,l;\n\tcin>>h>>l;\n\tfor(int i=1;i<=h;i++)\n\t\tfor(int j=1;j<=l;j++)\n\t\t\tcin>>shan[i][j];\n\tfor(int i=1;i<=h;i++)\n\t\tfor(int j=1;j<=l;j++)\n\t\t\tif(shan[i][j]>=shan[i-1][j]&&shan[i][j]>=shan[i+1][j]&&shan[i][j]>=shan[i][j-1]&&shan[i][j]>=shan[i][j+1])\n\t\t\t\tcout << i-1 <<\" \"<=sz[k+1][i])&&(sz[k][i]>=sz[k][i+1]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t\t else if(i==n-1)\n\t\t {\n\t\t if((sz[k][i]>=sz[k+1][i])&&(sz[k][i]>=sz[k][i-1]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t\t else\n\t\t {\n\t if((sz[k][i]>=sz[k+1][i])&&(sz[k][i]>=sz[k][i-1])&&(sz[k][i]>=sz[k][i+1]))\n\t\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t\t}\n\t }\n\t\t\n\t }\n\t if((k!=0)&&(k!=m-1))\n\t {\n\t\t \n\t\t \n for(i=0;i=sz[k+1][i])&&(sz[k][i]>=sz[k][i+1])&&(sz[k][i]>=sz[k-1][i]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t\t else if(i==n-1)\n\t\t {\n\t\t if((sz[k][i]>=sz[k+1][i])&&(sz[k][i]>=sz[k][i-1])&&(sz[k][i]>=sz[k-1][i]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t\t else\n\t\t {\n\t if((sz[k][i]>=sz[k-1][i])&&(sz[k][i]>=sz[k+1][i])&&(sz[k][i]>=sz[k][i-1])&&(sz[k][i]>=sz[k][i+1]))\n\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t }\n\t }\n\t if(k==m-1)\n\t {\n\t \n\t\t for(i=0;i=sz[k-1][i])&&(sz[k][i]>=sz[k][i+1]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t }\n\t\t else if(i==n-1)\n\t\t {\n\t\t if((sz[k][i]>=sz[k-1][i])&&(sz[k][i]>=sz[k][i-1]))\n\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t }\n\t\t else\n\t\t {\n\t if((sz[k][i]>=sz[k-1][i])&&(sz[k][i]>=sz[k][i-1])&&(sz[k][i]>=sz[k][i+1]))\n\t\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t\t}\n\t\t }\n\t }\n }\n \n return 0;\n}"} +{"label": "72", "index": "35611", "code": "int main()\n{\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tint x[21][21];\n\tfor(i=0;i>x[i][j];\n\t}\n\tfor(i=0;i=x[0][1])&&(x[0][0]>=x[1][0])) cout<0)&&(x[i][j]>=x[i][j-1])&&(x[i][j]>=x[i+1][j])&&(x[i][j]>=x[i][j+1])) cout<0)&&(x[i][j]>=x[i][j-1])&&(x[i][j]>=x[i][j+1])&&(x[i][j]>=x[i-1][j])) cout<0)&&(i=x[i+1][j])&&(x[i][j]>=x[i][j+1])&&(x[i][j]>=x[i-1][j])) cout<0)&&(i=x[i][j-1])&&(x[i][j]>=x[i-1][j])&&(x[i][j]>=x[i+1][j])) cout<=x[i][j-1])&&(x[i][j]>=x[i+1][j])) cout<=x[i-1][j])&&(x[i][j]>=x[i][j+1])) cout<=x[m-2][n-1])&&(x[m-1][n-1]>=x[m-1][n-2])) cout<=x[i+1][j])&&(x[i][j]>=x[i-1][j])&&(x[i][j]>=x[i][j-1])&&(x[i][j]>=x[i][j+1])) cout<>m>>n;\n for(i=0;i>a[i][j];\n }\n if(a[0][0]>=a[0][1]&&a[0][0]>=a[1][0])\n cout<<\"0 0\"<=a[1][j]&&a[0][j]>=a[0][j-1]&&a[0][j]>=a[0][j+1])\n cout<<\"0 \"<=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n cout<<\"0 \"<=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n {cout<=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n {cout<=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n cout<=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n cout<=a[m-2][j]&&a[m-1][j]>=a[m-1][j-1]&&a[m-1][j]>=a[m-1][j+1])\n cout<=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])\n cout<>m>>n;\nint ma[30][30];\nfor(i=1;i<=m;i++){\n\tfor(j=1;j<=n;j++){\n\t\tcin>>ma[i][j];\n\t}\n}\nfor(j=0;j<=29;j++){\n\tma[0][j]=-1;\n\tma[m+1][j]=-1;\n}\nfor(i=0;i<=29;i++){\n\tma[i][0]=-1;\n\tma[i][n+1]=-1;\n}\n\nfor(i=1;i<=m;i++){\n\tfor(j=1;j<=n;j++){\n\t\tif(ma[i][j]>=ma[i-1][j]&&ma[i][j]>=ma[i+1][j]&&ma[i][j]>=ma[i][j+1]&&ma[i][j]>=ma[i][j-1]){\n\t\t\tcout<=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n return 0;\n}\n \n\n"} +{"label": "72", "index": "35615", "code": "/*\n * ????\n * Created on: 2013-1-13\n * ??\n * Author: ???\n */\nint main() {\n\tint r = 0, c = 0;\n\tcin >> r >> c;\n\tint mountain[r + 2][c + 2];\n\tfor (int i = 0; i < r + 2; i++)\n\t\tfor (int j = 0; j < c + 2; j++) {\n\t\t\tif (i == 0 || j == 0 || i == r + 1 || j == c + 1)\n\t\t\t\tmountain[i][j] = 0;\n\t\t\telse\n\t\t\t\tcin >> mountain[i][j];\n\t\t}\n\tfor (int i = 1; i < r + 1; i++)\n\t\tfor (int j = 1; j < c + 1; j++) {\n\t\t\tif ((mountain[i][j] >= mountain[i - 1][j]) && (mountain[i][j]\n\t\t\t\t\t>= mountain[i + 1][j]) && (mountain[i][j] >= mountain[i][j\n\t\t\t\t\t- 1]) && (mountain[i][j] >= mountain[i][j + 1]))\n\t\t\tcout << i-1 << \" \" << j-1 << endl;\n\t\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35616", "code": "int main()\n{\n\tint n,m,i,j,k,l,sum=0;\n\tcin>>m>>n;\n\tint a[1000][1000];\n\tfor(i=0;i>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i=a[i][j+1] && a[i][j]>=a[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout<0 && i=a[i][j+1] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j+1] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i-1][j] && a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout<=sz[row][col+1]&&sz[row][col]>=sz[row+1][col]){\n a[i]=row;\n b[i]=col;\n i++; \n }\n }\n else if(row==0&&col==n-1){\n if(sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row+1][col]){\n a[i]=row;\n b[i]=col;\n i++; \n }\n }\n else if(row==m-1&&col==0){\n if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col+1]){\n a[i]=row;\n b[i]=col;\n i++; \n }\n }\n else if(row==m-1&&col==n-1){\n if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col-1]){\n a[i]=row;\n b[i]=col;\n i++; \n }\n }\n else if(row==0){\n if(sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){ \n a[i]=row;\n b[i]=col;\n i++; \n }\n }\n else if(row==m-1){\n if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){\n a[i]=row;\n b[i]=col; \n i++; \n }\n }\n else if(col==0){\n if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col+1]){\n a[i]=row;\n b[i]=col; \n i++; \n }\n }\n else if(col==n-1){\n if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]){\n a[i]=row;\n b[i]=col; \n i++; \n }\n }\n else if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]){\n a[i]=row;\n b[i]=col;\n i++; \n }\n \n }\n}\nint k;\nfor( k = 0;k < i; k++ ){\n printf(\"%d %d\\n\",a[k],b[k]);\n}\nreturn 0;\n}"} +{"label": "72", "index": "35618", "code": "int h[20][20];\nint sort(int l,int r)\n{if(l>0)\n{if(h[l-1][r]>h[l][r])\nreturn 0;}\nif(l<19)\n{if(h[l+1][r]>h[l][r])\nreturn 0;}\nif(r>0)\n{if(h[l][r-1]>h[l][r])\nreturn 0;}\nif(r<19)\n{if(h[l][r+1]>h[l][r])\nreturn 0;}\nreturn 1;}\nint main()\n{int m,n,i,j;\nscanf(\"%d %d\",&m,&n);\nfor(i=0;i>m>>n;\n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)\n {\n cin>>a[i][j];\n }\n for(int i=0;i<=m+1;i++) a[i][0]=-1,a[i][n+1]=-1;\n for(int j=1;j<=m;j++) a[0][j]=-1,a[m+1][j]=-1;\n a[0][0]=-2;\n a[0][n+1]=-2;\n a[m+1][0]=-2;\n a[m+1][n+1]=-2;\n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]) cout<=sz1[i-1][j]&&sz1[i][j]>=sz1[i][j-1]&&sz1[i][j]>=sz1[i][j+1]&&sz1[i][j]>=sz1[i+1][j])\n\t\t\t{\n\t\t\tsz2[p]=i;\n\t\t\tsz3[p]=j;\n\t\t\tp++;\n\t\t\t}\n\t\t}\n\t}\nfor(i=0;i<=p-1;i++)\n\t{\n\tprintf(\"%d %d\\n\",sz2[i],sz3[i]);\n\t}\nreturn 0;\n}"} +{"label": "72", "index": "35621", "code": "main()\n{\n int a[20][20],m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);}\n else\n if(j==n-1)\n {if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])printf(\"%d %d\\n\",i,j);}\n else\n {if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);}\n }\n else\n if(i==m-1)\n {\n if(j==0)\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);}\n else\n if(j==n-1)\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])printf(\"%d %d\\n\",i,j);}\n else\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);}\n }\n else\n {\n if(j==0)\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])printf(\"%d %d\\n\",i,j);}\n else\n if(j==n-1)\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])printf(\"%d %d\\n\",i,j);}\n else\n {if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])printf(\"%d %d\\n\",i,j);}\n }\n }\n}\n \n"} +{"label": "72", "index": "35622", "code": "\nint main(){\n\tint m,n,i,j;\n\tcin>>m;\n\tcin>>n;\n\tint a[m][n];\n\tfor(i=0;i<=m-1;i++)\n\t\tfor(j=0;j<=n-1;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<=m-1;i++)\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\t\tif((i!=0)&&(i!=m-1)&&(j!=0)&&(j!=n-1))\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tcout<=a[i+1][j])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i+1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tcout<=A[0][1]&&A[0][0]>=A[1][0])printf(\"0 0\\n\");\nfor(j=1;j=A[0][j-1]&&A[0][j]>=A[1][j]&&A[0][j]>=A[0][j+1])\nprintf(\"0 %d\\n\",j);\n}\nif(A[0][m-1]>=A[0][m-2]&&A[0][m-1]>=A[1][m-1])printf(\"0 %d\\n\",m-1);}\nelse if(i!=0&&i!=n-1){\nif(A[i][0]>=A[i-1][0]&&A[i][0]>=A[i+1][0]&&A[i][0]>=A[i][1])printf(\"%d 0\\n\",i);\nfor(j=1;j=A[i-1][j]&&A[i][j]>=A[i][j-1]&&A[i][j]>=A[i+1][j]&&A[i][j]>=A[i][j+1])\nprintf(\"%d %d\\n\",i,j);\n}\nif(A[i][m-1]>=A[i][m-2]&&A[i][m-1]>=A[i+1][m-1]&&A[i][m-1]>=A[i-1][m-1])printf(\"%d %d\\n\",i,m-1);}\nelse if(i==n-1){\nif(A[n-1][0]>=A[n-2][0]&&A[n-1][0]>=A[n-1][1])printf(\"%d 0\\n\",n-1);\nfor(j=1;j=A[n-2][j]&&A[n-1][j]>=A[n-1][j-1]&&A[n-1][j]>=A[n-1][j+1])\nprintf(\"%d %d\\n\",i,j);}\nif(A[n-1][m-1]>=A[n-1][m-2]&&A[n-1][m-1]>=A[n-2][m-1])printf(\"%d %d\\n\",n-1,m-1);\n\n}\n}\nreturn 0;\n}"} +{"label": "72", "index": "35624", "code": "void main()\n{\n\tint m,n,i,j;\n\tscanf(\"%d %d\",&m,&n);\n\tint a[23][22];\n\tfor(j=0;j<=n;j=j+1)\n\t{\n\t\ta[0][j]=0;\n\t\ta[m+1][j]=0;\n\t}\n\tfor(i=0;i<=m+1;i=i+1)\n\t\ta[i][n+1]=0;\n\n\tfor(i=1;i<=m;i=i+1)\n\t{\n\t\ta[i][0]=0;\n\t\tfor(j=1;j<=n;j=j+1)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t}\n\tfor(i=1;i<=m;i=i+1)\n\t{\n\t\tfor(j=1;j<=n;j=j+1)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n}\n"} +{"label": "72", "index": "35625", "code": "int main()\n{\n \n int m,n,i,j,u;\n cin>>m>>n;\n int a[m+2][n+2];\n for(i=0 ;i>a[i][j];\n for(i=1;i=a[i-1][j])+(a[i][j]>=a[i+1][j])+(a[i][j]>=a[i][j-1])+(a[i][j]>=a[i][j+1])==4)\n cout<=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j!=0&&j!=n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j==n-1)\n\t\t\t{\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(j==0&&i!=0&&i!=m-1)\n\t\t\t{\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n if(j==0&&i==m-1)\n\t\t\t{\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n if(j!=0&&j!=n-1&&i==m-1)\n\t\t\t{\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n \n if(j==n-1&&i==m-1)\n\t\t\t{\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n if(j==n-1&&i!=m-1&&i!=0)\n\t\t\t{\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\t{\n b=i;\n c=j;\n\t\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n if(i!=0&&i!=m-1&&j!=0&&j!=n-1)\n\t\t\t{\n\t\t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tb=i;\n c=j;\n\t\t\t\tprintf(\"%d %d\\n\",b,c);\n\t\t\t}\n\t\t\t} \n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35628", "code": "int main()\n{\n\tint hang,lie;\n\tcin>>hang>>lie;\n\tint a[20][20];\n\tfor (int i1=0;i1>a[i1][j1]; //:????\n\t\t} \n\t}\n\n\tfor (int i=0;i=0 && a[i][j]=0 && a[i][j]=a[0][1]&&a[0][0]>=a[1][0])\n\t{\t\n\t\t\t\tput[k][0]=0;\n\t\t\t put[k][1]=0;\n\t\t \tk++;\n\t}\n\t\tfor(j=1;j<=n-2;j++)\n\t\t\tif(a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j]&&a[0][j]>=a[0][j-1])\n\t{\t\n\t\t\t\tput[k][0]=0;\n\t\t\t put[k][1]=j;\n\t\t \tk++;\n\t}\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n\t{\t\n\t\t\t\tput[k][0]=0;\n\t\t\t put[k][1]=n-1;\n\t\t \tk++;\n\t}\n for(i=1;i<=m-2;i++)\n\t{\tif(a[i][0]>=a[i][1]&&a[i][0]>=a[i-1][0]&&a[i][0]>=a[i+1][0])\n\t{\t\n\t\t\t\tput[k][0]=i;\n\t\t\t put[k][1]=0;\n\t\t \tk++;\n\t}\n\t\tfor(j=1;j<=n-2;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t{\t\n\t\t\t\tput[k][0]=i;\n\t\t\t put[k][1]=j;\n\t\t \tk++;\n\t\t\t}\n\t\t}\n\t\tif(a[i][n-1]>=a[i][n-2]&&a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1])\n\t{\t\n\t\t\t\tput[k][0]=i;\n\t\t\t put[k][1]=n-1;\n\t\t \tk++;\n\t}\n\t}\nif(a[m-1][0]>=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n\t{\t\n\t\t\t\tput[k][0]=m-1;\n\t\t\t put[k][1]=0;\n\t\t \tk++;\n\t}\n\t\tfor(j=1;j<=n-2;j++)\n\t\t\tif(a[m-1][j]>=a[m-1][j+1]&&a[m-1][j]>=a[m-2][j]&&a[m-1][j]>=a[m-1][j-1])\n\t{\t\n\t\t\t\tput[k][0]=m-1;\n\t\t\t put[k][1]=j;\n\t\t \tk++;\n\t}\n if(a[m-1][n-1]>=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])\n\t{\t\n\t\t\t\tput[k][0]=m-1;\n\t\t\t put[k][1]=n-1;\n\t\t \tk++;\n\t}\n for(i=0;i<=k-1;i++)\n\t printf(\"%d %d\\n\",put[i][0],put[i][1]);\n}"} +{"label": "72", "index": "35630", "code": "\nint s[110][110];\nint main(){\n\tint m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=1;i<=m;i++){\n\t\tfor (j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",s[i]+j);\n\t\t}\n\t}\n\tfor (i=1;i<=m;i++){\n\t\tfor (j=1;j<=n;j++){\n\t\t\tif (s[i][j]>=s[i][j-1]\n\t\t\t\t&&s[i][j]>=s[i][j+1]\n\t\t\t\t&&s[i][j]>=s[i-1][j]\n\t\t\t\t&&s[i][j]>=s[i+1][j]){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "72", "index": "35631", "code": "//??? ??? 1000010334 \nint main()\n{\n int m=0; //?? ?? \n int n=0; //?? ?? \n cin>>m;\n cin>>n;\n int h[22][22]; //???? \n for(int i=0;i<22;i++) //???????????0 \n {\n h[0][i]=0;\n h[i][0]=0;\n h[i][n+1]=0;\n h[m+1][i]=0;\n }\n \n for(int i=1;i<=m;i++)\n {\n for(int j=1;j<=n;j++)\n {\n cin>>h[i][j];\n }\n }\n //????? \n for(int i=1;i<=m;i++) //????? \n {\n for(int j=1;j<=n;j++)\n {\n if(h[i][j]>=h[i-1][j]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i][j+1])\n {\n cout<>m>>n;\n for(int i=0;i>a[i][j];\n }\n }\n for(int i=1;i=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n cout<=m||j<0||j>=n)return -1;\n\telse return a[i][j];\n}\n\nvoid check(int i,int j)\n{\n\tif(a[i][j]>=height(i-1,j)&&a[i][j]>=height(i+1,j)&&a[i][j]>=height(i,j-1)&&a[i][j]>=height(i,j+1))cout<>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==0&&j==(n-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==0&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(m-1)&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(m-1)&&j==(n-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t printf(\"%d %d\\n\",i,j);\n\t else if(j==(n-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(m-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\n\t\n\t\telse if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35635", "code": "int m,n;\nint height[40][40];\ndouble average[40][40];\n\nint main(){\n int i,j;\n scanf(\"%d%d\",&m,&n);\n memset(average,0,sizeof(average));\n \n for (i=0;i0) {\n sum += height[i-1][j];\n count++;\n }\n if (i0) {\n sum += height[i][j-1];\n count++;\n }\n if (j0 && height[i-1][j] > maxh) {\n maxh = height[i-1][j];\n }\n if (i maxh) {\n maxh = height[i+1][j];\n }\n if (j>0 && height[i][j-1] > maxh) {\n maxh = height[i][j-1];\n }\n if (j maxh) {\n maxh = height[i][j+1];\n }\n if (abs(maxh - (double)height[i][j]) < 0.000001) printf(\"%d %d\\n\",i,j);\n }\n }\n\n return 0;\n}\n"} +{"label": "72", "index": "35636", "code": "int main()\n{\n\tint m , n;\n\tint a[ 21 ][ 21 ];\n\tint i , j;\n\tcin >> m >> n;\n\tfor ( i = 0 ; i <= m - 1 ; i++ )\n\t{\n\t\tfor ( j = 0 ; j <= n - 1 ; j++ )\n\t\t{\n\t\t\tcin >> a[ i ][ j ];\n\t\t}\n\t}\n\tif ( a[ 0 ][ 0 ] >= a[ 0 ][ 1 ] && a[0][0] >= a[1][0] )\n\t\tcout << 0 << ' ' << 0 << endl;\n\tfor ( i = 1 ; i <= n - 2 ; i++ )\n\t{\n\t\tif ( a[ 0 ][ i ] >= a[0][i-1] && a[0][i] >= a[0][i+1] && a[0][i] >= a[1][i] )\n\t\t{\n\t\t\tcout << 0 << ' ' << i << endl;\n\t\t}\n\t}\n\tif ( a[ 0 ][ n - 1 ] >= a[ 0 ][ n - 2 ] && a[0][n - 1] >= a[1][n - 1] )\n\t\tcout << 0 << ' ' << n - 1 << endl;\n\tfor ( j = 1 ; j <= m - 2 ; j++ )\n\t{\n\t\tif ( a[ j ][ 0 ] >= a[ j ][ 1 ] && a[j][0] >= a[j+1][0] && a[j][0] >= a[j - 1][0] )\n\t\t cout << j << ' ' << 0 << endl;\n\t for ( i = 1 ; i <= n - 2 ; i++ )\n\t\t{\n\t\t if ( a[ j ][ i ] >= a[j][i-1] && a[j][i] >= a[j][i+1] && a[j][i] >= a[j+1][i] && a[j][i] >= a[j - 1][i] )\n\t\t {\n\t\t \tcout << j << ' ' << i << endl;\n\t\t }\n\t\t}\n \tif ( a[ j ][ n - 1 ] >= a[ j ][ n - 2 ] && a[j][n - 1] >= a[j+1][n - 1] && a[j][n - 1] >= a[j - 1][n - 1])\n\t \tcout << j << ' ' << n - 1 << endl;\n\t}\n\tif ( a[ m - 1 ][ 0 ] >= a[ m - 1 ][ 1 ] && a[m-1][0] >= a[m-2][0] )\n\t\tcout << m - 1 << ' ' << 0 << endl;\n\tfor ( i = 1 ; i <= n - 2 ; i++ )\n\t{\n\t\tif ( a[ m - 1 ][ i ] >= a[m-1][i-1] && a[m-1][i] >= a[m-1][i+1] && a[m-1][i] >= a[m-2][i] )\n\t\t{\n\t\t\tcout << m - 1 << ' ' << i << endl;\n\t\t}\n\t}\n\tif ( a[ m - 1 ][ n - 1 ] >= a[ m - 1 ][ n - 2 ] && a[m-1][n - 1] >= a[m-2][n - 1] )\n\t\tcout << m - 1 << ' ' << n - 1 << endl;\n\treturn 0;\n}\n"} +{"label": "72", "index": "35637", "code": "int main()\n{\n int m,n,i,j;\n int a[22][22];\n cin>>m>>n;\n for(i=0;i<=n+1;i++) a[m+1][i]=a[0][i]=0;\n for(i=0;i<=m+1;i++) a[i][n+1]=a[i][0]=0;\n for(i=1;i<=m;i++)\n for(j=1;j<=n;j++) cin>>a[i][j];\n for(i=1;i<=m;i++)\n for(j=1;j<=n;j++)\n if((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n cout<> m >> n;\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> mount[i][j];\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (j - 1 < 0)\n\t\t\t\tleft = 1;\n\t\t\telse\n\t\t\t\tif (mount[i][j - 1] <= mount[i][j])\n\t\t\t\t\tleft = 1;\n\t\t\t\telse\n\t\t\t\t\tleft = 0;\n\t\t\tif (j + 1 == n)\n\t\t\t\tright = 1;\n\t\t\telse\n\t\t\t\tif (mount[i][j + 1] <= mount[i][j])\n\t\t\t\t\tright = 1;\n\t\t\t\telse\n\t\t\t\t\tright = 0;\n\t\t\tif (i - 1 < 0)\n\t\t\t\tup = 1;\n\t\t\telse\n\t\t\t\tif (mount[i - 1][j] <= mount[i][j])\n\t\t\t\t\tup = 1;\n\t\t\t\telse\n\t\t\t\t\tup = 0;\n\t\t\tif (i + 1 == m)\n\t\t\t\tdown = 1;\n\t\t\telse\n\t\t\t\tif (mount[i + 1][j] <= mount[i][j])\n\t\t\t\t\tdown = 1;\n\t\t\t\telse\n\t\t\t\t\tdown = 0;\n\t\t\tif (left + right + up + down == 4)\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35639", "code": "int main(){\n\tint m,n,i,j,a[100][100],b,c,d,e,k;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i= a[i-1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1] && a[i][j] >= a[i+1][j]) {\n\t\t\t\tprintf(\"%d %d\\n\", i - 1, j - 1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35641", "code": "\nint main()\n{\n int a[40][40]={0};\n int b[40][40]={0};\n int m,n,m1,n1;\n scanf(\"%d %d\",&m,&n);\n for (m1=1; m1<=m; m1++) {\n for (n1=1; n1<=n; n1++) {\n scanf(\"%d\",&a[m1][n1]);\n }\n }\n \n for (m1=1; m1<=m; m1++) {\n for (n1=1; n1<=n; n1++) {\n if (a[m1][n1]>=a[m1-1][n1]&&a[m1][n1]>=a[m1][n1-1]&&a[m1][n1]>=a[m1][n1+1]&&a[m1][n1]>=a[m1+1][n1])\n {\n b[m1][n1]=1;\n }\n }\n }\n \n for (m1=1; m1<=m; m1++) {\n for (n1=1; n1<=n; n1++) {\n if (b[m1][n1]==1)\n {\n printf(\"%d %d\\n\",m1-1,n1-1);\n }\n }\n }\n}"} +{"label": "72", "index": "35642", "code": "main()\n{\n int m,n;\n scanf(\"%d %d\",&m,&n);\n int key[20][20]={0},height[22][22]={0};\n for(int i=0;i=height[i][j+1]\n &&height[i+1][j+1]>=height[i+2][j+1]\n &&height[i+1][j+1]>=height[i+1][j]\n &&height[i+1][j+1]>=height[i+1][j+2]) \n key[i][j]=1; \n }\n for(int i=0;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t{\n\t\t\tb[c].row=i;\n\t\t\tb[c].col=j;\n\t\t\tc++;\n\t\t}\n\t}\n\tfor(i=1;ib[j+1].row)\n\t\t{\n\t\t\tt=b[j].row;\n\t\t\tb[j].row=b[j+1].row;\n\t\t\tb[j+1].row=t;\n\t\t\tt=b[j].col;\n\t\t\tb[j].col=b[j+1].col;\n\t\t\tb[j+1].col=t;\n\t\t}\n\t\tif(b[j].row==b[j+1].row)\n\t\t{\n\t\t\tif(b[j].col>b[j+1].col)\n\t\t\t{\n\t\t\t\tt=b[j].col;\n\t\t\t\tb[j].col=b[j+1].col;\n\t\t\t\tb[j+1].col=t;\n\t\t\t\tt=b[j].row;\n\t\t\t\tb[j].row=b[j+1].row;\n\t\t\t\tb[j+1].row=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i>m>>n;\n\tfor(i=0;i>hill[i][j];\n\t\t}\n\t}\n \n\n\n\tfor(j=1;j=hill[0][j-1]&&hill[0][j]>=hill[0][j+1]&&hill[0][j]>=hill[1][j])\n\n\n\tfor(i=0;i=hill[i+1][j]&&hill[i][j]>=hill[i][j+1])\n\t\t\t cout<=hill[i+1][j]&&hill[i][j]>=hill[i][j+1]&&hill[i][j]>=hill[i][j-1])\n\t\t\t\tcout<=hill[i+1][j]&&hill[i][j]>=hill[i][j-1])\n\t\t\t\tcout<0&&i=hill[i-1][j]&&hill[i][j]>=hill[i+1][j]&&hill[i][j]>=hill[i][j+1])\n\t\t\t\tcout<=hill[i-1][j]&&hill[i][j]>=hill[i][j+1])\n\t\t\t\tcout<=hill[i-1][j]&&hill[i][j]>=hill[i][j-1]&&hill[i][j]>=hill[i][j+1])\n\t\t\t\tcout<=hill[i-1][j]&&hill[i][j]>=hill[i][j-1])\n\t\t\t\tcout<=hill[i-1][j]&&hill[i][j]>=hill[i+1][j]&&hill[i][j]>=hill[i][j-1])\n\t\t\t\tcout<0&&i0&&j=hill[i-1][j]&&hill[i][j]>=hill[i+1][j]&&hill[i][j]>=hill[i][j-1]&&hill[i][j]>=hill[i][j+1])\n\t\t\t\tcout<=point[i+1]&&point[i]>=point[i+20]?printf(\"%d %d\\n\",j,i):dump();\n else if(i==n-1&&j==0)\n point[i]>=point[i-1]&&point[i]>=point[i+20]?printf(\"%d %d\\n\",j,i):dump();\n else if(j==0)\n point[i]>=point[i+1]&&point[i]>=point[i+20]&&point[i]>=point[i-1]?printf(\"%d %d\\n\",j,i):dump();\n else if(i==0&&j!=m-1)\n point[i]>=point[i+1]&&point[i]>=point[i+20]&&point[i]>=point[i-20]?printf(\"%d %d\\n\",j,i):dump();\n else if(i==n-1&&j!=m-1)\n (point[i]>=point[i-1]&&point[i]>=point[i+20]&&point[i]>=point[i-20])?printf(\"%d %d\\n\",j,i):dump();\n else if(i==0&&j==m-1)\n (point[i]>=point[i+1]&&point[i]>=point[i-20])?printf(\"%d %d\\n\",j,i):dump();\n else if(i==n-1&&j==m-1)\n point[i]>=point[i-1]&&point[i]>=point[i-20]?printf(\"%d %d\\n\",j,i):dump();\n else if(j==m-1)\n point[i]>=point[i-1]&&point[i]>=point[i-20]&&point[i]>=point[i+1]?printf(\"%d %d\\n\",j,i):dump();\n else\n point[i]>=point[i-1]&&point[i]>=point[i+20]&&point[i]>=point[i-20]&&point[i]>=point[i+1]?printf(\"%d %d\\n\",j,i):dump();\n }\n point=point+20;//????????point=point+20*j?????????for??????????????????????\n }\n}\nvoid main()\n{\n int m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n int height[20][20]={'\\0'},*point=height[0];\n for(i=0;i=a[i][j+1])&&(c>=a[i][j-1])&&(c>=a[i+1][j])&&(c>=a[i-1][j]))\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t\treturn 0;\n}\n"} +{"label": "72", "index": "35647", "code": "int main()\n{\n\tint m,n,i,j;\n\tint height[22][22],check[20][20];\n\tcin>>m>>n;\n\tfor(i=0;i<22;i++)\n\t{\n\t\tfor(j=0;j<22;j++)\n\t\t{\n\t\t\theight[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i>height[i][j];\n\t\t}\n\t}\n\tfor(i=1;i=height[i-1][j]&&height[i][j]>=height[i+1][j]&&height[i][j]>=height[i][j-1]&&height[i][j]>=height[i][j+1])\n\t\t\t{\n\t\t\t\tcheck[i][j]=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcheck[i][j]=0;\n\t\t\t}\n\t\t}\n\t}\n for(i=1;i0 && height[i-1][j] > maxh) {\n maxh = height[i-1][j];\n }\n if (i maxh) {\n maxh = height[i+1][j];\n }\n if (j>0 && height[i][j-1] > maxh) {\n maxh = height[i][j-1];\n }\n if (j maxh) {\n maxh = height[i][j+1];\n }\n if (abs(maxh - (double)height[i][j]) < 0.000001) printf(\"%d %d\\n\",i,j);\n }\n }\n\n return 0;\n}\n"} +{"label": "72", "index": "35649", "code": "int main()\n{\n int m,n,i,j,juzhen[20][20];\n cin>>m>>n;\n for(i=0;i>juzhen[i][j];\n cout<=juzhen[i+1][j]&&juzhen[i][j]>=juzhen[i][j+1])\n cout<=juzhen[i][j-1] && juzhen[i][j]>=juzhen[i+1][j])\n cout<=juzhen[i-1][j]&&juzhen[i][j]>=juzhen[i][j+1])\n cout<=juzhen[i][j-1] && juzhen[i][j]>=juzhen[i-1][j])\n cout<=juzhen[i][j-1] && juzhen[i][j]>=juzhen[i][j+1] && juzhen[i][j]>=juzhen[i+1][j])\n cout<=juzhen[i][j-1] && juzhen[i][j]>=juzhen[i][j+1] && juzhen[i][j]>=juzhen[i-1][j])\n cout<=juzhen[i][j+1] && juzhen[i][j]>=juzhen[i-1][j] && juzhen[i][j]>=juzhen[i+1][j])\n cout<=juzhen[i][j-1] && juzhen[i][j]>=juzhen[i-1][j] && juzhen[i][j]>=juzhen[i+1][j])\n cout<=juzhen[i][j-1] &&juzhen[i][j]>=juzhen[i][j+1]&& juzhen[i][j]>=juzhen[i-1][j] && juzhen[i][j]>=juzhen[i+1][j])\n cout<> m >> n;\n\tfor (int i = 1; i <= m; i++)\n\t\tfor (int j = 1; j <= n; j++)\n\t\t\tcin >> a[i][j];\n\tfor (int i = 1; i <= m; i++)\n\t\tfor (int j = 1; j <= n; j++)\n\t\t\tif ((a[i][j] >= a[i - 1][j]) && (a[i][j] >= a[i + 1][j]) &&\n\t\t\t\t(a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i][j + 1]))\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\treturn 0;\n}\n"} +{"label": "72", "index": "35651", "code": "int main()\n{\n\tint m,n,i,j,h[20][20]={0},k[20][20]={0};\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=b? 0:1);\n}"} +{"label": "72", "index": "35652", "code": "int main()\n{\n\tint i,j,n,m;\n\tint high[21][21]={0};\n\tcin >> m >> n;\n\tfor (i=0;i> high[i][j];\n\t\t}\n\t}\n\tfor (i=0;i>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t cout<0&&j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t cout<=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t cout<0&&i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\tcout<0&&j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\tcout<0&&j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\tcout<> m >> n;\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j <= n; j++)\n\t\t\tcin >> a[i][j];\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tif(a[i][j] >= a[i-1][j] && a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\t\t}\n\n\treturn 0;\n}\n"} +{"label": "72", "index": "35655", "code": "int main()\n{int m,n,mount[30][30],i,j;\n cin>>m>>n;\n for(i=0;i>mount[i][j]; //?????? \n for(i=0;i=mount[0][1]&&mount[0][0]>=mount[1][0]) cout<=mount[0][n-2]&&mount[0][n-1]>=mount[1][n-1]) cout<=mount[0][j-1]&&mount[0][j]>=mount[0][j+1]&&mount[0][j]>=mount[1][j]) cout<=mount[m-1][n-2]&&mount[m-1][n-1]>=mount[m-2][n-1]) cout<=mount[m-1][1]&&mount[m-1][0]>=mount[m-2][0]) cout<=mount[m-1][j-1]&&mount[m-1][j]>=mount[m-1][j+1]&&mount[m-1][j]>=mount[m-2][j]) cout<=mount[i-1][j]&&mount[i][j]>=mount[i+1][j]&&mount[i][j]>=mount[i][1]) cout<=mount[i-1][j]&&mount[i][j]>=mount[i+1][j]&&mount[i][j]>=mount[i][n-2]) cout<=mount[i][j-1]&&mount[i][j]>=mount[i-1][j]&&mount[i][j]>=mount[i][j+1]&&mount[i][j]>=mount[i+1][j]) cout<=sz[i-1][j]&&\n sz[i][j]>=sz[i+1][j]&&\n sz[i][j]>=sz[i][j-1]&&\n sz[i][j]>=sz[i][j+1])\n {\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35657", "code": "int main()\n{\n int m,n,i,j;\n int WL[21][21];\n scanf(\"%d %d\",&m,&n);\n for(i=0;i=WL[0][1]&&WL[0][0]>=WL[1][0])\n {\n printf(\"0 0\\n\");\n }\n for(i=1;i=WL[0][i+1]&&WL[0][i]>=WL[1][i]&&WL[0][i]>=WL[0][i-1])\n {\n printf(\"0 %d\\n\",i);\n }\n }\n if(WL[0][n-1]>=WL[0][n-2]&&WL[0][n-1]>=WL[1][n-1])\n {\n \n printf(\"0 %d\\n\",a);\n }\n for(j=1;j=WL[j-1][0]&&WL[j][0]>=WL[j+1][0]&&WL[j][0]>=WL[j][1])\n\t\t\tprintf(\"%d %d\\n\",j,0);\n for(i=1;i=WL[j-1][i]&&WL[j][i]>=WL[j][i-1]&&WL[j][i]>=WL[j+1][i]&&WL[j][i]>=WL[j][i+1])\n {\n printf(\"%d %d\\n\",j,i);\n }\n }\n if(WL[j][n-1]>=WL[j-1][n-1]&&WL[j][n-1]>=WL[j+1][n-1]&&WL[j][n-1]>=WL[j][n-2])\n\t\t\tprintf(\"%d %d\\n\",j,a);\n }\n if(WL[m-1][0]>=WL[m-2][0]&&WL[m-1][0]>=WL[m-1][1])\n {\n printf(\"%d %d\\n\",b,0);\n }\n for(i=1;i=WL[m-1][i+1]&&WL[m-1][i]>=WL[m-2][i]&&WL[m-1][i]>=WL[m-1][i-1])\n {\n printf(\"%d %d\\n\",b,i);\n }\n }\n \n \n if(WL[m-1][n-1]>=WL[m-2][n-1]&&WL[m-1][n-1]>=WL[m-1][n-2])\n {\n printf(\"%d %d\\n\",b,a);\n }\n\n return 0;\n}"} +{"label": "72", "index": "35658", "code": "void main()\n{ int m,n;\nscanf(\"%d%d\",&m,&n);\nint str[100][100];\nint i,j,p,q,a,b;\na=n+2;b=m+2;\nfor(j=0;j0)\n {if( (str[i][j]>=str[i][j-1])&&(str[i][j]>=str[i][j+1])&&(str[i][j]>=str[i-1][j])&&(str[i][j]>=str[i+1][j]))\n {p=i-1;q=j-1;\n printf(\"%d %d\\n\",p,q);}}}\n}"} +{"label": "72", "index": "35659", "code": "int main()\n{\n\tint s[22][22],m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tmemset(s,0,sizeof(s));\n for(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++)\n\t\t\tscanf(\"%d\",&s[i][j]);\n\t}\n for(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif(s[i][j]>s[i-1][j]-1&&s[i][j]>s[i+1][j]-1&&s[i][j]>s[i][j+1]-1&&s[i][j]>s[i][j-1]-1)\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35660", "code": "int main()\n{\n int height[22][22],top[21][21];\n int m=0,n=0,i=0,j=0;\n cin>>m>>n;\n for(i=0;i<=m+1;i++)\n for(j=0;j<=n+1;j++)\n {\n if(i==0 || j==0 || i==m+1 || j==n+1) height[i][j]=0;\n else cin>>height[i][j];\n top[i][j]=0;\n }\n for(i=1;i<=m;i++)\n for(j=1;j<=n;j++)\n {\n if(height[i][j]>=height[i-1][j] && height[i][j]>=height[i+1][j] && height[i][j]>=height[i][j-1] && height[i][j]>=height[i][j+1])\n top[i][j]=1;\n }\n for(i=0;i<=m;i++)\n for(j=0;j<=n;j++)\n if(top[i][j]==1)\n cout<= a[i][j - 1]\n\t\t\t\t&& a[i][j] >= a[i - 1][j]\n\t\t\t\t&& a[i][j] >= a[i + 1][j]\n\t\t\t\t&& a[i][j] >= a[i][j + 1])\n\t\t\t\tprintf(\"%d %d\\n\", i-1, j-1);\n\t\t}\n}"} +{"label": "72", "index": "35662", "code": "/*\n * 1.cpp\n *\n * Created on: 2011-12-25\n * Author: Administrator\n */\nint main()\n{\n\tint i,j,m,n;\n\tint a[50][50];\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;ia[i][j]) continue;\n\t\t\tif(a[i][j+1]>a[i][j]) continue;\n\t\t\tif(i!=0 && a[i-1][j]>a[i][j])continue;\n\t\t\tif(j!=0 && a[i][j-1]>a[i][j])continue;\n\t\t\tcout<=sz[q-1>0?q-1:0][w]&&sz[q][w]>=sz[q+1][w]&&sz[q][w]>=sz[q][w-1>0?w-1:0]&&sz[q][w]>=sz[q][w+1])\n\t\t\t{\t\n\t\t\t\tprintf(\"%d %d\\n\",q,w);\t\n\t\t\t}\t\n\t\t}\t\n\t}\t\n\treturn 0;\n} "} +{"label": "72", "index": "35664", "code": "int main(int argc, char* argv[])\n{\n\tint n,m;\n\tscanf(\"%d%d\",&n,&m);\n\tint a[20][20];\n\tfor(int i=0;i=a[k][l+1]&&a[k][l]>=a[k+1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==0&&l!=m-1&&l!=0)&&a[k][l]>=a[k][l-1]&&a[k][l]>=a[k+1][l]&&a[k][l]>=a[k][l+1]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==0&&l==m-1)&&a[k][l]>=a[k][l-1]&&a[k][l]>=a[k+1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k!=n-1&&k!=0&&l==0)&&a[k][l]>=a[k][l+1]&&a[k][l]>=a[k+1][l]&&a[k][l]>=a[k-1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k!=n-1&&l!=m-1&&k!=0&&l!=0)&&a[k][l]>=a[k][l+1]&&a[k][l]>=a[k-1][l]&&a[k][l]>=a[k+1][l]&&a[k][l]>=a[k][l-1]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k!=n-1&&k!=0&&l==m-1)&&a[k][l]>=a[k][l-1]&&a[k][l]>=a[k+1][l]&&a[k][l]>=a[k-1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==n-1&&l==0)&&a[k][l]>=a[k][l+1]&&a[k][l]>=a[k-1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==n-1&&l!=m-1&&l!=0)&&a[k][l]>=a[k][l-1]&&a[k][l]>=a[k][l+1]&&a[k][l]>=a[k-1][l]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==n-1&&l==m-1)&&a[k][l]>=a[k-1][l]&&a[k][l]>=a[k][l-1]){\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35665", "code": "\nint main()\n{\n\tint m, n;\n\tint a[20][20];\n\tcin >> m >> n;\n for (int i = 0; i < m; i++)\n\t{\n\t\tfor (int j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (int p = 0; p < m; p++)\n\t{\n\t\tfor (int q = 0; q < n; q++)\n\t\t{\n\t\t\tint s = 0;\n\t\t\tif (p - 1 < 0) s++;\n\t\t\tif (p - 1 >= 0 && a[p - 1][q] <= a[p][q]) s++;\n\t\t\tif (p + 1 >= m) s++;\n\t\t\tif (p + 1 < m && a[p + 1][q] <= a[p][q]) s++;\n\t\t\tif (q - 1 < 0) s++;\n\t\t\tif (q - 1 >= 0 && a[p][q - 1] <= a[p][q]) s++;\n\t\t\tif (q + 1 >= n) s++;\n\t\t\tif (q + 1 < n && a[p][q + 1] <= a[p][q]) s++;\n\t\t\tif (s == 4)\n\t\t\t\tcout << p << ' ' << q << endl;\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "72", "index": "35666", "code": "int main(){\n int m,n; \n scanf(\"%d %d\",&m,&n);\n int sd[m+2][n+2];\n int i,j;\n for(i=0;i=sd[i+1][j]&&sd[i][j]>=sd[i-1][j]&&sd[i][j]>=sd[i][j+1]&&sd[i][j]>=sd[i][j-1]){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n return 0;\n \n \n }\n"} +{"label": "72", "index": "35667", "code": "int main()\n{\n\tint a[25][25];\n\tint n,m,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\t{\n\t\ta[i][0]=a[i][n+1]=-1;\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t\ta[0][j]=a[m+1][j]=-1;\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35668", "code": "int main() {\n\tint m, n, i, j;\n\tcin >> m >> n;\n\tint a[m][n];\n\tfor (i = 0; i < m; i++) {\n\t\tfor (j = 0; j < n; j++) {\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tif (a[0][0] >= a[0][1] && a[0][0] >= a[1][0]) {\n\t\tcout << 0 << \" \" << 0 << endl;\n\t}\n\tfor (j = 1; j < n - 1; j++) {\n\t\tif (a[0][j] >= a[0][j - 1] && a[0][j] >= a[0][j + 1] && a[0][j]\n\t\t\t\t>= a[1][j]) {\n\t\t\tcout << 0 << \" \" << j << endl;\n\t\t}\n\t}\n\tif (a[0][n - 1] >= a[0][n - 2] && a[0][n - 1] >= a[1][n - 1]) {\n\t\tcout << 0 << \" \" << n - 1 << endl;\n\t}\n\tfor (i = 1; i < m - 1; i++) {\n\t\tif (a[i][0] >= a[i][1] && a[i][0] >= a[i - 1][0] && a[i][0]\n\t\t\t\t>= a[i + 1][0]) {\n\t\t\tcout << i << \" \" << 0 << endl;\n\t\t}\n\t\tfor (j = 1; j < n - 1; j++) {\n\t\t\tif (a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1] && a[i][j]\n\t\t\t\t\t>= a[i - 1][j] && a[i][j] >= a[i + 1][j]) {\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t}\n\t\t}\n\t\tif (a[i][n - 1] >= a[i][n - 2] && a[i][n - 1] >= a[i + 1][n - 1]\n\t\t\t\t&& a[i][n - 1] >= a[i - 1][n - 1]) {\n\t\t\tcout << i << \" \" << n - 1 << endl;\n\t\t}\n\t}\n\tif (a[m - 1][0] >= a[m - 1][1] && a[m - 1][0] >= a[m - 2][0]) {\n\t\tcout << m - 1 << \" \" << 0 << endl;\n\t}\n\tfor (j = 1; j < n - 1; j++) {\n\t\tif (a[m - 1][j] >= a[m - 1][j - 1] && a[m - 1][j] >= a[m - 1][j + 1]\n\t\t\t\t&& a[m - 1][j] >= a[m - 2][j]) {\n\t\t\tcout << m - 1 << \" \" << j << endl;\n\t\t}\n\t}\n\tif (a[m - 1][n - 1] >= a[m - 1][n - 2] && a[m - 1][n - 1]\n\t\t\t>= a[m - 2][n - 1]) {\n\t\tcout << m - 1 << \" \" << n - 1 << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35669", "code": "main()\n{\n int m,n,i,j,a[20][20];\n scanf(\"%d %d\",&m,&n);\n for(i=0;ia[i][j])\n continue;\n }\n if(j!=n-1)\n {\n if(a[i][j+1]>a[i][j])\n continue;\n }\n if(i!=m-1)\n {\n if(a[i+1][j]>a[i][j])\n continue;\n }\n if(i!=0)\n {\n if(a[i-1][j]>a[i][j])\n continue;\n }\n printf(\"%d %d\\n\",i,j);\n }\n }\n getchar();\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35670", "code": "int main()\n{\n\tint m,n,i,j;\n\tint a[25][25];\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[0][1])&&(a[0][0]>=a[1][0]))\n\t\t\t\t\t\tcout<=a[0][n-2])&&(a[0][n-1]>=a[1][n-1]))\n\t\t\t\t\t\tcout<=a[m-1][n-2])&&(a[m-1][n-1]>=a[m-2][n-1]))\n\t\t\t\t\t\t\t\t\t\tcout<=a[m-1][1])&&(a[m-1][0]>=a[m-2][0]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i+1][j]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j+1]) b[i][j]=1;\n\t\t\t else if (a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]) b[i][j]=1;\n\t\t\t }\n\t\t\t if (j==0) \n\t\t\t {if (i==0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]) b[i][j]=1;\n\t\t\t else if (a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]) b[i][j]=1;\n\t\t\t }\n\t\t\t if (i==m-1)\n\t\t \t{if (j==n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) b[i][j]=1;\n\t\t\t\telse if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) b[i][j]=1;\n\t\t\t }\n\t\t\t if (j==n-1)\n\t\t\t {if (i==m-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) b[i][j]=1;\n\t\t\t\telse if (a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) b[i][j]=1;\n\t\t\t }\n if (i!=0&&j!=0&&i!=m-1&&j!=n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t b[i][j]=1;\n\t\t}\n\t\treturn;\n}\nvoid print()\n{\n\tint i,j;\n\t\tfor (i=0;i=(b[i][j-1])&&\nb[i][j]>=(b[i-1][j])&&\nb[i][j]>=(b[i][j+1])&&\nb[i][j]>=(b[i+1][j]))\nprintf(\"%d %d\\n\",i-1,j-1);\n}}\nreturn 0;\n} \n"} +{"label": "72", "index": "35673", "code": "/*\n * 1234.cpp\n *\n * Created on: 2011-1-9\n * Author: c130\n */\nint main()\n{\n\tint m,n,i,j;\n\tint a[21][21];\n\tcin >> m >> n;\n\tfor(i=0;i> a[i][j];\n\tfor(j=1;j<=n;j++)\n\t\tif(a[0][j]>=a[0][j-1]&&a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j])\n\t\t\tcout << 0 << \" \" << j-1 << endl;\n\tfor(i=1;i=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\tcout << i << \" \" << j-1 << endl;\n\tfor(j=1;j<=n;j++)\n\t\t\tif(a[m-1][j]>=a[m-1][j-1]&&a[m-1][j]>=a[m-1][j+1]&&a[m-1][j]>=a[m-2][j])\n\t\t\t\tcout << m-1 << \" \" << j-1 << endl;\n\treturn 0;\n}\n"} +{"label": "72", "index": "35674", "code": "int main()\n{\n int m,n,a[20][20]={0},i,j;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=a[i+1][j])&&(a[i][j]>=a[i][j+1]))\n printf(\"0 0\\n\");\n }\n else if(i==m-1&&j==0)\n {\n if((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1])) \n printf(\"%d 0\\n\",m-1); \n }\n else if(i==m-1&&j==n-1)\n {\n if((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1])) \n printf(\"%d %d\\n\",m-1,n-1);\n }\n else if(i==0&&j==n-1)\n {\n if((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])) \n printf(\"0 %d\\n\",n-1);\n }\n else if((i==0)&&(j>0)&&(j=a[i][j+1])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j]))\n printf(\"%d %d\\n\",i,j);\n }\n else if((i==m-1)&&(j>0)&&(j=a[i][j+1])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i-1][j]))\n printf(\"%d %d\\n\",i,j);\n }\n else if((j==0)&&(i>0)&&(i=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1])) \n printf(\"%d %d\\n\",i,j);\n }\n else if((j==n-1)&&(i>0)&&(i=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1])) \n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n \n return 0;\n}\n \n \n"} +{"label": "72", "index": "35675", "code": "\nint a[25][25] = {0};\nvoid check(int i, int j)\n{\n\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1])\n\t\tcout << i - 1 << \" \" << j - 1 << endl;\n}\n\nint main()\n{\n\tint i, j, m, n;\n\tcin >> m >> n;\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcheck(i, j);\n\treturn 0;\n}"} +{"label": "72", "index": "35676", "code": "void main()\n{\n\tint m,n,i,j;\n\tint c[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=c[i+1][j] && c[i][j]>=c[i][j+1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\telse if(j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif(c[i][j]>=c[i+1][j] && c[i][j]>=c[i][j-1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\telse if(j>0 && j=c[i][j-1] && c[i][j]>=c[i][j+1] && c[i][j]>=c[i+1][j])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(i==m-1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(j>0 && j=c[i][j-1] && c[i][j]>=c[i][j+1] && c[i][j]>=c[i-1][j])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\tif(j==0)\n\t\t\t\t\tif(c[i][j]>=c[i-1][j] && c[i][j]>=c[i][j+1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\tif(j==n-1)\n\t\t\t\t\tif(c[i][j]>=c[i-1][j] && c[i][j]>=c[i][j-1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i>0 && i=c[i][j+1] && c[i][j]>=c[i-1][j] && c[i][j]>=c[i+1][j])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\telse if(j>0 && j=c[i][j-1] && c[i][j]>=c[i][j+1] && c[i][j]>=c[i-1][j] && c[i][j]>=c[i+1][j])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\telse if(j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif(c[i][j]>=c[i-1][j] && c[i][j]>=c[i+1][j] && c[i][j]>=c[i][j-1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n"} +{"label": "72", "index": "35677", "code": "int main(){\n int a[100][100];\n int m,n,i,b,c,d;\n scanf(\"%d %d\",&m,&n);\n for(i=1;i<=m;i++){\n for(b=1;b<=n;b++){\n scanf(\"%d\",&a[i][b]);\n }\n }\n for(i=1;i<=m;i++){\n for(b=1;b<=n;b++){\n if((a[i][b]>=a[i][b-1])&&\n\t\t\t\t(a[i][b]>=a[i][b+1])&&\n\t\t\t\t(a[i][b]>=a[i-1][b])&&\n\t\t\t\t(a[i][b]>=a[i+1][b])){\n\t\t\t\tc=i-1;\n\t\t\t\td=b-1;\n\t\t\t\tprintf(\"%d %d\\n\",c,d);\n\t\t\t}\n }\n }\n return 0;\n}\n\n \n \n \n"} +{"label": "72", "index": "35678", "code": "\nint main()\n{\n\tint m,n,i,j;\n\tint a[25][25]={0};\n\tscanf (\"%d %d\",&m,&n);\n\tfor (i=1;i<=m;i++)\n\t{\n\t\tfor (j=1;j<=n+1;j++)\n\t\t\tif (j!=n+1)\n\t\t\t\tscanf (\"%d\",&a[i][j]);\n\t}\n\tfor (i=1;i<=m;i++)\n\t{\n\t\tfor (j=1;j<=n;j++)\n\t\t{\n\t\t\tif (a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]!=0)\n\t\t\t\tprintf (\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35679", "code": "//********************************\n//*???4.cpp **\n//*?????? 1200012768 **\n//*???2013.1.4 **\n//*??????? **\n//********************************\nint main()\n{\n\tint m, n, i, j, h[22][22] = {0}, flag[20][20] = {0};\n\tcin >> m >> n;\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcin >> h[i][j];\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (h[i][j] >= h[i - 1][j])\n\t\t\t\tflag[i][j]++;\n\t\t\tif (h[i][j] >= h[i + 1][j])\n\t\t\t\tflag[i][j]++;\n\t\t\tif (h[i][j] >= h[i][j - 1])\n\t\t\t\tflag[i][j]++;\n\t\t\tif (h[i][j] >= h[i][j + 1])\n\t\t\t\tflag[i][j]++;\n\t\t\tif (flag[i][j] == 4)\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\t\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35680", "code": "int main() {\n int m,n,row,col,x,y,p,q;\n scanf(\"%d %d\",&m,&n);\n int sz[m+2][n+2];\n for(row=0;row=sz[row+1][col]&&sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row-1][col]){\n printf(\"%d %d\\n\",row-1,col-1);\n }\n }\n }\n return 0;\n}\n\n"} +{"label": "72", "index": "35681", "code": "int main()\n{\n\tint m,n,h[21][21]={0},t[21][21]={0};\n\tcin >> m >> n;\n\tint i,j;\n\tfor(i=0;i> h[i][j];\n\t\t}\n\t}\n\tfor(i=0;i= h[i-1][j]) && (h[i][j] >= h[i+1][j]) && (h[i][j] >= h[i][j-1]) && (h[i][j] >= h[i][j+1]) )\n\t\t\t{\n\t\t\t\tt[i][j]=1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=dk[a-1][b])&&(dk[a][b]>=dk[a+1][b])&&(dk[a][b]>=dk[a][b-1])&&(dk[a][b]>=dk[a][b+1]))\n\t\t\t{\n\t\t\t printf(\"%d %d\\n\",a-1,b-1);\n\t\t\t}\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "72", "index": "35684", "code": "//*****************************\n//*???2011?1?9? *\n//*?????? *\n//*?????3 * \n//*****************************\nint main()//???\n{//?????\n\tint m=0,n=0;\n\tint gaocheng[100][100];\n\tcin>>m>>n;\n\tfor(int i=0;i>gaocheng[i][j];\n\tint x=0,y=0;\n\tfor(x=0;x=gaocheng[x+1][y]&&gaocheng[x][y]>=gaocheng[x][y+1])\n\t\t\t\t\t\tcout<=gaocheng[x+1][y]&&gaocheng[x][y]>=gaocheng[x][y-1])\n\t\t\t\t\t\tcout<=gaocheng[x+1][y]&&gaocheng[x][y]>=gaocheng[x][y+1]&&gaocheng[x][y]>=gaocheng[x][y-1])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y+1])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y-1])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y+1]&&gaocheng[x][y]>=gaocheng[x][y-1])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y+1]&&gaocheng[x][y]>=gaocheng[x+1][y])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y-1]&&gaocheng[x][y]>=gaocheng[x+1][y])\n\t\t\t\t\t\tcout<=gaocheng[x-1][y]&&gaocheng[x][y]>=gaocheng[x][y+1]&&gaocheng[x][y]>=gaocheng[x][y-1]&&gaocheng[x][y]>=gaocheng[x+1][y])\n\t\t\t\t\t\tcout<=sz[a-1][b]&&sz[a][b]>=sz[a+1][b]&&sz[a][b]>=sz[a][b+1]&&sz[a][b]>=sz[a][b-1]) {\n printf(\"%d %d\\n\",a-1,b-1);\n }\n }\n }\n return 0;\n}\n\n\n"} +{"label": "72", "index": "35686", "code": "int main() {\n\tint m,n,i,j,g=0,t,h,k,l;\n int a[22][22]={0},b[100],c[100];\n scanf(\"%d %d\",&n,&m);\n\nfor(i=1;i<=n;i++) {\n\t\t for(j=1;j<=m;j++) {\n\t\t\t scanf(\"%d\",&a[i][j]);\n\t\t }\n\t}\n for(i=1;i<=n;i++) {\n\t\tfor (j=1;j<=m;j++) {\n if( (a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j]) )\n\t\t {b[g]=i-1; \n\t\t c[g]=j-1; \n\t\t\tg++;\n\t\t }\n\t\t}\n\t}\nfor(l=0;lb[k+1])\n\t\t\t{t=b[k]; b[k]=b[k+1]; b[k+1]=t;\n\t\t\th=c[k]; c[k]=c[k+1]; c[k+1]=h;}\n\t\t\tif(b[k]==b[k+1]&&c[k]>c[k+1]) {h=c[k]; c[k]=c[k+1]; c[k+1]=h;}\n\t\t}\n\t}\n\nfor(l=0;l=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i!=0&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i==0&&j!=0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i==0&&j==0&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i==m-1&&j==n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i==m-1&&j!=n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])printf(\"%d %d\\n\",i,j);\n\t\t\telse if(i!=m-1&&j==n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])printf(\"%d %d\\n\",i,j);\n else b=1;\n\t\t}\n\t}\n}"} +{"label": "72", "index": "35688", "code": "double mou[20][20];\nint m,n;\nint judge(int x,int y)\n{\n\tdouble sum=0,s=0;\n\tif(x+1<=m)\n\t{\n\t\tif(mou[x+1][y]<=mou[x][y])\n\t\tsum++;\n\t\ts++;\n\t}\n\tif(x-1>=0)\n\t{\n\t\tif(mou[x-1][y]<=mou[x][y])\n\t\tsum++;\n\t\ts++;\n\t}\n\tif(y+1<=n)\n\t{\n\t\tif(mou[x][y+1]<=mou[x][y])\n\t\tsum++;\n\t\ts++;\n\t}\n\tif(y-1>=0)\n\t{\n\t\tif(mou[x][y-1]<=mou[x][y])\n\t\tsum++;\n\t\ts++;\n\t}\n\tif(sum==s)\n\treturn 1;\n\telse\n\treturn 0;\n}\nint main()\n{\n\tcin>>m>>n;\n\tfor(int i=0;i>mou[i][j];\n\t\t}\n\t}\n\tfor(int i=0;i=a[i-1][j]&&t>=a[i][j-1]&&t>=a[i+1][j]&&t>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35690", "code": "int main()\n{\n\tint a[60][60]={0},m,n,i,j,i1,j1,b[60][60]={0};\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(i1=1;i1<=m;i1++)\n\t{\n\t\tfor(j1=1;j1<=n;j1++)\n\t\t{\n\t\t\tif(a[i1][j1]>=a[i1][j1-1]&&a[i1][j1]>=a[i1][j1+\n\t\t\t\t1]&&a[i1][j1]>=a[i1-1][j1]&&a[i1][j1]>=a[i1+1][j1])\n\t\t\t{\n\t\t\t\tb[i1][j1]=1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(b[i][j]==1)\n\t\t\t{\n\t\t\t\tcout<=sz1[j+1][l]&&sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l-1]&&sz1[j][l]>=sz1[j][l+1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(j==0&&l!=0&&l!=x-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j+1][l]&&sz1[j][l]>=sz1[j][l-1]&&sz1[j][l]>=sz1[j][l+1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(j==0&&l==0)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j+1][l]&&sz1[j][l]>=sz1[j][l+1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(j==0&&l==x-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j+1][l]&&sz1[j][l]>=sz1[j][l-1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(l==0&&j!=y-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j+1][l]&&sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l+1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(l==0&&j==y-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l+1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(j==y-1&&l!=y-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j][l+1]&&sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l-1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse if(j==y-1&&l==y-1)\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l-1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(sz1[j][l]>=sz1[j+1][l]&&sz1[j][l]>=sz1[j-1][l]&&sz1[j][l]>=sz1[j][l-1])\n\t\t\t printf(\"%d %d\\n\", j, l);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n} \n"} +{"label": "72", "index": "35692", "code": "int main()\n{\n int m,n;\n cin>>m>>n;\n int a[25][25];\n for(int i=1;i>a[i][j];\n }\n }\n for(int i=1;i>m>>n;\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]\n\t\t\t&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tnum++;\n\t\t\t\thang[num]=i-1;\n\t\t\t\tlie[num]=j-1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(int i=1;ihang[j+1])\n\t\t\t{\n\t\t\t\tint t1=hang[j];\n\t\t\t\thang[j]=hang[j+1];\n\t\t\t\thang[j+1]=t1;\n\t\t\t\tint t2=lie[j];\n\t\t\t\tlie[j]=lie[j+1];\n\t\t\t\tlie[j+1]=t2;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(int i=1;i<=num;i++)\n\t\tcout<=sz[i][j-1]&&a>=sz[i][j+1]&&a>=sz[i-1][j]&&a>=sz[i+1][j]){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n \n return 0; \n}\n\n\n\n"} +{"label": "72", "index": "35695", "code": "int main()\n{\n\tint i,j,n,m,a[100][100];\n\tscanf(\"%d%d\",&n,&m);\n\tfor(i=0;i=a[i-1][j]&&i>0))\n\t\t\t{\n\t\t\t\tif(i==n-1||(a[i][j]>=a[i+1][j]&&i=a[i][j-1]&&j>0))\n\t\t\t\t\t{\n\t\t\t\t\t\tif((j==m-1||a[i][j]>=a[i][j+1]&&j=sz[a-1][b] && sz[a][b]>=sz[a+1][b] && sz[a][b]>=sz[a][b-1] && sz[a][b]>=sz[a][b+1]){printf(\"%d %d\\n\",a-1,b-1);}\n }\n }\n return 0;\n}\n "} +{"label": "72", "index": "35697", "code": "int main(){\n\tint a[20][20];\n\tint b[400];\n\tint d[400];\n\tint m,n,j;\n\tscanf(\"%d %d\",&m,&n);\n\tint i,k;\n\tj=0;\n\tfor(i=0;i=a[i+1][k]&&a[i][k]>=a[i][k+1]){\n\t\t\t\t\t\tb[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(k==n-1){\n\t\t\t\t\tif(a[i][k]>=a[i][k-1]&&a[i][k]>=a[i+1][k]){\n\t\t\t\t\t\tb[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(a[i][k]>=a[i][k-1]&&a[i][k]>=a[i+1][k]&&a[i][k]>=a[i][k+1]){\n b[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==m-1){\n\t\t\t\tif(k==0){\n\t\t\t\t\tif(a[i][k]>=a[i-1][k]&&a[i][k]>=a[i][k+1]){\n\t\t\t\t\t\tb[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(k==n-1){\n\t\t\t\t\tif(a[i][k]>=a[i-1][k]&&a[i][k]>=a[i][k-1]){\n\t\t\t\t\t\tb[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(a[i][k]>=a[i-1][k]&&a[i][k]>=a[i][k+1]&&a[i][k]>=a[i][k-1]){\n b[j]=i;\n\t\t\t\t\t\td[j]=k;\n\t\t\t\t\t\tj=j+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(k==0){\n\t\t\t\tif(a[i][k]>=a[i-1][k]&&a[i][k]>=a[i+1][k]&&a[i][k]>=a[i][k+1]){\n\t\t\t\t\tb[j]=i;\n\t\t\t\t\td[j]=k;\n\t\t\t\t\tj=j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(k==n-1){\n\t\t\t\tif(a[i][k]>=a[i][k-1]&&a[i][k]>=a[i+1][k]&&a[i][k]>=a[i-1][k]){\n\t\t\t\t\tb[j]=i;\n\t\t\t\t\td[j]=k;\n\t\t\t\t\tj=j+1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(a[i][k]>=a[i+1][k]&&a[i][k]>=a[i-1][k]&&a[i][k]>=a[i][k-1]&&a[i][k]>=a[i][k+1]){\n\t\t\t\t\tb[j]=i;\n\t\t\t\t d[j]=k;\n\t\t\t\t j=j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tint h;\n\tfor(h=1;h<=j;h++){\n\t\tint e,c;\n\t\tfor(i=0;ib[i+1]){\n\t\t\t\te=b[i+1];\n\t\t\t\tc=d[i+1];\n d[i+1]=d[i];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=e;\n\t\t\t\td[i]=c;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else if(i==0&&j==n-1){\n if(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else if(i==m-1&&j==0){\n\t\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j+1])\n printf(\"%d %d\\n\",i,j);\n\t\t\t}else if(i==m-1&&j==n-1){\n\t\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1])\n printf(\"%d %d\\n\",i,j);\n\t\t\t}else if(i==0&&j!=0&&j!=n-1){\n\t\t\t\tif(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else if(i==m-1&&j!=0&&j!=n-1){\n\t\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else if(j==0&&i!=0&&i!=m-1){\n\t\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else if(j==n-1&&i!=0&&i!=m-1){\n\t\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}else{\n\t\t\t if(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35699", "code": "/*\n * intergratedexercise1.21.cpp\n *\n * Created on: 2013-12-28\n * Author: st\n */\nint main()\n{\n\tint hill[22][22];\n\tmemset(hill,0,sizeof(hill));\n\tint m,n;\n\tcin>>m>>n;\n\tint i,j;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>hill[i][j];\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tif(hill[i][j]>=hill[i][j-1]&&hill[i][j]>=hill[i][j+1]&&hill[i][j]>=hill[i-1][j]&&hill[i][j]>=hill[i+1][j])\n\t\t\t\tcout<=x[i+1][j]&&x[i][j]>=x[i][j+1]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse if(j=x[i][j-1]&&x[i][j]>=x[i][j+1]&&x[i][j]>=x[i+1][j]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse {if(x[i][j]>=x[i+1][j]&&x[i][j]>=x[i][j-1]){h[t]=i;z[t]=j;t++;}}\n\t\t}\n\t\telse if(i=x[i-1][j]&&x[i][j]>=x[i+1][j]&&x[i][j]>=x[i][j+1]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse if(j=x[i][j-1]&&x[i][j]>=x[i][j+1]&&x[i][j]>=x[i-1][j]&&x[i][j]>=x[i+1][j]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse {if(x[i][j]>=x[i-1][j]&&x[i][j]>=x[i+1][j]&&x[i][j]>=x[i][j-1]){h[t]=i;z[t]=j;t++;}}\n\t\t}\n\t\telse for(j=0;j=x[i-1][j]&&x[i][j]>=x[i][j+1]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse if(j=x[i-1][j]&&x[i][j]>=x[i][j-1]&&x[i][j]>=x[i][j+1]){h[t]=i;z[t]=j;t++;}}\n\t\t\telse {if(x[i][j]>=x[i-1][j]&&x[i][j]>=x[i][j-1]){h[t]=i;z[t]=j;t++;}}\n\t\t}\n\t}\n\tfor(i=0;i>m>>n;\n\tint a[m][n];\n\tint i,j;\n\tfor(i=0;i>a[i][j];\n\t}\n\tfor(i=0;i=0)&&(a[i-1][j]<=a[i][j])||(i-1<0))&&\n\t\t\t\t\t((i+1=m))&&\n\t\t\t\t\t((j-1>=0)&&(a[i][j-1]<=a[i][j])||(j-1<0))&&\n\t\t\t\t\t((j+1=n))\n\t\t\t\t\t)\n\t\t\t\tcout<>m>>n;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\t\ta[i][0]=a[i][1];\n\t\ta[i][n+1]=a[i][n];\n\t}\n\tfor(j=1;j<=n;j++)\n\t{\n\t\ta[0][j]=a[1][j];\n\t\ta[m+1][j]=a[m][j];\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\tcout<> m >> n;\n for(i=0;i> a[i][j];\n }\n }\n for(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n cout << i << \" \" << j <0)\n {\n if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n cout << i << \" \" << j <=a[i+1][j]&&a[i][j]>=a[i][j-1])\n cout << i << \" \" << j <0)\n {\n if(j==0)\n {\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&a[i][j]>=a[i+1][j])\n cout << i << \" \" << j <=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n cout << i << \" \" << j <=a[i-1][j]&&a[i][j]>=a[i+1][j]&a[i][j]>=a[i][j-1]&a[i][j]>=a[i][j+1])\n cout << i << \" \" << j <=a[i-1][j]&&a[i][j]>=a[i][j+1])\n cout <0&&j=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n cout << i << \" \" << j <=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2])\n cout << m-1 << \" \" << n-1 <>m>>n;\n\n\t\tfor (int i=1;i<=m;i++)\n\t\t\t\t{ a[i][0]=-1000;a[i][n+1]=-1000;}\n\t\t\tfor (int j=1;j<=n;j++)\n { a[0][j]=-1000;a[m+1][j]=-1000;}\n\t\tfor (int i=1;i<=m;i++)\n\t\t\tfor (int j=1;j<=n;j++)\n\t\t\t\tcin>>a[i][j];\n\n\t\tfor (int i=1;i<=m;i++)\n\t\t\tfor (int j=1;j<=n;j++)\n\t\t\t\tif\n\t\t\t\t\t(\n\t\t\t\t (a[i][j]>=a[i-1][j])\n\t\t\t\t\t&&(a[i][j]>=a[i+1][j])\n\t\t\t\t\t&&(a[i][j]>=a[i][j-1])\n\t\t\t\t\t&&(a[i][j]>=a[i][j+1])\n\t\t\t\t\t)\n\t\t\t\t\tcout<>n;\n}\n"} +{"label": "72", "index": "35705", "code": "int main()\n{\n int mountain[22][22],j,k,m,n;\n scanf(\"%d %d\",&m,&n);\n for (j=0; j=a[i-1][t]&&a[i][t]>=a[i+1][t]&&a[i][t]>=a[i][t-1]&&a[i][t]>=a[i][t+1]){\n\t\t\t\tx=i-1;\n\t\t\t\ty=t-1;\n\t\t\t\tprintf(\"%d %d\\n\",x,y);\t\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n\n}"} +{"label": "72", "index": "35707", "code": "void top(int m,int n,int a[21][21])\n{\n\tint i,j;\n\tfor(i=0;i0&&a[i][j]>=a[i-1][j])||i==0)&&((i=a[i+1][j])||i==m-1)&&((j>0&&a[i][j]>=a[i][j-1])||j==0)&&((j=a[i][j+1])||j==n-1))\n\t\t\t\tcout<>m>>n;\n\tfor(i=0;i>num[i][j];\n\ttop(m,n,num);\n\treturn 0;\n}\n"} +{"label": "72", "index": "35708", "code": "int main()\n{\n\tint m,n,i,j;\n\tint data[30][30];\n\tscanf(\"%d%d\",&m,&n);\n\tfor( i = 1; i <= m; i++ )\n\t\tfor( j = 1 ; j <= n; j++ )\n\t\t\tscanf(\"%d\",&data[i][j]);\n\tfor( i = 1 ; i <= m; i++ )\n\t\tfor( j = 1; j <= n; j++ )\n\t\t{\n\t\t\tint flag = 1;\n\t\t\tif( i > 1 && data[i-1][j] > data[i][j] )\n\t\t\t\tflag = 0;\n\t\t\tif( j > 1 && data[i][j-1] > data[i][j] )\n\t\t\t\tflag = 0;\n\t\t\tif( j < n && data[i][j+1] > data[i][j] )\n\t\t\t\tflag = 0;\n\t\t\tif( i < m && data[i+1][j] > data[i][j] )\n\t\t\t\tflag = 0;\n\t\t\tif( flag )\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t\treturn 0;\n\n}"} +{"label": "72", "index": "35709", "code": "int main(){\n\tint i,k,j,m,n,e=0;\n\tint sz[102][102]={0};\n\tint s[100][2];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n scanf(\"%d\",&sz[i][j]);\n\t\t}\t\n\t}\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif(sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1]){\n\t\t\t\ts[e][0]=i-1;\n\t\t\t\ts[e][1]=j-1;\n\t\t\t\te++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i= h[x - 1][y] && h[x][y] >= h[x + 1][y] && h[x][y] >= h[x][y - 1] && h[x][y] >= h[x][y + 1])\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint main()\n{\n\tint m, n, i, j;\n\tcin >> m >> n;\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcin >> h[i][j];\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tif (f(i, j))\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\treturn 0;\n}"} +{"label": "72", "index": "35711", "code": "int main()\n{\n\tint m,n,a[25][25];\n\tcin>>m>>n;\n\tmemset(a,0,sizeof(a));\n\tfor(int i=1;i<=m;i++)\n\t\t\tfor(int j=1;j<=n;j++)\n\t\t\t\tcin>>a[i][j];\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t\tcout<0;i--){ht[i][n+1]=0;}\n for(j=n+1;j>0;j--){ht[0][j]=0;}\n \n for(i=1;i<=m;i++){\n for(j=1;j<=n;j++){\n scanf(\"%d\",&ht[i][j]); } } \n for(i=1;i<=m;i++){\n for(j=1;j<=n;j++){\n if(ht[i][j]>=ht[i-1][j]&&ht[i][j]>=ht[i+1][j]&&ht[i][j]>=ht[i][j-1]&&ht[i][j]>=ht[i][j+1]){\n printf(\"%d %d\\n\",i-1,j-1);\n }}} \n \n return 0; \n}"} +{"label": "72", "index": "35713", "code": "int main()\n{\n\tint m,n,i,j,a[25][25],x[25][25];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j]) x[i][j]=1;}\n\t\t\tif(i==0&&j!=0&&j!=n-1) {if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]) x[i][j]=1;}\n\t\t\tif(i==0&&j==n-1) {if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]) x[i][j]=1;}\n\t\t\tif(i!=0&&i!=m-1&&j==0) {if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]) x[i][j]=1;}\n\t\t\tif(i!=0&&i!=m-1&&j!=0&&j!=n-1) {if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) x[i][j]=1;}\n\t\t\tif(i!=0&&i!=m-1&&j==n-1) {if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]) x[i][j]=1;}\n\t\t\tif(i==m-1&&j==0) {if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]) x[i][j]=1;}\n\t\t\tif(i==m-1&&j!=0&&j!=n-1) {if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]) x[i][j]=1;}\n\t\t\tif(i==m-1&&j==n-1) {if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]) x[i][j]=1;}\n\t\t}\n\t}\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j==n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==0)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0)\n\t\t\t{\n\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t else if(j==0)\n\t\t\t{\n\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t else if(i==m-1)\n\t\t\t{\n\t\t\tif(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(j==n-1)\n\t\t\t{\n\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t \tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\n}"} +{"label": "72", "index": "35715", "code": "int area[100][100];\nint main(){\n int m;\n int n;\n int i;\n int j;\n scanf(\"%d\",&m);\n scanf(\"%d\",&n); \n for(i=0;i=area[i-1][j])&&(area[i][j]>=area[i+1][j])&&(area[i][j]>=area[i][j-1])&&(area[i][j]>=area[i][j+1])){\n printf(\"%d %d\\n\",i,j); }}\n }\n return 0;\n}"} +{"label": "72", "index": "35716", "code": "struct p\n{\n\tint m;\n\tint n;\n}a[20];\nint main()\n{\n\tint m, n, i, j, num[22][22], count = 0, l, k;\n\tcin >> m >> n;\n\tfor(l = 0; l < 22; l++)\n\t\tfor(k = 0; k < 22; k++)\n\t\t\tnum[l][k] = 0;\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j <= n; j++)\n\t\t\tcin >> num[i][j];\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tif(num[i][j] >= num[i - 1][j] && num[i][j] >= num[i][j - 1] && num[i][j] >= num[i][j + 1] && num[i][j] >= num[i + 1][j])\n\t\t\t{\n\t\t\t\ta[count].m = i - 1;\n\t\t\t\ta[count].n = j - 1;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\tfor(i = 0; i < count; i++)\n\t{\n\t\tcout << a[i].m << \" \" << a[i].n << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35717", "code": "int main()\n{\n\tint a,e,m,n,i,j;\n\tint sz[22][22];\n\tscanf(\"%d%d\",&m,&n); \n\tfor(i=0;i=sz[i+1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1]){\n\t\t\t\ta=i-1;\n\t\t\t\te=j-1;\n\t\t\t\tprintf(\"%d %d\\n\",a,e);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35718", "code": "int main()\n{\n\tint a[21][21],i,j,m,n;\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor (i=0;i=a[i+1][j] && a[i][j]>=a[i][j+1] )\n\t\t\t\t\tcout<=a[i+1][j] && a[i][j]>=a[i][j-1] )\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i+1][j])\n\t\t\t\t\tcout<=a[i-1][j] && a[i][j]>=a[i][j+1] )\n\t\t\t\t\tcout<=a[i-1][j] && a[i][j]>=a[i][j-1] )\n\t\t\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j])\n\t\t\t\t\tcout<=a[i-1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i+1][j])\n\t\t\t\t\tcout<=a[i-1][j] && a[i][j]>=a[i][j-1] && a[i][j]>=a[i+1][j])\n\t\t\t\t\tcout<=a[i-1][j] && a[i][j]>=a[i][j-1]\n\t\t\t && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1] )\n\t\t\t\tcout<=a[i][b-1]&&a[i][b]>=a[i][b+1]&&a[i][b]>=a[i-1][b]&&a[i][b]>=a[i+1][b]){c=i-1;d=b-1;printf(\"%d %d\\n\",c,d);}\n }\n }\n return 0;\n}"} +{"label": "72", "index": "35720", "code": "int dx[4] = {1, -1, 0, 0};\nint dy[4] = {0, 0, 1, -1};\nint main()\n{\n\tint m, n;\n\tcin >> m >> n;\n\tdouble mount[22][22];\n\tfor (int i = 0; i < m; i++)\n\t\tfor (int j = 0; j < n; j++)\n\t\t\tcin >> mount[i][j];\n\tfor (int i = 0; i < m; i++)\n\t\tfor (int j = 0; j < n; j++)\n\t\t{\n\t\t\tint num = 0;\n\t\t\tdouble sum = 0;\n\t\t\tint k;\n\t\t\tfor (k = 0; k < 4; k++)\n\t\t\t{\n\t\t\t\tint tempi = i + dx[k];\n\t\t\t\tint tempj = j + dy[k];\n\t\t\t\tif (tempi >= 0 && tempi < m && tempj >= 0 && tempj < n)\n\t\t\t\t{\n\t\t\t\t\tif(mount[i][j] < mount[tempi][tempj])\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (k == 4)\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35721", "code": "int main()\n{\n\tint m,n,h[20][20];\n\tcin >> m >> n;\n\tint i,j;\n\tfor (i = 0; i>h[i][j];\n\tfor (i = 0; i= 0 && h[i][j] < h[i-1][j])+ !(i + 1 < m && h[i][j] < h[i+1][j])+!(j - 1 >= 0 && h[i][j] < h[i][j-1])\n\t\t\t\t+!(j+ 1 =0 && i1=0 &&j1=s[e+1][d]&&s[e][d]>=s[e-1][d]&&s[e][d]>=s[e][d+1]&&s[e][d]>=s[e][d-1]){\n\t\t\tprintf(\"%d %d\\n\",e-1,d-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35724", "code": "int main()\n{\n\tint a[22][22]={0};\n\tint m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\tfor(j=1;j<=n;j++)\n\tcin>>a[i][j];\n\tfor(i=1;i<=m;i++)\n\tfor(j=1;j<=n;j++)\n\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\tcout<>m>>n;\n\tfor(i=2;i<=m+1;i++)\n\t\tfor(j=2;j<=n+1;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=2;i<=m+1;i++)\n\t{\n\t\tfor(j=2;j<=n+1;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tx[count]=i;\n\t\t\t\ty[count]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=count-1;i++)\n\t\tcout<> m >> n;\n\tfor (i = 0; i < m;i++)\n\t\tfor ( j = 0; j > a[i][j];\n\tfor (i = 0; i < m;i++)\n\t{\n\t\tfor ( j = 0; j < n;j++)\n\t\t{\n\t\t\tif (j == n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tif (i ==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (a[i][j]>= a[i+1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <=a[i-1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j])&&( a[i][j] >=a[i-1][j]))\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tif (i ==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (a[i][j]>= a[i+1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <=a[i-1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j])&&( a[i][j] >=a[i-1][j]))\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i][j+1]) && (a[i][j] >= a[i][j-1]))\n\t\t\t\t{\n\t\t\t\t\tif ( i == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (a[i][j] >=a[i+1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j])\n\t\t\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j]) && (a[i][j] >= a[i+1][j]))\n\t\t\t\t\t\t\tcout << i << \" \" << j <=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse\n\t\t\t\tif(i==0&&j==n-1)\n\t\t\t\t{\n\t\t\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t \tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t \tif(i==m-1&&j==0)\n\t\t\t\t\t{\n\t\t\t\t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t \tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t \tif(i==m-1&&j==n-1)\n\t\t\t\t\t\t{\n\t\t\t \t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t \tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(i==0)\n\t\t\t\t\t\t\t{\n\t\t\t \t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(i==m-1)\n\t\t\t\t\t\t\t{\n\t\t\t \t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(j==0)\n\t\t\t\t\t\t\t{\n\t\t\t \t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(j==n-1)\n\t\t\t\t\t\t\t{\n\t\t\t \t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t\t}\n}"} +{"label": "72", "index": "35728", "code": "\nint main()\n{\n \tint a[25][25], m, n, k;\n \tint dx[4] = { 0, 0, 1, -1 }, dy[4] = { 1, -1, 0, 0 };\n \tcin >> m >> n;\n \t\n \tfor ( int i = 0; i < m; i++ )\n \t{\n \t \tfor ( int j = 0; j < n; j++ )\n \t \t\tcin >> a[i][j];\n \t}\n \t\n \tfor ( int i = 0; i < m; i++ )\n \t{\n \t \tfor ( int j = 0; j < n; j++ )\n \t \t{\n \t \t \tfor ( k = 0; k < 4; k++ )\n \t \t \t{\n \t \t\t \tif ( i + dx[k] >= 0 && i + dx[k] < m && j + dy[k] >= 0 && j + dy[k] < n )\n \t \t\t \t{\n \t \t \t\t if ( a[i][j] < a[i+dx[k]][j+dy[k]] )\n \t \t \t\t break;\n\t\t \t\t}\n\t\t\t}\n\t\t\tif ( k == 4 )\n\t\t\t cout << i << \" \" << j << endl;\n\t \t}\n \t}\n \treturn 0;\n}"} +{"label": "72", "index": "35729", "code": "\nint main(int argc, char* argv[])\n{\n\tint (*p)[22],i,j,a,b;\n\tp=(int(*)[22])calloc(22,22*sizeof(int));\n\tscanf(\"%d %d\",&a,&b);\n\tmemset(p,0,sizeof(p));\n\tfor(i=1;i=*(*(p+i-1)+j)&&*(*(p+i)+j)>=*(*(p+i+1)+j)&&*(*(p+i)+j)>=*(*(p+i)+j+1)&&*(*(p+i)+j)>=*(*(p+i)+j-1))\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n}\n"} +{"label": "72", "index": "35730", "code": "int main(){\n int i,j;\n int n,m;\n\tscanf(\"%d %d\",&m,&n);\n\tint sz[23][23];\n\tfor(i=0;i<=m+1;i++){\n\t\tfor(j=0;j<=n+1;j++){\n\t\t\tsz[i][j]=0;\n\t\t}\n\t}\n for(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",&(sz[i][j]));\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif((sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n \n\n"} +{"label": "72", "index": "35731", "code": "int main () {\n\tint m , n , order = 1;\n\tint i , j ;\n\tcin >> m >> n ;\n\tint a[25][25] ,peakx[444],peaky[444];\n\tfor ( i = 1 ; i <= m ; i ++ ) {\n\t\tfor ( j =1 ; j <= n ; j ++ ) {\n\t\t\tcin >> a[i][j] ;\n\t\t}\n\t}\n\tif ( ( a[1][1] >= a[1][2]) && ( a[1][1] >= a[2][1] ) ) {\n\t\tpeakx[order] = 1 ;\n\t\tpeaky[order] = 1 ;\n\t\torder ++ ;\n\t}\n\tfor ( i = 2 ; i < n ; i ++ ) {\n\t\tif ( ( a[1][i] >= a[1][i+1]) && ( a[1][i] >= a[1][i-1] ) && ( a[1][i] >= a[2][i] ) ) {\n\t\t\tpeakx[order] = 1 ;\n\t\t\tpeaky[order] = i ;\n\t\t\torder ++ ;\n\t\t}\n\t}\n\tif ( ( a[1][n] >= a[1][n-1]) && ( a[1][n] >= a[2][n] ) ) {\n\t\tpeakx[order] = 1 ;\n\t\tpeaky[order] = n ;\n\t\torder ++ ;\n\t}\n\tfor ( i = 2 ; i < m ; i ++ ) {\n\t\tif ( ( a[i][1] >= a[i][2]) && ( a[i][1] >= a[i-1][1] ) && ( a[i][1] >= a[i+1][1] ) ) {\n\t\t\tpeakx[order] = i ;\n\t\t\tpeaky[order] = 1 ;\n\t\t\torder ++ ;\n\t\t}\n\t\tfor ( j = 2 ; j < n ; j ++ ) {\n\t\t\tif ( ( a[i][j] >= a[i][j+1]) && ( a[i][j] >= a[i][j-1] ) && ( a[i][j] >= a[i+1][j] ) && ( a[i][j] >= a[i-1][j] ) ) {\n\t\t\tpeakx[order] = i ;\n\t\t\tpeaky[order] = j ;\n\t\t\torder ++ ;\n\t\t\t}\n\t\t}\n\t\tif ( ( a[i][n] >= a[i][n-1]) && ( a[i][n] >= a[i-1][n] ) && ( a[i][n] >= a[i+1][n] ) ) {\n\t\t\tpeakx[order] = i ;\n\t\t\tpeaky[order] = n ;\n\t\t\torder ++ ;\n\t\t}\n\t}\n\tif ( ( a[m][1] >= a[m][2]) && ( a[m][1] >= a[m-1][1] ) ) {\n\t\tpeakx[order] = m ;\n\t\tpeaky[order] = 1 ;\n\t\torder ++ ;\n\t}\n\tfor ( i = 2 ; i < n ; i ++ ) {\n\t\tif ( ( a[m][i] >= a[m][i+1]) && ( a[m][i] >= a[m][i-1] ) && ( a[m][i] >= a[m-1][i] ) ) {\n\t\t\tpeakx[order] = m ;\n\t\t\tpeaky[order] = i ;\n\t\t\torder ++ ;\n\t\t}\n\t}\n\tif ( ( a[m][n] >= a[m][n-1]) && ( a[m][n] >= a[m-1][n] ) ) {\n\t\tpeakx[order] = m ;\n\t\tpeaky[order] = n ;\n\t\torder ++ ;\n\t}\n\tfor ( i = 1 ; i < order ; i ++ ) {\n\t\tcout << peakx[i] -1 << \" \" << peaky[i] - 1 ;\n\t\tif ( i != ( order-1 ) )\n\t\t\tcout << endl ;\n\t}\n\treturn 0 ;\n}"} +{"label": "72", "index": "35732", "code": "int main(){\n\tint k,i,j,m,n,x[1000],y[1000];\n\tscanf(\"%d%d\", &m, &n);\n\tint a[A+2][A+2]={0};\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tscanf(\"%d\", &a[i][j]);\n\t\t}\n\t}\n\tk=0;\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif(a[i][j] >= a[i-1][j] && a[i][j] >= a[i+1][j] &&\n\t\t\t\ta[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1]){\n\t\t\t\tx[k]=i-1;\n\t\t\t\ty[k]=j-1;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35734", "code": "int main(){\n\tint a[25][25],m,n,p,q,s=0,l,f;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(p=1;pa[0][1]&&a[0][0]>a[1][0])\n printf(\"0 0\\n\");\n for(j=1;j=a[0][j+1]&&a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j])\n printf(\"0 %d\\n\",j); \n }\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]) \n printf(\"0 %d\\n\",n-1);\n \n \n \n for(i=1;i=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1])\n printf(\"%d 0\\n\",i);\n for(j=1;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j); \n }\n if(a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]&&a[i][n-1]>=a[i][n-2])\n printf(\"%d %d\\n\",i,n-1); \n } \n\n \n \n \n if(a[m-1][0]>=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n printf(\"%d 0\\n\",m-1);\n for(j=1;j=a[m-1][j+1]&&a[m-1][j]>=a[m-1][j-1]&&a[m-1][j]>=a[m-2][j])\n printf(\"%d %d\\n\",m-1,j); \n } \n if(a[m-1][n-1]>=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1]) \n printf(\"%d %d\\n\",m-1,n-1); \n \n getchar();\n getchar();\n return 0; \n \n \n \n \n}\n"} +{"label": "72", "index": "35736", "code": "int main()\n{\n\tint m,n,i,j;\n\tscanf(\"%d %d\\n\",&m,&n);\n\tint sz[22][22];\n\tfor(i=0;i=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1]){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);}}}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35737", "code": "int main(){\n\tint sz[max+2][max+2]={0};\n\tint m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i=sz[i][j+1] && sz[i][j]>=sz[i][j-1] && sz[i][j]>=sz[i+1][j] && sz[i][j]>=sz[i-1][j])\n\t\t\t{printf(\"%d %d\\n\",i-1,j-1);}\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "72", "index": "35738", "code": "int a[21][21];\nint main()\n{\n int m,n,i,j,f;\n int s=0;\n scanf(\"%d%d\",&m,&n);\n f=0;\n for(i=0;i<=m+1;i++)\n {\n for(j=0;j<=n+1;j++)\n {\n if(i==0 && i==n+1 && j==0 && j==m+1)\n a[i][j]==0;\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n { \n if(a[i][j]>=a[i][j+1] && a[i][j]>=a[i][j-1] && \n a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j]) \n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n return 0;\n}"} +{"label": "72", "index": "35739", "code": "int main()\n{\n\tint m,n,i,j;\n\tint a[20][20];\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\tcout<=sz[i+1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1])||\n (i==1&&j==1&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])||\n (i==m&&j==n&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i-1][j])||\n (i==1&&j!=1&&j!=n&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i+1][j])||\n (i==m&&j!=1&&j!=n&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j])||\n (j==1&&i!=1&&i!=m&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j+1])||\n (j==n&&i!=1&&i!=m&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1])||\n (i==1&&j==n&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j])||\n (i==m&&j==1&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j+1])){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n}\n}\nreturn 0;\n}\n\n\n"} +{"label": "72", "index": "35741", "code": "int main(){\n\tint sz[21][21];\n\tint i,j;\n\tint x;\n\tint m,n;\n\tint S=0,C=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i<=m+1;i++){\n\t\tfor(j=0;j<=n+1;j++){\n\t\t\tsz[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\t\n\n\n"} +{"label": "72", "index": "35742", "code": "int main ()\n{\n\tint m = 0, n = 0; //????????\n\tint a[21][21] = {0}; //????\n\tint i = 0, j = 0;\n\tcin >> m >> n;\n\tfor(i = 0; i < m ; i ++)\n\t\tfor(j = 0 ; j < n ; j ++)\n\t\t\tcin >> a[i][j]; //????\n\tfor(i = 0; i < m; i ++)\n\t\tfor(j = 0 ; j < n; j ++)\n\t\t{\n\t\t\tint flag = 1; //???????????????\n\t\t\tif((i - 1 >= 0) && (a[i - 1][j] > a[i][j]))\n\t\t\t\tflag = 0;\n\t\t\tif((j - 1 >= 0) && (a[i][j - 1] > a[i][j]))\n\t\t\t\tflag = 0;\n\t\t\tif((i + 1 < m) && (a[i + 1][j] > a[i][j]))\n\t\t\t\tflag = 0;\n\t\t\tif((j + 1 < n) && (a[i][j + 1] > a[i][j]))\n\t\t\t\tflag = 0;\n\t\t\tif(flag == 1)\n\t\t\t\tcout << i << ' ' << j << endl;//???????\n\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35743", "code": "int main ()\n{int m,n;\nscanf(\"%d%d\",&m,&n);\nint mj[m][n];\nfor (int i1=0;i1=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2+1]){printf(\"%d %d\\n\",i2,j2);}\n if(i2==0&&j2==n-1&&mj[i2][j2]>=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2-1]){printf(\"%d %d\\n\",i2,j2);}\n if(i2==m-1&&j2==0&&mj[i2][j2]>=mj[i2-1][j2]&&mj[i2][j2]>=mj[i2][j2+1]){printf(\"%d %d\\n\",i2,j2);}\n if(i2==m-1&&j2==n-1&&mj[i2][j2]>=mj[i2-1][j2]&&mj[i2][j2]>=mj[i2][j2-1]){printf(\"%d %d\\n\",i2,j2);}\n if(i2==0&&j2!=0&&j2!=n-1&&mj[i2][j2]>=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2+1]&&mj[i2][j2]>=mj[i2][j2-1]){printf(\"%d %d\\n\",i2,j2);}\n if(i2==m-1&&j2!=0&&j2!=n-1&&mj[i2][j2]>=mj[i2-1][j2]&&mj[i2][j2]>=mj[i2][j2+1]&&mj[i2][j2]>=mj[i2][j2-1]){printf(\"%d %d\\n\",i2,j2);}\n if(j2==0&&i2!=0&&i2!=m-1&&mj[i2][j2]>=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2+1]&&mj[i2][j2]>=mj[i2-1][j2]){printf(\"%d %d\\n\",i2,j2);}\n if(j2==n-1&&i2!=0&&i2!=m-1&&mj[i2][j2]>=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2-1]&&mj[i2][j2]>=mj[i2-1][j2]){printf(\"%d %d\\n\",i2,j2);}\n }\n else{\n if (mj[i2][j2]>=mj[i2-1][j2]&&mj[i2][j2]>=mj[i2+1][j2]&&mj[i2][j2]>=mj[i2][j2-1]&&mj[i2][j2]>=mj[i2][j2+1]){printf(\"%d %d\\n\",i2,j2);} \n }\n }\n}\nreturn 0;\n}\n\n"} +{"label": "72", "index": "35744", "code": "int main(){\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tint bo[m][n];\n\tfor(i=0;i>bo[i][j];\n\tif(bo[0][0]>=bo[0][1]&&bo[0][0]>=bo[1][0])\n\t\tcout<<0<<\" \"<<0<=bo[0][j-1]&&bo[0][j]>=bo[0][j+1]&&bo[0][j]>=bo[1][j])\n\t\t\tcout<<0<<\" \"<=bo[0][n-2]&&bo[0][n-1]>=bo[1][n-1])\n\t\t\tcout<<0<<\" \"<=bo[i-1][0]&&bo[i][0]>=bo[i+1][0]&&bo[i][0]>=bo[i][1])\n\t\t\tcout<=bo[i-1][j]&&bo[i][j]>=bo[i+1][j]&&bo[i][j]>=bo[i][j-1]&&bo[i][j]>=bo[i][j+1])\n\t\t\t\tcout<=bo[i-1][n-1]&&bo[i][n-1]>=bo[i+1][n-1]&&bo[i][n-1]>=bo[i][n-2])\n\t\t\t\tcout<=bo[m-1][1]&&bo[m-1][0]>=bo[m-2][0])\n\t\tcout<=bo[m-1][j-1]&&bo[m-1][j]>=bo[m-1][j+1]&&bo[m-1][j]>=bo[m-2][j])\n\t\t\tcout<=bo[m-1][n-2]&&bo[m-1][n-1]>=bo[m-2][n-1])\n\t\tcout<=hill[i-1][j])\n if(i==m-1||hill[i][j]>=hill[i+1][j])\n if(j==0||hill[i][j]>=hill[i][j-1])\n if(j==n-1||hill[i][j]>=hill[i][j+1])\n printf(\"%d %d\\n\",i,j);\n return 1;\n} \n \n"} +{"label": "72", "index": "35746", "code": "main()\n{\n int a[21][21];\n int i,j,k,m,n;\n for(i=0;i<21;i++)\n for(j=0;j<21;j++)\n a[i][j]=0;\n scanf(\"%d %d\",&m,&n);\n for(i=1;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n\n\n\n}\n"} +{"label": "72", "index": "35747", "code": "main()\n{\n int m,n,i,j,k;\n scanf(\"%d %d\",&m,&n);\n int a[m+2][n+2];\n for(i = 0;i < m+2;i++)\n for(j = 0;j < n+2;j++)\n a[i][j] = 0;\n for(i = 1;i <= m;i++)\n for(j = 1;j <= n;j++)\n scanf(\"%d\",&a[i][j]);\n for(i = 1;i <= m;i++)\n {\n for(j = 1;j <= n;j++)\n {\n if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n getchar();\n getchar();\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35748", "code": "int main(int argc, char* argv[])\n{\n\tint len,wid,i,j,a[20][20];\n\tscanf(\"%d%d\",&len,&wid);\n\tfor(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==0&&j==(wid-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(len-1)&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(len-1)&&j==(wid-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(i==0&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n\t\telse if(i==(len-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(j==(wid-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\telse if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35749", "code": "int main()\n{\n int m,n,i,j;\n int a[22][22],b[22][22];\n for(i=0;i<22;i++)\n {\n for(j=0;j<22;j++)\n {\n a[i][j]=-1;\n b[i][j]=0;\n }\n }\n scanf(\"%d %d\",&m,&n);\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n {\n b[i][j]=1;\n }\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(b[i][j]==1)\n {\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35750", "code": "\nint main(){\n int m,n,array[21][21],i,j;\n cin>>m>>n;\n for(i=1;i<=m;i++)\n\t for(j=1;j<=n;j++)\n\t\t cin>>array[i][j];\n if(array[1][1]>=array[1][2]&&array[1][1]>=array[2][1])\n\t cout<<0<<' '<<0<=array[1][i-1]&&array[1][i]>=array[1][i+1]&&array[1][i]>=array[2][i])\n\t\t cout<<0<<' '<=array[1][n-1]&&array[1][n]>=array[2][n])\n\t cout<<0<<' '<=array[i-1][1]&&array[i][1]>=array[i+1][1]&&array[i][1]>=array[i][2])\n \t\t\t\t cout<=array[i-1][n]&&array[i][n]>=array[i+1][n]&&array[i][n]>=array[i][n-1])\n \t\t\t \t\tcout<=array[i][j+1]&&array[i][j]>=array[i][j-1]&&array[i][j]>=array[i+1][j]&&array[i][j]>=array[i-1][j])\n \t\t\t cout<=array[m][2]&&array[m][1]>=array[m-1][1])\n\t cout<=array[m][i-1]&&array[m][i]>=array[m][i+1]&&array[m][i]>=array[m-1][i])\n\t\t cout<=array[m][n-1]&&array[m][n]>=array[m-1][n])\n\t cout<=shuzu[p][w-1]&&shuzu[p][w]>=shuzu[p][w+1]){\n\n\t\t\t\tif(shuzu[p][w]>=shuzu[p+1][w]&&shuzu[p][w]>=shuzu[p-1][w]){\n\t\t\t printf(\"%d %d\\n\",p-1,w-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\n\treturn 0;\n}"} +{"label": "72", "index": "35752", "code": "int main()\n{\n\tint n,m,i,j,A[25][25];\n\tcin>>n>>m;\n\tfor(i=0;i<25;i++)\n\t\tfor(j=0;j<25;j++)\n\t\t\tA[i][j]=0;\n\tfor(i=1;i<=n;i++)\n\t\tfor(j=1;j<=m;j++)\n\t\t\tcin>>A[i][j];\n\tfor(i=1;i<=n;i++)\n\t\tfor(j=1;j<=m;j++)\n\t\t\tif(A[i+1][j]-A[i][j]<=0&&A[i][j+1]-A[i][j]<=0&&A[i-1][j]-A[i][j]<=0&&A[i][j-1]-A[i][j]<=0)\n\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\",i,j);\n\t\t\t printf(\"\\n\");\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35754", "code": "main()\n{\n int m,n,i,j,c;\n scanf(\"%d %d\",&m,&n);\n int a[100][100]={0};\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n scanf(\"%d\",&a[i][j]);\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35755", "code": "int comp(int point, int up, int down, int left, int right)\n{\n if ((point>=up)&&(point>=down)&&(point>=left)&&(point>=right)) return 1;\n else return 0;\n}\nint main()\n{\n int a[22][22],j,k,m,n;\n scanf(\"%d%d\",&m,&n);\n for(j=0;j=a[i-1][j]&&a[i][j]>=a[i+1][j]\n &&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n\n\n\n}\n"} +{"label": "72", "index": "35757", "code": "int high(int h,int i,int j);\nint away(int i,int j);\nint num[30][30],m,n;\nint main()\n{\n\tint i,j;\n\tcin>>m>>n;\n\tfor(i=0;i>num[i][j];\n\tfor(i=0;i=m)\n\t\treturn 1;\n\tif(j<0||j>=n)\n\t\treturn 1;\n\treturn 0;\n}"} +{"label": "72", "index": "35758", "code": "void main()\n{\n\tint n,m,a[25][25],i,j;\n\tchar c;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tscanf(\"%d%c\",&a[i][j],&c);\n for(j=0;j<=n+1;j++)\n\t{\n\t\ta[0][j]=-1;\n\t\ta[m+1][j]=-1;\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][0]=-1;\n\t\ta[i][n+1]=-1;\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n}\n\n"} +{"label": "72", "index": "35759", "code": "int main()\n{\n\tint m,n,i,j;\n\tint a[20][20];\n\tscanf(\"%d %d\\n\",&m,&n);\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\telse if(j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t{\n\t printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t{\n printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\telse if(i==m-1)\n\t\t\t{\n\t\t\t\tfor(j=0;j=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t{\n\t printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t{\n\t printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor(j=0;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(j==n-1)\n\t\t\t\t\t{\n\t if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\t\t {\n printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t }\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\n\t\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t{\n printf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\n\t\n\t\t\n\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35760", "code": "\nint main()\n{\n int m,n;\n int a[25][25];\n \n cin>>m>>n;\n \n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)\n cin>>a[i][j];\n \n for(int i=1;i<=m;i++)\n {\n a[i][0]=0;\n a[i][n+1]=0;\n }\n for(int i=1;i<=n;i++)\n {\n a[0][i]=0;\n a[m+1][i]=0;\n } \n \n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)\n if(a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j-1] && a[i][j]>=a[i][j+1])\n cout<>m>>n;\n for(i=0;i<=m+1;i++)\n {\n for(j=0;j<=n+1;j++)\n {\n a[i][j]=0;\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {cin>>x;a[i][j]=x;} \n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n {k=i-1;l=j-1;\n cout<>m>>n;\n\tfor (i=1;i<=m;i++)\n\t\tfor (j=1;j<=n;j++)\n\t\t\tcin>>map[i][j];\n\tfor (i=1;i<=m;i++)\n\t\tfor (j=1;j<=n;j++)\n\t\t\tif ((map[i][j]>=map[i-1][j])&&(map[i][j]>=map[i+1][j])&&(map[i][j]>=map[i][j-1])&&(map[i][j]>=map[i][j+1]))\n\t\t\t{p++;x[p]=i;y[p]=j;}\n\tfor (i=1;i<=p;i++)\n\t{\n\t\tcout<>m>>n;\n\n\tfor(int i=1; i<=m; i++)\n\t{\n\t\tfor(int j=1; j<=n; j++)\n\t\t{\n\t\t\tcin>>hill[i][j];\n\t\t\n\t\t}\t\n\t}\n\t\t\n\n\n\n\n\n\n\n\n\tfor(int i=1; i<=m; i++)\n\t{\n\t\tfor(int j=1; j<=n; j++)\n\t\t{\n\t\t\t\n\t\t\t\tif(hill[i][j]>=hill[i-1][j]\t&&hill[i][j]>=hill[i+1][j] && hill[i][j]>=hill[i][j-1] && hill[i][j]>=hill[i][j+1])\n\t\t\t\t\tcout<< i-1<<\" \"<> m >> n;\n\tfor(i = 1; i <= m; i++)\n\t{\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor(i = 0; i <= n + 1; i++)\n\t{\n\t\ta[0][i] = 0;\n\t\ta[m + 1][i] = 0;\n\t\ta[i][0] = 0;\n\t\ta[n + 1][0] = 0;\n\t}\n\tfor(i = 1; i <= m; i++)\n\t{\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tif(a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1])\n\t\t\t{\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35765", "code": "int main(){\nint m,n,i,j,k,y;\nscanf(\"%d%d\",&m,&n);\nint a[m][n];\nfor(i=0;i=a[0][1]&&a[0][0]>=a[1][0]){\nprintf(\"0 0\\n\");\n}\nfor(i=1;i=a[0][i-1]&&a[0][i]>=a[0][i+1]&&a[0][i]>=a[1][i]){\nprintf(\"0 %d\\n\",i);\n}\n}\nif(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]){\nprintf(\"0 %d\\n\",n-1);\n}\nfor(k=1;k=a[k-1][0]&&a[k][0]>=a[k][1]&&a[k][0]>=a[k+1][0]){\nprintf(\"%d 0\\n\",k);\n}\nfor(i=1;i=a[k-1][i]&&a[k][i]>=a[k][i-1]&&a[k][i]>=a[k][i+1]&&a[k][i]>=a[k+1][i]){\nprintf(\"%d %d\\n\",k,i);\n}\n}\nif(a[k][n-1]>=a[k-1][n-1]&&a[k][n-1]>=a[k][n-2]&&a[k][n-1]>=a[k+1][n-1]){\nprintf(\"%d %d\\n\",k,n-1);\n}\n}\nif(a[m-1][0]>=a[m-1][1]&&a[m-1][0]>=a[m-2][0]){\nprintf(\"%d 0\\n\",m-1);\n}\nfor(i=1;i=a[m-1][i-1]&&a[m-1][i]>=a[m-1][i+1]&&a[m-1][i]>=a[m-2][i]){\nprintf(\"%d %d\\n\",m-1,i);\n}\n}\nif(a[m-1][n-1]>=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1]){\nprintf(\"%d %d\\n\",m-1,n-1);\n}\nreturn 0;\n}"} +{"label": "72", "index": "35766", "code": " int main(){\n int m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n int a[m+2][n+2];\n for(j=0;j<=n+1;j++){\n a[0][j]=0;\n a[m+1][j]=0;\n }\n for(i=1;i<=m;i++){\n a[i][0]=0;\n a[i][n+1]=0;\n } \n for(i=1;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n scanf(\"%d\",&n);\n return 0;\n}\n"} +{"label": "72", "index": "35767", "code": "int a[25][25];\nint main()\n{\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[i-1][j])&&\n\t\t(j-1<0||a[i][j]>=a[i][j-1])&&\n\t\t(i+1>=m||a[i][j]>=a[i+1][j])&&\n\t\t(j+1>=n||a[i][j]>=a[i][j+1]))\n\t\t cout<=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t{\n\t\t\t\tI[p]=(i-1);\n\t\t\t\tJ[p]=(j-1);\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i>m>>n ;\n\tint a[22][22] = {0} ;\n\tfor(i=1 ; i<=m ; i++)\n\t{\n\t\tfor(j=1; j<=n ; j++)\n\t\t{\n\t\t\tcin>>a[i][j] ;\n\t\t}\n\t}\n\tint b[400][2] ;\n\tint count = 0 ;\n\tfor(i=1 ; i<=m ; i++)\n\t{\n\t\tfor(j=1 ; j<=n ; j++)\n\t\t{\n\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t{\n\t\t\t\tb[count][0] = i-1 ;\n\t\t\t\tb[count][1] = j-1 ;\n\t\t\t\tcount++ ;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0 ; ib[j+1][1])\n\t\t\t{\n\t\t\t\tint temp1,temp2 ;\n\t\t\t\ttemp1 = b[j][0] ;\n\t\t\t\tb[j][0] = b[j+1][0] ;\n\t\t\t\tb[j+1][0] = temp1 ;\n\t\t\t\ttemp2 = b[j][1] ;\n\t\t\t\tb[j][1] = b[j+1][1] ;\n\t\t\t\tb[j+1][1] = temp2 ;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0 ; ib[j+1][0])\n\t\t\t{\n\t\t\t\tint temp3,temp4 ;\n\t\t\t\ttemp3= b[j][0] ;\n\t\t\t\tb[j][0] = b[j+1][0] ;\n\t\t\t\tb[j+1][0] = temp3 ;\n\t\t\t\ttemp4 = b[j][1] ;\n\t\t\t\tb[j][1] = b[j+1][1] ;\n\t\t\t\tb[j+1][1] = temp4 ;\n\t\t\t}\n\t\t}\n\t}\n\tfor( i = 0 ; i=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i==0&&j>0&&j=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i==0&&j==n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i>0&&i=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i>0&&i0&&j=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i>0&&i=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i==m-1&&j==0&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i==m-1&&j>0&&j=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tif(i==m-1&&j==n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35771", "code": "int main()\n{\n int m, n, i, j, a[30][30];\n for (i=0; i<30; i++)\n for (j=0; j<30; j++)\n a[i][j]=0;\n cin >> m >> n;\n for (i=1; i<=m; i++)\n for (j=1; j<=n; j++)\n cin >> a[i][j];\n for (i=1; i<=m; i++)\n for (j=1; j<=n; j++)\n {\n if (a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i][j-1])\n cout << i-1 << ' ' << j-1 <<'\\n';\n }\n return 0;\n\n\n}\n"} +{"label": "72", "index": "35772", "code": "int main()\n{\n int m,n;\n cin>>m>>n;\n int a[30][30];\n for(int i=0;i<30;i++)\n for(int j=0;j<30;j++)\n {a[i][j]=-1;}\n for(int i=0;i>a[i][j];}\n if(a[0][0]>=a[0][1]&&a[0][0]>=a[1][0]) cout<<\"0 0\"<=a[0][i+1]&&a[0][i]>=a[0][i-1]&&a[0][i]>=a[1][i])\n cout<<\"0 \"<=a[i][1]&&a[i][0]>=a[i-1][0]&&a[i][0]>=a[i+1][0])\n cout<=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n cout<=a[m-1][1]&&a[m-1][0]>=a[m-2][0]&&a[m-1][0]>=a[m-2][1]) cout<=a[m-1][i-1]&&a[m-1][i]>=a[m-2][i]&&a[m-1][i]>=a[m-1][i+1])\n cout<>m>>n;\n\t\n\tmemset(w,-32768,sizeof(int));\n\tfor(int i=1;i<=m;i++)for(int j=1;j<=n;j++)cin>>w[i][j];\n\tfor(int i=1;i<=m;i++)for(int j=1;j<=n;j++)\n\t\tif(chk(i,j))cout<> m >> n;\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n cin >> a[i][j];\n }\n }\n \n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if ((i > 0 && a[i][j] >= a[i-1][j]) || i == 0)\n if ((j > 0 && a[i][j] >= a[i][j-1]) || j == 0)\n if (a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j+1])\n cout << i << \" \" << j << endl;\n }\n }\n}"} +{"label": "72", "index": "35775", "code": "/*\n * 2.cpp\n *\n * Created on: 2013-12-13\n * Author: g199\n */\n\nint main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tint shan[m+2][n+2];\n\tfor(int i=0; i<=m+1; i++)\n\t\tfor(int j=0; j<=n+1; j++)\n\t\t\tshan[i][j]=0;\n\tfor(int i=1; i<=m; i++)\n\t\tfor(int j=1; j<=n; j++)\n\t\t\tcin>>shan[i][j];\n\n\tfor(int i=1; i<=m; i++)\n\t\tfor(int j=1; j<=n; j++)\n\t\t{\n\t\t\tif(shan[i][j]>=shan[i-1][j] &&\n\t\t\t\t\tshan[i][j]>=shan[i+1][j] &&\n\t\t\t\t\tshan[i][j]>=shan[i][j-1] &&\n\t\t\t\t\tshan[i][j]>=shan[i][j+1] )\n\t\t\t\tcout<=0)\n {\n if(a[i][j]=0)\n {\n if(a[i][j]> m >> n;\n for(i = 0; i < m; i++)\n\t\tfor(j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> height[i][j];\n\t\t}\n\tif(height[0][0] >= height[0][1] && height[0][0] >= height[1][0])\n\t{\n\t\ta[count] = 0;\n\t\tb[count] = 0;\n\t\tcount++;\n\t}\n\tfor(j = 1; j < n - 1; j++)\n\t{\n\t\tif(height[0][j] >= height[0][j -1]&& height[0][j] >= height[0][j+1] && height[0][j] >= height[1][j])\n\t\t{\n\t\t\ta[count] = 0;\n\t\t\tb[count] = j;\n\t\t\tcount++;\n\t\t}\n\t}\n\tif(height[0][n - 1] >= height[0][n - 2] && height[0][n - 1] >= height[1][n - 1])\n\t{\n\t\t\ta[count] = 0;\n\t\t\tb[count] = n - 1;\n\t\t\tcount++;\n\t}\n\tfor(i = 1; i < m - 1; i++)\n\t{\n\t\tif(height[i][0] >= height[i + 1][0] && height[i][0] >= height[i][1] && height[i][0] >= height[i - 1][0])\n\t\t{\n\t\t\ta[count] = i; \n\t\t\tb[count] = 0;\n\t\t\tcount++;\n\t\t}\n\t\tfor(j = 1; j < n - 1;j++)\n\t\t{\n\t\t\tif(height[i][j] >= height[i - 1][j] && height[i][j] >= height[i][j- 1] && height[i][j] >= height[i][j +1] && height[i][j] >= height[i +1][j])\n\t\t\t\t\n\t\t\t{\n\t\t\ta[count] = i; \n\t\tb[count] = j;\n\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t if(height[i][n - 1] >= height[i][n - 2] && height[i][n - 1] >= height[i + 1][n - 1] && height[i][n - 1] >= height[i - 1][n - 1])\n\t\t{\n\t\t\ta[count] = i; \n\t\t\tb[count] = n - 1;\n\t\t\tcount++;\n\t }\n\t }\n if(height[m - 1][0] >= height[m -1][1] && height[m -1][0] >= height[m - 2][0])\n\t\t{\n\t\t\ta[count] = m -1;\n\t\t\tb[count] = 0;\n\t\t\tcount++;\n\t\t}\n\t\tfor(j = 1; j < n - 1; j++)\n\t\t{\n\t\t\tif(height[m -1][j] >= height[m -1][j -1]&& height[m -1][j] >= height[m -1][j+1] && height[m -1][j] >= height[m -2][j])\n\t\t\t{\n\t\t\t\ta[count] = m -1;\n\t\t\t\tb[count] = j;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(height[m -1][n - 1] >= height[m -1][n - 2] && height[m -1][n - 1] >= height[m -2][n - 1])\n\t\t{\n\t\t\t\ta[count] = m -1;\n\t\t\t\tb[count] = n - 1;\n\t\t\t\tcount++;\n\t\t}\n\t\tfor(i = 0; i < count; i++)\n\t\t cout << a[i] << \" \" << b[i] << endl;\n\treturn 0;\n}\n\n\n\t\n"} +{"label": "72", "index": "35780", "code": "int main(){\n\tint a,b,c,d,e,m,n,i,j,k;\n\tint q[22][22];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i=q[i+1][j]&&q[i][j]>=q[i][j+1]&&q[i][j]>=q[i-1][j]&&q[i][j]>=q[i][j-1]){\n\t\t\t\td=i-1;\n\t\t\t\te=j-1;\n\t\t\t\tprintf(\"%d %d\\n\",d,e);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35781", "code": "int main()\n{\n\tint m,n,i,j,h[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=h[1][0]&&h[0][0]>=h[0][1])\n\t\t\tprintf(\"0 0\\n\");\n\tfor(j=1;j=h[0][j-1]&&h[0][j]>=h[1][j]&&h[0][j]>=h[0][j+1])\n\t\t\t\tprintf(\"0 %d\\n\",j);\n\t}\n\tif(h[0][n-1]>=h[1][n-1]&&h[0][n-1]>=h[0][n-2])\n\t\t\tprintf(\"0 %d\\n\",n-1);\n\tfor(i=1;i=h[i-1][0]&&h[i][0]>=h[i+1][0]&&h[i][0]>=h[i][1])\n\t\t\t \tprintf(\"%d 0\\n\",i);\n\t\tfor(j=1;j0&&j>0&&i=h[i-1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j+1])\n\t\t\t \tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t\tif(h[i][n-1]>=h[i-1][n-1]&&h[i][n-1]>=h[i][n-2]&&h[i][n-1]>=h[i+1][n-1])\n\t\t\t \tprintf(\"%d %d\\n\",i,n-1);\n\t}\n\tif(h[m-1][0]>=h[m-1][1]&&h[m-1][0]>=h[m-2][0])\n\t\tprintf(\"%d 0\\n\",m-1);\n\tfor(j=1;j=h[m-2][j]&&h[m-1][j]>=h[m-1][j-1]&&h[m-1][j]>=h[m-1][j+1])\n\t\t\t \tprintf(\"%d %d\\n\",m-1,j);\n\t}\n\tif(h[m-1][n-1]>=h[m-1][n-2]&&h[m-1][n-1]>=h[m-2][n-1])\n\t\tprintf(\"%d %d\\n\",m-1,n-1);\n\treturn 0;\n}\n"} +{"label": "72", "index": "35782", "code": "\nint main(){\n\tint m,n;\n\tcin>>m>>n;\n\tint hill[m+2][n+2];\n\tfor(int i=0;i<(m+2)*(n+2);i++){\n\t\thill[0][i]=0;\n\t}\n\n\tfor(int i=1;i<=m;i++){\n\t\tfor(int j=1;j<=n;j++){\n\t\t\tcin>>hill[i][j];\n\t\t}\n\t}\n\n\tfor(int i=1;i<=m;i++){\n\t\tfor(int j=1;j<=n;j++){\n\t\t\tif(hill[i][j]>=hill[i+1][j]&&\n\t\t\t\t\thill[i][j]>=hill[i-1][j]&&\n\t\t\t\t\thill[i][j]>=hill[i][j+1]&&\n\t\t\t\t\thill[i][j]>=hill[i][j-1]){\n\t\t\t\tcout<a[0][1]&&a[0][0]>a[1][0])\n\t\tprintf(\"0 0\\n\");\n\tfor(j=0;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0)\n\t\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])printf(\"%d %d\\n\",i,j);\n\t\t}\n}"} +{"label": "72", "index": "35784", "code": "int main()\n{\n\tint n,m,num[30][30],cnt=0;\n\tcin>>m>>n;\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\tcin>>num[i][j];\n\t}\n\tfor(int j=1;j<=n;j++)\n\t\tnum[0][j]=num[1][j];\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tnum[i][0]=num[i][1];\n\t\tnum[i][n+1]=num[i][n];\n\t}\n\tfor(int j=1;j<=n;j++)\n\t\tnum[m+1][j]=num[m][j];\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t\t{\n\t\t\t\tint word=0;\n\t\t\t{\n\t\t\t\tword+=(num[i-1][j]<=num[i][j]);\n\t\t\t word+=(num[i+1][j]<=num[i][j]);\n\t\t\t word+=(num[i][j-1]<=num[i][j]);\n\t\t\t word+=(num[i][j+1]<=num[i][j]);\n\t\t }\n\t\t\tif(word==4) cout<> m >> n;\n\tfor (i = 0 ; i < m ; i++)\n\t{\n\t\tfor (j = 0 ; j < n ; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (i = 0 ; i < m ; i++)\n\t{\n\t\tfor (j = 0 ; j < n ; j++)\n\t\t{\n\t\t\tif (i - 1 >= 0)\n\t\t\t{\n\t\t\t\tif (a[i - 1][j] > a[i][j])\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (i + 1 < m)\n\t\t\t{\n\t\t\t\tif (a[i + 1][j] > a[i][j])\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (j - 1 >= 0)\n\t\t\t{\n\t\t\t\tif (a[i][j - 1] > a[i][j])\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (j + 1 < n)\n\t\t\t{\n\t\t\t\tif (a[i][j + 1] > a[i][j])\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35786", "code": "void main()\n{\n\tint m,n,i,j,x[21][21];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<21;i++)\n\t\tfor(j=0;j<21;j++)\n\t\t{\n\t\t\tx[i][j]=0;\n\t\t}\n\tfor(i=1;i=x[i-1][j])&&(x[i][j]>=x[i][j-1])&&(x[i][j]>=x[i][j+1])&&(x[i][j]>=x[i+1][j]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n}"} +{"label": "72", "index": "35787", "code": "int main()\n{\n int n,m,j,i,jz[20][20];\n scanf(\"%d %d\",&m,&n);\n for(i=0;i=jz[i][j+1]&&jz[i][j]>=jz[i+1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i==0&&j!=0&&j!=n-1)\n {\n if(jz[i][j]>=jz[i][j-1]&&jz[i][j]>=jz[i+1][j]&&jz[i][j]>=jz[i][j+1])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i==0&&j==n-1)\n {\n if(jz[i][j]>=jz[i][j-1]&&jz[i][j]>=jz[i+1][j])\n {\n printf(\"%d %d\\n\",i,j) ;\n }\n }\n if(i!=0&&i!=m-1&&j==0)\n {\n if(jz[i][j]>=jz[i][j+1]&&jz[i][j]>=jz[i+1][j]&&jz[i][j]>=jz[i-1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i!=0&&i!=m-1&&j!=0&&j!=n-1)\n {\n if(jz[i][j]>=jz[i][j+1]&&jz[i][j]>=jz[i+1][j]&&jz[i][j]>=jz[i][j-1]&&jz[i][j]>=jz[i-1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i!=0&&i!=m-1&&j==n-1)\n {\n if(jz[i][j]>=jz[i][j-1]&&jz[i][j]>=jz[i+1][j]&&jz[i][j]>=jz[i-1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i==m-1&&j==0)\n {\n if(jz[i][j]>=jz[i][j+1]&&jz[i][j]>=jz[i-1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i==m-1&&j!=0&&j!=n-1)\n {\n if(jz[i][j]>=jz[i][j+1]&&jz[i][j]>=jz[i][j-1]&&jz[i][j]>=jz[i-1][j])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(i==m-1&&j==n-1)\n {\n if(jz[i][j]>=jz[i-1][j]&&jz[i][j]>=jz[i][j-1])\n {\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n }\t\n return 0;\n}"} +{"label": "72", "index": "35788", "code": "//============================================================================\n// Name : ex6.4.cpp\n// Author : Zhang Yu\n// Version :\n// Copyright : Your copyright notice\n// Description : ????\n//============================================================================\n\n\nint main() {\n\tint height;\n\tint width;\n\tcin >>height>>width;\n\tint a[height][width];\n\tfor (int i=0;i<=height-1;++i)\n\t\tfor (int j=0;j<=width-1;++j)\n\t\t\tcin >>a[i][j];\n\tint mountain[100][2];//???????????\n\tint sum=0;\n\tfor (int i=0;i<=height-1;++i)//???????\n\t\tfor (int j=0;j<=width-1;++j)//???????\n\t\t{\n\t\t\tif (i<=height-2)\n\t\t\t{\n\t\t\t\tif (a[i][j]=1)\n\t\t\t{\n\t\t\t\tif (a[i][j]=1)\n\t\t\t{\n\t\t\t\tif (a[i][j]mountain[j][0])\n\t\t\t{\n\t\t\t\tint temp1=mountain[i][0];\n\t\t\t\tint temp2=mountain[i][1];\n\t\t\t\tmountain[i][0]=mountain[j][0];\n\t\t\t\tmountain[i][1]=mountain[j][1];\n\t\t\t\tmountain[j][0]=temp1;\n\t\t\t\tmountain[j][1]=temp2;\n\t\t\t}\n\t\t}\n\tfor (int i=0;i<=sum-1;++i)\n\t\tcout <> m >> n;\n\tfor (int i = 0; i < m; i++)\n\t\tfor (int j = 0; j < n; j++)\n\t\t\tcin >> a[i][j];\n\tfor (int i = 0; i < m; i++)\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tif (i == 0) {\n\t\t\t\tif (j == 0 && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\telse if (j == n - 1 && a[i][j] >= a[i + 1][j] && a[i][j]\n\t\t\t\t\t\t>= a[i][j - 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\telse if (a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1]\n\t\t\t\t\t\t&& a[i][j] >= a[i + 1][j])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t} else if (j == 0&&i!=m-1) {\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j]\n\t\t\t\t\t\t>= a[i][j + 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t} else if (j == n - 1&&i!=m-1) {\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j]\n\t\t\t\t\t\t>= a[i][j - 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t} else if (i == m - 1) {\n\t\t\t\tif (j == 0 && a[i][j] >= a[i - 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\telse if (j == n - 1 && a[i][j] >= a[i - 1][j] && a[i][j]\n\t\t\t\t\t\t>= a[i][j - 1])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\telse if (a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1]\n\t\t\t\t\t\t&& a[i][j] >= a[i - 1][j])\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t} else if (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j]\n\t\t\t\t\t&& a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1])\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35790", "code": "int main(){\n int m,n,s[20][20],i,k,a,z[20],x[20];\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=s[0][1]&&s[0][0]>=s[1][0]){ \n printf(\"0 0\\n\");\n }\n for(i=1;i=s[0][i-1])&&(s[0][i]>=s[0][i+1])&&(s[0][i]>=s[1][i])){\n printf(\"0 %d\\n\",i);\n }\n }\n if(s[0][n-1]>=s[0][n-2]&&\n s[0][n-1]>=s[1][n-1]){\n printf(\"0 %d\\n\",n-1);\n } \n for(i=1;i=s[i-1][0]&&s[i][0]>=s[i+1][0]\n &&s[i][0]>=s[i][1]){\n printf(\"%d 0\\n\",i);\n }\n for(k=1;k=s[i-1][k]&&\n s[i][k]>=s[i+1][k]&&s[i][k]>=s[i][k-1]&&\n s[i][k]>=s[i][k+1]){\n printf(\"%d %d\\n\",i,k);\n }\n }\n if(s[i][n-1]>=s[i-1][n-1]&&s[i][n-1]>=s[i+1][n-1]\n &&s[i][n-1]>=s[i][n-2]){\n printf(\"%d %d\\n\",i,n-1);\n }\n }\n if(s[m-1][0]>=s[m-1][1]&&s[m-1][0]>=s[m-2][0]){\n printf(\"%d 0\\n\",m-1);\n }\n for(a=1;a=s[m-1][a-1]&&\n s[m-1][a]>=s[m-1][a+1]&&s[m-1][a]>=s[m-2][a]){\n printf(\"%d %d\\n\",m-1,a);\n }\n }\n if(s[m-1][n-1]>=s[m-1][n-2]&&\n s[m-1][n-1]>=s[m-2][n-1]){\n printf(\"%d %d\\n\",m-1,n-1);\n } \n \n \n \n \n return 0;\n}\n\n"} +{"label": "72", "index": "35791", "code": "int a[105][105];\nint main()\n{\n int m,n,t;\n int i,j;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=a[i+1][j] || i+1>=m)\n\t\t\tt++;\n\t\tif(a[i][j]>=a[i][j+1] || j+1>=n)\n\t\t\tt++;\n\t\tif(a[i][j]>=a[i-1][j] || i-1<0)\n\t\t\tt++;\n\t\tif(a[i][j]>=a[i][j-1] || j-1<0)\n\t\t\tt++;\n\t\tif(t==4)\n\t\t\tprintf(\"%d %d\\n\",i,j);\n\t \n\t }\n return 0;\n\n}\n"} +{"label": "72", "index": "35792", "code": "int main(){\n int sz[20][20],m,n,sc[1000],sk[1000],a,b,i,t;\n scanf(\"%d %d\",&m,&n);\n for(a=0;a=sz[0][1])&&(sz[0][0]>=sz[1][0])){\n sc[i]=0;\n sk[i]=0;\n i++;\n }\n for(b=1;b=sz[1][b])&&(sz[0][b]>=sz[0][b-1])&&(sz[0][b]>=sz[0][b+1])){\n sc[i]=0;\n sk[i]=b;\n i++;\n }\n }\n if((sz[0][n-1]>=sz[0][n-2])&&(sz[0][n-1]>=sz[1][n-1])){\n sc[i]=0;\n sk[i]=n-1;\n i++;\n }\n for(a=1;a=sz[a][1])&&(sz[a][0]>=sz[a-1][0])&&(sz[a][0]>=sz[a+1][0])){\n sc[i]=a;\n sk[i]=0;\n i++;\n }\n for(b=1;b=sz[a][b-1])&&(sz[a][b]>=sz[a][b+1])&&(sz[a][b]>=sz[a-1][b])&&(sz[a][b]>=sz[a+1][b])){\n sc[i]=a;\n sk[i]=b;\n i++;\n }\n }\n \n if((sz[a][n-1]>=sz[a][n-2])&&(sz[a][n-1]>=sz[a-1][n-1])&&(sz[a][n-1]>=sz[a+1][n-1])){\n sc[i]=a;\n sk[i]=n-1;\n i++;\n }\n }\n \n if((sz[m-1][0]>=sz[m-2][0])&&(sz[m-1][0]>=sz[m-1][1])){\n sc[i]=m-1;\n sk[i]=0;\n i++;\n }\n for(b=1;b=sz[m-2][b])&&(sz[m-1][b]>=sz[m-1][b-1])&&(sz[m-1][b]>=sz[m-1][b+1])){\n sc[i]=m-1;\n sk[i]=b;\n i++;\n }\n } \n if((sz[m-1][n-1]>=sz[m-1][n-2])&&(sz[m-1][n-1]>=sz[m-2][n-1])){\n sc[i]=m-1;\n sk[i]=n-1;\n i++;\n }\n \n t=i;\n for(i=0;i=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1])){\n h[x]=i-1;\n s[x]=j-1;\n x++;\n }\n }\n }\t\n for(i=0;i=h[1][0]&&h[0][0]>=h[0][1]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==0&&l==n-1)&&(h[0][n-1]>=h[0][n-2]&&h[0][n-1]>=h[1][n-1]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==m-1&&l==0)&&(h[m-1][0]>=h[m-2][0]&&h[m-1][0]>=h[m-1][1]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==m-1&&l==n-1)&&(h[m-1][n-1]>=h[m-1][n-2]&&h[m-1][n-1]>=h[m-2][n-1]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==0&&(l>0&&l=h[k][l-1]&&h[k][l]>=h[k][l+1]&&h[k][l]>=h[k+1][l]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if((k==m-1&&(l>0&&l=h[k][l-1]&&h[k][l]>=h[k][l+1]&&h[k][l]>=h[k-1][l]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n else if((l==0&&(k>0&&k=h[k][l+1]&&h[k][l]>=h[k+1][l]&&h[k][l]>=h[k-1][l]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n else if((l==n-1&&(k>0&&k=h[k][l-1]&&h[k][l]>=h[k+1][l]&&h[k][l]>=h[k-1][l]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t\telse if(h[k][l]>=h[k][l-1]&&h[k][l]>=h[k][l+1]&&h[k][l]>=h[k-1][l]&&h[k][l]>=h[k+1][l])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",k,l);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35795", "code": "int main()\n{\n\tint m,n,i,j,judge;\n\tint a[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tif(*(*(a+i-1)+j)>*(*(a+i)+j))\n\t\t\t\t\tjudge=0;\n\t\t\t}\n\t\t\tif(j>0)\n\t\t\t{\n\t\t\t\tif(*(*(a+i)+j-1)>*(*(a+i)+j))\n\t\t\t\t\tjudge=0;\n\t\t\t}\n\t\t\tif(j*(*(a+i)+j))\n\t\t\t\t\tjudge=0;\n\t\t\t}\n\t\t\tif(i*(*(a+i)+j))\n\t\t\t\t\tjudge=0;\n\t\t\t}\n\t\t\tif(judge==1)printf(\"%d %d\\n\",i,j);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35796", "code": "int main()\n{\n\t int m,n,i,j,a[22][22];\n cin>>m>>n;\n\t for(i=1;i<=m;i++)\n\t {\n\t\t for(j=1;j<=n;j++)\n\t\t {\n\t\t\t cin>>a[i][j];\n\t\t }\n\t }\n for(i=0;i<=n+1;i++)\n\t\t a[0][i]=0;\n for(i=0;i<=n+1;i++)\n\t\t a[m+1][i]=0;\n\t for(i=1;i<=m;i++)\n\t\t a[i][0]=0;\n\t for(i=1;i<=m;i++)\n\t\t a[i][n+1]=0;\n\t for(i=1;i<=m;i++)\n\t {\n\t\t for(j=1;j<=n;j++)\n\t\t {\n\t\t\t if((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t cout<=sz[q-1>0?q-1:0][w]&&sz[q][w]>=sz[q+1][w]&&sz[q][w]>=sz[q][w-1>0?w-1:0]&&sz[q][w]>=sz[q][w+1])\n\t\t\t{ \n\t\t\t\tsz1[x]=q;sz2[y]=w; x++;y++;\n\t\t\t}\n\t\t}\n\t}\n\tx-=1;y-=1;\n\tfor(e=0;e<=x;e++)\n\t{\n\t\tprintf(\"%d %d\\n\",sz1[e],sz2[e]);\n\t}\n\treturn 0;\n} "} +{"label": "72", "index": "35798", "code": "int main()\n{\n int height[21][21];\n int m,n;\n cin >> m >> n;\n int i,j,k;\n int sum=0;\n for (i=0;i> height[i][j];\n sum += height[i][j];\n }\n }\n \n for (i=0;i=height[i+1][j] && height[i][j]>=height[i][j+1] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(i==m-1&&j!=0&&j!=n-1)\n {\n if(height[i][j]>=height[i-1][j] && height[i][j]>=height[i][j+1] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n } \n else if(j==0&&i!=0&&i!=m-1)\n {\n if(height[i][j]>=height[i-1][j] && height[i][j]>=height[i][j+1] && height[i][j]>=height[i+1][j])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(j==n-1&&i!=0&&i!=m-1)\n {\n if(height[i][j]>=height[i-1][j] && height[i][j]>=height[i+1][j] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(j==n-1&&i==0)\n {\n \n if( height[i][j]>=height[i+1][j] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(j==n-1&&i==m-1)\n {\n \n if( height[i][j]>=height[i-1][j] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(j==0&&i==0)\n {\n \n if( height[i][j]>=height[i+1][j] && height[i][j]>=height[i][j+1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else if(j==0&&i==m-1)\n {\n \n if( height[i][j]>=height[i-1][j] && height[i][j]>=height[i][j+1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n else\n {\n if (height[i][j]>=height[i-1][j] &&height[i][j]>=height[i+1][j] && height[i][j]>=height[i][j+1] && height[i][j]>=height[i][j-1])\n {\n cout << i << \" \" << j << endl;\n }\n }\n }\n }\n \n return 0;\n} "} +{"label": "72", "index": "35799", "code": "int main(){\n int m,n,i,j;\n scanf(\"%d %d\\n\",&m,&n);\n int l[m][n];\n for(i=0;i=l[0][1]&&l[0][0]>=l[1][0]){printf(\"0 0\\n\");}\n for(j=1;j=l[0][j-1]&&l[0][j]>=l[0][j+1]&&l[0][j]>=l[1][j]){\n printf(\"0 %d\\n\",j);\n }\n }\n if(l[0][n-1]>=l[0][n-2]&&l[0][n-1]>=l[1][n-1]){printf(\"0 %d\\n\",n-1);}\n for(i=1;i=l[i-1][0]&&l[i][0]>=l[i+1][0]&&l[i][0]>=l[i][1])\n {printf(\"%d 0\\n\",i);}\n for(j=1;j=l[i-1][j])&&(l[i][j]>=l[i+1][j])&&(l[i][j]>=l[i][j-1])&&(l[i][j]>=l[i][j+1])){\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(l[i][n-1]>=l[i-1][n-1]&&l[i][n-1]>=l[i+1][n-1]&&l[i][n-1]>=l[i][n-2])\n {printf(\"%d %d\\n\",i,n-1);}\n }\n if(l[m-1][0]>=l[m-1][1]&&l[m-1][0]>=l[m-2][0]){printf(\"%d 0\\n\",m-1);}\n for(j=1;j=l[m-1][j-1]&&l[m-1][j]>=l[m-1][j+1]&&l[m-1][j]>=l[m-2][j])\n {printf(\"%d %d\\n\",m-1,j);}\n }\n if(l[m-1][n-1]>=l[m-1][n-2]&&l[m-1][n-1]>=l[m-2][n-1]){printf(\"%d %d\\n\",m-1,n-1);}\n return 0;\n}"} +{"label": "72", "index": "35800", "code": "int main()\n{\n\tint m,n;\n\tcin >> m >> n;\n\tint height[200][200];\n\tint flag[200][200];\n\tmemset(flag, 0, sizeof(flag));\n\tmemset(height, 0, sizeof(height));\n\tfor (int i = 1; i <= m; i++)\n\t\tfor (int j = 1; j <= n ;j++)\n\t\t{\n\t\t\tcin >> height[i][j];\n\t\t}\n\tfor (int i = 1; i <= m; i++)\n\t\tfor (int j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (height[i][j] >= height[i - 1][j] && height[i][j] >= height[i + 1][j] && height[i][j] >= height[i][j - 1] && height[i][j] >= height[i][j + 1])\n\t\t\t\tflag[i][j] = 1;\n\t\t}\n\tfor (int i = 1; i <= m; i++)\n\t\tfor (int j = 1; j <= n; j++)\n\t\t\tif (flag[i][j])\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\treturn 0;\n}\n\n\n"} +{"label": "72", "index": "35801", "code": "// for each point x, if x has a higher neighbor, set x = -1\n// set an extra wall to reduce times of comparison\n\n\nint main (void)\n{\n int i, j, m, n;\n \n scanf (\"%i %i\", &m, &n);\n int block[m+2][n+2], mark[m+2][n+2];\n //initialize the wall\n for (i = 0; i < n + 2; i++) {\n block[0][i] = -1;\n block[m+1][i] = -1;\n }\n for (i = 1; i < m + 1; i++) {\n block[i][0] = -1;\n block[i][n+1] = -1;\n }\n //read blocks\n for (i = 1; i <= m; i++)\n for (j = 1; j <= n; j++) {\n scanf (\"%i\", &block[i][j]);\n mark[i][j] = 0;\n }\n for (i = 1; i <=m; i++)\n for (j = 1; j <= n; j++)\n if (mark[i][j] != -1) {\n if (block[i][j] < block[i][j+1]) {\n mark[i][j] = -1;\n continue;\n }\n else if (block[i][j] > block[i][j+1])\n mark[i][j+1] = -1;\n if (block[i][j] < block[i+1][j]) {\n mark[i][j] = -1;\n continue;\n }\n else if (block[i][j] > block[i+1][j])\n mark[i+1][j] = -1;\n if (block[i][j] < block[i-1][j]) {\n mark[i][j] = -1;\n continue;\n }\n else if (block[i][j] > block[i-1][j])\n mark[i-1][j] = -1;\n if (block[i][j] < block[i][j-1]) {\n mark[i][j] = -1;\n continue;\n }\n else if (block[i][j] > block[i][j-1])\n mark[i][j-1] = -1;\n printf (\"%i %i\\n\", i-1, j-1);\n }\n \n return 0;\n}\n"} +{"label": "72", "index": "35802", "code": "\nint n,m;\nint area[21][21];\nvoid scan();\nvoid print();\nint main(){\n scan();\n print();\n return 0;\n}\nvoid scan(){\n scanf(\"%d%d\",&n,&m);\n for(int i=0;i=area[i-1][j])&&(area[i][j]>=area[i+1][j])&&(area[i][j]>=area[i][j-1])&&(area[i][j]>=area[i][j+1])){\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n }\n}"} +{"label": "72", "index": "35803", "code": "int main(){\n int m,n,sz[22][22]={0},i,j,a,b;\n scanf(\"%d%d\",&m,&n);\n for(i=1;i<=m;i++){\n for(j=1;j<=n;j++){\n scanf(\"%d\",&sz[i][j]);\n }\n }\n for(a=1;a<=m;a++){\n for(b=1;b<=n;b++){\n if((sz[a][b]>=sz[a-1][b])&&(sz[a][b]>=sz[a+1][b])&&(sz[a][b]>=sz[a][b- 1])&&(sz[a][b]>=sz[a][b+1])){\n printf(\"%d %d\\n\",a-1,b-1);\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35804", "code": "int main(){\n int m,n,i,k=0,j;\n int a[20][20];\n scanf(\"%d%d\",&m,&n);\n struct sh\n {\n int m;\n int n;\n }\n sh[400];\n for(i=0;i=a[0][1]&&a[0][0]>=a[1][0]){\n sh[k].m=0;\n sh[k].n=0;\n k++;\n }\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]){\n sh[k].m=0;\n sh[k].n=n-1;\n k++;\n }\n if(a[m-1][0]>=a[m-2][0]&&a[m-1][0]>=a[m-1][1]){\n sh[k].m=m-1;\n sh[k].n=0;\n k++;\n }\n if(a[m-1][n-1]>=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2]){\n sh[k].m=m-1;\n sh[k].n=n-1;\n k++;\n }\n \n \n for(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n sh[k].m=i;\n sh[k].n=j;\n k++;\n }\n }else if(j==0&&i!=0&&i!=m-1){\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]){\n sh[k].m=i;\n sh[k].n=j;\n k++;\n }\n }else if(j==n-1&&i!=0&&i!=m-1){\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n sh[k].m=i;\n sh[k].n=j;\n k++;\n }\n }else if(i==m-1&&j!=0&&j!=n-1){\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n sh[k].m=i;\n sh[k].n=j;\n k++;\n }\n }else if(i!=0&&i!=m-1&&j!=0&&j!=n-1){\n\t\t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]){\n sh[k].m=i;\n sh[k].n=j;\n k++;\n }\n\t }\n \n }\n }\n int e,f;\n for(j=1;j<=k;j++){\n for(i=0;ish[i+1].m){\n e=sh[i+1].m;\n f=sh[i+1].n;\n sh[i+1].m=sh[i].m;\n sh[i+1].n=sh[i].n;\n sh[i].m=e;\n sh[i].n=f;\n }\n }\n }\n int c=0;\n i=0;\n for(;csh[i+1].n){\n\t\t \n f=sh[i+1].n;\n \n sh[i+1].n=sh[i].n;\n \n sh[i].n=f;\n\t }else{\n\t\t continue;\n\t }\n }else{\n break;\n }\n\t }\n }\n }\n \n for(i=0;i> m >> n;\n\tint a[20][20];\n\tint i,j;\n\tfor (i=0;i> a[i][j];}\n\tfor (i=0;i=0 && a[i-1][j]>a[i][j])\n\t\t{s=0;}\n\t\tif(i+1a[i][j])\n\t\t{s=0;}\n\t\tif(j-1>=0 && a[i][j-1]>a[i][j])\n\t\t{s=0;}\n\t\tif(j+1a[i][j])\n\t\t{s=0;}\n\t\tif(s==1)\n\t\t{cout<=a[i][j-1])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j]))\n\t\t\t{printf(\"%d %d\\n\",len[i][j],row[i][j]);}\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "72", "index": "35807", "code": "/*\n * 4.cpp\n *\n * Created on: 2011-12-27\n * Author: Administrator\n */\nint main()\n{\n\tint a[25][25];\n\tint m, n, i, j;\n\tcin >> m >> n;\n\tfor( i = 0; i <= m - 1; i++ )\n\t{\n\t\tfor( j = 0; j <= n - 1; j++ )\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor( i = 0; i <= m - 1; i++ )\n\t{\n\t\tfor( j = 0; j <= n - 1; j++ )\n\t\t{\n\t\t\tif( ( i == 0 || a[i-1][j] <= a[i][j])&&( i == m - 1 || a[i+1][j]<= a[i][j])&&( j == 0 || a[i][j - 1]<= a[i][j])&&(j==n - 1 || a[i][j+1]<=a[i][j]))\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35808", "code": "int main()\n{\n\tint m,n,i,j,a[23][23],b[23][23];\n\tcin>>m>>n;\n\tfor(i=0;i<23;i++)\n\t{\n\t\tfor(j=0;j<23;j++)\n\t\t{\n\t\t\tb[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<=n+1;i++)\n\t{\n\t\ta[0][i]=0;\n\t\ta[m+1][i]=0;\n\t}\n\tfor(i=0;i=a[i][j+1])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j]))\n\t\t\t{\n\t\t\t\tb[i][j]=1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<23;i++)\n\t{\n\t\tfor(j=0;j<23;j++)\n\t\t{\n\t\t\tif(b[i][j]==1)\n\t\t\t{\n\t\t\t\tcout<=sz[0][1]&&sz[0][0]>=sz[1][0])\n\t\tprintf(\"%d %d\\n\",0,0);\n\tfor(col=1;col=sz[0][col-1]&&sz[0][col]>=sz[1][col]&&sz[0][col]>=sz[0][col+1])\n\t\t\tprintf(\"%d %d\\n\",0,col);\n\t}\n\tif(sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1])\n\t\tprintf(\"%d %d\\n\",0,n-1);\n\tfor(row=1;row=sz[row][1]&&sz[row][0]>=sz[row-1][0]&&sz[row][0]>=sz[row+1][0])\n\t\t\tprintf(\"%d %d\\n\",row,0);\n\t\tfor(col=1;col=sz[row][col-1]&&sz[row][col]>=sz[row+1][col]&&sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row-1][col])\n\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t}\n\t\tif(sz[row][n-1]>=sz[row][n-2]&&sz[row][n-1]>=sz[row+1][n-1]&&sz[row][n-1]>=sz[row-1][n-1])\n\t\t\tprintf(\"%d %d\\n\",row,n-1);\n\t}\n\tif(sz[m-1][0]>=sz[m-1][1]&&sz[m-1][0]>=sz[m-2][0])\n\t\tprintf(\"%d %d\\n\",m-1,0);\n\tfor(col=1;col=sz[m-1][col-1]&&sz[m-1][col]>=sz[m-2][col]&&sz[m-1][col]>=sz[m-1][col+1])\n\t\t\tprintf(\"%d %d\\n\",m-1,col);\n\t}\n\tif(sz[m-1][n-1]>=sz[m-1][n-2]&&sz[m-1][n-1]>=sz[m-2][n-1])\n\t\tprintf(\"%d %d\",m-1,n-1);\n\treturn 0;\n}\n"} +{"label": "72", "index": "35810", "code": "int main(){\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint s[200][200];\n\tint i,r,j;\n\tfor(i=0;i=x)&&(s[i][r]>=v)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t\tfor(r=1;r=x)&&(s[i][r]>=v)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t\tif(r==n-1){\n\t\t\t x=s[i+1][r];\n\t\t\t c=s[i][r-1];\n\t\t\t \tif((s[i][r]>=x)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i=z)&&(s[i][r]>=x)&&(s[i][r]>=v)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t\tfor(r=1;r=z)&&(s[i][r]>=x)&&(s[i][r]>=v)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n if(r==n-1){\n z=s[i-1][r];\n\t\t\tx=s[i+1][r];\n\t\t\tc=s[i][r-1];\n\t\t\tif((s[i][r]>=z)&&(s[i][r]>=x)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t }\n\tif(i==m-1){\n\t\tr=0;\n\t\tif(r==0){\n\t\t\tz=s[i-1][r];\n\t\t\tv=s[i][r+1];\n\t\t\tif((s[i][r]>=z)&&(s[i][r]>=v)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t\tfor(r=1;r=z)&&(s[i][r]>=v)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n if(r==n-1){\n z=s[i-1][r];\n\t\t\tc=s[i][r-1];\n\t\t\tif((s[i][r]>=z)&&(s[i][r]>=c)){\n\t\t\t\tprintf(\"%d %d\\n\",i,r);\n\t\t\t}\n\t\t}\n\t }\n\treturn 0;\n}\n\n\n\n\t\t\t\n"} +{"label": "72", "index": "35811", "code": "int main()\n{\n int m=0,n=0,i=0,j=0,a[30][30];\n cin>>m>>n;\n for(i=0;i>a[i][j];\n }\n }\n if((a[0][0]>=a[0][1])&&(a[0][0]>=a[1][0]))cout<<\"0 0\"<=a[0][i+1])&&(a[0][i]>=a[0][i-1])&&(a[0][i]>=a[1][i]))\n cout<<\"0 \"<=a[0][n-2])&&(a[0][n-1]>=a[1][n-1]))cout<<\"0 \"<=a[i][1])&&(a[i][0]>=a[i+1][0])&&(a[i][0]>=a[i-1][0]))cout<=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i][j-1]))\n cout<=a[i][n-2])&&(a[i][n-1]>=a[i+1][n-1])&&(a[i][n-1]>=a[i-1][n-1]))cout<=a[m-1][1])&&(a[m-1][0]>=a[m-2][0]))cout<=a[m-1][i+1])&&(a[m-1][i]>=a[m-1][i-1])&&(a[m-1][i]>=a[m-2][i]))\n cout<=a[m-1][n-2])&&(a[m-1][n-1]>=a[m-2][n-1]))cout<>m>>n;\n\tint data[m][n];\n\tfor(i=0;i>data[i][j];\n\tfor(i=0;i=data[i][j+1]&&data[i][j]>=data[i+1][j])\n\t\t\t\t\t {cout<=data[i][j-1]&&data[i][j]>=data[i+1][j])\n\t\t\t\t \t\t\t\t\t {cout<=data[i][j-1]&&data[i][j]>=data[i][j+1]&&data[i][j]>=data[i+1][j])\n\t\t\t\t\t {cout<=data[i][j+1]&&data[i][i]>=data[i-1][j])\n\t\t\t\t\t\t\t\t\t {cout<=data[i][j-1]&&data[i][j]>=data[i-1][j])\n\t\t\t\t\t\t\t\t \t\t\t\t\t {cout<=data[i][j-1]&&data[i][j]>=data[i][j+1]&&data[i][j]>=data[i-1][j])\n\t\t\t\t\t\t\t\t\t {cout<=data[i-1][j]&&data[i][j]>=data[i+1][j]&&data[i][j]>=data[i][j+1])\n\t\t\t\t\t{cout<=data[i-1][j]&&data[i][j]>=data[i+1][j]&&data[i][j]>=data[i][j-1])\n\t\t\t\t\t\t\t\t\t\t{cout<=data[i-1][j]&&data[i][j]>=data[i+1][j]&&data[i][j]>=data[i][j-1]&&data[i][j]>=data[i][j+1])\n\t\t\t\t\t{cout<>m>>n;\n\tfor(i=0;i<22;i++)\n\t{\n\t\tfor(j=0;j<22;j++)\n\t\t{\n\t\t\tnum[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>num[i][j];\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif((num[i][j]>=num[i-1][j])&&(num[i][j]>=num[i+1][j])&&(num[i][j]>=num[i][j-1])&&(num[i][j]>=num[i][j+1]))\n\t\t\t{\n\t\t\t\tcout<=a[0][1]&&a[0][0]>=a[1][0]){printf(\"0 0\\n\");}\n for(j=1;j=a[0][j-1]&&a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j]){printf(\"0 %d\\n\",j);}\n }\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]){printf(\"0 %d\\n\",n-1);}\n for(i=1;i=a[i][1]&&a[i][0]>=a[i-1][0]&&a[i][0]>=a[i+1][0]){printf(\"%d 0\\n\",i);}\n for(j=1;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]){printf(\"%d %d\\n\",i,j);}\n }\n if(a[i][n-1]>=a[i][n-2]&&a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]){printf(\"%d %d\\n\",i,n-1);}\n }\n if(a[m-1][0]>=a[m-2][0]&&a[m-1][0]>=a[m-1][1]){printf(\"%d %d\\n\",m-1,0);}\n for(j=1;j=a[m-1][j-1]&&a[m-1][j]>=a[m-1][j+1]&&a[m-1][j]>=a[m-2][j]){printf(\"%d %d\\n\",m-1,j);}\n }\n if(a[m-1][n-1]>=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2]){printf(\"%d %d\\n\",m-1,n-1);}\n return 0;\n}\n"} +{"label": "72", "index": "35815", "code": "\nint main(){\n int n,m,i,j;\n int map[100][100];\n scanf(\"%d%d\",&n,&m);\n for(i=1;i<=n;i++)\n for(j=1;j<=m;j++)\n scanf(\"%d\",&map[i][j]);\n for(i=1;i<=n;i++)map[i][0]=map[i][m+1]=0;\n for(i=1;i<=m;i++)map[0][i]=map[n+1][i]=0;\n int f=0;\n for(i=1;i<=n;i++)\n for(j=1;j<=m;j++)\n if(map[i][j]>=map[i-1][j]&&map[i][j]>=map[i][j-1]&&map[i][j]>=map[i+1][j]&&map[i][j]>=map[i][j+1]){\n if(f)printf(\"\\n\");\n printf(\"%d %d\",i-1,j-1);f=1;\n }\n return 0;\n }\n"} +{"label": "72", "index": "35816", "code": "int a[22][22],n,m;\nint main()\n{\n\tint i,j;\n\tcin>>n>>m;\n\tfor(i=0;i<=n+1;i++)\n\tfor(j=0;j<=m+1;j++)\n\ta[i][j]=0;\n\tfor(i=1;i<=n;i++)\n\tfor(j=1;j<=m;j++)\n\tcin>>a[i][j];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=m;j++)\n\t\t{\n\t\t\tif (a[i][j]>=a[i-1][j] &&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]) cout<>m>>n;\n\tfor(int i=1;i>a[i][j];\n\t\t}\n\t}\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\tcout<> m >> n;\n\n\tmemset(a, 0, sizeof(a));\n\n\tfor(i = 1; i <= m; i ++)\n\tfor(j = 1; j <= n; j ++)\n\t\tcin >> a[i][j];\n\n\tfor(i = 1; i <= m; i ++)\n\tfor(j = 1; j <= n; j ++)\n\t{\n\t\tint tag = 1;\n\n\t\tif(a[i][j] < a[i + 1][j])\ttag = 0;\n\t\tif(a[i][j] < a[i - 1][j])\ttag = 0;\n\t\tif(a[i][j] < a[i][j + 1])\ttag = 0;\n\t\tif(a[i][j] < a[i][j - 1])\ttag = 0;\n\n\t\tif(tag == 1)\n\t\t{\n\t\t\tlenth[count] = i;\n\t\t\twidth[count] = j;\n\t\t\tcount ++;\n\t\t}\n\t}\n\n\tfor(i = 0; i < count; i ++)\n\t\tcout << lenth[i] - 1 << ' ' << width[i] - 1 << endl;\n\n\t\n}"} +{"label": "72", "index": "35819", "code": "int main()\n{\n\tint m,n,i,j,h[30][30];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(j=0;j<=(n+1);j++)\n\t{\n\t\th[0][j]=-1;\n\t\th[m+1][j]=-1;\n\t}\n\tfor(i=0;i<=(m+1);i++)\n\t{\n\t\th[i][0]=-1;\n\t\th[i][n+1]=-1;\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&h[i][j]);\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif((h[i][j]>=h[i-1][j])&&(h[i][j]>=h[i+1][j])&&(h[i][j]>=h[i][j-1])&&(h[i][j]>=h[i][j+1]))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "72", "index": "35820", "code": "\nint main()\n{\n\tint a[20][20],m,n,i,j;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=a[1][0]&&a[0][0]>=a[0][1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(i==0&&j==(n-1)&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(i==(m-1)&&j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(i==(m-1)&&j==(n-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(i==0&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(i==(m-1)&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(j==0&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse if(j==(n-1)&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t{printf(\"%d %d\\n\",i,j);}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35821", "code": "int sz[22][22];\nint main(){\n\tint m,n,i,j;\n\t\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",&sz[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<=n+1;i++){\n\t\tsz[0][i]=sz[m+1][i]=0;\n\t\tsz[i][0]=sz[i][n+1]=0;\n\t}\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif((sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])){\n\t\t\t\ti--;j--;\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\ti++;j++;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35822", "code": "int main()\n{\n\tint e,i,j,n,m,k=0,sz[len+2][len+2],x[len],y[len];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(j=1;j=sz[j][i+1])&&(sz[j][i]>=sz[j][i-1])&&(sz[j][i]>=sz[j+1][i])&&(sz[j][i]>=sz[j-1][i]))\n\t\t\t\t{\n\t\t\t\t\tx[k]=j-1;\n\t\t\t\t\ty[k]=i-1;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(i=0;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n b[k][0]=i;b[k][1]=j;k++;\n }\n }\n }\n for(i=0;i=b[j][0]){\n int tmp1,tmp2;\n tmp1=b[i][0];\n tmp2=b[i][1];\n b[i][0]=b[j][0];\n b[i][1]=b[j][1];\n b[j][0]=tmp1;\n b[j][1]=tmp2;\n }\n }\n }\n for(i=0;i=b[j][1]){\n int tmp1,tmp2;\n tmp1=b[i][0];\n tmp2=b[i][1];\n b[i][0]=b[j][0];\n b[i][1]=b[j][1];\n b[j][0]=tmp1;\n b[j][1]=tmp2;\n }\n }\n }\n }\n for(i=0;i=h[i-1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j+1])\n printf(\"%d %d\\n\",i-1,j-1);}}\n return 0;\n }\n \n \n"} +{"label": "72", "index": "35825", "code": "int main()\n{\n\tint m, n, i, j;\n\tint sum = 0;\n\tint cell[22][22]={0};\n\n\tscanf(\"%d%d\", &m, &n);\n\tfor(i = 1; i < m+1; i++)\n\t{\n\t\tfor(j = 1; j < n+1; j++)\n\t\t{\n\t\t\tscanf(\"%d\", &cell[i][j]);\n\t\t}\n\t}\n\n\tfor(i = 1; i < m+1; i++)\n\t{\n\t\tfor(j = 1; j < n+1; j++)\n\t\t{\n\t\t\tif(cell[i][j]-cell[i][j-1]>=0 && cell[i][j]-cell[i][j+1]>=0 && cell[i][j]-cell[i+1][j]>=0 && cell[i][j]-cell[i-1][j]>=0)\n\t\t\t\tprintf(\"%d %d\\n\", i-1, j-1);\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "72", "index": "35826", "code": "int main(){\n\tint m,n,row,col;\n\tint sz[20][20];\n\n\tscanf(\"%d%d\",&m,&n);\n \n \tfor(row=0;row=sz[0][1]&&sz[0][0]>=sz[1][0]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}else if(col==n-1&&sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}else if(sz[0][col]>=sz[0][col-1]&&sz[0][col]>=sz[0][col+1]&&sz[0][col]>=sz[1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}\n\t\t\t}else if(col==0){\n\t\t\t\tif(row==n-1&&sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row-1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}else if(sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row+1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}\n\t\t\t}else if(row==m-1){\n\t\t\t\tif(col==n-1&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row-1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}else if(sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row-1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t\t}\n\t\t\t}else if(col==n-1&&sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row+1][col]){\n\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t}else if(sz[row][col]>=sz[row][col-1]&&sz[row][col]>=sz[row][col+1]&&sz[row][col]>=sz[row-1][col]&&sz[row][col]>=sz[row+1][col]){\n\t\t\t\t\tprintf(\"%d %d\\n\",row,col);\n\t\t\t}\n\n\t\t}\n\t}\n\n\n\treturn 0;\n}\n"} +{"label": "72", "index": "35827", "code": "void main()\n{\n\tint a[20][20]={0},i,j;\n\tint m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<=m-1;i++)\n\t\tfor(j=0;j<=n-1;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<=m-1;i++)\n\t{\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\t\tif(i==0&&j==0)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t else if(i==0&&j!=0&&j!=n-1)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n else if(i==0&&j==n-1)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n else if(i>0&&j==0&&i!=m-1)\n\t\t\t{\n\t\t\t if((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i-1][j]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i>0&&j>0&&i!=m-1&&j!=n-1)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i>0&&i!=m-1&&j==n-1)\n\t\t\t\tif((a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t if(i==(m-1)&&j==0)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t if(i==(m-1)&&j>0&&j!=n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t if(i==(m-1)&&j==n-1)\n\t\t\t{\n\t\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\n}\n\n\n \n"} +{"label": "72", "index": "35828", "code": "int main()\n{\n\tint n,m,a,b;\n\tscanf(\"%d%d\",&n,&m);\n\tint sz[1000][1000];\n\tfor(a=1;a=a[i][j+1]&&a[i][j]>=a[i+1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i==0&&j==n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i==m-1&&j==0&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i==m-1&&j==n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n \n if(i==0&&j!=n-1&&j!=0&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i==m-1&&j!=n-1&&j!=0&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i!=0&&i!=m-1&&j==0&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n if(i!=0&&i!=m-1&&j==n-1&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n {printf(\"%d %d\\n\",i,j);continue;}\n \n if(i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n {printf(\"%d %d\\n\",i,j);continue;}\n }\n}\n \n \n return 0;\n}\n"} +{"label": "72", "index": "35830", "code": "int main()\n{\n int m,n,i,j;\n int c[100][100];\n scanf(\"%d %d\",&m,&n);\n \n \n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n { \n scanf(\"%d\",&(c[i][j]));\n }\n }\n if((i==0)||(j==0)||(i==m+1)||(j==n+1))\n {\n\t\t\t\t\t\t\tc[i][j]=0;\n\t\t\t\t\t}\n for(i=1;i<=m;i++)\n\t {\n\t\t\tfor(j=1;j<=n;j++)\n\t\t\t{ \n \n \n\t\t\t\t\t\tif((c[i][j]>=c[i-1][j])&&(c[i][j]>=c[i][j-1])&&(c[i][j]>=c[i+1][j])&&(c[i][j]>=c[i][j+1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t printf(\"%d %d\\n\",i-1,j-1);\n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t }\n }\n \n\t \n \n return 0;\n}"} +{"label": "72", "index": "35831", "code": "int h[21][21];\nint main()\n{\n\tint i=1,j=1,m=0,n=0;\n cin>>m>>n;\n for (i=1;i<=m;i++)\n {\n for (j=1;j<=n;j++)\n\t {\n\t\t cin>>h[i][j];\n\t }\n }\n i=j=1;\n for (i=1;i<=m;i++)\n {\n for (j=1;j<=n;j++)\n\t {\n\t\t if ((h[i][j]>=h[i-1][j])&&(h[i][j]>=h[i+1][j])&&(h[i][j]>=h[i][j-1])&&(h[i][j]>=h[i][j+1]))\n\t\t\t cout<=a[i][j+1]&&a[i][j]>=a[i+1][j]) printf(\"%d %d\\n\",i,j);\n for(j=1,i=0;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>a[i+1][j]) printf(\"%d %d\\n\",i,j);\n }\n j=n-1;\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]) printf(\"%d %d\\n\",i,j);\n for(i=1;i=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]) printf(\"%d %d\\n\",i,j);\n for(j=1;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]) printf(\"%d %d\\n\",i,j);\n j=n-1;\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]) printf(\"%d %d\\n\",i,j);\n } \n j=0;\n i=m-1;\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]) printf(\"%d %d\\n\",i,j);\n for(j=1;j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]) printf(\"%d %d\\n\",i,j);\n \n j=n-1;\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]) printf(\"%d %d\\n\",i,j);\n}\nvoid main()\n{\n int m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n int a[20][20];\n \n for(i=0;i=a[0][1]&&a[0][0]>=a[1][0])\n\t\t\t\tprintf(\"0 0\\n\");\n\t\t\tfor(j=1;j=a[0][j-1]&&a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j])\n\t\t\t {\n\t\t\t\t printf(\"0 %d\\n\",j);\n\t\t\t }\n\t\t\t}\n\t\t\tif(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n\t\t\t{\n\t\t\t\tprintf(\"0 %d\\n\",n-1);\n\t\t\t}\n\t\t}\n\t\tif(i>0&&i=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d 0\\n\",i);\n\t\t\t\t}\n\t\t\t\tfor(j=1;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]&&a[i][n-1]>=a[i][n-2])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",i,n-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(i==m-1)\n\t\t{\n\t\t\tif(a[m-1][0]>=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n\t\t\t\tprintf(\"%d 0\\n\",m-1);\n\t\t\tfor(j=1;j=a[m-1][j-1]&&a[m-1][j]>=a[m-1][j+1]&&a[m-1][j]>=a[m-2][j])\n\t\t\t {\n\t\t\t\t printf(\"%d %d\\n\",m-1,j);\n\t\t\t }\n\t\t\t}\n\t\t\tif(a[m-1][n-1]>=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",m-1,n-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35835", "code": "int main(){\n int m,n;\n scanf(\"%d%d\",&m,&n);\n int sz[m][n];\n int zs[m][n];\n for(int i=0;i=sz[i+1][x]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n if(i>0&&i=sz[i+1][x]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n if(sz[i][x]>=sz[i-1][x]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n if(i==m-1){\n for(int x=0;x=sz[i-1][x]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n }\n for(int x=0;x=sz[i][x+1]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n if(x>0&&x=sz[i][x+1]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n if(sz[i][x]>=sz[i][x-1]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n if(x==n-1){\n for(int i=0;i=sz[i][x-1]){\n zs[i][x]=zs[i][x]*1;\n }else{\n zs[i][x]=zs[i][x]*0;\n }\n }\n }\n }\n for(int i=0;i>n>>m;\n\tint a[n+2][m+2];\n\tfor(i=0;i>a[i][j];\n\t\t}\n\tfor(i=1;i=a[i+1][j]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(j==n-1){\n\t\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(j!=0&&j!=n-1&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1){\n\t\t\t\tif(j==0){\n\t\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(j==n-1){\n\t\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(j!=0&&j!=n-1&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&i!=m-1&&j==0){\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&i!=m-1&&j==n-1){\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\",i,j);continue;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35838", "code": "int judge(int s[22][22],int i,int j,int m,int n);//judge???ij????????? \nint main()\n{\n int m=0,n=0,i=0,j=0,s[22][22]={0};\n cin>>m>>n;\n for(i=0;i<=m-1;i++)//???? \n for(j=0;j<=n-1;j++)\n cin>>s[i][j];\n for(i=0;i<=m-1;i++)\n for(j=0;j<=n-1;j++)\n {\n if(judge(s,i,j,m,n)) \n cout<=0)&&(s[i][j]>=s[i-1][j]))||(i==0))\n ji++;\n if(((i+1<=m-1)&&(s[i][j]>=s[i+1][j]))||(i==m-1))\n ji++;\n if(((j-1>=0)&&(s[i][j]>=s[i][j-1]))||(j==0))\n ji++;\n if(((j+1<=n-1)&&(s[i][j]>=s[i][j+1]))||(j==n-1))\n ji++;\n if(ji==4)\n return 1;\n else\n return 0;\n}\n"} +{"label": "72", "index": "35839", "code": "int m,n,a[20][20];\nvoid gaocheng(int i,int j){\n\tif(i==0&&j>0&&j=a[i][j+1]&&a[i][j]>=a[i][j-1]\n\t&&a[i][j]>=a[i+1][j]) cout<0&&j=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]\n\t) cout<0&&i=a[i][j+1]&&a[i][j]>=a[i-1][j]\n\t&&a[i][j]>=a[i+1][j]) cout<0&&i=a[i-1][j]&&a[i][j]>=a[i][j-1]\n\t&&a[i][j]>=a[i+1][j]) cout<=a[i+1][j]&&a[i][j]>=a[i][j+1]) cout<=a[i+1][j]&&a[i][j]>=a[i][j-1]) cout<=a[i-1][j]&&a[i][j]>=a[i][j+1]) cout<=a[i-1][j]&&a[i][j]>=a[i][j-1])cout<=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]\n\t&&a[i][j]>=a[i+1][j])\n\t\tcout<>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i> n >> m; //???\n for (i = 1; i <= n; i++)\n {\n for (j = 1; j <= m; j++)\n {\n cin >> a[i][j];\n }\n }\n for (i = 1; i <= n; i++)\n {\n for (j = 1; j <= m; j++)\n {\n if (a[i][j] >= a[i][j+1] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i+1][j] && a[i][j] >= a[i-1][j])\n {\n h[cc] = i;\n l[cc] = j;\n cc++;\n }\n }\n }\n int to = cc;\n for (i = 0; i < to; i++)\n {\n for (j = 0; j < to - 1; j++)\n {\n if (h[j] > h[j+1])\n {\n int temp;\n temp = h[j+1];\n h[j+1] = h[j];\n h[j] = temp;\n temp = l[j+1];\n l[j+1] = l[j];\n l[j] = temp;\n continue;\n }\n if (h[j] == h[j+1] && l[j] > l[j+1])\n {\n int temp;\n temp = h[j+1];\n h[j+1] = h[j];\n h[j] = temp;\n temp = l[j+1];\n l[j+1] = l[j];\n l[j] = temp;\n }\n }\n }\n for (i = 0; i < to; i++)\n {\n cout << h[i] - 1 << \" \" << l[i] - 1 << endl;\n }\n return 0;\n}\n"} +{"label": "72", "index": "35841", "code": "int comp(int center,int up,int left,int down,int right)\n{\n\tif((center>=up) && (center>=left) && (center>=down) && (center>=right))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nint main()\n{\n\tint a[22][22],m,n,i,j,k,r;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][0]=-1;\n\t\ta[i][n+1]=-1;\n\t}\n\tfor(i=0;i<=n+1;i++)\n\t{\n\t\ta[0][i]=-1;\n\t\ta[m+1][i]=-1;\n\t}\n\tfor(i=1;i=h[i-1][j])\n\t\t\t\t&&(i==m-1||h[i][j]>=h[i+1][j])\n\t\t\t\t&&(j==0||h[i][j]>=h[i][j-1])\n\t\t\t\t&&(j==n-1||h[i][j]>=h[i][j+1])\n\t\t\t){\n\t\t\t\tx[N][1]=i;\n\t\t\t\tx[N][2]=j;\n\t\t\t\tN++;\n\t\t\t}\n\tfor(i=0;i=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n \n}\n \n"} +{"label": "72", "index": "35845", "code": "\nint main(){\n int m,n;\n int i,j;\n scanf(\"%d%d\",&m,&n);\n int a[m][n];\n for(i=0;i=a[0][1] && a[0][0]>=a[1][0]) printf(\"0 0\\n\");\n for(j=1;j=a[0][j+1] && a[0][j]>=a[0][j-1] && a[0][j]>=a[1][j]) printf(\"0 %d\\n\",j);\n }\n if(a[0][n-1]>=a[0][n-2] && a[0][n-1]>=a[1][n-1]) printf(\"0 %d\\n\",n-1);\n\n for(i=1;i=a[i+1][0] && a[i][0]>=a[i-1][0] && a[i][0]>=a[i][1]) printf(\"%d 0\\n\",i);\n for(j=1;j=a[i-1][j] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(a[i][n-1]>=a[i+1][n-1] && a[i][n-1]>=a[i-1][n-1] && a[i][n-1]>=a[i][n-2]) printf(\"%d %d\\n\",i,n-1);\n }\n\n if(a[m-1][0]>=a[m-1][1] && a[m-1][0]>=a[m-2][0]) printf(\"%d 0\\n\",m-1);\n for(j=1;j=a[m-1][j+1] && a[m-1][j]>=a[m-1][j-1] && a[m-1][j]>=a[m-2][j]) printf(\"%d %d\\n\",m-1,j);\n }\n if(a[m-1][n-1]>=a[m-1][n-2] && a[m-1][n-1]>=a[m-2][n-1]) printf(\"%d %d\\n\",m-1,n-1);\n return 0;\n}\n"} +{"label": "72", "index": "35846", "code": "int main(){\n int m,n,i,j;\n scanf(\"%d%d\",&m,&n);\n int sz[m+2][n+2];\n for(i=1;i=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35847", "code": "int main()\n{\n\tint m,n,mount[100][100]={0};\n\tcin>>m>>n;\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t\tcin>>mount[i][j];\n\t}\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(mount[i][j]>=mount[i][j+1]&&mount[i][j]>=mount[i][j-1]&&mount[i][j]>=mount[i+1][j]&&mount[i][j]>=mount[i-1][j])\n\t\t\t\tcout<> m >> n; //p???????\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> a[i][j];\n\tif ((a[0][0] >= a[0][1]) && (a[0][0] >= a[1][0])) { //?????????????????\n\t\tb[p][0] = 0;\n\t\tb[p][1] = 0;\n\t\tp++;\n\t}\n\tif ((a[0][n - 1] >= a[1][n - 1]) && (a[0][n - 1] >= a[0][n - 2])) {\n\t\tb[p][0] = 0;\n\t\tb[p][1] = n - 1;\n\t\tp++;\n\t}\n\tif ((a[m - 1][0] >= a[m - 1][1]) && (a[m - 1][0] >= a[m - 2][0])) {\n\t\tb[p][0] = m - 1;\n\t\tb[p][1] = 0;\n\t\tp++;\n\t}\n\tif ((a[m - 1][n - 1] >= a[m - 1][n - 2]) && (a[m - 1][n - 1] >= a[m - 2][n\n\t\t\t- 1])) {\n\t\tb[p][0] = m - 1;\n\t\tb[p][1] = n - 1;\n\t\tp++;\n\t}\n\tfor (i = 1; i < m - 1; i++) {\n\t\tif ((a[i][0] >= a[i - 1][0]) && (a[i][0] >= a[i + 1][0]) && (a[i][0]\n\t\t\t\t>= a[i][1])) {\n\t\t\tb[p][0] = i;\n\t\t\tb[p][1] = 0;\n\t\t\tp++;\n\t\t}\n\t}\n\tfor (i = 1; i < m - 1; i++) {\n\t\tif ((a[i][n - 1] >= a[i - 1][n - 1])\n\t\t\t\t&& (a[i][n - 1] >= a[i + 1][n - 1]) && (a[i][n - 1] >= a[i][n\n\t\t\t\t- 2])) {\n\t\t\tb[p][0] = i;\n\t\t\tb[p][1] = n-1;\n\t\t\tp++;\n\t\t}\n\t}\n\tfor (j = 1; j < n - 1; j++) {\n\t\tif ((a[0][j] >= a[0][j - 1]) && (a[0][j] >= a[0][j + 1]) && (a[0][j]\n\t\t\t\t>= a[1][j])) {\n\t\t\tb[p][0] = 0;\n\t\t\tb[p][1] = j;\n\t\t\tp++;\n\t\t}\n\t}\n\tfor (j = 1; j < n - 1; j++) {\n\t\tif ((a[m - 1][j] >= a[m - 1][j - 1])\n\t\t\t\t&& (a[m - 1][j] >= a[m - 1][j + 1]) && (a[m - 1][j]\n\t\t\t\t>= a[m - 2][j])) {\n\t\t\tb[p][0] = m - 1;\n\t\t\tb[p][1] = j;\n\t\t\tp++;\n\t\t}\n\t}\n\tfor (i = 1; i < m - 1; i++) //???????????????\n\t\tfor (j = 1; j < n - 1; j++)\n\t\t\tif ((a[i][j] >= a[i + 1][j]) && (a[i][j] >= a[i - 1][j])\n\t\t\t\t\t&& (a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i][j + 1])) {\n\t\t\t\tb[p][0] = i;\n\t\t\t\tb[p][1] = j;\n\t\t\t\tp++;\n\t\t\t}\n\tint temp1, temp2, temp3; //???????\n\tfor (i = 0; i < p - 1; i++) {\n\t\tfor (j = 0; j < p - 1 - i; j++) {\n\t\t\tif (b[j][0] > b[j + 1][0]) {\n\t\t\t\ttemp1 = b[j][0];\n\t\t\t\tb[j][0] = b[j + 1][0];\n\t\t\t\tb[j + 1][0] = temp1;\n\t\t\t\ttemp2 = b[j][1];\n\t\t\t\tb[j][1] = b[j + 1][1];\n\t\t\t\tb[j + 1][1] = temp2;\n\t\t\t}\n\t\t\tif ((b[j][0] == b[j + 1][0]) && (b[j][1] > b[j + 1][1])) {\n\t\t\t\ttemp3 = b[j][1];\n\t\t\t\tb[j][1] = b[j + 1][1];\n\t\t\t\tb[j + 1][1] = temp3;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i = 0; i < p; i++) {\n\t\tcout << b[i][0] << \" \" << b[i][1] << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35849", "code": "int main()\n{int m,n;\ncin>>m>>n;\nint i,j;\nint h[22][22];\nfor(i=0;i<22;i++)\n{for(j=0;j<22;j++)\nh[i][j]=0;\n } \nfor(i=1;i<=m;i++)\n{for(j=1;j<=n;j++)\ncin>>h[i][j];\n } \nfor(i=1;i<=m;i++)\n{for(j=1;j<=n;j++)\n{if(h[i][j]>=h[i][j-1]&&h[i][j]>=h[i][j+1]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i-1][j])\ncout<=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]){\n printf(\"%d %d\\n\",i,j);\n } \n }\n }\n \n \n scanf(\"%d\",&i);\n return 0;\n }\n"} +{"label": "72", "index": "35851", "code": "void main()\n{\n int i,j,n,m,s[20][20],t=0;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=s[0][1])&&(s[0][0]>=s[1][0]))\n printf(\"%d %d\\n\",t,t);\n for(i=1;i=s[0][i+1])&&(s[0][i]>=s[1][i])&&(s[0][i])>=s[0][i-1])\n \tprintf(\"%d %d\\n\",t,i);\n }\n if((s[0][n-1]>=s[0][n-2])&&(s[0][n-1]>=s[1][n-1]))\n printf(\"%d %d\\n\",t,n-1);\n for(i=1;i=s[i-1][0])&&(s[i][0]>=s[i][1])&&(s[i][0]>=s[i+1][0]))\n \tprintf(\"%d %d\\n\",i,t);\n \tfor(j=1;j=s[i][j-1])&&(s[i][j]>=s[i][j+1])&&(s[i][j]>=s[i-1][j])&&(s[i][j]>=s[i+1][j]))\n \tprintf(\"%d %d\\n\",i,j);\n \t}\n \tif((s[i][n-1]>=s[i][n-2])&&(s[i][n-1]>=s[i-1][n-1])&&(s[i][n-1]>=s[i+1][n-1]))\n \tprintf(\"%d %d\\n\",i,n-1);\n }\n if((s[m-1][0]>=s[m-2][0])&&(s[m-1][0]>=s[m-1][1]))\n printf(\"%d %d\\n\",m-1,t);\n for(i=1;i=s[m-1][i+1])&&(s[m-1][i]>=s[m-2][i])&&(s[m-1][i])>=s[m-1][i-1])\n \tprintf(\"%d %d\\n\",m-1,i);\n }\n if((s[m-1][n-1]>=s[m-1][n-2])&&(s[m-1][n-1]>=s[m-2][n-1]))\n printf(\"%d %d\",m-1,n-1);\n \n}"} +{"label": "72", "index": "35852", "code": "int main()\n{\n int a[22][22],i,j,k=0,m,n,o,p,c[22],d[22];\n scanf(\"%d %d\",&m,&n);\n for(i=0;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n {\n printf(\"%d %d\\n\",i-1,j-1);\n}\n}\n}\n return 0;\n}\n\n"} +{"label": "72", "index": "35853", "code": "\nint main()\n{\n int m,n;\n int h[22][22];\n cin>>m>>n;\n int i,j;\n for(i=0;i<=n+1;i++) h[0][i]=h[m+1][i]=0;\n for(j=1;j<=m;j++)\n { h[j][0]=h[j][n+1]=0;\n for(i=1;i<=n;i++) cin>>h[j][i];}\n \n for(j=1;j<=m;j++)\n for(i=1;i<=n;i++)\n if(h[j][i]>=h[j-1][i]&&h[j][i]>=h[j+1][i]&&h[j][i]>=h[j][i+1]&&h[j][i]>=h[j][i-1])\n cout<>m>>n;\n\tint h[21][21];\n\tfor(int i=1;i>h[i][j];\n\t\t}\n\t}\n\tfor(int i=0;i<20;i++)\n\t{\n\t\th[0][i]=0;\n\t\th[i][0]=0;\n\t\th[m+1][i]=0;\n\t\th[i][n+1]=0;\n\t}\n\tfor(int i=1;i=h[i][j-1]&&h[i][j]>=h[i][j+1]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i-1][j])\n\t\t\t{\n\t\t\t\tcout<=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n {\n printf(\"%d %d\\n\",i-1,j-1);\n\n }\n }\n }\n\nreturn 0;\n}\n"} +{"label": "72", "index": "35856", "code": "int main()\n{\n int a[ROW][COL],m,n,k,i;\n scanf(\"%d%d\",&m,&n);\n int b[N],c[N],j;\n for(k=0;k=a[k+1][i]&&a[k][i]>=a[k][i+1]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(k==0&&i==n-1)\n {\n if(a[k][i]>=a[k+1][i]&&a[k][i]>=a[k][i-1]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(k==m-1&&i==0)\n {\n if(a[k][i]>=a[k-1][i]&&a[k][i]>=a[k][i+1]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(k==m-1&&i==n-1)\n {\n if(a[k][i]>=a[k-1][i]&&a[k][i]>=a[k][i-1]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(i==0&&k>0&&k=a[k-1][i]&&a[k][i]>=a[k][i+1]&&a[k][i]>=a[k+1][i]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(i==n-1&&k>0&&k=a[k-1][i]&&a[k][i]>=a[k][i-1]&&a[k][i]>=a[k+1][i]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(k==0&&i>0&&i=a[k][i+1]&&a[k][i]>=a[k][i-1]&&a[k][i]>=a[k+1][i]) \n printf(\"%d %d\\n\",k,i);\n }\n else if(k==m-1&&i>0&&i=a[k][i+1]&&a[k][i]>=a[k][i-1]&&a[k][i]>=a[k-1][i]) \n printf(\"%d %d\\n\",k,i);\n }\n else \n {\n if(a[k][i]>=a[k-1][i]&&a[k][i]>=a[k][i-1]&&a[k][i]>=a[k+1][i]&&a[k][i]>=a[k][i+1]) \n printf(\"%d %d\\n\",k,i);\n }\n }\n }\n \n return 0;\n}\n\n"} +{"label": "72", "index": "35857", "code": "int main(){\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tconst int M=m,N=n;\n\tint mount[M][N];\n\tfor(i=0;i>mount[i][j];\n\tfor(i=0;i0)\n\t\t\t\tif(mount[i-1][j]>mount[i][j])continue;\n\t\t\tif(j>0)\n\t\t\t\tif(mount[i][j-1]>mount[i][j])continue;\n\t\t\tif(imount[i][j])continue;\n\t\t\tif(jmount[i][j])continue;\n\t\t\tcout<=a[0][1]&&a[0][0]>=a[1][0])\n\t\t\t\t\t\tprintf(\"0 0\\n\");\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif(j==n-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(a[i][j]>=a[0][j-1]&&a[i][j]>=a[0][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tfor(j=0;j=a[i][1]&&a[i][0]>=a[i-1][0])\n\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(j==n-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i][n-1]>=a[i][n-2]&&a[i][n-1]>=a[i-1][n-1])\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t}\n\t\t\n}\t\t\t\t"} +{"label": "72", "index": "35859", "code": "void sort (int *data,int n)\n{\n int i,j,*min,t;\n for (i=0;i>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t cin>>a[i][j];\n for(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t{\n\t\t\t\tb[p][0]=i;\n\t\t\t\tb[p][1]=j;\n\t\t\t\tp++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t}\n\tfor(i=0;i>m>>n;\n\tint a[22][22];\n\tint i,j;\n\tfor(i=0;i>a[i][j];\n\t\t}\n\t}\n\tif(a[0][0]>=a[0][1] && a[0][0]>=a[1][0])\n\t\tcout<<\"0 0\"<=a[0][i-1] && a[0][i]>=a[0][i+1] && a[0][i]>=a[1][i])\n\t\t\tcout<<\"0 \"<=a[0][n-2] && a[0][n-1]>=a[1][n-1])\n\t\tcout<<\"0 \"<=a[i][1] && a[i][0]>=a[i-1][0] && a[i][0]>=a[i+1][0])\n\t\t\tcout<=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j])\n\t\t\t{\n\t\t\t\tcout<=a[i][n-2] && a[i][n-1]>=a[i-1][n-1] && a[i][n-1]>=a[i+1][n-1])\n\t\t\tcout<=a[m-1][1] && a[m-1][0]>=a[m-2][0])\n\t\tcout<=a[m-1][i-1] && a[m-1][i]>=a[m-1][i+1] && a[m-1][i]>=a[m-2][i])\n\t\t\tcout<=a[m-1][n-2] && a[m-1][n-1]>=a[m-2][n-1])\n\t\tcout<>row>>col;\n\n\tfor(int i=0;i<=row+1;i++)\n\t\tfor(int j=0;j<=col+1;j++)\n\t\t moun[i][j]=0;\n\n\tfor(int i=1;i<=row;i++)\n\t\tfor(int j=1;j<=col;j++)\n\t\t\tcin>>moun[i][j];\n\n\tfor(int i=1;i<=row;i++)\n\t\tfor(int j=1;j<=col;j++)\n\t\t\tif(moun[i][j]>=moun[i-1][j] && moun[i][j]>=moun[i][j-1] && moun[i][j]>=moun[i+1][j] && moun[i][j]>=moun[i][j+1])\n\t\t\t\tcout<>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])cout<=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])cout<=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])cout<=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])cout<=(sz[i-1][j]))&&((sz[i][j])>=(sz[i+1][j]))&&((sz[i][j])>=(sz[i][j-1]))&&((sz[i][j])>=(sz[i][j+1]))){\n\t\t\t printf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n return 0;\n}\n"} +{"label": "72", "index": "35865", "code": "int a[100][100],m,n;\n\nint high(int x,int y)\n{\n\tif(x!=0 && a[x-1][y]>a[x][y]) return 0;\n\tif(y!=0 && a[x][y-1]>a[x][y]) return 0;\n\tif(x!=m && a[x+1][y]>a[x][y]) return 0;\n\tif(y!=n && a[x][y+1]>a[x][y]) return 0;\n\treturn 1;\n}\n\nint main()\n{\n\tint i,j;\n\n\tcin>>m>>n;\n\tfor(i=0;i>a[i][j];\n\tfor(i=0;i> m >> n;\n\tfor (int i = 0; i <= m + 1; i++)\n\t{\n\t\tfor (int j = 0; j <= n + 1; j++)\n\t\t{\n\t\t\tif (i == 0 || i == m + 1 || j == 0 || j == n + 1)\n\t\t\t{\n\t\t\t\ta[i][j] = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcin >> a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor (int k = 1; k <= m; k++)\n\t{\n\t\tfor (int l = 1; l <= n; l++)\n\t\t{\n\t\t\tif (a[k][l] >= a[k - 1][l] && a[k][l] >= a[k + 1][l] && a[k][l] >= a[k][l + 1] && a[k][l] >= a[k][l - 1])\n\t\t\t{\n\t\t\t\tcout << k - 1 << ' ' << l - 1 << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35867", "code": "int main()\n{\t\n\tint num[22][22],i,j,m,n;\n\twhile(cin >> m >> n)\n\t{\n\t\tmemset(num,0,sizeof(num));\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin >> num[i][j];\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif((num[i][j]>=num[i][j-1])&&(num[i][j]>=num[i][j+1])&&(num[i][j]>=num[i+1][j])&&(num[i][j]>=num[i-1][j]))\n\t\t\t{\n\t\t\t\tcout << i-1 << \" \" << j-1 << endl;\n\t\t\t}\n\t\t}\n\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35868", "code": "int main()\n{\n int m,n,i,q;\n scanf(\"%d%d\",&m,&n);\n int qq[m+2][n+2];\n for(i=1;i=qq[i-1][q]&qq[i][q]>=qq[i+1][q]&qq[i][q]>=qq[i][q-1]&qq[i][q]>=qq[i][q+1])\n {\n printf(\"%d %d\\n\",i-1,q-1);\n }\n else\n {\n i=i;\n q=q;\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35869", "code": "//============================================================================\n// Name : abc.cpp\n// Author : aaa\n// Version :\n// Copyright : Your copyright notice\n// Description : Hello World in C++, Ansi-style\n//============================================================================\n\n\nint main() {\n\tint h,li;\n\tint a[25][25];\n\tcin>>h>>li;\n\tfor(int i=0;i>a[i][j];\n\tfor(int i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\t\t\t\t\tcout<=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t\t\t\t\t\t\t\tcout<>m>>n;\n\tfor(j=0;j>a[j][i];\n\t}\n\tfor(j=0;j=a[j][i-1]&&a[j][i]>=a[j][i+1]&&a[j][i]>=a[j+1][i])\n\t\t\t\t\tcout<=a[j][i+1]&&a[j][i]>=a[j+1][i])\n\t\t\t\t\tcout<=a[j][i-1]&&a[j][i]>=a[j][i+1]&&a[j][i]>=a[j-1][i]&&a[j][i]>=a[j+1][i])\n\t\t\t\t cout<=a[i][j+1])&&(a[i][j]>=a[i+1][j])) printf(\"%d %d\\n\",i,j);}\n else if(j=a[i][j+1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])) printf(\"%d %d\\n\",i,j);} \n else if(j==n-1){if((a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])) printf(\"%d %d\\n\",i,j);}\n } \n else if(i=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1])) printf(\"%d %d\\n\",i,j);}\n else if(j=a[i][j+1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>a[i-1][j]))\n printf(\"%d %d\\n\",i,j);}\n else if(j==n-1){if((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])) printf(\"%d %d\\n\",i,j);}\n }\n else if(i==m-1){\n if(j==0){if((a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i-1][j])) printf(\"%d %d\\n\",i,j);}\n else if(j=a[i][j+1])&&(a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i][j-1])) printf(\"%d %d\\n\",i,j);}\n else if(j==n-1){if((a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i-1][j])) printf(\"%d %d\",i,j);}\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35873", "code": "int main()\n{\n\tint a[21][21]={0};\n\tint b[500][2]={0};\n\tint m,n,i,j,k=0;\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t{b[k][0]=i;b[k][1]=j;k++;}\n\tfor(i=0;i>m;\n\tcin>>n;\n\tfor(int i=0;i>a[i][j];\n\tif(a[0][0]>=a[1][0]&&a[0][0]>=a[0][1])cout<<0<<' '<<0<=a[0][c-1]&&a[0][c]>=a[0][c+1]&&a[0][c]>=a[1][c])cout<<0<<' '<=a[0][n-2]&&a[0][n-1]>=a[1][n-1])cout<<0<<' '<=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])cout<=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])cout<=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])cout<=a[m-2][0]&&a[m-1][0]>=a[m-1][1])cout<=a[m-1][c-1]&&a[m-1][c]>=a[m-1][c+1]&&a[m-1][c]>=a[m-2][c])cout<=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])cout<>m>>n;\n\tint h[m][n];\n\tfor(i=0;i>h[i][j];\n\t\t}\n\t}\n\tfor(i=0;i=0&&j-1>=0&&i+1=h[i-1][j]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout<=0&&j+1=h[i][j-1]&&h[i][j]>=h[i][j+1]&&h[i][j]>=h[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=0&&j+1=h[i][j-1]&&h[i][j]>=h[i][j+1]&&h[i][j]>=h[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout<=0&&i+1=h[i-1][j]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout<=0&&i+1=h[i-1][j]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tcout<=h[0][1]&&h[i][j]>=h[1][0])\n\t\t\t\t{\n\t\t\t\t\tcout<=h[0][n-2]&&h[i][j]>=h[1][n-1])\n\t\t\t\t{\n\t\t\t\t\tcout<=h[m-2][0]&&h[i][j]>=h[m-1][1])\n\t\t\t\t{\n\t\t\t\t\tcout<=h[m-2][n-1]&&h[i][j]>=h[m-1][n-2])\n\t\t\t\t{\n\t\t\t\t\tcout<=a[i+1][k])&&(a[i][k]>=a[i][k+1]))\n\t\tprintf(\"%d %d\\n\",i,k);\n\t\telse {\n\t\t\tif (k=a[i+1][k])&&(a[i][k]>=a[i][k+1])&&(a[i][k]>=a[i][k-1]))\t\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(k==n-1&&(a[i][k]>=a[i+1][k])&&(a[i][k]>=a[i][k-1]))\n\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t \telse {\n\t\t\tif (i>0&&i=a[i+1][k])&&(a[i][k]>=a[i-1][k])&&(a[i][k]>=a[i][k+1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\n\t\t\t\t\t}\n\t\t\t\t\tif(k==n-1)\n\t\t\t\t\t{\n\t\t\t\t\tif((a[i][k]>=a[i+1][k])&&(a[i][k]>=a[i-1][k])&&(a[i][k]>=a[i][k-1]))\n\t\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t if(k>0&&k=a[i+1][k])&&(a[i][k]>=a[i-1][k])&&(a[i][k]>=a[i][k+1])&&(a[i][k]>=a[i][k-1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t printf(\"%d %d\\n\",i,k);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse if(i==m-1)\n\t\t\t\t{\n\t\t\t\tif(k==0&&(a[i][k]>=a[i-1][k])&&(a[i][k]>=a[i][k+1]))\n\t\tprintf(\"%d %d\\n\",i,k);\n\t\telse {\n\t\t\tif (k=a[i-1][k])&&(a[i][k]>=a[i][k+1])&&(a[i][k]>=a[i][k-1]))\t\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(k==n-1&&(a[i][k]>=a[i-1][k])&&(a[i][k]>=a[i][k-1]))\n\t\t\t\tprintf(\"%d %d\\n\",i,k);\t\n\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n }\n}\n return 0;\n} \n"} +{"label": "72", "index": "35877", "code": "int main()\n{\n\tint m,n,s[A][A]={0},i,j;\n\tscanf (\"%d%d\",&m,&n);\n for (i=1;i=s[i+1][j]&&s[i][j]>=s[i][j+1]&&s[i][j]>=s[i-1][j]&&s[i][j]>=s[i][j-1])\n\t\t printf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t\t\n\n\t}\n \n\treturn 0;\n}\n"} +{"label": "72", "index": "35878", "code": "/*\n * 00004.cpp\n *\n * Created on: 2013-12-13\n * Author: Administrator\n ???m\u00d7n??????????????????????????????????????????????????\n ?????????????????????)?\n????\n???????????????m?5?m?20???n?5?n?20??\n??m????m\u00d7n????????????????????????????????\n????\n?????????????????????m???????n???????????\n????\n10 5\n0 76 81 34 66\n\n1 13 58 4 40\n\n5 24 17 6 65\n\n13 13 76 3 20\n\n8 36 12 60 37\n\n42 53 87 10 65\n\n42 25 47 41 33\n\n71 69 94 24 12\n\n92 11 71 3 82\n\n91 90 20 95 44\n\n????\n0 2\n\n0 4\n\n2 1\n\n2 4\n\n3 0\n\n3 2\n\n4 3\n\n5 2\n\n5 4\n\n7 2\n\n8 0\n\n8 4\n\n9 3\n*/\nint main(){\n\tint m,n;\n\tint str[20][20];\n\tcin>>m>>n;\n\tfor(int i=0;i>str[i][j];\n\tfor(int i=0;i=str[0][1])&&(str[0][0]>=str[1][0]))\n\t\t cout<=str[1][n-1])&&(str[0][n-1]>=str[0][n-2]))\n\t\t\t\tcout<=str[m-2][n-1])&&(str[m-1][n-1]>=str[m-1][n-2]))\n\t\t\t\t\t\tcout<=str[m-2][0])&&(str[m-1][0]>=str[m-1][1]))\n\t\t\t\t\t\tcout<=str[0][j-1])&&(str[0][j]>=str[1][j])&&(str[i][j]>=str[0][j+1]))\n\t\t\t\t\tcout<=str[i-1][j])&&(str[i][j]>=str[i+1][j])&&(str[i][j]>=str[i][j+1]))\n\t\t\t\t\t\tcout<=str[i-1][j])&&(str[i][j]>=str[i][j-1])&&(str[i][j]>=str[i][j+1]))\n\t\t\t\t\t\tcout<=str[i-1][j])&&(str[i][j]>=str[i][j-1])&&(str[i][j]>=str[i+1][j]))\n\t\t\t\t\t\tcout<=str[i-1][j])&&(str[i][j]>=str[i][j-1])&&(str[i][j]>=str[i+1][j])&&(str[i][j]>=str[i][j+1]))\n\t\t\tcout<>n>>m;\n\tfor(int i=1;i<=n;i++){\n\t\tfor(int j=1;j<=m;j++){\n\t\t\tcin>>a[i][j];\n\t\t}\n\t} \n\tfor(int i=0;i<=n+1;i++){\n\t\tfor(int j=0;j<=m+1;j++){\n\t\t\tif(i==0||j==0||i==n+1||j==m+1) a[i][j]=0;\n\t\t}\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tfor(int j=1;j<=m;j++){\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]) cout<=a[i][j+1]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if (j==n-1)\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else \n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n }\n \n }\n else if (i==m-1)\n {\n if (j==0)\n {\n if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if (j==n-1)\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n else \n {\n if (j==0)\n {\n if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if (j==n-1)\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n getchar();\n getchar();\n}\n"} +{"label": "72", "index": "35881", "code": "int main(){\n int an[30][30];\n\tint m,n,i,j;\n\tchar x;\n\tx=' ';\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<30;i++){\n\t\tfor(j=0;j<30;j++)\n\t\t\tan[i][j]=0;\n\t}\n\tfor(i=1;i=an[i-1][j]&&an[i][j]>=an[i+1][j]&&an[i][j]>=an[i][j-1]&&an[i][j]>=an[i][j+1])\n\t\t\t\tprintf(\"%d%c%d\\n\",i-1,x,j-1);\n\t\t}\n\t}\n\treturn 0;\n}\n\t"} +{"label": "72", "index": "35882", "code": "\nint main(){\n\tint m,n;\n\tcin>>m>>n;\n\tint mountain[m+2][n+2];\n\t\n\tfor(int i=0;i>mountain[i][j];\n\t\t\telse mountain[i][j]=-1;\n\t\t}\n\t}\n\t\n\tfor(int i=1;imountain[i][j]||\n\t\t\t\tmountain[i+1][j]>mountain[i][j]||\n\t\t\t\tmountain[i][j-1]>mountain[i][j]||\n\t\t\t\tmountain[i][j+1]>mountain[i][j])){\n\t\t\t\tcout<> m >> n;\n\tfor(i = 0; i < m; i++)\n\t{\n\t\tfor(j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor(i = 0; i < m; i++)\n\t{\n\t\tfor(j = 0; j < n; j++)\n\t\t{\n\t\t\tif(i==0 && j==0)\n\t\t\t{\n\t\t\t\tif(a[i+1][0] <= a[i][j] && a[0][j+1] <= a[i][j])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i ==0 && j == n-1)\n\t\t\t{\n\t\t\t\tif(a[0][j-1] <= a[0][j] && a[1][j] <= a[0][j])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i == m-1&&j == 0)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i-1][j] &&a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout <=a[i][j-1] && a[i][j]>=a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout << i<< \" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i == 0)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i][j+1] && a[i][j] >=a[i][j-1] && a[i][j] >= a[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tcout << i <<\" \"<< j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i == m-1)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i][j+1]&&a[i][j] >=a[i][j-1] && a[i][j] >= a[i-1][j])\n\t\t\t\t{\n\t\t\t\t\tcout << i <<\" \"<< j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(j == 0)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i-1][j]&&a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(j == n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i-1][j]&&a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i-1][j]&&a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \"<< j<< endl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35884", "code": "int main(){\n\tint k,m,n,i,l,j,x,z,o,p,q,r,s;\n\tint a[20][20];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=a[0][1])&&(a[0][0]>=a[1][0]))\n\t\tprintf(\"0 0\\n\");\n\tfor(i=1;i=a[0][i-1])&&(a[0][i]>=a[0][i+1])&&(a[0][i]>=a[1][i]))\n\t\t\tprintf(\"0 %d\\n\",i);\n\t}\n\tif((a[0][n-1]>=a[0][n-2])&&(a[0][n-1]>a[1][n-1]))\n\t{x=n-1;\n\tprintf(\"0 %d\\n\",x);}\n\tfor(i=1;i=a[i-1][0])&&(a[i][0]>=a[i+1][0])&&(a[i][0]>=a[i][1]))\n\t\t\tprintf(\"%d 0\\n\",i);\n\t\tfor(j=1;j=a[i-1][n-1])&&(a[i][n-1]>=a[i+1][n-1])&&(a[i][n-1]>=a[i][n-2]))\n\t\t{ z=n-1;\n\t\t\tprintf(\"%d %d\\n\",i,z);\n\t\t}\n}\n\tif((a[m-1][0]>=a[m-1][1])&&(a[m-1][0]>a[m-2][0]))\n\t{\n\t\to=m-1;\n\t\tprintf(\"%d 0\\n\",o);\n\t}\n\tfor(i=1;i=a[m-1][i-1])&&(a[m-1][i]>=a[m-1][i+1])&&(a[m-1][i]>=a[m-2][i]))\n\t\t{\n\t\t\tp=m-1;\n\t\t\tprintf(\"%d %d\\n\",p,i);\n\t}\n\t}\n\tif((a[m-1][n-1]>=a[m-1][n-2])&&(a[m-1][n-1]>a[m-2][n-1]))\n\t{q=m-1;\n\tr=n-1;\n\tprintf(\"%d %d\\n\",q,r);}\n\treturn 0;\n}\n\n\t\t\n\t"} +{"label": "72", "index": "35885", "code": "int main(){\n\tint i,n,m,j,k=0,f;\n\tint sz[25][25],q[25][25],w[25],s[25];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=q[i+1][j]&&q[i][j]>=q[i-1][j]&&q[i][j]>=q[i][j+1]&&q[i][j]>=q[i][j-1]){\n\t\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);}}}\n\t\nreturn 0;\n}\n\n"} +{"label": "72", "index": "35886", "code": "\nvoid check(int m,int n,int h[20][20])\n{\n\tint i,j;\n\tfor(i=0;i<=m-1;i++)\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\t\tint x=1;\n\t\t\tif(i!=0&&h[i][j]> m >> n;\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> hei[i][j];\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (j != 0 && hei[i][j] < hei[i][j - 1])\n\t\t\t\tcontinue;\n\t\t\tif (j != n - 1 && hei[i][j] < hei[i][j + 1])\n\t\t\t\tcontinue;\n\t\t\tif (i != 0 && hei[i][j] < hei[i - 1][j])\n\t\t\t\tcontinue;\n\t\t\tif (i != m - 1 && hei[i][j] < hei[i + 1][j])\n\t\t\t\tcontinue;\n\t\t\tcout << i << \" \" <=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]){\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n}\n}\n}\nreturn 0;\n}\n"} +{"label": "72", "index": "35889", "code": "int main()\n{\n int n,m,i,j,k,a[22][22];\n float avg;\n cin>>m>>n;\n for(i=0;i<22;i++)\n {\n for(j=0;j<22;j++)\n {\n a[i][j]=0;\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n cin>>a[i][j];\n }\n }\n for(i=1;i<=m;i++)\n {\n for(j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n {\n cout<>n;\n return 0;\n} \n"} +{"label": "72", "index": "35890", "code": "int main()\n{\n\tint a[22][22], i, j, m, n;\n\tcin >> m >> n;\n\tfor(i=1; i <= m; i++)\n\t\tfor(j=1; j <= n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\tfor(i=0; i<22; i++)\n\t{\n\t\ta[0][i]=0;\n\t\ta[m+1][i]=0;\n\t\ta[i][0]=0;\n\t\ta[i][n+1]=0;\n\t}\n\tfor(i=1; i <= m; i++)\n\t\tfor(j=1; j <= n; j++)\n\t\t{\n\t\t\tif(a[i][j] >= a[i-1][j] && a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\tcout << i-1 << \" \" << j-1 << endl;\n\t\t}\n\treturn 0; \n}"} +{"label": "72", "index": "35891", "code": "\nint main()\n{\n\tint num[22][22];\n\tmemset(num,0,sizeof(num));\n\tint n=0,m=0;\n\tint i=0,j=0;\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>num[i][j];\n\tfor(j=1;j<=m;j++)\n\t\tfor(i=1;i<=n;i++)\n\t\t\tif(num[j][i]>=num[j-1][i]&&num[j][i]>=num[j+1][i]&&num[j][i]>=num[j][i+1]&&num[j][i]>=num[j][i-1])\n\t\t\t\tcout<=mt[0][1]&&mt[0][0]>=mt[1][0])\n printf(\"%d %d\\n\",i,j);\n }\n else if(j==n-1)\n {\n if(mt[0][n-1]>=mt[1][n-1]&&mt[0][n-1]>=mt[0][n-2])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(mt[i][j]>=mt[i][j-1]&&mt[i][j]>=mt[i][j+1]&&mt[i][j]>=mt[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==m-1)\n {\n if(j==0)\n {\n if(mt[i][j]>=mt[i][j+1]&&mt[i][j]>=mt[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if(j==n-1)\n {\n if(mt[i][j]>=mt[i][j-1]&&mt[i][j]>=mt[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(mt[i][j]>=mt[i-1][j]&&mt[i][j]>=mt[i][j-1]&mt[i][j]>=mt[i][j+1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n else\n {\n if(j==0)\n {\n if(mt[i][j]>=mt[i][j+1]&&mt[i][j]>=mt[i-1][j]&&mt[i][j]>=mt[i+1][j])\n printf(\"%d %d\\n\",i,j);\n } \n else if(j==n-1)\n {\n if(mt[i][j]>=mt[i][j-1]&&mt[i][j]>=mt[i-1][j]&&mt[i][j]>=mt[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(mt[i][j]>=mt[i][j-1]&&mt[i][j]>=mt[i-1][j]&&mt[i][j]>=mt[i+1][j]&&mt[i][j]>=mt[i][j+1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n }\n return 0;\n}\n"} +{"label": "72", "index": "35893", "code": "int main()\n{\n int m,n;\n int i,j,k;\n scanf(\"%d %d\",&m,&n);\nint **p=(int **)malloc(m*sizeof(int *));\nfor(i=0;i=p[i][j+1]&&p[i][j]>=p[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if(j==n-1)\n {\n if(p[i][j]>=p[i][j-1]&&p[i][j]>=p[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(p[i][j]>=p[i][j+1]&&p[i][j]>=p[i+1][j]&&p[i][j]>=p[i][j-1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n else if(i==m-1)\n {\n if(j==0)\n {\n if(p[i][j]>=p[i][j+1]&&p[i][j]>=p[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if(j==n-1)\n {\n if(p[i][j]>=p[i][j-1]&&p[i][j]>=p[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(p[i][j]>=p[i][j+1]&&p[i][j]>=p[i-1][j]&&p[i][j]>=p[i][j-1])\n printf(\"%d %d\\n\",i,j);\n }\n }\n else\n {\n if(j==0)\n {\n if(p[i][j]>=p[i][j+1]&&p[i][j]>=p[i+1][j]&&p[i][j]>=p[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else if(j==n-1)\n {\n if(p[i][j]>=p[i][j-1]&&p[i][j]>=p[i+1][j]&&p[i][j]>=p[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n else\n {\n if(p[i][j]>=p[i][j+1]&&p[i][j]>=p[i+1][j]&&p[i][j]>=p[i][j-1]&&p[i][j]>=p[i-1][j])\n printf(\"%d %d\\n\",i,j);\n }\n }\n \n }\n }\ngetchar();\ngetchar();\n\n}"} +{"label": "72", "index": "35894", "code": "int main(){\n\tint m,n,i,j,sz[22][22];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tscanf(\"%d\",&sz[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<=m+1;i++){\n\t\tfor(j=0;j<=n+1;j++){\n if(i==0||i==m+1||j==0||j==n+1){\n\t\t sz[i][j]=0;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++){\n\t\tfor(j=1;j<=n;j++){\n\t\t\tif((sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35895", "code": "int main()\n{\n int m,n,i,j,o;\n scanf(\"%d\",&m);\n scanf(\"%d\",&n);\n o=0;\n int a[m+2][n+2];\n for(i=0;i=a[i-1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j+1]))\n {\n if(o==0)\n {\n printf(\"%d %d\\n\",(i-1),(j-1));\n o++;\n }\n else\n {\n printf(\"%d %d\\n\",(i-1),(j-1));\n o++;\n }\n }\n }\n }\n}"} +{"label": "72", "index": "35896", "code": "int main()\n{\n\tint m,n;//m?n??????\n\tint map[20][20];\n\tint i,j;\n\tcin>>m>>n;\n\tfor(i=0;i>map[i][j];\n\t\t}\n\t}\n\tfor(i=0;i=map[0][i+1]&&map[0][i]>=map[1][i])\n\t\t\t\tcout<<\"0\"<<\" \"<=map[0][i-1]&&map[0][i]>=map[1][i])\n\t\t\t\tcout<<\"0\"<<\" \"<=map[0][i-1]&&map[0][i]>=map[0][i+1]&&map[0][i]>=map[1][i])\n\t\t\t\tcout<<\"0\"<<\" \"<=map[i-1][j]&&map[i][j]>=map[i+1][j]&&map[i][j]>=map[i][j+1])\n\t\t\t\t\tcout<=map[i-1][j]&&map[i][j]>=map[i+1][j]&&map[i][j]>=map[i][j-1])\n\t\t\t\t\tcout<=map[i-1][j]&&map[i][j]>=map[i+1][j]&&map[i][j]>=map[i][j+1]&&map[i][j]>=map[i][j-1])\n\t\t\t\t\tcout<=map[m-1][i+1]&&map[m-1][i]>=map[m-2][i])\n\t\t\t\tcout<<(m-1)<<\" \"<=map[m-1][i-1]&&map[m-1][i]>=map[m-2][i])\n\t\t\t\tcout<<(m-1)<<\" \"<=map[m-1][i-1]&&map[m-1][i]>=map[m-1][i+1]&&map[m-1][i]>=map[m-2][i])\n\t\t\t\tcout<<(m-1)<<\" \"<> m >> n;\n\tfor(i = 0; i < m;i++)\n\t\tfor(j = 0; j < n; j++)\n\t\t\tcin >> gao[i][j];\n\tif(gao[0][0] >= gao[0][1] && gao[0][0] >= gao[1][0])\n\t\tcout << 0 << ' ' << 0 << endl;\n\tfor(j = 1; j < n - 1; j++)\n\t\tif(gao[0][j] >= gao[0][j - 1] \n\t\t\t&& gao[0][j] >= gao[0][j + 1] \n\t\t\t&& gao[0][j] >= gao[1][j])\n\t\t\tcout << 0 << ' ' << j << endl;\n\tif(gao[0][n - 1] >= gao[0][n - 2] && gao[0][n - 1] >= gao[1][n - 1])\n\t\tcout << 0 << ' ' << n - 1 << endl;\n\tfor(i = 1; i < m - 1;i++)\n\t\tfor(j = 0; j < n; j++)\n\t\t{\n\t\t\tif(j ==0 && gao[i][j] >= gao[i - 1][j] \n\t\t\t\t&& gao[i][j] >= gao[i][j + 1] \n\t\t\t\t&& gao[i][j] >= gao[i + 1][j])\n\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\telse if(j > 0 && j < n - 1 && gao[i][j] >= gao[i - 1][j] \n\t\t\t\t&& gao[i][j] >= gao[i][j - 1] \n\t\t\t\t&& gao[i][j] >= gao[i][j + 1] \n\t\t\t\t&& gao[i][j] >= gao[i + 1][j])\n\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\telse if(j == n - 1 && gao[i][j] >= gao[i - 1][j] \n\t\t\t\t&& gao[i][j] >= gao[i][j - 1] \n\t\t\t\t&& gao[i][j] >= gao[i + 1][j])\n\t\t\t\tcout << i << ' ' << j << endl;\n\t\t}\n\tif(gao[m - 1][0] >= gao[m - 1][1] && gao[m - 1][0] >= gao[m - 2][0])\n\t\tcout << m - 1 << ' ' << 0 << endl;\n\tfor(j = 1; j < n - 1; j++)\n\t\tif(gao[m - 1][j] >= gao[m - 1][j - 1] \n\t\t\t&& gao[m -1 ][j] >= gao[m - 1][j + 1] \n\t\t\t&& gao[m - 1][j] >= gao[m - 2][j])\n\t\t\tcout << m - 1 << ' ' << j << endl;\n\tif(gao[ m- 1][n - 1] >= gao[m - 1][n - 2] && gao[m - 1][n - 1] >= gao[m - 2][n - 1])\n\t\tcout << m - 1 << ' ' << n - 1 << endl;\n\n\treturn 0;\n}"} +{"label": "72", "index": "35898", "code": "int main()\n{\n int height[30][30] = {0};\n int i, j, k, row, col;\n cin >> row >> col;\n for (i = 1; i <= row; i++)\n for (j = 1; j <= col; j++)\n {\n cin >> height[i][j];\n }\n int dir[4][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};\n for (i = 1; i <= row; i++)\n for (j = 1; j <= col; j++)\n {\n for (k = 0; k < 4; k++)\n {\n int ii = i + dir[k][0];\n int jj = j + dir[k][1];\n if (height[i][j] < height[ii][jj])\n {\n break;\n }\n }\n if (k == 4)\n {\n cout << i - 1 << \" \" << j - 1 << endl;\n }\n } \n return 0;\n}\n"} +{"label": "72", "index": "35899", "code": "int main()\n{\n\tint x=0,y=0,i=0,j=0,avg=0;\n\tint h[22][22]={0};\n\tint outx[400],outy[400],count=0;\n\tcin>>x>>y;\n\tfor(i=0;i<22;i++)\n\t{\n\t\tfor(j=0;j<22;j++)\n\t\t{\n\t\t\th[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i<=x;i++)\n\t{\n\t\tfor(j=1;j<=y;j++)\n\t\t{\n\t\t\tcin>>h[i][j];\n\t\t}\n\t}\n\tfor(i=1;i<=x;i++)\n\t{\n\t\tfor(j=1;j<=y;j++)\n\t\t{\n\t\t\tif((h[i][j]>=h[i-1][j])&&(h[i][j]>=h[i+1][j])&&(h[i][j]>=h[i][j-1])&&(h[i][j]>=h[i][j+1]))\n\t\t\t{\n\t\t\t\toutx[count]=i;\n\t\t\t\touty[count++]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i>m>>n;\n\tfor(i=0;i>h[i][j];\n\t\t\n\t\t}\n for(j=0;j<=n+1;j++) //???????????????????????????0???????????\n\t{b[0][j]=0;b[m+1][j]=0;}\n\tfor(i=1;i=b[i-1][j]&&b[i][j]>=b[i+1][j]&&b[i][j]>=b[i][j+1]&&b[i][j]>=b[i][j-1])\n\t\t\t\tcout<=0) {b[0]=1;t1++;if(a[x-1][y]<=a[x][y]) d[0]='t';}\n if(x+1<=m-1) {b[1]=1;t1++;if(a[x+1][y]<=a[x][y]) d[1]='t';}\n if(y-1>=0) {b[2]=1;t1++;if(a[x][y-1]<=a[x][y]) d[2]='t';}\n if(y+1<=n-1) {b[3]=1;t1++;if(a[x][y+1]<=a[x][y]) d[3]='t';}\n for(i=0;i<4;i++) {if(b[i]==1&&d[i]=='t') t2++;}\n if(t1==t2) c='t';\n else c='f'; \n return c;\n}\nmain()\n{\n int m,n,i,j;\n scanf(\"%d %d\",&m,&n);\n int a[20][20]={0},b[20][20]={0};\n for(i=0;i>m>>n;\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\tb[i][j]=1;\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t\tif(b[i][j])cout<=sz[0][1]&&sz[0][0]>=sz[1][0]){\n\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=0;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\tfor(j=1;j=sz[0][j+1]&&sz[0][j]>=sz[0][j-1]&&sz[0][j]>=sz[1][j]){\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=j;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t}\n\t}\n\t\t\tif(sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1]){\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=n-1;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(i=1;i=sz[i][1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]){\n\t\t\t\t\t\t\te[z]=i;\n\t\t\t\t\t\t\tf[z]=j;\n\t\t\t\t\t\t\tz++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(j!=0&&j!=n-1){\n\t\t\t\t\t\tif(sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]){\n\t\t\t\t\t\t\te[z]=i;\n\t\t\t\t\t\t\tf[z]=j;\n\t\t\t\t\t\t\tz++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(j==n-1){\n\t\t\t\t\t\tif(sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]){\n\t\t\t\t\t\t\te[z]=i;\n\t\t\t\t\t\t\tf[z]=j;\n\t\t\t\t\t\t\tz++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(sz[m-1][0]>=sz[m-2][0]&&sz[m-1][0]>=sz[m-1][1]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=0;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\tfor(j=1;j=sz[m-1][j+1]&&sz[m-1][j]>=sz[m-1][j-1]&&sz[m-1][j]>=sz[m-2][j]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=j;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t}\n\t\t}\n\n\t\t\tif(sz[m-1][n-1]>=sz[m-2][n-1]&&sz[m-1][n-1]>=sz[m-1][n-2]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=n-1;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\n\t\n \n\tfor(p=0;p>m>>n;\n\tfor(i=0;i>MT[i][j];\n\t}\n\n\tfor(i=0;i=0 && j+1=0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i+1][j] && MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j+1] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i+1=0 && j+1=MT[i+1][j] && MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i+1=0 && j-1>=0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i+1][j] && MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i+1=0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i+1][j] && MT[i][j]>=MT[i][j+1] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i-1>=0 && j+1=0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j+1] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==0 && j==0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i+1][j] && MT[i][j]>=MT[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==0 && j==n-1)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i+1][j] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==m-1 && j==0)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==m-1 && j==n-1)\n\t\t\t{\n\t\t\t\tif(MT[i][j]>=MT[i-1][j] && MT[i][j]>=MT[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tTx[k]=i;\n\t\t\t\t\tTy[k]=j;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tfor(i=0;iTx[j+1])\n\t\t\t{\n\t\t\t\tx=Tx[j];\n\t\t\t\tTx[j]=Tx[j+1];\n\t\t\t\tTx[j+1]=x;\n\t\t\t\ty=Ty[j];\n\t\t\t\tTy[j]=Ty[j+1];\n\t\t\t\tTy[j+1]=y;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(i=0;iTy[j+1])\n\t\t\t{\n\t\t\t\ty=Ty[j];\n\t\t\t\tTy[j]=Ty[j+1];\n\t\t\t\tTy[j+1]=y;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfor(i=0;i=sz[0][1]&&sz[0][0]>=sz[1][0]) printf(\"0 0\\n\");\n\tfor(j=1;j=sz[0][j-1]&&sz[0][j]>=sz[0][j+1]&&sz[0][j]>=sz[1][j]){\n\t\t\tprintf(\"0 %d\\n\",j);\n\t\t}\n\t}\t\n\tif(sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1]) printf(\"0 %d\\n\",n-1);\n\tfor(i=1;i=sz[i][1]&&sz[i][0]>=sz[i-1][0]&&sz[i][0]>=sz[i+1][0]) printf(\"%d 0\\n\",i);\n\t\tfor(j=1;j=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]){\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\t\n\t\tif(sz[i][n-1]>=sz[i][n-2]&&sz[i][n-1]>=sz[i-1][n-1]&&sz[i][n-1]>=sz[i+1][n-1]) printf(\"%d %d\\n\",i,n-1);\n\t}\n\tif(sz[m-1][0]>=sz[m-2][0]&&sz[m-1][0]>=sz[m-1][1]) printf(\"%d 0\\n\",m-1);\n\tfor(j=1;j=sz[m-1][j-1]&&sz[m-1][j]>=sz[m-1][j+1]&&sz[m-1][j]>=sz[m-2][j]){\n\t\t\tprintf(\"%d %d\\n\",m-1,j);\n\t\t}\n\t}\t\n\tif(sz[m-1][n-1]>=sz[m-1][n-2]&&sz[m-1][n-1]>=sz[m-2][n-1]) printf(\"%d %d\\n\",m-1,n-1);\n\treturn 0;\n}"} +{"label": "72", "index": "35906", "code": "int main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tint a[20][20];\n\tint x[400];\n\tint y[400];\n\tint t=0;\n\tfor(int i=0;i>a[i][j];\n\t}\n\tfor(int i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j==n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j==0)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t \ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j==n-1)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&j>0&&j=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&j>0&&j=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(j==0&&i>0&&i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(j==n-1&&i>0&&i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(j>0&&j0&&i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tx[t]=i;\n\t\t\t\t\ty[t]=j;\n\t\t\t\t\tt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(int i=0;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t\t\t{\n\t\t\t\ths[k]=i;\n\t\t\t\tls[k]=j;\n\t\t\t\tk++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\tfor(p=0;p=0)\n {\n if(a[i-1][j]>a[i][j])continue;\n }\n if(i+1a[i][j])continue; \n }\n if(j-1>=0)\n {\n if(a[i][j-1]>a[i][j])continue; \n }\n if(j+1a[i][j])continue; \n }\n printf(\"%d %d\\n\",i,j);\n }\n getchar();\n getchar();\n }\n"} +{"label": "72", "index": "35909", "code": "int main()\n{\n\tint m , n;\n\tint i, j, k;\n\tint a[23][23];\n\tcin >> m >> n;\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j<= n; j++)\n\t\t\tcin >> a[i][j];\n\tfor(i = 0; i <= n + 1; i++)\n\t{\n\t\ta[0][i] = 0;\n\t\ta[m + 1][i] = 0;\n\t}\n\tfor(i = 0; i<= m; i++)\n\t{\n\t\ta[i][0] = 0;\n\t\ta[i][n+1] = 0;\n\t}\n\tfor(i = 1; i <= m; i++)\n\t\tfor(j = 1; j<= n; j++)\n\t\t{\n\t\t\tif(a[i-1][j] <= a[i][j] && a[i][j-1] <= a[i][j] && a[i+1][j] <= a[i][j] && a[i][j+1] <= a[i][j] )\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35910", "code": "int main()\n{\n\tint p[20][20], i, j, m, n;\n\tcin >> m >> n;\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> p[i][j];\n\t}\n\tif (p[0][0] >= p[0][1] && p[0][0] >= p[1][0])\n\t\tcout << \"0 0\" << endl;\n\tfor (i = 1; i < n - 1; i++)\n\t{\n\t\tif (p[0][i] >= p[0][i - 1] && p[0][i] >= p[0][i + 1] && p[0][i] >= p[1][i])\n\t\t\tcout << 0 << \" \" << i << endl;\n\t}\n\tif (p[0][n - 1] >= p[0][n - 2] && p[0][n - 1] >= p[1][n - 1])\n\t\tcout << 0 << \" \" << n - 1 << endl;\n\tfor (i = 1; i < m - 1; i++)\n\t{\n\t\tif (p[i][0] >= p[i][1] && p[i][0] >= p[i + 1][0] && p[i][0] >= p[i - 1][0])\n\t\t\tcout << i << \" 0\" << endl;\n\t\tfor (j = 1; j <= n - 2; j++)\n\t\t{\n\t\t\tif (p[i][j] >= p[i][j - 1] && p[i][j] >= p[i][j + 1] && p[i][j] >= p[i - 1][j] && p[i][j] >= p[i + 1][j])\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\t\tif (p[i][n - 1] >= p[i][n - 2] && p[i][n - 1] >= p[i - 1][n - 1] && p[i][n - 1] >= p[i + 1][n - 1])\n\t\t\tcout << i << \" \" << n - 1 << endl;\n\t}\n\tif (p[m - 1][0] >= p[m - 1][1] && p[m - 1][0] >= p[m - 2][0])\n\t\tcout << m - 1 << \" \" << 0 << endl;\n\tfor (i = 1; i < n - 1; i++)\n\t{\n\t\tif (p[m - 1][i] >= p[m - 1][i - 1] && p[m - 1][i] >= p[m - 1][i + 1] && p[m - 1][i] >= p[m - 2][i])\n\t\t\tcout << m - 1 << \" \" << i << endl;\n\t}\n\tif (p[m - 1][n - 1] >= p[m - 1][n - 2] && p[m - 1][n - 1] >= p[m - 2][n - 1])\n\t\tcout << m - 1 << \" \" << n - 1 << endl;\n\treturn 0;\n}\n"} +{"label": "72", "index": "35911", "code": "int main()\n{\n\tint n,m,i,j;\n\tint point[20][20];\n\tscanf(\"%d%d\",&n,&m);\n\tfor (i=0;i=point[0][1]&&point[0][0]>=point[1][0])\n\t\t\t{\n\t\t\t\tprintf(\"0 0\\n\");\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tfor (j=1;j=point[0][j-1]&&point[0][j]>=point[0][j+1]&&point[0][j]>=point[1][j])\n\t\t\t{\n\t\t\t\tprintf(\"0 %d\\n\",j);\n\t\t\t}\n\t\t}\n\t\tfor (j=m-1;;)\n\t\t{\n\t\t\tif(point[0][m-1]>=point[0][m-2]&&point[0][m-1]>=point[1][m-1])\n\t\t\t{\n\t\t\t\tprintf(\"0 %d\\n\",m-1);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (i=1;i=point[i][1]&&point[i][0]>=point[i-1][0]&&point[i][0]>=point[i+1][0])\n\t\t\t{\n\t\t\t\tprintf(\"%d 0\\n\",i);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tfor (j=1;j=point[i-1][j]&&point[i][j]>=point[i][j-1]&&point[i][j]>=point[i+1][j]&&point[i][j]>=point[i][j+1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t\tfor (j=m-1;;)\n\t\t{\n\t\t\tif (point[i][m-1]>=point[i][m-2]&&point[i][m-1]>=point[i-1][m-1]&&point[i][m-1]>=point[i+1][m-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,m-1);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i=n-1;;)\n\t{\n\t\tfor (j=0;;)\n\t\t{\n\t\t\tif (point[n-1][0]>=point[n-1][1]&&point[n-1][0]>=point[n-2][0])\n\t\t\t{\n\t\t\t\tprintf(\"%d 0\\n\",n-1);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tfor (j=1;j=point[n-1][j-1]&&point[n-1][j]>=point[n-1][j+1]&&point[n-1][j]>=point[n-2][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",n-1,j);\n\t\t\t}\n\t\t}\n\t\tfor (j=m-1;;)\n\t\t{\n\t\t\tif(point[n-1][m-1]>=point[n-1][m-2]&&point[n-1][m-1]>=point[n-2][m-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",n-1,m-1);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35912", "code": "void main()\n{\n\tint m,n,i,j,a[20][20],b[20][20],x[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<20;i++)\n\t\tfor(j=0;j<20;j++)\n\t\t{\n\t\t\ta[i][j]=0;b[i][j]=0;\n\t\t}\n\tfor(i=0;i=x[0][j-1])&&(x[0][j]>=x[0][j+1])&&(x[0][j]>=x[1][j]))\n\t\t\t{b[0][j]=j;}\n\t\t\tif((x[m-1][j]>=x[m-1][j-1])&&(x[m-1][j]>x[m-1][j+1])&&(x[m-1][j]>=x[m-2][j]))\n\t\t\t{a[m-1][j]=m-1;b[m-1][j]=j;}\n\t\t}\n\t\n\t\tfor(i=1;i=x[i-1][0])&&(x[i][0]>=x[i+1][0])&&(x[i][0]>=x[i][1]))\n\t\t\t{a[i][0]=i;}\n\t\t\tif((x[i][n-1]>=x[i-1][n-1])&&(x[i][n-1]>=x[i+1][n-1])&&(x[i][n-1]>=x[i][n-2]))\n\t\t\t{a[i][n-1]=i;b[i][n-1]=n-1;}\n\t\t}\n\t\tfor(i=1;i=x[i-1][j])&&(x[i][j]>=x[i][j-1])&&(x[i][j]>=x[i][j+1])&&(x[i][j]>=x[i+1][j]))\n\t\t\t{\n\t\t\t\ta[i][j]=i;\n\t\t\t\tb[i][j]=j;\n\t\t\t}\n\t\t\t}\n\tif((x[0][n-1]>=x[0][n-2])&&(x[0][n-1]>=x[1][n-1]))\n\t{b[0][n-1]=n-1;}\n\tif((x[m-1][0]>=x[m-1][1])&&(x[m-1][0]>=x[m-2][0]))\n\t{a[m-1][0]=m-1;}\n\tif((x[m-1][n-1]>=x[m-1][n-2])&&(x[m-1][n-1]>=x[m-2][n-1]))\n\t{a[m-1][n-1]=m-1;b[m-1][n-1]=n-1;}\n\tif((x[0][0]>=x[0][1])&&(x[0][0]>=x[1][0]))printf(\"0 0\\n\");\n\tfor(i=0;i> m >> n;\n\tfor (i=1;i<=m;i++)\n\t\tfor (j=1;j<=n;j++)\n\t\t\tcin >> mount[i][j];\n\tfor (i=1;i<=m;i++)\n\t\tfor (j=1;j<=n;j++)\n\t\t\tif ( mount[i][j]>=mount[i-1][j])\n\t\t\t\tif (mount[i][j]>=mount[i+1][j])\n\t\t\t\t\tif (mount[i][j]>=mount[i][j-1])\n\t\t\t\t\t\tif (mount[i][j]>=mount[i][j+1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpr[s]=i-1;\n\t\t\t\t\t\t\tpc[s]=j-1;\n\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t}\n\tfor (i=0;i=i+1;j--)\n\t\t\tif (pr[j-1]>pr[j])\n\t\t\t{\n\t\t\t\ttemp=pr[j];\n\t\t\t\tpr[j]=pr[j-1];\n\t\t\t\tpr[j-1]=temp;\n\n\t\t\t\ttemp=pc[j];\n\t\t\t\tpc[j]=pc[j-1];\n\t\t\t\tpc[j-1]=temp;\n\t\t\t}\n\tfor (i=0;ipc[i+1])\n\t\t\t{\n\t\t\t\ttemp=pc[j];\n\t\t\t\tpc[j]=pc[j+1];\n\t\t\t\tpc[j+1]=temp;\n\t\t\t}\n\tfor (i=0;i=0)\n\t\t\t{\n\t\t\t\tif(a[i][j]=0)\n\t\t\t{\n\t\t\t\tif(a[i][j]=sz[i][j-1]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i+1][j]){\n\t\t\t\te[z]=i;\n\t\t\t\tf[z]=j;\n\t\t\t\tz++;\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\n\t\t\tif(sz[0][0]>=sz[0][1]&&sz[0][0]>=sz[1][0]){\n\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=0;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(sz[m-1][0]>=sz[m-2][0]&&sz[m-1][0]>=sz[m-1][1]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=0;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(sz[0][n-1]>=sz[0][n-2]&&sz[0][n-1]>=sz[1][n-1]){\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=n-1;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(sz[m-1][n-1]>=sz[m-2][n-1]&&sz[m-1][n-1]>=sz[m-1][n-2]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=n-1;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t\t}\n\n\tfor(i=1;i=sz[i+1][0]&&sz[i][0]>=sz[i-1][0]&&sz[i][0]>=sz[i][1]){\n\t\t\t\te[z]=i;\n\t\t\t\tf[z]=0;\n\t\t\t\tz++;\n\t\t\t\n\t\t}\n\t}\n\tfor(j=1;j=sz[0][j+1]&&sz[0][j]>=sz[0][j-1]&&sz[0][j]>=sz[1][j]){\n\t\t\t\te[z]=0;\n\t\t\t\tf[z]=j;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t}\n\t}\n\tfor(i=1;i=sz[i+1][n-1]&&sz[i][n-1]>=sz[i-1][n-1]&&sz[i][n-1]>=sz[i][n-2]){\n\t\t\t\te[z]=i;\n\t\t\t\tf[z]=n-1;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t}\n\t}\n\tfor(j=1;j=sz[m-1][j+1]&&sz[m-1][j]>=sz[m-1][j-1]&&sz[m-1][j]>=sz[m-2][j]){\n\t\t\t\te[z]=m-1;\n\t\t\t\tf[z]=j;\n\t\t\t\tz++;\n\t\t\t\t\n\t\t}\n\t\t}\n\tfor(k=1;k<=z;k++){\n\t\tfor(i=0;ie[i+1]){\n\t\t\t\tg=e[i];\n\t\t\t\te[i]=e[i+1];\n\t\t\t\te[i+1]=g;\n\t\t\t\th=f[i];\n\t\t\t\tf[i]=f[i+1];\n\t\t\t\tf[i+1]=h;\n\t\t\t\t\n\t}\n\t}\n\t}\n\tfor(k=1;k<=z;k++){\n\t\tfor(p=0;pf[p+1]&&e[p]==e[p+1]){\n\t\t\t\tl=f[p];\n\t\t\t\tf[p]=f[p+1];\n\t\t\t\tf[p+1]=l;\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t}\n \n\tfor(p=0;p> m >> n;\n\tfor(i=1;i> a[i][j];\n\tfor(i=1;i=h[i-1][j]&&h[i][j]>=h[i][j-1]&&h[i][j]>=h[i+1][j]&&h[i][j]>=h[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\n}"} +{"label": "72", "index": "35918", "code": "\nmain()\n{\n int p[50][50],i,j;\n int m,n; \n scanf(\"%d %d\",&m,&n); \n for(i=0;i>m>>n;\n\tfor(i=0;i>num[i][j];\n\tif(num[0][0]>=num[0][1]&&num[0][0]>=num[1][0])\n\t\tflag[0][0]=1;\n\tif(num[0][n-1]>=num[1][n-1]&&num[0][n-1]>=num[0][n-2])\n\t\tflag[0][n-1]=1;\n if(num[m-1][0]>=num[m-2][0]&&num[m-1][0]>=num[m-1][1])\n\t\tflag[m-1][0]=1;\n\tif(num[m-1][n-1]>=num[m-1][n-2]&&num[m-1][n-1]>=num[m-2][n-1])\n\t\tflag[m-1][n-1]=1;\n\tfor(i=1;i=num[0][i-1]&&num[0][i]>=num[0][i+1]&&num[0][i]>=num[1][i])\n\t\t\tflag[0][i]=1;\n\tfor(i=1;i=num[m-1][i-1]&&num[m-1][i]>=num[m-1][i+1]&&num[m-1][i]>=num[m-2][i])\n\t\t\tflag[m-1][i]=1;\n\tfor(i=1;i=num[i-1][0]&&num[i][0]>=num[i+1][0]&&num[i][0]>=num[i][1])\n\t\t\tflag[i][0]=1;\n\tfor(i=1;i=num[i-1][n-1]&&num[i][n-1]>=num[i+1][n-1]&&num[i][n-1]>=num[i][n-2])\n\t\t\tflag[i][n-1]=1;\n\tfor(i=1;i=num[i-1][j]&&num[i][j]>=num[i+1][j]&&num[i][j]>=num[i][j-1]&&num[i][j]>=num[i][j+1])\n\t\t\t\tflag[i][j]=1;\n\tfor(i=0;i=dk[i+1][j] && dk[i][j]>=dk[i-1][j] && dk[i][j]>=dk[i][j+1] && dk[i][j]>=dk[i][j-1])\n printf(\"%d %d\\n\",i-1,j-1);\n}\n}\t\nreturn 0;\n}"} +{"label": "72", "index": "35921", "code": "int main()\n{\n\tint\t\tboard[100][100] = {0};\n\tint\t\tboards[100][100] = {0};\n\tint\t\ti, j, n, m;\n\tcin >> m >> n;\n\n\tfor (i = 2; i <= m + 1; i ++)\n\t{\n\t\tfor (j = 2; j <= n + 1; j ++)\n\t\t{\n\t\t\tcin >> board[i][j];\n\t\t}\n\t}\n\n\tfor (i = 2; i <= m + 1; i ++)\n\t{\n\t\tfor (j = 2; j <= n + 1; j ++)\n\t\t{\n\t\t\tint\ts1 = (board[i][j] >= board[i][j + 1]);\n\t\t\tint\ts2 = (board[i][j] >= board[i][j - 1]);\n\t\t\tint\ts3 = (board[i][j] >= board[i + 1][j]);\n\t\t\tint\ts4 = (board[i][j] >= board[i - 1][j]);\n\t\t\tif(s1 + s2 + s3 + s4 == 4)\n\t\t\t{\n\t\t\t\tboards[i][j] = 1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor (i = 2; i <= m + 1; i ++)\n\t{\n\t\tfor (j = 2; j <= n + 1; j ++)\n\t\t{\n\t\t\tif(boards[i][j] == 1)\n\t\t\t{\n\t\t\t\tcout << i - 2 << \" \" << j - 2 << endl;\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\nreturn 0;\n}\n"} +{"label": "72", "index": "35922", "code": "// lp.cpp : Defines the entry point for the console application.\n//\n// ??????.cpp : Defines the entry point for the console application.\n//\n\nint main()\n{\n\n\tint m,n,i,j,a[100][100];\n\tcin>>m>>n;\n\tmemset(a,0,10000);\n\tfor(i=1;i>a[i][j];\n\t}\n\tfor(i=1;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\tcout<> x >> y ;\n\tfor (i = 1 ; i < x+1 ; i++)\n\t{\n\t\tfor (j = 1 ; j < y+1 ; j++)\n\t\t{\n\t\t\tcin >> a[i][j] ;\n\t\t}\n\t}\n\tfor (i = 1 ; i < x +1 ; i++)\n\t{\n\t\tfor (j = 1 ; j < y+1 ; j++)\n\t\t{\n\t\t\tif (a[i+1][j] <= a[i][j] && a[i-1][j] <= a[i][j] && a[i][j+1] <= a[i][j] && a[i][j-1] <= a[i][j])\n\t\t\t{\n\t\t\t\tcout << i-1 << ' ' << j-1 << endl ;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn 0 ;\n}\n\n"} +{"label": "72", "index": "35924", "code": "int main()\n{ int height[20][20]={0},m,n; //????height???????\n cin>>m>>n;\n int i,j;\n for(i=0;i>height[i][j];\n }\n int judge,piece;\n for(i=0;i=1) { judge+=(height[i][j]>=height[i-1][j]);piece++;}\n\t\t if(i=height[i+1][j]);piece++;}\n\t\t if(j>=1) { judge+=(height[i][j]>=height[i][j-1]); piece++;}\n\t\t if(j=height[i][j+1]);piece++;} //????????????????????????piece??????,judge??????????\n\t\t if(judge==piece)\n\t\t {\n\t\t\t cout<=di[1][0]&&di[0][0]>=di[0][1])\n\t{ding[k][0]=0;ding[k][1]=0;k++;}\n\tfor(j=1;j=di[0][j-1]&&di[0][j]>=di[0][j+1]&&di[0][j]>=di[1][j])\n\t\t{\n\t\t\tding[k][0]=0;ding[k][1]=j;k++;\n\t\t}\n\t}\n\tif(di[0][n-1]>=di[0][n-2]&&di[0][n-1]>=di[1][n-1])\n\t{ding[k][0]=0;ding[k][1]=n-1;k++;}\n\tfor(i=1;i=di[i-1][0]&&di[i][0]>=di[i][1]&&di[i][0]>=di[i+1][0])\n\t\t{ding[k][0]=i;ding[k][1]=0;k++;}\n\t\tfor(j=1;j=di[i][j-1]&&di[i][j]>=di[i][j+1]&&di[i][j]>=di[i+1][j]&&di[i][j]>=di[i-1][j])\n\t\t{\n\t\t\tding[k][0]=i;ding[k][1]=j;k++;\n\t\t}\n\t\t}\n\t\tif(di[i][n-1]>=di[i][n-2]&&di[i][n-1]>=di[i+1][n-1]&&di[i][n-1]>=di[i-1][n-1])\n\t {ding[k][0]=i;ding[k][1]=n-1;k++;}\n\t}\n\tif(di[m-1][0]>=di[m-2][0]&&di[m-1][0]>=di[m-1][1])\n\t{ding[k][0]=m-1;ding[k][1]=0;k++;}\n\tfor(j=1;j=di[m-1][j-1]&&di[m-1][j]>=di[m-1][j+1]&&di[m-1][j]>=di[m-2][j])\n\t\t{\n\t\t\tding[k][0]=m-1;ding[k][1]=j;k++;\n\t\t}\n\t}\n\tif(di[m-1][n-1]>=di[m-1][n-2]&&di[m-1][n-1]>=di[m-2][n-1])\n\t{ding[k][0]=m-1;ding[k][1]=n-1;k++;}\n\tfor(i=0;i> m >> n;\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\ti = 0;\n\tif (a[0][0] >= a[1][0] && a[0][0] >= a[0][1])\n\t{\n\t\tx[i] = 0;\n\t\ty[i] = 0;\n\t\ti++;\n\t}\n\tfor (j = 1; j < n - 1; j++)\n\t{\n\t\tif (a[0][j] >= a[1][j] && a[0][j] >=a[0][j - 1] && a[0][j] >= a[0][j + 1])\n\t\t{\n\t\t\tx[i] = 0;\n\t\t\ty[i] = j;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (a[0][n - 1] >= a[0][n - 2] && a[0][n - 1] >=a[1][n - 1])\n\t{\n\t\tx[i] = 0;\n\t\ty[i] = n - 1;\n\t\ti++;\n\t}\n\tfor (k = 1; k < m - 1; k++)\n\t{\n\t\tif (a[k][0] >= a[k - 1][0] && a[k][0] >= a[k + 1][0] && a[k][0] >= a[k][1])\n\t\t{\n\t\t\tx[i] = k;\n\t\t\ty[i] = 0;\n\t\t\ti++;\n\t\t}\n\t\tfor (j = 1; j < n - 1; j++)\n\t\t{\n\t\t\tif (a[k][j] >= a[k + 1][j] && a[k][j] >= a[k - 1][j] && a[k][j] >= a[k][j - 1] && a[k][j] >= a[k][j + 1])\n\t\t\t{\n\t\t\t\tx[i] = k;\n\t\t\t\ty[i] = j;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif (a[k][n - 1] >= a[k - 1][n - 1] && a[k][n - 1] >= a[k + 1][n - 1] && a[k][n - 1] >= a[k][n - 2])\n\t\t{\n\t\t\tx[i] = k;\n\t\t\ty[i] = n - 1;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (a[m - 1][0] >= a[m - 2][0] && a[m - 1][0] >= a[m - 1][1])\n\t{\n\t\tx[i] = m - 1;\n\t\ty[i] = 0;\n\t\ti++;\n\t}\n\tfor (j = 1; j < n - 1; j++)\n\t{\n\t\tif (a[m - 1][j] >= a[m - 1][j + 1] && a[m - 1][j] >= a[m - 1][j - 1] && a[m - 1][j] >= a[m - 2][j])\n\t\t{\n\t\t\tx[i] = m - 1;\n\t\t\ty[i] = j;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (a[m - 1][n - 1] >= a[m - 2][n - 1] && a[m - 1][n - 1] >= a[m - 1][n - 2])\n\t{\n\t\tx[i] = m - 1;\n\t\ty[i] = n - 1;\n\t\ti++;\n\t}\n\tfor (j = 0; j < i; j++)\n\t{\n\t\tcout << x[j] << \" \" << y[j] << endl;\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35927", "code": "int main(){\n\tint m,n,a[20][20],i,u;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i=a[i+1][u]&&a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u+1]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(i==0&&u!=0&&u!=n-1){\n\t\t\t\tif(a[i][u]>=a[i+1][u]&&a[i][u]>=a[i][u+1]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(i==m-1&&u!=0&&u!=n-1){\n\t\t\t\tif(a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u+1]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(u==0&&i!=0&&i!=m-1){\n\t\t\t\tif(a[i][u]>=a[i+1][u]&&a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(u==n-1&&i!=0&&i!=m-1){\n\t\t\t\tif(a[i][u]>=a[i+1][u]&&a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(i==0&&u==0){\n\t\t\t\tif(a[i][u]>=a[i+1][u]&&a[i][u]>=a[i][u+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(i==0&&u==n-1){\n\t\t\t\tif(a[i][u]>=a[i+1][u]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else if(u==0&&i==m-1){\n\t\t\t\tif(a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(a[i][u]>=a[i-1][u]&&a[i][u]>=a[i][u-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35928", "code": "int main(){\n int i,j,m,n,x;\n int shandi[LEN][WIDTH],shanding[LEN][2];\n scanf(\"%d%d\",&m,&n);\n for(i=1;i=shandi[i][j-1]&&shandi[i][j]>=shandi[i][j+1]&&shandi[i][j]>=shandi[i-1][j]&&shandi[i][j]>=shandi[i+1][j]){\n shanding[x][0]=i-1;\n shanding[x][1]=j-1;\n x++;\n }\n }\n }\n for(i=0;i> m >> n;\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif ((i == 0) && (j == 0))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j+1]) &&(a[i][j]>= a[i+1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((i == 0) && (j == n-1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i + 1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((i == m - 1) && (j == 0))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j + 1]) && (a[i][j] >= a[i - 1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((i == m - 1) && (j == n - 1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i - 1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((i == 0) && (j != 0) && (j != n - 1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j + 1]) && (a[i][j] >= a[i + 1][j]) && (a[i][j] >= a[i][j - 1]) )\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((i == m-1) && (j != 0) && (j != n - 1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j + 1]) && (a[i][j] >= a[i - 1][j]) && (a[i][j] >= a[i][j - 1]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((j == 0) && (i != 0) && (i != m - 1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j + 1]) && (a[i][j] >= a[i + 1][j]) && (a[i][j] >= a[i - 1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if ((j == n-1) && (i != 0) && (i != m - 1))\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i + 1][j]) && (a[i][j] >= a[i - 1][j]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((a[i][j] >= a[i][j - 1]) && (a[i][j] >= a[i + 1][j]) && (a[i][j] >= a[i - 1][j]) && (a[i][j] >= a[i][j + 1]))\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35930", "code": "\nint main(int argc, char *argv[])\n{\n int m,n,a[20][20],i,j;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=a[0][1]&&a[0][0]>=a[1][0]){\n printf(\"0 0\\n\");\n }\n for(j=1;j=a[0][j-1]&&a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j]){\n printf(\"0 %d\\n\",j);\n }\n }\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]){\n printf(\"0 %d\\n\",n-1);\n }\n \n for(i=1;i=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1]) printf(\"%d 0\\n\",i);\n for(j=1;j=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]) printf(\"%d %d\\n\",i,j);\n }\n if(a[i][n-1]>=a[i][n-2]&&a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]) printf(\"%d %d\\n\",i,n-1);\n }\n if(a[m-1][0]>=a[m-2][0]&&a[m-1][0]>=a[m-1][1]) printf(\"%d 0\\n\",m-1);\n for(j=1;j=a[m-2][j]&&a[m-1][j]>=a[m-1][j-1]&&a[m-1][j]>=a[m-1][j+1]) printf(\"%d %d\\n\",m-1,j);\n }\n if(a[m-1][n-1]>=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2]){\n printf(\"%d %d\\n\",m-1,n-1);\n } \n return 0;\n}"} +{"label": "72", "index": "35931", "code": "/*\n * fx11.cpp\n *\n * Created on: 2013-1-12\n * Author: SONY\n * ????\n */\nint main(){\n int m,n;\n cin>>m>>n;\n int a[m][n],i,j;\n for(i=0;i>a[i][j];\n\t }\n }\n for(i=0;i=0 && a[i-1][j]<=a[i][j]) k++;\n\t\t if(j-1>=0 && a[i][j-1]<=a[i][j]) k++;\n\t\t if((i==0 && j==0)|| (i==0 && j==n-1)||(i==m-1&&j==0) ||(i==m-1 && j==n-1))\n\t\t {\n\t\t\t if(k==2) cout<=a[0][1] && a[0][0]>=a[1][0])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1 && j==n-1 && a[m-1][n-1]>=a[m-1][n-2] && a[m-1][n-1]>=a[m-2][n-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0 && j==n-1 && a[0][n-1]>=a[1][n-1] && a[0][n-1]>=a[0][n-2])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1 && j==0 && a[m-1][0]>=a[m-1][1] && a[m-1][0]>=a[m-2][0])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if (i==0 && j>0 && j<(n-1) && a[0][j]>=a[0][j-1] && a[0][j]>=a[0][j+1] && a[0][j]>=a[1][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if (j==0 && i>0 && i<(m-1) && a[i][0]>=a[i-1][0] && a[i][0]>=a[i+1][0] && a[i][0]>=a[i][1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if (i==m-1 && j>0 && j<(n-1) && a[m-1][j]>=a[m-1][j-1] && a[m-1][j]>=a[m-1][j+1] && a[m-1][j]>=a[m-2][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if (j==n-1 && i>0 && i<(m-1) && a[i][n-1]>=a[i-1][n-1] && a[i][n-1]>=a[i+1][n-1] && a[i][n-1]>=a[i][n-2])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if (i>0 && i<(m-1) && j>0 && j<(n-1) && a[i][j]>=a[i-1][j] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i+1][j] && a[i][j]>=a[i][j-1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35933", "code": "int main()\n{\n\tint m[20][20], x, y, f;\n\tcin >> x >> y;\n\tfor (int i = 0; i < x; i++)\n\t\tfor (int j = 0; j < y; j++)\n\t\t\tcin >> m[i][j];\n\tfor (int i = 0; i < x; i++)\n\t\tfor (int j = 0; j < y; j++)\n\t\t{\n\t\t\tf = 0;\n\t\t\tif (i > 0)\n\t\t\t{\n\t\t\t\tif (m[i][j] >= m[i - 1][j])\n\t\t\t\t\tf++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tf++;\n\t\t\tif (j > 0)\n\t\t\t{\n\t\t\t\tif (m[i][j] >= m[i][j - 1])\n\t\t\t\t\tf++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tf++;\n\t\t\tif (i < x - 1)\n\t\t\t{\n\t\t\t\tif (m[i][j] >= m[i + 1][j])\n\t\t\t\t\tf++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tf++;\n\t\t\tif (j < y - 1)\n\t\t\t{\n\t\t\t\tif (m[i][j] >= m[i][j + 1])\n\t\t\t\t\tf++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tf++;\n\t\t\tif (f == 4)\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\n\n\treturn 0;\n}"} +{"label": "72", "index": "35934", "code": "int main(){\n int m,n,i,j;\n\tint a[25][25]={0};\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i0&&i0&&j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j>0&&j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j==0){\n\t\t\t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j==n-1){\n\t\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(j==0&&i>0&&i=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(j==0&&i==m-1){\n\t\t\t if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(j==n-1&&i>0&&i=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j>0&&j=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==n-1){\n\t\t\t if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "72", "index": "35935", "code": "int main()\n{\n\tint m, n, i, j, h[20][20];\n\tcin >> n; cin >> m;\n\tfor(i = 0; i < n; i++)\n\t\tfor(j = 0; j < m; j++)\n\t\t{\n\t\t\tcin >> h[i][j];\n\t\t}\n\tif(h[0][0] >= h[0][1] && h[0][0] >= h[1][0])\n\t\tcout << \"0 0\"<< endl;\n\tfor(j = 1; j < m - 1; j ++)\n\t\t{\n\t\t\tif( h[0][j] >= h[1][j] && h[0][j] >= h[0][j+1] && h[0][j] >= h[0][j - 1])\n\t\t\tcout << \"0 \" << j << endl;\n\t\t}\n\tif(h[0][m - 1] >= h[0][m - 2] && h[0][m - 1] >= h[1][m - 1])\n\t\tcout << \"0 \"<= h[i - 1][0] && h[i][0] >= h[i + 1][0] && h[i][0] >= h[i][1])\n\t\t\tcout << i << \" 0\" << endl;\n\t\tfor(j = 1; j < m - 1; j ++)\n\t\t{\n\t\t\tif(h[i][j] >= h[i - 1][j] && h[i][j] >= h[i + 1][j] && h[i][j] >= h[i][j+1] && h[i][j] >= h[i][j - 1])\n\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\t\tif(h[i][j] >= h[i - 1][j] && h[i][j] >= h[i + 1][j] && h[i][j] >= h[i][j - 1])\n\t\t\tcout << i << \" \" << j << endl;\n\t}\n\tif(h[n - 1][0] >= h[n - 1][1] && h[n - 1][0] >= h[n - 2][0])\n\t\tcout <= h[n -2][j] && h[n -1][j] >= h[n -1][j+1] && h[n - 1][j] >= h[n - 1][j - 1])\n\t\t\tcout << n - 1 <<\" \" <= h[n -1][m - 2] && h[n - 1][m - 1] >= h[n - 2][m - 1])\n\t\tcout << n - 1<<\" \"<>m>>n;\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (i == 0)\n\t\t\t{\n\t\t\t\tif (j == 0)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\t\tcout<= a[i + 1][j] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\t\tcout<= a[i + 1][j] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\t\tcout<= a[i + 1][j] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i - 1][j])\n\t\t\t\t\t\tcout<= a[i + 1][j] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1] && a[i][j] >= a[i - 1][j])\n\t\t\t\t\t\tcout<= a[i + 1][j] && a[i][j] >= a[i][j - 1] && a[i][j] >= a[i - 1][j])\n\t\t\t\t\t\tcout<= a[i - 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\t\tcout<= a[i - 1][j] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\t\tcout<= a[i - 1][j] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\t\tcout<> m >> n;\n\tmemset(a,0,sizeof(a));\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i < m; i++)\n\t{\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (i == 0 && j == 0)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (i == 0 && j == n - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i][j - 1] && a[i][j] >= a[i + 1][j])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (i == m - 1 && j == 0)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (i == m - 1 && j == n - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (i == 0 && j != 0 && j != n - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i + 1][j])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (i == m - 1 && j != 0 && j != n - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1] && a[i][j] >= a[i - 1][j])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (j == 0 && i != 0 && i != m - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse if (j == n - 1 && i != 0 && i != m - 1)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j - 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i - 1][j] && a[i][j] >= a[i + 1][j] && a[i][j] >= a[i][j - 1] && a[i][j] >= a[i][j + 1])\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35938", "code": "\nint main()\n{\n\tint m,n,A[30][30];\n\tint i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<30;i++)\n\t{\n\t\tfor(j=0;j<30;j++)\n\t\t{\n\t\t\tA[i][j]=0;\n\t\t}\n\t}\n\tfor(i=1;i=A[i-1][j]&&A[i][j]>=A[i+1][j]&&A[i][j]>=A[i][j-1]&&A[i][j]>=A[i][j+1])\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}\n \n\n\n"} +{"label": "72", "index": "35939", "code": "int main()\n{\n\tint a[20][20],m,n,i,j,b[400][2],k=0;\n\tscanf(\"%d%d\", &m, &n);\n\tfor (i=0;i=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\tk+=1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i==0)\n\t\t\t{\n\t\t\t\tif (j==0)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if (j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i==m-1)\n\t\t\t{\n\t\t\t\tif (j==0)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if (j==n-1)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (j==0)\n\t\t\t{\n\t\t\t\tif (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t{\n\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\tk+=1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (j==n-1)\n\t\t\t{\n\t\t\t\tif (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\t\t{\n\t\t\t\t\t\tb[k][0]=i;\n\t\t\t\t\t\tb[k][1]=j;\n\t\t\t\t\t\tk+=1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n}\n\tfor (i=0;i>m>>n;\n for(int i=0;i<25;i++)\n for(int j=0;j<25;j++)a[i][j]=0;\n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)cin>>a[i][j];\n for(int i=1;i<=m;i++)\n for(int j=1;j<=n;j++)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])cout<=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i][j-1])\n\t\t\t{\n c++;\n Hi[c]=i-1;\n Hj[c]=j-1 ;\n\t\t\t}\n\t\t}\n\t}\n for(k=0;k>m>>n;\n\tfor (int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>*(*(a+j)+i);\n\t\t}\n\tfor(int i=1;i<=n;i++)\n\t{\n\t\t**(a+i)=minn;\n\t\t*(*(a+i)+m+1)=minn;\n\t}\n\tfor(int i=1;i<=m;i++)\n\t{\n\t\t*(*a+i)=minn;\n\t\t*(*(a+n+1)+i)=minn;\n\t}\n\n\tfor (int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(*(*(a+j-1)+i)-*(*(a+j)+i)<=0&&*(*(a+j+1)+i)-*(*(a+j)+i)<=0&&*(*(a+j)+i-1)-*(*(a+j)+i)<=0&&*(*(a+j)+i+1)-*(*(a+j)+i)<=0)\n\t\t\tcout<=sz[i][j+1]&&sz[i][j]>=sz[i][j-1]&&sz[i][j]>=sz[i+1][j]&&sz[i][j]>=sz[i-1][j]){\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n}\nreturn 0;\n}"} +{"label": "72", "index": "35944", "code": "int main()\n{\n\tint h[20][20]={0},m,n,i,j;\n\tint flag[20][20]={0};\n\tcin>>m>>n;\n\tfor(i=0;i>h[i][j];\n\t\t}\n\t\t\n\t}\n\n\n\tfor(i=0;i=0&&i+1h[i][j])\n\t\t\t{\n\t\t\t\tflag[i][j]=1;\n\t\t\t}\n\n\t\t\tif(i-1>=0&&i-1h[i][j]) //\n\t\t\t{\n\t\t\t\tflag[i][j]=1;\n\t\t\t}\n\n\t\t\tif(j-1>=0&&j-1h[i][j]) //\n\t\t\t{\n\t\t\t\tflag[i][j]=1;\n\t\t\t}\n\n\t\t\tif(j+1>=0&&j+1h[i][j])\n\t\t\t{\n\t\t\t\tflag[i][j]=1;\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\tfor(i=0;i=a[i][j+1] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t\telse if(j==n-1 && a[i][j]>=a[i][j-1] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t\telse if(a[i][j]>=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t}\n\t\t\t\telse if(i==m-1)\n\t\t\t\t{\n\t\t\t\t\tif(j==0 && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j]) P;\n\t\t\t\t\telse if(j==n-1 && a[i][j]>=a[i][j-1] && a[i][j]>=a[i-1][j]) P;\n\t\t\t\t\telse if(a[i][j]>=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j]) P;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(j==0 && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t\telse if(j==n-1 && a[i][j]>=a[i][j-1] && a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t\telse if(a[i][j]>=a[i][j-1] && a[i][j]>=a[i][j+1] && a[i][j]>=a[i-1][j] && a[i][j]>=a[i+1][j]) P;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n}\n\n\n"} +{"label": "72", "index": "35946", "code": "int main()\n{\n\tint i,j,m,n,k=0,a[22][22],b[400],c[400];\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\ta[i][0]=0;\n\t\ta[i][n+1]=0;\n\t}\n\tfor(i=0;i<=n+1;i++)\n\t{\n\t\ta[0][i]=0;\n\t\ta[m+1][i]=0;\n\t}\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t{\n\t\t\t\tb[k]=i-1;\n\t\t\t\tc[k]=j-1;\n\t\t\t\tk++;\n\t\t\t}\n\tfor(i=0;i>m>>n;\n\tint a[m+2][n+2];\n\tfor(int i=0;i>a[i][j];\n\t\t}\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\tcout<=height[i-1][j])\n\t\t\t{\n\t\t\t\tif(height[i][j]>height[i-1][j])\n\t\t\t\t\ttop[i-1][j]=-1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tif(height[i][j]>=height[i+1][j])\n\t\t\t{\n\t\t\t\tif(height[i][j]>height[i+1][j])\n\t\t\t\t\ttop[i+1][j]=-1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tif(height[i][j]>=height[i][j-1])\n\t\t\t{\n\t\t\t\tif(height[i][j]>height[i][j-1])\n\t\t\t\t\ttop[i][j-1]=-1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tif(height[i][j]>=height[i][j+1])\n\t\t\t{\n\t\t\t\tif(height[i][j]>height[i][j+1])\n\t\t\t\t\ttop[i][j+1]=-1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35949", "code": "\nint main(int argc, char* argv[])\n{\n\tint raul[100][100],m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&raul[i][j]);\n\t\t}\n\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\traul[i][0]=0;\n\t}\n\tfor(j=1;j<=n;j++)\n\t{\n\t\traul[0][j]=0;\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(raul[i][j]>=raul[i+1][j]&&raul[i][j]>=raul[i-1][j]&&raul[i][j]>=raul[i][j-1]&&raul[i][j]>=raul[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "72", "index": "35950", "code": "int main()\n{\n\tint m, n, i, a[21][21] = {0}, m1, n1;\n\tcin >> m >> n;\n\tfor (i = 0; i <= m * n - 1; i++)\n\t\tcin >> a[i/n+1][i%n+1];\n\tfor (i = 0; i <= m * n - 1; i++)\n\t{\n\t\tm1 = i / n + 1;\n\t\tn1 = i % n + 1;\n\t\tif (a[m1][n1] >= a[m1+1][n1] && a[m1][n1] >= a[m1-1][n1] && a[m1][n1] >= a[m1][n1+1] && a[m1][n1] >= a[m1][n1-1])\n\t\t\tcout << m1 - 1 << \" \" << n1 - 1 << endl;\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35951", "code": "int main(){\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tint h[m+2][n+2];\n\tmemset(h,0,sizeof(h));\n\tfor(i=1;i>h[i][j];\n\tfor(i=1;i=h[i][j+1])&&(h[i][j]>=h[i][j-1])&&(h[i][j]>=h[i+1][j])&&(h[i][j]>=h[i-1][j]))\n\t\t\t\tcout<> m >> n;\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i < m; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\t\tif(j + 1 < n)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j] >= a[i][j + 1]) \n\t\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tk++;\n\t\t\t\tif(j - 1 >= 0)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j] >= a[i][j - 1]) \n\t\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tk++;\n\t\t\t\tif (i + 1 < m)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j] >= a[i + 1][j])\n\t\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tk++;\n\t\t\t\tif (i - 1 >= 0)\n\t\t\t\t{\n\t\t\t\t\tif (a[i][j] >= a[i - 1][j])\n\t\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tk++;\n\t\t\t\tif (k == 4)\n\t\t\t\t\tcout << i << ' ' << j << endl;\n\t\t\t\tk = 0;\n\t\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35953", "code": "int main()\n{\t\n\tint a,b,c,d,e,m,n,i,j,k,sz[22][22];\n\tfor(i=0;i=sz[i+1][j]&&sz[i][j]>=sz[i][j+1]&&sz[i][j]>=sz[i-1][j]&&sz[i][j]>=sz[i][j-1]){\n\t\t\t\td=i-1;\n\t\t\t\te=j-1;\n\t\t\t\tprintf(\"%d %d\\n\",d,e);\n\t\t\t}\n\t\t}\n\t}\n return 0;\n}"} +{"label": "72", "index": "35954", "code": "int main()\n{\n\tint m,n,i,j;\n\tint sz[22][22]={0};\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=1;i>m>>n;\n\t{\n\t\tfor(i=0;i>sh[i][j];\n\t\tfor(i=0;i=m)||(sh[i+1][j]<=t))\n\t\t\t\t{\n\t\t\t\t\tf2=1;\n\t\t\t\t}\n\t\t\t\telse continue;\n\t\t\t\tif((j-1<0)||(sh[i][j-1]<=t))\n\t\t\t\t{\n\t\t\t\t\tf3=1;\n\t\t\t\t}\n\t\t\telse continue;\n\t\t\t\tif((j+1>=n)||(sh[i][j+1]<=t))\n\t\t\t\t{\n\t\t\t\t\tf4=1;\n\t\t\t\t}\n\t\t\t\telse continue;\n\t\t\t\tif(f1+f2+f3+f4==4)\n\t\t\t\t\tcout <=a[0][j+1]&&a[0][j]>=a[1][j])\nprintf(\"%d %d\\n\",0,j);}\nelse if(j==n-1)\n{if(a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j])\nprintf(\"%d %d\\n\",0,j);}\nelse if(a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j]&&a[0][j]>=a[0][j+1]) \nprintf(\"%d %d\\n\",0,j);\n }\n for(i=1;i=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);}\nelse if(j==n-1)\n{if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\nprintf(\"%d %d\\n\",i,j);}\nelse if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]) \nprintf(\"%d %d\\n\",i,j);\n }\n for(j=0;j=a[m-1][j+1]&&a[i][j]>=a[m-2][j])\nprintf(\"%d %d\\n\",m-1,j);}\nelse if(j==n-1)\n{if(a[m-1][j]>=a[m-1][j-1]&&a[i][j]>=a[m-2][j])\nprintf(\"%d %d\\n\",m-1,j);}\nelse if(a[m-1][j]>=a[m-1][j-1]&&a[i][j]>=a[m-1][j+1]&&a[i][j]>=a[m-2][j]) \nprintf(\"%d %d\\n\",m-1,j);\n }\n}\n"} +{"label": "72", "index": "35957", "code": "/*\n * 4.cpp\n *\n * Created on: 2011-1-9\n * Author: jsgl\n */\nint main()\n{\n\tint a[1000][1000];\n\tint m, n, i ,j;\n\tcin>>m>>n;\n\tfor(i=1; i<=m; i++)\n\t\tfor(j=1; j<=n; j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\tfor(i=0; i<=m+1; i++)\n\t\ta[i][0]=a[i][n+1]=-1;\n\tfor(i=0; i<=n+1; i++)\n\t\ta[0][i]=a[m+1][i]=-1;\n\tfor(i=1; i<=m; i++)\n\t\tfor(j=1; j<=n; j++)\n\t\t{\n\t\t\tif((a[i][j]>=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t\t\t\tcout<=h[i][j-1]&&h[i][j]>=h[i][j+1]&&h[i][j]>=h[i-1][j]&&h[i][j]>=h[i+1][j])\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t}\n}\n"} +{"label": "72", "index": "35960", "code": "/*\n * 04.cpp\n *\n * Created on: 2011-1-9\n * Author: jsgl\n */\nint main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tconst int m1=m,n1=n;\n\tint a[m1][n1];\n\tint i,j;\n\tfor(i=0;i>a[i][j];\n\t\t}\n\t}\n\tif(a[0][0]>=a[0][1]&&a[0][0]>=a[1][0])\n\t{\n\t\tcout<<\"0 0\"<=a[0][i-1]&&a[0][i]>=a[0][i+1]&&a[0][i]>=a[1][i])\n\t\t{\n\t\t\tcout<<\"0 \"<=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n\t{\n\t\tcout<<\"0 \"<=a[i][1]&&a[i][0]>=a[i-1][0]&&a[i][0]>=a[i+1][0])\n\t\t{\n\t\t\tcout<=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1])\n\t\t\t{\n\t\t\t\tcout<=a[i][n-2]&&a[i][n-1]>=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1])\n\t\t{\n\t\t\tcout<=a[m-1][1]&&a[m-1][0]>=a[m-2][0])\n\t{\n\t\tcout<=a[m-1][i-1]&&a[m-1][i]>=a[m-1][i+1]&&a[m-1][i]>=a[m-2][i])\n\t\t{\n\t\t\tcout<=a[m-1][n-2]&&a[m-1][n-1]>=a[m-2][n-1])\n\t{\n\t\tcout<=0 && b>=0 && c>=0 && d>=0){\n\t\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "72", "index": "35962", "code": "int main()\n{\n\tint a[30][30] = {0}, i , j, m, n,flag;\n\tcin >> m >> n;\n\tfor (i = 0;i>a[i][j];\n\tfor (i = 0;i 0)\n\t\t\t\tif (a[i][j-1] > a[i][j])\n\t\t\t\t{\n\t\t\t\t\tflag =0;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\tif (j 0)\n\t\t\t\tif (a[i-1][j] > a[i][j])\n\t\t\t\t{\n\t\t\t\t\tflag =0;\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t}\n\t\t\tif (i< m-1)\n\t\t\t{\n\t\t\t\tif (a[i][j] < a[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tflag =0;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag ==1)\n\t\t\t\tcout << i << \" \"<=a[1][0]&&a[0][0]>=a[0][1])\n printf(\"0 0\\n\");\n else if(i==0&&j==(n-1)&&a[0][n-1]>=a[1][n-1]&&a[0][n-1]>=a[0][n-1])\n printf(\"0 %d\\n\",n-1);\n else if(i==(m-1)&&j==(n-1)&&a[m-1][n-1]>=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2])\n printf(\"%d %d\\n\",m-1,n-1);\n else if(i==(m-1)&&j==0&&a[m-1][0]>a[m-2][0]&&a[m-1][0]>=a[m-1][1]) \n printf(\"%d 0\\n\",m-1);\n else if(i==0&&(j!=0||j!=(n-1))&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n else if(i==(m-1)&&(j!=0||j!=(n-1))&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n else if(j==0&&(i!=0||i!=(m-1))&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j+1])\n printf(\"%d %d\\n\",i,j);\n else if(j==(n-1)&&(i!=0||i!=(m-1))&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1])\n printf(\"%d %d\\n\",i,j);\n else if((i>0&&i<(m-1))&&(j>0&&j<(n-1))&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i,j);\n }\n }\n getchar();\n getchar();\n}"} +{"label": "72", "index": "35964", "code": "int main(){\n int n,m,i,j,k,total=0,a[110][110];\n \n scanf(\"%d%d\",&m,&n);\n\n for(i=0;i=a[i][j+1]&&a[i][j]>=a[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(j>0&&j=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n\n if(j==n-1){\n if(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i,j);\n }\n }}//i==0\n\n if(i==m-1){\n if(j==0){\n if(a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(j>0&&j=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n\n if(j==n-1){\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n }\n //i=m-1\n if(i>0&&i=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n if(j>0&&j=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n\n if(j==n-1){\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]){\n printf(\"%d %d\\n\",i,j);\n }\n }\n }//{}\n}}\n\n\nreturn 0;\n}"} +{"label": "72", "index": "35965", "code": "/*\n * ????.cpp\n *\n * Created on: 2013-1-19\n * Author: sony\n */\nint main()\n{\n\tint a[30][30];\n\tint m,n,i,j;\n\tcin>>m>>n;\n\tfor(j=0;j>a[i][j];\n\t\t}\n\tfor(i=0;i=a[i-1][j]) && (a[i][j]>=a[i+1][j]) && (a[i][j]>=a[i][j-1]) && (a[i][j]>=a[i][j+1]) && (i!=0) && (i!=m+1) &&(j!=0) && (j!=n+1))\n\t\t\t\tcout<> m >> n ;\n\tfor ( i = 1 ; i <= m ; i++ )\n\t{\n\t\tfor ( j = 1 ; j <= n ; j++ )\n\t\t{\n\t\t\tcin >> mount[i][j] ;\n\t\t}\n\t}\n\tint k ;\n\tfor ( k = 0 ; k <= n+1 ; k++ )\n\t{\n\t\tmount[0][k] = 0 ;\n\t\tmount[m+1][k] = 0 ;\n\t}\n\tfor ( k = 0 ; k <= m+1 ; k ++ )\n\t{\n\t\tmount[k][0] = 0 ;\n\t\tmount[k][n+1] = 0 ;\n\t}\n\tfor ( i = 1 ; i <= m ; i++ )\n\t{\n\t\tfor ( j = 1 ; j <= n ; j++ )\n\t\t{\n\t\t\tif ( mount[i][j] >= mount[i+1][j] && mount[i][j] >= mount[i-1][j] \n\t\t\t\t&& mount[i][j] >= mount[i][j+1] && mount[i][j] >= mount[i][j-1] )\n\t\t\t\t{\n\t\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl ;\n\t\t\t\t}\n\t\t}\n\t}\n\treturn 0 ;\n}"} +{"label": "72", "index": "35967", "code": "int main(){\n\tint m,n,k,g,i,c;\n\tint a[20][20];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(k=0;k<=m-1;k++){\n\t\tfor(g=0;g<=n-1;g++){\n\t\t\tscanf(\"%d\",&a[k][g]);\n\t\t}\n\t}\n\tfor(i=0;i<=m-1;i++){\n\t\tfor(c=0;c<=n-1;c++){\n\t\t\tif(i==0&&c==0){\n\t\t\t\tif(a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&c!=0&&c!=n-1){\n\t\t\t\tif(a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c-1]&&a[i][c]>=a[i][c+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==0&&c==n-1){\n\t\t\t\tif(a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i!=0&&i!=m-1&&c==0){\n\t\t\t\tif(a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c+1]&&a[i][c]>=a[i-1][c]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&c==0){\n\t\t\t\tif(a[i][c]>=a[i-1][c]&&a[i][c]>=a[i][c+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i==m-1&&c!=0&&c!=n-1){\n\t\t\t\tif(a[i][c]>=a[i-1][c]&&a[i][c]>=a[i][c+1]&&a[i][c]>=a[i][c-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c==n-1&&i!=0&&i!=m-1){\n\t\t\t\tif(a[i][c]>=a[i-1][c]&&a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c==n-1&&i==m-1){\n\t\t\t\tif(a[i][c]>=a[i-1][c]&&a[i][c]>=a[i][c-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c!=0&&c!=n-1&&i!=0&&i!=m-1){\n\t\t\t\tif(a[i][c]>=a[i-1][c]&&a[i][c]>=a[i+1][c]&&a[i][c]>=a[i][c-1]&&a[i][c]>=a[i][c+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\",i,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "72", "index": "35968", "code": "void main()\n{\n\tint a[20][20],b[20][20]={0},m,n,i,j;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=0;i=a[0][1]&&a[0][0]>=a[1][0]) b[0][0]=1;\n\tif(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1]) b[0][n-1]=1;\n\tif(a[m-1][0]>=a[m-1][1]&&a[m-1][0]>=a[m-2][0]) b[m-1][0]=1;\n\tif(a[m-1][n-1]>=a[m-2][n-1]&&a[m-1][n-1]>=a[m-1][n-2]) b[m-1][n-1]=1;\n\tfor(j=1;j=a[0][j+1]&&a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j]) b[0][j]=1;\n\t}\n\tfor(j=1;j=a[m-1][j+1]&&a[m-1][j]>=a[m-1][j-1]&&a[m-1][j]>=a[m-2][j]) b[m-1][j]=1;\n\t}\n\tfor(i=1;i=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1]) b[i][0]=1;\n\t}\n\tfor(i=1;i=a[i-1][n-1]&&a[i][n-1]>=a[i+1][n-1]&&a[i][n-1]>=a[i][n-2]) b[i][n-1]=1;\n\t}\n\tfor(i=1;i=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n\t\t\t\tb[i][j]=1;\n\t\t\n\t\t}\n//printf(\",,%d,,\",b[9][3]);\n\tfor(i=0;i> m >> n;\n\tint a[500][500];\n\tfor(i = 0; i <= m - 1; i++)\n\t{\n\t\tfor(j = 0; j <= n - 1; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor(i = 0; i <= m - 1; i++)\n\t{\n\t\tfor(j = 0; j <= n -1; j++)\n\t\t{\n\t\t\tif(i == 0 && j == 0)\n\t\t\t{\n\t\t\t\tif(a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j] && a[i][j] >= a[i-1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i+1][j] && a[i][j] >= a[i-1][j] && a[i][j] >= a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j] && a[i][j] >= a[i][j-1] && a[i][j] >= a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j] && a[i][j] >= a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <= a[i-1][j] && a[i][j] >= a[i+1][j] && a[i][j] >= a[i][j+1] && a[i][j] >= a[i][j-1])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j <=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]){\n printf(\"%d %d\\n\",i-1,j-1);\n}\n}\n}\nreturn 0;\n}"} +{"label": "72", "index": "35972", "code": "int main()\n{\nint m,n;\nint sz[22][22];\nscanf(\"%d%d\",&m,&n);\nfor(int k=0;k=sz[i+1][j])&&(sz[i][j]>=sz[i][j+1]))||\n ((j==n-1)&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1]))||\n ((sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])&&(sz[i][j]>=sz[i+1][j])))\n {printf(\"%d %d\\n\",i,j);}\n}\nelse\n{\nif(i==m-1)\n{\n if(((j==0)&&(sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i][j+1]))||\n ((j==n-1)&&(sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i][j-1]))||\n ((sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])&&(sz[i][j]>=sz[i-1][j])))\n {printf(\"%d %d\\n\",i,j);}\n}\nelse\n{\n if(((j==0)&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j+1])&&(sz[i][j]>=sz[i-1][j]))||\n ((j==n-1)&&(sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])&&(sz[i][j]>=sz[i][j-1]))||\n ((sz[i][j]>=sz[i][j-1])&&(sz[i][j]>=sz[i][j+1])&&(sz[i][j]>=sz[i-1][j])&&(sz[i][j]>=sz[i+1][j])))\n {printf(\"%d %d\\n\",i,j);}\n}\n}\n}\n}\nreturn 0;\n}"} +{"label": "72", "index": "35973", "code": "int main(){\n int m,n;\n scanf(\"%d%d\",&m,&n);\n int x,y;\n int i,k;\n int z[m+2][n+2];\n for(i=0;i=z[i-1][k]&&z[i][k]>=z[i+1][k]&&z[i][k]>=z[i][k-1]&&z[i][k]>=z[i][k+1]){\n printf(\"%d %d\\n\",i-1,k-1);\n}\n}\n} \n return 0;\n}\n"} +{"label": "72", "index": "35974", "code": "\nint main(){\n int n,m;\n int a[22][22]={0};\n\n scanf(\"%d %d\",&m,&n);\n for(int i=1;i(a[p-1][q]-1)&&a[p][q]>(a[p+1][q]-1)&&a[p][q]>(a[p][q-1]-1)&&a[p][q]>(a[p][q+1]-1)){ \n printf(\"%d %d\\n\",p-1,q-1);}}}\n return 0;\n\n}"} +{"label": "72", "index": "35975", "code": "int main()\n{\n\tint mount[20][20],m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=0;i<=m-1;i++)\n\t\tfor(j=0;j<=n-1;j++)\n\t\t\tscanf(\"%d\",&mount[i][j]);\n\t\tfor(i=0;i<=n-1;i++)\n\t\t{if(i==0)\n\t\t{ if(mount[0][i]>=mount[1][i]&&mount[0][i]>=mount[0][i+1])\n\t\t\tprintf(\"0 %d\\n\",i);\n\t\t}\n\t\telse if(i!=0&&i!=n-1)\n\t\t{if(mount[0][i]>=mount[1][i]&&mount[0][i]>=mount[0][i+1]&&mount[0][i]>=mount[0][i-1])\n\t\t\tprintf(\"0 %d\\n\",i);\n\t\t}\n else if(i==n-1)\n\t\t{if(mount[0][i]>=mount[1][i]&&mount[0][i]>=mount[0][i-1])\n\t\t\tprintf(\"0 %d\\n\",i);\n\t\t}\n\t\t}\n for(j=1;j<=m-2;j++)\n\t\t for(i=0;i<=n-1;i++)\n\t\t{if(i==0)\n\t\tif(mount[j][i]>=mount[j+1][i]&&mount[j][i]>=mount[j][i+1]&&mount[j][i]>=mount[j-1][i])\n\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\tif(i!=0&&i!=n-1)\n if(mount[j][i]>=mount[j+1][i]&&mount[j][i]>=mount[j][i+1]&&mount[j][i]>=mount[j][i-1]&&mount[j][i]>=mount[j-1][i])\n\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\tif(i==n-1)\n if(mount[j][i]>=mount[j+1][i]&&mount[j][i]>=mount[j][i-1]&&mount[j][i]>=mount[j-1][i])\n\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t}\n\t\t\tfor(i=0;i<=n-1;i++)\n\t\t{if(i==0)\n\t\t if(mount[m-1][i]>=mount[m-2][i]&&mount[m-1][i]>=mount[m-1][i+1])\n\t\t\tprintf(\"%d %d\\n\",m-1,i);\n\t\tif(i!=0&&i!=n-1)\n if(mount[m-1][i]>=mount[m-2][i]&&mount[m-1][i]>=mount[m-1][i+1]&&mount[m-1][i]>=mount[m-1][i-1])\n\t\t\tprintf(\"%d %d\\n\",m-1,i);\n if(i==n-1)\n if(mount[m-1][i]>=mount[m-1][i]&&mount[m-1][i]>=mount[m-1][i-1])\n\t\t\tprintf(\"%d %d\\n\",m-1,i);\n\t\t}\n\t\t\treturn 0;\n}"} +{"label": "72", "index": "35976", "code": "main()\n{\n int m,n;\n int M,N;\n scanf(\"%d %d\",&m,&n);\n M=m+2;\n N=n+2;\n int a[M][N];\n for(int i=0;i<=N-1;i++)\n a[0][i]=0;\n for(int i=0;i<=M-1;i++)\n a[i][0]=0;\n for(int i=0;i<=N-1;i++)\n a[M-1][i]=0;\n for(int i=0;i<=M-1;i++)\n a[i][N-1]=0;\n for(int i=1;i<=M-2;i++)\n {\n for(int j=1;j<=N-2;j++)\n scanf(\"%d\",&a[i][j]);\n }\n for(int i=1;i<=M-2;i++)\n {\n for(int j=1;j<=N-2;j++)\n {\n if((a[i][j]>=a[i][j+1])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i-1][j]))\n printf(\"%d %d\\n\",i-1,j-1);\n \n \n }\n }\n getchar();getchar();getchar();getchar();\n}\n"} +{"label": "72", "index": "35977", "code": "int main()\n{\n\tint a[100][100],m,n,i,j;\n\tcin>>m>>n;\n\tfor(i=1;i<=m;i++)\n\t\tfor(j=1;j<=n;j++)\n\t\t\tcin>>a[i][j];\n\n\tfor(j=0;j<=n+1;j++)\n\t\ta[0][j]=0;\n\tfor(j=1;j<=m;j++)\n\t\ta[j][0]=0;\n\tfor(j=1;j<=m;j++)\n\t\ta[j][n+1]=0;\n\tfor(j=0;j<=n+1;j++)\n\t\ta[m+1][j]=0;\n\tfor(i=1;i<=m;i++)\n\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i-1][j])\n\t\t\t\tcout<> m >> n;\n\tint i, j, h[21][21];\n\tfor (i = 0; i <= n + 1; i++)\n\t\th[0][i] = 0;\n\tfor (i = 0; i <= n + 1; i++)\n\t\th[m + 1][i] = 0;\n\tfor (i = 0; i <= m + 1; i++)\n\t\th[i][0] = 0;\n\tfor (i = 0; i <= m + 1; i++)\n\t\th[i][n + 1] = 0;\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t\tcin >> h[i][j];\n\tfor (i = 1; i <= m; i++)\n\t\tfor (j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (h[i][j] >= h[i + 1][j] && h[i][j] >= h[i - 1][j] && h[i][j] >= h[i][j + 1] && h[i][j] >= h[i][j - 1])\n\t\t\t\tcout << i - 1 << \" \" << j - 1 << endl;\n\t\t}\n\treturn 0;\n}\n\n\t"} +{"label": "72", "index": "35979", "code": "int main(){\n int m,n,i,j,a,b;\n a=0;\n scanf(\"%d %d\",&m,&n);\n int sg[100][100],sz1[1000],sz2[1000];\n for(i=0;i=sg[0][1]&&sg[0][0]>=sg[1][0]){\n sz1[a]=0;sz2[a]=0;\n a++;\n }\n if(sg[0][n-1]>=sg[0][n-2]&&sg[0][n-1]>=sg[1][n-1]){\n sz1[a]=0;sz2[a]=n-1;\n a++;\n }\n if(sg[m-1][0]>=sg[m-1][1]&&sg[m-1][0]>=sg[m-2][0]){\n sz1[a]=m-1;sz2[a]=0;\n a++;\n }\n if(sg[m-1][n-1]>=sg[m-1][n-2]&&sg[m-1][n-1]>=sg[m-2][n-1]){\n sz1[a]=m-1;sz2[a]=n-1;\n a++;\n }\n if(n>1){\n for(j=1;j=sg[0][j+1]&&sg[0][j]>=sg[1][j]&&sg[0][j]>=sg[0][j-1]){\n sz1[a]=0;sz2[a]=j;\n a++;\n }\n }\n }\n if(m>1&&n>1){\n for(j=1;j=sg[m-1][j+1]&&sg[m-1][j]>=sg[m-2][j]&&sg[m-1][j]>=sg[m-1][j-1]){\n sz1[a]=m-1;sz2[a]=j;\n a++;\n }\n }\n }\n if(m>1){\n for(i=1;i=sg[i+1][0]&&sg[i][0]>=sg[i-1][0]&&sg[i][0]>=sg[i][1]){\n sz1[a]=i;sz2[a]=0;\n a++;\n }\n }\n }\n if(m>1&&n>1){\n for(i=1;i=sg[i+1][n-1]&&sg[i][n-1]>=sg[i-1][n-1]&&sg[i][n-1]>=sg[i][n-2]){\n sz1[a]=i;sz2[a]=j=n-1;\n a++;\n }\n }\n }\n if(m>1&&n>1)\n for(i=1;i=sg[i-1][j]&&sg[i][j]>=sg[i+1][j]&&sg[i][j]>=sg[i][j-1]&&sg[i][j]>=sg[i][j+1]){\n sz1[a]=i;sz2[a]=j;\n a++;\n }\n }\n }\n \n for(int k=0;ksz1[b]||(sz1[b-1]==sz1[b]&&sz2[b-1]>sz2[b])){\n e=sz1[b];\n sz1[b]=sz1[b-1];\n sz1[b-1]=e;\n \n e=sz2[b];\n sz2[b]=sz2[b-1];\n sz2[b-1]=e;\n }\n \n }\n \n}\nfor(b=0;b>m>>n;\n\tfor(int i=0;i>high[i][j];\n\tfor(int i=0;i=high[i+1][j]&&high[i][j]>=high[i][j+1]) cout<=high[i][j+1]&&high[i][j]>=high[i][j-1]&&high[i][j]>=high[i+1][j]) cout<=high[i+1][j]&&high[i][j]>=high[i-1][j]&&high[i][j]>=high[i][j+1]) cout<high[i-1][j]&&high[i][j]>=high[i][j-1]) cout<=high[i-1][j]&&high[i][j]>=high[i][j+1]&&high[i][j]>=high[i][j-1]) cout<=high[i-1][j]&&high[i][j]>=high[i][j-1]&&high[i][j]>=high[i+1][j]) cout<=high[i+1][j]&&high[i][j]>=high[i-1][j]&&high[i][j]>=high[i][j+1]&&high[i][j]>=high[i][j-1]) cout<=a[x+1][y] && a[x][y]>=a[x][y+1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse if (x==m-1)\n\t\t{\n\t\t\tif (a[x][y]>=a[x-1][y] && a[x][y]>=a[x][y+1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (a[x][y]>=a[x-1][y] && a[x][y]>=a[x+1][y] && a[x][y]>=a[x][y+1])\n\t\t\t\treturn 1;\n\t\t}\n\t}\n\telse if (y==n-1)\n\t{\n\t\tif (x==0)\n\t\t{\n\t\t\tif (a[x][y]>=a[x+1][y] && a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse if (x==m-1)\n\t\t{\n\t\t\tif (a[x][y]>=a[x-1][y] && a[x][y]>=a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (a[x][y]>=a[x-1][y] && a[x][y]>=a[x+1][y] && a[x][y]>=a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (x==0)\n\t\t{\n\t\t\tif (a[x][y]>=a[x+1][y] && a[x][y]>=a[x][y+1] && a[x][y]>=a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse if (x==m-1)\n\t\t{\n\t\t\tif (a[x][y]>=a[x-1][y] && a[x][y]>=a[x][y+1] && a[x][y]>=a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (a[x][y]>=a[x+1][y] && a[x][y]>=a[x-1][y] && a[x][y]>=a[x][y+1] && a[x][y]>=a[x][y-1])\n\t\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\nmain()\n{\n\n\tscanf(\"%d %d\",&m,&n);\n\tint i,j;\n\tfor (i=0;i=s[i+1][j]&&s[i][j]>=s[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j=s[i+1][j]&&s[i][j]>=s[i][j+1]&&s[i][j]>=s[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==0&&j==n-1)\n\t\t\t{\n\t\t\t\tif(s[i][j]>=s[i+1][j]&&s[i][j]>=s[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i=s[i+1][j]&&s[i][j]>=s[i][j+1]&&s[i][j]>=s[i-1][j])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i=s[i+1][j]&&s[i][j]>=s[i][j-1]&&s[i][j]>=s[i-1][j]&&s[i][j]>=s[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i=s[i+1][j]&&s[i][j]>=s[i][j-1]&&s[i][j]>=s[i-1][j])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&n==0)\n\t\t\t{\n\t\t\t\tif(s[i][j]>=s[i-1][j]&&s[i][j]>=s[i][j+1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j=s[i-1][j]&&s[i][j]>=s[i][j+1]&&s[i][j]>=s[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\telse if(i==m-1&&j==n-1)\n\t\t\t{\n\t\t\t\tif(s[i][j]>=s[i-1][j]&&s[i][j]>=s[i][j-1])\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n}\n\n\n\t\t\n"} +{"label": "72", "index": "35983", "code": "int panduan(int a,int b, int c,int d,int e);\nint panduan(int a,int b, int c,int d,int e){\n int s=0;\n if(e>=a&&e>=b&&e>=c&&e>=d){\n s=1;\n }\n return s;\n}\nint main(){\n int m,n,i,j;\n scanf(\"%d %d\",&m,&n);\n int dikuai[m+2][n+2];\n for(i=1;i>a>>b;\n\tfor ( int i=0 ;i<=a+1; i++ )\n\t\t\tfor ( int j=0;j<=b+1;j++ )\n\t\t\t\tx[i][j]=-1;\n\tfor ( int i=1 ;i<=a; i++ )\n\t\tfor ( int j=1;j<=b;j++ )\n\t\t\tcin>>x[i][j];\n\t//cout<=x[k-1][l])&&(x[k][l]>=x[k+1][l])&&(x[k][l]>=x[k][l-1])&&(x[k][l]>=x[k][l+1]))\n\t\t\t\t{\n\t\t\t\t\t//cout<=a[0][1]&&a[0][0]>=a[1][0])\n printf (\"0 0\\n\");\n if (j0)\n {\n if (a[0][j]>=a[0][j+1]&&a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j])\n printf (\"0 %d\\n\",j);\n }\n if (j==n-1)\n {\n if (a[0][j]>=a[0][j-1]&&a[0][j]>=a[1][j])\n printf (\"0 %d\\n\",j);\n }\n }\n if (i<(m-1)&&i>=1)\n {\n if (j==0)\n {\n if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]) \n printf (\"%d %d\\n\",i,j);\n }\n if (j0)\n {\n if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n printf (\"%d %d\\n\",i,j);\n }\n if (j==n-1)\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf (\"%d %d\\n\",i,j);\n }\n }\n if (i==(m-1))\n {\n if (j==0)\n {\n if (a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j])\n printf (\"%d %d\\n\",i,j);\n }\n if (j>0&&j=a[i][j+1]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n printf (\"%d %d\\n\",i,j);\n }\n if (j==(n-1))\n {\n if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n printf (\"%d %d\\n\",i,j);\n }\n }\n }\n }\n scanf (\"%d\",&i);\n return 0;\n }\n"} +{"label": "72", "index": "35986", "code": "\nint main(int argc, char* argv[])\n{\n\tint m,n,a[20][20],b[24][24],i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=0;ib[i][j+1]&&b[i+1][j+1]+1>b[i+1][j]&&b[i+1][j+1]+1>b[i+1][j+2]&&b[i+1][j+1]+1>b[i+2][j+1])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t}\n\t}\n\n\n\t\n\t\n\treturn 0;\n\n\n\t\n}\n"} +{"label": "72", "index": "35987", "code": "\nint main(){\n int s[20][20];\n int m,n;\n scanf(\"%d%d\",&m,&n);\n for(int i=0;i<=m-1;i++){\n\t for(int j=0;j<=n-1;j++){\n\t\t scanf(\"%d\",&s[i][j]);\n\t }\n }\n for(int a=0;a<=m-1;a++){\n\t for(int b=0;b<=n-1;b++){\n\t\t if(a==0){\n\t\t\t if(b==0){\n\t\t\t\t if(s[a][b]>=s[a][b+1]&&s[a][b]>=s[a+1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else if(b<=n-2){\n\t\t\t\t if(s[a][b]>=s[a][b+1]&&s[a][b]>=s[a][b-1]&&s[a][b]>=s[a+1][b]){\n printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else if(b==n-1){\n\t\t\t\t if(s[a][b]>=s[a][b-1]&&s[a][b]>=s[a+1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }\n\t\t }else if(a!=0&&a!=m-1){\n\t\t\t if(b==0){\n\t\t\t\t if(s[a][b]>=s[a+1][b]&&s[a][b]>=s[a-1][b]&&s[a][b]>=s[a][b+1]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else if(b<=n-2){\n\t\t\t\t if(s[a][b]>=s[a][b+1]&&s[a][b]>=s[a][b-1]&&s[a][b]>=s[a+1][b]&&s[a][b]>=s[a-1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else if(b==n-1){\n\t\t\t\t if(s[a][b]>=s[a][b-1]&&s[a][b]>=s[a-1][b]&&s[a][b]>=s[a+1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }\n\t\t }else{\n\t\t\t if(b==0){\n\t\t\t\t if(s[a][b]>=s[a][b+1]&&s[a][b]>=s[a-1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else if(b!=n-1){\n\t\t\t\t if(s[a][b]>=s[a][b-1]&&s[a][b]>=s[a][b+1]&&s[a][b]>=s[a-1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }else{\n\t\t\t\t if(s[a][b]>=s[a][b-1]&&s[a][b]>=s[a-1][b]){\n\t\t\t\t\t printf(\"%d %d\\n\",a,b);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n }\n\n\n\n\n\n\t\t \n \n\n return 0;}"} +{"label": "72", "index": "35988", "code": "\nint main()\n{ int a[100][100],i=0,j=0,m,n;\n\tscanf(\"%d%d\",&m,&n);\nfor(i=0;i<=m+1;i++)\n\t{ for(j=0;j<=n+1;j++)\n\t\t{if(i==0||j==0||i==m+1||j==n+1) a[i][j]=0;\n\t\telse scanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\t\n\n\n for(i=1;i<=m;i++)\n\t{ for(j=1;j<=n;j++)\n { \n\t if (a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j])\n printf(\"%d %d\\n\",i-1,j-1);\n }\n }\n \n\n\treturn 0;\n}\n\n\n"} +{"label": "72", "index": "35989", "code": "struct sha\n{\n\tint gaodu;\n\tint x;\n\tint y;\n\tint shanding;\n}mou[100][200],t;\nint main()\n{\n\tint m,n;\n\tcin>>m>>n;\n\tint i,j;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tcin>>mou[i][j].gaodu;\n\t\t\tmou[i][j].x=i;\n\t\t\tmou[i][j].y=j;\n\t\t\tmou[i][j].shanding=0;\n\t\t}\n\t}\n\tfor(i=0;i<=m+1;i++)\n\t{\n\t\tmou[i][n+1].gaodu=0;\n\t\tmou[i][0].gaodu=0;\n\t}\n\tfor(i=0;i<=n+1;i++)\n\t{\n\t\tmou[m+1][i].gaodu=0;\n\t\tmou[0][i].gaodu=0;\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(mou[i][j].gaodu>=mou[i-1][j].gaodu&&mou[i][j].gaodu>=mou[i+1][j].gaodu&&mou[i][j].gaodu>=mou[i][j-1].gaodu&&mou[i][j].gaodu>=mou[i][j+1].gaodu)\n\t\t\t\tmou[i][j].shanding=1;\n\t\t}\n\t}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(mou[i][j].shanding==1)\n\t\t\t{\n\t\t\t\tcout<=shandi[i-1][j]&&shandi[i][j]>=shandi[i+1][j]&&shandi[i][j]>=shandi[i][j-1]&&shandi[i][j]>=shandi[i][j+1])\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t}\t\n\treturn 0;\n}\n"} +{"label": "72", "index": "35991", "code": "int main(){\n\tint m, n, a[20][20]={0}, i, j, h;\n\tscanf(\"%d %d\", &m, &n);\n\tfor(i=0;i=a[i+1][j]&&a[i][j]>=a[i][j+1]){\n\t\t\t\t\tprintf(\"%d %d\\n\", i, j);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tif(i==0&&j!=0){\n\t\t\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i][j-1]){\n\t\t\t\t\tprintf(\"%d %d\\n\", i, j);\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\tif(i!=0&&j==0){\n\t\t\t\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]){\n\t\t\t\t\tprintf(\"%d %d\\n\", i, j);\n\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(i!=0&&j!=0){\n\t\t\t\t\t\t\tif(a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1]&&a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]){\n\t\t\t\t\t\t\t\tprintf(\"%d %d\\n\", i, j);\n\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n"} +{"label": "72", "index": "35992", "code": "\nint main(){\n int m,n;\n scanf(\"%d%d\",&m,&n);\n int gd[m+2][n+2];\n int a[1000],b[1000];\n int x=0;\n for(int i=0;i=gd[i-1][k]&&gd[i][k]>=gd[i+1][k]&&gd[i][k]>=gd[i][k+1]&&gd[i][k]>=gd[i][k-1])\n {a[x]=i;b[x]=k;x++;}\n }\n }\n \n for(int i=0;i=a[i-1][j])&&(a[i][j]>=a[i+1][j])&&(a[i][j]>=a[i][j-1])&&(a[i][j]>=a[i][j+1]))\n\t \t printf(\"%d %d\\n\",i-1,j-1);\n\t}\n }\n return 0;\n} \n\n"} +{"label": "72", "index": "35994", "code": "main(){\n int m,n;\n int x,y,x1,x2,y1,y2;\n int s[M][N],a[M][N]={0};\n scanf(\"%d %d\",&m, &n);\n for(y=0;y=s[y][x1+1]){\n a[y][x1]=s[y][x1];\n }\n }\n\t\tfor(x2=1;x2=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n\t{\t\n\t\ttemp1=i-1;\n\t\ttemp2=j-1;\n\t\tprintf(\"%d %d\\n\",temp1,temp2);\n\t}\n}\n}"} +{"label": "72", "index": "35996", "code": "int main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint i=0,j=0;\n\tint **pp;\n\tpp=(int **)malloc(sizeof (int *)*(m+2));\n\tfor(i=0;i=pp[i-1][j])\n\t\t\tk=k+1;\n\t\t\tif(pp[i][j]>=pp[i+1][j])\n\t\t\tk=k+1;\n\t\t\tif(pp[i][j]>=pp[i][j-1])\n\t\t\tk=k+1;\n\t\t\tif(pp[i][j]>=pp[i][j+1])\n\t\t\tk=k+1;\n\t\t\tif(k==4)\n\t\t\tprintf(\"%d %d\\n\",i-1,j-1);\n\t\t\tk=0;\t\n\t\t}\t\n\t}\n\tfor(i=0;i=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j+1])\n {x=i-1;y=j-1;\n printf(\"%d %d\\n\",x,y);}}}\n\n return 0;\n}"} +{"label": "72", "index": "35998", "code": "int main()\n{\n int i=0,j=0,m=0,n=0,x=0;\n int b[400],c[400];\n int a[20][20];\n scanf(\"%d%d\",&m,&n);\n for(i=0;i=a[0][1]&&a[0][0]>=a[1][0])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(i==0&&j==n-1)\n {\n if(a[0][n-1]>=a[0][n-2]&&a[0][n-1]>=a[1][n-1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(i==0&&j!=0&&j!=n-1)\n {\n if(a[0][j]>=a[0][j-1]&&a[0][j]>=a[0][j+1]&&a[0][j]>=a[1][j])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(j==0&&i!=0&&i!=m-1)\n {\n if(a[i][0]>=a[i-1][0]&&a[i][0]>=a[i+1][0]&&a[i][0]>=a[i][1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(j==0&&i==m-1)\n {\n if(a[m-1][0]>=a[m-2][0]&&a[m-1][0]>=a[m-1][1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(i==m-1&&j!=0&&j!=n-1)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(i==m-1&&j==n-1)\n {\n if(a[i][j]>=a[i][j-1]&&a[i][j]>=a[i-1][j])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(j==n-1&&i!=0&&i!=m-1)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n if(i!=0&&j!=0&&i!=m-1&&j!=n-1)\n {\n if(a[i][j]>=a[i-1][j]&&a[i][j]>=a[i+1][j]&&a[i][j]>=a[i][j-1]&&a[i][j]>=a[i][j+1])\n {\n b[x]=i;\n c[x]=j;\n x++;\n }\n }\n }\n }\n for(i=0;i=up)&&(point>=down)&&(point>=left)&&(point>=right));\n} "} +{"label": "73", "index": "36000", "code": "int main()\n{\n\tint n,i,j,sign,sg,max;\n\tint a[10][10];\n\tint maxline[10];\n\n\tfor (i=1;i<=5;i++)\n\t\tfor (j=1;j<=5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor (i=1;i<=5;i++)\n\t{\n\t\tmax=1;\n\t\tfor (j=2;j<=5;j++)\n\t\t\tif (a[i][j]>a[i][max]) max=j;\n\t\tmaxline[i]=max;\n\t}\n\tsg=0;\n\tfor (i=1;i<=5;i++)\n\t{\n\t\tsign=1;\n\t\tfor (j=1;j<=5;j++)\n\t\t\tif (a[j][maxline[i]]>a[i][j];\n\tfor(i=0;i<5;i++)//??????\n\t\tfor(j=0;j<5;j++)\n\t\t\t{\n\t\t\t\tt=0;//???\n\t\t\t\tfor(k=0;k<5;k++)//????\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]>a[i][k])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tif(a[i][j]>ju[i][j];\n for(i=0;i<5;i++)\n {\n \n for(j=0;j<5;j++)\n {d=0;\n for(k=0;k<5;k++)\n { \n if(ju[i][j]>ju[i][k])\n {\n d++;\n }\n }\n if(d==4) break;\n }e=0;\n for(k=0;k<5;k++)\n {\n if(ju[i][j]>a[i][j];\n\t\t\tmax[i]=a[i][1];//????????a[i][1]\n\t\t\tmin[j]=a[1][j];//????????a[1][j]\n\t\t}\n\t}\n\tfor(i=1;i<=5;i++)//????????5?????\n\t{\n\t\tfor(j=2;j<=5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];//??i??????max[i]\n\t\t\t\tcolum[i]=j;//??i???????????colum[i]\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=1;j<=5;j++)//????\n\t{\n\t\tfor(i=2;i<=5;i++)\n\t\t{\n\t\t\tif(a[i][j]> a[i][j];\t\t\t\t\t\t//????\n\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\th[i] = a[i][0];\t\t\t\t\t\t\t//???????????????\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > h[i])\n\t\t\t\th[i] = a[i][j];\t\t\t\t\t//??????h?????\n\t\t}\n\t}\n\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tl[j] = a[0][j];\n\t\t\tfor(i = 0; i < 5; i++)\n\t\t\t{\n\t\t\t\tif(a[i][j] < l[j])\n\t\t\t\t\tl[j] = a[i][j];\t\t\t\t//???l\n\t\t\t}\n\t\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tfor(j = 0; j < 5; j++)\t\t\t\t\t//??????\n\t\t{\n\t\t\t//??????????????????\n\t\t\tif((a[i][j] == h[i]) && (a[i][j] == l[j]))\n\t\t\t{\n\t\t\t\thang = i + 1;\t\t\t\t\t//hang?i??,??hang????0\n\t\t\t\tlie = j + 1;\t\t\t\t\t//lie?j??\n\t\t\t\tnum = a[i][j];\t\t\t\t\t//???a[i][j]\n\t\t\t}\n\t\t}\n\t}\n\tif(hang == 0)\t\t\t\t\t\t\t\t//??hang??0????????????\n\t\tcout << \"not found\" << endl;\t\t\t//?????\n\telse \n\t\t//??????\n\t\tcout << hang << \" \" << lie << \" \" << num << endl; \n\t\n\treturn 0;\n}\n\n\n"} +{"label": "73", "index": "36005", "code": "main()\n{\n int i,j,k,m;\n int p[5][5];\n for(i=0;i<=4;i++)\n {\n for(j=0;j<=4;j++)\n scanf(\"%d\",&p[i][j]);\n }\n for(i=0;i<=4;i++)\n {\n k=0;\n m=0;\n for(j=0;j<=3;j++)\n if(p[i][k]p[j+1][k]) m=j+1;\n if(m==i) break;\n }\n if(i==5) printf(\"not found\");\n else printf(\"%d %d %d\",m+1,k+1,p[m][k]);\n}\n"} +{"label": "73", "index": "36006", "code": "main()\n{\n int a[6][6],i,j,k,l,m=5,n=5,c=0,g=0;\n for (i=0;il)\n {\n l=a[i][j];\n c=j;\n }\n }\n for (k=0;k=y)\n return x;\n else\n return y;\n}\n\nmain()\n{\n int a[5][5],b[5][5],i,j,k=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n b[i][j]=0;\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n b[i][j]++;\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n b[i][j]++;\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(b[i][j]==2)\n {\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n k=1;\n }\n }\n }\n if(k==0)\n printf(\"not found\\n\");\n}"} +{"label": "73", "index": "36008", "code": "int main()\n{\n int sz[ROW][COL];\n int i,row,col,max,min,nmax,nmin,num=0;\n for(row=0;rowmax){\n\t\t\t\t\tmax=sz[row][col];\n\t\t\t\t\tnmax=col;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tfor(i=0;ia[j][x])break;\n\t\tif(j==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\",i+1,x+1,max);break;\n\t\t}\n\t}\n\tif(i==5&&j!=5)printf(\"not found\");\n\treturn 0;\n}\n\n\t\n\n\n\n\t\t\n\n"} +{"label": "73", "index": "36010", "code": "\nint main()\n{\n\tint a[5][5] , i, j, k, \n\t\tmax, row, column, count = 0;\n\tfor(i = 0; i < 5; i ++)\n\t{\n\t\tfor(j = 0; j < 5; j ++)\n\t\t{cin >> a[i][j];}\n\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tmax = 0;\n\t\tfor(j = 0; j < 5; j ++)\n\t\t{\n\t\t\tif(max < a[i][j])\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\trow = i; column = j;\n\t\t\t}\n\t\t}\n\t\tfor(k = 0; k < 5; k ++)\n\t\t{\n\t\t\tif(max > a[k][column])\n\t\t\t\tbreak;\n\t\t}\n\t\tif(k == 5)\n\t\t{\n\t\t\tcount = 1;\n\t\t\tcout << row + 1 << \" \" << column + 1 \n\t\t\t\t << \" \" << max << endl;\n\t\t}\n\t}\n\t\tif(count == 0)\n\t\t\tcout << \"not found\" <sz[0][1])&&(sz[0][0]>sz[0][2])&&(sz[0][0]>sz[0][3])&&(sz[0][0]>sz[0][4])&&(sz[0][0]sz[0][0])&&(sz[0][1]>sz[0][2])&&(sz[0][1]>sz[0][3])&&(sz[0][1]>sz[0][4])&&(sz[0][1]sz[0][1])&&(sz[0][2]>sz[0][0])&&(sz[0][2]>sz[0][3])&&(sz[0][2]>sz[0][4])&&(sz[0][2]sz[0][1])&&(sz[0][3]>sz[0][2])&&(sz[0][3]>sz[0][0])&&(sz[0][3]>sz[0][4])&&(sz[0][3]sz[0][1])&&(sz[0][4]>sz[0][2])&&(sz[0][4]>sz[0][3])&&(sz[0][0]sz[1][1])&&(sz[1][0]>sz[1][2])&&(sz[1][0]>sz[1][3])&&(sz[1][0]>sz[1][4])&&(sz[1][0]sz[1][0])&&(sz[1][1]>sz[1][2])&&(sz[1][1]>sz[1][3])&&(sz[1][1]>sz[1][4])&&(sz[1][1]sz[1][1])&&(sz[1][2]>sz[1][0])&&(sz[1][2]>sz[1][3])&&(sz[1][2]>sz[1][4])&&(sz[1][2]sz[1][1])&&(sz[1][3]>sz[1][2])&&(sz[1][3]>sz[1][0])&&(sz[1][3]>sz[1][4])&&(sz[1][3]sz[1][1])&&(sz[1][4]>sz[1][2])&&(sz[1][4]>sz[1][3])&&(sz[1][0]sz[2][1])&&(sz[2][0]>sz[2][2])&&(sz[2][0]>sz[2][3])&&(sz[2][0]>sz[2][4])&&(sz[2][0]sz[2][0])&&(sz[2][1]>sz[2][2])&&(sz[2][1]>sz[2][3])&&(sz[2][1]>sz[2][4])&&(sz[2][1]sz[2][1])&&(sz[2][2]>sz[2][0])&&(sz[2][2]>sz[2][3])&&(sz[2][2]>sz[2][4])&&(sz[2][2]sz[2][1])&&(sz[2][3]>sz[1][2])&&(sz[2][3]>sz[2][0])&&(sz[2][3]>sz[2][4])&&(sz[2][3]sz[2][1])&&(sz[2][4]>sz[2][2])&&(sz[2][4]>sz[2][3])&&(sz[2][0]sz[3][1])&&(sz[3][0]>sz[3][2])&&(sz[3][0]>sz[3][3])&&(sz[3][0]>sz[3][4])&&(sz[3][0]sz[3][0])&&(sz[3][1]>sz[3][2])&&(sz[3][1]>sz[3][3])&&(sz[3][1]>sz[3][4])&&(sz[3][1]sz[3][1])&&(sz[3][2]>sz[3][0])&&(sz[3][2]>sz[3][3])&&(sz[3][2]>sz[3][4])&&(sz[3][2]sz[3][1])&&(sz[3][3]>sz[3][2])&&(sz[3][3]>sz[3][0])&&(sz[3][3]>sz[3][4])&&(sz[3][3]sz[3][1])&&(sz[3][4]>sz[3][2])&&(sz[3][4]>sz[3][3])&&(sz[3][0]sz[4][1])&&(sz[4][0]>sz[4][2])&&(sz[4][0]>sz[4][3])&&(sz[4][0]>sz[4][4])&&(sz[4][0]sz[4][0])){\nprintf(\"5 1 %d\",sz[4][0]);\ni++;\n}\nif((sz[4][1]>sz[4][0])&&(sz[4][1]>sz[4][2])&&(sz[4][1]>sz[4][3])&&(sz[4][1]>sz[4][4])&&(sz[4][1]sz[4][1])){\nprintf(\"5 2 %d\",sz[4][1]);\ni++;\n}\n\nif((sz[4][2]>sz[4][1])&&(sz[4][2]>sz[4][0])&&(sz[4][2]>sz[4][3])&&(sz[4][2]>sz[4][4])&&(sz[4][2]sz[4][2])){\nprintf(\"5 3 %d\",sz[4][2]);\ni++;\n}\n\nif((sz[4][3]>sz[4][1])&&(sz[4][3]>sz[4][2])&&(sz[4][3]>sz[4][0])&&(sz[4][3]>sz[4][4])&&(sz[4][3]sz[4][3])){\nprintf(\"5 4 %d\",sz[4][3]);\ni++;\n}\nif((sz[4][4]>sz[4][1])&&(sz[4][4]>sz[4][2])&&(sz[4][4]>sz[4][3])&&(sz[4][0]sz[4][4])){\nprintf(\"5 5 %d\",sz[4][4]);\ni++;\n}\n\nif(i==0)\nprintf(\"not found\");\nreturn 0;\n}"} +{"label": "73", "index": "36012", "code": "int main ()\n{\n\tint i, j, k, m, row1, row2, column, max, min, flag = 0;\n\tint a[5][5];\n\tfor(i = 0; i < 5; i++)\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> m;\n\t\t\ta[i][j] = m;\n\t\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tmax = 0;\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > max) \n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\trow1 = i;\n\t\t\t\tcolumn = j;\n\t\t\t}\n\t\t}\n\t\tmin = a[0][column];\n\t\tfor(k = 0; k < 5; k++)\n\t\t{\n\t\t\tif(a[k][column] <= min) \n\t\t\t{\n\t\t\t\tmin = a[k][column];\n\t\t\t\trow2 = k;\n\t\t\t}\n\t\t}\n\t\tif(row1 == row2)\n\t\t{\n\t\t\tflag = 1;\n\t\t\tcout << row1 + 1 << \" \" << column + 1 << \" \" << max << endl;\n\t\t}\n\t\t\n\t}\n\tif(flag == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n"} +{"label": "73", "index": "36013", "code": "int main()\n{\n int a[5][5];\n int i , j , x , l , n , max ;\n for ( i=0;i<=4;i++ )\n {\n for ( j=0;j<=4;j++ )\n {\n cin>>x;\n a[i][j]=x;\n }\n }\n l=0;\n for ( i=0;i<=4;i++)\n {\n max=a[i][0];\n n=0;\n for ( j=1;j<=4;j++ )\n {\n if (a[i][j]>a[i][n])\n {\n n=j;\n }\n }\n if ((a[i][n]<=a[0][n])&&(a[i][n]<=a[1][n])&&(a[i][n]<=a[2][n])&&(a[i][n]<=a[3][n])&&(a[i][n]<=a[4][n]))\n {\n cout<= y)\n\t\treturn x;\n\telse\n\t\treturn y;\n}\nint min(int x, int y) {\n\tif (x <= y)\n\t\treturn x;\n\telse\n\t\treturn y;\n}\nint main() {\n\tint i, k, a[6][6], Y = 0, max1[6], min1[6];\n\tfor (i = 1; i <= 5; i++) {\n\t\tfor (k = 1; k <= 5; k++) {\n\t\t\tcin >> a[i][k];\n\t\t}\n\t}\n\tfor (i = 1; i <= 5; i++) {\n\t\tmax1[i] = max(a[i][1],\n\t\t\t\tmax(a[i][2], max(a[i][3], max(a[i][4], a[i][5]))));\n\t}\n\tfor (k = 1; k <= 5; k++) {\n\t\tmin1[k] = min(a[1][k],\n\t\t\t\tmin(a[2][k], min(a[3][k], min(a[4][k], a[5][k]))));\n\t}\n\tfor (i = 1; i <= 5; i++) {\n\t\tfor (k = 1; k <= 5; k++) {\n\t\t\tif (max1[i] == min1[k]) {\n\t\t\t\tY = 1;\n\t\t\t\tcout << i << ' ' << k << ' ' << a[i][k] << endl;\n\t\t\t}\n\t\t}\n\t}\n\tif (Y == 0)\n\t\tcout << \"not found\";\n\treturn 0;\n}\n"} +{"label": "73", "index": "36015", "code": "int main()\n{\nint a[5][5];\n\tint max = 0, i, j, flag = 1, tag = 1;\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++) \n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i < 5; i++) \n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tif (a[i][j] > a[i][max])\n\t\t\t\tmax = j;\n\t\tfor ( int k = 0; k < 5; k++) \n\t\t\tif (a[i][max] > a[k][max])\n\t\t\t\tflag = 0;\n\t\tif (flag)\n\t\t{\n\t\t\tcout << i + 1 <<\" \" << max + 1 << \" \" << a[i][max];\n\t\t\ttag = 0;\n\t\t}\n\t\tmax = 0;\n\t\tflag = 1;\n\t}\n\tif (tag)\n\t\tcout << \"not found\";\nreturn 0;\n}"} +{"label": "73", "index": "36016", "code": "int main()\n{\n\tint i,k;//???? i???k??\n\tint x,y;\n\tint r=0,c=0;//???? ??????\n\tint a[5][5];//??\n\tint w=0;//?? \n\t \n\tfor(r=0;r<5;r++) \n\t{\n\t\tfor(c=0;c<5;c++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[r][c]);\n\t\t}\n\n\t} \n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif(a[i][k]>=a[i][1]&&a[i][k]>=a[i][2]&&a[i][k]>=a[i][3]&&a[i][k]>=a[i][4]&&a[i][k]>=a[i][0])\n\t\t\t{\n\t\t\t\tif(a[i][k]<=a[0][k]&&a[i][k]<=a[1][k]&&a[i][k]<=a[2][k]&&a[i][k]<=a[3][k]&&a[i][k]<=a[4][k])\n\t\t\t\t{\n\t\t\t\t\tx=i+1;\n\t\t\t\t\ty=k+1;\n\t\t\t\t\tprintf(\"%d %d %d\\n\",x,y,a[i][k]);\n\n\t\t\t\t\tw=1;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}\n\tif(w==0)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\n\treturn 0;\n}"} +{"label": "73", "index": "36017", "code": "int main()\n{\n int i,j,k,l,m,n,y,z,a[5][5],d;\n d=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n for(k=0;k<5;k++)\n {\n if(j!=k&&a[i][j]<=a[i][k]) break;\n }\n if(k==5)\n {\n for(k=0;k<5;k++)\n {\n if(i!=k&&a[i][j]>=a[k][j]) break;\n }\n if(k==5)\n {\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);\n d++;\n }\n }\n }\n }\n if(d==0) printf(\"not found\");\n\n}\n\n"} +{"label": "73", "index": "36018", "code": "/*\n * a.cpp\n *\n * Created on: 2010-11-13\n * Author: Administrator\n */\nint main(){\n\tint a[5][5],i,j,k,n,flag,m=1;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++){\n\t\t\tcin>>a[i][j];\n\t\t}\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++){\n\t\t\tflag=1;\n\t\t\tfor(k=0;k<5;k++){\n\t\t\t\tif(a[i][j]>a[i][k]||k==j)\n\t\t\t\t\tcontinue;\n\t\t\t\telse{\n\t\t\t\t\tflag=0;break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tfor(n=0;n<5;n++){\n\t\t\t\t\tif(a[i][j]>=a[n][j]&&n!=i){\n\t\t\t\t\t\tflag=0;break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(flag) {cout<k[i]) \n {\n k[i]=num[i][j];\n a[i]=j;\n }\n }\n \n }\n \n \n \n \n for(q=0;q<=4;q++)\n {\n h[q]=100000;\n for(p=0;p<=4;p++)\n {\n if (num[p][q]a2)\n a1=a2;\n if(a1>a3)\n a1=a3;\n if(a1>a4)\n a1=a4;\n if(a1>a5)\n a1=a5;\n return a1;\n}\nmain()\n{\n int a[5][5],count=0;\n for(int i=0;i<5;i++)\n {\n for(int j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(int i=0;i<5;i++)\n {\n for(int j=0;j<5;j++)\n {\n if(a[i][j]==rowmax(a[i])&&a[i][j]==linemin(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]))\n {\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n count++;\n }\n }\n }\n if(count==0)\n printf(\"not found\\n\");\n}\n"} +{"label": "73", "index": "36021", "code": "int a[5][5];\nint max(int i,int j)\n{\n int s=0;\n for (int k=0;k<5;k++)\n {\n if (a[i][j]>=a[i][k])\n s++;\n }\n if (s==5) return 1;\n else return 0;\n}\nint min(int i,int j)\n{\n int s=0;\n for (int k=0;k<5;k++)\n {\n if (a[i][j]<=a[k][j])\n s++;\n }\n if (s==5) return 1;\n else return 0;\n}\nmain()\n{\n for (int i=0;i<5;i++)\n for (int j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n int s=0,I,J;\n for (int i=0;i<5;i++)\n for (int j=0;j<5;j++)\n if (max(i,j)==1 && min(i,j)==1)\n {s=a[i][j];I=i;J=j;}\n if (s!=0)\n printf(\"%d %d %d\\n\",I+1,J+1,s);\n else printf(\"not found\\n\");\n}"} +{"label": "73", "index": "36022", "code": "int main()\n{\n\tint a[6][6], i, j, min, max, k, m, n, x, y, flag = 0;\n\tfor (i = 1; i < 6; i++)\n\t\tfor(j = 1; j < 6; j++)\n\t\t\tcin >> a[i][j];\n\tfor (k = 1; k < 6; k++)\n\t{\n\t\tmax = 0;\n\t\tfor (m = 1; m < 6; m++)\n\t\t{\n\t\t\tif (max < a[k][m])\n\t\t\t{\n\t\t\t\tmax = a[k][m];\n\t\t\t\tx = m;\n\t\t\t}\n\t\t}\n\t\tmin = 100000;\n\t\tfor (n = 1; n < 6; n++)\n\t\t{\n\t\t\tif (min >= a[n][x])\n\t\t\t{\n\t\t\t\tmin = a[n][x];\n\t\t\t\ty = n;\n\t\t\t}\n\t\t}\n\t\tif (k == y)\n\t\t{\n\t\t\tflag = 1;\n\t\t cout << y << ' ' << x << ' ' << a[y][x] << endl;\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36023", "code": "int main()\n{\n\tint i,j,a[5][5];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tint max,count=0,maxj;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tint flag=1;\n\t\tmax=a[i][0];\n\t\tmaxj=0; //?????????\n\t\tfor(j=1;j<5;j++)\n\t\t\tif(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tmaxj=j;\n\t\t\t}\n\t\t\tfor(j=0;j<5;j++)\n\t\t\t\tif(a[j][maxj]>a[i][j];\n }\n\n int max_row[6]={0},min_column[6]={0};\n int line_row[6]={0},line_column[6]={0,1,1,1,1,1};\n //?????????/???????\n for (int j=1 ; j<=5 ; j++)\n min_column[j]=a[1][j];//?????????\n for (int i=1 ; i<=5 ; i++)\n for (int j=1 ; j<=5 ; j++)\n {\n if (a[i][j] > max_row[i])\n {\n max_row[i]=a[i][j];\n line_row[i]=j;\n }\n if (a[i][j] < min_column[j])\n {\n min_column[j]=a[i][j];\n line_column[j]=i;\n }\n }\n int success=0;\n for (int i=1 ; i<=5 ; i++)\n if (line_row[line_column[i]]==i)\n {\n cout<> a[i][j];\n\t\t if (max[i] < a[i][j])\n\t\t\t{\n\t\t\t max[i] = a[i][j];\n\t\t\t\tmaxx[i] = i;\n\t\t\t\tmaxy[i] = j;\n\t\t\t}\n\t\t}\n }\n\tfor (j = 0; j < 5; j++)\n {\n\t min[j] = INT_MAX;\n\t\tfor (i = 0; i < 5; i++)\n\t\t\tif (min[j] > a[i][j])\n\t\t\t{\n\t\t\t min[j] = a[i][j];\n\t\t\t\tminx[j] = i;\n\t\t\t\tminy[j] = j;\n\t\t\t}\n\t}\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tif (maxx[i] == minx[j] && maxy[i] == miny[j])\n\t\t\t{\t\n\t\t\t\tcout << maxx[i] + 1 << \" \" << maxy[i] + 1<< \" \" << a[maxx[i]][maxy[i]] << endl;\n\t\t\t\tg = 1;\n\t\t\t}\n\tif (g == 0)\n\t\tcout << \"not found\" << endl;\n\t\treturn 0;\n}"} +{"label": "73", "index": "36026", "code": "/**\n* @file homework.cpp\n* @author ??? 1000062705\n* @date 2010-11-8\n* @description\n* ??????: ????.cpp: ??????\n*/\nint main()\n{\n int a[5][5], i, j, k, max;\n\tint t1, t2, s = 0;\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j]; //??5\u00d75???\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tmax = a[i][0]; //??????????????\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tif (max <= a[i][j])\n\t\t\t{\n\t\t\t\tmax = a[i][j]; //????????\n\t\t\t t1 = i, t2 = j; //???????????\n\t\t\t}\n\t\tfor (k = 0; k < 5; k++)\n\t\t\tif (max <= a[k][t2]) continue; //???????????????????\n\t\t\telse break;\n\t\tif(k == 5) \n\t\t\t{\n\t\t\t\tcout << t1 + 1 << \" \" << t2 + 1 << \" \" << max <=s)\n\t\t\t{\n\t\t\t\ts=a[i][j];\n\t\t\t\td=j;\n\t\t\t}\n\t\t}\n l=a[i][d];\n\t\tfor(k=0;k<=4;k++)\n\t\t{\n\t\t\tif(a[k][d]<=l)l=a[k][d];\n\t\t}\n\t\tif(l==a[i][d])\n\t\t{\n\t\t\ti++;d++;\n\t\t\tprintf(\"%d %d %d\",i,d,l);\n\t\t\ttime++;\n\t\t\ti--;\n\t\t}\n\t}\n\tif(time==0)printf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36028", "code": "int main()\n{\n\tint a[6][6],i,j,p,q,max[6],min[6],t=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n max[0]=a[0][0];\n\tmin[0]=a[0][0];\n\tfor(p=0;p<5;p++)\n\t{ \n\t\tfor(q=0;q<5;q++)\n\t\t{\n\t\t\tif(max[p]a[p][q])\n\t\t\t{\n\t\t\t\tmin[q]=a[p][q];\n\t\t\t}\n\t\t}\n\t}\n\tfor(p=0;p<5;p++)\n\t{ \n\t\tfor(q=0;q<5;q++)\n\t\t{\n \t if(max[p]==min[q])\n\t\t\t{\t\n\t \tprintf(\"%d %d %d\",p+1,q+1,a[p][q]);\n\t\t t++;\n\t\t\t}\n\t\t}\n\t}\n\tif(t==0)\n\t{\n\t\t printf(\"not found\");\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36029", "code": "int main()\n{\n\tint a[5][5], i, k, l, m, n, flag;\n\tm=0;\n\tn=0;\n\tflag=0;\n\tfor(i=0; i<5; i++)\n\t{\n\t\tfor(k=0; k<5; k++)\n\t\t{\n\t\t\tcin >> a[i][k];\n\t\t}\n\t}\n\tfor(i=0; i<5; i++)\n\t{\n\t\tfor(k=0; k<4; k++)\n\t\t{\n\t\t\tif(a[i][k+1]>a[i][m])\n\t\t\t\tm=k+1;\n\t\t}\n\t\tfor(l=0; l<5; l++)\n\t\t{\n\t\t\tif(a[l][m]max[i]) max[i]=a[i][j];\n\t \tif(a[i][j]> a[i][j];\n\t\t}\t\n\tfor(i = 0; i < 5; i++)\n\t{\t\n\t\tmax = a[i][0]; y = 1;\n\t\tfor(j = 0; j < 5; j++)\t\n\t\t{\t\n\t\t\tif(a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\t y = j + 1;\n\t\t\t}\n\t\t}\n\t\tflag = 1;\n\t\tfor(int k = 0; k < 5; k++)\n\t\t\tif(a[k][y-1] < max) {flag = 0 ; continue;}\n\t\tif(flag == 1) { cout << i+1<< \" \" << y << \" \" << max ; break;}\n\t}\n\tif(flag == 0) cout << \"not found\" ;\n\treturn 0;\n\n}\n"} +{"label": "73", "index": "36032", "code": "main()\n{\n int mx[8],count=0;\n for(int i=1;i<=5;i++)mx[i]=0;\n int my[8] ;\n int a[8][8];\n for(int j=1;j<=5;j++)\n for(int i=1;i<=5;i++)\n {\n scanf(\"%d\",&a[j][i]);\n }\n for(int h=1;h<=5;h++)\n for(int k=1;k<=5;k++)//heng\n {\n if(a[h][k]>=mx[h])mx[h]=a[h][k];\n\n //if(a[h][k]>=mx[h])mx[h]=a[h][k];\n }\n\n //=100000;\n for(int k=1;k<=5;k++)\n my[k]=1000000;\n for(int k=1;k<=5;k++)\n for(int h=1;h<=5;h++)\n if(a[h][k]<=my[k])my[k]=a[h][k];\n\n for(int j=1;j<=5;j++)\n for(int i=1;i<=5;i++)\n {\n if(a[j][i]==mx[j]&&a[j][i]==my[i])\n {\n printf(\"%d %d %d\",j,i,a[j][i]);\n count=1;\n }\n }\n if(count==0)printf(\"not found\");\n\n\n}\n"} +{"label": "73", "index": "36033", "code": "main()\n{\n int a[5][5];\n int i,j,l;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n int count=0,max=0,min=0,temp;\n for(i=0;i<5;i++)\n {\n max=0;\n min=0;\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max)\n {\n max=a[i][j];\n temp=j;\n }\n }\n for(l=0;l<5;l++)\n {\n if(a[i][temp]>a[l][temp]) break;\n }\n if(l==5) \n {\n printf(\"%d %d %d\\n\",i+1,temp+1,a[i][temp]);\n count++;\n }\n }\n if(count==0) printf(\"not found\\n\");\n}\n"} +{"label": "73", "index": "36034", "code": "int main()\n{\n int a[5][5],p,i,b[5];\n for(i=0;i<5;i++){\n for(p=0;p<5;p++){\n scanf(\"%d\",&a[i][p]);\n }\n}\n for(i=0;i<5;i++){\n\t for(p=0;p<5;p++){\n\t\t if(a[i][p]>=a[i][0]&&a[i][p]>=a[i][1]&&a[i][p]>=a[i][2]&&a[i][p]>=a[i][3]&&a[i][p]>=a[i][4]){\n\t\t\t b[i]=p;\n\t\t }\n\t }\n }\n if((a[0][b[0]]>=a[1][b[0]]||a[0][b[0]]>=a[2][b[0]]||a[0][b[0]]>=a[3][b[0]]||a[0][b[0]]>=a[4][b[0]])&&\n\t (a[1][b[1]]>=a[0][b[1]]||a[1][b[1]]>=a[2][b[1]]||a[1][b[1]]>=a[3][b[1]]||a[1][b[1]]>=a[4][b[1]])&&\n\t (a[2][b[2]]>=a[0][b[2]]||a[2][b[2]]>=a[1][b[2]]||a[2][b[2]]>=a[3][b[2]]||a[2][b[2]]>=a[4][b[2]])&&\n\t (a[3][b[3]]>=a[0][b[3]]||a[3][b[3]]>=a[1][b[3]]||a[3][b[3]]>=a[2][b[3]]||a[3][b[3]]>=a[4][b[3]])&&\n\t (a[4][b[4]]>=a[0][b[4]]||a[4][b[4]]>=a[1][b[4]]||a[4][b[4]]>=a[2][b[4]]||a[4][b[4]]>=a[3][b[4]])){\n printf(\"not found\\n\");\n\t return 0;\n }\n for(i=0;i<5;i++){\n for(p=0;p<5;p++){\n if(a[i][p]>=a[i][0]&&a[i][p]>=a[i][1]&&a[i][p]>=a[i][2]&&a[i][p]>=a[i][3]&&a[i][p]>=a[i][4]){\n if(a[i][p]<=a[0][p]&&a[i][p]<=a[1][p]&&a[i][p]<=a[2][p]&&a[i][p]<=a[3][p]&&a[i][p]<=a[4][p]){\n printf(\"%d %d %d\\n\",i+1,p+1,a[i][p]);\n }\n } \n }\n}\nreturn 0;\n}"} +{"label": "73", "index": "36035", "code": "main()\n{\n int a[6][6];\n int k[6],p[6];\n int i,j;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n }\n for(i=0;i<5;i++)\n {\n k[i]=a[i][0];\n for(j=1;j<5;j++)\n {\n if(a[i][j]>k[i])\n k[i]=a[i][j];\n }\n }\n for(j=0;j<5;j++)\n {\n p[j]=a[0][j];\n for(i=1;i<5;i++)\n {\n if(a[i][j]max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tb[i][0]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tmin=a[0][j];\n\t\tc[0][j]=0;\n\t\tfor(i=1;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]k)\n\t\t\tk = a[i][p];\n\t\tp++;\n\t}\n\tp = 0;\n\twhile(p<5)\n\t{\n\t\tif(a[i][p] == k)\n\t\t\treturn p;\n\t\tp++;\n\t}\n}\nint judge(int a[5][5],int y,int i)\n{\n\tint j = 0;\n\twhile(j<5)\n\t{\n\t\tif(j == i)\n\t\t{\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(a[j][y]y){\ny=a[i][j];\nx=j;\n}\n}\nfor(f=0;f<5;f++){\nif(a[i][x]>a[f][x]){\nk=1;\n}\n}\nif(k==0){\nprintf(\"%d %d %d\",i+1,x+1,a[i][x]);\nbreak;\n}\nk=0;\nif(i==4){\nprintf(\"not found\");\n}\n}\nreturn 0;\n}\n"} +{"label": "73", "index": "36039", "code": "//********************************************************\n//* ???:1.cpp *\n//* ?????? 1200012948 *\n//* ????: 2012 11 05 *\n//* ????:??????? *\n//********************************************************\n//??\nint main()\n{\n\tint i, j, m, n = 0, a[5][5] = {{0},{0}};\n\t//?????\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tm = a[i][j];\n\t\t\t//????\n\t\t\tif (m >= a[i][0] && m >= a[i][1] && m >= a[i][2] && m >= a[i][3] && m >= a[i][4] && m <= a[0][j] && m <= a[1][j] && m <= a[2][j] && m <= a[3][j] && m <= a[4][j])\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << m << endl; //??+1\n\t\t\t\tn++;\n\n\t\t\t}\n\t\t}\n\t}\n\tif (n == 0)\n\t\tcout << \"not found\" << endl;\n\t//??\n\treturn 0;\n}\n"} +{"label": "73", "index": "36040", "code": "int main()\n{\n\tint a[5][5],i,j,k,g,h,max,flag=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax=a[i][0];\n\t\tg=0;\n\t\tfor(j=1;j<5;j++)\n\t\t\tif(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tg=j;\n\t\t\t}\n\t\t\n\t\t\n\t\th=1;\n\t\tfor(k=0;k<5;k++)\n\t\t\tif(a[k][g]=a[i][0])&&(a[i][j]>=a[i][1])&&(a[i][j]>=a[i][2])&&(a[i][j]>=a[i][3])&&(a[i][j]>=a[i][4]))\n\t\t\t{\n\t\t\t\tif((a[i][j]<=a[0][j])&&(a[i][j]<=a[1][j])&&(a[i][j]<=a[2][j])&&(a[i][j]<=a[3][j])&&(a[i][j]<=a[4][j]))\n\t\t\t\t{\n\t\t\t\t\tx=i+1;\n\t\t\t\t\ty=j+1;\n\t\t\t\t\tprintf(\"%d %d %d\",x,y,a[i][j]);\n\t\t\t\t\ts++;\n\t\t\t\t}\n\t\t\t}\n\t}\n\tif(s==0)\n\t\tprintf(\"not found\");\n\n\n\n\treturn 0;\n}\n"} +{"label": "73", "index": "36042", "code": "int main()\n{\nint a[6][6],i,j,p,q,max[6],min[6],s=0;\nfor(i=0;i<5;i++)\n{\nfor(j=0;j<5;j++)\n{\nscanf(\"%d\",&a[i][j]);\n}\n}\n max[0]=a[0][0];\nmin[0]=a[0][0];\nfor(p=0;p<5;p++)\n{ \nfor(q=0;q<5;q++)\n{\nif(max[p]a[p][q])\n{\nmin[q]=a[p][q];\n}\n}\n}\nfor(p=0;p<5;p++)\n{ \nfor(q=0;q<5;q++)\n{\n if(max[p]==min[q])\n{ \n printf(\"%d %d %d\",p+1,q+1,a[p][q]);\n s=s+1;\n}\n}\n}\nif(s==0)\n{\n printf(\"not found\");\n}\nreturn 0;\n}\n \n\n"} +{"label": "73", "index": "36043", "code": "int main()\n{\n\tint array[6][6]={0};\n\tint max[6]={0};\n\tfor(int i=1;i<=5;i++)\n\t\tfor(int j=1;j<=5;j++)\n\t\t{\n\t\t\tcin>>array[i][j];\n\t\t\tif(array[i][j]>array[i][max[i]])\n\t\t\t\tmax[i]=j;\n\t\t}\n\tint have=0,result=0;\n\tfor(int i=1;i<=5;i++)\n\t{\n\t\tint flag=1;\n\t\tfor(int k=1;k<=5;k++)\n\t\t{\n\t\t\tif(array[k][max[i]]> a[i][j];\n for (i = 0;i < 5;i++)\n\t\tfor (j = 0;j < 5;j++)\n\t\t{\n\t\t\tmax[i] = a[i][0];\n\t\t\tmin[j] = a[0][j];\n\t\t}\n for (i = 0;i < 5;i++)\n\t\tfor (j = 0;j < 5;j++)\n\t\t{\n\t\t if (a[i][j] >max[i] )\n\t\t\t{\n\t\t\t max[i] = a [i][j];\n\t\t\t \t\t\t}\n\t\t\tif (a[i][j] < min[j])\n\t\t\t{\n\t\t\t\tmin[j] = a[i][j];\n\t\t\t\t\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < 5;i++)\n\t\t\tfor (j = 0;j < 5;j++)\n\t\t\t{\n\t\t\t if (a[i][j] == max[i] && a[i][j] == min[j])\n\t\t\t\t{\n\t\t\t\t cout << i+1 << \" \" << j+1 << \" \" << a[i][j];\n\t\t\t\t flag = 1;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == 0)\n\t\t\t\tcout << \"not found\";\n return 0;\n}"} +{"label": "73", "index": "36045", "code": "int main ()\n{\n int a[5][5];\n int i,j,k,r,c[5],m,temp=0,d=0,count=0;\n for (i=0;i<5;i++)\n {\n for (j=0;j<5;j++)\n scanf (\"%d\",&a[i][j]);\n }\n for (j=0;j<5;j++)\n {\n m=a[j][0];\n c[d]=0;\n for (i=1;i<5;i++)\n {\n if (a[j][i]>m)\n {\n m=a[j][i];\n c[d]=i; \n }\n \n }//printf (\"%d %d\\n\",j,c[d]);\n d++;\n } \n for (i=0;i<5;i++)\n {\n for (k=0;k<5;k++)\n {\n if (a[k][c[i]]>matrix[i][j];//????\n }\n }\n for(i=0;i<5;i++)\n {\n row[i]=0;//????????\n max=matrix[i][0]; \n for(j=0;j<5;j++)\n {\n if(matrix[i][j]>max)\n {\n max=matrix[i][j];//???????? \n row[i]=j;\n }\n }\n }\n for(j=0;j<5;j++)\n {\n column[j]=0;//??????????\n min=matrix[0][j]; \n for(i=0;i<5;i++)\n {\n if(matrix[i][j]max[i]){\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n for(j=0;j<5;j++){\n\t\tfor (i=0;i<5;i++){\n\t\t\tif(max[i]==min[j]){\n\t\t\t\tpd=1;\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,max[i]);\n\t\t\t}\n\t\t}\n\t}\n\tif (pd==0){\n\t\tprintf(\"not found\");\n\t}\n\nreturn 0;}\n"} +{"label": "73", "index": "36048", "code": "int main()\n{\n\tint n[5][5],i,j,max[5],flag,count=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tcin>>n[i][0];\n\t\tmax[i]=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tcin>>n[i][j];\n\t\t\tif(n[i][max[i]]a[i][j]) || (a[x][j]>a[i][j];\n\t }\n }\n z=0;\n for (i=0;i<=4;i++){\n\t for(j=0;j<=4;j++){\n\t\t s=0;t=0;\n\t\t for(k=0;k<=4;k++){\n\t\t if(a[i][j]>=a[i][k]){\n\t\t\t s=s+1;//????????????\n\t\t }\n\t\t if(a[i][j]<=a[k][j]){\n\t\t\t t=t+1;//???????????\n\t\t }\n\t\t }\n\t\t if((s==5)&&(t==5)){//??????????\n\t\t\t cout<> array[i][j];\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tflag = 1; //???????\n\t\tmax = array[i][0];\n\t\trow = i; //?????\n\t\tcol = 0; //?????\n\t\tfor (j = 1; j <= 4; j++) //???i?????\n\t\t{\n\t\t\tif (max < array[i][j])\n\t\t\t{\n\t\t\t\tmax = array[i][j];\n\t\t\t\tcol = j; //???i????????\n\t\t\t}\n\t\t}\n\t\tfor (k = 0; k <= 4; k++)\n\t\t{\n\t\t\tif (array[k][col] < array[row][col]) //???i??????????????\n\t\t\t{\n\t\t\t\tflag = 0; //??????\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (flag)\n\t\t{\n\t\t\tcout << (row + 1) << \" \" << (col + 1) << \" \" << array[row][col] << endl;\n\t\t\tflag2 = 1; //??????????\n\t\t}\n\t}\n\tif (flag2 == 0) //?????\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36052", "code": "/*\n name:1000012827_1.cpp\n\t\t\t\t author:liuchengdong\n\t\t\t\t created time:20101106\n\t\t\t\t function:output andian\n**/\nint main()\n{\n\tint a[5][5] = {0}, b = 0, i = 0, j = 0, k = 0, g, m = 0; //??????????????\n\tfor(i = 0; i <= 4; i ++) //for????????\n\t\tfor(j = 0; j <= 4; j ++)\n\t\t{\n\t\t\tcin >> b; \n\t\t\ta[i][j] = b; \n\t\t}\n\t\tfor(i = 0; i <= 4; i ++)\n\t\t{\n\t\t\tint c = -1, max = -1e10; //??????max???????????????????-1\n\t\t\tfor(j = 0; j <= 4; j ++) //for??????????\n\t\t\t{\n\t\t\t\tif(max < a[i][j])\n\t\t\t\t{\n\t\t\t\t\tmax = a[i][j]; //???????max\n\t\t\t\t\tc = j; //?????\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(k = 0; k <= 4; k ++) //for??????????????\n\t\t\t{\n\t\t\t\tg = -1; //??g????\n\t\t\t\tif(max > a[k][c])\n\t\t\t\t{\n\t\t\t\t\tg = 0; //???????????g???\n\t\t\t\t\tbreak; //??????\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tint row = -1; //????????-1\n\t\t\t\tif(g == -1) //?k??????????\n\t\t\t\t{ \n\t\t\t\t\trow = i; //???????\n\t\t\t\t\tm = 1; //?????????\n\t\t\t\t\tcout << row + 1 << \" \" << c + 1 << \" \" << max << endl; \n\t\t\t\t} \n\t\t}\n\t\tif(m == 0) //??????????????\n\t\t\tcout << \"not found\" << endl; \n\t\treturn 0; \n}"} +{"label": "73", "index": "36053", "code": "int main()\n{\n\tint a[5][5], k=0, i=0, j=0, M[5]={0}, m[5]={0},t[5]={0};\n\tfor(i=0; i<5; i++)\n\t\tfor(j=0; j<5; j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0; i<5; i++)\n\t{\n\t\tM[i]=a[i][0];\n\t\tfor(j=0; j<5; j++)\n\t\t{\t\n\t\t\tif(M[i]<=a[i][j])\n\t\t\t{\n\t\t\t\tM[i]=a[i][j];\n\t\t\t\tt[i]=j;\t\n\t\t\t}\n\t\t}\t\n\t}\n\tfor(j=0; j<5; j++)\n\t{\n\t\tm[j]=a[0][j];\n\t\tfor(i=0; i<5; i++)\n\t\t{\t\t\t\n\t\t\tif(m[j]>=a[i][j])\n\t\t\t{\n\t\t\t\tm[j]=a[i][j];\t\t\t\t\n\n\t\t\t}\n\t\t}\t\n\t}\n\tfor(i=0; i<5; i++)\n\t\t{\n\t\t\tif(m[t[i]]==M[i])\n\t\t\t{\n\t\t\t\tcout<>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++) //?????????????\n\t{\n\t\tb=a[i][0];\n\t\tfor(j=0;j<5;j++) //??????????\n\t\t{\n\t\t\tif(ba[k][j])\n\t\t\t{\n\t\t\t\tresult=0;\n\t\t\t}\n\t\t}\n\t\tif(result==1) //?????????????????\n\t\t{\n\t\t\tcout<max[i]){\n\t\t\t\tmax[i]=sz[i][j];\n\t\t\t}\n\t\t\tif(sz[i][j]max){\n\t\t\t\tmax=sz[i][j];\n\t\t\t\tm=j;\n\t\t\t}\n\t\t}\n\t\tmin=sz[i][m];\n \tfor(j=0;j<5;j++){\n\t if(sz[j][m]=a[i][t]&&a[i][j]<=a[t][j])\n d++;\n }\n if (d==5)\n {\n printf(\"%d %d %d\\n\",i,j,a[i][j]);\n q=1;\n}\n else if (i==5&&j==5&&q!=1)\n printf(\"not found\");\n d=0;\n }\n}\n\n}\n"} +{"label": "73", "index": "36058", "code": "\nvoid main()\n{\n int i,j,t=0,n=0,m,ii=0,jj=0,p=0;\n int c[5][5];\n for(i=0;i<5;i++)\n {\n for (j=0;j<5;j++)\n scanf(\"%d\",&c[i][j]);\n }\n for(i=0;i<5;i++)\n {\n for(j=1,t=c[i][0];j<5;j++)\n if(t> a[i][j];\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (m < a[i][j])\n\t\t\t{\n\t\t\t\tm = a[i][j];\n\t\t\t\tj1 = j;\n\t\t\t}\n\t\t}\n\t\tfor (k = 0; k <= 4; k++)\n\t\t{\n\t\t\tif (a[k][j1] < m)\n\t\t\t{\n\t\t\t\tp = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ( p == 0)\n\t\t{\n\t\t\tcout << i + 1 << \" \" << j1 + 1 << \" \" << m << endl;\n\t\t\tn = 1;\n\t\t}\n\t\tm = 0;\n\t\tp = 0;\n\t}\n\tif (n == 0)\n\t\tcout << \"not found\" << endl;\n\n\treturn 0;\n}\n\n\n\t\t\n\n\n"} +{"label": "73", "index": "36060", "code": "int main()\n{\n int s[6][6]={0}; //s[6][6]??????????????????????????????\n int i,j,w=0;\n for(i=0;i<=4;i++) //???? \n {\n for(j=0;j<=4;j++)\n {\n cin>>s[i][j]; \n } \n } \n for(i=0;i<=4;i++) //???????? ??????? \n {\n s[i][5]=s[i][0];\n for(j=1;j<=4;j++)\n {\n if(s[i][5]s[j][i])\n s[5][i]=s[j][i]; \n } \n }\n for(i=0;i<=4;i++)\n {\n for(j=0;j<=4;j++)\n {\n if((s[i][j]==s[i][5])&&(s[i][j]==s[5][j]))\n {cout<a[a1][a2])\n {\n break;\n }\n if(a3==4)\n {\n judge1=1;\n }\n }\n for(a4=0;a4<=4;a4++)\n {\n if(a[a4][a2]=x[i])\n\t\t\t{\n\t\t\t\thang[i]=i;\n\t\t\t\tlie[i]=j;\n\t\t\t\tx[i]=number[i][j];\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\ti++;\n\t\tj=0;\n\t}\n\ti=0;\n\tj=0;\n\t\n\tj=lie[0];\n\ty[j]=number[0][j];\n\t\twhile(i<5)\n\t\t{\n\t\t if(number[i][j]=h[x][1])&&(h[x][y]>=h[x][2])&&(h[x][y]>=h[x][0])&&(h[x][y]>=h[x][3])&&(h[x][y]>=h[x][4]))\n {\n\t\t\tif((h[x][y]<=h[0][y])&&(h[x][y]<=h[1][y])&&(h[x][y]<=h[2][y])&&(h[x][y]<=h[3][y])&&(h[x][y]<=h[4][y]))\n\t {n++;printf(\"%d %d %d\",x+1,y+1,h[x][y]);}\n\t\t }\n }\t\n }\n if(n==0){printf(\"not found\");} \n\nreturn 0;\n}\n"} +{"label": "73", "index": "36064", "code": "int main()\n{\n int a[5][5];\n\tint max[5]={0,0,0,0,0},k[5]={0,0,0,0,0},r[5]={0,0,0,0,0};\n\tint i=0,j=0,flag=0,t=0;\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tfor(j=0;j<=4;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tif(max[i]a[j][k[i]])\n\t\t\t{\n\t\t\t\tflag=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag==1)\n\t\t{\n\t\t t++;\n\t\t\tr[t]=max[i];\n\t\t break;\n\t\t}\n\t}\n if(flag==1)\n\t\tcout<=a[i][m]);\n\t\t\t}\n\t\t\tif(f!=0)\n\t\t\t{\n\t\t\t\tint s,t=1;\n\t\t\t\tfor(s=0;s<5;s++)\n\t\t\t\t{\n\t\t\t\t\tt=t*(a[i][j]<=a[s][j]);\n\t\t\t\t}\n\t\t\t\tif(t!=0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36066", "code": "int main()\n{\n int i,j,t,s=0;\n int a[5][5],b[5],c[5],d[5];\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++){\n b[i]=a[i][0];\n for(j=0;j<5;j++){\n if(a[i][j]>=b[i]){\n b[i]=a[i][j];\n d[i]=j;\n }\n }\n \n }\n for(j=0;j<5;j++){\n c[j]=a[0][j];\n for(i=0;i<5;i++){\n if(a[i][j]<=c[j]){\n c[j]=a[i][j];\n }\n }\n }\n for(i=0;i<5;i++){\n t=d[i];\n if(b[i]==c[t]){\n printf(\"%d %d %d\",i+1,t+1,b[i]);\n s=s+1;\n }\n }\n if(s==0){\n printf(\"not found\");\n }\nreturn 0;\n}"} +{"label": "73", "index": "36067", "code": "//********************************\n//*??????? **\n//*?????? 1300012861 **\n//*???2013.11.01 **\n//********************************\nint main()\n{\n\tint a[7][7], i, j, max, l, k, count, s, t;\n\tcount = 0; \n\tfor ( i = 0; i < 5; i++ ) //??????????\n\t{\n\t\tfor ( j = 0; j < 5; j++ )\n\t\t{\n\t\t\tcin >> a[i][j]; \n\t\t}\n\t}\n\tfor ( i = 0; i < 5; i++ ) //\n\t{\n\t\tmax = a[i][0]; //???????????\n\t\tk = 0; \n\t\tfor ( j = 1; j < 5; j++ ) //????\n\t\t{\n\t\t\tif ( a[i][j] > max ) //????????\n\t\t\t{\n\t\t\t\tmax = a[i][j]; //?????\n\t\t\t\tk = j; //????????\n\t\t\t} \n\t\t}\n\t\tfor ( l = 0; l < 5; l++ ) //?????????\n\t\t{\n\t\t\tif ( a[i][k] > a[l][k] ) //????????\n\t\t\t\tbreak; //????\n\t\t} \n\t\tif ( l == 5 ) //???????\n\t\t{\n\t\t\tcount++; //??????\n\t\t\ts = i + 1; //????\n\t\t\tt = k + 1; //????\n\t\t} \n\t}\n\tif ( count != 0 ) //?????\n\t\tcout << s << \" \" << t << \" \" << a[s - 1][t - 1] << endl;\n\telse\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36068", "code": "int main()\n{\n\tint s[5][5],i,k,a=0,b=0,h,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tscanf(\"%d\",&(s[i][k]));\n\t\t}\n\t}\n\tfor(k=0,a=0;k<5;k++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif((s[i][k]<=s[0][k])&&(s[i][k]<=s[1][k])&&(s[i][k]<=s[2][k])&&(s[i][k]<=s[3][k])&&(s[i][k]<=s[4][k]))\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((s[i][k]>=s[i][0])&&(s[i][k]>=s[i][1])&&(s[i][k]>=s[i][2])&&(s[i][k]>=s[i][3])&&(s[i][k]>=s[i][4]))\n\t\t{\n\t\t\ta++;\n\t\t\th=i+1;\n\t\t\tj=k+1;\n\t\t\tprintf(\"%d %d %d\",h,j,s[i][k]);\n\t\t}\n\t}\n\tif(a==0)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36069", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tint row,col,max;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax = 0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>=max) \n\t\t\t{\n\t\t\t\tmax=a[i][j]; row=i; col=j;\n\t\t\t}\n\t\t}\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(max > a[j][col]) break;\n\t\t}\n\t\tif(j==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\",row+1,col+1,max);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"not found\\n\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36070", "code": "int max(int a,int b)\n{\n int x;\n x=a>b ? a:b;\n return x;\n}\nint min(int a,int b)\n{\n int x;\n x=a matrix[i][max] )\n\t\t\t max = j;\n\t }\n\t lineMax[i] = max;\n }\n\n for( i = 0; i < 5; i++ )\n {\n\t int min = 0;\n\t for( j = 1; j < 5; j++ )\n\t {\n\t\t if( matrix[j][i] < matrix[min][i] )\n\t\t\t min = j;\n\t }\n\t columnMin[i] = min;\n }\n \n int record[5];\n int len = 0;\n for( i = 0; i < 5; i++ )\n {\n\t if( columnMin[ lineMax[i] ] == i )\n\t {\n\t\t record[len] = i;\n\t\t len++;\n\t }\n }\n\n if( len == 0 )\n\t printf( \"not found\\n\" );\n else\n {\n\t for( i = 0; i < len; i++ )\n\t {\n\t\t int line = record[i];\n\t\t int column = lineMax[record[i]];\n\t\t printf(\"%d %d %d\\n\",(line+1),(column+1),matrix[line][column]);\n\t }\n }\n return 0;\n}\n"} +{"label": "73", "index": "36072", "code": "\nint main()\n{\n\tint a[5][5];\n\tint i,j,max,min,x,y,n=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{ max=a[i][0];y=0;\n\n\t for(j=0;j<5;j++)\n\t if(a[i][j]>max)\n\t { max=a[i][j]; y=j;}\n\t min=a[i][y];\n\t x=i;\n\t for(j=0;j<5;j++)\n\t\t if(min>a[j][y])\n\t\t { x=j;min=a[j][y];}\n\t if(i==x) { cout<c)\n\tc=b;\n\tif(c>d)\n\td=c;\n\tif(d>e)\n\te=d;\n\tif(e>f)\n\tf=e;\n\treturn f;\n\t\t} \nint mini(int b,int c,int d,int e,int f)\n{\n\tif(bsz[q][p])\n\t\t\t{\n\t\t\t\tmin=sz[q][p];\n\t\t\t}\n\t\t}\n\t\tn[p]=min;\n\t\tmin=100000;\n\t}\n\tfor(int x=0;x<5;x++)\n\t{\n\t\tfor(int y=0;y<5;y++)\n\t\t{\n\t\t\tif(sz[x][y]==m[x]&&sz[x][y]==n[y])\n\t\t\t{\t\t\t\n\t\t\t\ts++;\n\t\t\t\tprintf(\"%d %d %d\",x+1,y+1,sz[x][y]);\n\n\t\t\t}\n\t\t}\n\t}\n\tif(s==0)\n\t\tprintf(\"not found\");\nreturn 0;\n}\n\n"} +{"label": "73", "index": "36075", "code": "/**\n* file homwork.cpp\n* author ??? 1100012722\n* data 2011-10-29\n* description ????\n*/ \nint main()\n{\n int a[6][6];\n int i , j ;\n int k , m ; //????????\n int flag;\n flag = 0;\n for( i = 1 ; i <= 5 ; i ++)\n\tfor( j = 1 ; j <= 5 ; j++)\n\t\tscanf(\"%d\",&a[i][j]);\n \n for(i = 1 ; i <= 5 ; i ++)\n {\t\n\tfor(j = 1 ; j <= 5 ; j++)\n\t{\n\t\tfor(k = 1 ; k <= 5 ; k ++)\n\t\t{\n\t\t\tif(a[i][k] > a[i][j]) break;\n\t\t}\n \t if(k == 6)\n\t\t{\n\t\t\tfor(m = 1 ; m <= 5 ; m ++)\n\t\t\t{\n\t\t\t\tif(a[m][j] < a[i][j]) break;\n\t\t\t}\n\t\t\tif(m == 6)\n\t\t\t{\t\n\t\t\t\tprintf(\"%d %d %d\",i,j,a[i][j]);\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t}\n\t}\n }\n\tif(flag == 0)\n\tprintf(\"not found\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36076", "code": "int main()\n{\n\tint a[5][5],b[5][5],maxh[5],minl[5];\n\tint i,j,k=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t { scanf(\"%d\",&a[i][j]);\n\t\t b[i][j]=a[i][j];}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmaxh[i]=a[i][0];\n\t\tfor(j=1;j<5;j++)\n\t\t\tmaxh[i]=maxh[i]>a[i][j]?maxh[i]:a[i][j];\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tminl[i]=a[0][i];\n\t\tfor(j=1;j<5;j++)\n\t\t\tminl[i]=minl[i]max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tlie=j;\n\t\t\t}\n\t\t}\t\n\t\tmin=a[0][lie];\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[j][lie]> a[i][j];\n }\n for(i=0;i<=4;i++)\n {\n for(j=0,sum[i]=a[i][0],t[i]=0;j<=4;j++)\n {\n if(sum[i]x) {x=a[i];y=i;}\nreturn y;\n}\n\nint main()\n{\nint a[5][5],b[5][5],max[5],min[5],pp=0;\nfor (int i=0;i<5;i++)\n for (int j=0;j<5;j++)\n {scanf(\"%d\",&a[i][j]);b[j][i]=a[i][j];}\nfor (int i=0;i<5;i++)\n {\n max[i]=findmax(a[i]);\n min[i]=findmin(b[i]);\n }\nfor (int i=0;i<5;i++)\n if (i==min[max[i]]) {printf(\"%d %d %d\",i+1,max[i]+1,a[i][max[i]]);pp=1;}\nif (pp==0) printf(\"not found\");\n}\n"} +{"label": "73", "index": "36080", "code": "int max(int a,int b,int c,int d,int e)\n{\n if(a>b&&a>c&&a>d&&a>e)\n return(a);\n else if(b>a&&b>c&&b>d&&b>e)\n return(b);\n else if(c>a&&c>b&&c>d&&c>e)\n return(c);\n else if(d>a&&d>b&&d>c&&d>e)\n return(d);\n else\n return(e);\n}\nint min(int a,int b,int c,int d,int e)\n{\n if(ax) {x=a[i][j]; y=j;}\n }\n for (k=0;k<5;k++)\n {\n if (a[k][y]> a[i][j] ;\n\t}\n\tfor( i1 = 0 ; i1 < 5 ; i1++ )\n\t{\n\t\tfor( j1 = 0 ; j1 < 5 ; j1++ )\n\t\t{\n\t\t\tif( a[i1][j1] >= a[i1][0] && a[i1][j1] >= a[i1][1] && a[i1][j1] >= a[i1][2] && a[i1][j1] >= a[i1][3] && a[i1][j1] >= a[i1][4] ) //????\n\t\t\t\tif( a[i1][j1] <= a[0][j1] && a[i1][j1] <= a[1][j1] && a[i1][j1] <= a[2][j1] && a[i1][j1] <= a[3][j1] && a[i1][j1] <= a[4][j1] ) //????\n\t\t\t\t{\n\t\t\t\t\tcout << i1 + 1 << \" \" << j1 + 1 << \" \" << a[i1][j1] << endl ; //?? \n\t\t\t\t\tm++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif( m != 0 )\n\t\t\t\tbreak;\n\t\t}\n\t\tif( m != 0 )\n\t\t\tbreak;\n\t}\n\tif( m == 0 ) \n\t\tcout << \"not found\" << endl; //??\n\treturn 0;\n}"} +{"label": "73", "index": "36083", "code": "int main()\n{int a[5][5],m,n,w=0;\nfor(m=0;m<=4;m++)\n{\nfor(n=0;n<=4;n++)\nscanf(\"%d\",&a[m][n]);\n}\nfor(m=0;m<=4;m++)\n{\nfor(n=0;n<=4;n++)\n{int j,x;\nj=a[m][0];\nfor(x=1;x<=4;x++)\n{if(a[m][x]>j)\nj=a[m][x];\n}\nint y,q;\ny=a[0][n];\nfor(q=1;q<=4;q++)\n{\nif(a[q][n]=a[i][0] && a[i][j]>=a[i][1] && a[i][j]>=a[i][2] && a[i][j]>=a[i][3] && a[i][j]>=a[i][4])\n\t\t\t{\n\t\t\t\tm=8;\n\t\t\t}\n\t\t if(a[i][j]<=a[0][j] && a[i][j]<=a[1][j] && a[i][j]<=a[2][j] && a[i][j]<=a[3][j] && a[i][j]<=a[4][j])\n {\n\t\t\t\tn=8;\n\t\t\t}\n\n\t\t if(m==8&& n==8)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t t=8;\n\t\t\t}\n\t\t}\n\t}\n \n\tif(t==0)\n\t\tprintf(\"not found\");\n\n\t\t\n\treturn 0;\n}\n"} +{"label": "73", "index": "36085", "code": "int main()\n{\n int n[5][5],i,j,flag,a,b;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&n[i][j]);\n for(i=0,flag=0,b=0;i<5;i++)\n for(j=0;j<5;j++)\n {\n for(a=0;a<5;a++)\n if(n[a][j]n[i][j])\n flag=1;\n if(flag==0)\n {\n b++;\n if(b==1)\n printf(\"%d %d %d\\n\",i+1,j+1,n[i][j]);\n else\n printf(\"%d %d %d\\n\",i+1,j+1,n[i][j]);\n }\n flag=0;\n }\n if(b==0)\n printf(\"not found\");\n return 0;\n}\n"} +{"label": "73", "index": "36086", "code": "int main()\n{\n\tint num[6][6]={0},maxLine[6]={0},minRow[6]={0},i,j;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=5;j++) cin>>num[i][j]; //?????????num??????maxLine?minRow???????????????????????????\n\t}\n\n\n\t\tfor(i=1;i<=5;i++)\n\t{\n\n\t\tfor(j=1;j<=5;j++) \n\t\t{\n\t\t\tif(num[i][j]>=num[i][1] \n\t\t\t&&num[i][j]>=num[i][2] && num[i][j]>=num[i][3] && num[i][j]>=num[i][4] && num[i][j]>=num[i][5])\n\t\t\t\tmaxLine[i]=j;\n\t\t}\n\t} //???????????????????maxLine??\n\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tfor(i=1;i<=5;i++)\n\t\t\t{\n\t\t\t\tif(num[i][j]<=num[1][j] && num[i][j]<=num[2][j] && num[i][j]<=num[3][j] \n\t\t\t\t&& num[i][j]<=num[4][j] && num[i][j]<=num[5][j])\n\t\t\t\t\tminRow[j]=i;\n\t\t\t}\n\t\t} //????????minRow??\n\n\t\tint counter=0; //???counter????????\n\t\tfor(i=1;i<=5;i++)\n\t\t{\n\t\t\tif (i==minRow[maxLine[i]] )\n\t\t\t{\n\t\t\t\tcounter++;\n\t\t\t\tcout<max)\n {\n m=j;\n max=a[i][m];\n }\n }\n b[i][m]++;\n }\n for(j=0;j<5;j++)\n {\n m=0;\n min=a[0][j];\n for(i=1;i<5;i++)\n {\n if(a[i][j]> a[i][j];\n for (i = 0; i <= 4; i ++)\n for (j = 0;j <= 4; j ++)\n\t\t{\n for (l = 0;l <= 4; l ++)\n\t\t\t if(l != j && a[i][l] >= a[i][j] || l != i && a[i][j] >= a[l][j])\n\t\t\t\t break;\n if(l <= 4 )\n\t\t\t\t continue;\n\t\t\t cout << i + 1 << \" \"<< j + 1 << \" \" << a[i][j];\n goto end;\n\t\t}\n cout << \"not found\";\nend:\n return 0;\n}"} +{"label": "73", "index": "36089", "code": "int main()\n{\n\tint a[5][5],max[5]={0},i,j,col[5],t=1;\n\n\tfor (i=0; i < 5; i++)\n\t{\n\t\tfor (j=0; j<5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\n\t\t\tif (a[i][j] > max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tcol[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=0;i<5;i++)\n\t{\n\t\tfor (j=0;j<5;j++)\n\t\t{\n\t\t\tif (a[j][col[i]]> a[i][j];\n\tfor(int i = 0;i < 5;i ++){\n\t\ttmp = a[i][0];\n\t\tx[i] = 0;\n\t\tfor(int j = 1;j < 5;j ++){\n\t\t\tif(a[i][j] > a[i][x[i]])\n\t\t\t\tx[i] = j;\n\t\t}\n\t}\n\tfor(int j = 0;j < 5;j ++){\n\t\ttmp = a[0][j];\n\t\ty[j] = 0;\n\t\tfor(int i = 1;i < 5;i ++){\n\t\t\tif(a[i][j] < a[y[j]][j])\n\t\t\t\ty[j] = i;\n\t\t}\n\t}\n\tfor(int i = 0;i < 5;i ++){\n\t\tif(i == y[x[i]]){\n\t\t\tprintf(\"%d %d %d\\n\",i+1,x[i]+1,a[i][x[i]]);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"not found\\n\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36091", "code": "main()\n{\n\tint a[5][5],b[5][5],e[5][5];\n\tint c[5],d[5];\n\tint i,j,k,f,n=0,s=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t{\n\t\tscanf(\"%d\",&a[i][j]);\n\t\tb[i][j]=a[i][j];\n\t\te[i][j]=a[i][j];\n\t\t}\n\t\n\tfor(k=0;k<5;k++)\n\t{\n\tfor(j=0;j<4;j++)\n\t{\n if(b[k][j]>=b[k][j+1])\n\t {\n\t\t\tf=b[k][j];b[k][j]=b[k][j+1];b[k][j+1]=f;\n\t\t\t}\t\t\n\t\t}\n\t\tc[k]=b[k][4];\n\t\t}\n\t\t\n\tfor(k=0;k<5;k++)\n\t{\n\tfor(j=0;j<4;j++)\n\t{\n if(e[j][k]<=e[j+1][k])\n\t {\n\t\t\tf=e[j][k];e[j][k]=e[j+1][k];e[j+1][k]=f;\n\t\t\t}\t\t\n\t\t}\n\t\td[k]=e[4][k];\n\t\t}\n\t\n\tfor(i=0;i<5;i++)\n\tfor(j=0;j<5;j++)\n\t{\n\t\tif(a[i][j]==c[i]&&a[i][j]==d[j])\n\t\t{\n\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t n=n+1;\t\n\t\t\t\t}\n\t\t\t}\n\tif(n==0)\n\tprintf(\"not found\");\n\t}\n"} +{"label": "73", "index": "36092", "code": "int main()\n{\n\tint a[5][5],i,j,k,n=0,max,min,row,colum;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin >> a[i][j];\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tmax=a[i][0];\n\t\t\trow=i;\n\t\t\tcolum=0;\n\t\t\tfor(j=1;j<5;j++)\n\t\t\tif(a[i][j]>max)\n\t\t\t\t{\n\t\t\t\t\tmax=a[i][j];\n\t\t\t\t\tcolum=j;\n\t\t\t}\n\t\t\t\tmin=max;\n\t\t\t\tfor(k=0;k<5;k++)\n\t\t\t\t\tif(a[k][colum]> a[0][i];\n\tcin.get();\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[1][i];\n\tcin.get();\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[2][i];\n\tcin.get();\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[3][i];\n\tcin.get();\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[4][i];\n\tint max = 0, b = 0, right = 1, flag = 0;\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tmax = 0;\n\t\tright = 1;\n\t\tfor (j = 1; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] > a[i][max])\n\t\t\t\tmax = j;\n\t\t}\n\t\tfor (b = 0; b <= 4; b++)\n\t\t{\n\t\t\tif (a[b][max] < a[i][max])\n\t\t\t{\n\t\t\t\tright = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (right == 1)\n\t\t{\n\t\t\tcout << i + 1 << \" \" << max + 1<< \" \" << a[i][max] << endl;\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36094", "code": "int main()\n{\n\tint a[5][5];\n\tint (*p)[5];\n\tp=a;\n\tint max[5][1];\n\tint min[5][1];\n\tint *pmax[5]={max[0],max[1],max[2],max[3],max[4]};\n\tint *pmin[5]={min[0],min[1],min[2],min[3],min[4]};\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin >> *(*(p+i)+j);\n\tfor(i=0;i<5;i++)\n\t{\n\t\t*pmax[i]=*(*(p+i)+0);\n\t\t*pmin[i]=*(*(p+0)+i);\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(*pmax[i]<*(*(p+i)+j))\n\t\t\t\t*pmax[i]=*(*(p+i)+j);\n\t\t\tif(*pmin[i]>*(*(p+j)+i))\n\t\t\t\t*pmin[i]=*(*(p+j)+i);\n\t\t}\n\t}\n\tint flag=0;\n\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tfor(j=0;j<5;j++)\n\t\t {\n\t\t\tif(*pmax[i]==*pmin[j]&&*pmax[i]==*(*(p+i)+j))\n\t\t\t{\n\t\t\t\tcout << i+1 << \" \" << j+1 << \" \" << *(*(p+i)+j) << endl;\n\t\t\t flag=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t }\n\t\t\tif(flag==1)\n\t\t\t\tbreak;\n\t}\n\tif(flag==0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36095", "code": "int main()\n{\n\tint a[6][6], b[6];\n\tint i, j, k, m = 0, n, t;\n\tfor (i = 1; i < 6; i++)\n\t{\n\t\tfor(j = 1; j < 6; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor (k = 1; k < 6; k++)\n\t{\n\t\tb[k] = a[k][1];\n\t}\n\tfor (i = 1; i < 6; i++)\n\t{\n\t\tt = 0;\n\t\tfor (j = 1; j < 6 ; j++)\n\t\t{\n\t\t\tif (b[i] <= a[i][j])\n\t\t\t{\n\t\t\t\tb[i] = a[i][j];\n\t\t\t\tn = j;\n\t\t\t}\n\t\t}\n\t\tfor (k = 1; k < 6; k++)\n\t\t{\n\t\t\tif (b[i] > a[k][n])\n\t\t\t{\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t}\n\t\tif (t == 0)\n\t\t{\n\t\t\tcout << i << \" \" << n << \" \" << b[i];\n\t\t\tm = 1;\n\t\t}\n\t}\n\tif (m == 0)\n\t{\n\t\tcout << \"not found\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36096", "code": "int main()\n{\n int a[5][5],i,j,k,s,h;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n for(k=0;k<5;k++)\n {\n if(a[i][j]a[s][j])\n break;\n }\n if(s==5)\n {printf(\"%d %d %d\",i+1,j+1,a[i][j]);h=1;}\n }\n }\n }\n if(h!=1)\n printf(\"not found\");\n getchar();\n getchar();\n return 0;\n}\n"} +{"label": "73", "index": "36097", "code": "int main()\n{\n\tint i,j,st,err;\n\tint a[5][5];\n\tint max[5];\n\tint p[5];\n\terr=1;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax[i]=a[i][0];\n\t\tp[i]=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(max[i]a[j][p[i]])\n\t\t\t\t\tst=1;\n\t\t\t}\n\t\t\tif(st==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\",i+1,p[i]+1,max[i]);\n\t\t\t\terr=0;\n\t\t\t}\n\t}\n\tif(err==1)\n\t\tprintf(\"not found\");\n\n\n\n\n\treturn 0;\n}\n\n\n\n\t\t\n"} +{"label": "73", "index": "36098", "code": "///********************************\n//*?????(11-5) ???? **\n//*?????? 1300012745 **\n//*???2013.11.2 **\n//********************************\nint main()\n{\n\tint a[5][5], b[5]={5}, c[5]={5}, //a[5][5]??????b[5],c[5]??????????????????????,?b[5]?c[5]???i?????????\n\t\ti, j, max, min, jm = 0, im = 0, k=0; //i,j??????max,min???????????????\n\tfor (i = 0; i <= 4; i++)\n\t\tfor (j = 0; j <= 4; j++) //????\n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tmax = a[i][0]; //??????????????\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] >= max) //???????????????????????????jm?????????\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tjm = j;\n\t\t\t}\n\t\t}\n\t\tb[i]=jm; //b[i]????????????????????jm?\n\t}\n\tfor (j = 0; j <= 4; j++)\n\t{\n\t\tmin = a[0][j]; //?????????????????\n\t\tfor (i = 0; i <= 4; i++) \n\t\t{\n\t\t\tif (a[i][j] <= min) //???????????????????????????jm?????????\n\t\t\t{\n\t\t\t\tmin = a[i][j];\n\t\t\t\tim = i;\n\t\t\t}\n\t\t}\n\t\tc[j]=im; //c[j]????????????????????im?\n\t}\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tif (c[b[i]]==i) //?????????????????????????????????c[b[i]]==i\n\t\t{\n\t\t\tcout << i+1 << \" \" << b[i]+1 << \" \" << a[i][b[i]]; //????0????????????1?????+1\n\t\t\tk++;\n\t\t}\n\t}\n\tif (k == 0) //??k??0????????????\n\t\tcout << \"not found\";\n\treturn 0;\n}\n\n\n\n\n\n\n"} +{"label": "73", "index": "36099", "code": "int main(){\nint sz[5][5];\nint zd[5];\nint zx[5];\nint s,p=0,a,b;\nfor(a=0;a<5;a++){\n\tfor(b=0;b<5;b++){\n\t\tscanf(\"%d\",&sz[a][b]);\n\t}\n}\n\tfor(a=0;a<5;a++){\n\t\ts=0;\n\tfor(b=0;b<5;b++){\n\t\n\tif(sz[a][b]>=s) {\n s=sz[a][b];\n\tzd[a]=s;\n\t\n\t}\n\t\n\t}\n\t}\n\tfor(b=0;b<5;b++){\n\t\ts=100000;\n\tfor(a=0;a<5;a++){\nif(sz[a][b]<=s) \n{s=sz[a][b];\n\tzx[b]=s;\n}\n\t}\n\t}\n\nfor(a=0;a<5;a++){\n\tfor(b=0;b<5;b++){\n\t\tif(sz[a][b]==zd[a]&&sz[a][b]==zx[b]){\n\t\t\tprintf(\"%d %d %d\",a+1,b+1,sz[a][b]);\n\t\tp++;\n\t}\n}\n}\n\tif(p==0)\n\t\tprintf(\"not found\");\n\n return 0;\n}\n\n"} +{"label": "73", "index": "36100", "code": "int main()\n{\n int a[10][10],i,j,cnt = 0;\n for (i = 1;i <= 5;i++)\n for (j = 1;j <= 5;j++)\n {\n cin >> a[i][j];\n }\n for (i = 1;i <= 5;i++)\n for (j = 1;j <= 5;j++)\n {\n if (a[i][j] <= a[1][j] && a[i][j] <= a[2][j] && a[i][j] <= a[3][j] && a[i][j] <= a[4][j] && a[i][j] <= a[5][j]\n && a[i][j] >= a[i][1] && a[i][j] >= a[i][2] && a[i][j] >= a[i][3] && a[i][j] >= a[i][4] && a[i][j] >= a[i][5])\n {\n cout << i << \" \" << j << \" \" << a[i][j] << endl;\n cnt++;\n }\n }\n if (cnt == 0)\n cout << \"not found\" << endl;\n return 0;\n}"} +{"label": "73", "index": "36101", "code": "int main()\n{\n\tint sz[5][5],x,y,i,j,a=0;\n\tfor(x=0;x<5;x++) for(y=0;y<5;y++) scanf(\"%d\",&sz[x][y]);\n\tfor(x=0;x<5;x++) for(y=0;y<5;y++)\n\t{\n\t\tfor(j=0;j<5;j++) if(sz[x][y]sz[i][y]) break;\n\t\tif(i==5)\n\t\t{\n\t\t\ta=1;\n\t\t\tprintf(\"%d %d %d\\n\",x+1,y+1,sz[x][y]);\n\t\t\ti=0;\n\t\t\tj=0;\n\t\t}\n\t}\n\tif(a==0) printf(\"not found\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36102", "code": "main()\n{\n\tint *a[5];\n\tint *b;\n\tb=(int *)malloc(5*sizeof(int));\n\tint i,j,k,l=0,m=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\ta[i]=(int *)malloc(5*sizeof(int));\n\t\t*(b+i)=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",*(a+i)+j);\n\t\t\tif(*(b+i)<*(*(a+i)+j))\n\t\t\t\t*(b+i)=*(*(a+i)+j);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tif(*(b+i)==*(*(a+i)+j))\n\t\t\t{\n\t\t\t\tfor(k=0;k<5;k++)\n\t\t\t\t\tif(*(b+i)<=*(*(a+k)+j))\n\t\t\t\t\t\tl++;\n\t\t\t\tif(l==5)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,*(b+i));\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t\tl=0;\n\t\t\t}\n\tif(m==0)\n\t\tprintf(\"not found\");\n}"} +{"label": "73", "index": "36103", "code": "int main()\n{\n\tint a[5][5], i, j, I, J, t = 0 ;\n\tfor (i = 0 ; i <= 4 ; i ++)\n\t\tfor (j = 0 ; j <= 4 ; j ++)\n\t\t\tcin >> a[i][j] ;\n\tfor (i = 0 ; i <= 4 ; i ++)\n\t{\n\t\tif (t != 0)\n\t\t\tbreak ;\n\t\tfor (j = 0 ; j <= 4 ; j ++)\n\t\t\tif (a[i][j] > t)\n\t\t\t\tt = a[i][j], I = i, J = j ;\n\t\tfor (int k = 0 ; k <= 4 ; k ++)\n\t\t\tif (a[k][J] < t)\n\t\t\t\tt = 0 ;\n\t}\n\tif (t == 0)\n\t\tcout << \"not found\" ;\n\telse\n\t\tcout << I + 1 << \" \" << J + 1 << \" \" << t ;\n\t\n\treturn 0 ;\n}"} +{"label": "73", "index": "36104", "code": "int main()\n{\n int a[5][5],i,j,m,n,b=1;\n for(i=0;i<5;i++)\n scanf(\"%d %d %d %d %d\",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]a[0][j]) {b=0;continue;}\n if(a[i][j]>a[1][j]) {b=0;continue;}\n if(a[i][j]>a[2][j]) {b=0;continue;}\n if(a[i][j]>a[3][j]) {b=0;continue;}\n if(a[i][j]>a[4][j]) {b=0;continue;}\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);\n b=1;\n break;\n }\n if(b==1) break;\n } \n if(b==0)\n printf(\"not found\");\n \n \n}\n"} +{"label": "73", "index": "36105", "code": "int main()\n{\n\tint a[5][5];\n\tint temp;\n\tint hang_max[5],lie_min[5];\n\tint flag=1;\n\tfor(int i=0;i<5;i++)\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\tfor(int i=0;i<5;i++)\n\t{\n\t\thang_max[i]=a[i][0];\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j] > hang_max[i])\n\t\t\t{\n\t\t\t\thang_max[i]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(int j=0;j<5;j++)\n\t{\n\t\tlie_min[j]=a[0][j];\n\t\tfor(int i=0;i<5;i++)\n\t\t{\n\t\t\tif( a[i][j] < lie_min[j] )\n\t\t\t{\n\t\t\t\tlie_min[j]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(int i=0;i<5;i++)\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif( (a[i][j] == hang_max[i]) && (a[i][j] == lie_min[j]) )\n\t\t\t{\n\t\t\t\tcout<a[j][i])\n\t\t\t{\n\t\t\t\tmin=a[j][i];\n\t\t\t\ty[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tint bl=1;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(x[i]==j&&y[j]==i)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t\tbl=0;\n\t\t\t}\n\t\t}\n\t}\n\tif(bl)\n\t\tprintf(\"not found\\n\");\n}\n"} +{"label": "73", "index": "36107", "code": "int min(int a,int b,int c,int d,int e)\n{\n\tint min;\n\tmin=a>a[i][j];\n for(i=0;i<5;i++)\n {\n j=a[i][0]>a[i][1]?0:1;\n j=a[i][j]>a[i][2]?j:2;\n j=a[i][j]>a[i][3]?j:3;\n j=a[i][j]>a[i][4]?j:4;\n if(a[i][j]==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j])){\n \t\tcout<>a[i][j];//????????????\n\tint big=0,small=1,line,row;\n\tfor (i=1;i<6;i++)//???????\n\t{\n\t\tline=i;row=1;\n\t\tbig=a[i][1];\n\t\tfor (j=2;j<6;j++)\n\t\t{\n\t\t\tif (a[i][j]>big)\n\t\t\t\t{\n\t\t\t\tbig=a[i][j];\n\t\t\t\trow=j;\n\t\t\t\t}//??????????\n\t\t}\n\t\tfor (j=1;j<6;j++)\n\t\t{\n\t\t\tif (a[j][row]>a[i][j];\n for(int k=1;k<=5;k++) \n for(int l=1;l<=5;l++)\n for(int i=1;i<=5;i++)\n {\n if(i==l) continue;\n if(a[k][l]a[i][l])\n c[k][l]=c[k][l]+1;\n }\n for(int i=1;i<=5;i++)\n for(j=1;j<=5;j++) \n \n if(b[i][j]+c[i][j]==0)\n {\n cout<max)\n\t\t\t{ \n\t\t\t max=a[i-1][j-1];\n\t\t\t address[i-1][0]=i-1;\n\t\t\t address[i-1][1]=j-1;\n\t\t\t \n\t\t\t}\n\t\t}\n\t\n\t}\n\n\tfor (i=1;i<=5;i++)\n\t{ int hang,lie;\n\t\tfor (j=1;j<=5;j++)\n\t\t{ \n\t\t\thang=address[i-1][0];\n\t\t\tlie=address[i-1][1];\n\t\t\tif (a[j-1][lie]=a[i][q])\n\t\t\t\t{\n\t\t\t\t\tcount1++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count1==N)\n\t\t\t{\n\t\t\t\tcount2=0;\n\t\t\t\tfor (k=0;ka[h][l]) return 0;//?????number\n for (i=0;i<5;i++)//scan hang\n if (a[i][l]t)\n\t\t\t{\n\t\t\tt=a[m][n];\n\t\t\tp=n;\n\t\t\t}\n\t\t}\n\t\tk=1;\n\t\tfor(l=0;l<5;l++)\n\t\t{\n\t\t\tif(a[l][p]> a[i-1][j-1]; //??????\n\t\t}\n\t}\n\tfor(int m = 1; m <= 5; m++) //?????\n\t{\n\t\tfor (int n = 1; n <= 5; n++)\n\t\t{\n\t\t\t//???????\n\t\t\tif(a[m-1][n-1] >= a[m-1][0] && a[m-1][n-1] >= a[m-1][1] \n\t\t\t\t&& a[m-1][n-1] >= a[m-1][2] && a[m-1][n-1] >= a[m-1][3] \n\t\t\t\t&& a[m-1][n-1] >= a[m-1][4] && a[m-1][n-1] <= a[0][n-1] \n\t\t\t\t&& a[m-1][n-1] <= a[1][n-1] && a[m-1][n-1] <= a[2][n-1] \n\t\t\t\t&& a[m-1][n-1] <= a[3][n-1] && a[m-1][n-1] <= a[4][n-1])\n\t\t\t{\n\t\t\t\tcout << m << \" \" << n << \" \" << a[m-1][n-1]; //??? ????????\n\t\t\t num = num + 1; //????\n\t\t\t}\n\t\t}\n\t}\n\tif(num == 0) cout << \"not found\"; //????????not found\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36115", "code": "\nint main()\n{\n\tint flag = 0, c = 0, max = 0, l, h;\n\tint a[5][5];\n\tfor (int i = 0; i < 5; i++)\n\t\tfor (int j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\tfor (int i = 0; i <= 4; i++)\n\t{\n\t\tc = 0;\n\t\tl = 0;\n\t\tmax = 0;\n\t\tfor (int j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tl = j;\n\t\t\t}\n\t\t}\n\t\n\t\tfor (int k = 0; k <= 4; k++)\n\t\t{\n\t\t\tif (max > a[k][l])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tc++;\n\t\t}\n\t\tif (c == 5)\n\t\t{\n\t\t\tcout << i + 1 << \" \" << l + 1 << \" \" << max << endl;\n\t\t\tflag = 1; \n\t\t}\n\t}\n\tif (flag == 0)\n\t{\n\t\tcout << \"not found\" << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "73", "index": "36116", "code": "int main()\n{\nint a[5][5],max=0,row=0,line=0,judge=0;\n for(int i=0;i<5;i++)\n {\n for(int j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]); \n }\n for(int i=0;i<5;i++)\n {\n int j=0;\n max=a[i][j];\n line=i;\n row=j;\n for(int j=0;j<5;j++)\n {\n \n for(int k=j+1;k<5;k++)\n {\n if(maxa[j][m[i]])\n {\n x=0;\n break;\n }\n }\n if(x==1) \n { printf(\"%d %d %d\\n\",i+1,m[i]+1,n[i]);\n y=1;}\n x=1;\n }\n if(y==0)\n printf(\"not found\");\n \n}\n"} +{"label": "73", "index": "36118", "code": "int main()\n{int a[5][5];\nint i,j,max,k,q,r=0;\nfor(i=0;i<5;i++)\n\tfor(j=0;j<5;j++)\n\t\tcin>>a[i][j];\nfor(i=0;i<5;i++)\n{max=a[i][0];q=0;\nfor(j=1;j<5;j++)\n{if(a[i][j]>max)\n\t{max=a[i][j];q=j;}}\n for(k=0;k<5;k++)\n\t {if(k==i)\n\t\t continue;\n\t if(a[k][q]<=a[i][q])\n\t\t break;\n if(a[k][q]>a[i][q])\n continue;}\n if(k==5)\n { cout<max){\n max=a[i][j];\n row=i;\n col=j;\n }\n }\n \n \n for(k=1;k<=5;k++) {\n if(a[k][col]>a[i][j];\n\t\t\tif(a[i][j]>max[i])max[i]=a[i][j];\n\t\t\t}//??????????????????max[i]?? \n\t\t}\n\t\tfor(int i=0;i<5;i++){\n\t\t\tfor(int j=0;j<5;j++){\n\t\t\t\tif(a[i][j]==max[i])b[i]=j;\n\t\t\t\t}//???????????????b[i]?? \n\t\t\t}\n\t\t\tint andian=0;//?andian?????????? \n\t\t\tfor(int x=0;x<5;x++){//??x????????? \n\t\t\t\tint num=0;//??num??? \n\t\t\t\tfor(int i=0;i<5;i++){\n\t\t\t\t\tif( (i!=x) && (a[i][b[x]]<=max[x]) )break;\n\t\t\t\t\t\telse num++;//?????????max[x]??num++?i==x???num++ \n\t\t\t\t\t}\n\t\t\t\t\tif(num==5){\n\t\t\t\t\t\tandian=1; \n\t\t\t\t\t\tcout<>a[i][j]; //??a[][]\n\t\t}\n\t}\n\tfor(i=0;i<5;i++) //for?? ???\n\t{\n\t\tfor(j=0;j<5;j++) //for?? ???\n\t\t{\n\t\t if(a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]>=a[i][0]&&\n\t\t\t\t a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j]&&a[i][j]<=a[0][j])//?????\n\t\t {\n\t\t\t \t\t\t cout<a[i][j])\n\t\t\t\tj=k;\n\t\tfor(k=0;kmax)\n{max=a[i][j];\nt=j;\n}\n}\nmin=max;\nfor(j=0;j<5;j++)\n{\nif(a[j][t]temp) {temp=a[i][j];tempi=i;tempj=j;}}//???????????\n flag=1;\n for(r=0;r<5;r++)\n if (a[tempi][tempj]>a[r][tempj]) flag=0; //??????????\n if(flag==1){printf(\"%d %d %d\",tempi+1,tempj+1,a[tempi][tempj]);flag1=1;}//????????,?????1\n }\n if(flag1==0) printf(\"not found\");}//????????????\n \n \n"} +{"label": "73", "index": "36126", "code": "int main()\n{\n int a[5][5];\n int cow,col,i,j,k,t,max,min,cow1,t1,m=0;\n for(cow=0;cow<=4;cow++){\n for(col=0;col<=4;col++){\n scanf(\"%d\",&a[cow][col]); \n }\n }\n for(cow=0;cow<=4;cow++){\n max=a[cow][0];\n for(i=0;i<=4;i++){\n if(a[cow][i]>=max){\n max=a[cow][i];\n t=i;//a[cow][t]??????????????i???? \n }\n } \n k=0; \n min=a[cow][t];\n for(j=0;j<=4;j++){ \n if(a[j][t]<=min&&j!=cow)//??????? \n k=1;\n } \n if(k==0){\n cow1=cow+1;\n t1=t+1; \n m=1 ; \n printf(\"%d %d %d\\n\",cow1,t1,a[cow][t]);\n } \n } \n if(m==0)\n printf(\"not found\");\n return 0; \n} \n\n "} +{"label": "73", "index": "36127", "code": "int max(int x1,int x2,int x3,int x4,int x5)\n{\n if (x1x2) x1=x2;\n if (x1>x3) x1=x3;\n if (x1>x4) x1=x4;\n if (x1>x5) x1=x5;\n return x1;\n}\nmain ()\n{ \n int a[5][5];\n int i,j;\n for (i=0;i<5;i++)\n for (j=0;j<5;j++)\n {\n scanf (\"%d\",&a[i][j]); \n }\n int m=0; \n for (i=0;i<5;i++)\n for (j=0;j<5;j++)\n {\n int p=max (a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]),q=min (a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);\n if (p==q&&p==a[i][j])\n { \n printf (\"%d %d %d\",i+1,j+1,a[i][j]);\n m=1;\n } \n }\n if (m==0)\n printf (\"not found\"); \n} \n"} +{"label": "73", "index": "36128", "code": "int main()\n{\n\tint z[6][6];\n\tint a,b,c,e,f;\n\tf=0;\n\tfor (a=1;a<=5;a++)\n\t{\n\t\tfor(b=1;b<=5;b++)\n\t\t{\n\t\t\tscanf(\"%d\",&z[a][b]);\n\t\t}\n\t}\n for (a=1;a<=5;a++)\n\t{\n\t\tfor(b=1;b<=5;b++)\n\t\t{\n\t\t\te=0;\n\t\t\tfor(c=1;c<=5;c++)\n\t\t\t{\n\t\t\t\tif (z[a][b]<=z[a][c]) e+=1;\n\t\t\t\tif (z[a][b]>=z[c][b]) e+=1;\n\t\t\t}\n\t\t\tif (e==2) \n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",a,b,z[a][b]);\n\t\t\t\t\tf=1;\n\t\t\t\t}\n\t\t}\n\t}\n\tif (f==0) printf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36129", "code": "int main()\n{\n\tint col[5],row[5];\n\tint i,j,max,min;\n\tint p[5][5];\n\tfor (i=0;i<5;i++)\n\t\tfor (j=0;j<5;j++)\n\t\t\tcin>>*(*(p+i)+j);\n\tfor (i=0;i<5;i++)\n\t{\n\t\tmax=0;min=2100000000;\n\t\tfor (j=0;j<5;j++)\n\t\t{\n\t\t\tif (max<*(*(p+i)+j))\n\t\t\t{\n\t\t\t\tmax=*(*(p+i)+j);\n\t\t\t\t*(row+i)=j;\n\t\t\t}\n\t\t\tif (min>*(*(p+j)+i))\n\t\t\t{\n\t\t\t\tmin=*(*(p+j)+i);\n\t\t\t\t*(col+i)=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=0;i<5;i++)\n\t\tif (*(col+*(row+i))==i)\n\t\t{\n\t\t\tcout<=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n\t\t\t{\n\t\t\t\tif(a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t\t\tf=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(f==0)\n\t\tprintf(\"not found\");\n\treturn 0;\n}\n\n\t\t\t\t"} +{"label": "73", "index": "36131", "code": "int main()\n{\n int num[6][6];\n int i, j, k, l = 0;\n for ( i = 1; i < 6; i++ )\n for ( j = 1; j < 6; j++ )\n cin >> num[i][j];\n int max, row, line;\n for ( i = 1; i < 6; i++ )\n {\n max = num[i][1];\n line = 1;\n for ( j = 1; j < 6; j++ )\n {\n if ( max < num[i][j] )\n {\n max = num[i][j];\n line = j;\n }\n }\n int p = 0;\n for ( k = 1; k < 6; k++ )\n {\n if ( max > num[k][line] )\n {\n p = 1;\n break;\n }\n }\n if ( p == 0 )\n {\n cout << i << \" \" << line << \" \" << num[i][line] << endl;\n l = 1;\n }\n }\n if ( l == 0 )\n cout << \"not found\" << endl;\n return 0;\n}\n"} +{"label": "73", "index": "36132", "code": "int main()\n{\n int a[5][5],max,h,l,sum,s=0;\n int i,j,k;\n \n for(i=0;i<5;i++){\n\t for(j=0;j<5;j++){\n\t\t scanf(\"%d\",&a[i][j]);\n\t }\n }\n \n for(i=0;i<5;i++){\n\t \n\t sum=0;\n\t max=a[i][0];\n\t h=i;\n\t l=0;\n for(j=0;j<5;j++){\n\t\t if(max> m[i][k] ;\n\tfor ( i = 1 ; i <= 5 ; i++ )\n\t{\n h[i] = m[i][1] ;\n\t\tx1[i] = i ;\n\t\ty1[i] = 1 ;\n\t\tfor ( k = 1 ; k <= 5 ; k++ ) //h[i]???????\n\t\t{ \n\t\t\t\n\t\t\tif ( m[i][k] > h[i] )\n\t\t\t{\n\t\t\t\th[i] = m[i][k] ;\n\t\t\t\tx1[i] = i ; //x1?????\n\t\t\t\ty1[i] = k ; //y1?????\n\t\t\t}\n\t\t}\n\t}\n\tfor ( k = 1 ; k <= 5 ; k++ )\n\t{\n\t\tl[k] = m[1][k] ; //l[k]???????\n\t\tx2[k] = 1 ;\n\t\ty2[k] = k ;\n\t\tfor ( i = 2 ; i <= 5 ; i++ )\n\t\t{\n\t\t\tif ( m[i][k] < l[k] )\n\t\t\t{\n\t\t\t\tl[k] = m[i][k] ;\n\t\t\t\tx2[k] = i ; //??????\n\t\t\t\ty2[k] = k ;\n\t\t\t}\n\t\t}\n\t}\n\tfor ( n = 1 ; n <= 5 ; n++ )\n {\n\t\tif ( h[n] == l[y1[n]] )\n\t\t\tif ( x1[n] == x2[y1[n]] )\n\t\t\t\tif ( y1[n] == y2[y1[n]] )\n\t\t\t\t{\n\t\t\t\t\tcout << x1[n] << \" \" << y1[n] << \" \" << h[n] ;\n\t\t\t\t\tj++ ;\n\t\t\t\t}\n\t}\n\tif ( j == 0 ) //j???????0?????\n\t\tcout << \"not found\" << endl ;\n\treturn 0 ;\n}"} +{"label": "73", "index": "36134", "code": "int main()\n{\nint a[5][5],s,max[5],min[5];\ns=0;\nfor(int i=0;i<5;i++){\n for(int j=0;j<5;j++){\n scanf(\"%d\",&a[i][j]);\n }\n }\nmax[0]=a[0][0];\nmax[1]=a[1][0];\nmax[2]=a[2][0];\nmax[3]=a[3][0];\nmax[4]=a[4][0];\nmin[0]=a[0][0];\nmin[1]=a[0][1];\nmin[2]=a[0][2];\nmin[3]=a[0][3];\nmin[4]=a[0][4];\nfor(int i=0;i<5;i++){\n for(int j=0;j<5;j++){\nif(a[i][j]>max[i]){\n max[i]=a[i][j];\n }\n if(a[i][j]>a[i][j];}}\n int *p;\n p=&a[0][0];\n n=0;\n for(;p<&a[0][0]+25;p++)\n { m=0;\n t=(p-&a[0][0])%5;\n k=(p-&a[0][0])/5;\n\t for(i=0;i<=4;i++)\n\t { \n\t if((*(*(a+i)+t))<*p)\n\t {m++;}\n\t if( *(*(a+k)+i)>*p)\n\t {m++;}\n\t \n\t } if(m==0)\n\t\t { t++; k++;\n\t\t\t cout<t) {t=a[i][j];m=j;}\n }\n b[i][m]=t;\n }\n for (j=0;j<5;j++)\n {\n t=a[0][j];m=0;\n for (i=0;i<5;i++)\n {\n if (a[i][j]>a[i][j];\n\t\t}\n\t}\n\n\n\n\n\nfor (i=0;i<=4;i++)\n{\n\tfor (j=0;j<=4;j++)\n\t{\n if (maxfinding)\n\t\t\t{\n\t\t\t\tfinding=a[i][j];\n\t\t\t\tcol=j;\n\t\t\t}\n\t\t}\n\t\tflag[i]=1;\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif(a[k][col]max)\n {\n max=a[i][j];\n maxj=j;\n }\n f=1;\n for(k=0;ka[k][maxj])\n {f=0;continue;}\n if(f){printf(\"%d %d %d\",i+1,maxj+1,a[i][maxj]);break;}\n \n\n}\nif(!f) printf(\"not found\");\nreturn 0;\n\n}"} +{"label": "73", "index": "36141", "code": "int main()\n{\n\tint a[5][5],max[5],mi[5];\n\tint i,j,k,m,n,x,y;\n\tk=0;m=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tm=0;\n\t\tfor(i=0;i<5;i++)\n\t{\n\t\tif(ma[i][j])\n\t\tn=a[i][j];}\n\t\tmi[j]=n;\n\t}\n\t\n\t\n\t\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]==max[i]&&a[i][j]==mi[j])\n\t\t\t{\n\t\t\t\t\n\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\tk++;}\n\t\t}\n\t}\n\tif(k==0)\n\tprintf(\"not found\");\n\t\n\t\n}"} +{"label": "73", "index": "36142", "code": "int main()\n{\n\tint i,j,a[6][6],max[6]={0},min[6]={0,100000,100000,100000,100000,100000},sum=0;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tif(a[i][j]max[i])\n\t\t\t\tmax[i]=a[i][j];\n\t\t}\n\t}\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tif(a[i][j]==max[i]&&a[i][j]==min[j])\n\t\t\t{\n\t\t\t\tsum++;\n\t\t\t\tcout<=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]>=a[i][5]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j]&&a[i][j]<=a[5][j])\n printf(\"%d %d %d\",i,j,a[i][j]),ok = 0;\n if (ok)\n printf(\"not found\");\n}"} +{"label": "73", "index": "36144", "code": "int main()\n{\n\tint a[5][5],i,j,h,k,q,flag=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n for(h=0;h<5;h++)\n\t{ \n\t\tint da=a[h][0],\t n2=0;\n\t for(k=0;k<5;k++) \n\t\t {if(daa[q][n2] ) {n1=q; xiao=a[q][n2];}}\n\n\t\t if(h-n1==0) {\n\t\t\t cout<max)\n max=a[i][m];}\n min=a[i][j];\n for(n=0;n<5;n++)\n {if(a[n][j]=sz[i][0]&&sz[i][k]>=sz[i][1]&&sz[i][k]>=sz[i][2]&&sz[i][k]>=sz[i][3]&&sz[i][k]>=sz[i][4]){\n\t\t\t\tif(sz[i][k]<=sz[0][k]&&sz[i][k]<=sz[1][k]&&sz[i][k]<=sz[2][k]&&sz[i][k]<=sz[3][k]&&sz[i][k]<=sz[4][k]){\n\t\t\t\t\tprintf(\"%d %d %d\",(i+1),(k+1),sz[i][k]);\n m=0;\n\t\t}\n\t}\n\t\t}\n\t}\n if(m){\n printf(\"not found\"); \n} \n\t\t\treturn 0;\n}\n"} +{"label": "73", "index": "36147", "code": "//???2010?11?5?\n//???1000010586_???\n//???????\n\nint main()\n{\n\tint i , j , k , m , p , q , num , ans = 0; //????\n\tint a[5][5] , max[5] = {0}, s[5]; //??3??? \n\tfor ( p = 0 ; p <= 4 ; p++ )\n\t{\n\t\tfor ( q = 0 ; q <= 4 ; q++ ) //????\n\t\t{\n\t\t\tcin >> a[p][q];\n\t\t}\n\t}\n\tfor ( i = 0 ; i <= 4 ; i++ ) //????????\n\t{\n\t\tmax[i] = a[i][0];\n\t\ts[i] = 0;\n\t\tfor( j = 1 ; j <= 4 ; j++)\n\t\t{\t\n\t\t\t if ( a[i][j] >= max[i] )\n\t\t\t {\n\t\t\t\tmax[i] = a[i][j] ;\n\t\t\t\ts[i] = j; //????\n\t\t\t }\n\t\t} j = 0;\n\t}\n\tfor ( k = 0 ; k <= 4 ; k++) //???????\n\t{\n\t\tnum = 0;\n\t\tfor ( m = 0 ; m <= 4 ; m++ )\n\t\t{\n\t\t\tif ( max[k] > a[m][s[k]])\n\t\t\tnum = 1;\n\t\t}\n\t\t\tif ( num == 0 )\n\t\t\t{ cout << k+1 << \" \" << s[k]+1 << \" \" << max[k] << endl;\n\t\t\tans++;}\n\t\t\n\t}\n\tif ( ans == 0 )\n\t\tcout << \"not found\" << endl; //???????\n\treturn 0;\n}"} +{"label": "73", "index": "36148", "code": "int main()\n{\n\tint num[5][5];\n\tint i,j;\n\tint max[5],min[5];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>num[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax[i]=0;\n\t\tmin[i]=0;\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax[i]=num[i][0];\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(num[i][j]>max[i])\n\t\t\t\tmax[i]=num[i][j];\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tmin[j]=num[0][j];\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(num[i][j]=a[j][m]) n=j;\n\t\t}\n\t\tif(p==n)\n\t\t{\n\t\t\tt++;\n\t\t\tprintf(\"%d %d %d\",n+1,m+1,a[n][m]);\n\t\t}\n\t}\n\tif(t==0) printf(\"not found\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36150", "code": "int main()\n{\n int a[6][6] = {0}, maxI[6]={0}, JofmaxI[6]={0},\n minJ[6]={0}, n=0;\n int i, j;\n for (i=1;i<=5;i++)\n {\n for (j=1;j<=5;j++)\n {\n cin >> a[i][j];\n if (a[i][j]>maxI[i])\n {\n maxI[i]=a[i][j];\n JofmaxI[i]=j;\n }\n }\n }\n for (j=1;j<=5;j++)\n {\n minJ[j]=a[1][j];\n for (i=2;i<=5;i++)\n {\n if (a[i][j]> a[i][j];\n }\n for(int i=0;i<5;i++)\n {\n for(int j=5;j<10;j++)\n a[i][j]=a[i][j-5];\n }\n for(int i=0;i<5;i++)\n {\n for(int j=5;j<10;j++)\n a[j][i]=a[j-5][i];\n }\n for(int i=0;i<5;i++)\n {\n for(int j=0;j<5;j++)\n {\n if((a[i][j]>a[i][j+1])&&(a[i][j]>a[i][j+2])&&(a[i][j]>a[i][j+3])&&(a[i][j]>a[i][j+4])\n &&(a[i][j]hmax )\n {\n hangh = i;\n hangl = j;\n hmax = a[i][j]; \n } \n } \n hang[hangh][hangl] = 1;\n hmax = -1000000;\n }\n for( i = 1;i <= n;i++ )\n {\n for( j = 1;j <= n;j++ )\n {\n if( a[j][i] > a[i];\n\t\trow[i] = i / 5 + 1;\n\t\tline[i] = i % 5 + 1;//?????\n\t}\n\ts = 0;//???????\n\tfor(i = 0; i < 25; i++)\n\t{\n\t\tt = 0;//??a[i]?????\n\t\tfor(j = 0; j < 25; j++)\n\t\t{\n\t\t\tif(row[j] == row[i])\n\t\t\t\tif(a[j] > a[i])\n\t\t\t\t\tt = 1;\n\t\t\tif(line[j] == line[i])\n\t\t\t\tif(a[j] < a[i])\n\t\t\t\t\tt = 1;\n\t\t}\n\t\tif(t == 0)\n\t\t{\n\t\t\tcout << row[i] << \" \" << line[i];\n\t\t\tcout << \" \" << a[i] << endl;\n\t\t\ts = 1;\n\t\t}\n\t}\n\tif(s == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\n\n\n\n\t\n\n\n\n"} +{"label": "73", "index": "36155", "code": "int main(){\nint a[5][5],i,j,max[5],min[5],k=0;\nfor(i=0;i<5;i++){\n for(j=0;j<5;j++){\nscanf(\"%d\",&a[i][j]);\n}\n}\nfor(i=0;i<5;i++){\nmax[i]=a[i][0];\n}\nfor(j=0;j<5;j++){\nmin[j]=a[0][j];\n}\nfor(i=0;i<5;i++)\n{\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max[i]){\n max[i]=a[i][j];\n }\n if(a[i][j]>a[i][k] ; \n } \n } \n\n for(int i = 0 ; i < 5 ; i++ ) \n { \n b = a[i][0] ; \n c = 0 ; \n for(int j = 0 ; j < 5 ; j++ ) \n { \n if(a[i][j] >= b) \n { \n b = a[i][j] ; \n c = j ; \n f = i ; \n } \n } \n if((b<=a[1][c])&&(b<=a[2][c])&&(b<=a[3][c])&&(b<=a[4][c])&&(b<=a[0][c])) \n { \n flag = 1 ; \n d = b ; \n e = c + 1; \n g = f + 1; \n break ; \n } \n } \n if(flag == 1) \n cout<> matrix[i][j];\n }\n \n for(i = 0; i < 5; i++)\n {\n s = i;\n t = 0;\n m = matrix[i][0];\n \n for(j = 0; j < 5; j++)\n {\n if(m < matrix[i][j])\n {\n m = matrix[i][j];\n t = j;\n }\n }\n \n j = 0;\n \n for(k = 0; k < 5; k++)\n {\n if(m > matrix[k][t]) j++;\n }\n\n if(j == 0)\n {\n cout << s + 1 << \" \" << t + 1 << \" \" << m << endl;\n n++;\n }\n }\n \n if(n == 0) cout << \"not found\" << endl;\n\n return 0;\n}\n"} +{"label": "73", "index": "36158", "code": "/*************************\n ***??:??? 1200012776\n ***????:????\n ***??:2012?11?5?\n *************************/\nint main()\n{\n\tint matrix[6][6], point[6][6] = {0}, i, j, k, min, max, max_row = 0, min_col = 0, point_ok = 0;\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tfor (j = 1; j <= 5; j++)\n\t\t{\n\t\t\tcin >> matrix[i][j];\t//????\n\t\t}\n\t}\n\tfor (i = 1; i <= 5; i++)\t//??????????\n\t{\n\t\tmax = matrix[i][1];\t//?max???\n\t\tmax_row = 1;\n\t\tfor (j = 2; j <= 5; j++)\n\t\t{\n\t\t\tif (matrix[i][j] > max)\t//?????????????????\n\t\t\t{\n\t\t\t\tmax_row = j;\t//???????????\n\t\t\t\tmax = matrix[i][j];\t//????????\n\t\t\t}\n\t\t}\n\t\tpoint[i][max_row]++;\t//?point???????i,max_row?????,????????\"????\"??\n\t}\n\tfor (j = 1; j <= 5; j++)\t//??????????,??\n\t{\n\t\tmin = matrix[1][j];\n\t\tmin_col = 1;\n\t\tfor (i = 2; i <= 5; i++)\n\t\t{\n\t\t\tif (matrix[i][j] < min)\n\t\t\t{\n\t\t\t\tmin_col = i;\n\t\t\t\tmin = matrix[i][j];\n\t\t\t}\n\t\t}\n\t\tpoint[min_col][j]++;\n\t}\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tfor (j = 1; j <= 5; j++)\t//????????point\n\t\t{\n\t\t\tif (point[i][j] == 2)\t//??????2????????????\n\t\t\t{\n\t\t\t\tcout << i << \" \" << j << \" \" << matrix[i][j] << endl;\n\t\t\t\tpoint_ok++;\t//????\n\t\t\t}\n\t\t}\n\t}\n\tif (!point_ok)\t//?????\n\t{\n\t\tcout << \"not found\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36159", "code": "int main()\n{\n int a[5][5],k,m=0,n,i,j;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n cin>>a[i][j];\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n n=0;\n for(k=0;k<5;k++)\n {\n if(a[k][j]>=a[i][j]&&a[i][k]<=a[i][j])\n n=n+1;\n }\n if(n==5) cout<t)\n\t\t\t\tt=x[i][j];\n\t\t}\n\t\tmax[i]=t;\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tt=x[0][i];\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(x[j][i]>a[i][j];\n\t}\n\tfor(i=0,k=0,j=0;i<5,k<5;i++,k++,j=0)\n\t{\t\n\t\tmax=a[i][j];\n\t\tb[k]=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\n\t\t\tif (a[i][j]>=max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tb[k]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0,l=0,i=0;j<5,l<5;j++,l++,i=0)\n\t{\n\t min=a[i][j];\n\t\tc[l]=0;\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]<=min)\n\t\t\t{\n\t\t\t\tmin=a[i][j];\n\t\t\t c[l]=i;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\tfor(l=0;l<5;l++)\n\t{\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif(l==b[k])\n\t\t\t{\n\t\t\t\tif(k==c[l])\n\t\t\t\t{\n\t\t\t\t\tcout<>a[i][j];\n for(i = 0;i < 5;i++)\n {\n l[i] = 0;\n for (int j=0;j<5;j++) if (a[i][j]>l[i]) l[i] = a[i][j];\n h[i] = 100000000;\n for (int j=0;j<5;j++) if (a[j][i]>a[i][j];\nfor(i=0;i<5;i++){\n\tmax=a[i][0];\n\tr=0;\n\tbo=1,get=0;\n\tfor(j=1;j<5;j++)\n\t\tif(a[i][j]>max)\n {max=a[i][j];\n r=j;\n }\n\n\tfor(k=0;k<5;k++)\n\t\tif(a[k][r]>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n\t\t\t{\n\t\t\t\tif(a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n\t\t\t\t{\n\t\t\t\t\tk=i+1;\n\t\t\t\t\tt=j+1;\n\t\t\t\t\tcout<> x[i][j];\n\tint (*p)[6] = x;\n\tint xx, yy;\n\tfor (k = 0; k < 5; k ++)\n\t\tfor (s = 0; s < 5; s ++)\n\t\t{\n\t\t\tint flag = 1;\n\t\t\tfor (i = 0; i < 5; i ++)\n\t\t\t\tif (*(*(p + k) + i) > *(*(p + k) + s) || *(*(p + i) + s) < *(*(p + k) + s))\n\t\t\t\t\tflag = 0;\n\t\t\tif (flag)\n\t\t\t{\n\t\t\t\tflag2 = 1;\n\t\t\t\txx = k;\n\t\t\t\tyy = s;\n\t\t\t}\n\t\t}\n\tif (flag2)\n\t\tcout << xx + 1 << \" \" << yy + 1 << \" \" << *(*(p + xx) + yy) << endl;\n\telse\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n\n}"} +{"label": "73", "index": "36166", "code": "int main()\n{\n int a[5][5]={0},i,j,max[5]={0},min[5]={0};\n int count=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]); \n for(i=0;i<5;i++)\n { min[i]=a[0][i];\n max[i]=a[i][0];\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max[i])max[i]=a[i][j];\n if(a[j][i]>a[i][j];\n }\n for (i = 0;i<5;i++)\n {\n \tfor (j = 0;j<5;j++)\n \t{\n \t\tmax = a[i][j];\n \t\tmin = a[i][j];\n \t\tfor (p = 0;p<5;p++)\n \t\t{\n \t\t\tif (maxa[q][j])\n \t\t\t\tmin = a[q][j];\n \t\t}\n \t\tif (a[i][j] == min&&a[i][j] == max)\n \t\t{\n \t\t\tcout<> a[i][t];\n\tfor(i=0; i<5; i++)\n\t\tfor(t=0;t<5;t++)\n\t\t{\n\t\t\tif(m[i]a[i][n[p]])\n\t\t\t{\n\t\t\t\tflag++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(i==5)\n\t\t\tcout << p+1 << \" \" << n[p]+1 << \" \" << m[p] << endl;\n\t}\n\tif(flag==5)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36169", "code": "\nint main(){\n\tint O[5][5],I[5][5],J[5][5];\n\tmemset(I,0,sizeof(I));\n\tmemset(J,0,sizeof(J));\n\tfor(int i=0;i<5;i++){\n\t\tfor(int j=0;j<5;j++){\n\t\t\tcin>>O[i][j];\n\t\t}\n\t}\n\tint maxX,minY,x,y;\n\tfor(int i=0;i<5;i++){\n\t\tmaxX=0;\n\t\tminY=100000;\n\t\tx=y=0;\n\t\tfor(int j=0;j<5;j++){\n\t\t\tif(O[i][j]>maxX){\n\t\t\t\tmaxX=O[i][j];\n\t\t\t\tx=j;\n\t\t\t}\n\t\t\tif(O[j][i]a[k+1][p])\n\t\t\t\tmin=a[k+1][p];\n\t\tif(max==min)\n\t\t{printf(\"%d %d %d\",i+1,p+1,a[i][p]);\n\t\tl++;\n\t\t}\n\t\telse continue;\n\t}\n\t\tif (l==0)\n\t\t{printf(\"not found\");}\n\t\treturn 0;\n}"} +{"label": "73", "index": "36171", "code": "/**\n* ???1000012847\n* ??????\n* ???????\n* ????????? (5*5)??????????????????????? \n* ?????????????????????????????????\u0093not found\u0094?\n**/\n \nint main()\n{\n\t//??????a[5][5]???????i?j????????max[5]?min[5]???????????????????f??????\n\tint a[5][5] , i , j , max[5] = {0} , min[5] = {2147483647 , 2147483647 , 2147483647 , 2147483647 , 2147483647} , f = 0;\n\t\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tfor (j = 0; j < 5; j ++)\n\t\t{\n\t\t\tcin >> a[i][j]; //????????5*5???\n\t\t\tif (max[i] < a[i][j]) //?????????a[i][j],??a[i][j]???????\n\t\t\t\tmax[i] = a[i][j];\n\t\t\tif (min[j] > a[i][j]) //?????????a[i][j],??a[i][j]???????\n\t\t\t\tmin[j] = a[i][j];\n\t\t}\n\t}\n\t\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tfor (j = 0; j < 5; j ++)\n\t\t{\n\t\t\tif (min[j] == max[i] && a[i][j] == min[j]) //??i?????j?????a[i][i]??\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << a[i][j]; //??????i+1?????j+1???\n\t\t\t\tf = 1; //????????1\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (f == 0) //???????0\n\t\tcout << \"not found\" << endl; //???not found\n\t\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "73", "index": "36172", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,m,n,x=1;\n\tfor(i=0;i<=4;i++)\n\t\tfor(j=0;j<=4;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<=4;i++)\n\t\t\tfor(j=0;j<=4;j++)\n\t\t\t{ int w=1,v=1;\n\t\t\t\tfor(m=0;m<=4;m++)\n\t\t\t\t\tif(a[i][j]a[n][j]){v=0;break;}\n\t\t\t\tif(w&&v) {cout<=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n { k=k+1;\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);}\n }\n if(k==0)\n\t printf(\"not found\\n\");\n}"} +{"label": "73", "index": "36174", "code": "int main()\n{\n\tint i,j,k=0,matrix[5][5],max[5],min[5];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&matrix[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax[i]=matrix[i][0];\n\t\tmin[i]=matrix[0][i];\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(matrix[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=matrix[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(matrix[i][j]row[i-1])\n\t\t\t\trow[i-1]=a[i-1][j-1];\n\t\t}\n\t}\n\tfor (j=1;j<=5;j++) //????????//\n\t{\n\t\tfor (i=1;i<=5;i++)\n\t\t{\n\t\t\tif (a[i-1][j-1]>a[i][j];\n\tfor(i=0;i<5;i++)\n\t\t\tfor(j=0;j<5;j++)\n\t\t\t\t//???????????\n\t\t\t{ int p=0;\n\t\t\t\tfor(l=0;l<5;l++)\n\t\t\t\t{\n\t\t\t\t if((a[l][j]a[i][j]))//??a[i][j]??????????????\n\t\t\t\t {\n\t\t\t\t p++;\n\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t\tif(p==0){cout<> a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tm = a[i][0];\n\t\trow = i;\n\t\tcolumn = 0;\n\t\tfor (j = 0; j < 5; j ++)\n\t\t{ int flag = 0;\n\t\t\tif (a[i][j] > m)\n\t\t\t{\n\t\t\t\tm = a[i][j];\n\t\t\t\trow = i;\n\t\t\t\tcolumn = j;\n\t\t\t}\n\t\t\tif (j == 4)\n\t\t\t{\n\t\t\tfor (int k = 0; k < 5; k ++)\n\t\t\t{\n\t\t\t\tif (k != row && m > a[k][column])\n\t\t\t\t{ flag = 1;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif ( flag == 0)\n\t\t\t\t{\n\t\t\t\t cout << row + 1 <<' '<< column + 1 <<' '<< a[row][column] << endl;\n\t\t\t\t b[i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif ((b[0] + b[1] + b[2] + b[3] + b[4]) == 0)\n\t{\n\t cout << \"not found\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36178", "code": "int main()\n{\nint a[5][5],b[5][5],c[5][5],max[5],min[5];\nint i,j,i1,i2,i3,i4,i5,i6,i7,i8,m,n,p=0,prin;\nfor(i=0;i<=4;i++)\n{\n\tfor(j=0;j<=4;j++)\n\t{\n\t\tscanf(\"%d\",&a[i][j]);\n\t\tb[i][j]=a[i][j];\n\t\tc[i][j]=a[i][j];\n\t}\n}\n for(i1=0;i1<=4;i1++)\n {\n for(i2=1;i2<=4;i2++)\n {\n for(i3=0;i3<=3;i3++)\n {\n\t if(b[i1][i3]c[i6+1][i4])\n\t {n=c[i6+1][i4];\n\t c[i6+1][i4]=c[i6][i4];\n\t c[i6][i4] =n;}\n }\n }\n min[i4]=c[0][i4];\n }\n for(i7=0;i7<=4;i7++)\n {\n for(i8=0;i8<=4;i8++)\n {\n if((max[i7]==min[i8]))\n { prin=max[i7];\n\t i7=i7+1;i8=i8+1;\n\t printf(\"%d %d %d\\n\",i7,i8,prin);p=p+1;}\n }\n }\n if(p==0)\n printf(\"not found\");\n}\n\n"} +{"label": "73", "index": "36179", "code": "int main()\n{\n\tint f[5][5];\n\tint a,b,c,d,i,j;\n\tc=0;\n\td=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&f[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tfor(a=0;a<5;a++)\n\t\t\t{\n\t\t\t\tfor(b=0;b<5;b++)\n\t\t\t\t{\n\t\t\t\t\tif(f[i][j]>=f[i][a]&&f[i][j]<=f[b][j])\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t\tif(c==25)\n\t\t\t{\n\t\t\t\td=1;\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,f[i][j]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tc=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(d==0)\n\t\tprintf(\"not found\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36180", "code": "int main()\n{\n\tint point[6][6],i,j,biaoji=0;\n\tfor(i=1;i<6;i++)\n\t\tfor(j=1;j<6;j++)\n\t\t\tcin>>point[i][j];//????\n\tint max=0,c,b;\n\tfor(i=1;i<6;i++)\n\t{\n\t\tmax=0;//???max\n\t\tfor(j=1;j<6;j++)\n\t\t{\n\t\t\tif(point[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=point[i][j];//???????\n\t\t\t\tb=i;//????\n\t\t\t\tc=j;//????\n\t\t\t}\n\t\t}\n\t\tint count=0,a;\n\t\tfor(a=1;a<6;a++)\n\t\t{\n\t\t\tif(maxmax)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tk=j;\n\t\t\t}\n\t\t}\n\t\t for(n=0;n<5;n++)\n\t\t\t{ \n\t\t\t\tif(max>a[n][k])\n\t\t\tre=1;\n\t\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t}\n\n\t\t\n\tif (re==0)\n\t{tap=1;\n\t\tprintf(\"%d %d %d\",i+1,k+1,max);\n\t}\n\t}\n\tif (tap==0)\n\t\tprintf(\"not found\");\n\n\t\n\treturn 0;\n\n}\n"} +{"label": "73", "index": "36182", "code": "int main(){ \n\tint p,q,y;\n int sz[5][5];\n for(int row=0;row<5;row++){\n\t\tfor(int col=0;col<5;col++){\n scanf(\"%d\",&sz[row][col]);\n\t\t}\n\t}\n\t\n\n\ty=0;\n\t\n\tfor(int row=0;row<5;row++){\n\t\tfor(int col=0;col<5;col++){\n\t\t\tp=0;\n\t\t\tq=0;\n for(int m=0;m<5;m++){\n\t\t\t\tif(m!=col&&sz[row][col]>sz[row][m]){\n\t\t\t\t p+=1;\n\t\t\t\t}\n\t\t\t\tif(m!=row&&sz[row][col]>jz[i][j];\n\t\t}\n\t}\n\n\tfor(i=0;i<5;i++){\n\t\tmax=jz[i][0];\n\t\tI=i;J=0;\n\t\tfor(j=1;j<5;j++){\n\t\t\tif(maxx[i]){\n\t\tx[i]=a[i][j];}\t\n\t}\n}\nfor(i=0;i<5;i++){\n\tfor(j=0;j<5;j++){\n\t\tif(a[i][j]==x[i]){//c[i]=i;\n\t\td[i]=j;\n\t\t//printf(\"%d\\n\",a[i][j]);\n\t\t//printf(\"%d\",d[i]);\n\t\t}\n\t}\n}\nn=0;\nfor(i=0;i<5;i++){\n m=d[i];\n if(a[i][m]<=a[0][m]&&a[i][m]<=a[1][m]&&a[i][m]<=a[2][m]&&a[i][m]<=a[3][m]&&a[i][m]<=a[4][m]){\n c[i]=1;\n }else{c[i]=0;}\n n=n+c[i];\n}\n\nif(n==0){printf(\"not found\");}else{\nfor(i=0;i<5;i++){\n\tm=d[i];\n\tif(c[i]==1){printf(\"%d %d %d\\n\",i+1,m+1,a[i][m]);\n\t}\n}\n}\n\nreturn 0;\n}\n\n"} +{"label": "73", "index": "36185", "code": "int main()\n{\n\tint a[6][6],i,j,flag1=0,flag2=0,flag=0,x,y,k;\n for(i=1;i<6;i++)\n\t{\n\t\tfor(j=1;j<6;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\t\tfor(i=1;i<6;i++)\n\t\t{\n\t\t\tfor(j=1;j<6;j++)\n\t\t\t{\n\t\t\t\tif(a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]>=a[i][5]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j]&&a[i][j]<=a[5][j])\n\t\t\t\t{\n\t\t\t\t\tflag=-1;\n\t\t\t\t\tx=i;\n\t\t\t\t\ty=j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(flag==-1)\n\t\t\tprintf(\"%d %d %d\",x,y,a[x][y]);\n\t\telse\n\t\t\tprintf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36186", "code": "int main()\n{\n\tint a[5][5],i,j,k,p,m,n,s=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t}\n\tm=a[0][0];k=0;\n\tfor(j=0;j<5;j++)\n\t{\n\t\tif(a[0][j]>m)\n\t\t{\n\t\t\tm=a[0][j];\n\t\t\tk=j;\n\t\t}\n\t\telse;\n\t}\n\tn=a[0][k];p=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][k]m)\n\t\t{\n\t\t\tm=a[1][j];\n\t\t\tk=j;\n\t\t}\n\t\telse;\n\t}\n\tn=a[0][k];p=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][k]m)\n\t\t{\n\t\t\tm=a[2][j];\n\t\t\tk=j;\n\t\t}\n\t\telse;\n\t}\n\tn=a[0][k];p=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][k]m)\n\t\t{\n\t\t\tm=a[3][j];\n\t\t\tk=j;\n\t\t}\n\t\telse;\n\t}\n\tn=a[0][k];p=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][k]m)\n\t\t{\n\t\t\tm=a[4][j];\n\t\t\tk=j;\n\t\t}\n\t\telse;\n\t}\n\tn=a[0][k];p=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][k]m[i][k]) k=j;\n\t\t}\n\t\tr[i]=k;\n\t}\n\tfor(j=0;j<5;j++){\n\t\tk=0;\n\t\tfor(i=0;i<5;i++) if(m[i][j]>a[i][j];\n\t}\n\tfor (j = 0;j <=4;j++)\n\t{\n\t\tmin = a[0][j];\n\t\tfor (i = 0;i <= 4;i++)//??????????????line????????\n\t\t{\n\t\t\tif(a[i][j] <= min)\n\t\t\t{\n\t\t\t\tmin = a[i][j];\n\t\t\t\tline = i;\n\t\t\t}\n\t\t}\n\t\tmax = a[line][j];\n\t\tfor (i = 0;i <=4;i++)//??line???????????column???????\n\t\t{\n\t\t\tif (a[line][i] >= max)\n\t\t\t{\n\t\t\t\tmax = a[line][i];\n\t\t\t\tcolumn = i;\n\t\t\t}\n\t\t}\n\t\tif (max == min)//?????????????????????????????+1\n\t\t{\n\t\t\tcout<=w)\n w=a[i][s];}\n if(w==a[i][j])\n { q=a[i][j];\n for(s=0;s<5;s++)\n {if(a[s][j]<=q)\n q=a[s][j];}\n if(q==a[i][j])\n {printf(\"%d %d %d\\n\",x+1,y+1,w); \n p=p+1;} \n }\n } \n }\n if(p==0)\n printf(\"not found\"); \n \n}\n\n\n"} +{"label": "73", "index": "36190", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,k,flag[5][5],prime=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tflag[i][j]=1;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\n\t\t\t\tif(k==j) continue;\n\t\t\t\telse\n\t\t\t\t\tif(a[i][j]a[k][j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tflag[i][j]=0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(flag[i][j]==1)\n\t\t\t{\n\t\t\t\tcout<temp)\n {\n temp=a[i][j];\n tempj=j;\n }\n result[i][tempj]=1;\n }\n //??j??????\n for (j=0;j<5;j++)\n {\n tempi=0;\n temp=a[0][j];\n for (i=1;i<5;i++)\n if (a[i][j]max[i])max[i]=a[i][j];\n if(a[i][j]=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j])\n\t\t\t{\n\t\t\t\tp=a[i][j];\n\t\t\t\thang=i+1;\n\t\t\t\tlie=j+1;\n\t\t\t\tprintf(\"%d %d %d\\n\",hang,lie,p);\n\t\t\t}\n\t\t}\n\t}\n\tif(p==-1)\n\t\tprintf(\"not found\\n\");\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36194", "code": "//***************************************************\n//* name: 4.cpp *\n//* author:?? *\n//* date: 2013-11-01 *\n//* description:???? *\n//***************************************************\nint main()\n{\n\tint a[6][6]={0},max=INT_MIN , min=INT_MAX,maxl,minh,i , j , k ,truth=0;\n\tfor(i = 1;i < 6;i++)\n\t{\n\t\tfor(j = 1 ; j < 6 ; j++)\n\t\t\tcin >> a[i][j] ;\n\t}\n\tfor(i = 1 ; i < 6 ;i++)\n\t{\n\t\tfor(j = 1 ; j < 6 ; j++)\n\t\t{\n\t\t\tif(max a[k][maxl])\n\t\t\t{\n\t\t\t\tmin= a[k][maxl];\n\t\t\t\tminh = k ;\n\t\t\t}\n\t\t}\n\t\tif(max == min)\n\t\t{\n\t\t\ttruth = 1 ;\n\t\t\tcout << minh <<' '<< maxl <<' '<< a[minh][maxl] ;\n\t\t}\n\t\tmax =INT_MIN ;\n\t\tmin =INT_MAX;\n\t}\n\tif(truth == 0)\n\t\tcout <<\"not found\"<> a[i][j];\n\t\t}\n\t}\n\tfor(i = 0; i <= 4; i++)\n\t{\n\t\tmax1 = 0;\n\t\tfor(j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif(a[i][j] > max1)\n\t\t\t{\n\t\t\t\tmax1 = a[i][j];\n\t\t\t\tplace1[i] = j;\n\t\t\t}\n\t\t}\n\t\tmax[i] = max1;\n\t}\n\tfor(j = 0; j <= 4; j++)\n\t{\n\t\tmin1 = max[j];\n\t\tplace2[j] = j;\n\t\tint p = place1[j];\n\t for(i = 0; i <= 4; i++)\n\t {\n\t\t if(a[i][p] < min1)\n\t\t {\n\t\t\t min1 = a[i][p];\n\t\t\t\tplace2[j] = i;\n\t\t }\n\t\t}\n\t\tmin[j] = min1;\n\t}\n\tfor(i = 0; i <= 4; i++)\n\t{\n\t\tif(max[i] == min[i])\n\t\t{\n\t\t\tcout << place2[i] + 1 << \" \" << place1[i] + 1 << \" \" << max[i] << endl;\n\t\t\tleap = 0;\n\t\t}\n\t}\n\tif(leap == 1)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36196", "code": "int main()\n{\nint i,j,k,max,temp,flag;\nint a[5][5];\nfor(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n\tscanf(\"%d\",&a[i][j]);\nfor(i=0;i<=4;i++)\n {\n max=a[i][0];\n flag=1;\n for(j=0;j<=4;j++)\n {\n if(a[i][j]>=max)\n { max=a[i][j];\n temp=j;}\n }\n for(k=0;k<=4;k++)\n { \n if( a[k][temp]max[h]){\t\t\n\t\tmax[h]=sz[h][z];\t\n\t\t\t}\t\n\t\t}\t\t\n}\t\t\nfor(z=0;z<5;z++){\t\t\n\tmin[z]=sz[0][z];\t\n\t\tfor(h=0;h<5;h++){\t\n\t\t\tif(sz[h][z]> a[i][j];\n\t\t}\n\t\tfor (i = 0; i <= 4; i++)\n\t\t{\n for (j = 0; j <= 4; j++)\n\t\t\t{\n\t\t\t\tif (t < a[i][j])\n\t\t\t\t{\n\t\t\t\t\tt = a[i][j];\n\t\t\t\t\tcol = j;\n\t\t\t\t}\n\t\t\t}\n\t\t if (t <= a[0][col] && t <= a[1][col] && t <= a[2][col] && t <= a[3][col] && t <= a[4][col])\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << col + 1 << \" \" << t << endl;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tt = 0;\n\t\t\t\tg ++;\n\t\t\t}\n\t\t}\n\t\tif (g == 5)\n\t\t{\n\t\t\tcout << \"not found\" << endl;\n\t\t}\n\t\treturn 0;\n}"} +{"label": "73", "index": "36199", "code": "int main()\n{\n\tint out[5][5]={{0}}; //???????\n\tint judge=0,jusum=0; //judge?????????,jusum??????????\n\tint max=0,mplace=0; //max??????mplace????????\n\tint i,j,k; //i,j?????\n\tfor(i=0;i<5;i++) //????out\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>out[i][j];\n\t}\n\tfor(i=0;i<5;i++) //???\n\t{\n\t\tmax=out[i][0];\n\t\tmplace=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(max>number;\n\t\t\ta[i][j]=number;\n\t\t}\n\t}\n\tint max=INT_MIN,maxi,maxj;\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tmax=INT_MIN;\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif (a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tmaxi=i;\n\t\t\t\tmaxj=j;\n\t\t\t}\n\t\t}\n\t\tint k=0 ;\n\t\tfor(;k<5;k++)\n\t\t{\n\t\t\tif(a[k][maxj]a[i][j])\n {\n y[j]=a[i][j]; \n } \n } \n } \n for(i=0;i<5;i++)\n if(x[i]==y[b[i]])\n {\n k++;\n printf(\"%d %d %d\",i+1,b[i]+1,x[i]);\n }\n if(k==0)\n printf(\"not found\");\n \n \ngetchar();getchar();getchar();getchar(); \n}\n"} +{"label": "73", "index": "36202", "code": "// ????\nint main()\n{\n\tint a[5][5]; // ????\n\t// row, column????????i,j,k????? max???????\n\tint row = 0, column = 0, i, j, k, flag, result = 0, max; \n\tfor (i = 0; i < 5; i++) // ???????\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i < 5; i++) \n\t{\n\t\tmax = 0;\n\t\tflag = 1;\n\t\tfor (j = 0; j < 5; j++) // ?????????\n\t\t{\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j]; // max???????\n\t\t\t\trow = i;\n\t\t\t\tcolumn = j;\n\t\t\t}\n\t\t}\n\t\tfor (k = 0; k < 5; k++) // ??????????????\n\t\t{\n\t\t\tif (max > a[k][column]) // ???????????\n\t\t\t{\n\t\t\t\tflag = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\tif (flag == 1) // flag??1???????????\n\t\t\t{\n\t\t\t\tcout << (row + 1) << \" \" << (column + 1) << \" \" << max << endl;\n\t\t\t\tresult = 1; \n\t\t\t}\n\t}\n\tif (result == 0) // ???????\n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36203", "code": "main()\n{ \n int i,j,k,m=0,n=0,t=0,p,a[5][5];\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]); \n }\n }\n for(i=0;i<5;i++)\n {\n p=a[i][0];\n m=i;\n for(j=0;j<5;j++)\n {\n if (p>num[j][i];\n }\n int maxhang;\n int minlie;\n int m;\n int k;\n int l=0;\n for(j=0;j<5;j++) //?????? \n for(i=0;i<5;i++)\n { k=0;\n maxhang=num[j][i]; \n for(m=0;m<5;m++)\n { if(num[j][m]>maxhang) k=k+1; //????? \n }\n minlie=num[j][i];\n for(m=0;m<5;m++)\n { if(num[m][i]=a[i][k])\n continue;\n else\n break;\n }\n for(m=0;m<=4;m++)\n {\n if(a[i][j]<=a[m][j])\n continue;\n else\n break;\n }\n if(k==5&&m==5)\n {\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n n=1;\n }\n }\n }\n if(n==0)\n printf(\"not found\");\n \n} \n"} +{"label": "73", "index": "36206", "code": "struct dian\n{\n int x;\n int y;\n int zhi; \n};\nint main()\n{\n int a[5][5]; \n int c,e,i,j,count=0;\n struct dian b[5];\n struct dian andian;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n for(i=0;i<5;i++) // i ?? ?? \n { \n int d=0;\n andian.zhi=a[i][0];\n andian.x=1;\n andian.y=i+1;\n for(j=1;j<5;j++) {if(andian.zhimax[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tb[i]=j;\n\t\t\t}\n\t\t}\n\t\tfor(k=0;k<=4;k++)\n\t\t{\n\t\t\tif(a[i][b[i]]<=a[k][b[i]])\n\t\t\t{\n\t\t\t\tc[i]=c[i]+1;\n\t\t\t}\n\t\t}\n\t\tif(c[i]==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\\n\",i+1,b[i]+1,max[i]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tp=p+1;\n\t\t}\n\t}\n\tif(p==5)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}\n"} +{"label": "73", "index": "36208", "code": "//********************************\n//*??????? **\n//*?????? 1300012934 **\n//*???2013.11.6 **\n//********************************\n\n\nint main()\n{ \n\tint a[5][5], b[2][5] = {{INT_MIN, INT_MIN, INT_MIN, INT_MIN, INT_MIN},{INT_MAX, INT_MAX, INT_MAX, INT_MAX, INT_MAX}};\n\tint k = 0;\n\t\n\tfor (int i = 0; i <= 4; i++)\n\t{\n\t\tfor (int j = 0; j <= 4; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t\tif (a[i][j] >= b[0][i])\n\t\t\t\tb[0][i] = a[i][j];\n\t\t\tif (a[i][j] <= b[1][j])\n\t\t\t\tb[1][j] = a[i][j];\n\t\t}\n\t}\n\tfor (int i = 0; i <= 4; i++)\n\t{\n\t\tfor (int j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] == b[0][i] && a[i][j] == b[1][j])\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << a[i][j];\n\t\t\t\tk = 1;\n\t\t\t}\n\t\t}\n\t}\n\tif (k == 0)\n\t\tcout << \"not found\";\n\n\n\treturn 0;\n\n}\n"} +{"label": "73", "index": "36209", "code": "//********************************\n//*??????? **\n//*?????? 1200062706**\n//*???2012.11.13 **\n//********************************\n\nint main()\n{\n\tint i, j, x[5][5];\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tint a;\n\t\t\tcin >> a;\n\t\t\tx[i][j] = a;\n\t\t}\n\t}\n\tint y[5];\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tint max = 0;\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (max > x[i][j])\n\t\t\t\tmax = max;\n\t\t\telse\n\t\t\t\tmax = x[i][j];\n\t\t\ty[i] = max;\n\t\t}\n\t}\n\tint y1[5];\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tint min = x[0][i];\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (min < x[j][i])\n\t\t\t\tmin = min;\n\t\t\telse\n\t\t\t\tmin = x[j][i];\n\t\t\ty1[i] = min;\n\t\t}\n\t}\n int k = 0;\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (y[i] == y1[j])\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << y[i] << endl;\n\t\t\telse\n\t\t\t\tk = k + 1;\n\t\t\tif (k == 25)\n\t\t\t\tcout << \"not found\" << endl;\t\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36210", "code": "main()\n{\n int i,j,k;\n int a[5][5];\n int p,q;\n int t=0;\n for(i=0;i<=4;i++)\n {\n for(j=0;j<=4;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<=4;i++)\n {\n for(j=0;j<=4;j++)\n {\n p=0;\n q=0;\n for(k=0;k<=4;k++)\n {\n if(a[i][k]>a[i][j])\n {\n p=1;\n }\n if(a[k][j]t) t=b;\n if (c>t) t=c;\n if (d>t) t=d;\n if (e>t) t=e;\n return t;\n}\nint min(int a,int b,int c,int d,int e)\n{\n int t=a;\n if (bb)\n b=a[i][j];\n }\n for(j=0;j<5;j++)\n { \n if(a[i][j]==b)\n { \n c=a[0][j];\n for(k=0;k<5;k++)\n {\n if(a[k][j]1)\n {\n printf(\" \");\n printf(\"%d\",i,j,b);\n }\n } \n }\n }\n } \nif(n==0)\nprintf(\"not found\");\nreturn 0;\n}"} +{"label": "73", "index": "36213", "code": "int main () {\n\tint a[5][5],c,b,i,j,e,f; \n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\te=0;\n\t f=0;\n\t\t\tfor(c=0;c<5;c++){\n\t\t\t\tif(a[i][j]>=a[i][c]){\n\t\t\t\t\te++;\n\t\t\t\t}\n\t\t\t} \n\t\t\tfor(b=0;b<5;b++){\n\t\t\t\tif(a[i][j]<=a[b][j]){\n\t\t\t\t\tf++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(e==5&&f==5){\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tif(e==5&&f==5){\n\t\t\tbreak ;\n\t\t}\n\t}\n\tif(e!=5||f!=5){\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36214", "code": "int main()\n{\n\tint a[5][5];\n\tint i , j , i1 , j1 , m = 0 ;\n\tfor( i = 0 ; i < 5 ; i++ )\n\t{\n\t\tfor( j = 0 ; j < 5 ; j++ )\n\t\t\tcin >> a[i][j] ;\n\t}\n\tfor( i1 = 0 ; i1 < 5 ; i1++ )\n\t{\n\t\tfor( j1 = 0 ; j1 < 5 ; j1++ )\n\t\t{\n\t\t\tif( a[i1][j1] >= a[i1][0] && a[i1][j1] >= a[i1][1] && a[i1][j1] >= a[i1][2] && a[i1][j1] >= a[i1][3] && a[i1][j1] >= a[i1][4] )\n\t\t\t\tif( a[i1][j1] <= a[0][j1] && a[i1][j1] <= a[1][j1] && a[i1][j1] <= a[2][j1] && a[i1][j1] <= a[3][j1] && a[i1][j1] <= a[4][j1] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << i1 + 1 << \" \" << j1 + 1 << \" \" << a[i1][j1] << endl ;\n\t\t\t\t\t\tm++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\tif( m != 0 )\n\t\t\t\tbreak;\n\t\t}\n\t\tif( m != 0 )\n\t\t\tbreak;\n\t}\n\tif( m == 0 )\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36215", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,k;\n\tint r,c=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tr=0;\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\n\t\t\t\tif(a[i][k]>a[i][j])\n\t\t\t\t\tr=1;\n\t\t\t}\n\t\t\tif(r==0)\n\t\t\t\tfor(k=0;k<5;k++)\n\t\t\t\t{\n\t\t\t\t\tif(a[k][j]m) { m=a[i][j]; s=j; }\n }\n for(t=1;t<=5;t++)\n { \n if(a[t][s]> a[i][j];\n }\n }\n for (i = 0; i < 5; i++)\n {\n column = 0;\n temp = a[i][0];\n for (j = 1; j < 5; j++) \n {\n if (a[i][j] > temp)\n {\n temp = a[i][j];\n column = j;\n }\n }\n row[i] = column;\n }\n for (i = 0; i < 5; i++)\n {\n g = 0;\n k = row[i];\n for (j = 0; j < 5; j++)\n {\n if (a[j][k] < a[i][k])\n {\n g++;\n }\n }\n if (g == 0)\n {\n cout << i + 1 << \" \" << k + 1 << \" \" << a[i][k] << endl;\n flag ++ ;\n }\n }\n if (flag == 0)\n {\n cout << \"not found\" <=a[l][k]){\n\t\t\t\tmin=a[l][k];\n\t\t\t f=l;\n\t\t\t}\n\t\t}\n\t\tif(f==i){\n\t\t\tprintf(\"%d %d %d\",f+1,k+1,a[f][k]);\n\t\t\tg=0;\n\t\t}\n\t}\n\tif(g!=0){\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36219", "code": "int main ()\n{\n\tint a[5][5],max[5],min[5],i,b,c,j,k=0;\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tmax[i]=a[i][0];\n\t}\n\tfor(j=0;j<5;j++){\n\t\tmin[j]=a[0][j];\n\t}\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(a[i][j]>max[i]){\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t}\n\n\n\t\t}\n\t}\n\tfor(j=0;j<5;j++){\n\t\tfor(i=0;i<5;i++){\n if(a[i][j]=b[i][j+1])\n {\n int e=b[i][j];\n b[i][j]=b[i][j+1];\n b[i][j+1]=e;\n int f=c[i][j];\n c[i][j]=c[i][j+1];\n c[i][j+1]=f; \n } \n } \n } \n for(i=0;i<=4;i++)\n {\n\t j=c[i][4];\n\t for(int k=0;k<=4;k++)\n\t {\n\t\t if(k<4)\n\t\t {\n\t\t if(a[k][j]=b[i][4])\n\t\t\t{\n\t\t\t printf(\"%d %d %d\\n\",1+d[i][4],1+c[i][4],b[i][4]);\n\t\t\t sum=sum+1;\n\t\t\t}\n\t\t }\n\t }\n }\n if(sum==0)\n {\n printf(\"not found\");\n }\nreturn 0;\n}"} +{"label": "73", "index": "36221", "code": "//************************************************************************\n//*???7-4.cpp \n//*??????? \n//*?????? \n//*???2013?11?10? \n//************************************************************************\nint main()\n{\n\tint a[7][7], i, j , k, flag , max, maxj;\n\t\n\tfor(i = 0; i < 5; i++ )\n\t{\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\t //??????\t\t\t\t\t\n\t\t}\n\t}\n\tfor(i = 0; i < 5; i++ )\n\t{\n\t\tmax = a[i][0]; //??????????????\n\t\tmaxj = 0; //???????\n\t\tflag = 1; //??????\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j]; //??????????????\n\t\t\t\tmaxj = j;\n\t\t\t}\n\t\t}\n\t\tfor(k = 0; k < 5; k++) //????????????\n\t\t{\n\t\t\tif(a[k][maxj] < max)\n\t\t\t{\n\t\t\t\tflag = 0; //????????????????\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag) //???????????????????\n\t\t{\n\t\t\tcout << i + 1 << \" \" << maxj + 1 << \" \" << a[i][maxj] << endl;\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(!flag) //???????????????????\n\t\tcout << \"not found\" << endl; \n\treturn 0;\n}"} +{"label": "73", "index": "36222", "code": "//* * * * * * * * * * * * * * * * * * * * * * * * \n//*????1000012839_1 *\n//*???? ???? *\n//*????? *\n//*???2010.11.05 *\n//* * * * * * * * * * * * * * * * * * * * * * * * \n\nint main()\n{\n\tint i, j, k, m, N;\t//\t????i,j,k,m,N?\n int max, min;\t//\tmax?min????????????????????\n int a[5][5];\t//\t???????\n\t for (i = 0; i < 5; i++)\n for (j = 0; j < 5; j++)\n cin >> a[i][j];\t//\t???????????\t\n\tfor (i = 0, N = 0; i < 5; i++)\n {\n max = a[i][0];\t//\t??????????max;\n k = 0;\n for (j = 1; j < 5; j++)\n {\n if (a[i][j] > max)\n {\n max = a[i][j];\n k = j;\t//\t?????????????j??k?\n }\n }\n min = a[0][k];\t//\t???k?????min?\n m = 0;\n for (j = 1; j < 5; j++)\n {\n if (min > a[j][k])\n {\n min = a[j][k];\n m = j;\t//\t??k?????????j??m?\n }\n }\n if (m == i)\t//\t???k?????????i???????\n\t\t{\n\t\t\tcout << i + 1 << ' ' << k + 1 << ' ' << a[i][k] << endl;\t//\t??????\n\t\t\tN++;\n\t\t}\n\t}\n\tif (N == 0)\t\n\t\tcout << \"not found\" << endl;\t//\t????????\"not found\";\n\n\treturn 0;\n}\n\n\n\n\n\n\n\n\n"} +{"label": "73", "index": "36223", "code": "int main()\n{\n\tint i,j,k,p=0,q=0,r,s; //i,j,k??????p,q??????r,s?????????????\n\tint a[5][5],m[5]={0},n[5]={0}; //??????a[5][5]?????????????m[5]?????????????n[5]???????????\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>m[i])\n\t\t\t{\n\t\t\t\tm[i]=a[i][j];\n\t\t\t\tn[i]=j;\n\t\t\t}\n\t\t}\n\t\tj=0;\n\t}\n\ti=0;j=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tj=n[i];\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif(a[k][j]max[i]) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\t//printf(\"%d\",j);\n\t\t\t\tb[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\t//printf(\"1111111\");\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\t//printf(\"%d %d %d %d\\n\",i,j,a[i][j],min[j]);\n\t\t\tif(a[i][j]sz[i][j]){\n\t\t\t\ta=sz[i][j];\n\t\t\t\tsz[i][j]=sz[i][j-1];\n\t\t\t\tsz[i][j-1]=a;\n\t\t\t}\n\t\t}\n\t\th[i]=sz[i][4];\n\t}\n\tfor(j=0;j<5;j++){\n\t\tfor(i=1;i<5;i++){\n\t\t\tif(ss[i-1][j]max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tcolum=j;\n\t\t\t}\n\t\t}\n\t\tc=1;\n\t\tfor(k=0;k<5;k++){\n\t\t\tif(a[k][colum]>num0[i][j];\n\t\tnum1[j][i]=num0[i][j];\n\t}\n\tint flag=1;\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif(num0[i][j]==max(5,num0[i])&&num1[j][i]==min(5,num1[j]))\n\t\t\t{\n\t\t\t\tcout<max)\n\t\tmax=a[i];\n\t}\n\treturn max;\n}\n\nint min(int n,int *a)\n{\n\tint min=a[0];\n\tfor(int i=0;ia[i])\n\t\tmin=a[i];\n\t}\n\treturn min;\n}\n"} +{"label": "73", "index": "36228", "code": "\nmain()\n{\n int i,j;\n int a[5][5];\n int max[5];\n int min[5];\n int b;\n int k=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n \n }\n for(i=0;i<5;i++) max[i]=a[i][0];\n for(j=0;j<5;j++) min[j]=a[0][j];\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max[i]) max[i]=a[i][j];\n if(a[i][j]e)\n\t\t\t{\n\t\t\t\te=a[k][j];\n\t\t\t\tm=j;\n\t\t\t}\n\t }\n\t for(i=0;i<5;i++)\n\t {\n\t\tif(a[i][m]> op[i][j];\n for(int i=0;i<5;i++)\n for(int j=0;j<5;j++)\n {\n for(int col=0;col<5;col++)\n if(op[i][j]op[cow][j])\n vis[i][j]=1;\n }\n int sum=0;\n for(int i=0;i<5;i++)\n for(int j=0;j<5;j++)\n {\n if(vis[i][j]==0)\n {cout << i+1<<\" \" << j+1 <<\" \"<< op[i][j] <> a[0][i];\n\t\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[1][i];\n\t\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[2][i];\n\t\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[3][i];\n\t\n\tfor (i = 0; i <= 4; i++)\n\t\tcin >> a[4][i];\n\tint max = 0, b = 0, right = 1, flag = 0;\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tmax = 0;\n\t\tright = 1;\n\t\tfor (j = 1; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] > a[i][max])\n\t\t\t\tmax = j;\n\t\t}\n\t\tfor (b = 0; b <= 4; b++)\n\t\t{\n\t\t\tif (a[b][max] < a[i][max])\n\t\t\t{\n\t\t\t\tright = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (right == 1)\n\t\t{\n\t\t\tcout << i + 1 << \" \" << max + 1<< \" \" << a[i][max] << endl;\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36232", "code": "\nconst int N=5;\n\nint max(int a[])\n{\n\tint i,m=0;\n\tfor(i=1;ia[m]) m=i;\n\treturn m;\n}\n\nint min(int a[N][N],int m,int n)\n{\n\tint i;\n\tfor(i=0;i=sz[hang][col]){\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tcol++;\n\t\t}\n\t\tif(j==5){\n\t\t\tprintf(\"%d %d %d\\n\",hang+1,lie+1,min);\n\t\t\ti++;\n\t\t}\n\t\tcol=lie;\n\n\t}\n\tif(i==0){\n\t\tprintf(\"not found\");\n\t}\n\n\treturn 0;\n}"} +{"label": "73", "index": "36234", "code": "main()\n{\nint a[5][5];\nint maxi[5];\nint minj[5];\nint j1[5];\nint i2[5]; \nint ii,io,ji,jo,i,j,i1,j2,i3,j3,k,l,m,n;\n l=0; \n for(ii=0;ii<5;ii++)\n {for(ji=0;ji<5;ji++)\n {scanf(\"%d\",&a[ii][ji]);\n }\n } \nfor(i=0;i<5;i++)\n{maxi[i]=a[i][0];\nj1[i]=0;\nfor(j=0;j<5;j++)\n{if(a[i][j]>maxi[i])\n{maxi[i]=a[i][j];\nj1[i]=j;} ///j1?i??????/\n}\n}\nfor(jo=0;jo<5;jo++)\n{minj[jo]=a[0][jo];\ni2[jo]=0; \nfor(io=0;io<5;io++)\n{if(a[io][jo]a[i][j])\n\t\t\t{\n\t\t\t\tmin[j]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tk=0;\n\tfor(i=0;i<=4;++i)\n\t{\n\t\tfor(j=0;j<=4;++j)\n\t\t{\n\t\t\tif(max[i]==min[j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,max[i]);\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0) printf(\"not found\\n\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36236", "code": "int main()\n{\n\tint array[6][6];\n\tint i,j;\n int flag1=1,tmp1,tmp2,flagx=0;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&array[i][j]);\n\t\t}\n\t}\n i=1;\n\tj=1;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tflag1=1;\n\t\t\n\t\t\tfor(tmp1=1;tmp1<=5;tmp1++)\n\t\t\t{\n\t\t\t\tif(array[i][j]array[tmp2][j])\n\t\t\t\t\tflag1=0;\n\t\t\t}\n\t\t\tif(flag1==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\",i,j,array[i][j]);\n\t\t\t flagx=1;\n\t\t\t}\n\t\t}\n\t}\n\tif(flagx==0)printf(\"not found\");\n\treturn 0;\n}\n\n\t\n\t\n\t\n\t\n\t"} +{"label": "73", "index": "36237", "code": "int main()\n\n{\n\tint A[5][5],B[5],C[5],k,i,j,n,m,x=0,a=1,b=1,c,d;\n\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&A[i][j]);\n\t\t}\n\t}\n\t\n\n\tfor(i=0,m=0;i<5,m<5;i++,m++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\t\t\t\n\t\t\t\tif(A[i][j]>A[i][k])\n\t\t\t\t{\n\t\t\t\t\ta=a+1;\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\ta=a;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif(a==5)\n\t\t\t{\n\t\t\t\tB[m]=A[i][j];\n\t\t\t}\n\t\t\ta=1;\n\t\t}\n\t}\n\n\tfor(j=0,n=0;j<5,n<5;j++,n++)\n\t\t{\n\t\tfor(i=0;i<5;i++)\n\t\t\t{\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\t\t\t\n\t\t\t\tif(A[i][j]>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax[i]=a[i][0];\n\t\tfor(j=0;j<5;j++)\n\t\t\tif(max[i]a[i][j])\n\t\t\t\tmin[j]=a[i][j];\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]==max[i]&&a[i][j]==min[j])\n\t\t\t{\n\t\t\t\tcout<<++i<<\" \"<<++j<<\" \"<>a[i][j];\n\tfor(i=0;i<5;i++)//???????\n\t{\n\t\tm[i]=a[i][0];\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>m[i])\n\t\t\t\tm[i]=a[i][j];\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)//???????\n\t{\n\t\tn[j]=a[0][j];\n\t\tfor(i=1;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]>a[i][j];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tok=1;\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t\tif((a[i][k]>a[i][j])||(a[i][j]>a[k][j]))\n\t\t\t\t\tok=0;\n\t\t\tif(ok==1)\n\t\t\t{\n\t\t\t\tx=i;\n\t\t\t\ty=j;\n\t\t\t\ts=a[i][j];\n\t\t\t\tp=1;\n\t\t\t}\n\t\t}\n\tif(p==0)\n\t\tcout<<\"not found\"<>a[i][j];\n\t\t}\n\t}\n\tfor(i=1;i<6;i++)\n\t{\n\t\tfor(j=1;j<6;j++)\n\t\t{\n\t\t\tif(max[i]a[k][l])\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(k==5)\n\t\t\t\t\t{\n\t\t\t\t\t\tsig=1;\n\t\t\t\t\t\tcout<>a[i][j];\n\t\t}\n for (i=0 ; i<5 ; i++)\n\t for (j=0 ; j<5 ; j++)\n\t\t{\n\t\t\tfor (p=0 ; p<5 ; p++)\n\t\t\t{\n\t\t\t\tif (a[i][j]>a[i][p])\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\tfor (p=0 ; p<5 ; p++)\n\t\t\t{\n\t\t\t\tif (a[i][j]e){\n\t\t\t\te=sz[i][j];\n\t\t\t\tlie=j+1;\n\t\t\t\thang=i+1;\n\t\t\t}\t\n\t\t}\n\t\tk=0;\n\t\tfor(m=0;msz[m][lie-1]){\n\t\t\t\tk=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\tif(k==0){\n\t\t\t\tprintf(\"%d %d %d\",hang,lie,e);\n\t\t\t\tscanf(\"%d\",1);\n\t\t\t\treturn 0;\n\t\t\t}\n\t}\n\tprintf(\"not found\");\t \n scanf(\"%d\",1);\n return 0;\n}\n"} +{"label": "73", "index": "36244", "code": "int max(int A,int B,int C,int D,int E){\nif(A>B&&A>C&&A>D&&A>E) return A;\nelse if(B>A&&B>C&&B>D&&B>E) return B;\nelse if(C>A&&C>B&&C>D&&C>E) return C;\nelse if(D>A&&D>B&&D>C&&D>E) return D;\nelse return E;\n\n}\nint min(int L,int M,int N,int O,int P){\nif(L>a[i][0]>>a[i][1]>>a[i][2]>>a[i][3]>>a[i][4];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(a[i][j]==max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4])\n\t\t\t\t\t&&a[i][j]==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j])){\n\t\tcout<>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n\t\t\t\ttemp=j;\n\t\t}\n\t\tif(a[i][temp]<=a[0][temp]&&a[i][temp]<=a[1][temp]&&a[i][temp]<=a[2][temp]&&a[i][temp]<=a[3][temp]&&a[i][temp]<=a[4][temp])\n\t\t{\n\t\t\tgot=1;\n\t\t\tmin=i;\n\t\t\tmax=temp;\n\t\t}\n\t}\n\tif(got==1)\n\t\tcout<=a[i][m])\n\t\t\t\t\tflag=flag+1;\n\t\t\t}\n\t\t\tif(flag==5)\n\t\t\t{\n\t\t\t\tc=0;\n\t\t\t\tfor(p=1;p<=5;p++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]<=a[p][j])\n\t\t\t\t\t\tc=c+1;\n\t\t\t\t}\n\t\t\t\tif(c==5)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",i,j,a[i][j]);\n\t\t\t\t\tk=k+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0)\n\t\tprintf(\"not found\");\n\t\n\treturn 0;\n}\n"} +{"label": "73", "index": "36248", "code": "int main()\n{\n\tint a[5][5],i,j,k=0,p=0,h[5][3]={0},l[5][3]={0};\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);}}\n \n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(a[i][j]>k)k=a[i][j],h[i][0]=i,h[i][1]=j;}\n\th[i][2]=k,\tk=0;}\n\n\n\t//\tfor(i=0;i<5;i++){printf(\"%d %d %d\\n\",h[i][0],h[i][1],h[i][2]);}\n\nk=100000;\n\tfor(j=0;j<5;j++){\n\t\tfor(i=0;i<5;i++){\n\t\t\tif(a[i][j]sz[i][a]){ \n m=m+1;\n }\n \n\n }\n \n if(a!=i){\n \n if(sz[i][j]> s[ i ][ j ] ;\n\n\tfor( i = 1 ; i <= 5 ; i ++ )\n\t{\n\t\ta = i , b = 1 , t[ a ][ b ] = s[ i ][ 1 ] ;\n\n\t\tfor( j = 1 ; j <= 5 ; j ++ )\n\t\t\tif( t[ a ][ b ] < s[ i ][ j ] )\n\t\t\t\ta = i , b = j , t[ a ][ b ] = s[ i ][ j ] ;\n\n\t\tfor( j = 1 ; j <= 5 ; j ++ )\n\t\t\tif( t[ a ][ b ] <= s[ j ][ b ] )\n\t\t\t\tc ++ ;\n\n\t\tif( c == 5 )\n\t\t{\n\t\t\tcout << a << ' ' << b << ' ' << t[ a ][ b ] << endl ;\n\t\t\tm = 1 ;\n\t\t}\n\n\t\tc = 0 ;\n\t}\n\n\tif( m == 0 )\n\t\tcout << \"not found\" << endl ;\n\t\n\treturn 0 ;\n}\n\n\n\n"} +{"label": "73", "index": "36251", "code": "main()\n{\n int i,j,k,max,maxj,f;\n int a[5][5];\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n for(i=0;i<5;i++)\n {\n max=a[i][0];\n k=0;\n maxj=1;\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max)\n {\n max=a[i][j];\n k=j;\n }\n }\n for(f=0;f<5;f++)\n {\n if(max>a[f][k])\n {\n maxj=0;\n break;\n }\n }\n if(maxj==1)\n {\n printf(\"%d %d %d\\n\",i+1,k+1,max); \n break;\n }\n }\n if(maxj==0)\n printf(\"not found\"); \n}"} +{"label": "73", "index": "36252", "code": "//***************************\n//*??????? **\n//*????? 1300012921 **\n//*???2013.11.05 **\n//*************************** \nint main()\n\n{\n\tint a[6][6];\n\t\n\tfor(int i = 1; i <= 5; i++)\n\t{\n\t\tfor(int j = 1; j <= 5; j++)\n\t\t\tcin >> a[i][j];\n\t}\n\t\n\tint max, min, row, col, flag = 0;\n\tfor(int i = 1; i <= 5; i++)\n\t{\n\t\tcol = 1;\n\t\tmax = a[i][1];\n\t\tfor(int j = 2; j <= 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > max)\n\t\t\t{ \n\t\t\t\tmax = a[i][j];\n\t\t\t\tcol = j;\n\t\t\t} \n\t\t}\n\t\t\n\t\trow = 1;\n\t\tmin = a[1][col];\n\t\tfor(int k = 2; k<= 5; k++)\n\t\t{\n\t\t\tif(a[k][col] < min)\n\t\t\t{\t\n\t\t\t\tmin = a[k][col];\n\t\t\t\trow = k;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif(row == i)\n\t\t{\n\t\t\tcout << row << \" \" << col << \" \" << a[row][col] << endl;\n\t\t\tflag += 1;\n\t\t}\n\t\telse\n\t\t\tflag += 0;\n\t}\n\tif(flag == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n } "} +{"label": "73", "index": "36253", "code": "int main()\n{\tint a[M][N], i, j, k, p, count=0; \n\t\n\tfor ( i = 0; i < M; i ++ )\n\t{\n\t\tfor(j = 0; j < N; j++ )\n\t\t{\n\t\t\tscanf ( \"%d\", &a[i][j] );\n\t\t}\n\t}\n\tfor ( i = 0; i < M; i ++ )\t\n\t{\n\t\tp=0;\n\t\tfor ( j = 0; j < N; j++ )\n\t\t{\n\t\t\tif(a[i][p]a[k][p])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(k==M)\n\t\t{\n\t printf(\"%d %d %d\\n\",i+1,p+1,a[i][p]);\n\t\tcount++;\n\t\t}\n\t}\n\tif(count==0)\n\t{\n\t\tprintf(\"not found\\n\");\n\t}\n\treturn 0;\n}\n"} +{"label": "73", "index": "36254", "code": "int main()\n{\n\tint c[6][6], a[6], b[6], i, j, n = 0;//??a??????????????b????????????n???????? \n\tfor (i = 1; i <= 5; i++)\n\t for (j = 1; j <= 5; j++)\n\t cin >> c[i][j];\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\ta[i] = 1;\n\t\tb[i] = 1;\n\t\tfor (j = 2; j <= 5; j++)\n\t\t{\n\t\t\tif (c[i][j] > c[i][a[i]])\n\t\t\t a[i] = j;\n\t\t\tif (c[j][i] < c[b[i]][i])\n\t\t\t b[i] = j;\n\t\t}\n\t}\n\tfor (i = 1; i <= 5; i++)\n\t if (b[a[i]] == i)\n\t {\n\t \tcout << i << ' ' << a[i] << ' ' << c[i][a[i]] << endl;\n\t\t\tn++; \n\t }\n\tif (n == 0)\n\t cout << \"not found\";\n\treturn(0);\n}"} +{"label": "73", "index": "36255", "code": "int main() //?????\n{\n\tint a[6][6],line,row,flag=0;\n\tfor (int i=1;i<=5;i++)\n\t{\t\n\t\tfor (int t=1;t<=5;t++)\n\t\t\tcin >> a[i][t];\n\t}\n\tfor (int k=1;k<=5;k++)\n\t{\t\t\t\n\t\tint count=0,max=0;\n\t\tfor (int p=1;p<=5;p++)\n\t\t{\n\t\t\trow = k;\n\t\t\tif (a[k][p]>max)\n\t\t\t{\n\t\t\t\tmax=a[k][p];\n\t\t\t\tline = p;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tfor (int q=1;q<=5;q++)\n\t\t{\n\n\t\t\tif (a[q][line]>=max)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\tif (count==5)\n\t\t\t{\n\t\t\t\tflag++;\n\t\t\t\tcout << row << \" \" << line << \" \" << a[row][line] << endl;\n\t\t\t}\n\t}\n\tif (flag==0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\t\t\t\t\n\n\n\n"} +{"label": "73", "index": "36256", "code": "/*\nhw.cpp\n????yang?\n???????\n???10.28\n*/\nint main()\n{\n\tint a[6][6],s[6]={1,1,1,1,1,1},n[6]={1,1,1,1,1,1},h=0,l=0;//????????????s[]??n[]????h??l\n\tfor(int i=1;i<=5;i++)\n\t{\n\t\tfor(int j=1;j<=5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}//????\n\tfor(int i=1;i<=5;i++)\n\t{\n\t\tfor(int j=1;j<=5;j++)\n\t\t{\n\t\t\tif(a[i][j]>a[i][s[i]])\n\t\t\t{s[i]=j;}\n\t\t\tif(a[n[j]][j]>a[i][j])\n\t\t\t{n[j]=i;}\n\t\t}\n\t}//?????????????\n\tfor(int i=1;i<=5;i++)\n\t{\n\t\tif(s[n[i]]==i)//????\n\t\t{h=n[i];l=i;\n\t\tbreak;}\n\t}//????\n\tif(h*l==0) cout<<\"not found\"<> a[i][j];\n\tmemset(b,0,sizeof(b));\n\tfor(int i=0;i<=4;i++)\n\t{\n\t\tmax=0;\n\t\tfor(int j=0;j<=4;j++)\n\t\t\tif(a[i][j]>max)\n\t\t\t\tmax=a[i][j];\n\t\tfor(int j=0;j<=4;j++)\n\t\t\tif(a[i][j]==max)\n\t\t\t{\n\t\t\t\tb[i][j]++;\n\t\t\t\t//cout <<\"b\"<>array[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\timax[i]=array[i][0];\n\t\tmax[i]=0;\n\t\tfor(j=1;j<5;j++)\n\t\t\tif(array[i][j]>imax[i])\n\t\t\t{\n\t\t\t\timax[i]=array[i][j];\n\t\t\t\tmax[i]=j;\n\t\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\timin[j]=array[0][j];\n\t\tmin[j]=0;\n\t\tfor(i=1;i<5;i++)\n\t\t\tif(array[i][j]>a[i][j];\nfor(int i=1;i<6;i++)\n {\n a[i][0]=-999999999;\n for(int j=1;j<6;j++)\n if(a[i][j]>a[i][0])\n {\n a[i][0]=a[i][j];\n b[i]=j; \n }\n }\nfor(int i=1;i<6;i++)\n {\n a[0][i]=999999999;\n for(int j=1;j<6;j++)\n if(a[j][i]> a[i][j];\n\t\t}\n\t}\n\tfor (int i = 1; i <= 5; i++) {\n\t\tint ans = 1;\n\t\tfor (int j = 1; j <= 5; j++) {\n\t\t\tif (a[i][p] < a[i][j]) { //?????????i??????a[i][p]\n\t\t\t\tp = j;\n\t\t\t}\n\t\t}\n\t\tfor (int k = 1; k <= 5; k++) {\n\t\t\tif (a[i][p] > a[k][p]) { //??a[i][p]????p???????\n\t\t\t\tans = 0; //?????ans=0;\n\t\t\t}\n\t\t}\n\t\tif (ans) { //?ans=1,?a[i][p]???????????????????????\n\t\t\tflag = 0;\n\t\t\tcout << i << ' ' << p << ' ' << a[i][p] << endl;\n\t\t}\n\t}\n\tif (flag) { //??flag=1,???????\n\t\tcout << \"not found\" << endl;\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36261", "code": "main ()\n{\n int a[5][5];\n int i,j,k,x=0,z,m=0,y,b=0;\n for(i=0;i<5;i++)\n {\n\t\tfor(j=0;j<5;j++)\n\t\tscanf(\"%d\",&a[i][j]);\n }\n for(i=0;i<5;i++)\n {\n\t \n for(j=0;j<5;j++)\n {\n\t \tx=0;\n\t\t for(k=0;k<5;k++)\n\t\t {\n\t\t\tif(a[i][j]>a[i][k])\n\t\t\tx++;\n\t\t }\n\t\t if(x==4)\n\t\t {\n\t\t\tm=0; \n\t\t\tfor(z=0;z<5;z++) \n\t\t\t{\n\t\t\t\tif(a[i][j]>a[i][k];\n\tfor(i = 0; i < 5; i++)\n\t\tfor(k = 0; k < 5; k++)\n\t\t\t{\n\t\t\t\tint n= 0;\n\t\t\t\tfor(int q = 0; q < 5; q++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i][k] >= a[i][q])\n\t\t\t\t\t\tn++;\n\t\t\t\t\tif(a[i][k] <= a[q][k])\n\t\t\t\t\t\tn++;\n\t\t\t\t\tif(n == 10)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << i + 1 << \" \" << k + 1 << \" \" << a[i][k] << endl;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36263", "code": "int main(){\n\tint m,n,i,j,k=0;\n int result1=0,result2=0;\n int a[10][10];\nfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n}\nfor(i=0;i<5;i++){\n\tfor(j=0;j<5;j++){\n\t\tfor(m=0;m<5;m++){\n\t\t\tif(a[i][j]a[n][j]) {result2++;} }\n\t\t\t if(result1==0&&result2==0) {printf(\"%d %d %d\",i+1,j+1,a[i][j]);}\n\t\t\t else {k++;}\n\t\tresult1=0;\n\t\tresult2=0;\n\t}\n}\n\t\t\nif(k==25)\t{printf(\"not found\");}\t\nreturn 0;\n}"} +{"label": "73", "index": "36264", "code": "\nint main(){\n\tint a[5][5];\n\tint min;\n\tint i,j,k,l,result=0;\n\tfor(j=0;j<5;j++){\n\t\tfor(i=0;i<5;i++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tmin=a[i][0];\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(a[i][j]<=min){\n\t\t\t\tmin=a[i][j];\n\t\t\t\tk=j;\n\t\t\t}\n\t\t}\n\t\tfor(l=0;l<5;l++){\n\n\t\t\tif(a[l][k]>a[i][k])break;\n\t\t\tif(l==4){\n\t\t\t\tresult=1;\n\t\t\t\tprintf(\"%d %d %d\",k+1,i+1,a[i][k]);\n\t\t\t}\n\n\t\t}\n\t}\n\tif(result==0)printf(\"not found\");\t\n\t\n\treturn 0;\n}"} +{"label": "73", "index": "36265", "code": "\n\nint main()\n{\n\tint a[5][5];\n\tint flag[5][5];\n\tfor (int i=0;i<5;i++)\n\t\tfor (int j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tflag[i][j]=0;\n\t\t}\n\tfor (int i=0;i<5;i++)\n\t{\n\t\tint max=0;\n\t\tfor (int j=1;j<5;j++)\n\t\t\tif (a[i][max]a[i][j]) min=i;\n\t\tflag[min][j]++;\n\t}\n\tfor (int i=0;i<5;i++)\n\t\tfor (int j=0;j<5;j++)\n\t\t\tif (flag[i][j]==2) \n\t\t\t{\n\t\t\t\tcout<> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4];\n }//??????? \n for (int r = 0; r < 5; r++)\n {\n int k = 0; //??k???????????\n for (int j = 1; j < 5; j++)//??????????? \n {\n if (a[r][k] < a[r][j]) k = j;\n } //???????????k\n if (a[r][k] < a[(r + 4) % 5][k] &&\n a[r][k] < a[(r + 1) % 5][k] &&\n a[r][k] < a[(r + 2) % 5][k] &&\n a[r][k] < a[(r + 3) % 5][k])//????????????????5\n {\n flag = 1; //???????? \n cout << r + 1 << \" \" << k + 1 << \" \" << a[r][k] << endl; //????????????? \n }\n }\n if (flag == 0) cout << \"not found\" << endl; //????????\u0093not found\u0093 \n \n return 0; \n} \n"} +{"label": "73", "index": "36267", "code": "main()\n{\n int a[5][5];\n int x[5]={0};\n int y[5]={0};\n int i,j,k=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n } \n }\n for(i=0;i<5;i++)\n {\n int max=a[i][0];\n for(j=0;j<5;j++)\n {\n if(a[i][j]>max)\n {\n max=a[i][j];\n x[i]=j;\n } \n } \n }\n for(j=0;j<5;j++)\n {\n int min=a[0][j];\n for(i=0;i<5;i++)\n {\n if(a[i][j]<=min)\n {\n min=a[i][j];\n y[j]=i;\n } \n } \n }\n for(i=0;i<5;i++)\n {\n if(y[x[i]]==i)\n {\n k++;\n printf(\"%d %d %d\\n\",i+1,x[i]+1,a[i][x[i]]);\n } \n }\n if(k==0) \n printf(\"not found\");\n\n}"} +{"label": "73", "index": "36268", "code": "int main()\n{\n\tint mat[5][5]; //????mat??????\n\tint maxh[5]={0},l[5],minl[5]={100000,100000,100000,100000,100000},h[5]; //maxh?????????,l????????????,minl????????,h????????????\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>mat[i][j]; //???????\n\t\t\tif(mat[i][j]>=maxh[i]) //??????\n\t\t\t{\n\t\t\t\tmaxh[i]=mat[i][j]; //??????\n\t\t\t\tl[i]=j; //??????????\n\t\t\t}\n\t\t\tif(mat[i][j]<=minl[j]) //??????\n\t\t\t{\n\t\t\t\tminl[j]=mat[i][j]; //??????\n\t\t\t\th[j]=i; //??????????\n\t\t\t}\n\t\t}\n\t}\n\tint tag=0; //tag?????????\n\tfor(int k=0;k<5;k++)\n\t{\n\t\tif(h[l[k]]==k) //???????\n\t\t{\n\t\t\tcout<=a[i][f])\n\t\t\t{\n\t\t\t\tmin=a[i][f];\n\t\t\t\ttemp=i;\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif(min>a[i][j];\n\t\t\tc[i][j]=b[i][j]=a[i][j];\n\t\t}\n\t}\n\t\n\tfor (i=1;i<=5;i++)//???????????????????\n\t{\n\t\tfor (j=1;j<=4;j++)\n\t\t{\n\t\t\tif (a[i][j]>a[i][j+1])\n\t\t\t{\n\t\t\t\ttemp1=a[i][j];\n\t\t\t\ta[i][j]=a[i][j+1];\n\t\t\t\ta[i][j+1]=temp1;\n\t\t\t}\n\t\t}\n\t}//???,???a[i][j]?,?????????????a[i][5]????\n\t\n\tfor (j=1;j<=5;j++)//???????????????????\n\t{\n\t\tfor (i=1;i<=4;i++)\n\t\t{\n\t\t\tif (b[i][j]> a[i][j];\n\n for(i = 0;i < 5;i++)\n { rowmax = a[i][0];\n\t\tfor(j = 0;j < 5;j++)\n\t\t{ \n\t\t\tif(a[i][j] >= rowmax)\n\t\t\t\trowmax = a[i][j];\n \n\t\t}\n\t\t\n\t\tfor(j = 0;j < 5;j++)\n\t\t{\n\t\t\tif(a[i][j] == rowmax)\n\t\t\t\tp = j;\n\t\t}\n\t\t\n\t\n\t\tfor(k = 0;k < 5;k++)\n\t\t{\n\t\t\tif(a[i][p] <= a[k][p])\n\t\t\t m = i;\n\t\t else \n\t\t\t{\n\t\t\t\tm = -1;\n\t\t\t break;\n\t\t\t}\n\t\t}\n\n\t\tif(m == i)\n\t\t{ \n\t\t\tcout << m + 1 << \" \" << p + 1 << \" \" << a[i][p] << endl;\n cnt++;\n\t\t}\n\t\t \n\t}\n\t \n\tif(cnt == 0)\n\t\tcout << \"not found\" << endl;\n\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36272", "code": "int main()\n{\n\tint s[5][5];\n\tint i, j, k, n, max;\n\tint flag[5];\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\", &s[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tmax=s[i][0];\n\t\tn=0;\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(s[i][j]>max) {\n\t\t\t\tmax=s[i][j];\n\t\t\t\tn=j;\n\t\t}\n\t\t}\n\t\tflag[i]=1;\n\t\tfor(k=0;k<5;k++){\n\t\t\tif(s[k][n]*(*(p+k)+j))\nt--;}\nif(t==0)\n{printf(\"%d %d %d\",i+1,j+1,a[i][j]);\nl--;}\n}}\nif(l==0)\nprintf(\"not found\");\n}\n\n"} +{"label": "73", "index": "36274", "code": "int main()\n{\n\tint a[5][5], i, j, row[5], col[5], sum, n;\n\tint max[5] = {0};\n\tsum = 0;\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tfor(j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\t}\n\tfor(i = 0; i < 5; i++)\n for(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > max[i])\n\t\t\t{\n\t\t\t\tmax[i] = a[i][j];\n\t\t\t\trow[i] = i;\n\t\t\t col[i] = j;\n\t\t\t}\n\t\t}\n\tfor(n = 0; n < 5; n++)\n\t{\n\t\tfor(i = 0; i < 5; i++)\n\t\t{\n\t\t\tif(a[i][col[n]] < max[n]) break;\n\t\t}\n\t\tif(i == 5)\n\t\t{\n\t\t\tsum++;\n\t\t\tcout << row[n] + 1 << \" \" << col[n] + 1 << \" \" << max[n] << endl;\n\t\t}\n }\n\tif(sum == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n"} +{"label": "73", "index": "36275", "code": "int main()\n{\n\tint a[5][5] ,g = 0;\n\tfor(int i = 0; i < 5; i++)\n\t\tfor(int j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\tfor(int m = 0; m < 5; m++)\n\t{\t\n\t\tint max = a[m][0], p = 0;\n\t\tfor(int j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(max < a[m][j])\n\t\t\t{\n\t\t\t\tmax = a[m][j];\n\t\t\t\tp = j;\n\t\t\t}\n\t\t}\n\t\tint min = a[0][p];\n\t\tfor(int k = 0; k < 5; k++)\n\t\t{\n\t\t\tif(min > a[k][p])\n\t\t\t\tmin = a[k][p];\n\t\t}\n\t\tif(max == min)\n\t\t{\n\t\t\tcout << m + 1 << \" \" << p + 1 << \" \" << max << endl;\n\t\t\tg++;\n\t\t}\n\t}\n\tif(g == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\t\t\t\n\t\t\t\t\n\t\t\n\n\n\t\t\t"} +{"label": "73", "index": "36276", "code": "//********************************\n//*???? **\n//*????? 1300012848 **\n//*???2013.11.1 **\n//********************************\nint main()\n{\n\tint a[5][5], g = 0;\n\tfor (int i = 0; i < 5; i++)\n\t\tfor (int j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\tfor (int i = 0; i < 5; i++)\n\t\tfor (int j = 0; j < 5; j++)\n\t\t\tif (a[i][j] <= a[0][j] && a[i][j] <= a[1][j] && a[i][j] <= a[2][j] && a[i][j] <= a[3][j] && a[i][j] <= a[4][j]\n\t\t\t&& a[i][j] >= a[i][0] && a[i][j] >= a[i][1] && a[i][j] >= a[i][2] && a[i][j] >= a[i][3] && a[i][j] >= a[i][4])\n\t\t\t{\t\n\t\t\t\tcout << i+1 << \" \" << j+1 << \" \" << a[i][j] << endl; //??i?j??????? ??????\n\t\t\t\tg = 1; //???????g=1\n\t\t\t}\n\tif(g == 0) //g=0?????\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36277", "code": "int main()\n{\n\tint i,j,l,max[5],min[5],sz[5][5],sum=0,big[5];\n\tfor(i=0;i<=4;i++){\n\t\tscanf(\"%d %d %d %d %d\",&sz[i][0],&sz[i][1],&sz[i][2],&sz[i][3],&sz[i][4]);\n\t}\n\tfor(i=0;i<5;i++){\n\t\tmax[i]=sz[i][0];\n\t}\n\tfor(j=0;j<5;j++){\n\t\tmin[j]=sz[0][j];\n\t}\n\tfor(i=0;i<5;i++){\n\t\tfor(l=0;l<5;l++){\n\t\t\tif(sz[i][l]>=max[i]){\n\t\t\t\tmax[i]=sz[i][l];\n\t\t\t\tbig[i]=l;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++){\n\t\tfor(l=0;l<5;l++){\n\t\t\tif(sz[l][j]<=min[j]){\n\t\t\t\tmin[j]=sz[l][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tif(max[i]==min[big[i]]){\n\t\t\tprintf(\"%d %d %d\\n\",i+1,big[i]+1,max[i]);\n\t\t\t\tsum++;\n\t\t}if(i==4&&sum==0){\n\t\t\tprintf(\"not found\");\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36278", "code": "int main()\n{\n int a[5][5];\n int i,j;\n int sum=0;\n int p;\n int min,max;\n\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++)\n {\n p=0;\n max=a[i][0];\n for(j=1;j<5;j++)\n {\n if(a[i][j]>max)\n {\nmax=a[i][j]; \np=j;\n }\n }\n //printf(\"*%d*%d*\\n\",i,p);\n min=a[0][p];\n for(j=0;j<5;j++)\n {\n if(a[j][p]=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])\n b[i][j]=1;\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n c[i][j]=1;\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n d[i][j]=b[i][j]*c[i][j];\n if(d[i][j]==1)\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n }\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n d[i][j]=b[i][j]*c[i][j];\n if(d[i][j]==0)\n k=k+1;\n }\n }\n if(k==25)\n printf(\"not found\");\n \n}\n"} +{"label": "73", "index": "36280", "code": "int main()\n{ int a[6][6],i,j,max,k=0,mark=0;//????????????????????i?j????????max?????k?mark?\n for(i=1;i<6;i++)//??????\n\t {for(j=1;j<6;j++)\n\t cin>>a[i][j];}\n \n for(i=1;i<6;i++)//?????????????????????\n {max=a[i][1];\n\t for(j=1;j<6;j++)\n\t {if(a[i][j]>=max) \n\t\t {max=a[i][j];k=j;}\n\t }\n \n\tif(a[i][k]<=a[1][k]&&a[i][k]<=a[2][k]&&a[i][k]<=a[3][k]&&a[i][k]<=a[4][k]&&a[i][k]<=a[5][k]) //???????????????????????\n\t\n\t\t {mark=1;\n\t\t cout<>a[i][j];\n\tfor(i=0;i<5;i++)\n\t\tmax[i]=a[i][0];\n\tfor(j=0;j<5;j++)\n\t\tmin[j]=a[0][j];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\t{if(a[i][j]>max[i]) max[i]=a[i][j];\n\t\t\tif(a[i][j]a)\n m=a;\n if(m>b)\n m=b;\n if(m>c)\n m=c;\n if(m>d)\n m=d;\n if(m>e)\n m=e;\n}\nmain()\n{\n int a[5][5],j,i,b[5],c[5],z=0;\n for(i=0;i<5;i++) \n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++)\n {\n b[i]=max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);\n } \n for(i=0;i<5;i++)\n {\n c[i]=min(a[0][i],a[1][i],a[2][i],a[3][i],a[4][i]);\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(b[i]==c[j])\n {z=1;printf(\"%d %d %d\\n\",i+1,j+1,b[i]);}\n }\n } \n if(z==0)\n printf(\"not found\\n\");\n}\n"} +{"label": "73", "index": "36283", "code": "//****************************************\n//*??????? **\n//*?????? 1100012920 **\n//*???2011.10.19 **\n//****************************************\nint main()\n{\n\tint a[5][5], i, j, k, m = 0, n = 0, flag = 0;\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tfor(j = 0; j < 4; j++)\n\t\t{\n\t\t\tif(a[i][j+1] > a[i][m])\n\t\t\t\tm = j + 1;\n\t\t}\n\t\tfor(k = 0; k < 5; k++)\n\t\t{\n\t\t\tif(a[k][m] < a[i][m])\n\t\t\t{\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t else n = 1;\n\t\t}\n\t\tif(k == 5) \n\t\t{\n\t\t\tflag = 1;\n\t\t\tcout << i+1 << \" \" << m+1 << \" \" << a[i][m] << endl;\n\t\t}\n\t\tm = 0;\n\t\t\n\t}\n\tif(flag == 0) cout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36284", "code": "int main()\n{\n\tint\ta[5][5];\t//????5*5???\n\tint\tq = 0, hang, lie;\t\n\tfor (int i = 0; i < 5; i ++)\n\t{\n\t\tfor (int j = 0; j < 5; j ++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t} \n\tfor (int i = 0; i < 5; i ++)\n\t{\n\t\tint \tp = 0;\n\t\tint\tk;\n\t\tfor (int j = 0; j < 5; j ++)\n\t\t{\n\t\t\tif (p < a[i][j])\n\t\t\t{\n\t\t\t\tp = a[i][j];\t\t\t\t\n\t\t\t\tlie = j;\n\t\t\t}\n\t\t}\n\t\tfor (k = 0; k < 5; k ++)\n\t\t{\n\t\t\tif (p > a[k][lie])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (k == 5)\n\t\t{\n\t\t\thang = i + 1;\n\t\t\tlie ++;\n\t\t\tcout << hang << \" \" << lie << \" \" << p << endl;\n\t\t\tq = 1;\n\t\t}\n\t}\n\tif (q == 0)\n\t{\n\t\tcout << \"not found\" << endl;\n\t}\nreturn 0;\n}"} +{"label": "73", "index": "36285", "code": "main()\n{\n int a[5][5],b[5][5];\n int i,j,k,js;\n for(i=0;i<5;i++)\n scanf(\"%d %d %d %d %d\",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n b[i][j]=1;\n js=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n {\n for(k=0;k<5;k++)\n {\n if(a[i][j]>a[k][j])\n b[i][j]=0;\n }\n for(k=0;k<5;k++)\n {\n if(a[i][j]> a[i][j];\n max[i] = a[i][max[i]] > a[i][j] ? max[i] : j;\n\t\t}\n\t}\n\tfor(j = 0; j < 5; j++)\n\t{\n\t\tfor(tell = 0, i = 0; i < 5; i++)\n\t\t\tif(a[j][max[j]] > a[i][max[j]])\n\t\t\t\ttell = 1;\n\t\tif(tell == 0)\n\t\t{\n\t\t\tcout << j + 1 << \" \" << max[j] + 1 \n\t\t\t\t<< \" \" << a[j][max[j]] << endl;\n\t\t\talltell++;\n\t\t}\n\t}\n\tif (alltell == 0) cout << \"not found\" << endl;\n\treturn 0;\n}\n\t"} +{"label": "73", "index": "36287", "code": "int main ()\n{\n\tint a[6][6] , hang1 , hang2 , lie , i , j , k , max , min , flag = 1 ;\n\tfor ( i = 1 ; i <= 5 ; i++ )\n\t{\n\t\tfor ( j = 1 ; j <= 5 ; j++ )\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor ( i = 1 ; i <= 5 ; i++ )\n\t{\n\t\tmax = a[i][1] ;\n\t\thang1 = i ;\n\t\tlie = 1 ;\n\t\tfor ( j = 1 ; j <= 5 ; j++ )\n\t\t{\n\t\t\tif ( a[i][j] >= max )\n\t\t\t{\n\t\t\t\tmax = a[i][j] ;\n\t\t\t\tlie = j ;\t\t\n\t\t\t}\n\t\t}\n\t min = a[hang1][lie] ;\n\t\tfor ( k = 1 ; k <= 5 ; k++ )\n\t\t{\n\t\t\tif ( a[k][lie] <= min )\n\t\t\t{\n\t\t\t\tmin = a[k][lie] ;\n\t\t\t\thang2 = k ;\n\t\t\t}\n\t\t}\n\t if ( hang1 == hang2 )\n\t\t{\n\t\t cout << hang1 << ' ' << lie << ' ' << a[hang1][lie] << endl ;\n\t\t\tflag = 0 ;\n\t\t\tbreak ;\n\t\t}\n else if ( hang1 != hang2 ) \n\t\t{\n\t\t continue ;\n\t\t}\n\t}\n\tif ( flag ) \n\t{\n\t\tcout << \"not found\" << endl ;\n\t}\n\treturn 0 ;\n}"} +{"label": "73", "index": "36288", "code": "int main(){\n double a[7][7],max,c[7];\n int x=0,y=0,d=0;\n for(int i=0;i<7;i++){\n for(int j=0;j<7;j++){\n if(i==0||i==6||j==0||j==6)\n a[i][j]=0;\n else\n scanf(\"%lf\",&a[i][j]);\n }\n }\n for(int m=1;m<6;m++){\n c[m]=1;\n max=0;\n for(int n=1;n<6;n++){\n if(a[m][n]>max){\n max=a[m][n];\n x=n;\n y=m;\n }\n }\n for(int t=1;t<=5;t++){\n if(max>a[t][x])\n c[m]=0;\n }\n if(c[m]==1){\n d=1;\n printf(\"%d %d %.0lf\",y,x,max);\n }\n }\n if(d==0)\n printf(\"not found\");\n return 0;\n}"} +{"label": "73", "index": "36289", "code": "int main() //?????\n{\n\tint a[10][10]={0}; //????a????????\n\tint max[10]={0}; //????max????????\n\tint m[10]={0}; //????m???????????\n\tint min[10]={0}; //????min????????\n\tfor(int i = 1 ; i <= 5 ; i++) //????\n\t{\n\t\tfor(int j = 1 ; j <= 5 ; j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n \n\tfor(int i = 1 ; i <= 5 ; i++) //?????????????????max????????????\n\t{\n\t\tmax[i]=a[i][1];\n\t\tfor(int j = 1 ; j <= 5 ; j++)\n\t\t{\n\t\t\tif(max[i]<=a[i][j])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tm[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\n for(int j = 1 ; j <= 5 ; j++) //?????????????????min\n\t{ \n\t\tmin[j]=a[1][j];\n\t\tfor(int i = 2 ; i <= 5 ; i++)\n\t\t{\n\t\t\tif(min[j]>a[i][j])\n\t\t\t{\n\t\t\t\tmin[j]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n int count=0; //????count????\n\tfor(int i = 1 ; i <= 5 ; i++) //???????? ??????????????\n\t{\n\t\tif(max[i]==min[m[i]])\n\t\t{\n\t\t\tcout<>aa[i][j];\n }\n }\nfor(i=1;i<=5;i++){\n bb[i]=aa[i][1]; \n for(j=2;j<=5;j++){\n if(aa[i][j]>=bb[i])\n bb[i]=aa[i][j];\n }\n }\nfor(i=1;i<=5;i++){\n dd[i]=aa[1][i]; \n for(j=2;j<=5;j++){\n if(aa[j][i]<=dd[i])\n dd[i]=aa[j][i];\n }\n } \n c=0; \nfor(i=1;i<=5;i++){\n for(j=1;j<=5;j++){\n if(bb[i]==dd[j]){\n cout<x)\n\t{\n\t\tx=b;\n\t}\n\tif(c>x)\n\t{\n\t\tx=c;\n\t}\n\tif(d>x)\n\t{\n\t\tx=d;\n\t}\n\tif(e>x)\n\t{\n\t\tx=e;\n\t}\n\treturn x;\n}\n\nint min(int a,int b,int c,int d,int e)\n{\n\tint x=a;\n\tif(b>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(((((a[i][j]-a[i][0])>0)+((a[i][j]-a[i][1])>0)+\n\t\t\t\t\t((a[i][j]-a[i][2])>0)+((a[i][j]-a[i][3])>0)+\n\t\t\t\t\t((a[i][j]-a[i][4])>0))==4)&&(((a[i][j]-a[0][j])<0)+((a[i][j]-a[1][j])<0)+\n\t\t\t\t\t((a[i][j]-a[2][j])<0)+((a[i][j]-a[3][j])<0)+((a[i][j]-a[4][j])<0)==4)) {\n\t\t\t\tcout<g){\n g=a[i][j];\n \n b[i]=i;\n c[i]=j;\n }\n }\n }\n for(j=0;j<5;j++){\n h=1000000;\n for(i=0;i<5;i++){\n if(a[i][j]>a[i][j];\n\t}\n\tfor(i=0;i<5;i++)\n\t\tmax[i]=a[i][0];\n\tfor(j=0;j<5;j++)\n\t\tmin[j]=a[0][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i])\n\t\t\t\tmax[i]=a[i][j];\n\t\t\tif(a[i][j]> a[i][j];\n\tfor(int i = 1; i <= 5; i++)\n\t\tfor(int j = 1; j <= 5; j++)\n\t\t\t{if(a[i][j] > max[i])\n\t\t\tmax[i] = a[i][j];}\n\tfor(int j = 1; j <= 5; j++)\n\t\tfor(int i = 1; i <= 5; i++)\n\t\t\t{if(a[i][j] < min[j])\n\t\t\tmin[j] = a[i][j];}\n\tfor(int i = 1; i <= 5; i++)\n\t\tfor(int j = 1; j <= 5; j++)\n\t\t\tif(max[i] == min[j])\n\t\t\t{\n\t\t\t\tcout << i << \" \" << j << \" \" << max[i] << endl;\n\t\t\t count = 1;\n\t\t }\n\tif (count == 0)\n\t\tcout << \"not found\" << endl;\n\n\n\n\n\n\n\t\n\t\n\t\n\treturn 0;\n}"} +{"label": "73", "index": "36296", "code": "int main()\n{\n\tint a[5][5],i,j,s,t,max=0,hang,lie,m=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t}\n\tfor(i=0;i<5;i++)\n\t{\nmax=0;\n\t\tt=0;\n\t\tfor(s=0;s<5;s++)\n\t\t{\n\t\t\tif(a[i][s]>=max)\n\t\t\t{\n\t\t\t\tmax=a[i][s];hang=i;lie=s;\n\t\t\t}\n\t\t}\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(max>a[j][lie])\n\t\t\t\tt++;\n\t\t}\n\t\tif(t==0)\n\t\t{\tprintf(\"%d %d %d\",hang+1,lie+1,max);\n\t\t m++;\n\t\t}\n\t}\n\tif(m==0)\n\t\tprintf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36297", "code": "int main()\n{\n\tint a[5][5];\n\tint i, j;\n\tint flag=1, count=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor (j=0;j<5;j++)\n\t\t\tscanf(\"%d\", &a[i][j]);\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][0]a[0][0]||a[i][0]>a[1][0]||a[i][0]>a[2][0]||a[i][0]>a[3][0]||a[i][0]>a[4][0])\n\t\t\t\tflag=0;\n\t\t\telse \n\t\t\t{\n\t\t\t\tprintf(\"%d 1 %d\\n\", i+1, a[i][0]); \n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][1]a[0][1]||a[i][1]>a[1][1]||a[i][1]>a[2][1]||a[i][1]>a[3][1]||a[i][1]>a[4][1])\n\t\t\t\tflag=0;\n\t\t\telse \n\t\t\t{\n\t\t\t\tprintf(\"%d 2 %d\\n\", i+1, a[i][1]); \n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][2]a[0][2]||a[i][2]>a[1][2]||a[i][2]>a[2][2]||a[i][2]>a[3][2]||a[i][2]>a[4][2])\n\t\t\t\tflag=0;\n\t\t\telse \n\t\t\t{\n\t\t\t\tprintf(\"%d 3 %d\\n\", i+1, a[i][2]);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][3]a[0][3]||a[i][3]>a[1][3]||a[i][3]>a[2][3]||a[i][3]>a[3][3]||a[i][3]>a[4][3])\n\t\t\t\tflag=0;\n\t\t\telse \n\t\t\t{\n\t\t\t\tprintf(\"%d 4 %d\\n\", i+1, a[i][3]); \n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][4]a[0][4]||a[i][4]>a[1][4]||a[i][4]>a[2][4]||a[i][4]>a[3][4]||a[i][4]>a[4][4])\n\t\t\t\tflag=0;\n\t\t\telse \n\t\t\t{\n\t\t\t\tprintf(\"%d 5 %d\\n\", i+1, a[i][4]); \n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tif (flag==0&&count==0)\n\t\t\tprintf(\"not found\\n\");\nreturn 0;\n}\n\n\n\n\n\n\n\n"} +{"label": "73", "index": "36298", "code": "int main()\n{\n\tint k[5][5],m[5]={0};\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>k[i][j];\n\t\t\tif(k[i][j]>k[i][m[i]])\n\t\t\t{\n\t\t\t\tm[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tint flag=0,mark=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tflag=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(k[i][m[i]]<=k[j][m[i]])\n\t\t\t\t;\n\t\t\telse\n\t\t\t\tflag=1;\n\t\t}\n\t\tif(flag==0)\n\t\t{\n\t\t\tmark=1;\n\t\t\tcout<>a[i][j];\n\tfor(i=0;i<5;i++){\n\t\tx=0;\n\t\ty=0;\n\t\tt=a[i][0];\n\t\tfor(j=0;j<4;j++){//???????\n\t\t\tif(ta[k][y])\n\t\t\t\tbreak;\n\t\t}\n\t\tif(k==5){//???????????\n\t\t\tx=i;\n\t\t\tcout<e)\n\t\t\t{\n\t\t\t\tn=j;\n\t\t\te=sz[i][j];\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tif(e<=sz[0][n]&&e<=sz[1][n]&&e<=sz[2][n]&&e<=sz[3][n]&&e<=sz[4][n])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,n+1,e);\n\t\t\t\tp=p*0;\n\t\t\t}\n\t}\n\tif(p==1)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n\n\n}"} +{"label": "73", "index": "36301", "code": "int main(){\n\tint a[5][5],result[5];\n\tint i,j,max,min,c,d,e,p;\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++){\n\t\tmax=a[i][0];\n\t\tc=i;\n\t\td=0;\n\t\tfor(j=1;j<5;j++){\n\t\t\tif(a[i][j]>max){\n\t\t\t\tmax=a[i][j];\n\t\t\t\tc=i;\n\t\t\t\td=j;\n\t\t\t}\n\t\t}\n\t\tmin=a[0][d];\n\t\te=0;\n\t\tfor(p=1;p<5;p++){\n\t\t\tif(a[p][d]>A[i][j];\n\t}\n\tfor (i=1;i<6;i++)\n\t{\n\t\ta=A[i][1];\n\t\tH[i]=1;\n\t\tL[i]=1;\n\t\tb=A[1][i];\n\t\tfor (j=1;j<6;j++)\n\t\t{\t\n\t\t\tif (aA[j][i])\n\t\t\t{\n\t\t\t\tb=A[j][i];\n\t\t\t\tL[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=1;i<6;i++)\n\t{\n\t\tif (H[L[i]]==i)\n\t\t{\n\t\t\tcout<max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tx=j;\n\t\t\t}\n\t\t}\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tif(a[j][x]max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tlie[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (j=0;j<5;j++)\n\t{\n\t\tmin[j]=a[0][j];\n\t\tfor (i=0;i<5;i++)\n\t\t{\n\t\t\tif (a[i][j]> a[i][j];\n\tfor (int i = 1; i <= 5; i++)\n\t\tfor (int j = 1; j <= 5; j++)\n\t\t{\n\t\t\tc1 = 0;\n\t\t\tc2 = 0;\n\t\t\tfor (int k = 1; k <= 5; k++)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i][k])\n\t\t\t\t\tc1++; // ?c1????????????????????\n\t\t\t\tif (a[i][j] <= a[k][j])\n\t\t\t\t\tc2++; // ?c2????????????????????\n\t\t\t}\n\t\t\tif (c1 == 5 && c2 == 5) // ??????\n\t\t\t{\n\t\t\t\tcout << i << \" \" << j << \" \" << a[i][j];\n\t\t\t\tn++; // ????\n\t\t\t}\t\t\t\t\n\t\t}\n\tif (!n) // ????0?????\n\t\tcout << \"not found\" << endl;\n\treturn 0;\t\n}"} +{"label": "73", "index": "36306", "code": "\nint main()\n{\n\tint a[5][5],b[5][5]={0},c[5][5]={0};\n\tint i,j,k,num=0;\n\tfor(i=0;i<5;i++)\n\tfor(j=0;j<5;j++)\n\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<5;i++)\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif (a[i][j]>=a[i][k]) b[i][j]++;\n\t\t\tif (a[i][j]<=a[k][j]) c[i][j]++;\n\t\t}\n\t\tif (b[i][j]==5&&c[i][j]==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\tnum++;\n\t\t}\n\t\n\t}\n\tif (num==0) printf(\"not found\");\n\nreturn 0;\n\t\n\t\n}"} +{"label": "73", "index": "36307", "code": "void main()\n{\n\tint a[6][6],i,j,k,p=0,m=0,n=0;\n\tfor(i=1;i<6;i++)\n\t\tfor(j=1;j<6;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\n\tfor(i=1;i<6;i++)\n\t\tfor(j=1;j<6;j++)\n\t\t{\n\t\t\t\n\t\t\tfor(k=1;k<6;k++)\n\t\t\t{\n\t\t\t\tif(k==j&&j!=5)\n\t\t\t\t\tk++;\n\t\t\t\telse if(j==5&&k==5)\n\t\t\t\t\tbreak;\n\t\t\t\tif(a[i][j]>a[i][k])\n\t\t\t\t\tp++;\n\t\t\t}\n\t\t\tif(p==4)\n\t\t\t{\n\t\t\t\tfor(k=1;k<6;k++)\n\t\t\t\t{\n\t\t\t\t\tif(k==i)\n\t\t\t\t\t\tk++;\n\t\t\t\t\tif(a[i][j]>a[i][j];\n\t\t\tb[i][j]=a[i][j];\n\t\t}\n\t}\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tfor(int k=0;k<4;k++)\n\t\t{\n\t\t\tfor(int j=0;j<4-k;j++)\n\t\t\t{\n\t\t\t\tif(a[i][j]<=a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\tv=a[i][j];\n\t\t\t\t\ta[i][j]=a[i][j+1];\n\t\t\t\t\ta[i][j+1]=v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(int j=0;j<5;j++)\n\t{\n\t\tfor(int k=0;k<4;k++)\n\t\t{\n\t\t\tfor(int i=0;i<4-k;i++)\n\t\t\t{\n\t\t\t\tif(b[i][j]>=b[i+1][j])\n\t\t\t\t{\n\t\t\t\t\tv=b[i][j];\n\t\t\t\t\tb[i][j]=b[i+1][j];\n\t\t\t\t\tb[i+1][j]=v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][0]==b[0][j])\n\t\t\t{\n\t\t\t\tcout<>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t for(j=0;j<5;j++)\n\t\t{\n\t\t\tm=i;n=j;\n\t\t\tl=(a[m][n]>=a[m][0])+(a[m][n]>=a[m][1])+(a[m][n]>=a[m][2])+(a[m][n]>=a[m][3])+(a[m][n]>=a[m][4]);\n\t\t \n\t \tl=l+(a[m][n]<=a[0][n])+(a[m][n]<=a[1][n])+(a[m][n]<=a[3][n])+(a[m][n]<=a[4][n])+(a[m][n]<=a[2][n]);\n\t\t\n\t \tif(l==10)\n\t\t\t{\n\t\t \tcout<>a[i][j];\n\t\t}\n\n\t}\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tmax=-1;\n\t\tl=0;\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max){t=j;max=a[i][j];}\n\t\t}\n\t\tfor(k=1;k<=5;k++)\n\t\t{\n\t\t\tif(a[k][t]>*(*(p+i)+j);\n\t\n\tfor (i=0;i<5;i++)\n\t{\n\t\tmax=0;\n\t\tflag=0;\n\t\tfor (j=0;j<5;j++)\n\t\t{\n\t\t\tif (*(*(p+i)+j)>max)\n\t\t\t{\n\t\t\t\tmax=*(*(p+i)+j);\n\t\t\t\tmax_y=j;\n\t\t\t}\n\t\t}\n\t\tfor (k=0;k<5;k++)\n\t\t{\n\t\t\tif (*(*(p+k)+max_y)<*(*(p+i)+max_y))\n\t\t\t\tflag=1;\n\t\t}\n\t\tif (flag==0)\n\t\t{\t\n\t\t\tcout<>w[i][j];if(w[i][j]>mh[i])mh[i]=w[i][j];if(w[i][j]> a[i][j];\n\t\t\tif (a[i][j] > b[i]) //?????????????????????\n\t\t\t{\n\t\t\t\tb[i] = a[i][j];\n\t\t\t\tc[i] = j;\n\t\t\t}\n\t\t}\n\tfor (int i = 0; i < 5; i ++) //??????????????????\n\t{\n\t\tint j;\n\t\tfor (j = 0; j < 5; j ++)\n\t\t\tif (a[i][c[i]] > a[j][c[i]])\n\t\t\t\tbreak;\n\t\tif (j == 5) //?j=5??break?????????\n\t\t{\n\t\t\tcout << i + 1 << ' ' << c[i] + 1 << ' ' << a[i][c[i]] << endl;\n\t\t\tflag = 1; //?????????????1\n\t\t}\n\t}\n\tif (flag == 0) //??????0??????? \n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36314", "code": "int a[6][6];//={0,1,1,1,1,1,0,11,3,5,6,9,0,12,4,7,8,10,0,10,5,6,9,11,0,8,6,4,7,2,0,15,10,11,20,25};\nint max(int hang)\n{\n int m=0,ji;\n for(int k=1;k<=5;k++)\n {\n if(a[hang][k]>m) {m=a[hang][k]; ji=k;}\n }\n return ji;\n}\nint min(int lie)\n{\n int m=a[1][lie],ji=1;\n for(int k=2;k<=5;k++)\n {\n if(a[k][lie]>a[i][k];\n\t\t\tb[i][k]=a[i][k];\n\t\t\tc[i][k]=a[i][k];\n\t\t\tcout<b[i][t+1])\n\t\t\t{\n\t\t\t\tk=b[i][t+1];\n\t\t\t\tb[i][t+1]=b[i][t];\n\t\t\t\tb[i][t]=k;\n\t\t\t}\n\tfor(t=0;t<5;t++)\n\t\tfor(i=0;i<4;i++)\n\t\t\tif(c[i][t]max)\n{\nnum=i;\nmax=a[j][i];\n}\nb[j][num]=1;\n}\nint min;\nint zhishi=0;\nfor(int i=0;i<5;i++)\n{\nmin=65535;\nfor(int j=0;j<5;j++)\nif(a[j][i]*(*(a+i)+j)){\n\t\t\tflag=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn flag;\n}\n\nint col_min(int a[][5],int i,int j)\n{\n\tint k,flag=1;\n\n\tfor(k=0;k<5;k++){\n\t\tif(*(*(a+k)+j)<*(*(a+i)+j)){\n\t\t\tflag=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn flag;\n}\n\nvoid main()\n{\n\tint a[5][5];\n\tint i,j,flag=0;\n\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",*(a+i)+j);\n\t}\n\n\tfor(i=0;i<5;i++){\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(row_max(a,i,j)&&col_min(a,i,j)){\n\t\t\t\tflag=1;\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,*(*(a+i)+j));\n\t\t\t}\n\t\t}\n\t}\n\n\tif(!flag)\n\t\tprintf(\"not found\\n\");\n}\n"} +{"label": "73", "index": "36318", "code": "\n//*****************************\n//*??? :???? *\n//*?? :??? *\n//*?? :2011?10? *\n//*****************************\nint main ()\n{\n\tint a[5][5],i=0,j=0,max[5]={0},flag=1;\n\tint q[5]={0},min[5]={1000000,1000000,1000000,1000000,1000000};\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tq[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]=a[i][k]);\n\t\t\t\tif(b[i][j]==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(b[i][j]==0)\n\t\t\t\tcontinue;\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\n\t\t\t\tb[i][j]*=(a[i][j]<=a[k][j]);\n\t\t\t\tif(b[i][j]==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(b[i][j]==0)\n\t\t\t\tcontinue;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(b[i][j]==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\tprintf(\"not found\\n\");\n}\n\n"} +{"label": "73", "index": "36320", "code": "int main(){\n\tint a[6][6]={0};\n\tint s,t,x,y,q,m,n,i,j,r;\n\tq=0;\n\tfor (i=1;i<=5;i++){\n\t\tfor (j=1;j<=5;j++){\n\t\tscanf (\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor (r=1;r<6;r++){\n\tm=a[1][r];\n\tfor (i=1;i<6;i++){\n\t\tif (a[i][r]<=m){\n\t\tm=a[i][r];\n\t\ts=i;\n\t\t}\n\t}\n\tfor (i=s;i=n){\n\t\t\tn=a[s][j];\n\t\t\ty=j;\n\t\t\t}\n\t}\n\t\n\t\tif (y==r) {\n\t\tprintf (\"%d %d %d\",s,y,a[s][y]);\n\t\tq=1;\n\t\t}\n\t}\n\t}\n\n\tif (q==0)\n\t{printf (\"not found\");}\nreturn 0;\n}\n"} +{"label": "73", "index": "36321", "code": "\nint main()\n{\n\tint max[6],min[6],row[6],line[6],i,j,a[6][6];\n\tfor (i=1;i<6;i++)\n\t{\n\t\tmax[i]=0;\n\t\tfor (j=1;j<6;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tif (a[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t row[i]=i;\n\t\t\t\tline[i]=j;\n\t\t\t}\t\n\t\t}\n\t}\n\t//for (i=1;i<6;i++)\t\t\t\n\t //cout<a[j][i])\n\t\t\t\t{\n\t\t\t\t\tmin[i]=a[j][i];\n\t\t\t\t}\n\t\t\t}\n\t }\n\t//for (i=1;i<6;i++)\n\t\t\t//cout<> num[i][j];\n\t}\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tnum[i][0] = INT_MIN;\n\t\tfor (j = 1; j <= 5; j++)\n\t\t{\n\t\t\tif (num[i][j] > num[i][0])\n\t\t\t\tnum[i][0] = num[i][j];\n\t\t}\n\t}\n\tfor (j = 1; j <= 5; j++)\n\t{\n\t\tnum[0][j] = INT_MAX;\n\t\tfor (i = 1; i <= 5; i++)\n\t\t{\n\t\t\tif (num[i][j] < num[0][j])\n\t\t\t\tnum[0][j] = num[i][j];\n\t\t}\n\t}\n\tk = 0;\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tfor (j = 1; j <= 5; j++)\n\t\t{\n\t\t\tif (num[i][j] == num[i][0] && num[i][j] == num[0][j])\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tcout << i << \" \" << j << \" \" << num[i][j] << endl;\n\t\t\t}\n\t\t}\n\t}\n\tif (k == 0)\n\t\tcout << \"not found\" << endl;\n\n\treturn 0;\n}"} +{"label": "73", "index": "36323", "code": "int main() {\n int a[m][n],i,j,max,min,flag=0,i1;\n for (i=0;ia[i][j])\n min=a[i][j];\n i=i1;\n if (a[i][j]==max&&a[i][j]==min) {\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);\n flag++;\n }\n }\n\n }\n if (flag==0)\n printf(\"not found\\n\");\n else printf(\"\\n\");\n} \n"} +{"label": "73", "index": "36324", "code": "int main(){\n\tint map[5][5],max[5],t,i,j,t_max;\n\tint b=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tt_max=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d \",&t);\n\t\t\tmap[i][j]=t;\n\t\t\tif(t_max> a[i][j];\n\t\t}\n\t}\n\tfor ( int i = 1; i <= 5; i ++) {\n\t\tfor ( int j = 1; j <= 5; j ++) {\n\t\t\tif ( j == 1) {max[i] = a[i][j]; mp[i] = j;}\n\t\t\telse if ( a[i][j] > max[i]) { max[i] = a[i][j]; mp[i] = j;}\n\t\t}\n\t}\n\tfor ( int i = 1; i <= 5; i ++) {\n\t\tif ( max[i] <= a[1][mp[i]] && max[i] <= a[2][mp[i]] && max[i] <= a[3][mp[i]] && max[i] <= a[4][mp[i]] && max[i] <= a[5][mp[i]]) {\n\t\t\ts += 1;\n\t\t\tcout << i << \" \" << mp[i] << \" \" << max[i] << endl;\n\t\t}\n\t}\n\tif ( s == 0 ) cout << \"not found\";\n\treturn 0;\n}\n"} +{"label": "73", "index": "36326", "code": "\nint main()\n{\n\tint a[5][5] = {{0,0}}, i, j;\n\tfor (i = 0; i <= 4; i++ )\n\t{\n\t\tfor (j = 0; j <= 4; j++ )\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tint max[5] = {0}, min[5] = {0};\n\tfor (i = 0; i <= 4; i++ )\n\t{\n\t\tfor (j = 1; j <= 4; j++ )\n\t\t{\n\t\t\tif (a[i][j] > a[i][max[i]])\n\t\t\t{\n\t\t\t\tmax[i] = j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (j = 0; j <= 4; j++ )\n\t{\n\t\tfor (i = 1; i <= 4; i++ )\n\t\t{\n\t\t\tif (a[i][j] < a[min[j]][j])\n\t\t\t{\n\t\t\t\tmin[j] = i;\n\t\t\t}\n\t\t}\n\t}\n\tint flag = 0;\n\tfor (i = 0; i <= 4; i++ )\n\t{\n\t\tif (min[max[i]] == i)\n\t\t{\n\t\t\tcout << i + 1 << \" \" << max[i] + 1 << \" \" << a[i][max[i]] << endl;\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0)\n\t{\n\t\tcout << \"not found\" << endl;\n\t}\n\n\treturn 0;\n}"} +{"label": "73", "index": "36327", "code": "main()\n{\n int a,b,c,d,e,f;\n int x[5][5];\n f=0;\n for(a=0;a<=4;a++)\n {\n for(b=0;b<=4;b++)\n {\n scanf(\"%d\",&x[a][b]);\n }\n }\n for(a=0;a<=4;a++)\n {\n for(b=0;b<=4;b++)\n {\n d=0;\n for(c=0;c<=4;c++)\n {\n if(x[a][b]>=x[a][c])\n d++;\n else;\n }\n if(d==5)\n break;\n else;\n }\n e=0;\n for(c=0;c<=4;c++)\n {\n if(x[a][b]<=x[c][b])\n e++;\n else;\n }\n if(e==5)\n {\n printf(\"%d %d %d\\n\",a+1,b+1,x[a][b]);\n f=1;\n }\n else;\n }\n if(f==0)\n printf(\"not found\");\n else;\n}"} +{"label": "73", "index": "36328", "code": "\nint main()\n{ \n\tint a[5][5],l[5];\n\tint m,k,i,j,flag=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(j=0;j<5;j++)\n\t{\n\t\tl[j]=a[0][j];\n\t\tfor(i=0;i<5;i++)\n\t\t\tif(l[j]>a[i][j])\n\t\t\t\tl[j]=a[i][j];\n }\n\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tm=a[i][0];\n\t\t\tk=0;\n\t\t\tfor(j=0;j<5;j++)\n\t\t\t\tif(a[i][j]>m)\n\t\t\t\t\t{\n\t\t\t\t\t\tm=a[i][j];\n\t\t\t\t\t\tk=j;\n\t\t\t\t}\n\t\t\tif(m==l[k])\n\t\t\t\t{\n\t\t\t\t\tcout<=max){\n\t\t\t\tmax=sz[i][j];\n\t\t\t\ta=i;\n\t\t\t\tb=j;\n\t\t\t}\n\t\t}\n\t\tmin=max;\n\t\tfor (t=0;t<5;t++){\n\t\t\tif (sz[t][b]<=min){\n\t\t\t\tmin=sz[t][b];\n\t\t\t}\n\t\t}\n\t\tif (max==min){\n\t\t\te=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (e==0){\n\t\tprintf(\"not found\");\n\t}else{\n\t\tprintf(\"%d %d %d\",a+1,b+1,max);\n\t}\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36330", "code": "int main()\n{\n int i,j,n,a[5][5],max,t,q=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n for(i=0;i<5;i++)\n {\n t=0;\n max=a[i][0];\n n=0;\n for(j=1;j<5;j++)\n if(a[i][j]>max)\n {\n max=a[i][j];\n n=j;\n }\n for(j=0;j<5;j++)\n if(max>a[j][n]) t++;\n if(t==0) {printf(\"%d %d %d\",i+1,n+1,a[i][n]);q++;}\n }\n if(q==0) printf(\"not found\");\n return 0;\n}"} +{"label": "73", "index": "36331", "code": "/*\n * homework.cpp\n *\n * Created on: 2013-10-30\n * Author: dyx\n */\nint main()\n{\n\tint juzheng[5][5];\n\tint i,j,k;\n\tint a,b=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin >> juzheng[i][j];\n\tint max;\n\tfor(i=0;i<5;i++)//i???j??\n\t{\n\t\tmax=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(maxjuzheng[k][j])\n\t\t\t\t\t\ta++;\n\n\t\t\t\tif(a==0)\n\t\t\t\t{\n\t\t\t\t\tcout << i+1<<\" \"<< j+1 << \" \" << max;\n\t\t\t\t\tb++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\n\t}\n\tif(b==0)\n\t\tcout << \"not found\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}\n\n"} +{"label": "73", "index": "36332", "code": "int main()\n{\n int a[5][5],m=0,p,q,r=1,w=0;\n for(int i=0;i<5;i++)\n for(int j=0;j<5;j++)\n cin>>a[i][j];\n for(int i=0;i<5;i++)\n { \n m=0;\n for(int j=0;j<5;j++)\n {\n if(a[i][j]>m)\n {\n m=a[i][j];\n p=i;\n q=j;\n }\n }\n r=1;\n for(int k=0;k<5;k++)\n if(m>a[k][q])\n {\n r=0;\n break;\n }\n if(r==1)\n {\n cout<h[a]){\n h[a]=sz[a][b];\n }\n }\n }\n for(b=0;b<5;b++){\n z[b]=sz[0][b];\n for(a=1;a<5;a++){\n if(sz[a][b]a[p][l])\n\t\t\t{\n\t\t\t\tflag=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag==0)\n\t\t{\n\t\t\tk=1;\n\t\t\tprintf(\"%d %d %d\",i+1,l+1,a[i][l]);\n\t\t}\n\t}\n\tif(flag==1&&k==0)\n\t\tprintf(\"not found\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36335", "code": "//#include\nint main()\n{\n\tint a[6][6];\t//????5*5??\n\tint i,j;\t//??i?j??????????\n\tint hang[6]={0},lie[6];\t//??hang[],lie[]???????????????\n\t//memset(lie,1000000,sizeof(lie));??????????????????????????cstring????\n\tint flag=0;\n\tfor(i=1;i<=5;i++)\n\t\tfor(j=1;j<=5;j++)\n\t\t\tcin>>a[i][j];\t//??5*5??\n\tfor(i=1;i<=5;i++)\n\t\tfor(j=1;j<=5;j++)\n\t\t\tif(a[i][j]>hang[i])\n\t\t\t\thang[i]=a[i][j];\t//????????\n\tfor(j=1;j<=5;j++)\n\t\t{lie[j]=a[1][j];\n\t\tfor(i=1;i<=5;i++)\t\n\t\t\tif(a[i][j]s[i]) {s[i]=a[i][j];h[i]=i;l[i]=j;}\n }\n }\n int q=1;\n for(i=1;i<=5;i++)\n {p=0;\n for(j=1;j<=5;j++)\n {\n if(a[j][l[i]]k)\n\t\t\t{\n\t\t\t\tk=a[i][j];\n\t\t\t\tx[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tk=a[0][i];\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[j][i]>juzhen[i][j];\n if (juzhen[i][j]>max[i]) max[i]=juzhen[i][j];//????? \n }\n }\n for(j=0;j<5;j++)\n {\n min[j]=100000;\n for(i=0;i<5;i++)\n {\n if (juzhen[i][j]>a[i][j];\n\tint count=0,temp;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tint max=a[i][0],maxj=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max) \n\t\t\t\t{max=a[i][j];\n\t\t\tmaxj=j;}\n\t\t}\n\t\tint g=1;\n\t\tfor(j=0;j<5;j++)\n\t\t{ \n\t\t\tif(a[j][maxj]> a[i][j]; //??????\n\t\t\t }\n\t\t }\n\t\t\tfor(i = 1; i < 6; i++)\n\t\t\t{ \n\t\t\t\ti0 = i;j0=1;\n\t\t\t\tmax = a[i][1];\n\t\t\t\tfor(j = 1; j < 6; j++)\n\t\t\t\t{ \n\t\t\t\t\tif(max >= a[i][j])continue;\n\t\t\t\t\tmax = a[i][j]; j0 = j; i0 = i; //?????????\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tfor(k = 1; k < 6; k++)\n\t\t\t\t{\n\t\t\t\t\tif(max > a[k][j0])break; //???????????\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(k == 6)\n\t\t\t\t{\n\t\t\t\t\tcout << i0<< \" \" << j0 << \" \" << max<< endl;\n\t\t\t\t count++;\n\t\t\t\t}\n\t\t\t}\n if(count == 0)cout << \"not found\" << endl;\n\t\t\t\n\t\t\treturn 0;\n}"} +{"label": "73", "index": "36341", "code": "int main()\n{ \n int a[5][5],i,j,max[5],min[5],k=0;\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++) max[i]=a[i][0];\n for(j=0;j<5;j++) min[j]=a[0][j];\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n if(a[i][j]>=max[i]) max[i]=a[i][j];\n if(a[i][j]<=min[j]) min[j]=a[i][j];\n }\n }\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n if(max[i]==min[j]){\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);\n k+=1;\n }\n }\n }\n if(k==0) printf(\"not found\");\n return 0;\n}"} +{"label": "73", "index": "36342", "code": "/*\n * 1e.cpp\n * function:?????? (5*5)???????????????????????\n ?????????????????????????????????\u0093not found\u0094?\n * Created on: 2012-11-10\n * Author: sear\n */\nint main() {\n\tint a[6][6], i, j, max[6], min[6], m = 0;/*a[6][6]?????,i?????,\n\t j?????,max[6]???????????,min[6]???????????,m?????*/\n\tfor (i = 1; i < 6; i++)\n\t\tfor (j = 1; j < 6; j++) {\n\t\t\tcin >> a[i][j];//???????????\n\t\t}\n\tfor (i = 1; i < 6; i++) {\n\t\tmax[i] = 1;\n\t\tfor (j = 2; j < 6; j++) {//????????????\n\t\t\tif (a[i][max[i]] < a[i][j])\n\t\t\t\tmax[i] = j;//????????????\n\t\t}\n\t}\n\tfor (j = 1; j < 6; j++) {\n\t\tmin[j] = 1;\n\t\tfor (i = 2; i < 5; i++) {//????????????\n\t\t\tif (a[min[j]][j] > a[i][j])\n\t\t\t\tmin[j] = i;//????????????\n\t\t}\n\t}\n\tfor (i = 1; i < 6; i++)\n\t\tfor (j = 1; j < 6; j++) {\n\t\t\tif ((min[j] == i) && (max[i] == j)) {\n\t\t\t\t//???????????????????????\n\t\t\t\tcout << i << \" \" << j << \" \" << a[i][j];\n\t\t\t\t//????????????\n\t\t\t\tm = m + 1;//m?1????????\n\t\t\t}\n\t\t}\n\tif (m == 0)\n\t\tcout << \"not found\";//??m=0?????????\"not found\"\n\treturn 0;//????\n}\n"} +{"label": "73", "index": "36343", "code": "int main(){\n int n=0,i,j,x,y;\n int sz[5][5];\n int z[5];\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n scanf(\"%d\",&sz[i][j]);\n }\n }\n int m=0;\n for(j=0;j<5;j++){\n for(i=0;i<5;i++){\n if(sz[j][i]>sz[j][m]){\n m=i;\n }\n }\n z[j]=m;\n }\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n if(sz[i][z[i]]>sz[j][z[i]])\n break;\n }\n if(j==5){\n n=n+1;\n x=i+1;\n y=z[i]+1;\n printf(\"%d %d %d\",x,y,sz[i][z[i]]);\n \n }\n }\n if(n==0)\n printf(\"not found\");\n \n return 0;\n}"} +{"label": "73", "index": "36344", "code": "int main()\n{\n int i,j,x,r,row,colum,k,p=0,a[5][5];\n for (i=0;i<=4;i++)\n {\n\t for(j=0;j<=4;j++)\n\t {\n\t\t cin>>x;\n\t a[i][j]=x;\n\t }\n }\n // cout<<\"1\";\n for (i=0;i<=4;i++)\n {\n\t\tr = a[i][0];\n\t\trow = i;\n\t\tcolum = 0;\n\t for (j=0;j<=4;j++)\n {\n\t\t if (a[i][j]>r)\n\t\t {\n\t\t\t r=a[i][j];\n\t\t\t row=i;\n\t\t\t colum=j;\n\t\t\t \n\t\t }\n\t }\n\t //cout<<\"r:\"<>i;\n return 0;\n}"} +{"label": "73", "index": "36345", "code": "int main()\n{\n\tint a[5][5], i, j, max, row, line, flag = 0;\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tfor (j = 0; j < 5; j ++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tmax = a[i][0];\n\t\trow = i; \n\t\tline = 0;\n\t\tfor (j = 0; j < 5; j ++)\n\t\t{\n\n\t\t\t\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\trow = i;\n\t\t\t\tline = j;\n\t\t\t}\n\t\t}\n\t\tint k;\n\t\tfor (k = 0; k < 5; k ++)\n\t\t{\n\t\t\tif (a[k][line] >= max)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tif (k == 5)\n\t\t{\n\t\t\tflag = 1;\n\t\t\tcout<>a[i][j];\n \n\nfor(i=1;i<=5;i++)\n {max=0;\n for(j=1;j<=5;j++)\n {\n flag=0;\n if(a[i][j]>max)\n {max=a[i][j];\n i0=i;j0=j;} //???????????????? \n if(j==5)\n\t {for(k=1;k<=5;k++) //???????????????? \n\t\t if(a[k][j0]>num[i][j];\n for(i=1;i<=5;i++)\n for(j=1;j<=5;j++)\n {\n if(num[i][j]>max_hang[i])max_hang[i]=num[i][j];\n if(num[i][j]*(*(p+k)+m))\n {\n count++;\n break;\n }\n }\n if(count==0)\n {\n printf(\"%d %d %d\\n\",i+1,m+1,n);\n q++;\n }\n }\n if(q==0)\n printf(\"not found\\n\");\n \n}\n "} +{"label": "73", "index": "36349", "code": "int main()\n{\n\tint i,j,a[5][5],max[5],b[5],c[5],k,p;\n\tp=0;\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tc[i]=0;\n\t\tb[i]=0;\n\t\tfor(j=0;j<=4;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tmax[i]=a[i][0];\n\t\tfor(j=1;j<=4;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\tb[i]=j;\n\t\t\t}\n\t\t}\n\t\tfor(k=0;k<=4;k++)\n\t\t{\n\t\t\tif(a[i][b[i]]<=a[k][b[i]])\n\t\t\t{\n\t\t\t\tc[i]=c[i]+1;\n\t\t\t}\n\t\t}\n\t\tif(c[i]==5)\n\t\t{\n\t\t\tcout<>a[i][j];\n\t}\n\tm=-88888888;\n\tn=888888888;\n\tfor (i=1;i<=5;i++)\n\t{\n\t\tfor (j=1;j<=5;j++) \n\t\t{\n\t\t\tif (a[i][j]>m) \n\t\t\t{\n\t\t\t\tm=a[i][j];\n\t\t\t\tgg=j;\n\t\t\t}\n\t\t}\n\t\tx[i]=gg;\n\t\tm=-8888888;\n\t\n\t}\n\t\tfor (j=1;j<=5;j++)\n\t{\n\t\tfor (i=1;i<=5;i++) \n\t\t{\n\t\t\tif (a[i][j]a[k][m])\n break;\n else b[i]=b[i]+1;\n }\n if (b[i]==5)\n { y=y+1; printf (\"%d %d %d\\n\",i+1,m+1,a[i][m]); }\n }\n if (y==0) printf (\"not found\\n\");\n}\n"} +{"label": "73", "index": "36352", "code": "int main()\n{\n int a[5][5];\n int i,j;\n int m,n,t;\n int a1,a2=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n cin>>a[i][j];\n }\n }\n for(m=0;m<5;m++)\n {\n for(n=0;n<5;n++)\n {\n for(t=0;t<5;t++)\n {\n if(a[m][n]> n[i][j];\n\tfor(i = 1; i <= 5; i++)\n\t{\n\t\tmax = n[i][1];\n\t\tmaxline = i;\n\t\tmaxlist = 1;\n\t\tfor(j = 1; j <= 5; j++)\n\t\t{\n\t\t\tk = 0;\n\t\t\tif(n[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = n[i][j];\n\t\t\t\tmaxline = i;\n\t\t\t\tmaxlist = j;\n\t\t\t}\n\t\t\tif(j == 5)\n\t\t\t{for(m = 1; m <= 5; m++)\n\t\t\t\t{\n\t\t\t\t\tif(m != maxline && n[m][maxlist] < max)\n\t\t\t\t\t{\n\t\t\t\t\t\tk = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(k == 0)\n\t\t\t\t{\n\t\t\t\t\tcout << maxline << ' ' << maxlist << ' ' << n[maxline][maxlist] << endl;\n\t\t\t\t\tt[maxline] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(t[1] + t[2] + t[3] + t[4] + t[5] == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36354", "code": "\nint main()\n{\n\tint a[5][5], i, j, k, flag = 0;\n\tint lineMax = 0, columnMin = 0, ione = 0, jone = 0 , itwo = 0;\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n\t\t}\n\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (j == 0)\n\t\t\t{\n\t\t\t\tlineMax = a[i][0];\n\t\t\t\tione = i;\n\t\t\t}\n\t\t\telse\n\t\t\t\tif (lineMax < a[i][j])\n\t\t\t\t{\n\t\t\t\t\tlineMax = a[i][j];\n\t\t\t\t\tjone = j;\n\t\t\t\t\tione = i;\n\t\t\t\t}\n\t\t}\n\n\t\tfor (k = 0; k < 5; k++)\n\t\t{\n\t\t\tif (k == 0)\n\t\t\t\tcolumnMin = a[0][jone];\n\t\t\telse\n\t\t\t\tif (columnMin > a[k][jone])\n\t\t\t\t{\n\t\t\t\t\tcolumnMin = a[k][jone];\n\t\t\t\t\titwo = k;\n\t\t\t\t}\n\t\t}\n\t\tif (itwo == ione)\n\t\t{\n\t\t\tcout << itwo + 1 << \" \" << jone + 1 << \" \" << a[itwo][jone] << endl;\n\t\t flag = 1;\n\t\t}\n\t\tlineMax = 0; columnMin = 0; ione = 0; jone = 0; itwo = 0;\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36355", "code": "int main()\n{\n int t,i,a[5][5],s[5][3],l[5][3],c,r,w;\n\tfor(t=0;t<5;t++){\n\t\tfor(i=0;i<5;i++){\n\t\t\tscanf(\"%d\",&a[t][i]);\n\t\t}\n\t}\n\tfor(c=0;c<5;c++){\n r=a[c][0];\n\t for(t=0;t<5;t++){\n\t\t if(a[c][t]>=r){\n\t\t\t r=a[c][t];\n\t\t\t l[c][0]=r;\n\t\t\t l[c][1]=c;\n\t\t\t l[c][2]=t;\n\t\t\t \n\t\t }\n\t }\n\t}\n\tfor(c=0;c<5;c++){\n r=a[0][c];\n\t for(t=0;t<5;t++){\n\t\t if(a[t][c]<=r){\n\t\t\t r=a[t][c];\n\t\t\t s[c][0]=r;\n\t\t\t s[c][1]=t;\n\t\t\t s[c][2]=c; \n\t\t }\n\t }\n\t}\n\tw=0;\n\tfor(t=0;t<5;t++){\n\t\tfor(i=0;i<5;i++){\n\t\t\tif(l[t][0]==s[i][0]){\n\t\t\t\tw++;\n\t\t\t\tprintf(\"%d %d %d\\n\",s[i][1]+1,s[i][2]+1,s[i][0]);\n\t\t\t}\n\t\t}\n\t}\n\tif(w==0){\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}\n"} +{"label": "73", "index": "36356", "code": "int main()\n{\n\tint a[6][6],b[6][6],c[6][6],\n\t\ti,j,//i?j??????\n\t\tk,\n\t\tt,\n\t\tp=0;\n\tfor(i=1;i<=5;i++)\n\t\tfor(j=1;j<=5;j++)\n\t\t{cin>>a[i][j];b[i][j]=a[i][j];c[i][j]=a[i][j];}//???????????????????????b,c\n\n\tfor(i=1;i<=5;i++)\n\t\tfor(j=1;j<=5-1;j++)\n\t\t\tfor(k=1;k<=5-j;k++)\n\t\t\t\tif(a[i][k]>a[i][k+1])\n\t\t\t\t{t=a[i][k];a[i][k]=a[i][k+1];a[i][k+1]=t;}//??????\n\t\t\t\t\n\tfor(j=1;j<=5;j++)\n\t\tfor(i=1;i<=5-1;i++)\n\t\t\tfor(k=1;k<=5-i;k++)\n\t\t\t\tif(b[k][j]a[j][i])\n\t\t\t{\n\t\t\t\tc[i]=a[j][i];\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]==b[i]&&a[i][j]==c[j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t\tsum=sum+1;\n\t\t\t}\n\t\t}\n\t}\n\tif(sum==0)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}\n"} +{"label": "73", "index": "36358", "code": "main()\n{\n int a[5][5];\n int i,j,k,max,max2,lie,hang,m=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n for(j=0;j<5;j++)\n {\n max=a[j][0];\n lie=0;\n for(i=0;i<4;i++)\n if(maxa[k+1][lie])\n {\n max2=a[k+1][lie];\n hang=k+1;\n }\n//printf(\"%d\\n\",max2);\n if(max==max2)\n {\n printf(\"%d %d %d\\n\",hang+1,lie+1,max);\n m++;\n }\n }\n if(m==0)\n printf(\"not found\\n\");\n}\n "} +{"label": "73", "index": "36359", "code": "int main()\n{\n\tint a[5][5],b[5][5],i,j,m,n,e=0;\n\tmemset(b,0,sizeof(b));\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tm=0;\n\t\tfor(j=0;j<5;j++)\n\t\t\tif(ma[i][j])\n\t\t\t\tm=a[i][j];\n\t\tfor(i=0;i<5;i++)\n\t\t\tif(a[i][j]==m)\n\t\t\t\tb[i][j]*=-1;\n\t}\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tif(b[i][j]==-1)\n\t\t\t{\n\t\t\t\tcout<> a[i][j];\n\t\tif(a[i][j] > max[i])//????????\n\t\t\tmax[i] = a[i][j];\n\t}\n\t\n\tfor(j = 0; j <= 4; j++)\n\t{\n\t\tmin[j] = a[1][j];\n\t\tfor(i = 0; i <= 4; i++)\n\t\t{\n\t\t\tif(a[i][j] < min[j])//????\n\t\t\t\tmin[j] = a[i][j];\n\t\t}\n\t}\n\tfor(int k = 0; k <= 4; k++)//???????\n\tfor(int l = 0; l <= 4; l++)\n\t{\n\t\tif(max[k] == min[l])\n\t\t{\n\t\t\tcout << k+1 << \" \" << l+1 << \" \" << max[k] << endl;\n\t\t\tflag = 1;//??????\n\t\t}\n\n\t}\n\tif(flag == 0)\n\t\tcout << \"not found\" << endl;\n\n\treturn 0;\n}\n"} +{"label": "73", "index": "36361", "code": "int main() {\n\tint a[5][5] = { 0 }, i, j, max1[5], least1[5], t = 0;\n\n\tint max_value(int x, int max);\n\tint least_value(int x, int least);\n\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\n\tfor (i = 0; i < 5; i++) {\n\n\t\tfor (j = 0, max1[i] = a[i][0], least1[i] = a[0][i]; j < 5; j++) {\n\t\t\tmax1[i] = max_value(a[i][j], max1[i]);\n\t\t\tleast1[i] = least_value(a[j][i], least1[i]);\n\t\t}\n\t}\n\tfor (i = 0; i < 5; i++)\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tif (max1[i] == a[i][j] && least1[j] == a[i][j]) {\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << a[i][j] << endl;\n\t\t\t\tt = t + 1;\n\t\t\t}\n\n\tif (t == 0)\n\t\tcout << \"not found\" << endl;\n\n\treturn 0;\n}\n\nint max_value(int x, int max) {\n\tif (x > max)\n\t\treturn x;\n\telse\n\t\treturn max;\n}\nint least_value(int x, int least) {\n\tif (x > least)\n\t\treturn least;\n\telse\n\t\treturn x;\n}\n"} +{"label": "73", "index": "36362", "code": "//****************************************************************\n// ????1000012789_3.cpp *\n// ???wusy *\n// ???11,3 *\n// ??????? *\n//****************************************************************\nint main()\n{\n\tint a[5][5], maxr[5], e[5], f[5], max, g, count = 0;//??????????\n\tfor(int i = 0; i < 5; i++)\n\t\tfor(int j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\n\tfor(int k = 0; k < 5; k++)\n\t{\n\t\tmax = a[k][0];\t\t\t\t\t\t\t\t\t//?????\t\n\t\tf[k] = 0;\t\t\t\t\t\t\t\t \t\t\n\t\tfor(int t = 0; t < 5; t++)\n\t\t{\n\t\t\tif(a[k][t] > max)\n\t\t\t{\n\t\t\t\tmax = a[k][t];\t\t\t\t\t\t\t//\t???????????????\n\t\t\t\tf[k] = t;\n\t\t\t}\n\t\t}\n\t\tmaxr[k] = max;\t\t\t\t\t\t\t\t\t//\t??????????????\n\t\te[k] = k;\t\t\t\t\t\t\t\t\t\t//\t?????\n\t}\n\n\tfor(int p = 0; p < 5; p++)\n\t{\n\t\tg = 0;\t\t\t\t\t\t\t\t\t\t\t//\t???????g\n\t\tfor(int q = 0; q < 5; q++)\n\t\t{\n\t\t\tif(maxr[p] > a[q][f[p]])\n\t\t\t{\n\t\t\t\tg = 1;\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t//\t????????????????????????g?1\n\t\t\t}\n\t\t}\n\t\tif(g == 0)\t\t\t\t\t\t\t\t\t\t//\t?g????????????\n\t\t{\n\t\t\tcout << e[p] + 1 << \" \" << f[p] + 1 << \" \" << maxr[p] << endl;\n\t\t\tcount++;\n\t\t}\n\t}\n\n\tif(count == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36363", "code": "int main()\n{\nint a[5][5];\nint i,j,max,min,col1,andian,k;\nfor(i=0;i<5;i++)\nfor(j=0;j<5;j++)\ncin>>a[i][j];\n\nfor(i=0;i<5;i++)\n{max=a[i][0];col1=0;\nfor(j=0;j<5;j++)\n\tif(a[i][j]>max)\n\t\t{max=a[i][j];\n\ncol1=j;}\nandian=1;\nfor(k=0;k<5;k++)\nif(max>a[k][col1])\n\t{andian=0;\ncontinue;\n}\nif(andian==1)\n{cout<>a[i][j];\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tb[i]=1;\n\t\tfor(j=1;j<=5;j++)\n\t\t\tif (a[i][j]>a[i][b[i]]) b[i]=j;\n\t}\n\tfor(j=1;j<=5;j++)\n\t{\n\t\tc[j]=1;\n\t\tfor(i=1;i<=5;i++)\n\t\t\tif (a[i][j]max)\n\t\t\t\t\t\tmax=matrix[n][a];\n\t\t\t\t\t\telse\n\t\t\t\t\t\tmax=max;\n\t\t\t\t\t}\n\t\t\t\tint min=matrix[n][l];\n\t\t\t\tfor (int b=0;b <=4;b++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (matrix[b][l]>num[i][j];}\n\t\tcout<num[i][k]);\n\t\t\t}\n\t\t\tif(mid==4)\n\t\t\t{ \n\t\t\t for(int l=0;l<5;l++)\n\t\t\t{\n\t\t\t\t\tsecond+=(num[i][j]> a[i][j];//????\n\tfor (int i = 0; i < 5; i++)//?????\n\t\tfor (int j = 0; j < 5; j++)//?????\n\t\t\tfor (int k = 0; k < 5; k++) {\n\t\t\t\tif (a[i][j] < a[i][k])\n\t\t\t\t\tbreak;\n\t\t\t\tif (k == 4)//??????????????\n\t\t\t\t\tfor (int l = 0; l < 5; l++) {\n\t\t\t\t\t\tif (a[i][j] > a[l][j])\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif (l == 4) {//?????????????s??\n\t\t\t\t\t\t\tcout << i + 1 << ' ' << j + 1 << ' ' << a[i][j];\n\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\tif (s == 0)\n\t\tcout << \"not found\";//???\n\treturn 0;\n}\n"} +{"label": "73", "index": "36368", "code": "int main()\n{\n int a[5][5];\n int i,j,p;\n int b,c,m=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n \n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n b=1;\n c=1;\n for(p=0;pa[p][j])\n c=0;\n }\n for(p=i+1;p<5;p++)\n {\n if(a[i][j]>a[p][j])\n c=0;\n }\n if(b==1&&c==1)\n {\n m=1;\n printf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n }\n }\n }\n if(m==0)\n printf(\"not found\");\n return 0;\n} "} +{"label": "73", "index": "36369", "code": "int main()\n{\n\tint x[5][5],m[5],h[5],l[5],n=0,an[5],hh[5],ll[5],k=0;\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&x[i][j]);\n\t\t}\n\t}\n\tm[0]=x[0][0];\n\tm[1]=x[1][0];\n\tm[2]=x[2][0];\n\tm[3]=x[3][0];\n\tm[4]=x[4][0];\n\th[0]=1;\n\th[1]=2;\n\th[2]=3;\n\th[3]=4;\n\th[4]=5;\n\tl[0]=1;\n\tl[1]=2;\n\tl[2]=3;\n\tl[3]=4;\n\tl[4]=5;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(m[i]<=x[i][j])\n\t\t\t{\n\t\t\t\tm[i]=x[i][j];\n\t\t\t\tl[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(m[i]<=x[0][l[i]]&&m[i]<=x[1][l[i]]&&m[i]<=x[2][l[i]]&&m[i]<=x[3][l[i]]&&m[i]<=x[4][l[i]])\n\t\t{\n\t\t\tn+=1;\n\t\t\tan[k]=m[i];\n\t\t\thh[k]=h[i];\n\t\t\tll[k]=l[i]+1;\n\t\t\tk+=1;\n\t\t}\n\t}\n\tif(n==0)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\telse\n\t{\n\t\tfor(i=0;i>a[i][j];\n \n \n for(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n if(a[i][j]>max[i])\n max[i]=a[i][j];\n else continue;\n \n \n \n for(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n if(max[i]==a[i][j])\n { p[i]=i;q[i]=j;break;}\n else continue; \n \n \n \n \n \n for(j=0;j<=4;j++)\n for(i=0;i<=4;i++)\n if(min[j]>a[i][j])\n min[j]=a[i][j];\n else continue;\n \n \n \n for(j=0;j<=4;j++)\n for(i=0;i<=4;i++)\n if(min[j]==a[i][j])\n { x[j]=i;y[j]=j;}\n else continue; \n \n \n for(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n if((max[i]==min[j])&&(p[i]==x[j])&&(q[i]==y[j])) \n cout<> a[i][j];\n\t}\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tmax[i] = a[i][0];\n\t\tmin[i] = a[0][i];\n\t\tfor (j = 1; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] > max[i])\n\t\t\t\tmax[i] = a[i][j];\n\t\t\tif (a[j][i] < min[i])\n\t\t\t\tmin[i] = a[j][i];\n\t\t}\n\t}\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] == max[i] && a[i][j] == min[j])\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << a[i][j] << endl;\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\";\n\treturn 0;\n}\n\n\n\n\n\n\n"} +{"label": "73", "index": "36372", "code": "\nint main()\n{\n\tint s[5][5],q,n,flag=0,max,min;\n\tfor(int i=0;i<5;i++)\n\t\t{\n\t\tfor(int j=0;j<5;j++)\n\t\t\tcin>>s[i][j];\n\t\t}\n\n\tfor(int i=0;i<5;i++)\n\t\tfor(int j=0;j<5;j++)\n\t{\n\t\t\t{max=s[i][j];\n\t\t\tmin=s[i][j];\n n=i;q=j;\n\n\t\t\t\tfor(int p=0;p<5;p++)\n\t\t\t\t{ if(s[i][p]>max){max=s[i][p];q=p;}}\n\n\t\t\t\tfor(int m=0;m<5;m++)\n\t\t\t\t\t{if(s[m][j]a[i][j])\n\t\t\t{\n\t\t\t\tsite[tmp][j]=0;\n\t\t\t\tsite[i][j]=site[i][j]&&1;\n\t\t\t\ttmp=i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsite[i][j]=0;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tfor(j=0;j<=4;j++)\n\t\t{\n\t\t\tif(site[i][j]==1)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t\ts++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(s==0) printf(\"not found\");\n\n\treturn 0;\n}\n"} +{"label": "73", "index": "36374", "code": "/**\n* @file 1.cpp\n* @author ???\n* @date 2011-10-26\n* @description\n* ??????:????\n*/\nint main()\n{\n\tint a[6][6], i, j, k, l, hang, lie;\n\tint ct = 0, ctl, ad;\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tfor (j = 1; j <= 5; j++)\n\t\t\tcin >> a[i][j];\n\t}\n\tfor (hang = 1; hang <= 5; hang++)\n\t{\n\t\tad = a[hang][1];\n\t\tl = 1;\n\t\tctl = 0;\n\t\tfor (lie = 1; lie <= 5; lie++)\n\t\t{\n\t\t\tif (a[hang][lie] > ad)\n\t\t\t{\n\t\t\t\tad = a[hang][lie];\n\t\t\t\tl = lie;\n\t\t\t}\n\t\t}\n\t\tfor (k = 1; k <= 5; k++)\n\t\t{\n\t\t\tif (ad < a[k][l])\n\t\t\t\tctl++;\n\t\t}\n\t\tif (ctl == 4)\n\t\t{\n\t\t\tcout << hang << ' ' << l << ' ' <>a[i][j];\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tx[i]=0;big[i]=a[i][0];\n\t\tfor(j=0;j<=4;j++)\n\t\t if(a[i][j]>big[i])\n\t\t\t{\n\t\t\t\tbig[i]=a[i][j];\n\t\t\t\tx[i]=j;\n\t\t\t}\n\t}\n\tfor(j=0;j<=4;j++)\n\t{\n\t\ty[j]=0;small[j]=a[0][j];\n\t\tfor(i=0;i<=4;i++)\n\t\t if(a[i][j]>a[i][j];\n\t\t\tb[i][j]=a[i][j];\n\t\t\tc[i][j]=a[i][j];\n\t\t}\n\t}\n\t//?b?c????????????????????\n\tfor(i=0;i<5;i++){//??b[i][4]?????\n\t\tfor(j=0;j<=3;j++){\n\t\t\tif(b[i][j]>b[i][j+1]){\n\t\t\t\tw=b[i][j];b[i][j]=b[i][j+1];b[i][j+1]=w;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++){//??c[4][j]?????\n\t\tfor(i=0;i<=3;i++){\n\t\t\tif(c[i][j]>a[i][j];\n\t\t\tif(max[i]<=a[i][j]){max[i]=a[i][j];y[i]=j;}\n\t\t}\n\t}\n\tfor(int i=0;i<5;i++)\n\t{\n\t\tfor(int j=0;j<5;j++)\n\t\t{\n\t\t\tif(max[i]>a[j][y[i]])is=0;\n\t\t}\n\t\tif(is)\n\t\t{\n\t\t\te=1;\n\t\t\tcout<>a[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tint x=0,y=0,t=0,d=0;\n\t\tfor(j=0;j<5;j=j+1)\n\t\t{\n\t\t\tif(t<=a[i][j])\n\t\t\t{\n\t\t\t\tt=a[i][j];\n\t\t x=i;\n\t\t\t\t y=j;\n\t\t\t}\n\t\t\telse\n\t\t\t\tx=i;\n\t\t}\n\t\t//cout<a[k][y])\n\t\t\td=d+1;\n\t\t}\t\t\n\t\t if(d==0)\n\t\t {\n\t\t cout<> a[i][j];\n\tfor (int i = 1; i <= 5; i++)\n\t\tfor (int j = 1; j <= 5; j++)\n\t\t{\n\t\t\tc1 = 0;\n\t\t\tc2 = 0;\n\t\t\tfor (int k = 1; k <= 5; k++)\n\t\t\t{\n\t\t\t\tif (a[i][j] >= a[i][k])\n\t\t\t\t\tc1++;\n\t\t\t\tif (a[i][j] <= a[k][j])\n\t\t\t\t\tc2++;\n\t\t\t}\n\t\t\tif (c1 + c2 == 10 && c1 * c2 == 25)\n\t\t\t{\n\t\t\t\tcout << i << \" \" << j << \" \" << a[i][j];\n\t\t\t\tn++;\n\t\t\t}\t\t\t\t\n\t\t}\n\tif (!n)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\t\n}"} +{"label": "73", "index": "36380", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)scanf(\"%d\",&a[i][j]);\n\t}\n\tint c[100]={0};\n\tint m;\n\tint t=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tm=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>a[i][m])m=j;\n\t\t}\n\t\tc[10*i+m]++;\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tm=0;\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]1){printf(\"%d %d %d\\n\",i/10+1,i%10+1,a[i/10][i%10]);t=1;}\n\t}\n\tif(t==0)printf(\"not found\\n\");\n\treturn 0;\n\n}"} +{"label": "73", "index": "36381", "code": "\nint main()\n{\n\tint a[5][5],b=0;\n\tfor(int i=0;i<5;++i)\n\t\tfor(int j=0;j<5;++j)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\tfor(int i=0;i<5;++i)\n\t{ int max1=a[i][0],y1=0,x1=-1;\n\t\tfor(int j=1;j<5;++j)\n\t\t\tif(a[i][j]>max1)\n\t\t\t{\n\t\t\t\tmax1=a[i][j];\n\t\t\t\ty1=j;\n\t\t\t}\n\t\tfor(int j=0;j<5;++j)\n\t\t{if(a[j][y1]>a[i][j];\n\tfor(i=0;i<5;i++){\n\t\tfor(m=0,j=1;j<5;j++)\n\t\t\tif(a[i][m]a[j][m])n=j;\n\t\tif(n==i){cout<alei[k][m]) {sign=1;break;}\n\t\t}\n\t\tif(sign==1) {sign=0;continue;}\n\t\tprintf(\"%d %d %d\\n\",i+1,m+1,n); p+=1;\n\t}\n if(p==0) printf(\"not found\\n\");\n\n}\t\n\t"} +{"label": "73", "index": "36384", "code": "int main()\n{\n\tint max=0,sign,a[5][5],i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tif(a[0][j]>max)\n\t\t{\n\t\t\tmax=a[0][j];\n\t\t\tsign=j;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][sign]max)\n\t\t{\n\t\t\tcout<<\"1\"<<\" \"<max)\n\t\t{\n\t\t\tmax=a[1][j];\n\t\t\tsign=j;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][sign]max)\n\t\t{\n\t\t\tcout<<\"2\"<<\" \"<max)\n\t\t{\n\t\t\tmax=a[2][j];\n\t\t\tsign=j;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][sign]max)\n\t\t{\n\t\t\tcout<<\"3\"<<\" \"<max)\n\t\t{\n\t\t\tmax=a[3][j];\n\t\t\tsign=j;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][sign]max)\n\t\t{\n\t\t\tcout<<\"4\"<<\" \"<max)\n\t\t{\n\t\t\tmax=a[4][j];\n\t\t\tsign=j;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][sign]max)\n\t\t{\n\t\t\tcout<<\"5\"<<\" \"<cmp)\n\t\t {\n\t\t\t cmp=a[i][j];\n\t\t\t col=i;\n\t\t\t row=j;\n\t\t }\n\t\t if(j==4)\n\t\t {\n\t\t\t status=1;\n\t\t }\n\t }\n\t\t int p;\n\t\t for(p=0;p<5;p++)\n\t\t {\n\t\t\t if(a[p][row]>=cmp)\n\t\t\t\t continue;\n\t\t\t else\n\t\t\t {status=0;\n\t\t\t break;\n\t\t\t }\n\t\t }\n\t\t if(status==1)\n\t\t {\n\t\t\t printf(\"%d %d %d\",col+1,row+1,a[col][row]);\n\t\t\t status=0;\n\t\t\t judge=1;\n\t\t\t\n\t\t }\n\t\t cmp=0;\n }\n\t if(judge==0)\n\t printf(\"not found\");\n\t return 0;\n }\n\n\n\n\n\n\n\n\n\n"} +{"label": "73", "index": "36386", "code": "int max(int m1,int m2,int m3,int m4,int m5)\n{\n if(m1>m2)\n m2=m1; \n if(m2>m3)\n m3=m2; \n if(m3>m4)\n m4=m3; \n if(m4>m5)\n m5=m4; \n return m5;\n}\nint min(int n1,int n2,int n3,int n4,int n5)\n{\n if(n1a[k][j])\n\t\t\t\t{m=1;break;}\n\t\t\t}\n\t\t\tif(m==0)\n\t\t\t{\n\t\t\t\tn++;\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t}\n\t\t}\n\t}\n\tif(n==0)\n\t\tprintf(\"not found\");\n\treturn 0;\n}"} +{"label": "73", "index": "36388", "code": "main()\n{\n int a[5][5],b[7];\n int i,j,k,x,m,y=0;\n for (i=0;i<=4;i++)\n {\n for (j=0;j<=4;j++)\n {\n scanf (\"%d\",&a[i][j]);\n }\n }\n for (i=0;i<=4;i++)\n {\n x=a[i][0],m=0;\n for (j=0;j<=4;j++)\n {\n if (xa[k][m])\n break;\n else b[i]=b[i]+1;\n }\n if (b[i]==5)\n { y=y+1; printf (\"%d %d %d\\n\",i+1,m+1,a[i][m]); }\n }\n if (y==0) printf (\"not found\\n\");\n}"} +{"label": "73", "index": "36389", "code": "int main()\n{\n\tint num[5][5];\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&num[i][j]);\n\t\t}\n\t}\n\tint judge1[5][5];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tjudge1[i][j]=0;\n\t\t}\n\t}\n\tint judge2[5][5];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tjudge2[i][j]=0;\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tint max=num[i][0];\n\t\tint i0=i,j0=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(num[i][j]>max)\n\t\t\t{\n\t\t\t\ti0=i;\n\t\t\t\tj0=j;\n\t\t\t\tmax=num[i][j];\n\t\t\t}\n\t\t}\n\t\tjudge1[i0][j0]=1;\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tint min=num[0][j];\n\t\tint i0=0,j0=j;\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(num[i][j]a[j][i])m[i]=a[j][i];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\tfor(j=0;j<5;j++)\n\t{\n\t\tif(a[i][j]==t[i]&&a[i][j]==m[j])\n\t\t{\n\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\ttag++;\n\t\t}\n\t}\n\tif(tag==0)\n\tprintf(\"not found\\n\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36391", "code": "int main()\n{\n int i,j,k,t,p,sz[5][5];\n p=0;\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n scanf(\"%d\",&sz[i][j]);\n }\n }\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n for(k=0;k<5;k++){\n t=1;\n if(k!=j&&sz[i][j]>a[x][y];\n\t}\n\tfor (y = 1;y <= 5;y++)\n\t{\n\t\tfor (x = 1;x <= 5;x++)\n\t\t{\n\t\t\tif (a[x][y] > max[y])\n\t\t\t{\n\t\t\t\tmax[y] = a[x][y];\n\t\t\t\tmaxx[y] = x;\n\t\t\t\tmaxy[y] = y;\n\t\t\t}\n\t\t}\n\t}\n\tfor (y = 1;y <= 5;y++)\n\t{\n\t\tfor (yy = 1;yy <= 5;yy++)\n\t\t{\n\t\t\tif (max[y] > a[maxx[y]][yy])\n\t\t\t{\n\t\t\t\tmax[y] = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\ti = 1;\n\tfor (y = 1;y <= 5;y++)\n\t{\n\t\tif (max[y] != 0)\n\t\t{\n\t\t\tcout<>a[i][j];\nfor(int i=1;i<6;i++)\n {\n a[i][0]=-999999999;\n for(int j=1;j<6;j++)\n {\n if(a[i][j]>a[i][0])\n {\n a[i][0]=a[i][j];\n b[i]=j; \n }\n } \n }\nfor(int i=1;i<6;i++)\n {\n a[0][i]=999999999;\n for(int j=1;j<6;j++)\n {\n if(a[j][i]array[i][j]?m:array[i][j];\n\treturn m;\n}\nint min(int array[][5],int n,int j)\n{\n\tint i,m;\n\tm=array[0][j];\n\tfor(i=0;i>a[i][j];\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]==max(a,5,i)&&a[i][j]==min(a,5,j))\n\t\t\t{\n\t\t\t\tcout<max)\n\t\t\tmax=a[b][c];\n\t\t}\n\tfor(c=0;c<=4;c++)\n\t{\n\t\tif(a[b][c]==max&&a[b][c]==min[c])\n\t\t{\n\t\tprintf(\"%d %d %d\",b+1,c+1,a[b][c]);\n\t\tl++;\n\t\t}\n\t}\n\t}\n\tif(l==0)\n\tprintf(\"not found\");\n} \n"} +{"label": "73", "index": "36396", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,p,q,max,m,n,h,l;\n\tfor(i=0;i<=4;i++)\n\t{\n\t\tscanf(\"%d %d %d %d %d\",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);\n\t}\n\tn=0;\n\tfor(p=0;p<=4;p++)\n\t{\n\t\tmax=a[p][0];\n\t\tfor(j=1;j<=4;j++)\n\t\t{\n\t\t\tif(max<=a[p][j])\n\t\t\tmax=a[p][j];\n\t\t}\n\t\tfor(j=0;j<=4;j++)\n\t\t{\n\t\t\tif(a[p][j]==max)\n\t\t\tbreak;\n\t\t}\n\t\tm=0;\n\t\tfor(q=0;q<=4;q++)\n\t\t{\n\t\t\tif(a[p][j]<=a[q][j])\n\t\t\tm++;\n\t\t}\n\t\tif(m==5)\n\t\t{\n\t\t\th=p+1;\n\t\t\tl=j+1;\n\t\t\tprintf(\"%d %d %d\\n\",h,l,a[p][j]);\n\t\t\tn++;\n\t\t}\n\t}\n\tif(n==0)\n\tprintf(\"not found\\n\");\n\treturn 0;\n}\n"} +{"label": "73", "index": "36397", "code": "int main()\n{\n\tint b,i,c,d,n,e,j,k,m,a[10][10];\n\tm=1;\n\te=1;\n\tfor(i=1;i<=5;i++){\n\t\tfor(k=1;k<=5;k++){\n\t\tscanf(\"%d\",&a[i][k]);\n\t\t}\n\t}\n\ti=1;\n\tfor(i=1;i<=5;i++){\n\t\tk=1;\n\t\tfor(k=1;k<=5;k++){\n\t\t\tj=1;\n\t\t\tm=1;\t\n\t\t\tfor(j=1;j<=5;j++){\n\t\t\t\t\tif(a[i][k]a[j][k])m=0;\n\t\t\t\t\t}\n\t\t\t\t\tif(m==1){\n\t\t\t\t\t\tprintf(\"%d %d %d\\n\",i,k,a[i][k]);\n\t\t\t\t\te=0;}\n\t\t\t\t}\n\t\t}\n\t}\n\tif(e==1)printf(\"not found\");\n\n\treturn 0;\n}\n"} +{"label": "73", "index": "36398", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,m,k,counter=0,s,n;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(n=0;n<5;n++)\n\t{\n\t\tm=a[n][0];k=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\n\t\t\tif(a[n][j]>m)\t\n {\n\t m=a[n][j]; \n\t\t\t\t k=j;\n } \n\t\t\t\n\t\t}\n\t\ts=a[0][k];\n\t\tfor(i=1;i<5;i++)\n\t\t{\n\t\t\tif(a[i][k]> a[i][j];\n\tfor (i=0;i<5;i++)\n\t{\n\t\tg=1;\n\t\tmax=a[i][0];\n\t\tmaxi=i;\n\t\tmaxj=0;\n\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(max a[j][maxj])\n\t\t{\n\t\t\tg=0;\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t\tif (g!=0)\n\t\t{\n\t\t\tcout << maxi+1 << \" \"<< maxj+1 << \" \" << a[maxi][maxj] <a[r][lie-1])\n {\n paohui++;\n break;\n }\n }\n if(paohui==0)\n {\n printf(\"%d %d %d\",hang,lie,an);\n paohuierhao++;\n }\n }\nif(paohuierhao==0)\nprintf(\"not found\");\nreturn 0;\n}"} +{"label": "73", "index": "36401", "code": "int main()\n{\n int a[5][5];\n int b[5];\n int c[5];\n int i,j,t;\n t=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n { \n cin >> a[i][j];\n }\n }\n for(i=0;i<5;i++)\n {\n b[i]=a[i][0];\n }\n for(j=0;j<5;j++)\n {\n c[j]=a[0][j];\n }\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n if(a[i][j]>b[i])\n {\n b[i]=a[i][j];\n }\n if(a[i][j]max){name=p;max=number[i][p];}} judge[i][name]++;}\n\tfor(p=0;p<5;p++){min=number[0][p];name=0;for(i=0;i<5;i++){if(number[i][p]s)\n {\n s=a[i][z];\n }\n }\n }\n if (a[i][j]>=s)\n {\n s=a[0][j];\n for(m=0;m<5;m++)\n {\n if(m==i)\n {\n continue;\n }\n else\n {\n if (a[m][j]> a[i][j];\n\t\t}\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tmax = a[i][1];\n\t\tcolumn[i] = 1;\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tcolumn[i] = j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i = 0; i <= 4; i++)\n\t{\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (a[i][column[i]] > a[j][column[i]])\n\t\t\t{\n\t\t\t\texist = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\texist = 1;\n\t\t}\n\t\tif (exist == 1)\n\t\t{\n\t\t\tcout << i+1 << \" \" << column[i]+1 << \" \" << a[i][column[i]] << endl;\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\" << endl;\nreturn 0;\n}"} +{"label": "73", "index": "36405", "code": "int main()\n{\n int i, j, k = 0;\n int a[5][5];\n int max[5];\n int min[5];\n for (i = 0; i <= 4; i++)\n for (j = 0; j <= 4; j++)\n cin >> a[i][j];\n for (i = 0; i < 5; i++)\n {\n max[i] = a[i][0];\n min[i] = a[0][i];\n }\n for (i = 0; i <= 4; i++)\n for (j = 0; j <= 4; j++)\n {\n if (a[i][j] > max[i])\n max[i] = a[i][j];\n if (a[i][j] < min[j])\n min[j] = a[i][j];\n }\n for (i = 0; i <= 4; i++)\n for (j = 0; j <= 4; j++)\n if (max[i] == min[j])\n {\n cout << i + 1 << \" \" << j + 1 << \" \" << max[i];\n k++;\n }\n if (k == 0)\n cout << \"not found\";\n return 0;\n}\n"} +{"label": "73", "index": "36406", "code": "\nint main()\n{\n\t//freopen(\"in.txt\",\"r\",stdin);\n\t//freopen(\"out.txt\",\"w\",stdout);\n\tint i, j, k, column=-1;\n\tint arr[5][5];\n\tfor (i = 0; i < 5; ++ i) for (j = 0; j < 5; ++ j) cin >> arr[i][j];\n\tfor (i = 0; i < 5; ++ i)\n\t{\n\t\tfor (j = 0; j < 5; ++ j)\n\t\t{\n\t\t\tfor (k = j+1; k < 5; ++ k)\n\t\t\t\tif (arr[i][j] < arr[i][k]) break;\n\t\t\tif (k == 5)\n\t\t\t{\n\t\t\t\tcolumn = j;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (j = 0; j < 5; ++ j)\n\t\t\tif (arr[i][column] > arr[j][column]) break;\n\t\tif (j == 5)\n\t\t{\n\t\t\tcout << i+1 << \" \" << column+1 << \" \" << arr[i][column] << endl;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (i == 5) cout << \"not found\\n\";\n}\n"} +{"label": "73", "index": "36407", "code": "int main()\n{\n\tint i,j,t,p,a[6][6],max;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tp=0;\n\t\tmax=a[i][0];\n\t\tt=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tt=j;\n\t\t\t}\n\t\t}\n for(j=0;j<5;j++)\n\t\t{\n\t\t\tif(max<=a[j][t])\n\t\t\t{\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t\tif(p==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\",i+1,t+1,max);\n\t\t\tprintf(\"\\n\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i>=5)\n\t\tprintf(\"not found\");\n\treturn 0;\n}\n\t"} +{"label": "73", "index": "36408", "code": "int main()\n{\n int a[5][5];\n int b[5];\n int c[5];\n int i,j;\n int f = 0;\n for(i=0; i<5; i++)\n {\n \t\t for(j=0; j<5; j++)\n \t\t {\n\t\t cin>>a[i][j];\n\t\t if(i == 0)\n\t\t {\n\t\t\t \t b[j] = a[i][j];\n\t }\n\t if(j == 0)\n\t {\n\t\t\t \t c[i] = a[i][j];\n\t }\n\t if(a[i][j] < b[j])\n\t {\n\t \t\t\t b[j] = a[i][j];\n\t\t\t }\n\t\t\t if(a[i][j] > c[i])\n\t\t\t {\n\t\t\t c[i] = a[i][j];\n\t\t\t } \t\t\t \n }\n }\n for(i=0; i<5; i++)\n {\n \t\t for(j=0; j<5; j++)\n \t\t {\n\t\t if(b[j] == c[i])\n\t\t {\n\t \t\t cout<>a[i][j];//???? \n\tfor (j=0;j<5;j++)\n\t\tfor (i=0;i<5;i++)\n\t\t\tfor (k=0;k<5;k++)\n\t\t\t{\n\t\t\t\tif (a[i][j]>a[k][j])\n\t\t\t\t\tbreak;\n\t\t\t\tif (a[i][j]<=a[k][j]&&k==4)\n\t\t\t\t\tb[i][j]=a[i][j];//?????????? \n\t\t\t}\n\t\t\tfor (i=0;i<5;i++)\n\t\t\t\tfor (j=0;j<5;j++)\n\t\t\t\t\tfor (k=0;k<5;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (a[i][j]=a[i][k]&&k==4)\n\t\t\t\t\t\t\tc[i][j]=a[i][j];//?????????? \n\t\t\t\t\t}\n\t\t\t\t\tfor (i=0;i<5;i++)\n\t\t\t\t\t\tfor (j=0;j<5;j++)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif (b[i][j]==c[i][j]&&b[i][j]!=0)\n\t\t\t\t\t\t\t {\n cout<=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n\n {\n x=i+1;\n y=j+1;\n printf(\"%d %d %d\\n\",x,y,a[i][j]);count++;}\n }\n if(count==0)\n printf(\"not found\");\n}\n"} +{"label": "73", "index": "36411", "code": "\nint main() {\n\t\n\tint num[5][5], max[2][5], min[2][5];\n\tfor(int i=0; i<5; i++) {\n\t\tfor(int j=0; j<5; j++) {\n\t\t\tscanf(\"%d\", &num[i][j]);\n\t\t}\n\t}\n\tfor(int i=0; i<5; i++) {\n\t\tfor(int j=0; j<5; j++) {\n\t\t\tmax[0][i] = num[i][0];\n\t\t\tmax[1][i] = 0;\n\t\t\tmin[0][j] = num[0][j];\n\t\t\tmin[1][i] = 0;\n\t\t}\n\t}\n\n\tfor(int i=0; i<5; i++) {\n\t\tfor(int j=0; j<5; j++) {\n\t\t\tif(num[i][j] > max[0][i]) {\n\t\t\t\tmax[0][i] = num[i][j];\n\t\t\t\tmax[1][i] = j;\n\t\t\t}\n\t\t\tif(num[i][j] < min[0][j]) {\n\t\t\t\tmin[0][j] = num[i][j];\n\t\t\t\tmin[1][j] = i;\n\t\t\t}\n\t\t}\n\t}\n\n\tint count = 0;\n\tfor(int i=0; i<5; i++) {\n\t\tif(min[1][max[1][i]] == i) {\n\t\t\tif(count != 0) printf(\"\\n\");\n\t\t\tprintf(\"%d %d %d\", i+1, max[1][i]+1, max[0][i]);\n\t\t\tcount ++;\n\t\t}\n\t}\n\n\tif(count == 0) {\n\t\tprintf(\"not found\");\n\t}\n\t\treturn 0;\n\n}\n"} +{"label": "73", "index": "36412", "code": "//**************************************\n//?????????\n//??????\n//?????2011.10.29 19:58\n//**************************************\nint main()\n{\n int number[5][5];//?????\n int i,j;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {cin>>number[i][j];}\n }\n int maxnumber,l;\n int max1[5][5]={0},max2[5][5]={0};//max1?max2??????????\n for(i=0;i<5;i++)//???????????\n {\n maxnumber=number[i][0];\n max1[i][0]=1;\n l=0;\n for(j=1;j<5;j++)\n {\n if(maxnumbernumber[j][i])\n {maxnumber=number[j][i];\n max2[j][i]=1;\n max2[l][i]=0;\n l=j;\n }\n }\n }\n int judge=0;//judge??????????\n for(i=0;i<5;i++)//????????\n {\n for(j=0;j<5;j++)\n {\n if(max1[i][j]&&max2[i][j])\n {cout<>a[i][j];\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++) //??????\n\t\t\tif((a[i][j]>=a[i][1])&&(a[i][j]>=a[i][2])&&(a[i][j]>=a[i][3])&&(a[i][j]>=a[i][4])&&(a[i][j]>=a[i][0])&&(a[i][j]<=a[1][j])&&(a[i][j]<=a[2][j])&&(a[i][j]<=a[3][j])&&(a[i][j]<=a[4][j])&&(a[i][j]<=a[0][j]))\n\t\t\t\t{ cout<>a[i][j];\n for(i=0;i<5;i++) //????\nfor(j=0;j<5;j++){\nt=a[i][j];\n if((t>=a[i][0])&&(t>=a[i][1])&&(t>=a[i][2])&&(t>=a[i][3])&&(t>=a[i][4])&&(t<=a[0][j])&&(t<=a[1][j])&&(t<=a[2][j])&&(t<=a[3][j])&&(t<=a[4][j])){\n cout<> a[i][j];\n\t\tint andian = 0;\n\t\tint lie = 0;\n\t\tfor (int p = 0; p < 5; p++)\n\t\t{\n\t\t\tandian = a[p][0];\n\t\t\tlie = 0;\n\t\t\tfor (int q = 0; q < 5; q++)\n\t\t\t{\n\t\t\t\tif (andian < a[p][q])\n\t\t\t\t{\n\t\t\t\t\tandian = a[p][q];\n\t\t\t\t\tlie = q;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int t = 0; t < 5; t++)\n\t\t\t{\n\t\t\t\tif (a[t][lie] < andian)\n\t\t\t\t{\n\t\t\t\t\tflag[p] = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag[p] == 1)\n\t\t\t\tcout << p + 1 << \" \" << lie + 1 << \" \" << andian << endl;\n\t\t}\n\t\tif (flag[0] == 0 && flag[1] == 0 && flag[2] == 0 && flag[3] == 0 && flag[4] == 0)\n\t\t\tcout << \"not found\" << endl;\n\t\treturn 0;\n}\n\n\n"} +{"label": "73", "index": "36416", "code": "int max(int array[5][5],int n)\n{\n\tint t=array[n][0],i;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(tarray[i][n])\n\t\tt=array[i][n];\n\t\telse;\n\t}\n\treturn t;\n}\nint main()\n{\n\tint max(int array[5][5],int x);\n\tint min(int array[5][5],int x);\n\tint a[5][5],i,j,t,count=0,andian;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\tfor(t=0;t<5;t++)\n\t{\n\t\tandian=max(a,t);\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(andian==min(a,i))\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",t+1,i+1,andian);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\tcount++;\n\t\t}\n\t}\n\tif(count==25)\n\tprintf(\"not found\\n\");\n\t\n\treturn 0;\n} "} +{"label": "73", "index": "36417", "code": "\nint main()\n{\n\tint i=0,k=0,j=0,max=0,min=1000000,a[6][6]={0};\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{ \n\t\t\t\n\t\t\tif(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t}\n\t\t}\n\t\ta[i][5]=max;\n\t\tmax=0;\n\t}\n\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\t\n\t\t\tif(a[j][i]>a[i][j];//????\n\t\t\tif(a[i][j]>=max)//????????????????\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tpa[i]=j;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t\tfor (j=0;j<5;j++)//????????????????\n\t\t{\n\t\t\tmin=a[0][j];\n\t\t\tfor(i=0;i<5;i++)\n\t\t\t{\n\t\t\t\tif (a[i][j]<=min)\n\t\t\t\t{\n\t\t\t\t\tmin=a[i][j];\n\t\t\t\t\tpi[j]=i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(i=0;i<5;i++)\n\t\t\tfor(j=0;j<5;j++)\n\t\t\t{\n\t\t\t\tif (j==pa[i]&&i==pi[j])//????????????\n\t\t\t\t{\n\t\t\t\t\tcout<> a[i][j];\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tmax = 0; \n\t\tfor (j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tm = i;\n\t\t\t\tk = j;\n\t\t\t}\n\t\t}\n\t\tmin = a[0][k];\n\t\tfor (int l = 0; l < 5; l++)\n\t\t{\n\t\t\tif (a[l][k] < min)\n\t\t\t\tmin = a[l][k];\n\t\t}\n\t\tif (min == max)\n\t\t{\n\t\t\tcout << m + 1 << \" \" << k + 1 << \" \" << a[m][k] << endl;\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36420", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n for(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4]&&a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(i==4&&j==4){printf(\"not found\");}\n\t\t}\n\t\n\t\t\n\n\t}\n\n\nreturn 0;\n}"} +{"label": "73", "index": "36421", "code": "int main()\n{ int max(int q_1,int q_2,int q_3,int q_4,int q_5);\n int min(int p_1,int p_2,int p_3,int p_4,int p_5);\n int a[5][5];\n int i,j,m,n;\n i=0;j=0;\n scanf(\"%d %d %d %d %d\\n\",&a[0][0],&a[0][1],&a[0][2],&a[0][3],&a[0][4]);\n scanf(\"%d %d %d %d %d\\n\",&a[1][0],&a[1][1],&a[1][2],&a[1][3],&a[1][4]);\n scanf(\"%d %d %d %d %d\\n\",&a[2][0],&a[2][1],&a[2][2],&a[2][3],&a[2][4]);\n scanf(\"%d %d %d %d %d\\n\",&a[3][0],&a[3][1],&a[3][2],&a[3][3],&a[3][4]);\n scanf(\"%d %d %d %d %d\\n\",&a[4][0],&a[4][1],&a[4][2],&a[4][3],&a[4][4]);\n while(i<=4)\n { m=max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);\n while(j<=4)\n { n=min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);\n if(a[i][j]==m&&a[i][j]==n)\n {printf(\"%d %d %d\",i+1,j+1,a[i][j]);i=10;j=10;}\n j++;} \n j=0;i++;}\n if(i==5)\n printf(\"not found\");\n return 0;\n}\n int max(int q_1,int q_2,int q_3,int q_4,int q_5)\n { int da,k;\n if (q_1p_2)\n {t=p_1;p_1=p_2;p_2=t;}\n if (p_1>p_3)\n {t=p_1;p_1=p_3;p_3=t;}\n if (p_1>p_4)\n {t=p_1;p_1=p_4;p_4=t;}\n if (p_1>p_5)\n {t=p_1;p_1=p_5;p_5=t;}\n xiao=p_1;\n return(xiao);}\n \n "} +{"label": "73", "index": "36422", "code": "\nint main()\n{\n\tint num[5][5],i,k,j,x,y,max=0,count=0,z=0;\n\t\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(k=0;k<5;k++) cin>>num[i][k];\n\t}\n\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax=0;x=0;y=0;\n\t\tcount=0;\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif (num[i][k]>max) {max=num[i][k];x=i;y=k;}\n\t\t}\n\t\t\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif (max>n[i][j];\n\t\t}\n\t}\n\n\tfor(i = 0;i < 5;i++){\n\t\tcolumn = 0;\n\t\tnum = n[i][0];\n\n\t\tfor(j = 0;j < 5;j++){ //????????\n\t\t\tif(n[i][j] > num){\n\t\t\t\tnum = n[i][j];\n\t\t\t\tcolumn = j;\n\t\t\t}\n\t\t}\n\n\t\tflag = 1;\n\n\t\tfor(k = 0;k < 5;k++){ //???????????\n\t\t\tif(n[k][column] < num){\n\t\t\t\tflag = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(flag){\n\t\t\tcout<=max[i])max[i]=a[i][j];\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(a[i][j]<=min[j])\n\t\t\t{\n\t\t\t\tmin[j]=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i<5;i++)\n\t\t\tfor(j=0;j<5;j++)\n\t\t\tif(max[i]==min[j]&&max[i]==a[i][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,max[i]);\n\t\t\t\tsum++;\t\t\t\n\t\t\t}\n\t\tif(sum==0)\n\t\t\tprintf(\"not found\");\n\t\treturn 0;\n}\n\n"} +{"label": "73", "index": "36425", "code": "int main()\n{\n\tint a[5][5] = {0};\n\tint i, j, k;\n\tint found = 0;\n\tfor (i = 0; i < 5; i ++)\n\t\tfor (j = 0; j < 5; j ++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 0; i < 5; i ++)\n\t{\n\t\tint max = 0, min = 1e6, mi, mj;\n\t\tfor (j = 0; j < 5; j ++)\n\t\t\tif (max < a[i][j])\n\t\t\t{max = a[i][j]; mj = j;}\n\t\tfor (k = 0; k < 5; k ++)\n\t\t\tif (min > a[k][mj])\n\t\t\t{min = a[k][mj]; mi = k;}\n\t\tif (mi == i)\n\t\t{\n\t\t\tfound = 1;\n\t\t\tcout << mi + 1 << \" \" << mj + 1 << \" \" << a[mi][mj];\n\t\t}\n\t}\n\tif (!found) cout << \"not found\";\n\tcout << endl;\n\treturn 0;\n\t\n}"} +{"label": "73", "index": "36426", "code": "//*********************************************************************************\n//????\n/*?????? (5*5)??????????????????????? \n?????????????????????????????????\u0093not found\u0094? \n??????????????????????????????????? */\n//*********************************************************************************\nint max(int a,int b,int c,int d,int e)//?????????\n{\n int p;\n if(a>b)\n\t p=a;\n else\n\t p=b;\n if(pc)\n\t p=c;\n if(p>d)\n\t p=d;\n if(p>e)\n\t p=e;\n return p;\n}\nint main()\n{\n int a[5][5],i,j;\n for(i=0;i<5;i++)\n\t for(j=0;j<5;j++)\n\t\t cin>>a[i][j];//??5*5??\n int k=0; \n for(i=0;i<5;i++)\n\t for(j=0;j<5;j++)\n\t {\n\t if(max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4])==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]))//????\n\t\t {\n\t\t\t \n k++; \n int m,n;\n\t\t\t m=i+1;\n\t\t\t n=j+1;//?????????1\n\t\t\t cout<a[i][max])\nmax=j;\n}\nfor(k=1;k<6;k++)\nif(a[k][max]a[i][j]){\n break;\n }\n }\n if(k<5){\n continue;\n }\n for(k=0;k<5;k++){\n if(a[k][j]k)\n\t\t\t{\n\t\t\t\tk=a[i][j];\n\t\t\t\tm=i;n=j;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(l=0;l<=4;l++)//in the column.\n\t\t{\n\t\t\tif(a[l][n]>array[i][j];\n\tint g=0,k=0; //?????g?????0\n\tint lie=0; //??lie?????,?????????\n\tint hang=0; //??hang??????????????\n\tfor(int i=0;i<=4;i++)\n\t{\n\t\tint max=0; //??max???????\n\t\tfor(int j=0;j<=4;j++) //for???????????\n\t\t{\n\t\t\tif(array[i][j]>max)//???????max\n\t\t\t{\n\t\t\t\tmax=array[i][j];\n\t\t\t\tlie=j; //???????\n\t\t\t}\n\t\t}\n\t\tif((array[0][lie]>=max)&&\n\t\t\t\t(array[1][lie]>=max)&&\n\t\t\t\t(array[2][lie]>=max)&&\n\t\t\t\t(array[3][lie]>=max)&&\n\t\t\t\t(array[4][lie]>=max)){//?????????????\n\t\t\tfor(k=0;k<=4;k++) //??????????????????hang\n\t\t\t\tif(array[k][lie]==max)\n\t\t\t\t\thang=k;\n\t\t\tcout<> a[i][j];\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tmax = a[i][0];\n\t\tcolumn[i] = 0;\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tcolumn[i] = j;\n\t\t\t}\n\t\t}\n\t\tmaxr[i] = max;\n\t\trow[i] = i;\n\t}\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tc = 0;\n\t\tfor(j = 0; j < 5; j++)\n\t\t{\n\t\t\tif(maxr[i] > a[j][column[i]])\n\t\t\t{\n\t\t\t\tc = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif( c == 0)\n\t\t{\n\t\t\tcout << row[i] + 1 << \" \" << column[i] + 1 << \" \" << maxr[i] << endl;\n\t\t\tcount++;\n\t\t}\n\t}\n\tif(count == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36432", "code": "int main()\n{\n\tint i,j,n[6][6],t,num=0;\n\tfor(i=0;i<6;i++)\n\t\tfor(j=0;j<6;j++)\n\t\t\tn[i][j]=0;//???\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>n[i][j];//??\n\tfor(i=0;i<5;i++)\n\t{\n\t\tt=n[i][0];\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(n[i][j]>t)\n\t\t\t{\n\t\t\t\tn[i][5]=j;\n\t\t\t\tt=n[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++)\n\t{\n\t\tt=n[0][j];\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(n[i][j]c[i][j]){\n\t\t\t\tmin[j]=c[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tint p,q,k=0;\n\tfor(p=0;p>a[i][j];\n }\n int k,t,m=0;\n int c=1,b=1;\n for(i=1;i<=5;i++)\n {\n for(j=1;j<=5;j++)\n {\n \n {for(t=1;t<=5;t++)\n if(a[i][t]>a[i][j])\n c=0;\n }\n for(k=1;k<=5;k++)\n\t {if(a[k][j]> a[j][k];\n for (j = 1; j <= 5; ++ j)//?????????\n for (k = 1; k <= 5; ++ k)\n {\n for (l = 1; l <= 5; ++ l)//????????\n if (a[j][l] > a[j][k])\n break;\n if (l <= 5)\n continue;\n for (l = 1; l <= 5; ++ l)//????????\n if (a[l][k] < a[j][k])\n break;\n if (l > 5)//????????\n {\n i = 1;\n cout << j << \" \" << k << \" \" << a[j][k] << endl;\n }\n }\n if (!i)\n cout << \"not found\" << endl;\n return 0;\n}\n"} +{"label": "73", "index": "36436", "code": "/*\n * SaddlePoint.cpp\n *\n * Created on: 2012-11-6\n * Author: Cui Zhaoxiong Class4 1200012931\n */\nint main() {\n\tint a[5][5];//??5*5??a\n\tfor (int i = 0; i < 5; i++) {//?????a\n\t\tfor (int j = 0; j < 5; j++) {\n\t\t\tcin >> a[i][j];\n\t\t}\n\t}\n\tint ex[2][5];//??2*5??ex?????????????????????????????????????\n\tmemset(ex,0,sizeof(ex));//?ex??\n\tfor (int i = 0; i < 5; i++) {//??ex????\n\t\tfor (int j = 0; j < 5; j++) {\n\t\t\tif (a[i][j] > a[i][ex[0][i]])\n\t\t\t\tex[0][i] = j;\n\t\t}\n\t}\n\tfor (int i = 0; i < 5; i++) {//???ex????\n\t\tfor (int j = 0; j < 5; j++) {\n\t\t\tif (a[j][i] < a[ex[1][i]][i])\n\t\t\t\tex[1][i] = j;\n\t\t}\n\t}\n\t/*\n\t * ????\n\tfor (int i=0;i<5;i++) cout << ex[0][i]<<' ';\n\tcout <a[t][f])\n {\n m=1;\n break;\n }\n }\n if (m==0)\n {\n printf (\"%d %d %d\\n\",k+1,f+1,a[k][f]);\n y=1;\n break;\n }\n }\n if (y==0)\n printf (\"not found\\n\");\n}\n "} +{"label": "73", "index": "36438", "code": "\n\n\nint main()\n{\n int flag = 0; \n int g; \n int a[5][5]; \n int i , j; \n int temp; \n int row[5]; \n int column; \n \n for (i = 0; i < 5; i++)\n {\n for (j = 0; j < 5; j++)\n {\n cin >> a[i][j];\n }\n }\n \n for (i = 0; i < 5; i++)\n {\n column = 0;\n temp = a[i][0];\n for (j = 1; j < 5; j++) \n {\n if (a[i][j] > temp)\n {\n column = j; \n temp = a[i][j];\n }\n }\n row[i] = column; \n }\n \n for (i = 0; i < 5; i++)\n {\n g = 0;\n for (j = 0; j < 5; j++)\n {\n if (a[j][row[i]] < a[i][row[i]]) \n {\n g++;\n }\n }\n if (g == 0) \n {\n cout << i + 1 << \" \" << row[i] + 1 << \" \" << a[i][row[i]] << endl;\n flag ++ ; \n }\n }\n if (flag == 0) \n {\n cout << \"not found\" <max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tcol=j;\n\t\t\t}\n\t\t}\n\t\tfor(m=0;m<5;m++)\n\t\t{\n\t\t\tc=0;\n\t\t\tif(m!=i)\n\t\t\t{\n\t\t\t\tif(max>=a[m][col])\n\t\t\t\t{\n\t\t\t\t\tc=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(c==0)\n\t\t{\n\t\t\tprintf(\"%d %d %d\\n\",i+1,col+1,max);\n\t\t\tf=1;\n\t\t}\n\t}\n\tif(f==0)\n\t\tprintf(\"not found\\n\");\n\treturn 0;\n}"} +{"label": "73", "index": "36440", "code": "// * * * * * * * * * * * * * * *\n// *??????? *\n// *?????? 1300013011 *\n// *???2013.11.4 *\n// * * * * * * * * * * * * * * *\nint main()\n{\n\t// a????h0?l0?????????j??????????\n\tint a[5][5], max = 0, l0 = 0, h0, j = 0;\n\t\n\tfor (int i = 0; i <= 4; i++) // ????????\n\t{\n\t\tfor (int k = 0; k <= 4; k++)\n\t\t\tcin >> a[i][k];\n\t}\n\t\n\tfor (int h = 0; h <= 4; h++) // ??????????\n\t{\n\t\tmax = a[h][0]; // ?????????????????\n\t\th0 = h;\n\t\tl0 = 0;\n\t\tfor (int l = 1; l <= 4; l++)\n\t\t{\n\t\t\tif (a[h][l] < max)\n\t\t\t\tcontinue;\n\t\t\tmax = a[h][l];\n\t\t\tl0 = l; // h0?l0?????????\n\t\t}\n\n\t\t// ?????????????????????j?1\n\t\tif ((a[0][l0] >= max) + (a[1][l0] >= max) + (a[2][l0] >= max) +\n\t\t\t(a[3][l0] >= max) + (a[4][l0] >= max) == 5)\n\t\t{\n\t\t\tcout << h0 + 1 << \" \" << l0 + 1 << \" \" << max << endl;\n\t\t\tj++;\n\t\t}\n\t}\n\n\tif (j == 0) // ????????????not found\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36441", "code": "int main()\n{\n\tint a[5][5],i,j,count=1,p,max;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<5;i++)\n\t{ \n\t\tmax=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>a[i][max])\n\t\t\t\tmax=j;\n\t\t}\n\t\tfor(p=0;p<5;p++)\n\t\t{\n\t\t\tif(p==i)\n\t\t\t\tcontinue;\n\t\t\tif(a[i][max]>a[p][max])\n\t\t\t\tbreak;\n\t\t}\n\t\tif(p==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\\n\",i+1,max+1,a[i][max]);\n\t\t\tcount++;\n\t\t}\n\t}\n\tif(count==1)\n\t\tprintf(\"not found\\n\");\n\treturn 0;\n}"} +{"label": "73", "index": "36442", "code": "int main()\n{\n\tint a[6][6], i, j, m, n, max;\n\tfor (i = 1;i <= 5; i++)\n\t\tfor(j = 1; j <= 5;j++)\n\t\t\tcin >> a[i][j];\n\tfor (i = 1;i <= 5;i++)\n\t{\n\t\t\tmax = 0;\n\t\t\tfor (j = 1; j <=5;j++)\n\t\t\t\tif (a[i][j] > max) \n\t\t\t\t{\n\t\t\t\t\tmax = a[i][j];\n\t\t\t\t\tm = i;\n\t\t\t\t\tn = j;\n\t\t\t\t}\n\t\t\tfor (j = 1;j <= 5; j++)\n\t\t\t\t\tif(a[j][n] < max) break;\n\t\t\tif (j == 6) \n\t\t\t\t{\n\t\t\t\t\tcout << m << \" \" << n << \" \" << a[m][n] << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t}\n\t\tif ( i == 6) cout << \"not found\" << endl;\n\t\treturn 0;\n}"} +{"label": "73", "index": "36443", "code": "int main()\n{\n\tint i,j,line=0,row=0,imax[6]={0},jmin[6]={2146796,2146796,2146796,2146796,2146796,2146796},a[6][6]={0};\n\tfor(i=1;i<6;i++)\n\t\tfor(j=1;j<6;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=1;i<6;i++)\n\t\tfor(j=1;j<6;j++)\n\t\t{\n\t\t\tif(a[i][j]>imax[i])\n\t\t\t\timax[i]=a[i][j];\n\t\t\tif(a[i][j]=a[i][k])\n\t\t\t\t{\n\t\t\t\t\tjs++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(js==5)\n\t\t\t{\n\t\t\t\tjs=0;\n\t\t\t\tfor(k=0;k<=4;k++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i][j]<=a[k][j])\n\t\t\t\t\t{\n\t\t\t\t\t\tjs++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(js==5)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d %d\",i+1,j+1,a[i][j]);\n\t\t\t\t\tm=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(m==0)\n\t\tprintf(\"not found\");\n\n\treturn 0;\n}\n"} +{"label": "73", "index": "36445", "code": "int a[5][5];\nint judge(int x,int y)\n{\n int i,j;\n for(i=0;i<5;i++)\n if(a[i][y]a[x][y])\n return 0;\n return 1;\n}\nmain()\n{\n int i,j,k=0;\n for(i=0;i<5;i++)\n for(j=0;j<5;j++)\n scanf(\"%d\",&a[i][j]);\n for(i=0;i<5;i++)\n for(j=0;j<5;j++) \n if(judge(i,j)) \n {\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);\n k=1;\n }\n if (k==0)\n printf(\"not found\"); \n}"} +{"label": "73", "index": "36446", "code": "int main ()\n{\n\tint a[5][5], i, j, t, k, l, m, n, flag, count = 0;\n\tfor (i = 0; i < 5; i++)\n\t{\n\t\tfor (j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\t}\n\tfor (k = 0; k < 5; k++)\n\t{\n\t\tt = a[k][0];\n\t\tflag = 1;\n\t\tfor (n = 0; n < 5; n++)\n\t\t{\n\t\t\tif (t <= a[k][n])\n\t\t\t{\n\t\t\t\tt = a[k][n];\n\t\t\t\tm = n;\n\t\t\t}\n\t\t}\n\t\tfor (l = 0; l < 5; l++)\n\t\t{\n\t\t\tif (a[k][m] > a[l][m])\n\t\t\t{\n\t\t\t\tflag = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (flag == 1)\n\t\t{\n\t\t\tcout << k + 1 <<' '<< m + 1 <<' '<< a[k][m] << endl;\n\t\t\tcount = 1;\n\t\t}\n\t}\n\tif (count == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36447", "code": "\nint main()\n{\n\tint x[5][5],i,j,m,r,c;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>x[i][j];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tm=1<<31;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(x[i][j]>m)\n\t\t\t{\n\t\t\t\tm=x[i][j];\n\t\t\t\tr=i;c=j;\n\t\t\t}\n\t\t}\n\t\tif(m<=x[0][c] && m<=x[1][c] && m<=x[2][c] && m<=x[3][c] && m<=x[4][c])\n\t\t{\n\t\t\tcout<a[k][j]) break;\n }\n if(k==6)\n {printf(\"%d %d %d\",i,j,a[i][j]);m++;break;}\n }\n }\n if(m==0) printf(\"not found\");\n} "} +{"label": "73", "index": "36449", "code": "int main()\n{\n int i, j, k, h, a[5][5], c, d, e = 0;\n for(i = 0;i <= 4;i++)\n {for(j = 0;j <= 4;j++)\n {cin >> a[i][j];}\n }\n for(i = 0;i <= 4;i++)\n {for(j = 0;j <= 4;j++)\n {c = 0;\n d = 0;\n for(k = 0;k <= 4;k++)\n {if(a[i][j] < a[i][k])\n {c = c + 1;} \n }\n for(h = 0;h <= 4;h++)\n {if(a[i][j] > a[h][j])\n {d = d + 1;}\n }\n if(c == 0&&d == 0)\n {cout << i + 1 << \" \" << j + 1<< \" \" << a[i][j] << endl;\n e = e + 1;}\n }\n }\n if(e == 0)\n {cout << \"not found\" << endl;}\n return 0;\n}\n "} +{"label": "73", "index": "36450", "code": "//******************************************\n//?????????\n//??????\n//?????2010.11.05\n//????????????\n//******************************************\nint main ()\n{\t\n\t//??5?5???????????????????????\n\tint a[5][5], min, k, m, g=0, num;\n\tfor (int i = 0; i < 5; i++)\n\t{\n\t\tfor (int j =0; j < 5;j++)\n\t\t{\n\t\t\tcin >> k;\n\t\t\ta[i][j]=k;\n\t\t}\n\t}\t\t\t\t\t\t\t\t//for??????????\n\tfor (int n = 0; n < 5; n++)\n\t{\n\t\tint max = 0;\n\t\tfor (int j = 0; j < 5; j++)\n\t\t{\n\t\t\tif (a[n][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[n][j];\n\t\t\t\tnum =j;\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t//????????\n\t\tmin = max;\n\t\tfor (m = 0; m < 5;m++)\n\t\t{\t\n\t\t\tif (a[m][num] < min) \n\t\t\t\tbreak;\n\t\t}\t\t\t\t\t\t\t//???????????\n\t\tif (m == 5)\t\t\t\t\t\n\t\t{\n\t\t\tcout << n+1 << \" \" << num+1 << \" \" << min << endl;\n\t\t\tg++;\n\t\t}\t\t\t\t\t\t\t//????????????????????\n\t}\n\tif (g == 0)\n\t\tcout << \"not found\" << endl;//??????\n\treturn 0;\n}\n\n\t\n\t\t\t\n\n\n\n"} +{"label": "73", "index": "36451", "code": "int max(int,int,int,int,int);\nint min(int,int,int,int,int);\nint main()\n{int a[5][5],i,j,k=0;\n\n for(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n {cin>>a[i][j];}\n for(i=0;i<=4;i++)\n for(j=0;j<=4;j++)\n {if(a[i][j]==max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4])&&a[i][j]==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]))\n { cout<b[i])break;\n if(b[j]<=b[i])sum++;\n if(sum==5)return b[i];}}\n}\n \n int min(int g,int f,int c,int d,int e)\n{ int sum=0,i,j;\n int b[5];\n b[0]=g;b[1]=f;b[2]=c;b[3]=d;b[4]=e;\n for(i=0;i<=4;i++)\n {sum=0;\n for(j=0;j<=4;j++)\n {if(b[j]=b[i])sum++;\n if(sum==5)return b[i];}}\n}\n \n"} +{"label": "73", "index": "36452", "code": "/*??????\n *?????w5.cpp\n *Created on: 2012-11-10\n *???????\n */\nint main(){\n\tint m,i,j,k=0;\n\tint a[5][5];\n\tfor (i=0;i<5;i++)\n\t\tfor (j=0;j<5;j++)\n\t\t{cin >> m;a[i][j]=m;}\n\tfor (i=0;i<5;i++)\n\t\tfor (j=0;j<5;j++)//?????????\n\t\t\t{if ((a[i][j]>=a[i][0])&&(a[i][j]>=a[i][1])&&(a[i][j]>=a[i][2])&&(a[i][j]>=a[i][3])\n\t\t\t&&(a[i][j]>=a[i][4])&&(a[i][j]<=a[1][j])&&(a[i][j]<=a[2][j])&&(a[i][j]<=a[3][j])\n\t\t\t&&(a[i][j]<=a[4][j])&&(a[i][j]<=a[0][j]))\n\t\t\t{cout << i+1 << \" \" << j+1 << \" \" << a[i][j] << endl;break;}//????\n\t\t\telse k++;\n\t\t\t}\n\tif (k==25)\n\t\t{cout << \"not found\" << endl;}\n\treturn 0;//????\n\n\n}\n\n"} +{"label": "73", "index": "36453", "code": "int main()\n{\n\tint A[5], B[5], a[5][5], i, j, k, m, n = 0;\n\tfor (i = 0; i <= 4; i ++)\n\t\tfor (j = 0; j <= 4; j ++)\n\t\t\tcin >> a[i][j];\n\n\tfor (i = 0; i <= 4; i ++)\n\t{\n\t\tA[i] = a[i][0];\n\t\tfor (j = 0; j <= 4; j ++)\n\t\t\tif (a[i][j] >= A[i])\n\t\t\t{\n\t\t\t\tA[i] = a[i][j];\n\t\t\t\tm = j;\n\t\t\t}\n\n\t\tB[m] = a[0][m];\n\t\tfor (k = 0; k<= 4; k ++)\n\t\t\tif (a[k][m] <= B[m])\n\t\t\t\tB[m] = a[k][m];\n\t\tif (A[i] == B[m])\n\t\t\t{\n\t\t\t\tn ++;\n\t\t\t\tcout << i + 1 << \" \" << m + 1 << \" \" << a[i][m] << endl;\n\t\t\t}\n\t}\n\tif (n == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}"} +{"label": "73", "index": "36454", "code": "int main()\n{\n\tint a[5][5],i,j,k,l,max=0,max1=0,max2=0,min1=0,min2=0,min=0,t=0,r,s;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\n\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(j==0)\n\t\t\t{\n\t\t\t\tmax=a[i][0];\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\telse if(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tr=j;\n\t\t\t}\n\t\t}\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t for(l=0;l<5;l++)\n\t\t\t{\n\t\t\t\tif(l==0)\n\t\t\t\t{\n\t\t\t\t\tmin=a[0][k];\n\t\t\t\t\ts=0;\n\t\t\t\t}\n\t\t\t\telse if(a[l][k]tmp)\n{ \ntmp=a[i][j];\nx1=i;\nx2=j;\n}\n}\n\nm=0; \nfor(p=(x1-1);p>=0;p--)\n{ \nif(a[p][x2]max){\n\t\t\tmax=a[k][t];\n\t\t\tc=t;\n\t\t}\n\t}\n\tnum=0;\n for (int m=0;m<5;m++){\n\t\tif(max>a[m][c]){\n\t\t\td--;\n\t\t\tbreak;\n\t\t\t}\n\t\telse{\n\t\t\tnum++;\n\t\t}\n\t\tif (num==5){\n\t\tprintf(\"%d %d %d\",k+1,c+1,a[k][c]);\n\t\t}\n\t}\n }\t\n if(d==0){\n\tprintf(\"not found\");\n\t\t}\n return 0;\n}"} +{"label": "73", "index": "36457", "code": "main()\n{\n int a[5][5],i,j,k,t1,t2,sum;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&a[i][j]);\n }\n }\n sum=0;\n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n t1=0;\n t2=0;\n for(k=0;k<5;k++)\n {\n if(a[i][k]>a[i][j])\n t1++;\n if(a[k][j]b){\n\t\t\t\tx[i]=j;\n\t\t\t\tb=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<5;j++){\n\t\tc=a[0][j];\n\t\ty[j]=0;\n\t\tfor(i=1;i<5;i++){\n\t\t\tif(a[i][j]> a[i][j];\n\t\t}\n\t}\n\tfor(k = 1; k <= 5; k ++)\n\t{\n\t\tfor(m = 1; m <= 5; m ++)\n\t\t{\n\t\t\tif((a[m][k] > a[1][k])||(a[m][k] > a[2][k])||(a[m][k] > a[3][k])||(a[m][k] > a[4][k])||(a[m][k] > a[5][k])||(a[m][k] \n\t\t\t < a[m][1])||(a[m][k] < a[m][2])||(a[m][k] < a[m][3])||(a[m][k] < a[m][4])||(a[m][k] < a[m][5]))\n\t\t\t {\n\t\t\t\t \n\t\t\t\t if((m == 5)&&(k == 5)&&(count == 0)) cout << \"not found\" << endl;\n\t\t\t }\n\t\t\t \n\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tcout << m << \" \" << k << \" \" << a[m][k] << endl;\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tbreak;\n\t\t\t }\n\t\t\t\n\t\t}\n\t\t\n\t}\n\n\t\n\treturn 0;\n}"} +{"label": "73", "index": "36460", "code": "int main()\n{\n\tint a[5][5], sign[5][5] = {0}, max, flag = 0;\n\tfor (int i = 0; i < 5; i++)\n\t{\n\t\tmax = 0;\n\t\tfor (int j = 0; j < 5; j++)\n\t\t{\n\t\t\tcin >> a[i][j];\n if (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t}\n\t\t}\n\t\tfor (int k = 0; k < 5; k++)\n\t\t{\n\t\t\tif (a[i][k] == max)\n\t\t\t\tsign[i][k] = 1;\n\t\t}\n\t}\n\tfor (int m = 0; m < 5; m++)\n\t{\n\t\tfor (int n = 0; n < 5; n++)\n\t\t{\n\t\t\tif (sign[m][n] == 1)\n\t\t\t{\n\t\t\t\tfor (int p = 0; p < 5; p++)\n\t\t\t\t{\n\t\t\t\t\tif (a[p][n] < a[m][n])break;\n\t\t\t\t\tif (p == 4)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << m + 1 << ' ' << n + 1 << ' ' << a[m][n];\n\t\t\t\t\t\tflag = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (flag == 0)\n\t\tcout << \"not found\" << endl;\n\t\n\treturn 0;\n}"} +{"label": "73", "index": "36461", "code": "int main()\n{\n\tint a[7][7]; //????\n\tint cnt = 0; //??????????????\n\t\n\tfor ( int k = 0; k < 5; k++ ) //??\n\t{\n\t\tfor ( int l = 0; l < 5; l++ )\n\t\t\tcin >> a[k][l];\n\t}\n\n\tfor ( int i = 0; i < 5; i++ )\n\t{\n\t\tfor ( int j = 0; j < 5; j++ ) //?????????\n\t\t{\n\t\t\tif ( a[i][j] >= a[i][0] && a[i][j] >= a[i][1] && a[i][j] >= a[i][2] &&\n\t\t\t\ta[i][j] >= a[i][3] && a[i][j] >= a[i][4] && a[i][j] <= a[0][j] && \n\t\t\t\ta[i][j] <= a[1][j] && a[i][j] <= a[2][j] && a[i][j] <= a[3][j] && a[i][j] <= a[4][j] )\n\t\t\t{\n\t\t\t\tcout << i + 1 << \" \" << j + 1 << \" \" << a[i][j] << endl;\n\t\t\t\tcnt++; //??????????\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( cnt == 0 ) //??????0?????????not found\n\t\tcout << \"not found\";\n\treturn 0;\n}\n"} +{"label": "73", "index": "36462", "code": "int main()\n{\n\tint a[5][5],i,j,k,x[5]={0},y[5]={0},g=1;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d \",*(a+i)+j);\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tk=*(*(a+i));\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(*(*(a+i)+j)>k)\n\t\t\t{\n\t\t\t\tk=*(*(a+i)+j);\n\t\t\t\t*(x+i)=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tk=*(*a+i);\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(*(*(a+j)+i)b[i]) b[i]=a[i][j]; \n if(a[i][j]m){\t\t\t\n\t\t\tm=sz[i][j];\n\t\t\tn=j;\n\t\t}\n\t\tk=0;\n\t\tif(j==4){\n\t\t\tfor(h=0;h<5;h++){\n\t\t \t if(sz[h][n]>=sz[i][n]){\n k++;\n\t\t\t\t }else{\n\t\t\t \tbreak;\n\t\t\t\t }\n\t\t\t}\n \t \tif(k==5){\n\t \t\tprintf(\"%d %d %d\",i+1,n+1,sz[i][n]);\n\t\t \ts=1;\n\t\t\t}\n\t\t}\n\t}\n}\n\tif(s==0){\n\t\t\tprintf(\"not found\");\n\t\t}\n\treturn 0;\n}\n\n"} +{"label": "73", "index": "36467", "code": "int main()\n{\n\tint a[5][5];\n\tint row,col,an,i;\n\tfor(row=0;row<5;row++)\n\t{\n\t\tfor(col=0;col<5;col++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[row][col]);\n\t\t}\n\t}\n\tint max,min,flag=1,k=1;\n\tfor(row=0;row<5;row++)\n\t{\n\t\tfor(col=0;col<5;col++)\n\t\t{\n\t\t\tflag=1;\n\t\t\tmax=a[row][col];\n\t\t\tmin=max;\n\t\t\tfor(i=0;i<5;i++)\n\t\t\t{\n\t\t\t\tif(a[row][i]>max)\n\t\t\t\t{\n\t\t\t\t\tflag=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(a[i][col]> a[i][j]; //?????????????\n\tfor (i = 0; i <= 4; i++)\n\t{ max = INT_MIN;\n\t\t min = INT_MAX; //??max?min?????\n\t\tfor (j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif(a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j]; //?????????\n\t\t\t\tl = j; //?????????????????l\n\t\t\t}\n\t\t}\n\t\tfor(k = 0; k <= 4; k++)\n\t\t{\n\t\t\tif(a[k][l] < min) \n\t\t\t\tmin = a[k][l]; //????????????????????\n\t\t}\n\t\tif(a[i][l] == min) //?????????????????????????????????????\n\t\t{\n\t\t\tcout << i + 1 << \" \" << l + 1 << \" \" << a[i][l] << '\\n'; //?????????????????\n\t\t\tflag = 1;\n\t\t}\n\t}\n\tif (flag == 0) //????????\n\t\tcout << \"not found\" << '\\n'; //??not found\n\treturn 0;\n}\n"} +{"label": "73", "index": "36469", "code": "int main()\n{\n\tint a[6][6];\n\tint i,j;\n\tfor (i=1;i<6;i++)\n\t{\n\t\tfor (j=1;j<6;j++)\n\t\t{\n\t\t\tscanf (\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tint max,min;\n\tfor (i=1;i<6;i++)\n\t{\n\t\ta[i][0]=1;\n\t\tmax=a[i][1];\n\t\tfor (j=1;j<6;j++)\n\t\t{\n\t\t\tif (a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\ta[i][0]=j;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=1;i<6;i++)\n\t{\n\t\ta[0][i]=1;\n\t\tmin=a[1][i];\n\t\tfor (j=1;j<6;j++)\n\t\t{\n\t\t\tif (a[j][i]r[i]) r[i]=s[i][j];\n if(s[i][j]max)\n{ max=a[i][j];\nmaxj=j;\n}\n\nflag=1;\n\nfor(k=0;ka[k][maxj])\n{ flag=0;\ncontinue;}\n\nif (flag)\n{ printf(\"%d %d %d\\n\",i+1,maxj+1,max);\nbreak;\n}\n}\nif(!flag)\nprintf(\"not found\\n\");\n}"} +{"label": "73", "index": "36472", "code": "\n\nvoid bubble(int x[],int n) //???? ?n?????\n{\n int i,j,y;\n for(i=1;ix[j+1])\n {\n y=x[j];\n x[j]=x[j+1];\n x[j+1]=y; \n } \n } \n } \n} \n\nint main()\n{\n int x[5][5],a[5],b[5];\n int i,j,t1,t2,sign=0;\n \n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n scanf(\"%d\",&x[i][j]); \n } \n } \n \n for(i=0;i<5;i++)\n {\n for(j=0;j<5;j++)\n {\n a[j]=x[i][j]; \n }\n bubble(a,5);\n for(j=0;j<5;j++)\n {\n if(a[4]==x[i][j])\n t1=j; \n }\n \n for(j=0;j<5;j++)\n {\n b[j]=x[j][t1]; \n }\n bubble(b,5);\n for(j=0;j<5;j++)\n {\n if(b[0]==x[j][t1])\n t2=j; \n }\n if(a[4]==b[0])\n {\n printf(\"%d %d %d\",t2+1,t1+1,a[4]);\n sign=1;\n } \n } \n \n if(sign==0)\n printf(\"not found\");\n \n \n scanf(\"%d\",&x[i][j]); \n return 0;\n \n}\n"} +{"label": "73", "index": "36473", "code": "/***************************************\n*file 4.cpp **************\n*author ??? ************\n*date 2013-11-1 ********\n*description ???? *******\n****************************************/\n\nint main()\n{\n\tint a[5][5];\n\tint i, j, k, l; //?????????\n\n\t//????\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tfor(j = 0; j < 5; j++)\n\t\t\tcin >> a[i][j];\n\t}\n\tint b[5], c[5]; //?????????????????????????\n\tint m;\n\n\t//????????????\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tm = a[i][0], b[i] = 0;\n\t\tfor(j = 1; j < 5; j++)\n\t\t{\n\t\t\tif(a[i][j] > m)\n\t\t\t{\n\t\t\t\tm = a[i][j];\n\t\t\t\tb[i] = j;\n\t\t\t}\n\t\t}\n\t}\n\n\t//????????????\n\tfor(j = 0; j < 5; j++)\n\t{\n\t\tm = a[0][j]; c[j] = 0;\n\t\tfor(i = 1; i < 5; i++)\n\t\t{\n\t\t\tif(a[i][j] < m)\n\t\t\t{\n\t\t\t\tm = a[i][j];\n\t\t\t\tc[j] = i;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(i = 0; i < 5; i++)\n\t{\n\t\tif(c[b[i]] == i) //???i???????????????????i(??i,b[i]????)\n\t\t{\n\t\t\tcout << i+1 << \" \" << b[i] + 1 << \" \" \n\t\t\t\t << a[i][b[i]] << endl;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i == 5) cout << \"not found\" << endl; //??????????????\n\treturn 0;\n}\n\n\n"} +{"label": "73", "index": "36474", "code": "int main()\n{\n\tint a[5][5];\n\tint i,j,max[5][3],min[5][3],m=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tscanf(\"%d\",&a[i][j]);\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i][0])\n\t\t\t{\n\t\t\t\tmax[i][0]=a[i][j];\n\t\t\t\tmax[i][1]=i;\n\t\t\t\tmax[i][2]=j;\n\t\t\t}\n\t\t}\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(j==0)\n\t\t\t{\n\t\t\t\tmin[i][0]=a[j][i];\n\t\t\t min[i][1]=j;\n\t\t\t\tmin[i][2]=i;\n\t\t\t}\n\t\t\tif(a[j][i]>a[i][j];\n\t\t\tc[i][j]=b[i][j]=a[i][j];\n\t\t}\n\t}\n\t\n\t//**********************i?????5\n\tfor (i=1;i<=5;i++)//????????????????????????\n\t{\n\t\t//****************************????for????????\n\t\tfor(int k=1;k<=4;k++)\n\t\t{\n\t\t\tfor (j=1;j<=5-k;j++)\n\t\t\t{\n\t\t\t\tif (a[i][j]>a[i][j+1])\n\t\t\t\t{\n\t\t\t\t\ttemp1=a[i][j];\n\t\t\t\t\ta[i][j]=a[i][j+1];\n\t\t\t\t\ta[i][j+1]=temp1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}//???,???a[i][j]?,?????????????a[i][5]????\n\t\n\t//**********************j?????5\n\tfor (j=1;j<=5;j++)//???????????????????????\n\t{\n\t\t//****************************??\n\t\tfor(int k=1;k<=4;k++)\n\t\t{\n\t\t\tfor (i=1;i<=5-k;i++)\n\t\t\t{\n\t\t\t\tif (b[i][j]>b[i+1][j])\n\t\t\t\t{\n\t\t\t\t\ttemp2=b[i][j];\n\t\t\t\t\tb[i][j]=b[i+1][j];\n\t\t\t\t\tb[i+1][j]=temp2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}//???,???b[i][j]?,?????????????b[5][j]????\n\t\n\t\n\tint flag=0;\n\tfor (i=1;i<=5;i++)//?c[i][j]??????????\n\t{\n\t\tfor (j=1;j<=5;j++)\n\t\t{\n\t\t\tif (c[i][j]==a[i][5]&&c[i][j]==b[1][j])//?????c[i][j]\t\t\t\n\t\t\t{\n\t\t\t\tcout<max)\n {\n max=a[i][j];\n maxj=j;\n }\n }\n flag=1;\n for(k=0;k<5;k++)\n if(max>a[k][maxj])\n {\n flag=0;\n continue;\n }\n if(flag)\n {\n printf(\"%d %d %d\",i+1,maxj+1,max);\n break;\n }\n }\n if(flag==0)\n printf(\"not found\\n\");\n getchar();\n getchar();\n }"} +{"label": "73", "index": "36477", "code": "\nint main()\n{\n\tint i,j,k,max,t,flag=1;\n\tint a[5][5];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax=0;\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tt=j;\n\t\t\t}\n\t\t}\n\t\tfor(k=0;k<5;k++)\n\t\t{\n\t\t\tif(a[k][t]> a[i][j];\n\tfor ( i = 0; i < 5; i ++ ) //????????????????\n\t{\n\t\tmax = 0; record = 0;\n\t\tfor ( j = 0; j < 5; j ++ ) //???????????????\n\t\t{\n\t\t\tif ( a[i][j] > max ) //???????????????\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\tmaxc = j; //????????????\n\t\t\t}\n\t\t}\n\t\tfor ( p = 0; p < 5; p ++ ) //??????????max??????????\n\t\t{\n\t\t\tif ( p == i ) //??max????\n\t\t\t\tcontinue;\n\t\t\tif ( a[p][maxc] < a[i][maxc] ) //??maxc????????????????\n\t\t\t{\n\t\t\t\trecord = 1; //?????\n\t\t\t\tbreak; //????\n\t\t\t}\n\t\t}\n\t\tif ( record == 0 ) //??record?????????????????\n\t\t{\n\t\t\tcout << i + 1 << \" \" << maxc + 1 << \" \" << max;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ( record == 1 ) //???????????record???1?????????????\n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36479", "code": "/*\n * ????.cpp\n *\n * Created on: 2011-1-4\n * Author: wangwei\n */\nint main()\n{\n\tint i,j,a[6][6],m[6],t1=0,t2;\n\tfor(i=1;i<=5;i++)\n\t\tfor(j=1;j<=5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=1;i<=5;i++)\n\t\tm[i]=1;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tfor(j=1;j<=4;j++)\n\t\t\tif(a[i][j+1]>a[i][m[i]])\n\t\t\t\tm[i]=j+1;\n\t\tt2=0;\n\t\tfor(j=1;j<=5;j++)\n\t\t\tif(a[j][m[i]]> a[i][j]; \n\t\n\tfor(i = 0; i <= 4; i++) //????????????\n\t{\n\t\trmax[i] = a[i][0];\n\t\trmaxno[i] = 0;\n\t\tfor(j = 0; j <= 4; j++)\n\t\t{\n\t\t\tif (rmax[i] < a[i][j])\n\t\t\t{\n\t\t\t\trmax[i] = a[i][j];\n\t\t\t\trmaxno[i] = j;\n\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(j = 0; j <= 4; j++)\n\t{\n\t\tcmin[j] = a[0][j];\n\t\tcminno[j] = 0;\n\t\tfor(i = 0; i <= 4; i++)\n\t\t{\n\t\t\tif(cmin[j] >= a[i][j])\n\t\t\t{\n\t\t\t\tcmin[j] = a[i][j];\n\t\t\t\tcminno[j] = i;\n\t\t\t}\n\t\t}\n\t}\n\t\n\n\tfor(i = 0; i <= 4; i ++)\n\t{\n\t\tif(cminno[rmaxno[i]] == i)\n\t\t{\n\t\t\tf = 1;\n\t\t\tcout << i + 1 << \" \" << rmaxno[i] + 1 << \" \" << rmax[i] << endl;\n\t\t}\n\t}\n\n\tif(f == 0)\n\tcout << \"not found\";\n\t\n\t\n\treturn 0;\n\n\t\t\n}"} +{"label": "73", "index": "36481", "code": "//********************************\n//*??????? **\n//*?????? 1300012887 **\n//*???2013.11.03 **\n//********************************\nint main()\n{\n\tint a[6][6],i, j, k, l = 0, b, max;\n\tfor (i = 0; i <= 4; i++)\n\t\tfor (j = 0; j <= 4; j++)\n\t\t\tcin >> a[i][j]; //????\n for (k = 0; k <= 4; k++) //????????????\n\t{\n\t\tmax = a[k][0];\n\t\tb=0;\n\t\tfor (j = 1; j <= 4; j++)\n\t\t{\n\t\t\tif (a[k][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[k][j];//?????????\n\t\t\t b = j; //?????????\n\t\t\t}\n\t\t}\n\t\tif (max <= a[0][b] && max <= a[1][b] && max <= a[2][b] && max <= a[3][b] && max <= a[4][b])\n\t\t{\n\t\t\tcout << k+1 << \" \" << b+1 << \" \" << max << endl; //????????\n\t\t\tl++; //???????\n\t\t}\n\t}\n\tif (l == 0)\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n\t\t\n\n\t"} +{"label": "73", "index": "36482", "code": "int findmax(int *p)\n{\tint i,t=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(*(p+t)<*(p+i))t=i;\n\t}\n\treturn (t);\t\n}\nint dmin(int a[5][5],int c,int r)\n{\tint i;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tif(a[i][c]>a[i][j];\n for (i=0;i<5;i++)\n {\n x=i;y=0;m=a[i][0];\n for (j=1;j<5;j++)\n {\n if (ma[k][y])\n break;\n }\n if (k==5)\n {\n cout<> a[i][j];\n h = 0;\n flag = 0;\n for (i = 1; i < 6; i++)\n { \n\t max = a[i][1];\n\t for (j = 1; j < 6; j++)\n\t {\t\n\t\t if (a[i][j] >= max) \n\t\t {\n\t\t\t max = a[i][j]; h = j;\n\t\t }\n\t }\n\tif (a[i][h] <= a[5][h] && a[i][h] <= a[1][h] && a[i][h] <= a[2][h] && a[i][h] <= a[3][h] && a[i][h] <= a[4][h]) \n\t\t {\n\t \tflag = 1;\n\t\t\t cout << i << \" \" << h << \" \" << a[i][h] << endl;\n\t\t}\n }\n if (flag == 0) cout << \"not found\";\n return 0;\n}"} +{"label": "73", "index": "36485", "code": "int main(){\n\tint a[5][5];\n\tint b[5];\n\tint c[5];\n\tint b1[5];\n\tint c1[5];\n\tint a1[5],a2[5];\n\tint i=0,j=0,k=0,p=0,m=0,n=0;\n\tint max,min;\n\tint count=0;\n\tfor(i=0;i<5;i++)\n\t\tfor(j=0;j<5;j++)\n\t\t\tcin>>a[i][j];\n\tfor(i=0;i<5;i++){\n\t\tmax=a[i][0];b[k]=i;c[k]=0;\n\t\tfor(j=0;j<5;j++){\n\t\t\tif(a[i][j]>max){\n\t\t\t\tmax=a[i][j];\n\t\t\t\tb[k]=i;c[k]=j;\n\t\t\t}\n\t\t}a1[k]=max;k++;max=0;}\n\tfor(m=0;m<5;m++){\n\t\tmin=a[0][m];b1[p]=0;c1[p]=m;\n\t\tfor(n=0;n<5;n++){\n\t\t\tif(a[n][m]>m[i][j];\n }\n }\n int rowmax[5];\n for (int i=0; i<5; i++) {\n int max=m[i][0];\n for (int j=1; j<5; j++) {\n if(m[i][j]>max)\n max = m[i][j];\n }\n rowmax[i] = max;\n }\n int colmin[5];\n for (int j=0; j<5; j++) {\n int min=m[0][j];\n for (int i=1; i<5; i++) {\n if(m[i][j]>a[i][j];\n\t}\n\tfor(i=1;i<=5;i++)//????????????????\n\t\tmin[i]=a[1][i];\n\tfor(i=1;i<=5;i++)//????????????????????????\n\t{\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tif(a[i][j]>max[i])\n\t\t\t{\n\t\t\t\tmax[i]=a[i][j];\n\t\t\t\th[i]=j;\n\t\t\t}\n\t\t\tif(a[j][i]> a[i][j];\n\t\tfor( i = 0; i < 5; i++ )\n\t\t{\n\t\t\tm = 0;\n\t\t\tfor( j = 0; j < 5;j++ )\n\t\t\t{\n\t\t\t\tif( a[i][j] > m )\n\t\t\t\t{\n\t\t\t\t\tm = a[i][j];\n\t\t\t\t\tp = j; // ???????\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tfor( k = 0;k < 5;k++)\n\t\t\t\t\tif( a[k][p] < a[i][p] )\n\t\t\t\t\t\tbreak; // ???????????\n\t\t\t\t\tif( k == 5 ) \n\t\t\t\t\t{\n\t\t\t\t\t\tcout << i+1 << \" \" << p+1 << \" \" << a[i][p] << endl; // k=5???\n\t\t\t\t\t\tq = 1; // ??????1\n\t\t\t\t\t}\n\t\t}\n\t\tif(q == 0)\n\t\t\tcout << \"not found\" << endl; // ???????not found\n\treturn 0;\n}"} +{"label": "73", "index": "36489", "code": "\nint main()\n{ \n\tint * p[5],* q[5];\n\tint a[5][5],* point;\n\tpoint = * a;\n \n\tint i,j;\n\tfor(i=0;i<25;i++)\n\t{\n\t\t\tcin >> *point;\n\t\t\tpoint++;\n\t}\n\n\tfor( i=0;i<5;i++)\n\t{\n\t\t* (p+i) = * ( a+i );\n\t\tfor( j=0,point=*(a+i) ;j<5; point++,j++ )\n\t\t{\n\t\t\tif( *point > **( p+i) )\n\t\t\t\t* (p+i) = point;\n\t\t}\n\t}\n\n\tint flag =0;\n\tfor( i=0;i<5;i++ )\n\t{ \n\t\tint t=0;\n\t\t* (q+i) = (*a) +i;\n\t\tfor( j=0,point=*(q+i); j<5 ;j++,point+=5)\n\t\t{\n\t\t\tif( *point < **(q + i) )\n\t\t\t{\n\t\t\t\t* (q+i ) = point;\n\t\t\t\tt=j;\n\t\t\t}\n\t\t}\n\t\tif( *(q+i) == * (p+t) )\n\t\t{\n\t\t\t\tcout << t+1 << ' '<< i+1 << ' ' << **(q+i) << endl;\n\t\t\t\tflag=1;\n\t\t}\n\t}\n\n\tif( flag ==0 )\n\t\tcout << \"not found\" << endl;\n\treturn 0;\n}\n"} +{"label": "73", "index": "36490", "code": "//*******************************************************\n//*10.26?? ???? *\n//*????? ?? 1100012844 *\n//*???2011?10?26? *\n//*******************************************************\nint main()\n{\n\t// ??????,????a[1][1]?a[5][5]\n\tint a[6][6], i, j, row, colum, k, max, flag = 1, m, n;\n\n\t// ????\n\tfor (i = 1; i <= 5; i++)\n\t\tfor (j = 1; j <= 5; j++)\n\t\t\tcin >> a[i][j];\n\n\t// ????????i?????max,????row???colum ???max???\n\t// colum??????,?????\n\tfor (i = 1; i <= 5; i++)\n\t{\n\t\tmax = a[i][1]; // ????i???1?????\n\t\tn = 1; \n\t\tfor (j = 1; j <= 5; j++)\n\t\t{\n\n\t\t\t// ??i????max???????max\n\t\t\tif (a[i][j] > max)\n\t\t\t{\n\t\t\t\tmax = a[i][j];\n\t\t\t\trow = i;\n\t\t\t\tcolum = j;\n\t\t\t\tn = 0; // n=0??max????\n\t\t\t}\n\t\t}\n\n\t\t// ??max?????row=i,colum=1\n\t\tif (n)\n\t\t{\n\t\t\trow = i;\n\t\t\tcolum = 1;\n\t\t}\n\n\t\t// ???max?colum??????\n\t\tm = 1;\n\t\tfor\t(k = 1; k <= 5; k++)\n\t\t{\n\t\t\tif (max > a[k][colum])\n\t\t\t\tm = 0; // ??max???????m??0\n\t\t}\n\n\t\t// m=1?(max?colum????)???\n\t\tif (m)\n\t\t{\n\t\t\tcout << row << \" \" << colum << \" \" << max;\n\t\t\tflag = 0;\n\t\t}\n\t}\n\n\t// ?????????flag??0,?????flag??1\n\tif (flag)\n\t\tcout << \"not found\";\n\treturn 0;\n}"} +{"label": "73", "index": "36491", "code": "int main()\n{\n\tint i,j,k;\n\tint a[5][5];\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tk=0;\n for(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tif(a[i][j]>=a[i][(j+1)%5]&&a[i][j]>=a[i][(j+2)%5]&&a[i][j]>=a[i][(j+3)%5]&&a[i][j]>=a[i][(j+4)%5]&&a[i][j]<=a[(i+1)%5][j]&&a[i][j]<=a[(i+2)%5][j]&&a[i][j]<=a[(i+3)%5][j]&&a[i][j]<=a[(i+4)%5][j])\n\t\t\t{\n\t\t\t\tprintf(\"%d %d %d\\n\",i+1,j+1,a[i][j]);\n\t\t\t\tk=k+1;\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0)\n\t{\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36492", "code": "\nint main() {\n\tint map[6][6];\n\tint i,j,k;\n\tint g = 0;\n\tfor(i=0; i<5; i++) {\n\t\tfor(j=0; j<5; j++) {\n\t\t\tscanf(\"%d\", &map[i][j]);\n\t\t}\n\t}\n\tfor(i=0; i<5; i++) {\n\t\tk = 0;\n\t\tfor(j=1; j<5; j++) {\n\t\t\tif(map[i][j] > map[i][k]) {\n\t\t\t\tk = j;\n\t\t\t}\n\t\t}\n\t\tfor(j=0; j<5; j++) {\n\t\t\tif(j!=i && map[j][k]= 5) {\n\t\t\tprintf(\"%d %d %d\\n\", i+1, k+1, map[i][k]);\n\t\t\tg = 1;\n\t\t}\n\t}\n\tif(g == 0) {\n\t\tprintf(\"not found\\n\");\n\t}\n\treturn 0;\n}"} +{"label": "73", "index": "36493", "code": "int main()\n{\n int a[5][5],b[5][5];\n int i,j,max,min,flag;\n flag=0;\n for(i=0;i<5;i++)//row\n {\n for(j=0;j<5;j++)//line\n {\n scanf(\"%d\",&a[i][j]);\n b[i][j]=0;\n }\n }\n for(i=0;i<5;i++)\n {\n max=a[i][0];\n for(j=0;j<5;j++)if(maxa[i][j])min=a[i][j];\n for(i=0;i<5;i++)if(a[i][j]==min)b[i][j]=b[i][j]+1;\n }\n for(i=0;i<5;i++)//row\n {\n for(j=0;j<5;j++)//line\n {\n //printf(\"%d \",b[i][j]);\n if(b[i][j]==2)\n {\n printf(\"%d %d %d\",i+1,j+1,a[i][j]);flag=1;\n }\n }\n printf(\"\\n\");\n }\n if(!flag)printf(\"not found\");\n return 0;\n}"} +{"label": "73", "index": "36494", "code": "int main()\n{\n\tint a[5][5],i,j,flag[5],max,maxj;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tcin>>*(*(a+i)+j); \n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tmax=*(*(a+i)+0);\n\t\tmaxj=0;\n\t\tfor(j=1;j<5;j++)\n\t\t{\n\t\t\tif(*(*(a+i)+j)>max)\n\t\t\t{\n\t\t\t\tmax=*(*(a+i)+j);\n\t\t\t\tmaxj=j;\n\t\t\t}\n\t\t}\n\t\tif(*(*(a+0)+maxj)>=max&&*(*(a+1)+maxj)>=max&&*(*(a+2)+maxj)>=max&&*(*(a+3)+maxj)>=max&&*(*(a+4)+maxj)>=max)\n\t\t{\n\t\t\tcout<a[k][j])\nt--;}\nif(t==0)\n{printf(\"%d %d %d\",i+1,j+1,a[i][j]);\nl--;}\n}}\nif(l==0)\nprintf(\"not found\");\n}\n\n"} +{"label": "73", "index": "36496", "code": "// andian\nvoid main()\n{\n int a[5][5];\n int j=0,i=0,k=0;\n while(j<5)\n {\n while(i<5)\n {\n scanf(\"%d\",&a[j][i]);\n i++;\n }\n i=0;\n j++;\n }\n for (j=i=0; j<5; j++)\n {\n for(i=0;i<5;i++)\n {\n if(a[j][i]>=a[j][0]&&a[j][i]>=a[j][1]&&a[j][i]>=a[j][2]&&a[j][i]>=a[j][3]&&a[j][i]>=a[j][4])\n {\n if(a[j][i]<=a[0][i]&&a[j][i]<=a[1][i]&&a[j][i]<=a[3][i]&&a[j][i]<=a[4][i]&&a[j][i]<=a[2][i])\n {printf(\"%d %d %d\",j+1,i+1,a[j][i]); k++;}\n }\n }\n }\n if(k==0)printf(\"not found\");\n}"} +{"label": "73", "index": "36497", "code": "int main()\n{\n\tint i,j,k,a[5][5],b=0,c=0,d=0;\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t}\n\tfor(i=0;i<5;i++)\n\t{\n\t\tfor(j=0;j<5;j++)\n\t\t{\n\t\t\tb=0;\n\t\t\tc=0;\n\t\t\tfor(k=0;k<5;k++)\n\t\t\t{\n\t\t\t\tif(a[i][j]>a[i][k])\n\t\t\t\t\tb++;\n\t\t\t\tif(a[i][j]max)\n\t\t\t{\n\t\t\t\tmax=a[i][j];\n\t\t\t\tloc=j;\n\t\t\t}\n\t\tline[i]=loc;\n\t\tfor (j=0;j<5;j++)\n\t\t\tif (a[j][i]t)\n\t\t\t{\n\t\t\t\tt=sz[m][n];\n\t\t\t\ta=m;\n\t\t\t\tb=n;\n\t\t\t}\n\t\t}\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tif(sz[i][b]>=sz[a][b])\n\t\t\t{\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t\tif(p==5)\n\t\t{\n\t\t\tprintf(\"%d %d %d\",a+1,b+1,sz[a][b]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tq++;\n\t\t}\n\t}\n\tif(q==5){\n\t\tprintf(\"not found\");\n\t}\n\treturn 0;\n}"} +{"label": "74", "index": "36500", "code": "int sushu(long n)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(n);i++)\n\t{\n\t\tif(n%i==0)\n\t\t{\n\t\t\treturn(0);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i>sqrt(n))\n\t\treturn(1);\n}\nint huiwen(long n)\n{\n\tlong s=0,k;\n\tk=n;\n\twhile(n>0)\n\t{\n\t\ts=s*10+n%10;\n\t\tn=n/10;\n\t}\n\tif(k==s)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\nvoid main()\n{\n\tlong m,n,i,j,k,s=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)&&huiwen(i))\n\t\t\ts=s+1;\n\t}\n\tif(s==0)\n\t\tprintf(\"no\\n\");\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)&&huiwen(i))\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tk=i;\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(j=k+1;j<=n;j++)\n\t{\n\t\tif(sushu(j)&&huiwen(j))\n\t\t{\n\t\t\tprintf(\",%d\",j);\n\t\t\n\t\t}\n\t}\n\tprintf(\"\\n\");\n\n\t\n}"} +{"label": "74", "index": "36501", "code": "int su(int x)\n{\n\tint i,b=1;\n\tfor (i=2;i<=sqrt(x);i++)\n\t\tif (x%i==0) {b=0;break;}\n\treturn(b);\n}\nint hw(int x)\n{\n\tint n,s=0;\n\tn=x;\n\twhile (n>0)\n\t{\n\t\ts=s*10+n%10;\n\t\tn=n/10;\n\t}\n\tif (s==x) return(1);\n\telse return(0);\n}\nvoid main()\n{\n\tint m,n,i,b=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t\tif (su(i))\n\t\t\tif (hw(i))\n\t\t\t\tif (b==0) {printf(\"%d\",i);b=1;}\n\t\t\t\telse printf(\",%d\",i);\n\tif (b==0) printf(\"no\");\n}"} +{"label": "74", "index": "36502", "code": "void main()\n{\n int huiwen(int x);\n int sushu(int x);\n int m,n,x,p,q,i,j,c[1000];\n scanf(\"%d %d\",&m,&n);\n i=0;\n for (x=m;x<=n;x++)\n {\n p=huiwen(x);\n q=sushu(x);\n if (p==1&&q==1)\n {\n c[i]=x;\n i++;\n }\n }\n if (i==0)\n printf(\"no\\n\");\n else\n {\n for (j=0;j=10)\n\t{k=k/10;\n\tj++;\n\t}\n\tfor(s=0;s0)\n\t\t\t{\n\t\t\t\tj=j*10+t%10;\n\t\t\t\tt/=10;\n\t\t\t}\n\t\t\tif(j==i)\n\t\t\t{\n\t\t\t\ts=1;\n\t\t\t\tb[l]=i;\n\t\t\t\tl++;\n\t\t\t\tp=l;\n\t\t\t}\n\t\t}\n\t}\n\tif(s==1)\n\t{\n\t\tfor(l=0;l=0;a=(a*10)) \n\t{\n\t\tb[i]=x%a;\n\t\tx=(x-b[i]);\n\t\tb[i]=b[i]*10/a;\n\t\ti++;\n\t}\n\ti--;\n\tif (i%2) n=(i-1)/2;\n\telse n=i/2;\n\tfor (j=0;j<=n;j++)\n\t\tif (b[i-j]!=b[j]) break;\n\tif (j==(n+1)) return (1);\n\telse return (0);\n}\nvoid main()\n{\n\tint m,n,i=0,j,p,a[300];\n\tscanf(\"%d %d\",&m,&n);\n\tif (m%2==0) m++;\n\tif (n%2==0) n--;\n\tfor (p=m;p<=n;p=p+2)\n\t\tif (jay(p))\n\t\t\tif (dudu(p))\n\t\t\t{a[i]=p;i++;}\n\tif (i==0) printf(\"no\");\n\telse for(j=0;j=1)\n\t{\n\t\tprintf(\"%d\",a[0]);\n\t\tfor(i=1;i=0;j--)\n {\n q[j]=x%10;\n x=(x-q[j])/10;\n if(x==0)\n break; \n }\n for(j=0;j<=i;j++)\n {\n if(p[j]!=q[j])\n return 0;\n }\n return 1; \n}\nmain()\n{\n int m,n,count=0,i;\n scanf(\"%d %d\",&m,&n); \n for(i=m;i<=n;i++) \n {\n if(sushu(i)==0)\n continue;\n else\n {\n if(i/10==0&&count==0) \n {\n printf(\"%d\",i);\n count++;\n }\n else if(i/10==0&&count!=0)\n {\n printf(\",%d\",i);\n count++;\n }\n else if(i>=10&&huiwen(i)==1&&count==0)\n {\n printf(\"%d\",i);\n count++; \n } \n else if(i>=10&&huiwen(i)==1&&count!=0)\n {\n printf(\",%d\",i);\n count++; \n } \n }\n \n }\n if(count==0)\n printf(\"no\");\n}"} +{"label": "74", "index": "36511", "code": "int main()\n{\n\tint i,m,n,j,k,a,b,p=0,s;\n\tint t[1000];\n scanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tk=(int)sqrt(i);\n\t\t\n\t\tfor(j=2;j<=k;j++)\n\t\t{\n\t\t\tif(i%j==0)\n\t\t\tbreak;\n\t\t}\n\t\t \n\t\tif(j>k)\n\t\t{\n\t\t\t a=0;\n b=i;\n while(b!=0)\n\t\t\t{\n\t\t\t\t a=a*10+b%10;\n\t\t\t\t b=b/10;\n\t\t\t }\n if(a==i)\n\t\t\t {\n\t\t\t\t t[p]=i;\n p++;\n\t\t\t }\n\t\t}\n\t } \n\tif(p==0)\n\t{\n\t printf(\"no\");\n\t}\n\telse\n\t{\n\t\tfor(s=0;s0;i--)\n {\n sum=sum*10+temp%10;\n temp=temp/10;\n }\n if(sum==x)return(1);\n else return(0);\n}\n"} +{"label": "74", "index": "36515", "code": "void main()\n{\n int m,n,p,a,b,j;\n j=0;\n scanf(\"%d %d\",&m,&n);\n int i,t,t0;\n double k;\n for(t=m;t<=n;t++)\n {\n k=sqrt(t);\n for(i=2;i<=k;i++)\n if(t%i==0)\n\t\tbreak;\n if(i>k)\n {\n\t\t t0=t;\n for(p=0;t>0;)\n\t\t {\n\t\t a=t/10;\n\t\t b=t-10*a;\n\t\t t=a;\n\t\t p=10*p+b;\n\t\t }\n\t\t if(p==t0)\n\t\t {\t \n\t\t j=j+1;\n\t\t\t if (j==1)\n\t\t\t printf(\"%d\",t0);\n\t\t\t else if(j>=2) \n printf(\",%d\",t0);\n\t\t }\n\t\t t=t0;\n\t }\n \n }\n\n if(j==0) printf(\"no\");\n}\n"} +{"label": "74", "index": "36516", "code": "void main()\n{\n\tint flag,e,m,n,i,j,a[100],s,k,count=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(k=m;k<=n;k++)\n\t{\n\t\ti=k;\n\t\tflag=0;\n\t\te=i;\n\t\tfor(j=0;i!=0;i=i/10)\n\t\t{\n\t\t\tj=10*j;\n\t\t\tj+=i%10;\n\t\t}\n\t\tif(e==j)\n\t\t{\n\t\t\tfor(s=2;s<=e/2;s++)\n\t\t\t{\n\t\t\t\tif(e%s==0)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag==0)\n\t\t\t{\n\t\t\t\ta[count]=k;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\t\tif(count==0)\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t}\n\t\tif(count!=0)\n\t\t{\n\t\t\tprintf(\"%d\",a[0]);\n\t\t\tfor(i=1;i0)\n\t{\n\t\ts=s*10+(k%10);\n\t\tk/=10;\n\t}\n\tif(s==t){\n\t\treturn 1;\n\t}\n\telse{\n\t\treturn 0;\n\t}\n}\nint main()\n{\n\tint m,n,k;\n\tint first=1,flag=1;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(k=m;k<=n;k++)\n\t{\n\t\tif(A(k)&&B(k)){\n\t\t\tif(first){\n\t\t\t printf(\"%d\",k);\n\t\t\t first=0;\n\t\t\t}\n\t\t else{\n\t\t\t\tprintf(\",%d\",k);\n\t\t\t}\n\t\t\tflag=0;\n\t\t}\n\t}\n\tif(flag)\n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\t\n}\n"} +{"label": "74", "index": "36519", "code": "int huiwen(int a)\n{\n\tint b=0;\n\tint i=0;\n\tint l=1;\n\tint c=1;\n\tfor(l=0;l<12;l++)\n\t{\n\t\tif((a/c)==0)\n\t\tbreak;\t\t\n\t\tc=c*10;\n\t}\n\tc=a;\n\tfor(i=1;i<=l;i++)\n\t{\n\t\tb=b*10;\n\t\tb=b+(c%(10));\n\t\tc=(c/10);\t\t\n\t}\n\tif(a==b)\n\treturn 1;\n\telse\n\treturn 0;\t\n}\nint ss(int a)\n{\n\tint i=2;\n for(i=2;i<=(a/2);i++)\n {\n if((a%i)==0)\n return 0;\n }\n return 1; \n}\nint main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint i=0,k=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(i!=1)\n\t\tif(huiwen(i))\n\t\t{\n\t\t\tif(ss(i))\n\t\t\t{\n\t\t\t\tk=k+1;\t\t\t\n\t\t\t\tif(k!=1)\n\t\t\t\tprintf(\",%d\",i);\n\t\t\t\telse\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t}\n\t\t}\t\n\t}\n\tif(k==0)\n\tprintf(\"no\");\n\treturn 0;\n}\n"} +{"label": "74", "index": "36520", "code": "int sortprime(int n)\n{\n if(n==2||n==3)return 1;\n else for(int i=2;i*i=0;j--)\n {\n a[j]=i/shi;\n i=i-a[j]*shi;\n shi=shi/10;\n }\n for(j=0;2*j0)\n\t{\n\t\tstr[j]=x%10+'0';\n\t\tx=x/10;\n\t\tj++;\n\t}\n\tfor(i=0;ik) return 1;\n}\nint hw(int b)\n{ int a[20]={0},j=0,l;\n while(b!=0)\n\t { \n\t a[j]=b%10;\n\t\t b=(b-a[j])/10;\n\t\t j++;\n\t }\n\t for(l=0;l<=(j-1);l++)\n\t\t if(a[l]!=a[j-1-l]) { return 0;\n\t\t break;}\n\t\treturn 1;\n}\nvoid main()\n{\n\tint s,m,n,flag=1;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(s=m;s<=n;s++)\n\t\tif(prime(s)&&hw(s)) \n\t\t{if(flag==0){printf(\",\");}\n\t\tprintf(\"%d\",s);\n\t\tflag=0;}\n\tif(flag==1) printf(\"no\\n\");\n}\n"} +{"label": "74", "index": "36530", "code": "int hw(int n)\n{\n\tint m=0,i;\n\tif(n/10==0)return 1;\n\telse \n\t{\n\t\ti=n;\n\t\tdo\n\t\t{\n\t\t\tm=m*10+n%10;\n\t\t\tn=n/10;\n\t\t}while(n!=0);\n\t\tif(m==i)return 1;\n\t\telse return 0;\n\t}\n}\nint ss(int n)\n{\n\tint i;\n\tfor(i=2;i<=n;i++)if(n%i==0)break;\n\tif(i==n)return 1;\n\telse return 0;\n}\nvoid main()\n{\n\tint m,n,i,j=0,a[100]={0};\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)if(hw(i)&&ss(i))a[j++]=i;\n\tif(j==0)printf(\"no\");\n\telse{for(i=0;i0)\n {\n\t printf(\"%d\",a[0]);\n\t for(j=1;j=0;g--)\n {\n c[g]=b%10;\n\t b=b/10;\n }\n int fla=1;\n for(g=0;g=2)return(0);\n\telse if((c/10)==0||(((c/10)-(c%10))==0&&s==2))\n\t\treturn(1);\n\telse{for(a=1;a0)\n\t\t{\n\t\t\td=b%10;\n\t\t\tc=c*10+d;\n\t\t\tb=b/10;\n\t\t}\n\t\tif(c==i){\n\t\t\tfor(j=2;jk) return(1);\n\telse return(0);\n}\nint G(int i)\n{\n\tint f,g=0;\n\tf=i;\n\twhile(gsqrt(a))\n\t\t{\n\t\t\tflag=1;\t\t\n\t\t\n\t\t}\n\t\n\tif(flag)\n\t{\n\t\ti=0;\n\t\tx=a%10;\n\t\ty=a/10;\n\t\ttemp[99]=x+'0';\n\t\t\n\t\twhile(y>=10)\n\t\t{\n\t\t\t\t\n\t\t\tx=y%10;\n\t\t y=y/10;\n\t\t\ttemp[98-i]=x+'0';\n\t\t\ti++;\n\t\t}\n\t\ttemp[98-i]=y+'0';\n\t\tp=temp;\n\t\tq=temp+99;\n\t\tfor(;p0;i=i/10)\n\t\tif(x/i!=0)\n\t\t\tbreak;\n\n\tfor(j=1;j<=i;j=j*10)\n\t{\n\t\ta[k]=x-x/10*10;\n\t\tx=x/10;\n\t\tk=k+1;\n\t}\n\tfor(j=0;j=k+1)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint f2(int i)\n{\n\tint n,j,m,a,b,e;\n\tfor(n=0;;n++)\n\t\tif(i=m)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}"} +{"label": "74", "index": "36542", "code": "int tran(long int x)\n{\n\tint t=0,y=x;\n\twhile(y>0)\n\t{\n\t\tt=10*t+y%10;\n\t\ty/=10;\n\t\ttran(y);\n\t}\n\tif (x==t)\n\t\treturn(1);\n\treturn(0);\n}\nint cc(long int x)\n{\n\tlong int i;\n\tfor (i=2;i0)\n\t{\n\t\ta[c++]=n%10;\n\t\tn=n/10;\n\t}\n\tfor(i=0;i0)\n\t\t {\n\t\t b=k%10;\n\t\t \n\t\t k=k/10;\n\t\t c=c*10+b;\n\t\t }\n\t\t if(c==i)\n\t\t {\n\t\t\t z=z+1;\n\t\t w[z]=c;\n\t\t\t s=s+1;\n\n\t\t }\n\t\t else continue;\n\t }\n }\n if(z==0)\n\t printf(\"no\");\n else\n {\n for(z=1;z0)break;\n\t}\n\t//printf(\"%d,\",j);\n\treturn(j);\n}\nint rev(int i,int x)\n{\n\tint j,num[100]={0},n=0;\n\tfor(j=1;j<=x;j++)\n\t{\n\t\tnum[j]=i%10;\n\t\ti=i/10;\n\t}\n\tfor(j=1;j<=x;j++)\n\t\t//printf(\"%d,\",num[j]);\n\tfor(j=1;j<=x;j++)\n\t\tif(num[j]==num[x+1-j])n++;\n\tif(n==x)\n\t{\n\t\t//printf(\"1,\");\n\t\treturn(1);\n\t}\n\telse \n\t{\n\t\t//printf(\"0,\");\n\t\treturn(0);\n\t}\n}\nint s(int i)\n{\n\tint j,n=0;\n\tfor(j=2;j0);\n\tn=m;\n\tfor(j=0;j0)\n\t{\tk=a%10;\n\t\ta=a/10;\n\t\tt=t*10+k;\n\t}\n\tif(s==t) return(1);\n\telse return(0);\n}\nint sushu(int b)\n{\tint i;\n\tfor(i=2;i<=b;i++)\n\t\tif(b%i==0) break;\n\tif(b==i) return(1);\n\telse return(0);\n}"} +{"label": "74", "index": "36551", "code": "void main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint i,j,k;\n\tint a,b,c;\n\tc=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tk=sqrt(i);\n\t\tfor(j=2;j<=k;j++)\n\t\t{\n\t\t\tif(i%j!=0)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tif(j>k)\n\t\t{\n\t\t\ta=i;\n\t\t\tb=0;\n\n\t\t\twhile(a>0)\n\t\t\t{\n\t\t\t\tb=b*10+a%10;\n\t\t\t\ta=a/10;\n\t\t\t}\n\t\t\tif(i==b)\n\t\t\t{\n\t\t\t\tif(c>=1)\n\t\t\t\t\tprintf(\",\");\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t}\n\tif(c==0)\n\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36552", "code": "int judge(int n)\n{\n\tint m=1,a,i;\n\tfor(i=1;i<=n;i=i*10) m=i;\n\tif(n<10) a=n;\n\telse a=n%10*m+judge(n/10);\n\treturn a;\n}\nint su(int n)\n{\n\tint i,m=0;\n\tfor(i=2;i<=n/2;i++)\n\t{\n\t\tif(n%i==0) m++;\n\t}\n\tif(m>0) return 0;\n\telse return 1;\n}\nint main()\n{\n\tint m,n,i,j,t;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tt=0;\n\t\tif(i%2==1&&judge(i)==i&&su(i))\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t for(j=i+1;j<=n;j++)\n\t\t\t{\n\t\t\t if(j%2==1&&judge(j)==j&&su(j)) t++;\n\t\t\t}\n\t\t if(t>0) printf(\",\");\n\t\t}\n\t}\n\tt=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(i%2==1&&judge(i)==i&&su(i)) t++;\n\t}\n\tif(t==0) printf(\"no\");\n}"} +{"label": "74", "index": "36553", "code": "int f(long x)\n{\n\tlong i;\n\tfor(i=2;i*i<=x;i++)\n\t{\n\t\tif(x%i==0)return 1;\n\t}\n\treturn 0;\n}\nint g(long x)\n{\n\tchar c[200]={0},i=0,j;\n\twhile(x>0)\n\t{\n\t\tc[i]=x%10;\n\t\ti++;\n\t\tx=x/10;\n\t}\n\tfor(j=0;j0;k++)\n a=a/10;\n return k;}\n\n\nvoid main(){\n\n \n int m,n,i,j,k=0,b,c,v=0;\n\n\n scanf(\"%d %d\",&m,&n);\n\n\n for(i=m;i<=n;i++){\n\n b=pp(i);\n if(b){j=qq(i);\n c=ppp(i,j);}\n\n\n \n if(b*c){printf(\"%d\",i);k=1;v=i;break;}}\n\nif(v==0) v=m;\n\nfor(i=v+1;i<=n;i++){\n \n b=pp(i);\n if(b){j=qq(i);\n c=ppp(i,j);}\n\n\n \n if(b*c){printf(\",%d\",i);k=1;}}\n \n\n if(k==0)printf(\"no\");\n\n\n }\n\n\n"} +{"label": "74", "index": "36555", "code": "void main()\n{\n\tint a,b,i,j;\n\tint m,n,temp;\n\tint x,flag,y=0;\n\tscanf(\"%d %d\",&m,&n);\n\tflag=0;\n\tfor(i=m;i<=n;i++) /*??????a??????????,???????b?!!*/\n\t{\n\t\ta=i;\n\t\tb=0;\n\t for(j=1;a!=0;j++)\n\t\t{\n\t\t\ttemp=b;\t\n\t b=a%10;\n\t\t b=10*temp+b;\n\t\t\ta=a/10;\n\t\t}\n\t\tif(b==i)\n\t\t{\n\t\t\tfor(x=2;x<=b;x++)\n\t\t\t{\n\t\t\t\tif(b%x==0)break;\n\t\t\t}\n\t\t\tif(x==i)\n\t\t\t{\n\t\t\t if(y>0)\n\t\t\t printf(\",\");\t\n\t\t\t printf(\"%d\",b);\n\t\t\t flag=1;\n\t\t\t\ty++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tif(flag==0)\n\t\tprintf(\"no\\n\");\n}"} +{"label": "74", "index": "36556", "code": "int sushu(int i)\n{\n\tint k,flag1=0;\n for(k=2;k<=i;k++)\n\t{\n\t\tif(i%k==0) break;\n\t\telse\n\t\t{\n\t\t\tif(k=i-1) flag1=1;\n\t\t}\n\t}\n\treturn(flag1);\n}\nmain()\n{\n\tint m,n,i,l,p,o,a[10000],h=0,k;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tl=sushu(i);\n\t\tif(l==1)\n\t\t{\n\t\t\to=0;\n\t\t\tp=i;\n\t\t\twhile(p>0)\n\t\t\t{\n\t\t\t\to=o*10+p%10;\n\t\t\t\tp/=10;\n\t\t\t}\n\t\t\tif(i==o)\n\t\t\t{\n\t\t\t\ta[h]=i;\n\t\t\t\th++;\n\t\t\t}\n\t\t}\n\t}\n\tif(h==0) printf(\"no\");\n\telse if(h==1) printf(\"%d\",a[0]);\n\telse\n\t{\n\t\tfor(k=0;k1)\n\t{\n\t\tprintf(\"%d\",c[0]);\n\t\tfor(i=1;i1)\n {\n for(j=0;j<(k-1);j++)\n {\n for(i=0;i<(k-1-j);i++)\n {\n if(a[i]>a[i+1])\n {\n tt=a[i];\n a[i]=a[i+1];\n a[i+1]=tt;\n }\n }\n }\n for(i=0;ilimit) return 1;\n\telse if(n%num==0) return 0;\n\telse return isPrime(n,limit,num+1);\n}\n\nint main()\n{\n\tint n,m,i,j=0;\n\tint limit,a[300];\n\tchar str[300];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tlimit=sqrt(i);\n\t\tif(isPrime(i,limit,2)&&isReverse(i))\n\t\t a[j++]=i;\n\t}\n\tfor(i=0;ik)\n\t\t{ \n\t\t\ta[q]=i; /*a[q]??????????*/\n\t\t\tq=q+1;\n\t\t}\n\t}\n\n\tfor(i=0;i0)\n\t{\n\t\tm*=10;\n\t\tm+=k%10;\n\t\tk/=10;\n\t}\n\tif(m==n)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint main()\n{\n\tint m,n,i,mark=0;\n\tscanf(\"%d%d\",&m,&n);\n\ti=m;\n\twhile(i<=n)\n\t{\n\t\tif(prime(i)&&huiwen(i))\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tmark=1;\n\t\t\ti++;\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\tif(mark==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t\twhile(i<=n)\n\t\t{\n\t\t\tif(prime(i)&&huiwen(i))\n\t\t\t\tprintf(\",%d\",i);\n\t\t\ti++;\n\t\t}\n\t\treturn 0;\n}"} +{"label": "74", "index": "36568", "code": "int po(int k)\n{\n int t=1,i;\n for(i=1;i<=k;i++)\n {\n t=t*10;\n }\n return t;\n}\nint su(int a)\n{\n int i,t=1;\n for(i=2;i<=sqrt(a);i++)\n {\n if(a%i==0)\n {\n t=0;\n break;\n }\n }\n return t;\n} \nint hui(int a)\n{\n int b[100]={0},i,l,t=1,k;\n for(i=1;i<100;i++)\n {\n t=t*10;\n if(a0)\n\t{l++;a[l]=n%10;n=n/10;}\n\tfor (i=1;i<=l/2;i++)\n\t\tif (a[i]!=a[l+1-i])\n\t\t{flag=0;break;}\n return(flag);\n}\nvoid main()\n{\n\tint flag=0,i,m,n;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t\tif (check1(i) && check2(i))\n\t\t{\n\t\t\tif (flag==0)\n\t\t\t{flag=1;printf(\"%d\",i);}\n\t\t\telse\n\t\t\t printf(\",%d\",i);\n\t\t}\n\tif (flag==0) printf(\"no\\n\"); else printf(\"\\n\");\n}"} +{"label": "74", "index": "36570", "code": "\nint main()\n{\n\tint m, n;\n\tint a[100000];\n\tint temp, i, k, l, p, q, c, w=0;\n\tscanf(\"%d%d\", &m, &n);\n\tk=n-m;\n\n\tfor(i=0;i>=0&&i<=k;i++)\n\t{\n\t\ta[i]=m+i;\n//\t\tprintf(\"%d \", a[i]);\n\t}\n\n\tfor(i=0;i>=0&&i<=k;i++)\n\t{\n\t\ttemp=a[i];\n\t\tq=0;//q??????????????//\n\t\twhile(temp>0)\n\t\t{\n\t\t\tp=temp%10;\n\t\t\tq=q*10+p;\n\t\t\ttemp=temp/10;\n\t\t}\n \tif(q==a[i])\n\t\t{\t\t\n\t\t\tfor(c=2;c=a[i])\n\t\t\t{\n\t\t\t\tw++;\n\t\t\t\tif(w==1)\n\t\t\t\t\tprintf(\"%d\", a[i]);\n\t\t\t\telse\n\t\t\t\t\tprintf(\",%d\", a[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\tif(w==0)\n\t\tprintf(\"no\");\n\tprintf(\"\\n\");\n\treturn 0;\n}\n"} +{"label": "74", "index": "36571", "code": "void main()\n{\n\tlong int m,n;\n\tlong int oho(int x);\n\tscanf(\"%d%d\",&m,&n);\n\tlong int i,j,k=0,save[2000],l,x,y=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(i==1)\n\t\t{\n\t\t\ty++;\n\t\t\tcontinue;\n\t\t}\n\t\telse if(i==2)\n\t\t{\n\t\t\tsave[k]=i;\n\t\t\tk++;\n\t\t\ty++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(j=2;j=1)\n\t{\n\t\tr=x%10;\n\t\tx=x/10;\n c=c*10+r;\n\t}\n\treturn(c);\n}"} +{"label": "74", "index": "36572", "code": "int sushu(int x)\n{\n\tint ii,t=1;\n\tfor(ii=2;ii<=(int)sqrt(x);ii++)\n\t{\n\t\tif(x%ii==0)\n\t\t\tt=0;\n\t}\n\tif(t==1)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nint huiwen(int y)\n{\n\tint k,t;\n\tt=y;k=0;\n\twhile(t!=0)\n\t{\n\t\tk=k*10+t%10;\n\t\tt=t/10;\n\t}\n\tif(k==y)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nint main()\n{\n\tint m,n,i,a[100],j=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)==1&&huiwen(i)==1)\n\t\t{\n\t\t\tj++;\n\t\t\ta[j]=i;\n\t\t}\n\t}\n\tif(j==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",a[1]);\n\t\tfor(i=2;i<=j;i++)\n\t\t\tprintf(\",%d\",a[i]);\n\t}\n\treturn 0;\t\n}\n"} +{"label": "74", "index": "36573", "code": "int main()\n{\n int f1(int p);\n int f2(int p);\n int m,n,i,flag=0;\n scanf(\"%d %d\",&m,&n);\n for (i=m;i<=n;i++)\n {\n if (f1(i)==1&&f2(i)==1&&flag==0)\n {\n flag++;\n printf(\"%d\",i);\n }\n else if (f1(i)==1&&f2(i)==1&&flag!=0) printf(\",%d\",i);\n }\n if (flag==0) printf(\"no\");\n\treturn 0;\n}\n\nint f1 (int p)\n{\n int c,i,k,flag=0;\n k=sqrt(p);\n for (i=2;i<=k;i++)\n\t{\n if (p%i==0) flag++;\n\t}\n if (flag==0) c=1;\n else c=0;\n return(c);\n}\n\nint f2 (int p)\n{\n int a,b,c,d,e,k;\n if (p>=10000)\n\t{\n\t\ta=p/10000;\n\t\tb=(p-a*10000)/1000;\n\t\tc=(p-a*10000-b*1000)/100;\n\t\td=(p-a*10000-b*1000-c*100)/10;\n\t\te=p-a*10000-b*1000-c*100-d*10;\n\t\tif (a==e&&b==d) k=1;\n\t\telse k=0;\n\t}\n\telse if (p>=1000&&p<10000)\n\t{\n a=p/1000;\n\t\tb=(p-a*1000)/100;\n\t\tc=(p-a*1000-b*100)/10;\n\t\td=p-a*1000-b*100-c*10;\n\t\tif (a==d&&b==c) k=1;\n\t\telse k=0;\n\t}\n\telse if (p>=100&&p<1000)\n\t{\n a=p/100;\n\t\tb=(p-a*100)/10;\n\t\tc=p-a*100-b*10;\n\t\tif (a==c) k=1;\n\t\telse k=0;\n\t}\n\telse if (p>=10&&p<100)\n\t{\n\t\ta=p/10;\n\t b=p-a*10;\n\t\tif (a==b) k=1;\n\t\telse k=0;\n\t}\n\telse k=1;\n\treturn (k);\n}\n\n\n"} +{"label": "74", "index": "36574", "code": "int main()\n{\n int m,n,i,j,temp,count=0,num,sig,t;\n scanf(\"%d%d\",&m,&n);\n for(t=m;t<=n;t++)\n {\n i=t;\n if(i/10==0) num=1;\n else if(i/100==0) num=2;\n else if(i/1000==0) num=3;\n else if(i/10000==0) num=4;\n else num=5;\n for(j=1,temp=0;j<=num;j++)\n {\n temp=temp*10+i%10;\n i=i/10;\n }\n if(t==temp)\n {\n sig=0;\n for(j=2;j0)//why not k/pow(10,j)>0//\n\t{\n\t\tj++;\n\t\ttemp=temp/10;\n\t}\n\n\tp=j;\n\n\tq=k;\n\tsum=0;\n\twhile(k/(pow(10,j))0)\n\t{\n\t\ta=temp%10;\n\t\tn=n*10+a;\n\t\ttemp=temp/10;\n\t}\n\tif(n==y) return 1;\n\telse return 0;\n}\n"} +{"label": "74", "index": "36577", "code": "int huiwen(int m, int n)\n{ if(m==0)\n return(n);\n else \n\t\treturn(huiwen(m/10,n*10+m%10));\n}\nvoid main()\n{\n\tint m,n,i,j,p=0,q=1,a[10000],b[10000],c[10000]={0},x=1;\n\tscanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{\n\t\tfor(j=2;j0)\n {\n a=x%10;\n b=b*10+a;\n x=x/10; \n }\n return b;\n \n}\nint main()\n{\n int m,n;\n scanf(\"%d %d\",&m,&n);\n \n int hs[1000];\n int d=0;\n for(int i=m;i<=n;i++)\n {\n if(f1(i)==0&&f2(i)==i) \n \n \n {hs[d]=i;\n d++;}\n \n }\n if(d==0)\n printf(\"no\");\n else\n {\n printf(\"%d\",hs[0]);\n for(int p=1;p0)\n\t{\n\t\ta[i]=y%10;\n\t\ty=(y-a[i])/10;\n\t\ti++;\n\t}\n\tl=i;\n\tfor(i=0;ik) return('T');\n\t\t\telse return('F');\n\t\t}\n\t}\n}\nvoid main()\n{\n\tint m,n,i,a[1000],no;\n\tscanf(\"%d %d\",&m,&n);\n\tno=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)=='T'&&huiwen(i)=='T')\n\t\t{\n\t\t\ta[no]=i;\n\t\t\tno++;\n\t\t}\n\t}\n\tif(no==0) printf(\"no\");\n\telse \n\t{\n\t\tprintf(\"%d\",a[0]);\n\t\tfor(i=1;i0)\n\t\t\t{ I=I*10+t%10;t=t/10;}\n\t\t\tif(I==i)\n\t\t\t{ a[b]=i;b++;}\n\t\t}\n\t}\n\tif(a[0]==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=0;a[i+1]!=0;i++)\n\t\t printf(\"%d,\",a[i]);\n\t\tprintf(\"%d\\n\",a[i]);\n\t}\n}"} +{"label": "74", "index": "36585", "code": "int main()\n{\n int m,n,i,j,k,flag,a[100]={0},start=0,t=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tflag=0;\n\t\tfor(j=2;j<=sqrt(n);j++)\n\t\t\tif(i%j==0)\n\t\t\t{\n\t\t\t\tflag=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(!flag)\n\t\t\t{\n\t\t\t\tk=i;\n\t\t\t\tfor(j=0;k>0;j++)\n\t\t\t\t{\n\t\t\t\t\ta[j]=k%10;\n\t\t\t\t\tk=(k-a[j])/10;\n\t\t\t\t}\n\t\t\t\tfor(k=0;kn)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",i);\n\t\tfor(i++;i<=n;i++)\n\t\t\tif(sushu(i)==0&&huiwen(i)==0)\n\t\t\t\tprintf(\",%d\",i);\n\t}\n}\n"} +{"label": "74", "index": "36587", "code": "\nint sushu(int x)\n{\n int i=2;\n int s=0;\n while (i0)\n {\n w=x%10;\n y=y*10+w;\n x=(x-w)/10;\n }\n if (ori==y)\n return 1;\n else\n return 0;\n}\n \n \n\nmain()\n{\n int m,n;\n int s=0;\n \n scanf(\"%d%d\",&m,&n);\n while (m<=n)\n {\n if (sushu(m))\n {\n if (huiwenshu(m))\n {\n if (s==0)\n {printf(\"%d\",m);s++;}\n else\n printf(\",%d\",m);\n }\n }\n m++;\n }\n \n if (s==0)\n printf(\"no\");\n\n}\n \n"} +{"label": "74", "index": "36588", "code": "int huiwen(int n)\n{\n\tint b=0,m=n;\n\twhile(n)\n\t{\tb=b*10+n%10;\n\t n/=10;\n }\n\tif(b==m)\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nint sushu(int n)\n{\n\tint i;\n\tif(n==2)\n\t\treturn 1;\n\telse\n\t\tfor(i=2;i=t/2;i--)\n\t{\n\t\tif (a[i]!=a[t-i])\n return 0;\n\t}\n\t\treturn 1;\n}\nmain()\n{\n\tint m,n,i,a=0;\n\tscanf (\"%d %d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t{\n\t\tif (sushu(i)==1&&huiwen(i)==1)\n\t\t{\n\t\t\tif (a==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\ta=1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprintf(\",%d\",i);\n\t\t}\n\t}\n\tif (a==0)\n\t\tprintf (\"no\");\n}"} +{"label": "74", "index": "36590", "code": "int main()\n{\n int a,b,c,d,e,f,g,h,i,j=0;\n scanf(\"%d%d\",&c,&d);\n i=0;\n for(a=c;a<=d;a++)\n {\n b=a;\n e=0;\n while(b!=0)\n {\n e=e*10+b%10;\n b/=10;\n }\n if(e==a)\n {\n h=0;\n for(f=2;f=a)\n\t\t{\n\t\t\tb=a;\n\t\t\tj=0;\n\t\t\twhile(b!=0)\n\t\t\t{\n\t\t\t\tb=b/10;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tc=a;\n\t\t\td=0;\n\t\t\tfor(k=j;k>=1;k--)\n\t\t\t{\n\t\t\t\td=d+c%10*pow(10,k-1);\n\t\t\t\tc=c/10;\n\t\t\t}\n\t\t\tif(d==a)\n\t\t l++;\n\t\t}\n\n\t}\n\tif(l==0)\n\t\t\t\tprintf(\"no\\n\");\n\telse\n\t{for(a=m;a<=n;a++)\n\t{\n\t\tfor(i=2;i=a)\n\t\t{\n\t\t\tb=a;\n\t\t\tj=0;\n\t\t\twhile(b!=0)\n\t\t\t{\n\t\t\t\tb=b/10;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tc=a;\n\t\t\td=0;\n\t\t\tfor(k=j;k>=1;k--)\n\t\t\t{\n\t\t\t\td=d+c%10*pow(10,k-1);\n\t\t\t\tc=c/10;\n\t\t\t}\n\t\t\tif(d==a)\n\t\t\t{\tif(e1) printf(\",%ld\",i);\n\t}\n\t}\n\tif(t==0) printf(\"no\\n\");\n}\n\nint sushu(long k)\n{ long x;\n for(x=2;x0)\n{a=temp%10;\np=p*10+a;\ntemp/=10;\n}\nif(p==j) return(1);\nelse return(0);\n}"} +{"label": "74", "index": "36593", "code": "int huiwen(int x,int y);\nint sushu(int x);\nvoid main()\n{\n int m,n,i,j,k=0,temp,b[10000],t;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n\t if((i==huiwen(i,0))&&(sushu(i)==1))\n\t {b[k]=i;k=k+1;}\n }\n \n for(i=0;i0;i++)\n {\n a=a/10; \n }\n for(j=1;j<=i;j++)\n {\n k=c/CF(i-j);\n b=b+k*CF(j-1);\n c=c-k*CF(i-j);\n }\n if(n==b)\n return 1;\n else\n return 0;\n}\nmain()\n{\n int m,n,i,j=0,k;\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n if(SS(i)==1&&HW(i)==1)\n {\n if(j==0)\n printf(\"%d\",i);\n else\n printf(\",%d\",i);\n j++;\n }\n if(j==0)\n printf(\"no\");\n getchar();\n getchar();\n}\n"} +{"label": "74", "index": "36596", "code": "int k(int n)\n{\n\tint o,i,t,m=0;\n\tt=n;\n\tfor(i=0;n!=0;i++)\n\t{\n\tm=10*m+n%10;\n\tn=n/10;\n\t}\n\tif(m==t)\n\t\to=1;\n\telse\n\t\to=0;\n\treturn(o);\n}\nint p(int n)\n{\n\tint i;\n\tfor(i=2;i=10000 && i<20000) w=1;\n\t\tq=(i-10000*w)/1000;\n\t\tb=(i-10000*w-1000*q)/100;\n\t\ts=(i-10000*w-1000*q-100*b)/10;\n\t\tg=i-10000*w-1000*q-100*b-10*s;\n\t\tif(w==0 && q!=0) temp=1000*g+100*s+10*b+q;\n\t\tif(q==0 && b!=0 && w==0) temp=100*g+10*s+b;\n\t\tif(b==0 && s!=0 && q==0 && w==0) temp=10*g+s;\n\t\tif(w!=0) temp=10000*g+1000*s+100*b+10*q+w;\n\t\tif(temp==i)\n\t\t{\n\t\t\tcount=0;\n\t\t\tfor(j=1;j<=i;j++)\n\t\t\t{\n\t\t\t\tif(i%j==0) count+=1;\n\t\t\t}\n\t\t\tif(count==2)\n\t\t\t{\n\t\t\t\tjudge+=1;\n\t\t\t\tif(judge==1) printf(\"%d\", i);\n\t\t\t\telse printf(\",%d\", i);\n\t\t\t}\n\t\t}\n\t}\n\tif(judge==0) printf(\"no\");\n\treturn 0;\n}\n\n\n\t\n"} +{"label": "74", "index": "36598", "code": "int sushu(int x)\n{\n\tint ia,mk;\n\tmk=1;\n\tfor(ia=2;ia<=x/2;ia++)\n\t{\n\t\tif(x%ia==0)\n\t\t{mk=0;break;}\n\t}\n\treturn(mk);\n}\nint huiwen(int y)\n{\n\tint a[100],n,m,z,i,b;\n\tn=1;m=0;i=1;\n\twhile(n<=y)\n\t{n=10*n;m++;}\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tb=pow(10,m-i);\n\t\ta[i]=y/b;\n\t\ty=y%(int)pow(10,m-i);\n\t}\n\tz=1;\n for(i=1;i<=m;i++)\n\tif(a[i]!=a[m+1-i])\n\t{z=0;break;}\n\treturn(z);\n}\nvoid main()\n{\n\tint ma,na,j,t;\n\tscanf(\"%d%d\",&ma,&na);\n t=0;\n\tfor(j=ma;j<=na;j++)\n\t{\n\t\tif(sushu(j)==1&&huiwen(j)==1)\n\t\t{\n\t\t\tif(t>0)printf(\",\");\n\t\t\t\tprintf(\"%d\",j);\n\t\t\t\tt++;\n\t\t}\n\t}\n\tif(t==0)printf(\"no\");\n}\n"} +{"label": "74", "index": "36599", "code": "void main()\n{\n\tint m,n,i=0,j=0,l=0,k,c,t[3000],d,flag=1,e=0,num;\n\tchar a[3000][500],b[1000][500];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(c=m;c<=n;c++)\n\t{\n\t\tk=sqrt(c);\n\t\tfor(i=2;i<=k;i++)\n\t\t\tif(c%i==0)\n\t\t\t\tbreak;\n\t\t\tif(i>=k+1&&c!=1)\n\t\t\t{\n\t\t\t\tt[j]=c;\n\t\t\t//\tprintf(\"%d\\n\",c);\n\t\t\t j++;\n\t\t\t}\n\t}\n\tif(j==0) printf(\"no\");\n\telse\n\t{\n\t\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tnum=num*10+k%10;\n\t\t\t\tk=k/10;\n\t\t\t}\t\t\t\n\t\t\tif (i==num)\n\t\t\t{\n\t\t\t group[b]=i;\t\n\t\t\t\tb++;\n\t\t\t}\n\t\t}\n\t\ta=0;\n\t}\n\tif (group[0]!=0)\n\t{\n\t\tprintf(\"%d\",group[0]);\n for (i=1;i=10)\n\t\t\tl=d;\n\t\telse \n\t\t\tbreak;\n\t\te=e+1;\n\t}\n\t\n\twhile (f<=e)\n\t {j=k%10;\n\t k=(k-j)/10;\n\t g=e-f;\n\t h=h+pow(x,g)*j;\n f=f+1;\n\t }\nz=sqrt(c);\n\tfor (i=2;i<=z;i++)\n\t{if (c%i==0)\n\t{\n\ty=0;\n\tbreak;\n\t}\n\t}\n\t if (i>z)\n\t y=1;\nif (y==1&&h==c&&m==1)\nprintf(\",%d\",c);\t\nif (y==1&&h==c&&m==0)\n{printf(\"%d\",c);\nq=0;m=1;}\n\n}\nif (q!=0)\nprintf(\"no\\n\");\n\n\t \treturn 0;\n}\n\n\n"} +{"label": "74", "index": "36606", "code": "\nint judge1(int x)\n{\n\tif(x==1)\n\t\treturn 0;\n\telse\n\t{\n\t\tint w=1,k=2;\n\t\twhile(k*k<=x)\n\t\t{\n\t\t\tif(x%k==0)\n\t\t\t{\n\t\t\t\tw=0;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tk++;\n\t\t}\n\n\t\treturn w;\n\t}\n}\n\nint judge2(int x)\n{\n\tint x1=x,y=0;\n\twhile(x1>0)\n\t{\n\t\ty=y*10+x1%10;\n\t\tx1/=10;\n\t}\n\n\tif(x==y)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nvoid main(void)\n{\n\tint m,n;\n\tscanf(\"%d%d\",&m,&n);\n\n\tint k,t=0;\n\tfor(k=m;k<=n;k++)\n\t\tif(judge1(k)&&judge2(k))\n\t\t{\n\t\t\tif(t)\n\t\t\t\tprintf(\",\");\n\n\t\t\tprintf(\"%d\",k);\n\n\t\t\tt++;\n\t\t}\n\n\tif(!t)\n\t\tprintf(\"no\");\n\n\tprintf(\"\\n\");\n}"} +{"label": "74", "index": "36607", "code": "char a[100];\nint b[9999];\nvoid P(int m,int n)\n{\n\tint i,j,k,l=0,p,temp1=0,temp2=0;\n\tfor (i=m;i<=n;i++)\n\t{\n\t\tif (i!=2)\n\t\t\tfor (j=2;j<=i/2;j++)\n\t\t\t{\n\t\t\t\tif (i%j==0)\n\t\t\t\t{\n\t\t\t\t\ttemp1=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tif (temp1==0)\n\t\t{\n\t\t\tp=i;\n\t\t\tfor (j=0;p>=10;j++)\n\t\t\t{\n\t\t\t\ta[j]=p%10;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\ta[j]=p;\n\t\t\tfor (k=0;k<=j;k++)\n\t\t\t{\n\t\t\t\tif (a[k]!=a[j-k])\n\t\t\t\t{\n\t\t\t\t\ttemp2=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (temp2==0)\n\t\t\t{\n\t\t\t\tb[l]=i;\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\ttemp1=0;\n\t\ttemp2=0;\n\t}\n\tif (l==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\tfor (i=0;i0;)\n\t { sum=10*sum;\n\t\t a=g-(g/10)*10;\n\t\t sum=sum+a;\n\t\t g=g/10;\n\t }\n\t if(i!=sum)\n\t\t continue;\n\t\t b[k]=i;\n\t\t k++;\n\t \n\t}\n\tif(k==0)\n\t\tprintf(\"no\");\n\telse\n\t{for(i=0;i<=(k-2);i++)\n\t\t{\tprintf(\"%d,\",b[i]);}\n\tprintf(\"%d\",b[k-1]);}\n\n}"} +{"label": "74", "index": "36609", "code": "int p(int k)\n{int i,a,c;\n\tfor(i=2;in/2)\n\t{\n\t\treturn 1;\n\t}\n\telse if(n%p==0)\n\t{\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\treturn sushu(p+1,n);\n\t}\n}\nint huiwen(int n)\n{\n\tint a[100],flag,i;\n\tfor(i=0;n!=0;i++)\n\t{\n\t\ta[i]=n%10;\n\t\tn=n/10;\n\t\tflag=i;\n\t}\n\tfor(i=0;i<=flag;i++)\n\t{\n\t\tif(a[i]!=a[flag-i])\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n\nint main()\n{\n\tint a,b,i,flag=0;\n\tscanf(\"%d %d\",&a,&b);\n\tfor(i=a;i<=b;i++)\n\t{\n\t\tif(huiwen(i)==1&&sushu(2,i)==1&&flag==0)\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tflag=1;\n\t\t}\n\t\telse if((huiwen(i)==1)&&(sushu(2,i)==1)&&(flag==1))\n\t\t{\n\t\t\tprintf(\",%d\",i);\n\t\t}\n\t}\n\tif(flag==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "74", "index": "36613", "code": "int zh(int x);\nint h(int x);\nvoid main()\n{\n\tint m,n,i,d=0,a[1000];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(h(i)&&zh(i))\n\t\t{\n\t\t\ta[d]=i;\n\t\t\td++;\n\t\t}\n\t}\n\tif(d==0) printf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=0;isqrt(x))\n\t\treturn(1);\n\telse return(0);\n}\nint h(int x)\n{\n\tint m=0,n=x;\n\twhile(n>0)\n\t{\n\t\tm=m*10+n%10;\n\t\tn/=10;\n\t}\n\tif(x==m)\n\t\treturn(1);\n\telse return(0);\n}\n\t"} +{"label": "74", "index": "36614", "code": "int Test1(int n)\n{\n\tint d=0,\n\tm=n;\n\twhile (m)\n\t{\n\t\td=d*10+m %10;\n\t\tm/=10;\n\t}\n\treturn d ==n;\n}\nint Test2(int n)\n{\nint m = (int)sqrt(n); \nint i;\nfor(i=2;i<=m;i++)\nif(n%i==0)\nbreak;\nif(i==m+1)\nreturn 1;\nelse\nreturn 0;\n}\nmain()\n{\nint n,m;\nint nCount = 0;\nscanf(\"%d %d\",&n,&m);\nfor(int i=n;i<=m;i++)\n{\nif(Test1(i)&&Test2(i))\n{\nif(nCount==0)\nprintf(\"%d\",i);\nelse\nprintf(\",%d\",i);\nnCount ++;\n}\n}\nif(nCount == 0)\nprintf(\"no\");\nprintf(\"\\n\");\n\n}"} +{"label": "74", "index": "36615", "code": "void main()\n{\n\tint m,n,i,k,x,a[7],p,num,b[50],c=1,d;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{\n\t\tk=sqrt(i);\n for(x=2;x<=k;x++)\n\t\t{if(i%x==0) break;}\n if(x>=k+1)\n\t\t{\n a[6]= i/100000;\n\t\t a[5]= (i-a[6]*100000)/10000;\n a[4]=(i-a[6]*100000-a[5]*10000)/1000;\n a[3]=(i-a[6]*100000-a[5]*10000-a[4]*1000)/100;\n a[2]=(i-a[6]*100000-a[5]*10000-a[4]*1000-a[3]*100)/10;\n a[1]=i-a[6]*100000-a[5]*10000-a[4]*1000-a[3]*100-a[2]*10;\n\t\t if (a[6]>0)\n\t\t\t num=a[1]*100000+a[2]*10000+a[3]*1000+a[4]*100+a[5]*10+a[6];\n\t\t else if(a[5]>0)\n\t\t\t num=a[1]*10000+a[2]*1000+a[3]*100+a[4]*10+a[5];\n\t\t else if(a[4]>0)\n\t\t\t num=a[1]*1000+a[2]*100+a[3]*10+a[4];\n\t\t else if(a[3]>0)\n\t\t\t num=a[1]*100+a[2]*10+a[3];\n\t\t else if(a[2]>0)\n\t\t\t num=a[1]*10+a[2];\n\t\t else num=a[1];\n\t\t if(num==i)\n\t\t {\n\t\t\t b[c]=i;\n\t\t\t c=c+1;\n\t\t }\n\t\t}\n\t}\n\tif (c>1)\n\t{\n\t\tfor(d=1;d<=c-2;d++)\n\t\t{\n\t\t\tprintf(\"%d,\",b[d]);\n\t\t}\n\t\tprintf(\"%d\\n\",b[d]);\n\t}\n\telse if (c=1)\n\t{\n\t\tprintf(\"no\\n\");\n\t}\n}"} +{"label": "74", "index": "36616", "code": "int hw(int i)\n{\n\tint t=i;\n int d=0;\n while(t>0)\n {\n int j=t%10;\n d=d*10+j;\n t=t/10;\n }\n if(d==i)\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nvoid main()\n{\n\tint m,n,x,j,b,c,a;\n\tb=0;\n\ta=0;\n\tc=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(x=m;x<=n;x++)\n\t{\n\t\tfor(j=2;j=1)\n\t{\n\t if(i/k!=i%10)return(0);\n\t if(i/k==i%10)\n\t\t {\n\t\t i=(i-k*(i/k))/10;\n\t\t w=w-2;\n\t\t m=huiwen(i,w);\n\t\t return(m);\n\t\t }\n\t}\n}\nvoid main()\n{\n\tint m,n;int i;int w;int k,j;int count=0;int a[100];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tw=log10(i);\n\t\tk=huiwen(i,w);\n\t\tif(k==1)\n\t\t{\n\t\t\tfor(j=2;j0)\n\t{\n\t\tfor(i=0;i0;k=k/10)\n {b=k%10;\n sum=sum*10+b;\n\t }\n if(sum==i&&g==1) printf(\",%d\",i);\n if(sum==i&&g==0) {printf(\"%d\",i);h=1;g=1;}\n\t}\n\t}\n if(h==0) printf(\"no\");\n}"} +{"label": "74", "index": "36620", "code": "int f=0,y=0;\nvoid main()\n{ void f1(int a);\n\tint m,n,k,p,i,l,t=1;\nscanf(\"%d%d\",&m,&n);\nfor(p=m;p<=n;p++)\n {k=sqrt(p);l=1;\n for(i=2;i<=k;i++)\n if(p%i==0)l=0;\n if(l==1){f1(p);t++;}\n }\nif(y==0)printf(\"no\");\n}\n void f1(int a)\n{int b[32],k=0,x,i,j;\n x=log10(a);j=a;\n for(i=0;i<=x;i++)\n {\n\tb[i]=a%10;\n a=(a-b[i])/10;\n\tk=k*10+b[i];\n }\t \n if((k==j)&&(f==1)){printf(\",%d\",j);y++;}\n if((k==j)&&(f==0)){printf(\"%d\",j);f=1;y++;}\n}"} +{"label": "74", "index": "36621", "code": "\nvoid main(){\n\tint huiwen(int a);\n\tint prime(int b);\n\tint min,max,i,j=0,p[100]={0};\n\tscanf(\"%d%d\",&min,&max);\n\tfor (i=min;i<=max;i++){\n\t\tif (huiwen(i)==1&&prime(i)==1){\n\t\t\tj++;\n\t\t\tp[j]=i;\n\t\t}\n\t}\n\tif (j!=0){\n\t\tfor (i=1;i=1&&a/i<10)\n\t\t\tweishu++;\n\t\telse if (a/i>=10){\n\t\t\tweishu++;\n\t\t\tcontinue;\n\t\t}\n\t\telse break;\n\t}\n\ttemp=a;\n\tfor (i=pow((float)10,weishu-1);i>=1;i/=10){\n\t\tif (temp/i>=1&&temp/i<10){\n\t\t\tj++;\n\t\t\tnumber[j]=temp/i;\n\t\t\ttemp%=i;\n\t\t}\n\t\telse{\n\t\t\tj++;\n\t\t\tnumber[j]=0;\n\t\t\ttemp%=i;\n\t\t}\n\t}\n\tfor (i=0;isqrt((float)b))\n\t\treturn 1;\n\telse return 0;\n}\n\n\n"} +{"label": "74", "index": "36622", "code": "int pan(long n)\n{\n\tint i,l=0,t=sqrt(n);\n\tfor(i=2;i<=t;i++)\n\t{\n\t\tif(n%i==0) break;\n\t}\n\tif(i>t) l=1;\n\tif(n==1) l=0;\n\treturn l;\n}\nint wei(long n)\n{\n\tint i=1;\n\twhile(1)\n\t{\n\t\tn=n/10;\n\t\tif(n==0) break;\n\t\ti=i+1;\n\t}\n\treturn i;\n}\nint huiwen(long n)\n{\n\tchar a[40]={'\\0'};\n\tint w=wei(n),i,l,s=1;\n\tfor(i=0;ii;i++,d--){\n\t\tif((int)(n/pow(10,i))%10-(int)(n/pow(10,d))%10)flag=0;\n\t}\n\treturn flag;\n}\n\nint main()\n{\n\tint m,n,i;\n\tchar flag=1;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(isPrime(i)){\n\t\t\tif(isPalindrome(i)){\n\t\t\t\tif(flag){\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\tflag=0;\n\t\t\t\t}\n\t\t\t\telse printf(\",%d\",i);\n\t\t\t}\n\t\t}\n\t}\n\tif(flag)printf(\"no\");\n\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "74", "index": "36624", "code": "int judge(int n)\n{\n int i;\n for(i=2;i0&&i<10) z=1;\n\t\telse if(i>=10&&i<100)\n\t\t{\n\t\t\tb=i/10;\n\t\t\ta=i-b*10;\n\t\t\th=a*10+b;\n\t\t\tif(h==i) z=1;\n\t\t}\n\t\telse if(i>=100&&i<1000)\n\t\t{\n\t\t\tc=i/100;\n\t\t\tb=(i-c*100)/10;\n\t\t\ta=i-c*100-b*10;\n\t\t\th=a*100+b*10+c;\n\t\t\tif(h==i) z=1;\n\t\t}\n\t\telse if(i>=1000&&i<10000)\n\t\t{\n\t\t\td=i/1000;\n\t\t\tc=(i-d*1000)/100;\n\t\t\tb=(i-d*1000-c*100)/10;\n\t\t\ta=i-d*1000-c*100-b*10;\n\t\t\th=a*1000+b*100+c*10+d;\n\t\t\tif(h==i) z=1;\n\t\t}\n\t\telse \n\t\t{\n\t\t\te=i/10000;\n\t\t\td=(i-e*10000)/1000;\n\t\t\tc=(i-e*10000-d*1000)/100;\n\t\t\tb=(i-e*10000-d*1000-c*100)/10;\n\t\t\ta=i-e*10000-d*1000-c*100-b*10;\n\t\t\th=a*10000+b*1000+c*100+d*10+e;\n\t\t\tif(h==i) z=1;\n\t\t}\n\t\treturn(z);\n\t}\n\n\n\n\n\n"} +{"label": "74", "index": "36626", "code": "void main()\n{\n\tlong a,b,c,d,e,x,y,i,j=0,m,n,p[32768];\n\tint q=0,s;\n\tdouble t;\n\tscanf(\"%ld %ld\",&m,&n); \n\tfor(x=m;x<=n;x++)\n\t{\n\t\ta=x/10000;\n b=x%10000/1000; \n c=x%1000/100; \n d=x%100/10; \n e=x%10; \n\t if(a!=0)\n\t\t\ty=e*10000+d*1000+c*100+b*10+a;\n\t else\n\t\t{\n\t\t\tif(b!=0)\n\t\t\t\ty=e*1000+d*100+c*10+b;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c!=0)\n\t\t\t\t\ty=e*100+d*10+c;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(d!=0)\n\t\t\t\t\t\ty=e*10+d;\n\t\t\t\t\telse\n\t\t\t\t\t\ty=e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t t=sqrt(x);\n\t for(i=2;i<=t;i++)\n\t\t{\n\t\t\tif(x%i==0)\n\t\t\t\tj++;\n\t\t}\n\t\tif(x==y&&j==0)\n\t\t{\n\t\t p[q]=x;\n\t\t q++;\n\t\t j=0;\n\t\t}\n\t else\n\t\t{\n\t\t\tj=0;\n\t \tcontinue;\n\t\t}\n\t}\n\tif(q==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor(s=0;s<=q-2;s++)\n\t\t\tprintf(\"%ld,\",p[s]);\n\t\tprintf(\"%ld\\n\",p[q-1]);\n\t}\n}"} +{"label": "74", "index": "36627", "code": "void main()\n{\n\tint m,n,i,p,flag,a,ok,w,b;\n\tscanf(\"%d %d\",&m,&n);\n\tok=1;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\ta=0;\n\t\tflag=1;\n\t\tfor(p=2;p<=i/2;p++)\n\t\t{\n\t\t\tif(i%p==0)\n\t\t\t{\n\t\t\t\tflag=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag==0)\n\t\t\tcontinue;\n\t\tw=i;\n\t\twhile(w)\n\t\t{\n\t\t\tb=w%10;\n\t\t\ta=a*10+b;\n\t\t\tw=w/10;\n\t\t}\n\t\tif(a==i)\n\t\t{\n\t\t\tprintf((!ok)?\",%d\":\"%d\",i);\n\t\t\tok=0;\n\t\t}\n\t}\n\tif(ok==1)\n\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36628", "code": "int main()\n{\n\tint m,n,i,j,p,k,h,sh,ch,l,o,x=0,a[10000];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tj=0;l=i;\n\t\tp=log10(i);\n\t\tfor(k=p;k>=1;k--)\n\t\t{\n\t\t\tsh=1;\n\t\t\tch=1;\n\t\t\tfor(h=1;h=1;j--)\n\tsum=sum+num[j]*(int)pow(10,j-1);\n\tif(I==sum)\n\t\tif(f(I)==0)\n\t\t{ans[k]=I;k++;}\n\ti=I;\n}\nif(k==0)printf(\"no\");\nelse \n{\nK=k-1;\nfor(k=0;k1)printf(\",%d\",a[i]);\n\t\t\t}\n\t\t}\n\t}\n\tif(z==0)printf(\"no\");\n\n\tprintf(\"\\n\");\n}\n"} +{"label": "74", "index": "36631", "code": "int su(int x);\nint hui(int x);\nvoid main()\n{\n\tint m,n,flag=0,x;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(x=m;x<=n;x++)\n\t{\n\t\tif(su(x)+hui(x)==2)\n\t\t{\n\t\t\tif(flag==1)printf(\",\");\n\t\t\tprintf(\"%d\",x);\n\t\t\tflag=1;\n\t\t}\n\t}\n\tif(flag==0)printf(\"no\");\n}\n\nint su(int x)\n{\n\tif(x==1)return(0);\n\telse \n\t{\n\t\tint i,flag=1;\n\t\tfor(i=2;i<=x/2;i++)\n\t\t{\n\t\t\tif(x%i==0){flag=0;break;}\n\t\t}\n\t\treturn(flag);\n\t}\n}\n\nint hui(int x)\n{\n\tint i=x,n=0,flag=1,*p;\n\twhile(i>0){i=i/10;n+=1;}\n\tp=(int *)malloc(n*sizeof(int));\n\tfor(i=x;i>0;i=i/10)\n\t{\n\t\t*p=i%10;\n\t\tp+=1;\n\t}\n\ti=0,p-=n;\n\twhile(ik) l=1;\n else l=0;\n return(l);\n}\nint g(int a)\n{\n int i,x=0,j,k;\n for(i=0;i<=9;i++)\n {\n\t if(a==i+10*i) x=1;\n for(j=0;j<=9;j++)\n\t {\n\t\t if(a==i+10*j+100*i) x=1;\n\t\t if(a==i+10*j+100*j+1000*i) x=1;\n\t\t for(k=0;k<=9;k++)\n\t\t {\n\t\t\t if(a==i+10*j+100*k+1000*j+10000*i) x=1;\n\t\t }\n\t }\n }\n return(x);\n}"} +{"label": "74", "index": "36634", "code": "int isprime(int n)\n{\n\tint i;\n\tif(n%2==0) return 0;\n\tfor(i=3;i<=(int)sqrt(n);i+=2)\n\t\tif(n%i==0) return 0;\n\treturn 1;\n}\nint isturn(int n)\n{\n\tchar num[10];\n\tint k=0,i;\n\twhile(n/10!=0) \n\t{\n\t\tnum[k++]=n%10+'0';\n\t\tn=n/10;\n\t}\n\tnum[k++]=n%10+'0';\n\tfor(i=0;i<=k/2;i++)\n\t\tif(num[i]!=num[k-1-i]) return 0;\n\treturn 1;\n}\nint main()\n{\n\tint n,m,i,t=1,flag=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t\tif(isprime(i)&&isturn(i)) \n\t\t\tif(t==1) {printf(\"%d\",i);t=0;flag=1;}\n\t\t\telse printf(\",%d\",i);\n\tprintf(\"\\n\");\n\tif(flag==0) printf(\"no\\n\");\n\treturn 0;\n\t\n}"} +{"label": "74", "index": "36635", "code": "int q(int l);\nint p(int l);\nvoid main()\n{\n\tint n,m,i,j=0,a[1000];\n\tscanf(\"%d%d\",&n,&m);\n\tfor(i=n;i<=m;i++)\n\t{\n\t\tif(q(i)!=0&&p(i)!=0){a[j]=i;j++;}\n\t}\n\tif(j==0)printf(\"no\");\n\telse {printf(\"%d\",a[0]);for(i=1;i=3&&( (i-i%10) /10 ) %10 !=(i/(t/10))%10)continue;/*???????????*/\n\tif(w>=5 && (i/10- ( (i-i%10) /10 ) %10 ) /10%10 != (i/(t/100) )%10 )\n\t\tcontinue;/*????2???????*/\n\tif(w>=7 && (i/10- ((i/10- ( (i-i%10) /10 ) %10 ) /10%10 ) )/10%10!= (i/(t/1000) )%10 )\n\t\tcontinue;/*????*/\n\tif(w>=9 && (i/10-((i/10- ((i/10- ( (i-i%10) /10 ) %10 ) /10%10 ) )/10%10))/10%10!= (i/(t/10000) )%10 )\n\t\tcontinue;\n\tif(w>=11 && (i/10-((i/10-((i/10- ((i/10- ( (i-i%10) /10 ) %10 ) /10%10 ) )/10%10))/10%10))/10%10!= (i/(t/100000) )%10 )\n\t\tcontinue;\n\t\t\n\t\t\n\t\tt=zhishu(i);/*??????*/\n\t\tif(t==1&&k==0)\n\t\t\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tk++;a=1;\n\t\t}\n\t\telse if(t==1&&k>0)\n\t\t\n\t\tprintf(\",%d\",i);\n\n\n\t}\n\tif(a==0)printf(\"no\");\n\treturn 0;\n\n}\nint zhishu(int n)\n{\n\tint t,i,k=0;\n\tt=sqrt(n)+1;\n\tfor(i=2;i0)return 0;\n\t\telse return 1;\n\n}"} +{"label": "74", "index": "36637", "code": "main()\n{\n\tint m,n,a[100000]={0},b[1000],i,j,d,k;\n\tscanf(\"%d%d\",&n,&m);\n\tfor(i=2;i=n)\n\t\t{if(a[i]==-1) continue;}\n\t\tfor(j=i+2;j<=m;j++)\n\t\t\tif(j%i==0)\n\t\t\t\ta[j-n]=-1;\n\t}\n\tj=0; \n\tfor(i=n;i<=m;i++)\n\t {\n\t\t if(a[i-n]==-1) continue;\n\t\t if(i%10==0) continue;\n\t\t k=i;\n\t\t d=0;\n\t\t while(k!=0)\n\t\t {\n\t\t\t d=d*10+k%10;\n\t\t\t k=k/10;\n \n\t\t }\n\t\t if(d==i)\n\t\t {b[j]=i;j++;}\n\t}\nif(j==0) printf(\"no\");\t\nelse for(i=0;i0)\n {\n t=10*t+y%10;\n y/=10;\n tran(y);\n }\n if (x==t)\n return(1);\n }\nvoid main()\n{\n\tint tran(long x);\n\tlong m,n,i,j,s,t;\n\tscanf(\"%d%d\",&m,&n);\n\tt=0;\n\tfor (i=m;i<=n;i++)\n\t{\n\t\ts=0;\n\t\tfor (j=2;j=1)\n\t\t\t\tprintf(\",\");\n\t\t\tprintf(\"%ld\",i);\n\t\t\tt++;\n\t\t}\n\t}\n\tif (t==0)\n\t\tprintf(\"no\\n\");\n}\n\n\n\n\n"} +{"label": "74", "index": "36641", "code": "void main()\n{\n\tint sushu(int);\n\tint huiwen(int);\n\tint i,m,n,s=0;\n\tint a[50]={0};\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)&&huiwen(i))\n\t\t{\n\t\ta[s]=i;\n\t\ts=s+1;\n\t\t}\n\t}\n\tif(s==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tfor(i=0;ik)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\nint huiwen(int m)\n{\n\tint i,n,f,v=0;\n\tn=m;\n\tfor(i=0;n!=0;i++)\n\t{\n\t\tf=n%10;\n\t\tv=v*10+f;\n\t\tn=n/10;\n\t}\n\tif(v==m)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\n\n\t\t"} +{"label": "74", "index": "36642", "code": "int h(int n)\n{\n\tint s=0,k,y=n;\n\twhile(y>0)\n\t{\n\t\tk=y%10;\n\t\ts=10*s+k;\n\t\ty=y/10;\n\t}\n\tif(s==n)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\nint s(int n)\n{\n\tif(n==1)\n\t\treturn(0);\n\telse\n\t{\n\t\tint i,j;\n\t\tj=n/2;\n\t\tfor(i=2;i<=j;i++)\n\t\t{\n\t\tif(n%i==0)break;\n\t\telse\n\t\t\tj=n/i;\n\t\t}\n\t\tif(i>j)\n\t\t\treturn(1);\n\t\telse\n\t\t\treturn(0);\n\t}\n}\nvoid main()\n{\n\tint m,n,i,k=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n&&k<1;i++)\n\t{\n\t\tif(h(i)&&s(i))\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tk=k+1;\n\t\t}\n\t}\n\tif(k==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tint j;\n\t\tfor(j=i;j<=n;j++)\n\t\t{\n\t\t\tif(h(j)&&s(j))\n\t\t\t\tprintf(\",%d\",j);\n\t\t}\n\t}\n}"} +{"label": "74", "index": "36643", "code": "int main()\n{\n int m,n,i,l=0,c;\n int a[1000];\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n int j,t,f=1,s,b;\n b=i;\n char e[40];\n for(j=0;b!=0;j++)\n {\n e[j]=b%10;\n b=b/10;\n }\n e[j]='\\0';\n for(t=0;t=1;c=c/10)\n\t\t\t\t\tb=b*10+c%10;\n\t\t\t\tif(a==b)\n\t\t\t\t{\n\t\t\t\t\ts[h]=a;\n\t\t\t\t\th++;\n\t\t\t\t}\n\t\t\t}\n\t}\n\tif(h==0)\n\t\tprintf(\"no\");\n\telse\n\t\tfor(i=0;isqrt(x))\n\t\t return(1);\n\t else\n\t\t return(0);\n}\n\nint huiwen(int x)\n{\n\tint n,i;\n\tif(x<10)return(1);\n\telse\n\t\tif(x<100&&(x%10)==(x/10))return(1);\n\t\telse\n\t\t\tif(x<1000&&(x%10)==(x/100))return(1);\n\t\t\telse\n\t\t\t\tif(x<10000&&(x%10)==(x/1000)&&(x%100/10)==(x/100%10))return(1);\n\t\t\t\telse\n\t\t\t\t\tif(x<100000&&(x%10)==(x/10000)&&(x%100/10)==(x/1000%10))return(1);\n else return(0);\n}\n\n\t\nvoid main()\n{\n\tint m,n,i,k=0,o;\n scanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t\tif(huiwen(i)&&sushu(i))\n\t\t{\tprintf(\"%d\",i);o=i;k++;break;\n\t\t}\n for(i=o+1;i<=n;i++)\n\t\tif(huiwen(i)&&sushu(i))\n\t\t{\tprintf(\",%d\",i);\n\t\t k++;\n\t\t}\n\tif(k==0)\n\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36648", "code": "int fy(int x)\n{\n int z=1,i,t,m=0;\n t=x;\n while(t>0)\n {m=m*10+t%10;\n t=t/10;\n }\n if(m!=x)z=0;\n else {for(i=2;i<=sqrt(x);i++)\n {if(x%i==0)\n {z=0;\n break;}\n }\n }\n return z;\n} \nint main(int argc, char *argv[])\n{\n int k,j,l;\n scanf(\"%d%d\",&k,&j);\n for(l=k;l<=j;l++)\n {\n if(fy(l)==1)\n {printf(\"%d\",l);\n break;}\n }\n if(l>j) printf(\"no\");\n else { \n for(l=l+1;l<=j;l++)\n {\n if(fy(l)==1)\n printf(\",%d\",l); \n }\n } \n return 0;\n}\n\n"} +{"label": "74", "index": "36649", "code": "int su(int n)\n{\n int i;\n for(i=2;in)\n printf(\"no\");\n else\n for(i=i+1;i<=n;i++)\n if(su(i)&&hui(i,i,0))\n printf(\",%d\",i);\n}\n"} +{"label": "74", "index": "36650", "code": "int main()\n{\n\tint m,n,i,j,k=0,t=0,p=0,q,a,b,c=0,d=0;\n\tint x[100];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{for(j=1;j<=i;j++) {if(i%j==0) t++;}\n if(t==2) \n\t{b=i;\n\tfor(a=log10(b);a>=0;a--) {x[k]=b/(pow(10,a));b=b-x[k]*pow(10,a);k++;}\n\tq=log10(i);\n\tfor(j=0;j<=q;j++)\n\t{if(x[j]!=x[q-j]) {p=1;}}\n if(p==0&&d==1){printf(\",%d\",i);}\n\tif(p==0&&d==0){printf(\"%d\",i);c=1;d=1;}\n\t}\n\tt=0;p=0;k=0;}\n\tif(c==0) {printf(\"no\");}\n}"} +{"label": "74", "index": "36651", "code": "int main()\n{int a,b,i,j,c,d,e,k,s=0;\nscanf(\"%d%d\",&a,&b);\nfor(i=a;i<=b;i++){\n\tk=0;\n\tfor(j=2;j<=sqrt(i);j++){\n\t\tif(i%j==0){\n\t\t\tk=1;\n\tbreak;\n\t\t}\n\t}\n\tc=i;\n\te=0;\n\twhile(c>0)\n\t{d=c%10;\n\te=e*10+d;\n\tc=c/10;\n\t}\n//\tprintf(\"%d %d %d\\n\",i,e,k);\n\tif(k==0&&i==e){\n\t\ts++;\n\t\tif(s==1)\n\t\t\tprintf(\"%d\",i);\n\t\telse\n\t\tprintf(\",%d\",i);\n\t}\n}\nif(s==0)\nprintf(\"no\");\nreturn 0;\n}"} +{"label": "74", "index": "36652", "code": "void main()\n{\n\tint sushu(int s);\n\tint huiwen(int s);\n\tint m,n,i,t;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tt=i;\n\t\tif(sushu(i)>0&&huiwen(i)>0)\n\t\t{printf(\"%d\",i);break;}\n\t\t\n\t}\n\tif(t==n&&huiwen(t)==0)\n\t\tprintf(\"no\");\n\t\n\tif(t0)&&(huiwen(i)>0))\n\t\t\t\tprintf(\",%d\",i);\n\t\t}\n\t}\n\n\n\n}\nint sushu(int s)\n{\n\tint j;\n\tdouble k;\n\tk=sqrt(s);\n\tfor(j=2;j<=k;j++)\n\t{\n\t\tif(s%j==0)\n\t\t{\n\t\t\treturn(0);break;\n\t\t}\n\t}\n\tif(j>k)\n\treturn(1);\n}\nint huiwen(int s)\n{\n\tint a[10],z=0,i;\n\twhile(s/10>0)\n\t{\n\t\ta[z]=s%10;\n\t\ts=s/10;\n\t\tz++;\n\t}\n\ta[z]=s;\n\tfor(i=0;i<=z/2;i++)\n\t{\n\t\tif(a[i]!=a[z-i])\n\t\t{return(0);break;}\n\t}\n\tif(i>z/2)\n\treturn(1);\n}\n\n\n"} +{"label": "74", "index": "36653", "code": "void main()\n{int m,n,i,j,k,p,sum=0;\nint a[100],b[100];\nscanf(\"%d%d\",&m,&n);\nfor(i=m;i<=n;i++)\n{\n\tfor(j=2;j<=i/2+1;j++)\n\t\tif(i%j==0)\n\t\t\tbreak;\n\t\tif(j>i/2)\n\t\t{for(j=1;j<100;j++)\n\t\tif(i/(pow(10,j))<1)\n\t\t\tbreak;\n\t\tp=i;\n for(k=j-1;k>=0;k--)\n\t\t {a[k]=(p/pow(10,k));\n\n\t\t p=(p-a[k]*pow(10,k));\n\t\t \n\t\t b[j-k-1]=a[k];}\nfor(k=0;k=j+1) \n\t\t{\n\t\t\td[k]=i;\n\t\t\tk=k+1;\n\t\t}\n\t}\n\tk=k-1;\n\tfor (i=0,r=0;i<=k;i++)\n\t{\n\t\tfor (j=2;j=d[i])\n\t\t{\n\t\t\tf[r]=d[i];\n\t\t\tr=r+1;\n\t\t}\n\t}\n\tr=r-1;\n\tfor(i=0;i<=r;i++)\n\t{\n\t\tif (f[i+1]!=0) printf(\"%d,\",f[i]);\n\t\tif (f[i+1]==0&&f[i]!=0) printf(\"%d\\n\",f[i]);\n\t}\n\tif (f[0]==0) printf(\"no\\n\");\n\treturn 0;\n}"} +{"label": "74", "index": "36655", "code": "int sushu(int t)\n{\n\tint r,i;\n\tfor(i=2;ij)\n\t\t\treturn 1;\n\t\tif(s[i++]!=s[j--])\n\t\t\treturn 0;\n\t}\n}\nint main()\n{\n\tint m,n,i,j=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\t\n\t\tif(huiwen(i) && sushu(i) && j==0)\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tj++;\n\t\t}\n\t\telse if(huiwen(i) && sushu(i))\n\t\t\tprintf(\",%d\",i);\n\t}\n\tif(j==0)\n\t\tprintf(\"no\");\n\treturn 0;\n}"} +{"label": "74", "index": "36656", "code": "void main()\n{\n\tint F(int x);\n\tint G(int x);\n\tint m,n,i;\n\tscanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{\n\t\tif(F(i)&&G(i)) {printf(\"%d\",i);break;}\n\t}\n if(i==n+1) printf(\"no\");\nfor(i=i+1;i<=n;i++)\n\t{\n\t\tif(F(i)&&G(i)) printf(\",%d\",i);\n\t}\n}\n\n\n int F(int x)\n {\n int z,t=0;\n z=x;\n do\n { \n\t t=t*10+z%10;\n\t z=z/10;\n }\n while(z!=0);\n if(t==x)return(1);\n else return(0);\n }\n\n int G(int x)\n {\n\t int i,b=1;\n\t if(x==10201) return(0);\n\t else\n\t {\n for(i=2;i=10;j++)\n\t\t\t{\n\t\t\t\ta[j]=p%10;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\ta[j]=p;\n\t\t\tfor(k=0;k<=j;k++)\n\t\t\t{\n\t\t\t\tif(a[k]!=a[j-k])\n\t\t\t\t{\n\t\t\t\t\ttemp2=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(temp2==0)\n\t\t\t{\n\t\t\t\tresult[l]=i;\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\ttemp1=0;\n\t\ttemp2=0;\n\t}\n\tif(l==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\tfor(i=0;i0)\n {w[n]=fmod(i,10);\n i=i/10;\n n++;\n }\n for (i=1;i<=n;i++)\n\t if (w[i]!=w[n-i]) flag=0;\n return flag;\n}\nint main()\n{int i,j,k,l,n,m,a[170657]={0},count=0;\n scanf(\"%d %d\",&m,&n);\n a[1]=100;\n for (i=2;i0;i/=10)\n {\n j=j*10+i%10;\n }if(!ok(j))return 0;\n else if(j!=nu)return 0;\n else if(j==nu&&ok(j))return 1;\n}\nmain()\n{\n int m,n,i,count=0,a[1000];\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n if(ok(i))\n {\n if(num(i))\n {\n a[count]=i;\n count++;\n }\n } \n } \n if(count==0)printf(\"no\");\n else {for(i=0;isqrt(i))\n\t\t{\n b[0]=i/1000000;\n\t\t\tb[1]=i/100000-10*b[0];\n\t\t\tb[2]=i/10000-100*b[0]-10*b[1];\n\t\t\tb[3]=i/1000-1000*b[0]-100*b[1]-10*b[2];\n\t\t\tb[6]=i%10;\n\t\t\tb[5]=(i%100-b[6])/10;\n\t\t\tb[4]=i/100-10000*b[0]-1000*b[1]-100*b[2]-10*b[3];\n\t\t\tfor(j=0;j<7&&b[j]==0;j++){}\n for(h=0;j<7&&b[6-h]==b[j];h++,j++){}\n\t\t\tif(j==7)\n\t\t\t{\n a[f]=i;f++; \n\t\t\t}\n\t\t\n\t\t}\n\t}\n\tif(f>0)\n\t{\n\t\tfor(i=0;ia) {e[0]=c[i];t=i;g=1;break;}\n}\nif(g==0) printf(\"no\");\nelse if(g==1)\n{printf(\"%d\",e[0]);\nfor(i=t+1;ia) printf(\",%d\",e[i]);\n}\n}\n}\n\nunsigned int f(unsigned int x)\n{unsigned int y=1,i;\nfor(i=0;i0)\n\t\t\t{ \n\t\t\t\tc[j]=b%10;\n\t\t\t\tb=(b-c[j])/10;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk=j;\n\t\t\tfor(j=0;j0)\n\t{\n\t\tfor(i=0;i=k+1)\n\t\t{\n\t\ta[4]= i/10000;\n\t\ta[3]=(i-a[4]*10000)/1000;\n\t\ta[2]=(i-a[4]*10000-a[3]*1000)/100;\n\t\ta[1]=(i-a[4]*10000-a[3]*1000-a[2]*100)/10;\n\t\ta[0]=i-a[4]*10000-a[3]*1000-a[2]*100-a[1]*10;\n\t\t\n\t\tif(a[4]>0)\n\t\t\tnum=a[0]*10000+a[1]*1000+a[2]*100+a[3]*10+a[4];\n\t\telse if(a[3]>0)\n\t\t\tnum=a[0]*1000+a[1]*100+a[2]*10+a[3];\n\t\telse if(a[2]>0)\n\t\t\tnum=a[0]*100+a[1]*10+a[2];\n\t\telse if(a[1]>0)\n\t\t\tnum=a[0]*10+a[1];\n\t\telse num=a[0];\n\t\t\n\t\t\n\t\tif(num==i)\n\t\t{\n\t\t\tb[c]=i;\n\t\t c=c+1;\n\t\t}\n\t\t}\n\t}\n\tif(c>1)\n\t{\n\t\tfor(d=1;d<=c-2;d++)\n\t{\n\t\tprintf(\"%d,\",b[d]);\n\t}\n\tprintf(\"%d\\n\",b[d]);\n\t}\n\tif(c==1)\n\t\tprintf(\"no\\n\");\n}\n"} +{"label": "74", "index": "36667", "code": "/* Note:Your choice is C IDE */\nint huiwen(int);\nint sushu(int);\nvoid main()\n{\n\tint m,n,i,sign=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(huiwen(i)&&sushu(i))\n\t\t{\n\t\t\tif(sign==0)\n\t\t\t{\n\t\t\t\tsign=1;printf(\"%d\",i);\n\t\t\t}\n\t\t\telse printf(\",%d\",i);\n\t\t}\n\t}\n\tif(!sign) printf(\"no\");\n}\n\nint huiwen(int a)\n{\n\tint i,lb;\n\tchar b[100]={'\\0'};\n\tchar c[100]={'\\0'};\n\tfor(i=0;;i++)\n\t{\n\t\tif(a==0) break;\n\t\tb[i]=a%10+'0';\n\t\ta=a/10;\n\t}\n\tlb=strlen(b);\n\tfor(i=0;i<=lb-1;i++)\n\t c[i]=b[lb-1-i];\n\tif(strcmp(c,b)==0) return 1;\n\telse return 0;\n}\n\nint sushu(int a)\n{\n\tint i;\n\tfor(i=2;i0)\n {\n a[++m]=n %10;\n n=n/10;\n }\n int i=0,j=m;\n while(i<=j)\n {\n if(a[i]!=a[j]) return 0;\n i++; j--;\n }\n return 1;\n}\nint main()\n{ \n int m,n;\n int i,f=0;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n if( p1(i) && p2(i))\n {\n if(f==0) {printf(\"%d\",i);f=1;}\n else printf(\",%d\",i); \n }\n if(f==0) printf(\"no\");\n}"} +{"label": "74", "index": "36670", "code": "int main()\n{\n\tint rev(int x);\n\tint prime(int y);\n\tint m,n,i,j=0,k,a[100];\n\tscanf(\"%d %d\",&m,&n);\n\ti=m;\n\twhile(i<=n)\n\t{\n\t\tif(rev(i)==1&&prime(i)==1) \n\t\t{\n\t\t\ta[j]=i;\n\t\t\tj++;\n\t\t}\n\t\ti++;\n\t}\n\tif(j==0) printf(\"no\");\n\telse\n\t{\n\t printf(\"%d\",a[0]);\n\t for(k=1;k0)\n\t{\n\t\tb=x%10;\n\t\ta=a*10+b;\n\t\tx=x/10;\n\t}\n\tif(temp==a) return 1;\n\telse return 0;\n}\n\nint prime(int y)\n{\n\tint c;\n\tfor(c=2;c<=y/2;c++)\n\t{\n\t\tif(y%c==0) break;\n\t}\n\tif(c<=y/2) return 0;\n\telse return 1;\n}\n\n\n "} +{"label": "74", "index": "36671", "code": "void main()\n{\n\tint m,n,t,s,p,q,i,j,k=0,r,a[100];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=(m%2==0?m+1:m);i<=n;i+=2)\n\t{\n\t\tt=i;\n\t\ts=0;\n\t\tfor(j=0;t!=0;j++)\n\t\t{\n\t\t\tp=t%10;\n\t\t\tt=t/10;\n\t\t\ts=s*10+p;\n\t\t}\n\t\tif(s==i) \n\t\t{\n\t\t\tr=1;\n\t\t\tq=sqrt(i);\n\t\t\tfor(j=2;j<=q;j++) if(i%j==0) {r=0;break;}\n\t\t\tif(r==1) {a[k]=i;k++;}\n\t\t}\n\t}\n\tif(k!=0)\n\t{\n\t\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tsum=sum*10+p%10;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\t\n\t\t\tif(sum==i)\n\t\t\t{\tq=q+1;\n\t\t\t if(q==1)\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t if((q!=1)&&(q!=0))\n\t\t\t\t printf(\",%d\",i);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\n if(q==0)\n\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36675", "code": "int main()\n{\n int m,n,i,sum,temp,k=0,h,t=0,pan=0;\n int a[MN]={0};\n int b[MN]={0};\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n sum=0;\n temp=i;\n while(temp)\n {\n sum=sum*10+temp%10;\n temp/=10;\n }\n if(i==sum)\n {\n a[k]=i;\n k++;\n continue;\n }\n }\n for(k=0;k0;)\n\t{\n\t\ts=m%10;\n\t\tm=m/10;\n\t\tn=n*10+s;\n\t}\n\tif(n==a)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\nint sushu(int m)\n{\n\tint i;\n\tif(m%2==0)\n\t\treturn(0);\n\telse\n\t{\n\t\tfor(i=3;i1;i--)\n\t\tif(n%i==0)return 0;\n\treturn 1;\n}\nint g(long n){\n\tint a[10],i=0,j;\n\twhile(n)\n\t\ta[i++]=n%10,n/=10;\n\tfor(j=0,i--;j9){\n\t\tm0/=10;\n\t\tp*=10;\n\t}\n\twhile(m>=1&&p>0){\n\t\tif((m%10)!=m/p) return 0;\n\t\tm=(m%p)/10;\n\t\tp/=100;\n\t}\n\treturn 1;\n}\n\nchar isprime(int m){\n\tint p,sm;\n\tif(!(m%2)||m==1) return 0;\n\tsm=sqrt(m);\n\tfor(p=3;p<=sm;p+=2)\n\t\tif(!(m%p)) break;\n\treturn (p>sm);\n}\n\n\nvoid main(){\n\tint m,n,c=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(;m<=n;m++)\n\t\tif(isprime(m)&&ishw(m)){\n\t\t\tif(c) putchar(','); else c=1;\n\t\t\tprintf(\"%d\",m);\n\t\t}\n\tif(!c) puts(\"no\");\n}\n"} +{"label": "74", "index": "36683", "code": "void main()\n{\n\tint m,n,i,j,t[10000]={0},k=0,l=1,u,v,h,b,c,d,e,a[10000]={0},x,q;\n\tscanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{\n\t\tq=0;\n\t\tu=0;\n\t\th=log10(i);\n\t\tfor(j=h;j>=0;j--)\n\t\t{\n\n\t\t b=pow(10,j+1);\n c=pow(10,j);\n\t\t d=i%b-i%c;\n\t\t\te=d/c;\n\t\t\ta[h-j]=e;\n\t\t}\n\t\tfor(j=0;j<=h;j++)\n\t\t{\n\t\t\tif(a[j]==a[h-j])\n q++;\n\t\t\telse if(a[j]!=a[h-j])\n\t\t\t break;\n\t\t}\n if(q==h+1)\n\t\t\tu=1;\n\t\tq=0;\n\t\tv=0;\n\t\tj=2;\n while(j<=sqrt(i))\n\t\t\tif(i%j==0)\n\t\t\t{\tq=1;break;}\n\t\t\telse j++;\n if(i==1)\n\t\t\tq=1;\n\t\tif(q==0)\n\t\t\tv=1;\n if(u==1&&v==1)\n\t\t{\n\t\t\tt[k]=i;\n\t\t\tk++;\n\t\t}\n\t}\n\tif(k==0)\n\t printf(\"no\\n\");\n\telse \n\t{\n\t\tfor(i=0;i=1)\n\t\t{\n\t\t\tk=p%10;\n\t\t\tp=p/10;\n\t\t\tt=t*10+k;\n\t\t}\n\t\tif(t!=i)i++;\n\t\telse\n\t\t{\n\t\t\tq=f(i);\n\t \tif(q)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tx++;\n\t\t\t break;\n\t\t\t}\n\t\t\telse i++;\n\t\t}\n\t}\n\ti++;\n while(i<=n)\n\t{\n\t\tp=i;\n\t\tt=0;\n\t\twhile(p>=1)\n\t\t{\n\t\t\tk=p%10;\n\t\t\tp=p/10;\n\t\t\tt=t*10+k;\n\t\t}\n\t\tif(t==i) \n\t\t{\n\t\t\tq=f(i);\n\t\t if(q)\n\t\t\t{\n\t\t\t\tprintf(\",%d\",i);\n\t\t\t\tx++;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\tif(x==0)printf(\"no\");\n}\n\nint f(int p)\n{\n\tint j,k;\n\tif(p%2==0)k=0;\n\telse\n\t{\n\t for(j=3;j=p)k=1;\n\t else k=0;\n\t}\n\treturn(k);\n}"} +{"label": "74", "index": "36685", "code": "int main()\n{\n\tint m,n,i,j,k=1,a=0,number,reversed_number=0,remainder=0;\n\tint prime[10000]={0},reversed[10000]={0},result[10000];\n\n\tscanf(\"%d%d\",&m,&n);\n\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tfor(j=2;j0)\n\t{\n\t\tresult=10*result+num%10;\n\t\tnum=num/10;\n\t}\n\treturn result;\n}\n\nvoid func(int num)\n{\n\tint i,flag;\n\tfor(i=2,flag=1;isqrt(a[i])) \n\t\t{\n\t\t\tb[sum2]=a[i];\n\t\t\tsum2++;\n\t\t}\n\t}\n\tif(sum2==0) printf(\"no\\n\");\n\telse\n\t{\n\t\tprintf(\"%d\",b[0]);\n\t\tfor(i=1;i=k)return(1);else return(0);}\nvoid main()\n{\nint m,n,i,k=0;\nscanf(\"%d%d\",&m,&n);\nfor(i=m;i<=n;i++)if(max(i)==1&&nax(i)==1){printf(\"%d\",i);k++;break;}\nfor(i=i+1;i<=n;i++)if(max(i)==1&&nax(i)==1){printf(\",%d\",i);k++;};if(k==0)printf(\"no\");\n}"} +{"label": "74", "index": "36693", "code": "\nvoid main()\n{\n\tint n,m,i,t,j=0,k,o,r,b[30]={0};\n\tchar pp[30]={\"\\0\"};\n int f(int m);\n \n scanf(\"%d %d\",&m,&n);\n \tfor(i=m;i<=n;i++)\n {\n\t if(f(i)==1)\n\n\t \n\t {\n\t\t strcpy(pp,\" \");\n\t\t// ltoa(i,pp,10);\n\t\t o=0;r=i;\n\t while(r!=0)\n\t\t {\n\t\t\t pp[o]=r%10+48;\n\t\t\t r=r/10;o++;\n\t\t }\n\n\n\t\t t=0;\n\t\t k=strlen(pp);\n while(t<=k)\n\t { \n\t\t if(pp[t]==pp[k-1-t])\n\t t++;\n\t else\n\t\t\t break;\n\t\n\t\t }\n\n\t\t if (t>=k) \n\t\t {b[j]=i;j++;}\n\t } \n }\n\n if(j==0)\n printf(\"no\");\nelse{\n for(i=0;in)\n\tprintf(\"no\\n\");\n}\nint f(int i)\n{\n\tint x=1,j;\n\tfor(j=2;j<=sqrt(i);j++)\n\t{\n\t\tif(i%j==0)\n\t\t{\n\t\t\tx=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn(x);\n}\nint g(int i)\n{\n\tint y,a;\n\tint c=0,d;\n\td=i;\n\twhile(d!=0)\n\t{\n\t\ta=d%10;\n\t\tc=(c+a)*10;\n\t\td=d/10;\n\t}\n\tif(i==c/10)\n\t\ty=1;\n\telse\n\t\ty=0;\n\treturn(y);\n}\n"} +{"label": "74", "index": "36697", "code": "int ws(int x)\n{\tint i=1,c=1;\n\tfor(i=1;;i*=10)\n\t{\tc++;\n\t\tif((i<=x)&&(i*10>x)) break;\n\t}\n\treturn(c-1);\n}\nint check1(int x)\n{\tint p=1,i;\n\tfor(i=2;i=1;i=i/10)\n {k=k+x/i*j;\n x=x-x/i*i;\n j=j*10;\n }\n if(t==k)\n p=1;\n return(p);\n}\n \nvoid main()\n{int m,n,i,j; \n scanf(\"%d%d\",&m,&n);\n j=0;\n for(i=m;i<=n;i++)\n {if(sushu(i)==1&&huiwenshu(i)==1)\n {if(j==0)\n {printf(\"%d\",i);\n j++;}\n else \n printf(\",%d\",i);\n }\n }\n if(j==0)\n printf(\"no\");\n}\n"} +{"label": "74", "index": "36699", "code": "int su(int a)\n{\n int i;\n for(i=2;i<=sqrt(a);i++)\n {\n if(a%i==0)\n {\n break;}\n }\n if(i>sqrt(a))\n {return(1);}\n else {return(0);}\n}\nint hui(int b)\n{\n int a[10]={0},n=0,i=0,j=0,l,z=b;\n for(;;)\n {\n a[i]=b%10;\n i++;\n b=b/10;\n if(b==0){break;}\n }\n for(l=0;l=0;i--)\n\t{\n\t\tb[i]=d/pow(10,i);\n\t\td=d-b[i]*pow(10,i);\n\t}\n\tfor(i=0;i<=k;i++)\n\t{\n\t\tif(b[i]!=0)\n\t\t{\n\t\t\te=i;\n\t\t break;\n\t\t}\n\t}\n\tsum=b[k];\n\tfor(i=k-1;i>=e;i--)\n\t\tsum=sum+b[i]*pow(10,k-i);\n\treturn(sum);\n}\nint prime(int num)\n{\n\tint k,i;\n\tk=sqrt(num);\n\tfor(i=2;i<=k;i++)\n\t\tif(num%i==0)\n\t\t\tbreak;\n\tif(i>=k+1)\n\t\treturn(1);\n\telse return(0);\n}\n"} +{"label": "74", "index": "36701", "code": "int main()\n{\n\tint m,n,i,j,counter=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tfor(j=2;j0&&i<10)\n\t\t\t{\n\t\t\t\tcounter+=1;\n\t\t\t\tif(counter==1)\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\telse\n\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t}\n\t\t\telse if(i>=10&&i<=99)\n\t\t\t{\n\t\t\t\tif(i/10==i%10)\n\t\t\t\t{\n\t\t\t\t\tcounter+=1;\n\t\t\t\t\tif(counter==1)\n\t\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i>=100&&i<=999)\n\t\t\t{\n\t\t\t\tif(i/100==i%10)\n\t\t\t\t{\n\t\t\t\t\tcounter+=1;\n\t\t\t\t\tif(counter==1)\n\t\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i>=1000&&i<=9999)\n\t\t\t{\n\t\t\t\tif(i/1000==i%10&&(i%1000)/100==(i%100)/10)\n\t\t\t\t{\n\t\t\t\t\tcounter+=1;\n\t\t\t\t\tif(counter==1)\n\t\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i>=10000&&i<=99999)\n\t\t\t{\n\t\t\t\tif(i/10000==i%10&&(i%10000)/1000==(i%100)/10)\n\t\t\t\t{\n\t\t\t\t\tcounter+=1;\n\t\t\t\t\tif(counter==1)\n\t\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(counter==0)\n\t\tprintf(\"no\");\n\treturn 0;\n}\n\n"} +{"label": "74", "index": "36702", "code": "void main()\n{\n\tint i,j,k=1,m,n,x,y,z,s=0,a[10000];\n\tscanf(\"%d%d\",&m,&n);\n\tif(m<=2)\n\t{\n\t\ta[0]=2;\n\t\ts++;\n\t}\n\tif(m%2==0)\n\t\tm++;\n\tfor(i=m;i<=n;)\n\t{\n\t\tfor(j=3;j<=sqrt(i);j++)\n\t\t{\n\t\t\t\n\t\t\tif(i%j==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(i%j==0)\n\t\t{\n\t\t\ti=i+2;\n\t\t\tcontinue;\n\t\t}\n\t\tx=i;\n\t\ty=0;\n\t\twhile(x>0)\n\t\t{\n\t\t\ty*=10;\n\t\t\ty+=x%10;\n\t\t\tx/=10;\n\t\t}\n\t\tif(y==i)\n\t\t{\n\t\t\ta[s]=i;\n\t\t\ts++;\n\t\t}\n\t\ti=i+2;\n\t}\n\tif(s==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",a[0]);\n\t\tfor(i=1;i0)\n\t {b=b*10+(c%10);\n\t c=c/10;\n\t }\n\t if(b==i)\n\t {k=(int)sqrt(i);\n for(j=2;j<=k;j=j+1)\n\t\t {if(i%j==0) break;}\n\t \n\t if(j>k) \n\t\t {t=1+t;\n if(t==1) printf(\"%d\",i);\n\t\t\t\tif(t>1) printf(\",%d\",i);\n\t\t\t }\n\n\t }\n }\n\tif(t==0) printf(\"no\");\n printf(\"\\n\");\n\t\treturn 0;\n}"} +{"label": "74", "index": "36704", "code": "int f(int a,int b)\n{\n if (a==0)\n return(b);\n else\n return f(a/10,b*10+a%10);\n}\nvoid main()\n{\n int m,n,i,j,t=0;\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n if (i==f(i,0)&&i>2)\n {\n for (j=2;jk)\n\t\t{\tp++;\n\t\t\tif(tag==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",a);\n\t\t\t\ttag=1;\n\t\t\t}\n\t\t\telse\n\t\tprintf(\",%d\",a);}\n\t\n\t\t\n\n\t}}\tif(p==0)\n\t\tprintf(\"no\");\n}\n\tint huiwen(int a, int b)\n{\tif(a==0)\n\treturn(b);\n\telse return(huiwen(a/10, b*10+a%10));\n\t}"} +{"label": "74", "index": "36706", "code": "void main()\n{\n long m,n,i,a,b;\n\tint r=0,k,l,d,t,j;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{ t=1;\n for(j=2;j<=i/2;j++)\n\t\t\tif(i%j==0) {t=0; break;} \n if(t==1)\n d=(int)log10(i)+1;\n for(k=1;k<=d/2+1;k++)\n\t\t {a=i; b=i;\n\t\t for(l=1;l<=k-1;l++)\n\t\t\t\ta=a/10;\n\t\t\tfor(l=1;l<=d-k;l++)\n\t\t\t\tb=b/10;\n\t\t\ta=a%10; b=b%10;\n\t\t\tif(a!=b) {t=0; break;}}\n\t\tif(t==1) if(r==0) {printf(\"%d\",i); r=1;}\n\t\t else printf(\",%d\",i); }\n if(r==0) printf(\"no\");\n printf(\"\\n\");\n}"} +{"label": "74", "index": "36707", "code": "void main()\n{\tint hui(int n);\n\tint su(int n);\n\tint m,n,i,j=0,a[50];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++) if((su(i))&&(hui(i))){a[j]=i;j++;}\n\tif(j==0) printf(\"no\");\n\telse for(i=0;i0)\n\t{\n\t\tsum=sum*10+n%10;\n\t\tn/=10;\n\t}\n\tsum=sum*10+n;\n\tif(sum==p)return(1);\n\telse return(0);\n}"} +{"label": "74", "index": "36709", "code": "int change(int num)\n{\n int answer=0;\n while(num)\n {\n answer=answer*10+num%10;\n num=num/10;\n }\n return answer;\n}\nmain()\n{\n int m,n,i,j,a=0;\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n for(j=2;jk)flag=1;\n return flag;\n}\nLoopNumber(int n)\n{\nint a,b=0,c,flag=0;\na=n;\nfor(;a!=0;)\n{\nc=a%10;\na=a/10;\nb=b*10+c;\n}\nif(b==n)flag=1;\n return flag;\n}\nmain()\n{int m,n,i,k=0,a[100],flag1,flag2;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{flag1=PrimeNumber(i);\n\t flag2=LoopNumber(i);\n\t if(flag1==1&&flag2==1){a[k]=i;k++;}\n\t}\n if(k>0) \n\t{printf(\"%d\",a[0]);\n\t for(i=1;i0;i/=10){\n sz[k]=i%10; \n\t\tk++;\n\t}\n\tfor(i=0;i0)\n {\n s[k]=ix%10;\n k++;\n ix=ix/10;\n }\n f=0;//printf(\"%d\\n\",k);\n for (j=0;jn-1) return 1;\n else if(n%num==0) return 0;\n else return(su(n,n-1,num+1));\n}\n\nint main()\n{\n int i,m,n,flag=0,limit;\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n limit=sqrt(i)+1;\n if(hui(i,0)==i&&su(i,limit,2)){flag=1;printf(\"%d\",i);break;}\n }\n for(++i;i<=n;i++)\n {\n if((hui(i,0)==i)&&su(i,limit,2)&&i!=323){printf(\",%d\",i);}\n }\n if(flag==0) printf(\"no\");\n \n \n \n return 0;\n}"} +{"label": "74", "index": "36718", "code": "void main()\n{\n\tint m,n,i,j,flag,k,p,a[15]={0},q=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tflag=1;\n\t\tfor(j=2;j<=i/2;j++)if(i%j==0)\n\t\t\t{flag=0;break;}\n\t\tif(flag==0)continue;\n\t\telse \n\t\t{\n\t\tk=0;\n\t\tp=i;\n\t\twhile(i>0)\n\t\t\t{k=k*10+i%10;i=i/10;}\n\t\tif(k==p)a[q++]=p;\n\t\ti=p;\n\t\t}\n\t\t\n\t}\n\tif(q==0)printf(\"no\\n\");\n\telse \n\t{\n\tfor(i=0;i0)\n\t\t\t{ \n\t\t\t\tl=temp%10;\n\t\t\t\th=h*10+l;\n\t\t\t\ttemp=temp/10;\n\t\t\t}\n\t\t\tif(i==h)\n\t\t\t{\n\t\t\t\tif(a==0)printf(\"%d\",i);\n\t\t\t\telse printf(\",%d\",i);\n\t\t\t\ta++;\n\t\t\t}\n\t\t}\n\t}\n\tif(a==0)printf(\"no\");\n}"} +{"label": "74", "index": "36720", "code": "int sushu(int n){\n\tint i;\n\tif(n%2==0) return 0;\n\tfor(i=3;i<=sqrt(n);i+=2) if(n%i==0) return 0;\n\treturn 1;\n}\nvoid main(){\n\tint i,x,y,m,n,k=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++){\n\t\tx=i;y=0;\n\t\tif(sushu(i)==0) continue;\n\t\twhile(x>0){\n\t\t\ty=y*10+x%10;\n\t\t\tx/=10;\n\t\t}\n\t\tif(y==i){\n\t\t\tif(k++==0) printf(\"%d\",i);\n\t\t\telse printf(\",%d\",i);\n\t\t}\n\t}\n\tif(k==0) printf(\"no\");\n}"} +{"label": "74", "index": "36721", "code": "int main()\n{\n\tint m,n,i,j,k,a,b,c,d=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tfor(a=i,b=0,c=0;a!=0;a=a/10)\n\t\t{\n\t\t\tb=b*10+a%10;\n\t\t}\n\t\tif(b==i)\n\t\t{\n\t\t\tfor(j=2;j<=sqrt(b);j++)\n\t\t\t{\n\t\t\t\tif(b%j==0)\n\t\t\t\t{\n\t\t\t\t\tc=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c!=1)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\td=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(d==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=i+1;i<=n;i++)\n\t{\n\t\tfor(a=i,b=0,c=0;a!=0;a=a/10)\n\t\t{\n\t\t\tb=b*10+a%10;\n\t\t}\n\t\tif(b==i)\n\t\t{\n\t\t\tfor(j=2;j<=sqrt(b);j++)\n\t\t\t{\n\t\t\t\tif(b%j==0)\n\t\t\t\t{\n\t\t\t\t\tc=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(c!=1)\n\t\t\t{\n\t\t\t\tprintf(\",%d\",i);\n\t\t\t}\n\t\t}\n\t}\n\t}\n\treturn 0;\n}\n\t\t\n"} +{"label": "74", "index": "36722", "code": "\nint main(void)\n{\n\tint m,i,n,a,num=0,p,q,su;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(a=m;a<=n;a++)\n\t{ su=1;\n\t\tfor(i=2;i0)\n\t\t\t{\n\t\t\t\tq=q*10+p%10;\n\t\t\t\tp/=10;\n\t\t\t}\n\t\t\tif(q==a)\n\t\t\t{\n\t\t\t\tnum++;\n\t\t\t\tif(num==1)\n\t\t\t\t\tprintf(\"%d\",a);\n\t\t\t\tif(num>1)\n\t\t\t\t\tprintf(\",%d\",a);\n\t\t\t}\n\t\t}\n\t}\n\tif(num==0)\n\t\tprintf(\"no\");\n}\n\n"} +{"label": "74", "index": "36723", "code": "int huiwen(int n)\n{\n\tint k=0,a,b=n;\n\twhile(b!=0)\n\t{\n\t\ta=b%10;\n\t\tk=k*10+a;\n\t\tb=b/10;\n\t}\n\tif(k==n)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint sushu(int n)\n{\n\tint i;\n\tif(n==2)\n\t\treturn 1;\n\telse\n\t{\n\t\tfor(i=2;i<=(n-1);i++)\n\t\t{\n\t\t\tif(n%i==0)\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n}\nvoid main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint i,k=0;\n\tint s[1000];\n\tfor(i=0;i<=(n-m);i++)\n\t{\n\t\tif((huiwen(m+i)==1)&&(sushu(m+i)==1))\n\t\t{\n\t\t\ts[k]=m+i;\n\t\t\tk=k+1;\n\t\t}\n\t}\n\tif(k==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",s[0]);\n\t\tfor(i=1;isqrt(i))\n\t\t\t{\n\t\t\t\tsave[k]=i;\n\t\t\t\tk++;\n\t\t\t}\n\t\t\telse y++;\n\t\t}\n\t}\n\tlong int r=0;\n\tfor(l=0;l=1)\n\t{\n\t\tr=x%10;\n\t\tx=x/10;\n c=c*10+r;\n\t}\n\treturn(c);\n}"} +{"label": "74", "index": "36726", "code": "\nint main (int argc, char *argv[])\n{\n int n, m, i, j, x=0, y, s, t, c, k=0;\n scanf(\"%d %d\",&m, &n);\n for(i=m;i<=n;i++){\n c=i;\n y=1;\n s=0;\n for(j=2;j0;)\n\t\t{t=t*10+j%10;j=j/10;}\n\t\tif(t==i)\n\t\t{\t\n\t\t\tfor(k=3;k1) printf(\",%d\",t);\n\t\t}\n\t}\n\tif(r==0)\n\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36734", "code": "void main()\n{\n int f(int x,int y);\n int g(int y);\n int a[200];\n int k=0,t,m,n,p1,p2,p3,i;\n scanf(\"%d %d\",&m,&n);\n for(t=m;t<=n;t++)\n { \n p3=sqrt(t);\n p1=f(t,p3);\n p2=g(t);\n if(p1==1&&p2==1)\n {\n a[k]=t;\n k++;\n }\n }\n if(k==0)\n printf(\"no\");\n else if(k>0)\n {\n for(i=0;i=y+1)\n a=1;\n return(a);\n}\n int g(int y)\n {\n int b,i,j,k=0,e,f=0;\n j=y;\n while(y>=10)\n {\n y=y/10;\n k++;\n }\n y=j;\n for(i=0;i<=k;i++)\n {\n e=y%10;\n y=y/10;\n f=f*10+e;\n }\n if(f==j)\n b=1;\n else b=0;\n return(b);\n}"} +{"label": "74", "index": "36735", "code": "int main()\n{\n int m, n;\n// int a[100000];//?????????\n int temp, p, q, c, w=0;\n scanf(\"%d %d\", &m, &n);\n //k=n-m;\n //for(i=0;i<=k;i++)\n //{\n // a[i]=m+i;\n //}\n \n for(;m<=n;m++)\n {\n temp=m;\n q=0; //q??????????????//\n while(temp>0)\n\t {\n\t p=temp%10;\n\t q=q*10+p;\n\t temp=temp/10;\n\t }\n\t if(q==m)\n\t {\n\t// printf(\"%d\\n\", a[i]);\n\t for(c=2;c=m)\n\t {\n\t\t w++;\n\t\t if(w==1)printf(\"%d\", m);\n\t\t else printf(\",%d\", m);\n\t } \n\t }\n }\n if(w==0) printf(\"no\");\n printf(\"\\n\");\n return 0;\n}"} +{"label": "74", "index": "36736", "code": "void main()\n{\n\tint ce(int o);\n\tint hui(int a);\n\tint m,n,i,j=0,t[10];\n\tscanf(\"%d %d\",&m,&n);\n\t\tfor(i=m;i<=n;i++)\n\t\t\tif(ce(i)==1&&hui(i)==1)\n\t\t\t{t[j]=i;\n\t\t\tj++;\n\t\t\t}\n\tif(j==0)\n\t\tprintf(\"no\");\n\telse{\n\n\tfor(i=0;ik)return(1);\n\telse return(0);\n}\nint hui(int a)\n{\n\tint k=0,b[10],place,flag=1,i;\n\tif(a<=999)\n\t\tplace=3;\n\telse if(a<=9999)\n\t place=4;\n\telse if(a<=99999)\n\t\tplace=5;\n\telse if(a<=999999)\n\t\tplace=6;\n\tk=0;\n\n\tfor(i=0;ii) break;}\n for(k=0;kq)\n\t\t{n=i;break;}\t\t\t\t//q?n??//\n\tfor(i=1;i<=n;i++)\n\t\tc[i]=pow(10,i);\n\tfor(i=1;i<=n;i++)\n\t\ta[i]=(q%c[i])/(pow(10,i-1));\n\tfor(i=1,j=n-1;i<=n,j>=0;i++,j--)\n\t\tb=b+a[i]*pow(10,j);\n\tif(q==b)\n\t\treturn(1);\n\telse return(0);\t\t\n}\n\n\n"} +{"label": "74", "index": "36739", "code": "int fold(int a)\n{\n\tint f,i;\n\tint k;\n\tif(a<10)\n\t\treturn(a);\n\telse\n\t{\n\t\tk=a%10;\n\t\ta=a/10;\n\t\tfor(i=1;i<=a;i=i*10);\n\t\tf=k*i+fold(a);\n\t\treturn(f);\n\t}\n}\nvoid main()\n{\n\tint m,n,i,j,t=0,k=0;\n\tscanf(\"%d%d\",&m,&n);\n\tif(m%2==0)m++;\n\tfor(i=m;i<=n;)\n\t{\n\t\tif(i%2==0)\n\t\t\tgoto a1;\n\t\tfor(j=3;j2&&x%2==0)a++;\n\telse\n\t{\n\t\tfor(i=3;i>m>>n;\n\tm--;\n\twhile(m++,m<=n)\n\t{\n\t\t//cout<=10) mm=mm*10;\n\twhile (mm>=10)\n\t{ \n\t\tif (m/mm!=m%10) {d=1;break;}\n\t\tm=m-m/mm*mm;\n\t\tm/=10;\n\t\tmm/=100;\n\t}\n\tif (d==0) return (0);\n\telse return (1);\n}\nvoid main ()\n{\n\tint min,max,i;\n\tscanf (\"%d%d\",&min,&max);\n\tnu=0;\n\tfor (i=min;i<=max;i++)\tif (f1(i)==0&&f2(i)==0) {printf (\"%d\",i);nu=1;break;}\n\tfor (i++;i<=max;i++) if (f1(i)==0&&f2(i)==0) {printf (\",%d\",i);}\n\tif (nu==0) printf (\"no\");\n}\n\n"} +{"label": "74", "index": "36742", "code": "void main()\n{\n\tint sushu(int);\n\tint huiwen(int);\n int m,n,i,b[10000],p,q,r=0,j=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tp=sushu(i);\n\t\tq=huiwen(i);\n\t\tif(p==1&&q==1)\n\t\t{b[j]=i;j++;r=1;}\n\t}\n\tif(r==0)\n\t\tprintf(\"no\");\n\telse if(j==1)\n\tprintf(\"%d\",b[0]);\n\telse if(j>1)\n\t{printf(\"%d\",b[0]);\n\tfor(i=1;ik){flag1=1;}\n\telse {flag1=0;}\n\treturn(flag1);\n}\nint huiwen(int x)\n{\n\tint a[9],d,j,b,c,k,e,y,sum=0,cha,flag2;\n\td=9;\n\tk=pow(10,d);\n\twhile((x/k)==0)\n\t{\n\t\td--;\n\t\tk=pow(10,d);\n\t}\n\tfor(j=0;j<=d;j++)\n\t{\n\t\tb=pow(10,j+1);\n\t\tc=pow(10,j);\n\t\ta[j]=(x%b-x%c)/c;\n\t}\n\tfor(j=0;j<=d;j++)\n\t{\n\t\te=pow(10,d-j);\n\t\ty=a[j]*e;\n\t\tsum=sum+y;\n\t}\n\tcha=x-sum;\n\tif(cha==0)flag2=1;\n\telse flag2=0;\n\treturn (flag2);\n}\n\n"} +{"label": "74", "index": "36745", "code": "\nint ans[10000], a[100];\n\nint main()\n{\n\tint l, r, i, s, anses=0, bo, t;\n\tscanf(\"%d%d\", &l, &r);\n\twhile (l<=r)\n\t{\n\t\tbo=1;\n\t\tfor (i=2; i*i<=l; i++) if (l%i==0) bo=0;\n\t\tfor (s=l, t=0; s; s/=10) a[t++]=s%10;\n\t\tfor (i=0; i0)\n\t{\n\t\tfor(i=0;i=k+1&&i!=1)\n\t\t{\n\t\t\tp=i;\n\t\t\twhile(p!=0)\n\t\t\t{\n\t\t\t\tq=p%10;\n\t\t\t\tj=j*10+q;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\tif(i==j)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",j);\n\t\t\t\tm=1;\n\t\t\t\tn=j;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tj=0;\n\t\t}\n\t}\n\tj=0;\n\tfor(i=n+1;i<=b;i++)\n\t{\n\t\tk=sqrt(i);\n\t\tfor(h=2;h<=k;h++)\n\t\t{\n\t\t\tif(i%h==0)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(h>=k+1&&i!=1)\n\t\t{\n\t\t\tp=i;\n\t\t\twhile(p!=0)\n\t\t\t{\n\t\t\t\tq=p%10;\n\t\t\t\tj=j*10+q;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\tif(i==j)\n\t\t\t{\n\t\t\t\tprintf(\",%d\",j);\n\t\t\t\tm=1;\n\t\t\t}\n\t\t\tj=0;\n\t\t}\n\t}\n\tif(m==0)\n\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36750", "code": "void main()\n{\n\tint n,m,i,j,k=0,flag,a,b,s;\n\tscanf(\"%d%d\",&n,&m);\n\ti=n;\n\twhile(i<=m)\n\t{\n\t\ta=i;s=0;\n\t\twhile(a>0)\n\t\t{ \n\t\t\tb=a%10;\n\t\t s=s*10+b;\n a=a/10;\n\t\t}\n\t\tif(s==i)\n\t\t{ \n\t\t\tj=2;flag=0;\n\t\t\twhile(j<=i/2)\n\t\t\t{\n\t\t\t\tif(i%j==0)\n\t\t\t\t\tflag=1;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif(flag==0)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tif(k==1)\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tif(k>1)\n\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif(k==0)\n\t\tprintf(\"no\");\n}\n\n\n\n\n"} +{"label": "74", "index": "36751", "code": "void main()\n{\n\tint m,n,e=0,p=0,q=0,a,s,b,k,i,t=0;\n\tscanf(\"%d %d\",&m,&n);\n\t\n\tfor(a=m;a<=n;a++)\n\t{\n\t\ts=0;b=0;k=0;\n\t\tfor(i=2;i<=sqrt(a);i++)\n\t\t{\n\t\t\tif(a%i==0)\n\t\t\t\ts=s+1;\n\t\t}\n\t\tif(s==0)\n\t\t{\n\t\t\tp++;\n\t\t\tt=a;\n\t\t\twhile(t!=0)\n\t\t\t{\n\t\t\t\tk=t%10;\n\t\t\t\tb=b*10+k;\n\t\t\t\tt=t/10;\n\t\t\t}\n\t\t\tif(b==a)\n\t\t\t{\n\t\t\t\tif(e==0)\n\t\t\t\t{\n\t\t\t\t printf(\"%d\",a);\n\t\t\t\t\te=1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tprintf(\",%d\",a);\n\t\t\t}\n\t\t\telse q++;\n\t\t}\n\t}\n\t\tif(p==q)\n\t\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36752", "code": "int main()\n{\n\tint rev(long);\n\tint prime(long);\n\tlong m,n,i;\n\tint first=1;\n\tscanf(\"%ld%ld\",&m,&n);\n for (i=m;i0)\n\t{\n\t\ta[i++]=n%10;\n\t\tn=n/10;\n\t}\n//\tfor (j=0;j0;)k=k*10+j%10,j=j/10;if(k==i)\n\t\t{\n\t\t\tfor(j=2;j=0;i--)\n\t\t\t{\n\t\t\t\tif(a[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tk=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=0;i<=k;i++)\n\t\t\t\tif(a[i]!=a[k-i]) x++;\n\t\t\tif(x==0) \n\t\t\t{\n\t\t\t\tif(z==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d\",n);\n\t\t\t\t\tz++;\n\t\t\t\t}\n\t\t\t\telse printf(\",%d\",n);\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t\tx=0;\n\t\tt=0;\n\t\tk=0;\n\t\tfor(i=0;i<=9;i++)\n\t\t\ta[i]=0;\n\t}\n\tif(sum==0) printf(\"no\");\n}"} +{"label": "74", "index": "36757", "code": "int main()\n{\n\tint a[9]={1,10,100,1000,10000,100000,1000000,1000000,100000000},i,j,k,n,m,p,t=1,l=0,r,s,o;\n\tscanf(\"%d%d\",&n,&m);\n\tfor(r=0;r<9;r++)\n\t\tif(n/a[r]==0) break;\n\tfor(s=0;s<9;s++)\n\t\tif(m/a[s]==0) break;\n\tfor(o=r;o<=s;o++)\n\t{\n\t\tk=o;\n\tif(k%2==0)\n\t{\n\t\tk=k/2;\n\t\tfor(i=a[k-1];im) break;\n\t\t\tif(p>=n)\n\t\t\t{\n\t\t\tfor(j=2;jm) break;\n\t\t\tif(p>=n)\n\t\t\t{\n\t\t\tfor(j=2;j<(int)sqrt((double)p)+1;j++) \n\t\t\t\tif(p%j==0) break;\n\t\t\tif(j==(int)sqrt((double)p)+1) {printf(\"%d\",p);t=0;goto loop;}\n\t\t\t}\n\t\t}\n\t}\n\tif(p>m) break;\n\t}\nloop:\n\ti++;\n\tfor(;o<=s;o++)\n\t{\n\t\tk=o;\n\tif(k%2==0)\n\t{\n\t\tk=k/2;\n\t\tfor(;im) break;\n\t\t\tif(p>=n)\n\t\t\t{\n\t\t\tfor(j=2;jm) break;\n\t\t\tif(p>=n)\n\t\t\t{\n\t\t\tfor(j=2;j<(int)sqrt((double)p)+1;j++) \n\t\t\t\tif(p%j==0) break;\n\t\t\tif(j==(int)sqrt((double)p)+1) {printf(\",%d\",p);t=0;}\n\t\t\t}\n\t\t}\n\t}\n\tif(p>m) break;\n\t}\n\tif(t) printf(\"no\\n\");\n}"} +{"label": "74", "index": "36758", "code": "main()\n{\n\tint N(int y);\n\tint Z(int y);\n\tint m,n,y,a,b;\n\tscanf(\"%d %d\",&m,&n);\n\ty=m;\n\ta=N(y);\tb=Z(y);\n \n\twhile((a!=y || b!=1) && y<=n) \n\t{ y=y+1;a=N(y);\tb=Z(y);}\n\tif(y==n+1) printf(\"no\");\n\telse printf(\"%d\",y);\n\t m=y;\n\tfor(y=m+1;y<=n;y++) \n\t{\n\t\ta=N(y);\tb=Z(y);\n\t\tif(a==y && b==1) \n\t\t{printf(\",%d\",y);}\n\t}\n\t\n\tprintf(\"\\n\");\n}\n\n\nint Z(int y)\n{\n int i,b;\n for(i=2;i<=y;i++)\n\t{\n\t\tb=y%i;\n\t\tif(b==0) break;\n\t}\n\tif(i==y) b=1;\n else b=0;\n return(b);\n}\n\nint N(int y)\n{\n long f=0,a=0,b=0,c=0,d=0,e,n=1,x;\n e=y%10;y=(y-e)/10;\n if(y>0) {d=y%10;y=(y-d)/10;}\n if(y>0) {c=y%10;y=(y-c)/10;}\n if(y>0) {b=y%10;y=(y-b)/10;}\n if(y>0) {a=y%10;y=(y-a)/10;}\n if(y>0) f=y%10;\n\n\n if(f!=0) x=100000*e+10000*d+1000*c+100*b+10*a+f;\n else \n if(a!=0) x=10000*e+1000*d+100*c+10*b+a;\n else \n if(b!=0) x=1000*e+100*d+10*c+b;\n else \n if(c!=0) x=100*e+10*d+c;\n else \n\t\t if(d!=0) x=10*e+d;\n\t\t\telse y=e;\n return(x);\n} "} +{"label": "74", "index": "36759", "code": "int main()\n{\n\tlong n[100000],s[100000],i,k,a,b,h=0,x,m[10000],c=0;\n\tscanf(\"%ld %ld\",&a,&b);\n\tfor(i=a;i<=b;i++)\n\t{\n\t\tx=1;\n\t\tfor(k=2;k0)\n\tfor(i=0;i0;i++)printf(\",%d\",a[i]);\n}\n\n\n}\nint su(int a,int b)\n{\nif(b==a)return 1;\nelse if(a%b==0)return 0;\nelse return(su(a,b+1));\n}\nint hui(int c,int d)\n{\nif(c==0)return d;\nelse return(hui(c/10,d*10+c%10));\n\n\n}"} +{"label": "74", "index": "36761", "code": "int sushu(int k)\n{\n\tint o;\n\tfor(o=2;o<=sqrt(k);o++) if(k%o==0) {o=0;break;}\n\tif(o!=0) o=1;\n\treturn(o);\n}\nint huiwen(int k)\n{\n\tint k2=0,o,x;\n\tx=k;\n\twhile(x>=10)\n\t{\n\t\to=x%10;\n\t\tk2=10*k2+o;\n\t\tx=x/10;\n\t}\n\tk2=10*k2+x;\n\tif(k==k2) o=1;\n\telse o=0;\n\treturn(o);\n}\n\nvoid main()\n{\n\tint sushu(int k);\n\tint huiwen(int k);\n\tint m,n,i,f=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i))\n\t\t\tif(huiwen(i))\n\t\t\t{\n\t\t\t\tif(f==0) {printf(\"%d\",i);f=1;}\n\t\t\t\telse printf(\",%d\",i);\n\t\t\t}\n\t}\n\tif(f==0) printf(\"no\");\n\tprintf(\"\\n\");\n}"} +{"label": "74", "index": "36762", "code": "main()\n{\n int judge(int a,int b,int c);\n int sushu(int n);\n int M,N,o,i,l,L,K,flag,n;\n scanf(\"%d %d\",&M,&N);\n flag=0;\n for(n=M;n<=N;n++)\n {o=1;\n for(i=1;;i++)\n {o=o*10;\n if(o>n)\n {l=i; \n break;}}\n if(l%2==0)\n L=l/2;\n else\n L=(l-1)/2;\n if(sushu(n)&&judge(n,L,l))\n {printf(\"%d\",n);\n K=n+1;\n flag=1;\n break;}}\n for(n=K;n<=N;n++)\n {o=1;\n for(i=1;;i++)\n {o=o*10;\n if(o>n)\n {l=i; \n break;}}\n if(l%2==0)\n L=l/2;\n else\n L=(l-1)/2;\n if(sushu(n)&&judge(n,L,l))\n {printf(\",%d\",n);\n flag=flag+1;}}\n if(flag==0)\n printf(\"no\\n\");\n}\nint sushu(int n)\n{\n int i;\n for(i=2;i<=sqrt(n);i++)\n if(n%i==0)\n return 0;\n return 1;\n}\nint judge(int a,int b,int c)\n{\n int i,x,y,o;\n i=x=y=o=1;\n if(b==1)\n {for(i=1;i<=c-1;i++)\n o=o*10;\n if(a/o==a%10)\n return 1;\n else\n return 0;}\n else\n {for(i=1;i<=b-1;i++)\n x=x*10;\n for(i=1;i<=c-b;i++)\n y=y*10;\n if((a/y)%10==(a/x)%10)\n if(judge(a,b-1,c))\n return 1;\n else \n return 0;\n else\n return 0;}\n}"} +{"label": "74", "index": "36763", "code": "void main()\n{\nint m,n,p,q,c,i,k,a[20],f,b[10];\nk=0;\nscanf(\"%d %d\",&m,&n);\nfor(c=m;c>=m&&c<=n;c++)\n{for(i=2;i<=c/2;i++)\nif(c%i==0)\nbreak;\nif(i==c/2+1)\n{f=c;\nfor(p=0;f>0;p++)\n{b[p]=f-10*(f/10);f=f/10;}\np=p-1;\nfor(q=0;q<=p;q++)\nif(b[q]!=b[p-q])break;\nif(q==p+1)\n{a[k]=c;\nk=k+1;}\n}\n}\nk=k-1;\nif(k<0)printf(\"no\");\nelse{\nfor(i=0;i<=k-1;i++)\nprintf(\"%d,\",a[i]);\nprintf(\"%d\",a[k]);}\n}"} +{"label": "74", "index": "36764", "code": "void main()\n{\n int m,n,i,j,p,q,r[100],s=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t p=1;\n\t\tfor(j=2;jl)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\n\nvoid main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint a=m;\n\twhile((huiwen(a)==0||sushu(a)==0)&&a<=n)\n\t\ta++;\n\tif(a>n)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",a);\n\t\tfor(a++;a<=n;a++)\n\t\t{\n\t\t\tif(huiwen(a)==1&&sushu(a)==1)\n\t\t\tprintf(\",%d\",a);\n\t\t}\n\t}\n}"} +{"label": "74", "index": "36766", "code": "int sushu(int x)\n{\n\tint i,t=0;\n\tif (x%2!=0)\n\t{\n\t\tfor (i=3;i<=sqrt(x);i=i+2)\n\t\t\tif (x%i==0)\n\t\t\t\tbreak;\n\t\tif (i>sqrt(x))\n\t\t\treturn(1);\n\t\telse return(0);\n\t}\n\telse return(0);\n}\nint huiwen(int x)\n{\n\tint n=0,m=x;\n\twhile(m!=0)\n\t{\n\t\tn=n*10+m%10;\n\t\tm=m/10;\n\t}\n\tif (n==x)\n\t\treturn(1);\n\telse return(0);\n}\nvoid main()\n{\n\tint m,n,i,t=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t\tif (sushu(i)&&huiwen(i)&&t==0)\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tt=1;\n\t\t}\n\t\telse if (sushu(i)&&huiwen(i))\n\t\t\tprintf(\",%d\",i);\n\tif (t==0)\n\t\tprintf(\"no\");\n\tprintf(\"\\n\");\n}\n"} +{"label": "74", "index": "36767", "code": "int sushu(int k)\n{ int i,t=1;\n for(i=2;i0;i++)\n{a[i]=y%10;\ny=y/10;}\nfor(j=0;j<=(i-1)/2;j++)\n if(a[j]!=a[i-1-j])\n {\n flag=1;\n break;}\nreturn(flag);\n}"} +{"label": "74", "index": "36769", "code": "int s(int a)\n{\nint i,k,j;\nk=sqrt(a);\nfor(i=2;i<=k;i++)\n if(a%i==0) break;\nif(i>k) j=1;\nelse j=0;\nreturn(j);\n}\nint h(int m)\n{\nint k,temp,n=0;\ntemp=m;\n while(temp>0)\n { k=temp%10;\n n=n*10+k;\n temp=temp/10;}\nif(m==n) k=1;\nelse k=0;\nreturn(k);\n}\nvoid main()\n{\nint m,n,x,a[305],i=0,j;\nscanf(\"%d %d\",&m,&n);\nfor(x=m;x<=n;x++)\n {if(s(x)==1&&h(x)==1) {a[i]=x;i++;}\n else continue;}\nif(i==0) printf(\"no\");\nelse \n {printf(\"%d\",a[0]);\n for(j=1;j=0;i++)\n\t\t{\n\t\t\tk=10*k;\n\t\t}\n\t\tc=m,d=m,e=1;\n\t\tdo\n\t\t{\n\t\t\ta=c%10;\n\t\t\tc=(c-a)/10;\n\t\t\tk=k/10;\n\t\t\tb=d/k;\n\t\t\td=d-b*k;\n\t\t\te++;\n\t\t\tif(e==i){\n\t\t\t\th=m;\n\t\t\t\tfor(t=2;t1;t++)\n\t\t\t\t\t{\n\t\t\t\t\tif(h%t==0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse if(t==h-1)\n\t\t\t\t\t\tprintf(\",%d\",h);\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(a==b&&e=k+1) \n\t\t\t{\n\t\t\t\tt=m;\n\n\t for(i=0;;i++)\n\t\t{\n\t\tif(t!=0)\n\t\t{\n\t\t\ta[i]=t%10;\n\t\t\tt=t/10;\n\t\t}\n else break;\n\t\t}\n\tfor(j=0;j<=i-1;j++)\n if(a[j]!=a[i-1-j]) break;\n if(j>=i)\n\t\t{\n sum++;\n\t\t d[sum]=m;\n\t\t}\n\n\t}\n\n\n\t}\n\tif(sum==0) printf(\"no\");\n\n\telse {for(i=1;i0;k++)\n a=a/10;\n return k;}\n\n\nvoid main(){\n\n \n int m,n,i,j,k=0,b,c,v;\n\n\n scanf(\"%d %d\",&m,&n);\n\n \n\n for(i=m;i<=n;i++){\n\n b=pp(i);\n if(b){j=qq(i);\n c=ppp(i,j);}\n\n\n \n if(b*c){printf(\"%d\",i);k=1;v=i;break;}}\n\nif(k)\nfor(i=v+1;i<=n;i++){\n \n b=pp(i);\n if(b){j=qq(i);\n c=ppp(i,j);}\n\n\n \n if(b*c){printf(\",%d\",i);k=1;}}\n \n\n if(k==0)printf(\"no\");\n\n\n }\n\n"} +{"label": "74", "index": "36773", "code": "void main()\n{\n\tint m,n,i,j,k,re,num,p;\n\tint b[500];\n\tscanf(\"%d%d\",&m,&n);\n\tk=0;\n\tfor (i=m;i<=n;i++)\n\t{\n\t\tnum=i;\n\t\tre=0;\n\t\twhile (i>0)\n\t\t{\n\t\t\tp=i%10;\n\t\t\tre=re*10+p;\n\t\t\ti=i/10;\n\t\t}\n\t\ti=num;\n\t\tif (re==num)\n\t\t{\n\t\t\tfor (j=2;j<=sqrt(num);j++)\n\t\t\t{\n\t\t\t\tif (num%j==0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (j>sqrt(num))\n\t\t\t{\n\t\t\t\tb[k]=num;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tif (k==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor (i=0;i=t/2))\n\t\t\t\t\t\t\t\t\t\t\t if (r==t)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t if(time==0)\n\t\t\t\t printf(\"%d\",x);\n\t\t\t\t\t\t\t\t\t\t\t\t if(time>=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t printf(\",%d\",x);\n\t\t\t\t\t\t\t\t\t\t\t\t\t time=time+1;\n\t\t\t\t\t\t\t\t\t\t\t }//continue;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t else break;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t\t \n\t\t }\n\t\t else break;\n\t\t}\n\t}\n if(time==0)\n\t printf(\"no\");\n \nreturn 0;\n}"} +{"label": "74", "index": "36775", "code": "int main()\n{\n\tint a,b,i,j,k,t,s,n,m;\n\tscanf(\"%d %d\",&a,&b);\n\tfor(i=a;i<=b;i++)\n\t{\n\t\tn=i;s=0;\n\t\tfor(k=2;k<=(n/2);k++)\n\t\t{\n\t\t\tif(n%k==0)\n\t\t\t{s=s+1;\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(s==0)\n\t\t{\n\t\tfor(;;)\n\t\t{\n\t\t\tt=n%10;\n\t\t\ts=s*10+t;\n\t\t\tn=n/10;\n\t\t\tif(n==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(s==i)\n\t\t{printf(\"%d\",i);\n\t\tbreak;}\n\t\t}\n\t}\n\tif(i>b)\n\t\tprintf(\"no\");\n\n\t\tfor(j=i+1;j<=b;j++)\n\t{\n\t\tm=j;s=0;\n\t\tfor(k=2;k<(m/2);k++)\n\t\t{\n\t\t\tif(m%k==0)\n\t\t\t{s=s+1;\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\tif(s==0)\n\t\t\t{\n\t\tfor(;;)\n\t\t{\n\t\t\tt=m%10;\n\t\t\ts=s*10+t;\n\t\t\tm=m/10;\n\t\t\tif(m==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(s==j)\n\t\t\tprintf(\",%d\",j);\n\t\t\t}\n\t}\n \treturn 0;\n}"} +{"label": "74", "index": "36776", "code": "void main()\n{\n\tint a,b,i,j,flag1=0,flag2=0,k,n,count=0,q,s,d,w,num=0;\n\tscanf(\"%d%d\",&a,&b);\n\t\tfor(i=a;i<=b;i++)\n\t\t{\n\t\t\tfor(j=2;j<(i/2);j++)\n\t\t\t{\n\t\t\t\tif(i%j==0)\n\t\t\t\t\tflag1++;\n\t\t\t}\n\t\t\tif(flag1!=0)\n\t\t\t{flag1=0;\n\t\t\tcontinue;}\n\t\t\telse \n\t\t\t{\n\t\t\t\t\n\t\t\t\tfor(k=1;k<100;k++)\n\t\t\t\t{\n\t\t\t\t\tif(i>=pow(10,k-1)&&i0;i++){\n\t\t\tj=n%10;\n\t\t\tn/=10;\n\t\t\td=10*d+j;}\n\t\tif(d==n){\n\t\t\tp=1;}\n\t\treturn d;\n\t}\n"} +{"label": "74", "index": "36778", "code": "int huiwen(int i)\n{\n\tint z=0;\n\twhile(i)\n\t{\n\t\tz=z*10+i%10;\n\t\ti=i/10;\n\t}\n\treturn(z);\n}\nmain()\n{\n\tint i,j,k=0,flag=0,l,a,b,c[1000],t;\n\tscanf(\"%d%d\",&a,&b);\n\t\n\tfor(i=a;i<=b;i++)\n\t{\n\t\tt=1;\n\t\tfor(j=2;j<=sqrt(i);j++)\n\t\t{\n\t\t\tif(i%j==0)t=0;\n\t\t}\n\t\t\n\t\tif(t)\n\t\t{\n\t\t\tl=huiwen(i);\n\t\t\tif(l==i)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tc[k]=i;\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=k;i++)\n\t\t{\n\t\t\tif(flag)\n\t\t\t{\n\t\t\t\tprintf(\",\");\n\t\t\t}\n\t\t\tprintf(\"%d\",c[i]);\n\t\t\tflag=1;\n\t\t}\n\t}\n}\n"} +{"label": "74", "index": "36779", "code": "int main()\n{\n\tint m,n,i,j,num=0,c;\n\tint a[10000]={0},b[10000]={0},q[10000],z[10000],v[10000];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m,c=0;i<=n;i++){\n\t\tnum=0;\n\t\tfor(j=2;j0)\n {\n s[k]=tmp%10;\n k++;\n tmp=tmp/10;\n }\n \n for(j=0;jsqrt(i)-1)\n\t\t\t\t{\t\n\t\t\t\t\ta[k]=i;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(a[0]!=0)\n\t{\n\t\tprintf(\"%d\",a[0]);\n for(i=1;i0)\n {j=j*10+b;\n b=a%10;\n a=a/10;\n u=u/10;}\n if(j==q)\n {flag=0;\n for(k=2;k0)\n {j=j*10+b;\n b=a%10;\n a=a/10;\n u=u/10;}\n if(j==i)\n {flag=0;\n for(k=2;k0){\n\t m=m*10+t%10;\n\t\t t=t/10;\n\t}\nif(m==n) z=1; \nreturn z;\n}\nvoid main(){\n int m, n, i,j=0;\n\t scanf(\"%d%d\",&m,&n);\n\t for(i=m;i1) printf(\",%d\",i);\n\t\t }\n\t }\n\t if(j==0) printf(\"no\");\n}"} +{"label": "74", "index": "36791", "code": "void main()\n{\n\tint m,n,i,j,k,t,s=0,r=0,w=0,p=0,flag,sum,a[300]={0},b[300];\n\tscanf(\"%d %d\",&m,&n);\n for(i=m;i0)\n\t{\n y=(10*y+x%10);\n\t x=x/10;\n\t}\n\tif (p==y) return(1);\n\t else return(0);\n}\n\n\nvoid main()\n{\n\tlong a,b;\n\tint i,j,sum=0,s[1000]={0};\n\tscanf(\"%d%d\",&a,&b);\n\tfor (i=a;i<=b;i++)\n\t{\n\t\tif (hui(i)==1&&su(i)==1) \n\t\t{\n\t\t\tsum++;\n\t\t\ts[sum]=i;\n\t\t}\n\t}\n\tif (sum==0) printf(\"no\\n\");\n\telse \n\t{\n\t\tfor (i=1;i0)\n\t{\n s=s*10+(n%10);\n n=n/10;\n }\n if(s==temp)\n return 1;\n else\n return 0;\n}\nint sushu(int n)\n{\n int i;\n for(i=2;i=m;i--)\n{ \n\tif(hui(i)==1&&su(i)==1) break;\n}\nfor(j=m;j0)\n\t{\n\t\tc=c*10+b%10;\n\t\tb=b/10;\n\t}\n\tc=c*10+b;\n\tif(c==a) return 1;\n\telse return 0;\n}\nint main()\n{\n\tint m,n,i,count=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(prime(i)==1&&hw(i)==1)\n\t\t{\n\t\t\tcount++;\n\t\t\tif(count>1) printf(\",\");\n\t\t\tprintf(\"%d\",i);\n\t\t}\n\t}\n\tif(count==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t\tprintf(\"\\n\");\n\treturn 0;\n}"} +{"label": "74", "index": "36796", "code": "void main()\n{\n\tint m,n;\n\tint i,j,t,k,r[100]={0},tag,count=0,s=0,sub,x,min,minin,temp2,y;\n\tfloat temp;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\t\n\t\ttag=1;\n\t\ttemp=sqrt(i);\n\t\tfor(j=2;j<=temp;j++)\n\t\t{\n\t\t\tif(i%j==0)\n\t\t\t{\n\t\t\t\ttag=0;\n break;\n\t\t\t}\n\t\t}\n\t\tif(tag==1)\n\t\t{\n\t\t\t\n\t\t\tt=i;\n\t\t\tsub=0;\n\t\t\ts=0;\n\t\t\twhile(t!=0)\n\t\t\t{\n\t\t\t\tt=t/10;\n\t\t\t\tsub++;\n\t\t\t}\n\t\t\ty=i;\n\t\t\tfor(k=0;k0)\n\t{k=temp%10;\n\tn=n*10+k;temp=temp/10;\n\t}\n\tif(m==n)z=1;else z=0;\n\treturn(z);\n}\nint g(int a)\n{\n\tint z=0,i,k;\n\tk=a/2;\n\tfor(i=2;i=k)z=1;\n\t\treturn(z);\n}\n\nvoid main()\n{\n\tint m,n,s,l,i,t=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\ts=f(i);\n\t\tl=g(i);\nif((s==1)&&(l==1)&&(t==0))\n{printf(\"%d\",i);t++;}\nelse if((s==1)&&(l==1))\n{printf(\",%d\",i);t++;}\n\t}\n\tif(t==0)printf(\"no\");\n}"} +{"label": "74", "index": "36798", "code": "int p(int a);\nint t(int a,int i);\nint huiwen(int a);\nint sushu(int a);\nint p(int a)\n{\n\tint i=1;\n\twhile(a>0)\n\t{\n\t\ti*=10;\n\t\ta--;\n\t}\n\treturn i;\n}\n\nint t(int a,int i)\n{\n\tint n=log10(a);\n\treturn (a%p(i))/p(i-1);\n}\nint huiwen(int a)\n{\n\tint n=log10(a);//n+1??\n\tint i;\n\tfor(i=1;i<=(n+1)/2+1;i++)\n\t{\n\t\tif(t(a,i)!=t(a,n+2-i))\n\t\t\treturn 0; \n\t}\n\treturn 1;\n}\n\n\nint sushu(int a)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(a);i++)\n\t{\n\t\tif(a%i==0)return 0;\n\t}\n\treturn 1;\n}\n\n\nvoid main()\n{\n\tint max,min;\n\tint i,index=0;\n\tint tempa=p(2);\n\tint tempb=t(12345,4);\n\tint temp=huiwen(101);\n\tint out[100];\n\tscanf(\"%d %d\",&min,&max);\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tif(sushu(i)&&huiwen(i)){\n\t\t\tout[index]=i;\n\t\t\tindex++;\n\t\t}\n\t}\n\tif(index==0)printf(\"no\");\n\telse{\n\t\tfor(i=0;i 0)\n {\n h = h * 10 + m % 10;\n m /= 10;\n }\n return (h == n);\n}\n\nint main()\n{\n int count = 0, i, m, n;\n scanf(\"%d%d\", &m, &n);\n for (i=m; i<=n; i++)\n {\n if (isprime(i) && ishuiwen(i))\n {\n count++;\n if (count == 1)\n printf(\"%d\", i);\n else\n printf(\",%d\",i);\n }\n }\n if (count == 0)\n printf(\"no\");\n return 0;\n}\n\n\n"} +{"label": "74", "index": "36800", "code": "int isreverse(int num)\n{\n\tint num_r=0;\n\tint __num=num;\n\twhile (num!=0)\n\t{\n\t\tnum_r=num_r*10+num%10;\n\t\tnum/=10;\n\t}\n\tif (num_r==__num)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nvoid getprime(int prime[])\n{\n\tprime[0]=0;\n\tprime[1]=0;\n\tint i, j;\n\tfor (i=2; in) printf(\"no\");\n\tfor(j=i+2;j<=n;j=j+2)\n\t\tif(prime(j)!=0&&huiwen(j)!=0)\n\t\tprintf(\",%d\",j);\n}"} +{"label": "74", "index": "36802", "code": "main()\n{\n\tint h=0,i,j,k,l,m,n,x,y,z[10000]={0};\n\tscanf(\"%d %d\",&x,&y);\n\tfor(k=x;k<=y;k++)\n\t{\n\t\tfor(j=2;j<=sqrt(k);j++)\n\t\t\tif(k%j==0)\n\t\t\t\tbreak;\n\t\t\tif(j>sqrt(k))\n\t\t\t{\n\t\t\t\tn=log10(k)+1;\n\t\t\t\tm=0;\n\t\t\t\tl=k;\n\t\t\t\tfor(i=0;i<=n-1;i++)\n\t\t\t\t{\n\t\t\t\t\tz[i]=l/pow(10,n-1-i);\n\t\t\t\t\tl=l-z[i]*pow(10,n-1-i);\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<=n-1;i++)\n\t\t\t\t\tif(z[i]==z[n-1-i])\n\t\t\t\t\t\tm++;\n\t\t\t\t\tif(m==n)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h)\n\t\t\t\t\t\t\tprintf(\",\");\n\t\t\t\t\t\tprintf(\"%d\",k);\n\t\t\t\t\t\th++;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n\tif(h==0)\n\t\tprintf(\"no\");\n\tprintf(\"\\n\");\n}"} +{"label": "74", "index": "36803", "code": "int prime(int x)\n{ int flag=0;\nif(x==1)\nreturn(1);\nelse if(x==2||x==3)\n\t\treturn(0);\n\telse\n\t{\n\t\tfor(int i=2;i>n>>m;\n\tfor(i=n;i<=m;i++)\n\t{ int a[10],count=0,flag=0,l;\n\tl=i;\n\twhile(l>0)\n\t{\n a[count++]=l%10;\n\t l=l/10;\n\t }\n\tfor(j=0;ja)\n\t{\n\tfor(p=a;p=1;q++,r++)\n\t{\n\t\t*q=t%10;\n\t\tt=t/10;\n\t}\n\tq=b;\n\tfor(rev=0;qk) return 1;\n\telse return 0;\n\t\n}\n"} +{"label": "74", "index": "36805", "code": "int huiwen(int a)\n{\n\tint b=0,t;\n\tt=a;\n\twhile(a!=0)\n\t{\n\t\tb=b*10+a%10;\n\t\ta/=10;\n\t}\n\tif(t==b) return(1);\n\telse return(0);\n}\nint sushu(int a)\n{\n\tint i;\n\tif(a==2) return(1);\n\tfor(i=2;i0)\n\t{\n\t\tn=n+1;\n\t\ta=a/10;\n\t}\n\treturn n;\n}\nint nixu(int a,int n)\n{\n\tint z,m,i;\n\tif(a<10) z=a;\n\telse \n\t{\n m=a%10;\n\t for(i=1;i<=n;i++)\n\t\t m=m*10;\n\t z=m+nixu(a/10,n-1);\n\t}\n\treturn z;\n}\nint huiwen(int a)\n{\n int z,m;\n\tm=nixu(a,lenth(a));\n\tif(m==a) z=1;\n\telse z=0;\n\treturn z;\n}\nint sushu(int a)\n{\n\tint i,z;\n\tfor(i=2;ib)\n\t{\n\t\tfor(i=b;i<=a;i++)\n\t\t\tif(huiwen(i)&&sushu(i)) {s=s+1;printf(\"%d\",i);break;}\n\n\t\tfor(i=i+1;i<=a;i++)\n if(huiwen(i)&&sushu(i)) {s=s+1;printf(\",%d\",i);}\n\t\tif(s==0) printf(\"no\");\n\t}\n\telse\n\t{\n\t\tfor(i=a;i<=b;i++)\n\t\t\tif(huiwen(i)&&sushu(i)) {s=s+1;printf(\"%d\",i);break;}\n\t\tfor(i=i+1;i<=b;i++)\n if(huiwen(i)&&sushu(i)) {s=s+1;printf(\",%d\",i);}\n\t\tif(s==0) printf(\"no\");\n\t}\n}"} +{"label": "74", "index": "36808", "code": "void main()\n{\n\tint m,n,i,temp,j,k=0,x=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\ttemp=i;\n\t\tk=0;\n\t\twhile(temp!=0)\n\t\t{ j=temp%10;\n\t\t k=k*10+j;\n\t\t temp=temp/10;\n\t\t}\n\t\tif(k==i)\n\t\t{\t\n\t\t j=2; \n\t\t\twhile(j=i) \n\t\t\t{ \n\t\t\t\tif(x==0) printf(\"%d\",i);\n\t\t\t\telse printf(\",%d\",i);\t\t\t\n\t\t\t x++; \n\t\t\t}\t\t\t \n\t\t}\n\t}\n\tif(x==0) printf(\"no\");\n}\n"} +{"label": "74", "index": "36809", "code": "/*?????? \n \n?? ??-From Whf \n?? \n??????? m ?n ??????????????????m ? n?????m ???n??????????????????????????? no (??????????????????123321?121)?\n \n???? \nm ? n ?1??????1??????\n \n???? \n?????????????????????????? no\n \n???? \n100 200\n \n???? \n101,131,151,181,191\n \n\n*/\nint prime(int x);\nint huiwen(int x);\n\n\n\nvoid main()\n{\n\tint i,m,n,num=0,str[1000];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif((prime(i)*huiwen(i))!=0)\n\t\t{\n\t\t\tstr[num]=i;\n\t\t\tnum++;\n\t\t}\n\t}\n\tstr[num]='\\0';\n\tif(num==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d\",str[0]);\n\t\tfor(i=1;i<=num-1;i++)\n\t\t\tprintf(\",%d\",str[i]);\n\t}\n}\nint prime(int x)\n{\n\tint i;\n\tfor(i=2;i<=x;i++)\n\t{\n\t\tif(x%i==0)\n\t\t\tbreak;\n\t}\n\tif(i==x)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\nint huiwen(int x)\n{\n\tint c,d;\n\td=x;\n\tc=x%10;\n\twhile(x)\n\t{\n\t\tx=x/10;\n\t\tc=c*10+x%10;\n\t}\n\tc=c/10;\n\tif(c==d)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\n"} +{"label": "74", "index": "36810", "code": "int huiwen(int m,int n)\n{\n\tif(m==0)return (n);\n\telse return(huiwen(m/10,n*10+m%10));\n}\nint sushu(int n)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(n);i++)\n\t\tif(n%i==0)break;\n\tif(i>sqrt(n))return (1);\n\telse return (0);\n}\nint main()\n{\n\tint m,n,i,j;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m,j=0;i<=n;i++)\n\t{if(i==huiwen(i,0)&& sushu(i)) \n\t{j++;if(j>1)printf(\",%d\",i);\n\t else if(j==1)printf(\"%d\",i);\n\t}\n\t}\n\tif(j==0)printf(\"no\");\n\treturn (0);\n}\n"} +{"label": "74", "index": "36811", "code": "void main()\n{int m,n;\n int t[100]={0};\n\n int i;\n int j=0;\n int ifhw(int num);\n int ifs(int num);\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n { if (ifhw(i))\n\t if (ifs(i))\n\t {t[j]=i;\n\t j++;}}\n\n j--;\n if(t[0]==0)\n printf(\"no\");\n else\n {for(i=0;i0)\n {digit[i]=num-num/10*10;\n i++;\n num=num/10;}\n n=i;\n for(i=0;i=10000)\n\t\t{v=a[l]/10000,w=a[l]/1000-v*10,x=a[l]/100-v*100-w*10,z=a[l]%10,y=a[l]/10-v*1000-w*100-x*10;\n\t\t\tif(v==z&&w==y)\n\t\t\t{b[o]=a[l];\n\t\t\to=o++;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (o==0)printf(\"no\");\n\telse \n\t{\n\t\tfor(p=0;p=10;j++)\n\t\t\t{\n\t\t\t\ta[j]=p%10;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\ta[j]=p;\n\t\t\tfor (k=0;k<=j;k++)\n\t\t\t{\n\t\t\t\tif (a[k]!=a[j-k])\n\t\t\t\t{\n\t\t\t\t\ttemp2=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (temp2==0)\n\t\t\t{\n\t\t\t\tb[l]=i;\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\ttemp1=0;\n\t\ttemp2=0;\n\t}\n\tif (l==0)\n\t\tprintf(\"no\");\n\telse\n\t{\n\tfor (i=0;i0)\n\t\t{ c=c*10+temp%10;\n\t\t temp=temp/10;}\n\t\t\tif (a==c)\n\t\t\treturn (1);\n\t\telse\n\t\t\treturn(0);\n\t}\n\tint sushu(int t)\n\t{ int i;\n\t for (i=2;i<=sqrt(t);i++)\n\t\t if (t%i==0)\n\t\t\t break;\n\t\t if (i>sqrt(t))\n\t\t\t return(1);\n\t\t else\n\t\t\t return(0);\n\t}\n\t\t"} +{"label": "74", "index": "36815", "code": "int my(int n)\n{\n\tint i,l,a[100]={0},b[100]={0},t=1;\n\tl=(int)log10(n)+1;\n\tfor(i=1;i<=l;i++)\n\t{\n\t\ta[i]=n%10;\n\t\tn=(n-a[i])/10;\n\t}\n\tfor(i=1;i<=l;i++)\n\t{\n\t\tb[i]=a[l-i+1];\n\t}\n\tfor(i=1;i<=l;i++)\n\t{\n\t\tif(a[i]!=b[i])\n\t\t{\n\t\t\tt=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn t;\n}\nint su(int n)\n{\n\tint i,t=1;\n\tfor(i=2;ik)\n\t\t{\tx=i;\n\t\t z=i;\n\t\t\ty=0;\n\t\t do{ x=z%10;\n\t\t\t\tz=z/10;\n\t\t\t\t\n\t\t\t y=10*y+x;\n\t\t\t}while(z!=0);\n\t\t\tif(y==i)\n\t\t\t{ r=r+1;\n\t\t\t if(r==1) printf(\"%d\",y);\n else printf(\",%d\",y);\n\t\t\t}\n\t\t}\n\t\telse continue;\n\t}\n\tif(r==0)\n\t\tprintf(\"no\");\n\treturn 0;\n}"} +{"label": "74", "index": "36820", "code": "\nlong int prime(long int i)\n{\n long int j,f=1;\n\tfor(j=2;j*j<=i;j++)\n\t\tif(i%j==0)\n\t\t{\n\t\t\tf=0;\n\t\t\tbreak;\n\t\t}\n\treturn f;\n\n}\n\nlong int hw(long int i)\n{\n\tint r=i,j=0;\n\tfor(;;)\n\t{\n\t\tj=j*10+i%10;\n\t\ti=i/10;\n\t\tif(i==0)\n\t\t\tbreak;\n\n\n\t}\n\tif(j==r)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\nvoid main()\n{\n\tlong int m,n,i,j;\n\tscanf(\"%ld %ld\",&m,&n);\n\n\tfor(i=m,j=0;i<=n;i++)\n\t{\n\t\tif(hw(i)==1&&prime(i)==1)\n\t\t{\n\t\t\tj++;\n\t\t\t\n\t\t\tif(j!=1)\n\t\t\t\tprintf(\",\");\n\t\t\tprintf(\"%ld\",i);\n\t\t\t\t\t\t\t\n\t\t}\n\t}\n\tif(j==0)\n\t\tprintf(\"no\\n\");\n\n\n\n}"} +{"label": "74", "index": "36821", "code": "int ss(int x)\n{int i;\nfor(i=2;i 0)\n\t{\n\t\tint a = temp % 10 ;\n\t\tb = b * 10 + a ;\n\t\ttemp = temp / 10 ;\n\t}\n\tif(i == b)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n\n}\n\nint main(int argc, char* argv[])\n{\n\tint m,n;\n\tcin >> m >> n;\n\tint count = 0;\n\tfor(int i = m ; i <= n ; i ++)\n\t{\n\t\tif(prime(i) && huiwen(i))\n\t\t{\n\t\t\tcount ++ ;\n\t\t\tif(count == 1)\n\t\t\t\tcout<i)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tr=x/10;q=0;g=i;\n\t\t\tfor(k=1;k=10)\n\t\t\t\tq1=g%10;\n\t\t\t\telse q1=g;\n\t\t\t\tq=q+r*q1;\n\t\t\t\tr=r/10;\n\t\t\t\tg=g/10;\n\n\t\t\t}\n\t\t\n\t\t\tif(q==i)\n\t\t\t{\n\t\t\t\ta[y]=i;\n\t\t\t\ty=y+1;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\t\t\n\t\t\tif(a[0]==0)\n\t\t\n\t\t\tprintf(\"no\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"%d\",a[0]);\n\t\t\tfor(i=1;i0)\n\t\t\t{ \n\t\t\t\tk=temp%10;\n\t\t\t p=p*10+k;\n\t\t\t temp=temp/10;\n\t\t\t}\n\t\t\tif(i==p)\n\t\t\t{\n\t\t\t\ta[x]=i;\n\t\t\t\tx++;\n\t\t\t}\n\t\t}\n\t}\n\tif(x==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=0;i=n/2) return 1;\nelse return 0;}\nint huiwenjud(int n){\nint i,c,a=log10(n),b[10];\nfor(i=0;i<=a;i++){\nb[i]=n/pow(10,a-i);\nn=n%((int)pow(10,a-i));\n}\nc=(a+1)/2;\nfor(i=0;i=c) return 1;\nelse return 0;\n}\nint main(){\n\tint a,b,i,j=0,num[100]={0};\n\tscanf(\"%d %d\",&a,&b);\n\tfor(i=a;i<=b;i++)\n\t\tif(primejud(i)&&huiwenjud(i))\n\t\tnum[j++]=i;\nif(j==0) printf(\"no\");\nelse{\n\t\tfor(i=0;i0)\n\t\t{\t\t\n\t\t\tc[i]=b%10;\n\t\t\tb=(b-c[i])/10;\n\t\t\ti++;\n\t\t}\n\t\tk=i;\n\t\tfor(i=0;i0)\n\t{\n\t\tfor(i=0;i0)\n {\n a[j]=i%10;\n i=i/10;\n j++;\n }\n for(int k=0;k<.....???\n\t\t\t if(x/haha==0)\n\t\t\t\t break;\n\t\t }\n\t\t t=x;//?x???t?????x?m?n??????x???????????????????~\n\t\t for(k=1;k<=r;k++)//?????????~?????????~\n\t\t {\n\t\t\t s=t%10;\n\t\t\t t=t/10;\n\t\t\t y=10*y+s;\n\t\t }\n\t\t if(x==y)\n\t\t {\n\t\t\t c=c+1 ;\n\t\t if(c==1) //????????????????????c??????~~\n\t\t\t\tprintf(\"%d\",x);\n\t\t\tif(c>1)\n\t\t\t printf(\",%d\",x);\t\n\t\t }\n\t }\n }\n if(c==0)\n\t\t printf(\"no\");\n}"} +{"label": "74", "index": "36833", "code": "void main()\n{\n\tint m,n,a[10000],i,j,k=0;\n\tint p=0,q=0,t;\n\tint b[100];\n\tb[0]=-1;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tfor(j=2;j<=i;j++)\n\t\t\tif(i%j==0)break;\n\t\tif(i==j)\n\t\t{\n\t\t\ta[k]=i;\n\t\t\tk++;\n\t\t}\n\t}\n\tfor(i=0;i0)\n\t\t{\n\t\t\tp=p*10+t%10;\n\t\t\tt/=10;\n\t\t}\n\t\tif(p==a[i])\n\t\t{\n\t\t\tb[q]=a[i];\n\t\t\tq++;\n\t\t}\n\t\tp=0;\n\t}\t\n\tif(b[0]>0)\t\n\t{\n\t\tfor(i=0;i=0,lk)\n\t\t{\n\t\t\tl=i;\n\t\t\tt=0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\ta[t]=l%10;\n\t\t\t\tt++;\n\t\t\t\tl=l/10;\n\t\t\t}\n\t\t\twhile(l>0);\n\t\t\tfor(p=0;p=t/2) \n\t\t\t{\n\t\t\t\tb[sum]=i;\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t}\n\tif(sum==0) printf(\"no\");\n\telse\n\t{\n\tfor(k=0;k0)\n\t{\n\t\tn=i%10;\n\t\tk=k*10+n;\n\t\ti=i/10;\n\t}\n\tif(k==j)\n\t\treturn(1);\n\telse\n\treturn(0);\n}\nint s(int i)\n{\n\tint j,k=0;\n\tif(i==1)\n\t\treturn(0);\n\telse\n\t{\n\t for(j=1;jk)\n return 1;\n else\n return 0;\n} \nint checka(int b)\n{\n int i,j,c[100];\n for(i=0;b!=0;i++)\n {\n c[i]=b%10;\n b=b/10;\n }\n for(j=0;j<=i/2;j++)\n {\n if(c[j]!=c[i-1-j])\n break;\n \n }\n if(j-1==i/2)\n return 1;\n else\n return 0;\n}\nint main()\n{\n int m,n,i,j,s=0;\n scanf(\"%d %d\",&m,&n);\n \n for(i=m;i<=n;i++)\n {\n if((check(i)==1)&&(checka(i)==1))\n {printf(\"%d\",i);\n s++;\n break;}\n }\n for(j=i+1;j<=n;j++)\n {if((check(j)==1)&&(checka(j)==1))\n {printf(\",%d\",j);\n s++;}\n}\nif(s==0)\n{printf(\"no\");}\n getchar();\n getchar();\n}\n"} +{"label": "74", "index": "36844", "code": "int power(int n,int k){\n\tint i;\n\tint answer=1;\n\tfor(i=1;i<=k;i++){\n\t\tanswer=answer*n;\n\t}\n\treturn answer;\n}\nchar str[100];\nint checkhui(int number){\n\tint s=log10(number);\n\tint i;\n\tint a[1000];\n\tint check=1;\n\tfor(i=0;i<=s;i++){\n\t\ta[i]=number/power(10,s-i);\n\t\tnumber=number-a[i]*power(10,s-i);\n\t}\n\tint j;\n\tfor(j=0;j<=s/2;j++){\n\t\tif (a[j]==a[s-j]){\n\t\t\tcontinue;\n\t\t}\n\t\telse{\n\t\t\tcheck=0;\n\t\t\tbreak;\n\t\t}\n\t}\t\n\treturn check;\n}\n\nint checksu(int number){\n\tint j;\n\tint check=1;\n\tif (number==2) return check;\n\tfor(j=2;j<=number-1;j++){\n\t\tif (number%j==0){return 0;break;}\n\t}\n\treturn check;\n}\nint main(){\n\tint small,big;\n\tscanf(\"%d\",&small);\n\tscanf(\"%d\",&big);\n\tint i;\n\tint status=0;\n\tfor(i=small;i<=big;i++){\n\t\tif ((checkhui(i)==1)&&(checksu(i)==1)) {printf(\"%d\",i);\n\t\tstatus=1;\n\t\tbreak;\n\t\t}\n\t}\n\tfor(++i;i<=big;i++){\n\t\tif ((checkhui(i)==1)&&(checksu(i)==1)) printf(\",%d\",i);\n\t}\n\t\nif (status==0) printf(\"no\");\n\n\n\treturn 0;\n}\n\t\n"} +{"label": "74", "index": "36845", "code": "void main()\n{\n\tint a,b,c,d,temp,k,i,flag=0;\n\tscanf(\"%d %d\",&a,&b);\n\tfor(;a<=b;a++)\n\t{\n\t\ttemp=a;d=0;\n\t\twhile(temp>0)\n\t\t{\n\t\t\tc=temp%10;\n\t\t\td=d*10+c;\n\t\t\ttemp=temp/10;\n\t\t}\n\t\tif(d==a)\n\t\t{\n\t\t\tk=sqrt(d);\n\t\t\tfor(i=2;i<=k;i++)\n\t\t\t{\n\t\t\t\tif(d%i==0)\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(i>=k+1)\n\t\t\t{\n\t\t\t\tflag=flag+1;\n\t\t\t\tif(flag==1)\n\t\t\t\t\tprintf(\"%d\",d);\n\t\t\t\telse\n\t\t\t\t\tprintf(\",%d\",d);\n\t\t\t}\n\t\t}\n\t}\n\tif(flag==0)\n\t\tprintf(\"no\");\n}\n"} +{"label": "74", "index": "36846", "code": "int run(int n)\n{\n int i=0,j=0;\n\tif(n==1)\n\t\treturn -1;\n\tfor(i=2;i<=sqrt(n);i++)\n\t{\n if(n%i==0)\n\t\t\treturn -1;\n\t}\n\treturn 1;\n}\nint trans(int n)\n{\n\tint result=0;\n\twhile(n>=1)\n\t{\n\t\tresult=result*10+n%10;\n\t\tn=n/10;\n\t}\n\treturn result;\n}\nint main()\n{\n\tint m,n,i,k=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(run(i)==1&&trans(i)==i)\n\t\t{\t\n\t\t\tk++;\n\t\t\tif(k==1)\n\t\t\t printf(\"%d\",i);\n\t\t\telse\n\t\t\t\tprintf(\",%d\",i);\n\t\t}\n\t}\n\tif(k==0)\n\t\tprintf(\"no\");\n\treturn 0;\n}"} +{"label": "74", "index": "36847", "code": "int zhi(int i);\nint hw(int i);\nvoid main(void)\n{\n\tint m, n, a[100];\n\tscanf(\"%d%d\",&m, &n );\n\tint i, j = 0;\n\tfor(i = m;i <= n;i ++)\n\t{\t\n\t\tif(zhi(i) == 1 && hw(i) == i)\n\t\t{\ta[j] = i;\n\t\t\tj ++;\n\t\t}\n\t}\n\tif(j == 0)\n\t\tprintf(\"no\");\n\telse\n\t{\tfor(i = 0;i < j - 1;i ++)\n\t\t\tprintf(\"%d,\",a[i]);\n\t\tprintf(\"%d\",a[j - 1]);\n\t}\n}\n\nint zhi(int i)\n{\n\tint k;\n\tif(i == 1)\n\t\treturn 0;\n\tif(i == 2)\n\t\treturn 1;\n\tfor(k = 2;k < i;k ++)\n\t{\n\t\tif(i % k == 0)\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nint hw(int i)\n{\n\tint k = 0;\n\twhile(i > 0)\n\t{\n\t\tk = k * 10 + i % 10;\n\t\ti = i / 10;\n\t}\n\treturn k;\n}"} +{"label": "74", "index": "36848", "code": "\nint num(int x)\n{\n\tint i;\n\tfor (i=2;i(x-1)/2)\n\t\treturn(1);\n}\n\nint hws(int y)\n{\n\tint z=0;\n\twhile(y>0)\n\t{\n\t\tz=z*10+(y-(y/10)*10);\n\t\ty=y/10;\n\t}\n\treturn(z);\n}"} +{"label": "74", "index": "36850", "code": "//??,????????,???!\n\n\nmain()\n{\n int m,n,c,b,x,p,q,u,shuliang=0;\n int dayin;\n scanf(\"%d %d\",&m,&n);\n for(int i=m;i<=n;i++)\n {\n float o;\n o=(float)i;\n c=(int)sqrt(o);\n int d=0,e=1;\n for(int k=2;k<=c;k++)//??????? \n {\n if(i%k==0)\n d++;\n }\n \n \n if(d==0)\n { \n e=0; \n x=1;\n dayin=i;\n for(;dayin!=0;)\n {\n e++;\n dayin=dayin/10;\n }\n \n \n if(e%2==0)\n {\n for(int l=1;l<=e/2;l++)\n {\n x=x*10;\n }\n p=i%x;\n q=i/x;\n \n int g[e/2+1],h[e/2+1],u=1;\n for(int l=1;l<=(e-1)/2;l++)\n g[l]=0;\n for(int l=1;l<=e/2;l++)\n { \n u=u*10; \n g[l]=p%u;\n h[l]=q%u;\n }\n \n b=0;\n for(int l=1;l<=e/2;l++)\n {\n if(g[l]!=h[e/2+1-l])\n b++;\n }\n }\n \n \n if(e%2!=0)\n {\n for(int l=1;l<=(e-1)/2;l++)\n {\n x=x*10;\n }\n p=i%x;\n q=i/(x*10);\n \n int g[100],h[100];\n for(int l=1;l<=(e-1)/2;l++)\n g[l]=0;\n \n u=10;\n \n for(int l=1;l<=(e-1)/2;l++)\n {\n \n g[l]=p%u;\n p=p/10;\n h[l]=q%u;\n q=q/10;\n }\n b=0;\n \n for(int l=1;l<=(e-1)/2;l++)\n {\n if(g[l]!=h[((e-1)/2-l+1)])\n b++;\n }\n }\n \n \n \n if(b==0)\n {\n shuliang++;\n if(shuliang==1) \n printf(\"%d\",i);\n else\n printf(\",%d\",i);\n } \n \n \n }\n }\n if(shuliang==0)\n {\n printf(\"no\");\n } \n getchar();getchar();\n\n}\n"} +{"label": "74", "index": "36851", "code": "void main()\n{\n\tlong b=0,i,j,l,n,k,x=0,y,z=0;\n\tdouble m;\n\tscanf(\"%ld%ld\",&k,&n);\n\tl=0;\n\tfor(i=k;i<=n;i++)\n\t{\n\t\tif(i%2==0)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tm=sqrt(i);\n\t\tfor(j=3;j<=m;j+=2)\n\t\t{\n\t\t\tif(i%j==0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(j>m&&i<=n)\n\t\t{\n\t\t\ty=i;\n\t\t\tx=0;\n\t\t\tfor(l=1;;l++)\n\t\t\t{\n\t\t\t\tx=x*10+y-10*(y/10);\n\t\t\t\ty=y/10;\n\t\t\t\tif(y==0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x==i&&z==0)\n\t\t\t{\n\t\t\t\tz=z+1;\n\t\t\t\tprintf(\"%ld\",i);\n\t\t\t\tb=b+1;\n\t\t\t}\n\t\t\telse if(x==i&&z!=0)\n\t\t\t{\n\t\t\t\tprintf(\",%ld\",i);\n\t\t\t\tb=b+1;\n\t\t\t}\n\t\t\tx=0;\n\t\t}\n\t}\n\tif(b==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n}"} +{"label": "74", "index": "36852", "code": "int hui(int n);\nint sushu(int n);\nint main()\n{\n int m,n,i;\n int first=1,flag=1;\n scanf(\"%d %d\",&m,&n);\n for(i=m;i<=n;i++)\n {\n if(hui(i)&&sushu(i))\n {\n if(first)\n {\n printf(\"%d\",i);\n first=0;\n }\n else\n printf(\",%d\",i);\n flag=0;\n }\n }\n if(flag)\n printf(\"no\");\n return 0;\n}\nint hui(int n)\n{\n int temp,s=0;\n temp=n;\n while(n!=0)\n {\n s*=10;\n s+=n%10;\n n/=10;\n }\n if(s==temp)\n return 1;\n else \n return 0;\n}\nint sushu(int n)\n{\n int i;\n for(i=2;i=k+1)\n {\n n=f(m); \n if(n==m) {printf(\"%d\",m);break;}\n } \n }\n for(b=m+1;b<=q;b++)\n {\n k=sqrt(b);\n for(i=2;i<=k;i++)\n if(b%i==0) break;\n if(i>=k+1)\n {\n n=f(b); \n if(n==b) printf(\",%d\",b);\n } \n }\n for(m=p;m<=q;m++)\n {\n k=sqrt(m);\n for(i=2;i<=k;i++)\n if(m%i==0) break;\n if(i>=k+1)\n {\n n=f(m); \n if(n==m) a++;\n } \n }\n if(a==0) printf(\"no\");\n}"} +{"label": "74", "index": "36854", "code": "void main(){\nint m,n;\nscanf(\"%d %d\",&m,&n);\nif(m==100&&n==200)\nprintf(\"101,131,151,181,191\");\nif(m==700&&n==1000)\nprintf(\"727,757,787,797,919,929\");\nif(m==10593&&n==10700)\nprintf(\"10601\");\nif(m==10500&&n==10610)\nprintf(\"10501,10601\");\nif(m==150&&n==360)\nprintf(\"151,181,191,313,353\");\nif(m==12000&&n==15000)\nprintf(\"12421,12721,12821,13331,13831,13931,14341,14741\");\nif(m==800&&n==12421)\nprintf(\"919,929,10301,10501,10601,11311,11411,12421\");\nif(m==787)\nprintf(\"787,797,919,929,10301,10501,10601\");\nif(m==1000&&n==10000)\nprintf(\"no\");\nif(m==500)\nprintf(\"no\");\nif(m==10400)\nprintf(\"10501,10601,11311,11411\");\nif(m==11311)\nprintf(\"11311\");\nif(m!=100&&m!=700&&m!=10593&&m!=10500&&m!=150&&m!=12000&&m!=800&&m!=787&&m!=1000&&m!=500&&m!=10400&&m!=11311)\n printf(\"100\");\n}\n\n"} +{"label": "74", "index": "36855", "code": "int p(int n)\n{\n\tint i,flag=0;\n\tfor(i=2;i<=sqrt(n);i++)\n\t{\n\t\tif(n%i==0)\n\t\t{\n\t\t\tflag=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn flag;\n}\nint rever(int n)\n{\n\tint i=0,a[30],m,flag=0;\n\twhile(n>9)\n\t{\n\t\ta[i]=n%10;\n\t\tn=(n-a[i])/10;\n\t\ti++;\n\t}\n\ta[i]=n;\n\tm=i+1;\n\tfor(i=0;i0;t++)\n\t{\n\t\tdata[t]=y%10;\n\t\ty=y/10;\n\t}\n\tl=t;\n\tfor(t=0;t=4)\n\t{\n \tp=sqrt(k);\n \tfor(i=2;i<=p;i++)\n\t\tif(k%i==0)\n\t\t{\n\t\treturn 0;break;\n\t\t}\n\t\telse if(i==p)\n\t\t\treturn 1;\n\t}\n else if(k==3)\n\t\treturn 1;\n\telse return 0;\n}\n\nint g(int k)\n{\n\tint p,i,q,r;\n\tif(k>=10)\n\t{ p=length(k);\n\t \n\t for(i=1;i<=p/2;i++)\n\t { q=k/pow(10,i-1);\n\t r=(int)(k/pow(10,p-i));\n\t\tif((q%10)!=r%10)\n\t\t{return 0;\n\t\tbreak;\n\t\t}\n\t\telse if(i==p/2)\n\t\t\treturn 1;\n\t }\n\t }\n\telse if(k>1)\n\t\treturn 1;\n\telse return 0;\n}\n\nint length(int k)/*?????????*/\n{\n\tint i,m=1;\n\n\tfor(i=1;;i++)\n\t\tif(k>=pow(10,i))\n\t\t\tm++;\n\t\telse break;\n\treturn m;\n}\n\n\n\n\t\t\t\t\n\n\n"} +{"label": "74", "index": "36865", "code": "int hws(int x)\n{ int a[10],b=x,i,j,s=0,k=1;\n a[0]=x%10;x=x/10;\n for(i=1;x!=0;i++)\n{ a[i]=x%10;x=x/10;\n} for(j=i-1;j>=0;j--)\n{ s=s+a[j]*k;\n k=k*10;\n} if(s-b==0) return(1);\n else return(0);\n}\nint ss(int x)\n{ int i,j,k=1;\n for(i=2;i1)\n\t\t\t\t\tprintf(\",%d\",x);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tif(p==0)\n\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36868", "code": "int s(int n)\n{\n\tint i;\n\tfor(i=2;in) return(1);\n else return(0);\n \n}\n\nint same(int k)\n{ int m=0,n;\n n=k;\n while(n>0)\n { m=m*10+n%10;\n n=n/10;}\n \n if(m==k) return(1);\n else return(0);\n\n}\n\nvoid main()\n{ int n,m,i,t=0;\n scanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n if(prime(i)&&same(i)) \n { if(t>0) printf(\",\");\n\t printf(\"%d\",i);\n\t t++;\n }\n if(t==0) printf(\"no\");\n\n}"} +{"label": "74", "index": "36871", "code": "int su (int n)\n{\n\tint i,p=0;\n\tfor (i=2;i0)\n\t{ \n\t\tk=temp%10;\n\t\tn=n*10+k;\n\t\ttemp=temp/10;\n\t}\n\tif(n==i)\n\t\treturn(0);\n\telse \n\t\treturn(1);\n}\nint zhishu(int i)\n{\n\tint j,s=0;\n\tif(i==2 || i==3) return(0);\n\tfor(j=2;(j*j)<=i;j++)\n\t{\n\t\tif(i%j==0) s++;\n\t}\n\tif(s==0) return(0);\n\telse return(1);\n\n}\nvoid main()\n{\n\tint m,n;\n\tint x[100];\n\tscanf(\"%d%d\",&m,&n);\n\tint i,k=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(huiwen(i)==0 && zhishu(i)==0)\n\t\t{\n\t\t\tx[k]=i;\n\t\t\tk++;\n\t\t}\n\t}\n\tif(k==0) printf(\"no\\n\");\n\telse\n\t\tfor(i=0;i=10){\n\t\ta[i]=s%10;\n\t\ts=(s-a[i])/10;\n\t\ti++;\n\t}\n\ta[i]=s;\n\tn=i+1;\n\tfor(i=0;i<=n-1;i++){\n\t\ts1=s1+xp(i)*a[i];\n\t\ts2=s2+xp(n-1-i)*a[i];\n\t}\n\tif(s1==s2){\n\t\treturn(s1);\n\t}else return -1;\n}\nint main(){\n\tint m,n,i,yn=1,k,a[1000],counter=0;\n\t\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++){\n\t\tyn=1;\t\t\t\t\t\t\t\t\t//yn?????i?????????????1?\n\t\tfor(k=2;k<=i-1;k++){\n\t\t\tif(i%k==0){\t\t\t\t\t\t\t//?i??k?????yn??0???i?????\n\t\t\t\tyn=0;\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t\t\t\t//??for???????yn=1,????i??????\n\t\tif(yn==1){\t\t\t\t\t\t\t\t//????i???????????\n\t\t\tif(circle(i)!=-1){\n\t\t\t\tcounter=counter+1;\n\t\t\t\ta[counter]=circle(i);\t\t\t//???????????a[]??\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t\t\n\t}\n\t//???????\n\t//?????????????????????a1,a2,...,an)?????????????\n\t//??????n-1????????????????????????????????~\n\tif(counter!=0){\n\t\tfor(i=1;i<=counter-1;i++){\n\t\t\tprintf(\"%d,\",a[i]);\n\t\t}\n\t\tprintf(\"%d\",a[counter]);\n\t}else\tprintf(\"no\");\n\t\n\treturn 0;\n}\n\n//?????????????????????????????????????"} +{"label": "74", "index": "36874", "code": "int judge1(int n)\n{\n\tint i,u=1;\n\tfor(i=2;i=0;i--)\n\t{\n\t\ts[i]=t%10+'0';\n\t\tt=t/10;\n\t}\n\tfor(i=0;ik)z=0;\n\treturn z;\n}\n\nint hui(long int m)\n{\n\tlong int a[200];\n\tlong int n,num,t=0,k,r;\n\tnum=log10(m);\n\tfor(n=0,k=num;n<=num;n++)\n\t{\n\t\tr=pow(10,k);\n\t\ta[n]=m/r;\n\t\tm=m-a[n]*r;\n\t\tk--;\n\t}\n\tfor(n=0;n<=num/2;n++)\n\t\tif(a[n]!=a[num-n]){t=1;break;}\n\treturn t;\n}"} +{"label": "74", "index": "36876", "code": "int y=0;\nint anti(int x)\n{\n\ty=10*y+x%10;\n\tx=x/10;\n\tif(x!=0)\n\t\tanti(x);\n\treturn(y);\n}\nint su(int n)\n{\n\tint i,a=1;\n\tfor(i=2;i<=sqrt(n);i++)\n\t{\n\t\tif(n%i==0)\n\t\t\ta=0;\n\t}\n\treturn a;\n}\nvoid main()\n{\n\tint x1,x2,m,n=0,a,i,j=0;\n\tscanf(\"%d%d\",&x1,&x2);\n\tfor(i=x1;i<=x2;i++)\n\t{\n\t\tm=anti(i);\n\t\ty=0;\n\t\ta=su(i);\n\t\tif(m==i&&a==1)\n\t\t{\n\t\t\tj++;\n\t\t\tif(j==1)\n\t\t\t\tprintf(\"%d\",i);\n\t\t\telse\n\t\t\t\tprintf(\",%d\",i);\n\t\t}\n\t\telse\n\t\t\tn++;\n\t}\n\tif(n-1==x2-x1)\n\t\tprintf(\"no\");\t\n}\n\n\t\t\t\n"} +{"label": "74", "index": "36877", "code": "int m,n;\nint huiwen(int x,int y)\n{\n\tif(x==0)\n\t\treturn y;\n\telse\n\t{\n\t\ty=y*10+x%10;\n\t\treturn huiwen(x/10,y);\n\t}\n}\nint zhishu(int k)\n{\n\tint z;\n\tfor(z=2;z<=sqrt(k);z++)\n\t{\n\t\tif(k%z==0)\n\t\t\tbreak;\n\t}\n\tif(z>sqrt(k))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nvoid main()\n{\n\tint m,n,i,c=0,t=0,a;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tt=huiwen(i,0);\n\t\tif(t==i)\n\t\t{\n\t\t\ta=zhishu(i);\n\t\t\tif(a==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t\tif(c==1)\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\telse\n\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t}\n\t\t}\n\t}\n\tif(c==0)\n\t\tprintf(\"no\");\n\tprintf(\"\\n\");\n}\n"} +{"label": "74", "index": "36878", "code": "long int m,n;\nint a[1000001];\nlong int i,j;\nint flag;\nint check(long int i)\n{\n\tint s[100];\n\tlong int m,flag,t;\n\tm=i; \n\tt=0;\n\twhile (m>0)\n\t{\n\t\tt++;\n\t\ts[t]=m%10;\n\t\tm=m/10;\n\t}\n\tflag=0;\n\tfor(m=1;m<=t/2;m++) if (s[m]!=s[t-m+1]) \n\t{\n\t\tflag=1;\n\t\treturn(0);\n\t\tbreak;\n\t}\n\tif (flag==0) return(1);\n}\nmain()\n{\n\tfor(i=1;i<=1000000;i++) a[i]=1;\n\ta[1]=0;\n\tfor(i=2;i<=1000000;i++) if (a[i]==1)\n\t\tfor(j=2;j<=1000000/i;j++) a[i*j]=0;\n\tscanf(\"%ld %ld\",&m,&n);\n\tflag=0;\n\tfor(i=m;i<=n;i++) if ((a[i]!=0)&&check(i)) \n\t{\n\t\tif (flag==0) printf(\"%ld\",i);\n\t\telse printf(\",%ld\",i);\n\t\tflag=1;\n\t}\n\tif (flag==0) printf(\"no\");\n\tprintf(\"\\n\");\n}\t\n"} +{"label": "74", "index": "36879", "code": "\nint zhishu(int x) \n{ \nint b,j; \nb=(int)sqrt(x); \nfor(j=2;j<=b;j++) \n{ \nif(x%j==0)break; \n} \nif(j!=(b+1))return(0); \nelse return(1); \n}\n\nint nixu(int x,int z)\n{\n\tif(x==0)return z;\n\telse return nixu(x/10,z*10+x%10);\n}\n\nint huiwen(int x)\n{\n\tif(x==nixu(x,0))return 1;\n\telse return 0;\n}\n\nvoid main ()\n{\n\tint m,n,i,count=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)if(zhishu(i)&&huiwen(i))count=i;\n\tif(count==0)printf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=m;i<=n;i++)\n\t\t{\n\t\t\tif(zhishu(i)&&huiwen(i))\n\t\t\t{\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tif(i!=count)printf(\",\");\n\t\t\t}\n\t\t}\n\t}\n\tputchar(10);\n}\n"} +{"label": "74", "index": "36880", "code": "void main()\n{\n int i,j,m,n,a[10000],sum=0,k=0,b[10000],P,r=0,t;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tsum=0;\n\t\tP=i;\n\t\tfor(j=0;;j++)\n\t\t{\n\t\t\tt=P%10;\n\t\t\tP=P/10;\n\t\t\tsum=sum*10+t;\n\t\t\tif(P==0)\n break;\n\t\t}\n\t\tif(sum==i)\n\t\t{\n\t\t\ta[k]=i;\n\t\t\tk++;\n\t\t}\n\t\n\t}\n\t\n\n\tfor(i=0;i\nvoid main()\n{\n\tint n,i,j,k,sum=0,a[20],all=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=60)\n\t\t\tj=i;\n\t\t\tbreak;\n\t}\n\t\n\tif(i=n-1)\n\t{\n\t\t\tall=60-3*(i+1);\n\t}\n\telse\n\t{\n\t\tif(sum-3>=60)\n\t\tall=a[j]-(sum-3-60);\n\t\tif(sum-3<60)\n\t\t\t\n\t\t\t\tall=a[j];\n\t}\n\t}\n\tprintf(\"%d\",all);\n}*/\nvoid main()\n{\n\tint i,n,m,j,flag=0,temp=0,a,b,c,d,e,f,k,p,t=-1,x[19];\n\tchar s[7];\n\tscanf(\"%d %d\",&n,&m);\n\tfor(i=n;i<=m;i++)\n\t{\n\t\tfor(j=2;j0 && i/1000000==0)\n\t\t{\n\t\t\ta=i/100000;s[0]=a+48;\n\t\t\tb=(i-a*100000)/10000;s[1]=b+48;\n\t\t\tc=(i-a*100000-b*10000)/1000;s[2]=c+48;\n\t\t\td=(i-a*100000-b*10000-c*1000)/100;s[3]=d+48;\n\t\t\te=(i-a*100000-b*10000-c*1000-d*100)/10;s[4]=e+48;\n\t\t\t\tf=(i-a*100000-b*10000-c*1000-d*100-e*10);s[5]=f+48;\n\n\t\ts[6]='\\0';\n\t\t}\n\t\tif(i/10000>0 && i/100000==0)\n\t\t{\n\t\t\ta=i/10000;s[0]=a+48;\n\t\t\tb=(i-a*10000)/1000;s[1]=b+48;\n\t\t\tc=(i-a*10000-b*1000)/100;s[2]=c+48;\n\t\t\td=(i-a*10000-b*1000-c*100)/10;s[3]=d+48;\n\t\t\te=(i-a*10000-b*1000-c*100-d*10);s[4]=e+48;\n\t\ts[5]='\\0';\n\t\t\n\t\t}\n\n\t\tif(i/1000>0 && i/10000==0)\n\t\t{\n\t\t\ta=i/1000;s[0]=a+48;\n\t\t\tb=(i-a*1000)/100;s[1]=b+48;\n\t\t\tc=(i-a*1000-b*100)/10;s[2]=c+48;\n\t\t\td=(i-a*1000-b*100-c*10);s[3]=d+48;\n\t\ts[4]='\\0';\n\t\t\n\t\t}\n\t\tif(i/100>0 && i/1000==0)\n\t\t{\n\t\t\ta=i/100;s[0]=a+48;\n\t\t\tb=(i-a*100)/10;s[1]=b+48;\n\t\t\tc=(i-a*100-b*10);s[2]=c+48;\n\t\t\ts[3]='\\0';\n\t\t}\n\t\tif(i/10>0 && i/100==0)\n\t\t{\n\t\t\ta=i/10;s[0]=a+48;\n\t\t\tb=(i-a*10);s[1]=b+48;\n\t\n\t\t\ts[2]='\\0';\n\t\t}\n\t\tp=strlen(s);\n\t\tk=0;\n\t\twhile(2*k<=p && s[k]==s[p-1-k])/*????????????????????*/\n\t\t{ \n\t\t\tk=k+1;\n\t\t}\n\t\tif(2*k>=p)\n\t\t temp=1;\n\t\t else\n\t\t temp=0;\n\n\t\t if(temp==1 && flag==0)\n\t\t {\n\t\t\t t++;\n\t\t x[t]=i;\n\t\t }\n\t\t \n\t}\n\tif(t==-1)\n\t\tprintf(\"no\");\n\telse\n\t{\n\tfor(k=0;k=i/2)\n\t\t{ int a,b,c;\n\t\t a=i;\n\t\t\tb=0;\n\t\t while(a>0)\n\t\t\t{\n\t\t\t\tc=a%10;\n\t\t\t\tb=b*10+c;\n\t\t\t\ta=a/10;\n\t\t\t}\n if(i==b)\n\t\t { \n\t\t\t if(k==0)\n\t\t\t { \n\t\t\t printf(\"%d\",i);\n\t\t\t k++;\n\t\t\t } \n\t\t else\n\t\t\t {\n\t\t\t\t printf(\",%d\",i);\n\t\t\t\t k++;\n\t\t\t }\n\t\t }\n\t\t} \n\t}\n\t if(k==0) \n\t\t\t printf(\"no\\n\");\n}\n"} +{"label": "74", "index": "36883", "code": "\nint ss(long num)\n{\n long i,j,k;\n k=sqrt(num)+1;\n if (num==2) return 0;\n if (num==1) return 1;\n for (i=2;i<=k;i++)\n {\n if ((num%i)==0) return 1;\n }\n return 0;\n}\n\nint huiwen(long num)\n{\n long i,j,k,x;\n\n\tchar num2[10];\n\n\tk=1;\n\twhile (num>=10)\n\t{\n\t \n\t\tnum2[k]=num%10+48;\n\t num=num/10; k++; \n\t\n\t}\n num2[k]=num+48;\n \n\tx=k/2+1;\n\tfor (i=1;i<=x;i++)\n\t{\n\t if (num2[i]!=num2[k-i+1]) return 0;\n\t}\n\treturn 1;\n}\n\nint main()\n{\n long i,n,m,k,ans;\n\t\n\tscanf (\"%d %d\",&n,&m);\n\tk=0;\n\tfor (i=n;i<=m;i++)\n\t{\n\t ans=ss(i);\n\t if (ans==0) \n\t {\n\t if (huiwen(i)==1)\n\t\t {\n\t\t if (k==0) printf (\"%d\",i);\n\t\t else printf (\",%d\",i);\n k++;\n\t\t }\n\t }\n\t}\n\tif (k==0) printf (\"no\\n\");\n}"} +{"label": "74", "index": "36884", "code": "int sushu(int m)\n{int i,j,k=1;\nj=m/2;\nfor(i=2;i<=j;i++)\nif(m%i==0)k=0;\nif(k==1)return(1);\nelse return(0);}\nint huiwen(int m)\n{int t=0;\nwhile(m)\n{t=t*10+m%10;\nm=m/10;}\nreturn(t);}\nvoid main()\n{int m,n,i,j,t=0;\nscanf(\"%d %d\",&m,&n);\nfor(i=m;i<=n;i++)\n{if(sushu(i)&&(i==huiwen(i)))\n{if(t==0)printf(\"%d\",i);\nelse printf(\",%d\",i);\nt++;}}\nif(t==0)printf(\"no\");}"} +{"label": "74", "index": "36885", "code": "int sushu(int n)\n{ \n\t int i,a,z;\n\t\t a=sqrt(n);\n\t\t for(i=2;i<=a;i++)\n\t\t {\n\t\t if(n%i==0)\n\t\t {\n\t\t\t z=0;break; \n\t\t }\n\t\t }\n\t\tif(i>a)\n\t\t{\n\t\t\tz=1; \n\t\t}\n\t\treturn(z);\n}\nint huiwen(int n)\n{ int y,i,t,w=0,s=0;\n s=n;\n for(i=n;i>0;i=(i/10))\n\t{\n\t\tt=i%10;\n\t\tw=w*10+t;\n\t}\n\tif(w==s)\n\t{\n\t\ty=1;\n\t}\n\telse y=0;\n\treturn(y);\n}\n\n\nvoid main()\n{ \tint m,n,i,k,t,j=0,s=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{ \n\t\t k=sushu(i);\n\t\tt=huiwen(i);\n\t\tif(k==1&&t==1)\n\t\t s=s+1;\n\t}\n if(s==0)\n\t\t printf(\"no\");\n\n\n\t\tfor(i=m;i<=n;i++)\n\t{\n\t\tk=sushu(i);\n\t\tt=huiwen(i);\n\t\tif(k==1&&t==1)\n\t\t{\tprintf(\"%d\",i);break;}\n\t\t\n\t}\n for(j=i+1;j<=n;j++)\n\t{\n\t\tk=sushu(j);\n\t\tt=huiwen(j);\n\t\tif(k==1&&t==1)\n\t\t\tprintf(\",%d\",j);\n\t }\n\t \n}\n"} +{"label": "74", "index": "36886", "code": "int sushu(int k)\n{\n\tint i,t;\n\tt=1;\n\tfor(i=2;i<=k/2;i++)\n\t\tif(t==1)\n\t\t\tif(k%i==0)\n\t\t\t\tt=0;\n\treturn(t);\n}\nint hw(int k)\n{\n\tint a[10],i,len=1,ws,t=1,n;\n\tfor(i=1;!(k/len>0&&k/(len*10)==0);i++)\n\t\tlen*=10;\n\tws=i;\n\tfor(i=1;i<=ws/2&&t==1;i++)\n\t{\n\t\tn=k/len;\n\t\tif(k%10!=n)\n\t\t\tt=0;\n\t\tk=k-n*len;\n\t\tk=k/10;\n\t\tlen/=100;\n\t}\n\treturn(t);\n}\n\nvoid main()\n{\n\tint m,n,k,bg,ans[1000],j=0,i;\n\tscanf(\"%d%d\",&m,&n);\n\tif(m>=2)\n\t\tbg=m;\n\telse\n\t\tbg=2;\n\tfor(k=bg;k<=n;k++)\n\t\tif(sushu(k)&&hw(k))\n\t\t\tans[j++]=k;\n\tif(j==0)\n\t\tprintf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=0;isqrt(n))\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\n\t\t\t\nvoid main()\n{\n\tlong int m,n,i,j;\n\tscanf(\"%ld%ld\",&m,&n);\n\tint p=0;\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif((i==huiwen(i,0))&&sushu(i))\n\t\t{\n\t\t\tif(p==0)\n\t\t\t{\n\t\t\t\tprintf(\"%ld\",i);\n\t\t\t\tp++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprintf(\",%ld\",i);\n\t\t}\n\t\t\n\t}\n\tif((i==n+1)&&p==0)\n\t\t\tprintf(\"no\\n\");\n\n}\n"} +{"label": "74", "index": "36890", "code": "int main()\n{\n int huiwen[]={11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,929,10301,10501,10601,11311,11411,12421,12721,12821,13331,13831,13931,14341,14741};\n int m,n,i,count=0;\n scanf(\"%d%d\",&m,&n);\n for(i=0;i<29;i++)\n {\n if(huiwen[i]>=m&&huiwen[i]<=n)\n {count=i;break;}}\n for(i=1;i<29;i++)\n {if(count==0)\n {printf(\"no\");break;}\n if(huiwen[i]>=m&&huiwen[i]<=n&&i!=count)\n printf(\",%d\",huiwen[i]);\n if(huiwen[i]>=m&&huiwen[i]<=n&&i==count)\n printf(\"%d\",huiwen[i]);}\n getchar();\n getchar();\n }\n"} +{"label": "74", "index": "36891", "code": "void main()\n{\n\tint m,n,i,j,x,y,flag=1;\n\tchar a[7];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif (i==1) continue;\n\t\telse \n\t\t{\n\t\t\tfor(j=2;j<=sqrt(i);j++)\n\t\t\t{\n\t\t\t\tif(i%j==0) break;\n\t\t\t}\n\t\t\tif (j>sqrt(i))\n\t\t\t{\n\t\t\t\tx=(int)(log10(i)+1);\n\t\t\t\tfor(y=0;y=(x-1)/2.0)\n\t\t\t\t{\n\t\t\t\t\tif (flag==1) flag=0;\n\t\t\t\t\telse printf(\",\");\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (flag==1) printf(\"no\");\n}"} +{"label": "74", "index": "36892", "code": "\nint m,n;\n\nint zhi(int n)\n{\n\tint i,t;\n\tt=n/2;\n\tfor (i=2;i0)\n\t{\n\t\th=h*10+temp%10;\n\t\ttemp/=10;\n\t}\n\tif (n==h)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}\n\nint main()\n{\n\tint i,flag=1;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t{\n\t\tif (hui(i) && zhi(i))\n\t\t{\n\t\t\tif (flag!=1)\n\t\t\t{\n\t\t\t\tprintf(\",%d\",i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tflag=0;\n\t\t\t}\n\t\t}\n\t}\nif (flag==1)\n{\nprintf(\"no\");\n}\n//\tscanf(\"%d%d\",&m,&n);\n\treturn 0;\n}"} +{"label": "74", "index": "36893", "code": "int huiwen(int num)\n{\n\tint i,*shuwei,number,gao=0,t=1,a,z;\n\tnumber=num;\n\tfor(;;)\n\t\tif(num/10!=0)\n\t\t{\n\t\t\tgao++;\n\t\t\tnum=num/10;\n\t\t}\n\t\telse break;\n\tshuwei=(int*)calloc(gao+1,4);\n\t\tfor(i=gao+1;i>=1;i--)\n\t\t{\n\t\t\tshuwei[i-1]=number/pow(10,i-1);\n\t\t\ta=number/pow(10,i-1);\n\t\t\tnumber=number-a*pow(10,i-1);\n\t\t}\n\t\tfor(i=1;i<=gao+1;i++)\n\t\t\tif(shuwei[i-1]!=shuwei[gao+1-i])\n\t\t\t{\n\t\t\t\tt=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tif(t==1)\n\t\t\tz=1;\n\t\telse\n\t\t\tz=0;\n\t\tfree(shuwei);\n\t\treturn z;\n}\n\nint main()\n{\n\tint num,i=1,j,m,n,a[1000]={0},t[1000]={0},w=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(num=m;num<=n;num++)\n\t\tif(huiwen(num)==1)\n\t\t{\n\t\t\ta[i-1]=num;\n\t\t\ti++;\n\t\t}\n\tfor(i=1;i<=1000;i++)\n\t\tif(a[i-1]!=0)\n\t\t\tfor(j=2;jsqrt(i)&&h(i)==1)\n\t\t{\n\t\t\tif(u==0)\n\t\t\t\tprintf(\"%d\",i);\n\t\t\telse\n\t\t\t\tprintf(\",%d\",i);\n\t\t\t++u;\n\t\t}\n\t}\n\tif(u==0)\n\t\tprintf(\"no\\n\");\n}"} +{"label": "74", "index": "36897", "code": "void main()\n{ int n,m,i,u,a[1000],j=0,p,k,temp,t=0;\n scanf(\"%d%d\",&m,&n);\n for(p=m;p<=n;p++)\n\t{\n \t \n temp=p;t=0;\n while(temp>0)\n\t\t{\n\t\t\tk=temp%10;\n t=t*10+k;\n temp=temp/10;\n\t\t}\n if(p==t)\n\t\t{ u=sqrt(p);\n\t for(i=2;i<=u;i++)\n\t\t if(p%i==0)break;\n\t\t if(i>u)\n\t\t\t{ j++;a[j]=p;}\n\t\t}\n\t}\nif(j==0)printf(\"no\");\nelse {printf(\"%d\",a[1]);\nfor(i=2;i<=j;i++)\nprintf(\",%d\",a[i]);}\n\n\n \n\n \n}"} +{"label": "74", "index": "36898", "code": "int sieve[100010]={1,1,0};\nint q[1000];\nint l=0;\nint m,n;\n\nvoid init()\n{\n int i,j;\n scanf(\"%d%d\",&n,&m);\n for(i=2;i<330;i++)\n {\n if(!sieve[i])\n {\n j=i;\n while(i*j<100010)\n {\n sieve[i*j]=1;\n j++;\n }\n }\n }\n}\n\nint jud(int x)\n{\n int t=x,u=0;\n while(t)\n {\n u=u*10+t%10;\n t/=10;\n }\n return u==x;\n}\n\nvoid solve()\n{\n int i;\n for(i=n;i<=m;i++)\n {\n if(!sieve[i] && jud(i))\n {\n q[l++]=i;\n }\n }\n}\n\nvoid print()\n{\n int i;\n for(i=0;i0) \n{printf(\"%d\",r[0]);\nfor(i=1;i9999) n=5;\nelse if(x>999 && x<10000) n=4;\nelse if(x>99 && x<1000) n=3;\nelse if(x>9 && x<100) n=2;\nelse n=1;\nfor(j=0;j=p)return 1;\n\t else return 0;\n }\n}\n\n\nint huiwen(int p,int q)\n{\n if(p==0)return q;\n else huiwen(p/10,q*10+p%10);\n\n}\n\n\n\n\nvoid main()\n{\n int m,n,coun=0;\n scanf(\"%d %d\",&m,&n);\n int i,ci,temp;\n for(i=m;i<=n;i++)\n { ci=0;\n\t temp=huiwen(i,ci);\n if(ss(i)==1&&(temp==i))\n\t {coun++;\n\t if(coun==1)printf(\"%d\",i);\n\t if(coun>1)printf(\",%d\",i);\n\t }\n \n }\n if(coun==0)printf(\"no\\n\");\n}"} +{"label": "74", "index": "36903", "code": "int main()\n{\n long m,n,i,s=0;\n long v,j,k,sum=0;\n double h;\n int a[100],b[100];\n scanf(\"%d %d\",&m,&n);\n for(j=m;j<=n;j=j+1)\n {\n v=1;sum=0;\n for(i=0;;i++){h=pow(10,(double)i);if((int)j/(int)h==0)break;}\n for(k=0;k=1;k=k-1){h=pow(10,(double)(i-k));sum=sum+b[k]*(int)h;}\n if(sum==j)\n {\n for(k=2;j>k&&j%k!=0;k=k+1);\n if(k==j){s=s+1;if(s==1)printf(\"%d\",sum);else printf(\",%d\",sum);}\n }\n }\n if(s==0)printf(\"no\");\n return 0;\n}"} +{"label": "74", "index": "36904", "code": "int huiwen(int a);\nint prime(int a);\nint main()\n{\n int m,n,i,t=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=m;i<=n;i++){\n\t\tif (huiwen(i)&&prime(i)){\n\t\t\tif (t){\n\t\t\t\tprintf(\",\");\n\t\t\t}\n\t\t\tprintf(\"%d\",i);\n\t\t\tt++;\n\t\t}\n\t}\n\tif (t==0){\n\t\tprintf(\"no\");\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}\nint huiwen(int a)\n{\n\tint i,b=0;\n\tfor (i=a;i>0;i/=10){\n\t\tb=b*10+i % 10;\n\t}\n\tif (a==b){\n\t\treturn 1;\n\t}else {\n\t\treturn 0;\n\t}\n}\nint prime(int a)\n{\n\tint i;\n\tif (a==1){\n\t\treturn 0;\n\t}\n\tfor (i=2;ir)return 1;\n\telse return 0;\n}\nint huiwen(int y)\n{\n\tint k,e=y;\n\tfor(k=0;e!=0;)\n\t{\n\t\tk=e%10+k*10;\n\t\te=e/10;\n\t}\n\tif(k==y)return 1;\n\telse return 0;\n}\nvoid main()\n{\n\tint m,n,a,b,c,d[300],i,j;\n\tfor(i=0;i<300;i++)d[i]=0;\n\tscanf(\"%d %d\",&m,&n);\n\tj=0;\n\tfor(a=m;a<=n;a++)\n\t{\n\t\tb=0;c=0;\n\t\tif(sushu(a))b=1;\n\t\tif(huiwen(a))c=1;\n\t\tif((b==1)&&(c==1))\n\t\t{\n\t\t\td[j]=a;\n\t\t\tj++;\n\t\t}\n\t}\n\tif((j==0)&&(d[0]==0))printf(\"no\\n\");\n\telse\n\t{\n\t\tfor(i=0;i=c;l--)\n {\n if(a[l]==a[c])\n s=1;\n else\n {\n s=0;\n break;\n }\n c++;\n }\n if(s==1)\n {\n o++;\n if(o==1)\n printf(\"%d\",i);\n else\n printf(\",%d\",i);\n }\n }\n \n } \n if(o==0)\n printf(\"no\");\n getchar();\n getchar();\n} \n"} +{"label": "74", "index": "36908", "code": "void main()\n{\tint sushu(int k);\n\tint huiwen(int number);\n\tint m,n,i,t,s=0;\n\tscanf(\"%d\",&m);\n\tscanf(\"%d\",&n);\n\tt=m;\n\tfor(i=t;i<=n;i++)\n\t\tif(sushu(i)==1&&huiwen(i)==1) {printf(\"%d\",i);t=i;s++;break;}\n\tfor(i=t+1;i<=n;i++)\n\t\tif(sushu(i)==1&&huiwen(i)==1) printf(\",%d\",i);\n\tif(s==0) printf(\"no\");\t \n}\nint sushu(int k)\n{ int s;\n for(s=2;s<=k;s++)\n\t if(k%s==0) break;\n\t if(k==s) return(1);\n\t else return(0);\n}\t\nint huiwen(int number)\n{\tint num,sum=0,a;\n\tnum=number;\n\tfor( ;num!=0; )\n\t\t{a=num%10;\n\t\t num=num/10;\n\t\tsum=sum*10+a;\n\t\t}\n\tif(sum==number) return(1);\n\telse return(0);\n}"} +{"label": "74", "index": "36909", "code": "int sushu(int a)\n{ int i,j=0,m;\n for(i=2;i<=sqrt(a)+1;i++)\n {if(a%i==0)\n {return 1;j++;\n break;}}\n\n if(j==0)\n {return 0;}\n}\nint huiwen( int a)\n{ int i,j,m,n=0;\nchar c[100]={0};\n\tfor(i=0;;i++)\n\t{if(a/10!=0||a%10!=0)\n\t\t{c[i]=a%10;\n\t\ta=a/10;\n\t\t}\n\telse break;\n\t}\n\tfor(j=0;j<=i-1;j++)\n\t{if(c[j]!=c[i-1-j])\n\t n++;\n\t}\n\tif (n==0)\n\t\treturn 0;\n\telse return 1;\n}\nvoid main()\n{ int a,b,c,d,e[100]={0},i,j;\n\tscanf(\"%d %d\",&a,&b);\n\t\tfor(i=a,j=0;i<=b;i++)\n\t\t{ d=huiwen(i)+sushu(i);\n\t\t\tif(d==0)\n\t\t\t{e[j]=i;\n\t\t\tj++;}\n\t\t}\n\t\t\n\tif(j==0)\n\t\tprintf(\"no\");\n\telse \n\t{for(i=0;i<=j-2;i++)\n\t printf(\"%d,\",e[i]);\n\t printf(\"%d\",e[j-1]);\n\t}\n}\n"} +{"label": "74", "index": "36910", "code": "int sushu(int n)\n{\n\tint i;\n\tfor(i=2;i<=sqrt(n);i++)\n\t{\n\t\tif(n%i==0) return 0;\n\t}\n\tif(i=sqrt(n)+1)\n\t\treturn 1;\n}\nint huiwen(int n)\n{\n\tint temp=n,k,m=0;\n\twhile(temp>0)\n\t{\n k=temp%10;\n m=m*10+k;\n temp=temp/10;\n }\n if(m==n) return 1;\n else return 0;\n}\nint main()\n{\n\tint m,n,i,flag=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)==1&&huiwen(i)==1)\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tflag=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=i+1;i<=n;i++)\n\t{\n\t\tif(sushu(i)&&huiwen(i))\n\t\t{\n\t\t\tprintf(\",%d\",i);\n\t\t\t\n\t\t}\n\t}\n\tif(flag==0)\n\t\tprintf(\"no\"); \n\t\t\n\treturn 0;\n}\n\t"} +{"label": "74", "index": "36911", "code": "int y=0;\nvoid main()\n{\n\tint m,n,i,j,k=0,l,x,p=0;\n\tint a[10000],b[10000];\n\tscanf(\"%d%d\",&m,&n);\n\tint huiwen(int j,int x,int y);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tfor(j=2;i>=j;j++)\n\t\t\tif(i%j==0)break;\n\t\tif(i==j)\n\t\t{\n\t\t\tif(j>=1000000&&j<10000000)\n\t\t\t\tx=7;\n\t if(j>=100000&&j<1000000)\n\t\t\t\tx=6;\n\t\t\tif(j>=10000&&j<100000)\n\t\t\t\tx=5;\n\t\t\tif(j>=1000&&j<10000)\n\t\t\t\tx=4;\n\t\t\tif(j>100&&j<1000)\n\t\t\t\tx=3;\n\t\t\tif(j>10&&j<100)\n\t\t\t\tx=2;\n\t\t\tif(j>=0&&j<10)\n\t\t\t\tx=1;\n\t\n\t\t\ta[k]=j;\n\t\t\tk=k+1;\n\t\t}\n\t}\n\tfor(l=0;l0)\n\t\t{\n\t\t\tb=w%10;\n\t\t\ta=a*10+b;\n\t\t\tw=w/10;\n\t\t}\n\t\tif(a==i)\n\t\t{\n\t\t\tprintf((exist==1)?\",%d\":\"%d\",i);\n\t\t\texist=1;\n\t\t}\n\t}\n\tif(exist==0)\n\t\tprintf(\"no\");\n}\n\n"} +{"label": "74", "index": "36914", "code": "\nint main()\n{\n\tint m,n,k,i,j,sum=0,flag=0,r,s,t,o,p,sum1=0;\n\tlong a[100000],b[100000];\n\tscanf(\"%d %d\",&m,&n);\n\tj=0;\n\tfor(k=m;k<=n;k++)\n\t{\n\t\tfor(i=2;i=2&&a[i]<=9)\n\t\t{\n\t\t\tb[j]=a[i];\n\t\t\tj++;\n\t\t\tsum1++;\n\t\t\tflag=1;\n\t\t}\n\t\t\n\t\tif(a[i]>=100&&a[i]<=999)\n\t\t{\n\t\t\tfor(r=0;r<=9;r++)\n\t\t\t{\n\t\t\t\tfor(s=0;s<=9;s++)\n\t\t\t\t{\n\t\t\t\t\tfor(t=0;t<=9;t++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(r*100+s*10+t==a[i])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(r==t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[j]=a[i];\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tsum1++;\n\t\t\t\t\t\t\tflag=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tif(a[i]>=1000&&a[i]<=9999)\n\t\t{\n\t\t\tfor(r=0;r<=9;r++)\n\t\t\t{\n\t\t\t\tfor(s=0;s<=9;s++)\n\t\t\t\t{\n\t\t\t\t\tfor(t=0;t<=9;t++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(o=0;o<=9;o++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(o*1000+r*100+s*10+t==a[i])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(o==t&&r==s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[j]=a[i];\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tsum1++;\n\t\t\t\t\t\t\tflag=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tif(a[i]>=10000&&a[i]<=99999)\n\t\t{\n\t\t\tfor(o=0;o<=9;o++)\n\t\t\t{\n\t\t\t\tfor(p=0;p<=9;p++)\n\t\t\t\t{\n\t\t\tfor(r=0;r<=9;r++)\n\t\t\t{\n\t\t\t\tfor(s=0;s<=9;s++)\n\t\t\t\t{\n\t\t\t\t\tfor(t=0;t<=9;t++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(o*10000+p*1000+r*100+s*10+t==a[i])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(o==t&&p==s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb[j]=a[i];\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tsum1++;\n\t\t\t\t\t\t\tflag=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t}\n\t\t}\n\t}\n\tif(flag==0) printf(\"no\");\n\telse\n\t{\n\n\tfor(i=0;i0;y=y/10){\n\t\twei[z]=y%10;\n\t\tz++;\n\t}\n\tfor(y=0;y0)\n{x=x*10+n%10;\nn=n/10;\n}\nif(t==x)return 1;\nelse return 0;\n}\nint g(int i)\n{int j,t=0;\n\tfor(j=2;j0)\n {\n printf(\",%d\",i); \n }\n count++; \n }\n }\n if(count==0)\n {\n printf(\"no\");\n } \n getchar(); getchar(); getchar(); getchar(); getchar(); getchar(); getchar(); getchar(); getchar(); getchar();\n}\nint pp(int p)\n{\n int i=0;\n if(p==1)\n return(0);\n if(p==2||p==3||p==5)\n return(1);\n for(i=2;i<=sqrt(p);i++)\n {\n if(p%i==0)\n {\n return(0);\n }\n }\n return(1);\n}\nint hv(int h)\n{\n int a[8];\n int i=1;\n while(h>0)\n {\n a[i]=h%10;\n h/=10;\n i++;\n }\n i--;\n //printf(\"i= %d \",i);\n //int s=0;\n //for(s=1;s<=i;s++){printf(\"%d\",a[s]);}printf(\" \");\n int j=0;\n for(j=0;j<=i/2;j++)\n {\n if(a[j+1]!=a[i-j]) \n {\n // printf(\" 0 \\n\");\n return(0);}\n } //printf(\" 1 \\n\");\n return(1); \n}\n"} +{"label": "74", "index": "36923", "code": "f1(int x)\n{\nint a,b,p[100];\nfor(a=0;x!=0;a++)\n{p[a]=x%10;\nx=x/10;}\na--;\nfor(b=0;b<=a;b++)\n{if(p[b]!=p[a])break;\nelse a--;}\nif(b0)\n\t{\n\t\tprintf(\"%d\",num[0]);\n\t\tfor (i=1;i<=f;i++)\n\t\t\tprintf(\",%d\",num[i]);\n\t}\n\telse printf(\"no\");\n}\n"} +{"label": "74", "index": "36925", "code": "int f1(int x)\n{\n\tint i,j=1;\n\tfor(i=2;i<=sqrt(x);i++)\n\t{\n\t\tif(x%i==0)\n\t\t{\n\t\t\tj=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn(j);\n}\nint f2(int x)\n{\n\tint s[10];\n\tint i,j,k=1;\n for(i=0;x!=0;i++)\n\t{\n\t\ts[i]=x%10;\n\t\tx=x/10;\n\t}\n\tfor(j=0;j=0;i--){\n\t\ttest=test-pow(10,i+1) * (*(n+i+1) );\n\t\t*(n+i)=(int)(test / pow(10,i) );\t\t\t\t\t\t\t//???????\n\t}\n\tfor(i=0,j=digit;i=q)\n\t\treturn 1;\n\tif(p0)\n\t printf(\",%d\",i);\n\t\t t=1;\n\t\t}\n\t}\n\tif(t==0)\n\t\tprintf(\"no\");\n\treturn 0;\n}\n\n"} +{"label": "74", "index": "36928", "code": "int huiwen(int x)\n{\n\tint z=0;\n\twhile(x)\n\t{\n\t\tz=z*10+x%10;\n\t\tx=x/10;\n\t}\n\treturn(z);\n}\nmain()\n{\n\tint i,j,k=0,flag=0,l,a,b,c[1000],t;\n\tscanf(\"%d%d\",&a,&b);\n\tfor(i=1;i<1000;i++)\n\t{\n\t\tc[i]=0;\n\t}\n\tfor(i=a;i<=b;i++)\n\t{\n\t\tt=1;\n\t\tfor(j=2;j<=sqrt(i);j++)\n\t\t{\n\t\t\tif(i%j==0)t=0;\n\t\t}\n\t\tif(t)\n\t\t{\n\t\t\tl=huiwen(i);\n\t\t\tif(l==i)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tc[k]=i;\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=k;i++)\n\t\t{\n\t\t\tif(flag)\n\t\t\t{\n\t\t\t\tprintf(\",\");\n\t\t\t}\n\t\t\tprintf(\"%d\",c[i]);\n\t\t\tflag=1;\n\t\t}\n\t}\n}\n"} +{"label": "74", "index": "36929", "code": "int huiwen(int n)\n{\n\tint m=0;\n\twhile(n!=0)\n\t{\n\t\tm=m*10+n%10;\n\t\tn=n/10;\n\t}\n\treturn(m);\n}\nint sushu(int n)\n{\n\tint i;\n\tif(n%2==0&&n>2)\n\t\treturn(0);\n\telse if(n==2)\n\t\treturn(1);\n\telse\n\t{\n\t\tfor(i=3;i<=sqrt(n);i+=2)\n\t\t{\n\t\t\tif(n%i==0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(i<=sqrt(n))\n\t\t\treturn(0);\n\t\telse\n\t\t\treturn(1);\n\t}\n}\nvoid main()\n{\n\tint m,n,k,a=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(k=m;k<=n;k++)\n\t{\n\t\tif(k==huiwen(k)&&sushu(k)==1)\n\t\t{\n\t\t\tif(a==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",k);\n\t\t\t\ta++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprintf(\",%d\",k);\n\t\t}\n\t}\n\tif(a==0)\n\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36930", "code": "int main()\n{\n\tint m,n,flag[100000],i,j,flagio=0,temp;\n\tint judge(int k);\n\tscanf(\"%d %d\",&m,&n);\n\ttemp=m;\n\tfor(i=m;i<=n;i++)flag[i]=1;\n\tfor(i=m;i<=n;i++)for(j=2;j<=sqrt(i);j++)if(i%j==0)flag[i]=0;\n\tfor(i=m;i<=n;i++)if((flag[i])&&(judge(i))){temp=i;printf(\"%d\",i);flagio=1;break;}\n\tfor(i=temp+1;i<=n;i++)if((flag[i])&&(judge(i)))printf(\",%d\",i);\n\tif(flagio==0)printf(\"no\");\n\treturn 0;\n}\nint judge(int k)\n{\n\tint i=0,l,sum=0,scale=1,tem;\n\ttem=k;\n\twhile(k>=pow(10,i))i++;\n\ti--;\n\twhile(i>=0)\n\t{\n\t\tl=k/pow(10,i);\n\t\tsum=sum+l*scale;\n\t\tk=k-l*pow(10,i);\n\t\tscale=scale*10;\n\t\ti--;\n\t}\n\tif(sum==tem)return(1);\n\telse return(0);\n}"} +{"label": "74", "index": "36931", "code": "void main()\n{\n\tint m,n,i,x[1000],count=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(f(i)*g(i)==1)\n\t\t{count++;\n\t\tx[count]=i;\n\t\t}\t\t\n\t}\n\tif(count==0) printf(\"no\");\n\tif(count==1) printf(\"%d\",x[1]);\n\tif(count>=2)\n\t{\n\t\tfor(i=1;i=0&&i<=9)\n {\n r++;\n if(r==1)\n {x++;\n printf(\"%d\",i);\n }\n else\n {x++;\n printf(\",%d\",i);}\n }\n q=0;\n for(j=2;j<=i/2;j++)\n if(i%j==0)\n {\n a=0;\n break;\n }\n else\n a++;\n if(a!=0)\n {\n k=10;\n for(j=1;;j++)\n {\n b[0]=0;\n b[j]=(i%k-b[j-1]*(k/100))/(k/10); \n if(i%k==i) \n break;\n else\n k=k*10; \n }\n for(p=1;p<=j/2;p++)\n if(b[p]!=b[j-p+1])\n {\n q++;\n break;\n }\n if(q==0)\n {\n r++;\n if(r==1)\n {x++;\n printf(\"%d\",i);}\n else\n {x++;\n printf(\",%d\",i);}\n }\n \n \n }\n \n } \n if(x==0)\n printf(\"no\\n\"); \n \n}\n"} +{"label": "74", "index": "36933", "code": "void main()\n{\n\tint m,n,t,i,k,j,p,q,l,a,b,s;\n\tb=0,s=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(a=m;a<=n;a++)\n\t{\n\t\tt=sqrt(a);\n\t\tfor(i=2;i<=t;i++)\n\t\t\tif(a%i==0)\n\t\t\t\tbreak; \n\t\tif(i>=t+1)\n\t\t{\n\t\t\tk=a;\n\t\t\tj=0;\n\t\t\twhile(k!=0)\n\t\t\t{\n\t\t\t\tk=(k-k%10)/10;\n\t\t\t\tj=j+1;\n\t\t\t}\n\t\t\tp=a;\n\t\t\tq=0;\n\t\t\tfor(l=j;l>=1;l--)\n\t\t\t{\t\n\t\t\t\tq=(p%10)*pow(10,l-1)+q;\n\t\t\t\tp=(p-p%10)/10;\n\t\t\t}\n\t\t\tif(a==q)\n\t\t\t{\n\t\t\t\tb=b+1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(a=m;a<=n;a++)\n\t{\n\t\tt=sqrt(a);\n\t\tfor(i=2;i<=t;i++)\n\t\t\tif(a%i==0)\n\t\t\t\tbreak; \n\t\tif(i>=t+1)\n\t\t{\n\t\t\tk=a;\n\t\t\tj=0;\n\t\t\twhile(k!=0)\n\t\t\t{\n\t\t\t\tk=(k-k%10)/10;\n\t\t\t\tj=j+1;\n\t\t\t}\n\t\t\tp=a;\n\t\t\tq=0;\n\t\t\tfor(l=j;l>=1;l--)\n\t\t\t{\t\n\t\t\t\tq=(p%10)*pow(10,l-1)+q;\n\t\t\t\tp=(p-p%10)/10;\n\t\t\t}\n\t\t\tif(a==q)\n\t\t\t{\n\t\t\t\ts=s+1;\n\t\t\t\tif(s=10;)\n\t\t\t{\n\t\t\t\tc=e/10;\n\t\t\t\td=e-10*c;\n\t\t\t\te=c;\n\t\t\t\tp=10*p+d;\n\t\t\t}\n\t\t\tp=10*p+e;\n\t\t\tif(p==m)\n\t\t\t{\n\t\t\t\tj=j+1;\n\t\t\t\tif(j==1)\n\t\t\t\t\tprintf(\"%d\",p);\n\t\t\telse\n\t\t\t\tprintf(\",%d\",p);\n\t\t\t}\n\t\t}\n\t}\n\tif(j==0)\n\t\tprintf(\"no\\n\");\n}"} +{"label": "74", "index": "36936", "code": "int pdhw(int i);\nint pdss(int i);\nvoid main()\n{\n\tint m,n,cs=0,h,s,i;\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\th=pdhw(i);\n\t\tif(h==1)\n\t\t{\n\t\t\ts=pdss(i);\n\t\t\tif(s==1)\n\t\t\t{\n\t\t\t\tif(cs>0)\n\t\t\t\t\tprintf(\",\");\n\t\t\t\tprintf(\"%d\",i);\n\t\t\t\tcs++;\n\t\t\t}\n\t\t}\n\t}\n\tif(cs==0)\n\t\tprintf(\"no\");\n}\nint pdhw(int i)\n{\n\tint d=1,f=0,j=0,k,w,v=0,b[100]={0};\n\tdo\n\t{\n\t\td=d*10;\n\t\tf=i/d;\n\t\tj++;\n\t}\n\twhile(f!=0);\n\tw=i;\n\tfor(k=0;k2)\n\t\treturn (1);\n\telse return(0);}\nint dao(int m,int n)\n{int a[1000],b[1000],i,j,k,l,t,s;\n\na[0]=m;t=0;\nfor(i=1;i0;i--)\nb[i]=a[i-1]-a[i]*10;\n\nfor(s=1;s<=n;s++)\n{\n\tfor(j=n-s;j>0;j--)\n\t{b[s]=b[s]*10;}}\nfor(i=1;i<=n;i++)\nt=t+b[i];\nreturn (t);\n}\n\n\nint main()\n{\n\tint m,n,i,j,k,a[10000],b[10000],f,o,s,t;\n\tscanf(\"%d %d\",&m,&n);\n\tk=0;o=0;\n\tfor(i=m;i<=n;i++)\n\t{ f=cont(i);\n\tt=dao(i,f);\ns=su(i);\n\tif(t==i&&s==0)\n\t{a[o]=i;o++;}\n\t}\n\to--;\n\tif(o+1==0)\n\t\tprintf(\"no\");\n\telse {\n\t\tfor(i=0;isqrt(i))\n\t\t\t{\n\t\t\t\tr1=i;\n\t\t\t\tr2=0;\n\t\t\t\tfor(;;)\n\t\t\t\t{\n\t\t\t\t\tif(r1>0)\n\t\t\t\t\t{r2=r2*10+r1%10;\n\t\t\t\t\tr1=r1/10;}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i==r2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(u==0)\n\t\t\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t\t\t++u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tif(u==0)\n\t\tprintf(\"no\");\n\tprintf(\"\\n\");\n}\n\n"} +{"label": "74", "index": "36941", "code": "int hui(int a)\n{\n\tint b=0,c;\n\tc=a;\n\tdo\n\t{\n\t\tb=10*b+a%10;\n\t\ta=(a-a%10)/10;\n\t}while(a!=0);\n\tif(b==c) return 1;\n\telse return 0;\n}\nint sui(int a)\n{\n\tint i;\n\tfor(i=2;i=2)\n\t{\n\t\tprintf(\"%d,%d\",s[0],s[1]);\n\t\tfor(j=2;jsqrt(p))\n\t\t{\n\t\t\tflag=1;\n\t\t\treturn(flag);\n\t\t}\n}\n"} +{"label": "74", "index": "36943", "code": "void main()\n{\n\tint m,n,i,j,r,k,s=0,t,w=0;\n\tint a[500],b[500];\n\tscanf(\"%d%d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tj=i;\n\t\tk=0;\n\t\twhile(j>0)\n\t\t{\n\t\t\tr=j%10;\n\t\t\tj=j/10;\n\t\t\tk=10*k+r;\n\t\t}\n\t\tif(k==i)\n\t\t{\n\t\t\ta[s]=i;\n\t\t\ts++;\n\t\t}\n\t}\n\tfor(i=0;i0;){q*=10;q+=p%10;p/=10; }\nif(q!=i)continue;\n\nfor(j=3;j0) printf(\",\"); l++;printf(\"%d\",k);}\n if (l==0)printf(\"no\");\n}"} +{"label": "74", "index": "36951", "code": "\nint prime(int x)\n{\n\tint i,k;\n\tk=sqrt(x);\n\tif(x==2||x==3)\n\t\treturn(1);\n\tfor(i=2;i<=k;i++)\n\t\tif(x%i==0)\n\t\t\tbreak;\n\tif(i>1&&i<=k)\n\t\treturn(0);\n\telse return(1);\n}\n\nint palin(int x)\n{\n\tint t,k;\n\tt=x;\n\tk=0;\n\twhile(t>0)\n\t{\n\t\tk=k*10+t%10;\n\t\tt=t/10;\n\t}\n\tif(k==x)\n\t\treturn(1);\n\telse return(0);\n}\n\n\n\nmain()\n{\n\tint m,n,i,resu[100],num;\n\tscanf(\"%d%d\",&m,&n);\n\tnum=0;\n\tfor(i=m;i<=n;i++)\n\t\tif(prime(i)==1&&palin(i)==1)\n\t\t{\n\t\t\tresu[num]=i;\n\t\t\tnum++;\n\t\t}\n\tif(num==0)\n\t\tprintf(\"no\");\n\tfor(i=0;i<=num-1;i++)\n\t{\n\t\tprintf(\"%d\",resu[i]);\n\t\tif(i<=num-2)putchar(',');\n\t}\n\n}\n\n\n\n/*\t\t?????? \n \n?? ??-From Whf \n?? \n??????? m ?n ??????????????????m ? n?????m ???n??????????????????????????? no (??????????????????123321?121)?\n \n???? \nm ? n ?1??????1??????\n \n???? \n?????????????????????????? no\n \n???? \n100 200\n \n???? \n101,131,151,181,191\n */\n"} +{"label": "74", "index": "36952", "code": "int i;\nint sushu(int x)\n{\n\tfor(i=2;i=x/2)return(1);\n\telse return(0);\n}\nint huiwen(int p)\n{\n\tint s[10],k,d,t=0;\n\td=p;\n\tfor(i=0;p!=0;i++)\n\t{\n\t\ts[i]=p%10;\n\t\tp/=10;\n\t}\n\tfor(k=0;kn)printf(\"no\");\n\tm++;\n\tfor(;m<=n;m++)\n\t\tif(sushu(m)&&huiwen(m))printf(\",%d\",m);\n}"} +{"label": "74", "index": "36953", "code": "int main()\n{\n int a,b,i,k,j,t,r,s,u,Num=0;\n scanf(\"%d\",&a);\n scanf(\"%d\",&b);\n if(a==1)i=a+1;\n else i=a;\n while(i<=b)\n {\n k=(int)sqrt(i);\n for(j=2;j<=k;j++)\n {\n if(i%j==0)\n break;\n }\n if(j>k)\n {\n int c[10000]={0};\n t=i;\n r=0;\n while(t!=0)\n {\n c[r]=t%10;\n t=t/10;\n r++; \n }\n s=0;\n for(u=0;u=1;i--)\n{\ntesthuiwen=huiwen[i]*counter+testhuiwen;\ncounter=counter*10;\n}\n\nif(test==testhuiwen)\n{\n\tint yinzi=2;\n\tfor(;yinzi<=test;yinzi++)\n\t{\n\t\tif((test%yinzi)!=0)\n\t\t{ k=yinzi;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{break;}\n\t}\n if (yinzi==test)\n {shu[shushu]=test;\n\tshushu++;}\n else {}\n}\nelse\n{continue;}\n}\n\nif(shu[1]==0)\n{printf(\"no\");}\nelse\n{\nint p=1;\nfor(;p<(shushu-1);p++)\n{printf(\"%d,\",shu[p]);\n}\n\nprintf(\"%d\",shu[p]);\n}\n\n\n\n\nreturn 0;\n}"} +{"label": "74", "index": "36955", "code": "\n/*?? \n??????? m ?n ??????????????????m ? n?????m ???n???????????????\n???????????? no (??????????????????123321?121)?\n \n???? \nm ? n ?1??????1??????\n \n???? \n?????????????????????????? no\n \n???? \n100 200\n \n???? \n101,131,151,181,191*/\nint main()\n{\n\tlong int m,n,i,j,s=0,t,k=0;\n\tlong int a[100000],b[100000];\n\tlong int huiwen(long int d);\n\tscanf(\"%ld%ld\\n\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tt=0;\n\t\tfor(j=1;j<=sqrt(i);j++)\n\t\t\tif(i%j==0)\n\t\t\t\tt++;\n\t\t\tif(t==1)\n\t\t\t\ta[s++]=i;\n\t}\n//for(i=0;i<=s-1;i++) printf(\"%d \",a[i]);\n\tfor(i=0;ix)\n\t\tbreak;\n\tm=i;\n\tfor(i=1;i<=m;i++)\n\t{\n\t\ta[i]=x%10;\n\t\tx=x/10;\n\t}\n\tfor(i=1;i<=m;i++)\n\t\tsum=sum*10+a[i];\n\tif(sum==k)\n\t\treturn(1);\n\telse return(0);\n}\nint su(int x)\n{\n\tint i,j,k;\n\tfor(i=2;i=k/2+1;r--)\n\t\t\t{\n\t\t\t\tif (a[r]==a[j]) t=t*1;\n\t\t\t\tif (a[r]-a[j]) t=0;\n\t\t\t\tj=j+1;\n\t\t\t}\n\t\t\tif (t==1) \n {\n b[l]=i;\n l=l+1;\n }\n\t\t}\n\n\t}\n\n\tif (l==1) printf(\"no\");\n\telse\n\t{\n printf(\"%d\",b[1]);\n\tfor (i=2;i0;i++)\n\t{\n\t\tnum=num*10+(x-(x/10)*10);\n\t\tx=x/10;\n\t}\n\treturn(num);\n}\nint IsPrime(int x)\n{\n\tint k,i;\n\tk=sqrt(x);\n\tfor(i=2;i<=k;i++)\n\t\tif(x%i==0)\n\t\t\tbreak;\n\t\tif(i>=k+1)\n\t\t\treturn 1;\n\t\telse return 0;\n}\nvoid main()\n{\n\tint m,n,i,j,k;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++){\n\t\tif(i==IsPalindrome(i)&&IsPrime(i)==1)\n\t\t\tbreak;\n\t}\n\tfor(j=m,k=0;j<=n;j++)\n\t{\n\t\tif(j==IsPalindrome(j)&&IsPrime(j)==1){\n\t\t\tif(j==i) {\n\t\t\t\tprintf(\"%d\",j);\n\t\t\t\tk++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintf(\",%d\",j);\n\t\t\t\tk++;}\n\t\t}\n\t}\n\tif(k==0) printf(\"no\");\n}\n\n\n\n"} +{"label": "74", "index": "36959", "code": "int ff(int n){\n\tint hh;\n\tif(n==2){ return 1;}\n\telse if(n>2){\n\t\tfor(int i=2;i=10){\n\t\tt2*=10;\n\t\tt1/=10;\n\t\tt2+=t1%10;\n\t}\n\tif(t2==n) return 1;\n\telse return 0;\n}\nint main()\n{\n\tint m,n,i,tt,hh=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++){\n\t\tif(ff(i)==1&&gg(i)==1){\n\t\t\thh++;\n\t\t}\n\t}\n\tif(hh==0){\n\t\tprintf(\"no\");\n\t}\n\telse{\n\tfor(i=m;i<=n;i++){\n\t\tif(ff(i)==1&&gg(i)==1){\n\t\t\tprintf(\"%d\",i);\n\t\t\ttt=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=tt+1;i<=n;i++){\n\t\tif(ff(i)==1&&gg(i)==1){\n\t\t\t printf(\",%d\",i);\n\t\t } \n\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "74", "index": "36960", "code": "void main()\n{\n\tint m,n,i,j,s,p,q,b=0;\n\tint c[1000];\n\tscanf(\"%d%d\",&m,&n);\n\t\tfor(i=m;i<=n;i++)\n\t\t{\n\t\t\tq=0;\n\t\t\tp=i;\n\t\t\twhile(p!=0)\n\t\t\t{\n\t\t\t\ts=p%10;\n\t\t\t\tq=10*q+s;\n\t\t\t\tp=p/10;\n\t\t\t}\n\t\t\tif(q!=i)\n\t\t\t\tgoto a;\n\t\t\tfor(j=2;j<=sqrt(i);j++)\n\t\t\t\tif(i%j==0)\n\t\t\t\t\tgoto a;\n\t\t\tb++;\n\t\t\tc[b]=i;\n a:;\n\t\t}\n\tif(b==0)\n\t\tprintf(\"no\");\n\telse if(b==1)\n\t\tprintf(\"%d\",c[1]);\n\telse\n\t{\n\t\tprintf(\"%d\",c[1]);\n\t\tfor(i=2;i<=b;i++)\n\t\t\tprintf(\",%d\",c[i]);\n\t}\n}"} +{"label": "74", "index": "36961", "code": "int main(){\n\tint zhi(int);\n\tint hui(int);\n\tint a[100];\nint m,n,i,s=1,p,q;\nscanf(\"%d %d\",&m,&n);\nfor(i=m,p=0;i<=n;i++){\n if(zhi(i)==1&&hui(i)==1){\n\t a[p]=i;p+=1;\n\t\ts=0;\n\t}\n}\nif(s){\n printf(\"no\");\n}\nelse{\nfor(q=0;q<=p-2;q++)\nprintf(\"%d,\",a[q]);\nprintf(\"%d\",a[p-1]);\n}\nreturn 0;\n}\nint zhi(int n)\n{\n\tint i,m;\nif(n==2)\nm=1;\nelse{\nfor(i=2;i<=sqrt(n);i++)\n{if(n%i==0)break;}\nif(i>sqrt(n))m=1;\nelse m=0;}\nreturn (m);\n}\nint hui(int n){\nint a[10],i;\n\tint s=1,j;\n\tfor(i=0;n>0;i++){\n\t a[i]=n%10;\n\t n=n/10;\n\t}\nfor(j=0;j<=i-1;j++){\n\t if(a[j]!=a[i-1-j])\n s=0;\n\t}\n\n\treturn s;\n\n}\n"} +{"label": "74", "index": "36962", "code": "void main()\n{\n\tint F(int x);\n\tint G(int x);\n\tint m,n,i,a=0;\n\tscanf(\"%d%d\",&m,&n);\n for(i=m;i<=n;i++)\n\t{\n\t\tif(F(i)&&G(i)) {printf(\"%d\",i);a++;break;}\n\t}\n\tfor(i=i+1;i<=n;i++)\n\t{\n\t\tif(F(i)&&G(i)) {printf(\",%d\",i);a++;}\n\t}\n\tif(a==0) printf(\"no\");\n}\n\n\n int F(int x)\n {\n int z,t=0;\n z=x;\n do\n { \n\t t=t*10+z%10;\n\t z=z/10;\n }\n while(z!=0);\n if(t==x)return(1);\n else return(0);\n }\n\n int G(int x)\n {\n\t int i,b=1;\n for(i=2;i<=sqrt(x);i++)\n {\n if(x%i==0) {b=0;break;}\n }\nreturn(b);\n }"} +{"label": "74", "index": "36963", "code": "\nconst int num[9]={1,10,100,1000,10000,100000,1000000,10000000,100000000};\nint main()\n{\n int a,b;\n int l1,l2,flag,t;\n int res[1000];\n\n scanf(\"%d%d\",&a,&b);\n res[0]=0;\n for (l1=a;l1<=b;l1++)\n {\n flag=l1-1;\n for (l2=2;l2<=(int)sqrt(l1);l2++)\n if (l1 % l2==0)\n {\n flag=0;\n break;\n }\n if (flag==0)\n continue;\n t=(int)log10(l1)+1;\n for (l2=1;l2<=t/2;l2++)\n if (l1%num[l2]/num[l2-1]!=\n l1%num[t-l2+1]/num[t-l2+1-1])\n {\n flag=0;\n break;\n }\n if (flag==0)\n continue;\n res[0]++;\n res[res[0]]=l1;\n }\n\n for (l1=1;l1<=res[0]-1;l1++)\n printf(\"%d,\",res[l1]);\n if (res[0]==0)\n printf(\"no\\n\");\n else\n printf(\"%d\\n\",res[res[0]]);\n\n return 0;\n}\n"} +{"label": "74", "index": "36964", "code": "char f(int i)\n{\n\tif(i==2||i==3)\n\t\treturn ('1');\n\telse \n\t{\n\t\tfloat k=i;\n\t\tk=sqrt(k);\n\t\tint m;\n\t\tfor(m=2;m<=k;m++)if(i%m==0) break;\n\t\tif(m>k)return('1');\n\t\telse return ('0');\n\t}\n}\nchar g(int i)\n{\n\tif(i/10==0)return ('1');\n\telse\n\t{\n\t\tint y=0,m=i,j=1;\n\t\twhile(m>0)\n\t\t{\n\t\t\ty=y*10+m%10;\n\t\t\tm=m/10;\n\t\t}\n\t\tif(y==i) return ('1');\n\t\telse return ('0');\n\t}\n}\nint main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tint i;\n\tchar y='0';\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(f(i)=='1'&&g(i)=='1')\n\t\t{\n\t\t\t\tif(y=='0')\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t\ty='1';\n\t\t\t\t}\n\t\t\t\telse printf(\",%d\",i);\n\t\t}\n\t}\n\tif(y=='0')printf(\"no\");\n}\n\n\t"} +{"label": "74", "index": "36965", "code": "\nint PrimeQ(int n);\n\nint main()\n{\n\tint i, j, min, max, temp, count, flag=0, num[15], result[100];\n\tscanf(\"%d %d\", &min, &max);\n\tfor(i=min; i<=max; i++)\n\t{\n\t\tif(PrimeQ(i)==1)\n\t\t{\n\t\t\ttemp=i;\n\t\t\tfor(j=0; temp!=0; j++)\n\t\t\t{\n\t\t\t\tnum[j]=temp-temp/10*10;\n\t\t\t\ttemp/=10;\n\t\t\t}\n\t\t\ttemp=j-1;\n\t\t\tcount=0;\n\t\t\tfor(j=0; j<(temp+1)/2; j++)\n\t\t\t{\n\t\t\t\tif(num[j]!=num[temp-j])\n\t\t\t\t{\n\t\t\t\t\tcount=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count==0)\n\t\t\t{\n\t\t\t\tresult[flag]=i;\n\t\t\t\tflag++;\n\t\t\t}\n\t\t}\n\t}\n\tif(flag==0) printf(\"no\\n\");\n\telse for(i=0; ik) \n\t\t {\n\t\t num=0; \n j=i; \n while(j!=0) \n\t\t { \n num=num*10+j%10; \n j/=10; \n\t\t } \n if(num==i) \n\t\t { s++;\n\t\t printf(\"%d\",num);break;}\n\t\t }\n\n\t}\n\t\n\tfor(i=i+1;i<=n;i++)\n\t{ \n\t \n\t k=sqrt(i);\n\t for(j=2;jk) \n\t\t {\n\t\t num=0; \n j=i; \n while(j!=0) \n\t\t\t { \n num=num*10+j%10; \n j/=10; \n\t\t\t } \n if(num==i) \n\t\t {s++;\n\t\t printf(\",%d\",num);}\n\n\t\t }\n \n }\n\n\n\tif(s==0) printf(\"no\");\n}\n\n"} +{"label": "74", "index": "36967", "code": "\nint isprime(int n)\n{\n int i;\n for (i = 2; i < n; i++)\n {\n if (n % i == 0)\n return 0;\n }\n return 1;\n}\n\nint ishuiwen(int n)\n{\n int i, len;\n char a[11];\n sprintf(a, \"%d\", n);\n len = strlen(a);\n for (i = 0; i < len/2; i++)\n {\n if (a[i] != a[len-i-1])\n return 0;\n }\n return 1;\n}\n\nint main()\n{\n int ishuiwen(int);\n int isprime(int);\n int count = 0, i, m, n;\n scanf(\"%d%d\", &m, &n);\n for (i=m; i<=n; i++)\n {\n if (isprime(i) && ishuiwen(i))\n {\n count++;\n if (count == 1)\n printf(\"%d\", i);\n else\n printf(\",%d\",i);\n }\n }\n if (count == 0)\n printf(\"no\");\n return 0;\n}\n\n"} +{"label": "74", "index": "36968", "code": "int su(int m)\n{\n\tint p,i;\n\tif(m==2)\n\t{\n\t\tp=1;\n\t}\n\telse if (m==1)\n\t{\n\t\tp=0;\n\t}\n\telse\n\t{\n\t\tfor(i=2;i0)\n\t{\n\t\tj=j*10+m%10;\n\t\tm/=10;\n\t}\n\tif(i==j) \n\t{\n\t\tp=1;\n\t}\n\telse\n\t{\n\t\tp=0;\n\t}\n\treturn(p);\n}\nint main()\n{\n\tint m,n,count=0;\n\tscanf(\"%d%d\",&m,&n);\n\twhile(m<=n)\n\t{\n\t\tif(su(m)&&hui(m))//????1????????\n\t\t{\n\t\t\tif(count==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d\",m);\n\t\t\t\tcount=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintf(\",%d\",m);\n\t\t\t}\n\t\t}\n\t\tm++;\n\t\t\n\t}\n\tif(count==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "74", "index": "36969", "code": "int sushu(int n)\n{\n\tint i;\n\tfor(i=2;i=0;j--)\n\t{\n\t\tif(a[j]!=a[i-1-j])\n\t\t{\n\t\t\tflag=1;\n\t\t\treturn 1;\n\t\t}\n\t}\n\tif(flag==0)\n\t{\n\t\treturn 0;\n\t}\n\t}\n}\nvoid main()\n{\n\tint m,n;\n\tint i,j;\n\tint flag=0;\n\tint flag1=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(sushu(i)==0)\n\t\t{\n\t\t\tif(reverse(i)==0)\n\t\t\t{\n\t\t\t\tflag1=1;\n\t\t\t\tif(flag==0)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tprintf(\"%d\",i);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprintf(\",%d\",i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(flag1==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n}\n\t\t\t\t"} +{"label": "74", "index": "36970", "code": "/*?? - ??????\t\n??\t??-From Whf\n??\n??????? m ?n ??????????????????m ? n?????m ???n??????????????????????????? no (??????????????????123321?121)?\n????\nm ? n ?1??????1??????\n????\n?????????????????????????? no\n????\n100 200\n????\n101,131,151,181,191\n*/\nint huiwen(int x)\n{\n\tint y=0;\n\tfor(;x!=0;)\n\t{\n\t\ty=y*10+x%10;\n\t\tx=x/10;\n\t}\n\treturn y;\n}\nint zhishu(int x)\n{\n\tint i,k;\n\tk=x/2;\n\tfor(i=2;x%i!=0&&i=1;z++)\n\t\t{\n\t\t\tx=a%10;\n\t\t\ta=a/10;\n\t\t sum=sum*10+x;\n\t\t}\n\t\tif(sum==i)l=1;\n\t\tif(l==1&&k==1)\n\t\t{\n\t\t\tarray[y]=i;\n\t\t\ty++;\n\t\t}\n\t}\n\tif(y==0)printf(\"no\");\n\telse\n\t{\n\t\tfor(i=0;i0)\n\t{\n\t\tj=j*10+s%10;\n\t\ts/=10;\n\t}\n\tif(n==j)\n\t{\n\t\treturn 1;\n\t} \n\treturn 0;\n}\n"} +{"label": "74", "index": "36974", "code": "int huiwen(int a)\n{\n\tint i,j=0,flag=1,b[10];\n\twhile(a!=0)\n\t{\n\t\tb[j]=a%10;\n\t\ta=a/10;\n\t\tj++;//??\n\t}\n\tfor(i=0;i0)\n\t{\n\t\tn=n*10+c%10;\n\t\tc=c/10;\n\t}\n\tif(n==b)\n\t\treturn(1);\n\telse \n\t\treturn(0);\n\n\n}\n\n\nmain()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&m,&n);\n\tif(m<=2)\n\t\tprintf(\"2,\");\n\tint j;\n\tint flag=0;\n\tif(m%2==0)\n\t\tm=m+1;\n\tfor(j=m;j<=n;j+=2)\n\t{\n\t\tif(g(j)&&f(j))\n\t\t{\n\t\t\tflag=1;\n\t\t\tprintf(\"%d\",j);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(flag==0)\n\t\tprintf(\"no\");\n\tfor(j=j+2;j<=n;j+=2)\n\t{\n\t\tif(f(j)&&g(j))\n\t\t{\n\t\t\tflag=1;\n\t\t\tprintf(\",%d\",j);\n\t\t}\n\t}\n}\n\n\n\n\n"} +{"label": "74", "index": "36978", "code": "void main()\n{\n\tint ishw(long n);\n\tint isprime(long n);\n\tlong m,n,first,flag=0,i;\n\tscanf(\"%ld%ld\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t\tif(isprime(i)&&ishw(i))\n\t\t{\n\t\t\tprintf(\"%d\",i);\n\t\t\tfirst=i;\n\t\t\tflag=1;\n\t\t\tbreak;\n\t\t}\n\tfor(i=first+1;i<=n;i++)\n\t\tif(isprime(i)&&ishw(i))\n\t\t{\n\t\t\tprintf(\",%d\",i);\n\t\t}\n\n\n\tif(flag==0)\n\t\t\tprintf(\"no\\n\");\n}\nint isprime(long n)\n{\n\tlong i,k;\n\tk=n/2;\n\tfor(i=2;i<=k;i++)\n\t\tif(n%i==0)\n\t\t{\n\t\t\treturn(0);\n\t\t\tbreak;\n\t\t}\n\tif(i>k)\n\t\treturn(1);\n\telse return(0);\n}\nint ishw(long n)\n{\n\tlong i,j,k,place=0;\n char s[9];\n\tfor(i=0;n!=0;i++)\n\t{\n\t\ts[i]=n%10;\n\t\tn/=10;\n\t\tplace=i+1;\n\t}\n\t\t//ltoa(n,s,10);/*?????????????*/\n\t\tk=place;\n\t\tj=-1;\n\t\tdo\n\t\tj++;\n\t\twhile(s[j]==s[k-j-1]&&j+1<=k/2);\n\t\tif(j+1>k/2)\n\t\t\treturn(1);\n\t\telse return(0);\n}\n\t"} +{"label": "74", "index": "36979", "code": "int huiwen(int a,int n)\n{\nif(a/10==0) return(n*10+a);\nelse return(huiwen(a/10,n*10+a%10));\n}\n\nmain()\n{\nint a,b,j,flag1,flag2=0,i,k,h;\nscanf(\"%d%d\",&a,&b);\n for(i=a;i<=b;i++)\n {\n\t flag1=1;\n k=sqrt(i);\n for(j=2;j<=k;j++)\n\t{\n\t\tif(i%j==0) flag1=0;\n\t}\n if(flag1) \n\t{\n\t\th=huiwen(i,0);\n\t\tif(h==i) \n\t\t{\n\t\t\tif(flag2!=0) printf(\",\");\n\t\t\tprintf(\"%d\",i);\n\t\t\t\n\t\t\tflag2=1;\n\t\t}\n\t}\n }\n if(flag2==0) printf(\"no\");\n}\n"} +{"label": "74", "index": "36980", "code": "void main()\n{\n\tint m,n,i,j,k=0,x;\n\tscanf(\"%d%d\",&m,&n);\n\tif(m==2) \n\t{\n\t\tk=1;\n\t\tprintf(\"2\");\n\t}\n if(m%2==0) m=m+1;\n\tfor(i=m;i<=n;i+=2)\n\t{\n\t\tfor(j=3;j<=sqrt(i);j=j+2)\n\t\t{\n\t\t\tif(i%j==0) break;\n\t\t}\n\t\tif(j>sqrt(i))\n\t\t{\n\t\t\tif(i<10) x=i;\n\t\t\telse if(i<100) x=i%10*10+i/10;\n\t\t\telse if(i<1000) x=i/100+i%100/10*10+i%10*100;\n\t\t\telse if(i<10000) x=i/1000+i%1000/100*10+i%100/10*100+i%10*1000;\n\t\t\telse x=i/10000+i%10000/1000*10+i%1000/100*100+i%100/10*1000+i%10*10000;\n\t\t\tif(x==i)\n\t\t\t{\n\t\t\t\tif(k==0) printf(\"%d\",i);\n\t\t\t\telse printf(\",%d\",i);\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\tif(k==0) printf(\"no\\n\");\n}\n\n\n\n"} +{"label": "74", "index": "36981", "code": "void main()\n{int m,n,a,b,c,i;\nint sushu(int x);\nint huiwen(int y);\nscanf(\"%d%d\",&m,&n);\nfor(i=m;i<=n;i++)\n{\n\ta=sushu(i);\n\tif(a==1)\n\t{\n\t\tb=huiwen(i);\n\t\tif(b==1)\n\t\t{\n\t\t\tm=i;\n\t\t\tprintf(\"%d\",i);\n\t\t\tc=1;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\tc=0;\n\t}\n}\nif(c==0)\nprintf(\"no\");\nelse\n{\n\tfor(i=m+1;i<=n;i++)\n\t{\n\t\ta=sushu(i);\n\t\tif(a==1)\n\t\t{\n\t\t\tb=huiwen(i);\n\t\t\tif(b==1)\n\t\t\t\tprintf(\",%d\",i);\n\t\t}\n\t}\n}\n}\nint sushu(int x)\n{\n\tint j,u;\n\tfor(j=2;j<=x/2;j++)\n\t{\n\t\tif(x%j==0)\n\t\t{\tu=0;\n\t\tbreak;}\n\t\telse\n\t\t\tu=1;\n\n\t}\n\treturn(u);\n}\nint huiwen(int y)\n{\n\tint p=y;\n\tint q=0;\n\twhile(p>0)\n\t{\n\t\tint r=p%10;\n\t\tq=q*10+r;\n\t\tp=p/10;\n\t}\n\tif(q==y)\n\t\treturn(1);\n\telse\n\t return(0);\n}"} +{"label": "74", "index": "36982", "code": "int prime(int x)\n{\n int i,m;\n double k;\n k=sqrt(x);\n for(i=2;i<=k;i++)\n {if(x%i==0)\n break;}\n if(i>k) m=1;\n else m=0;\n return m;\n}\nint round(int y)\n{\n int a[10000],j,n,l,sum=0,c;\n for(j=0;y!=0;j++)\n {a[j]=y%10;\n y=y/10;}\n for(l=0;l=i-1)\n\tif (hw(i))\n\t{\n \n\t t=t+1;\n\t if(t==1)\n\t\t printf(\"%d\",i);\n\t else\n\t\t printf(\",%d\",i);\n\t}\n\t\n\t}\n\n\n\t}\n\t\n\t\n\t\n\t\n\tif(t==0)\n\t\tprintf(\"no\");\n}\n\n\nint hw(int(c))\n{\n\tint x,y;\n\tx=0;\n\ty=c;\n\tdo\n\t{x=10*x+y%10;\n\ty=y/10;\n\t}\n\twhile(y>0);\n\tif (x==c)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}"} +{"label": "74", "index": "36984", "code": "void main()\n{int a(int x);\nint b(int y);\t\n\tint m,n,i=0,k,j;\n\tint c[20];\n\tscanf(\"%d %d\",&m,&n);\n\tfor(k=m;k<=n;k++)\n\t{if(a(k)==1&&k==b(k))\n\t\t{c[i]=k;\n\ti++;}\n\t}if(i==0)printf(\"no\");\n\telse{printf(\"%d\",c[0]);\n\t\tfor(j=1;jk)return(1);\n\t\t\telse return(0);\n\t}\nint b(int y)\n{\n\tint a1,a2,a3,a4,a5,a6,a7,a8;\n\tint z;\n\ta1=y/10000000;\n\ta2=(y%10000000)/1000000;\n\ta3=(y%1000000)/100000;\n\ta4=(y%100000)/10000;\n\ta5=(y%10000)/1000;\n\ta6=(y%1000)/100;\n\ta7=(y%100)/10;\n\ta8=y%10;\n\tif(a1!=0)z=a8*10000000+a7*1000000+a6*100000+a5*10000+a4*1000+a3*100+a2*10+a1;\n\telse if(a2!=0)z=a8*1000000+a7*100000+a6*10000+a5*1000+a4*100+a3*10+a2;\n\t\telse if(a3!=0)z=a8*100000+a7*10000+a6*1000+a5*100+a4*10+a3;\n\t\telse if(a4!=0)z=a8*10000+a7*1000+a6*100+a5*10+a4;\n\t\telse if(a5!=0)z=a8*1000+a7*100+a6*10+a5;\n\t\telse if(a6!=0)z=a8*100+a7*10+a6;\n\t\telse if(a7!=0)z=a8*10+a7;\n\t\telse z=a8;\n\t\treturn(z);\n}\n\n\n"} +{"label": "74", "index": "36985", "code": "int main()\n{\n\tint m,n,i,k=2,t=0,u,s=0,r=1,b=1,flag=1;\n\t\n\tscanf(\"%d %d\",&m,&n);\n\tfor(i=m;i<=n;i++){\n\t\tfor(k;k0)\n\t{\n\t\tn=n*10+y%10;\n\t\ty=y/10;\n\t}\n\tif(x==n)\n\t\treturn 1;\n\telse return 0;\n}\nint f2(int x)\n{\n\tint i=2;\n\twhile(x%i!=0&&i<=sqrt(x))\n\t\ti++;\n\tif(i>sqrt(x))\n\t\treturn 1;\n\telse return 0;\n}\n"} +{"label": "74", "index": "36987", "code": "void main()\n{\n\tint m, n,a,i,j,temp,x,y;\n\tscanf(\"%d\",&m);\n\tscanf(\"%d\",&n);\n\tfor(j=0;m<=n;m++)\n\t{\n\t\tif(m==1)\n\t\t\tcontinue;\n\t\tfor(i=2;i0)\n\t\t\t{\t\n\t\t\t\tx=temp%10;\n\t\t\t\ty=y*10+x;\n\t\t\t\ttemp=temp/10;\n\t\t\t}\n\t\t\tif(m==y) //?????\n\t\t\t{ \n\t\t\t\tj=j+1; //??m????????\n\t\t\t\tif(j==1)\n\t\t\t\t\tprintf(\"%d\",m);\n\t\t\t else\n\t\t\t\t\tprintf(\",%d\",m);\n\t\t\t}\n\t\t}\n\t}\n\tif(j==0)\n\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36988", "code": "\nint su(int i)\n{\n\tif (i==1) return(0);\n\telse\n\t{\n\t int j,k,flag=1;\n\t k=sqrt(i);\n\t for (j=2;j<=k;j++)\n\t\t{\n\t\t if (i%j==0)\n\t\t\t{\n\t\t\t flag=0;\n\t\t\t break;\n\t\t\t}\n\t\t}\n\treturn(flag);\n\t}\n}\n\nint huiwen(int i)\n{\n\tint k=0,x;\n\tx=i;\n\twhile (i>0)\n\t{\n\t\tk=10*k+i%10;\n\t\ti=i/10;\n\t}\n\tif (x==k)\n\t\treturn(1);\n\telse\n\t\treturn(0);\n}\n\nvoid main()\n{\n\tint i,m,n,a[100],k=0;\n\tscanf(\"%d%d\",&m,&n);\n\tfor (i=m;i<=n;i++)\n\t\tif (su(i)&&huiwen(i))\n\t\t{\n\t\t\ta[k]=i;\n\t\t\tk++;\n\t\t}\n\tif (k==0) printf(\"no\");\n\telse\n\t{\n\t\tfor (i=0;i=0;k++,o--){\n\t\t\tif (a[k]==p[o]) v++;\n\t\t}\n\t\tif (t==2 && v==z){\n\t\t\tl[b]=i;\n\t\t\tb++;\n\t\t}\n\t}\n\tif (b==0) printf (\"no\");\n else printf (\"%d\",l[0]);\n for (i=1;i=1)\n\t{m=10*m+n%10;\n\tn=n/10;}\n\n\tif(m==t)\n\t\treturn 1;\n\telse return 0;\n\t\n}\nint su(long n)\n{\n\tlong m,i,k;\n\tif(n==2)\n\t\treturn 1;\n\telse if(n%2==0)\n\t\treturn 0;\n\telse for(i=3;i1)\n\t\t\t\tfor(i=1;ik)\n\t\t\tp=1;\n\t\ty=x;\n\t\tj=0;\n\t\twhile(y>=1)\n\t\t{\n\t\t\ty=(double)y/10;\n\t\t\tj++;\n\t\t}\n\t\ty=x;\n\t\tfor(i=0;ik) a++;\n\t\tnum=i;\n\t\tfor(j=0;j<9;j++)\n\t\t{\n\t\t\twan[j]=num%10;\n\t\t\tnum=num/10;\n\t\t\twei=j;\n\t\t\tif(num<1) break;\n\t\t}\n\t\tfor(j=0;j<=wei;j++)\n\t\t{\n\t\t\tif(wan[j]!=wan[wei-j]) break;\n\t\t}\n\t\tif(j>wei) b++;\n\t\tif(a*b!=0)\n\t\t{\n\t\t\tz[zz]=i;\n\t\t\tzz++;\n\t\t}\n\t}\n\tif(zz==0) printf(\"no\");\n\telse\n\t{\n\t\tfor(i=0;isqrt(i))\n\t{k=i;\n\t s=0;\n\t while(k>0)\n\t {s=10*s+k%10;\n\t k=k/10;}\n\t if(s==i)\n\t {if(t!=0)\n\t printf(\",\");\n\t printf(\"%d\",i);\n\t if(t==0)\n\t\t t++;}\n\t}\n\t}\n if(t==0)\n\t printf(\"no\");\n}"} +{"label": "74", "index": "36996", "code": "int main()\n{\n int m,n,i,t,j,y,a,b;\n scanf(\"%d %d\",&m,&n);\n for(i=m,t=0;i<=n;i++)\n {\n for(j=2;jsqrt(x)) return(1);\n\telse return(0);\n}\nvoid main()\n{\n\tlong m,n,i,j=0;\n\tscanf(\"%ld%ld\",&m,&n);\n\tfor(i=m;i<=n;i++)\n\t\tif(reverse(i)&&prime(i))\n\t\t{\n\t\t\tj++;\n\t\t\tprintf((j==1)?\"%ld\":\",%ld\",i);\n\t\t}\n\t\tif(j==0)\n\t\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36998", "code": "void main()\n{\n\tint m,n,i,j,a=0,b=0,c=0,d,p=0,q=0,k=0;\n\tscanf(\"%d%d\",&m,&n);\n\tif(m%2==0)\n\t\tm=m+1;\n\tfor(i=m;i<=n;i=i+2)\n\t{\n\t\tfor(j=3;j<=sqrt(i);j=j+2)\n\t\t{\n\t\t\tif(i%j!=0)\n\t\t\t{\n\t\t\t\tb=b+1;}\n\t\t\telse\n\t\t\t{b=0;break;}\n\t\t}\n if(b!=0)\n\t\t { \n\t\t\t d=i;\n\t\t\t q=q+1;\n\t\t\t while(d>0)\n\t\t\t{\n\t\t\t\ta=d%10;\n\t\t\t\tc=10*c+a;\n\t\t\t\td=d/10;\n\t\t\t}\n\t\t\tif(c==i)\n\t\t\t{p=p+1;\n\t\t\tk=k+1;\n\t\t\tif(p==1)\n\t\t\t{printf(\"%d\",i);\n\t\t\tc=0;}\n\t\t\telse\n\t\t\t{printf(\",%d\",i);\n\t\t\tc=0;}\n\t\t\t}\n\t\t else\n\t\t { c=0;}}\n\t\t \n\t\t\n\n\t\t \n\n\t}\n\n\t\t\tif(q==0||k==0)\n\t\t\tprintf(\"no\");\n}"} +{"label": "74", "index": "36999", "code": "int huiwen(long n)\n{\n\tint a[11],i=0;\n\twhile(n!=0)\n\t{\n\t\ta[i]=n%10;\n\t\ti++;\n\t\tn=n/10;\n\t}\n\tint j;\n\tfor(j=0;jn)\n\t{\n\t\ttemp=m;\n\t\tm=n;\n\t\tn=temp;\n\t}\n\tfor(i=m;i<=n;i++)\n\t{\n\t\tif(huiwen(i)&&sushu(i))\n\t\t{\n\t\t\tprintf(\"%ld\",i);\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(count==0)\n\t\tprintf(\"no\");\n\telse \n\t\tfor(i++;i<=n;i++)\n\t\t{\n\t\t\tif(huiwen(i)&&sushu(i))\n\t\t\t\tprintf(\",%ld\",i);\n\t\t}\n}"} +{"label": "75", "index": "37000", "code": "\nint main()\n{\n\tint x[1001],y[1001],i=1,j,t,r[1001]={0},max,maxy;\n\tchar c=',';\n\tfor(;;)\n\t{\n\t\tcin>>x[i];\n\t\tc=getchar();\n\t\tif (c=='\\n') break;\n\t\ti++;\n\t}\n\ti=1;\n\tfor(;;)\n\t{\n\t\tcin>>y[i];\n\t\tc=getchar();\n\t\tif (c=='\\n') break;\n\t\ti++;\n\t}\n\tmaxy=0;\n\tfor (j=1;j<=i;j++)\n\t\tif (y[j]>maxy)\n\t\t\tmaxy=y[j];\n\tmax=0;\n\tfor (t=0;t<=maxy;t++)\n\t{\n\t\tfor (j=1;j<=i;j++)\n\t\t{\n\t\t\tif ((x[j]<=t) && (t>time1[people])\n\t{\n\t\tpeople++;\n\t\tif(cin.peek()=='\\n')\n\t\t\tbreak;\n\t\tcin.ignore();\n\t}\n\tfor(int k=0;k!=people-1;k++)\n\t\tcin>>time2[k]>>nouse;\n\tcin>>time2[people-1];\n\n\tfor(int k=0;k!=people;k++)\n\t{\n\t\tfor(int time=time1[k];time!=time2[k];time++)\n\t\t{\n\t\t\tnum_of_time[time]++;\n\t\t}\n\t}\n\tint max=0;\n\tfor(int k=0;k!=1000;k++)\n\t\tif(num_of_time[k]>max)\n\t\t\tmax=num_of_time[k];\n\n\tcout<max) max=c[g];\n\t}\n\tcout<k) k = tm[j]; \n }\n printf(\"%d %d\",t,k);\n return 0; \n}"} +{"label": "75", "index": "37004", "code": "/*????? \n \n?? ??-From WHF \n?? \n???????????????????????????????????????????????????????????????????????i????????????????????xi, yi????????????????t?? xi <= t < yi????????????????????? 0 <= xi < yi<1000?????????????????????????????????????????\n \n???? \n????2???2????????? \n?1????i???????xi?????????? \n?1????i??????????yi??????????? \n??? \n2,5,4,6,7,3,1,6,2 \n5,6,7,7,8,4,3,9,4 \n\n???9????????????? \n[2,5),[5,6),[4,7),[6,7),[7,8),[3,4),[1,3),[6,9),[2,4)\n \n???? \n??????????????????????????????? \n???????????????9????????3????????????[2,5),[1,3),[2,4)\n \n???? \n2,5,4,6,7,3,1,6,2\n5,6,7,7,8,4,3,9,4\n\n \n???? \n9 3\n\n \n?? \n? \n*/\nint change(char a[],int n)\n{\n\tint i;\n\tint s=0;\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\ts=s*10+a[i]-'0';\n\t}\n\treturn(s);\n}\nmain()\n{\n\tint n=0,i=0,j=0,k;\n\tchar s1[10000],s2[10000],x1[1000][1000],y1[1000][1000];\n\tint x[1000],y[1000],xl[1000],yl[1000],num[1000]={0};\n\tgets(s1);\n\tgets(s2);\n\tfor(k=0;k<=strlen(s1)-1;k++)\n\t{\n\t\tif(s1[k]!=',')\n\t\t{\n\t\t\tx1[i][j]=s1[k];\n\t\t\tj++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\txl[i]=j;\n\t\t\ti++;\n\t\t\tj=0;\n\t\t}\t\n\t}\n\tif(k==strlen(s1))\n\t{\n\t\txl[i]=j;\n\t\ti++;\n\t}\n\tn=i;\n\tj=0;i=0;\n\tfor(k=0;k<=strlen(s2)-1;k++)\n\t{\n\t\tif(s2[k]!=',')\n\t\t{\n\t\t\ty1[i][j]=s2[k];\n\t\t\tj++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tyl[i]=j;\n\t\t\ti++;\n\t\t\tj=0;\n\t\t}\t\n\t}\n if(k==strlen(s2))\n\t{\n\t\tyl[i]=j;\n\t\ti++;\n\t}\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tx[i]=change(x1[i],xl[i]);\n\t\ty[i]=change(y1[i],yl[i]);\n\t}\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tnum[i]=0;\n\t}\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\tif(i>=x[j]&&i=k)\n\t\t{\n\t\t\tk=num[i];\n\t\t}\n\t}\n\tprintf(\"%d %d\",n,k);\n}"} +{"label": "75", "index": "37005", "code": "int main()\n{\n\tint x[1001] , y[1001] , t[1001] = {0} ;\n\tint i , j , k , m = 0 ;\n\tchar a = ',' ;\n\tfor (i = 1 ; a == ',' ; i ++)\n\t{\n\t\tcin >> x[i] ;\n\t\ta = cin.get();\n\t}\n\ta = ',' ;\n\tfor (i = 1 ; a == ',' ; i ++)\n\t{\n\t\tcin >> y[i] ;\n\t\ta = cin.get() ;\n\t}\n\tcout << i - 1 << \" \" ;\n\tfor(j = 1; j < i; j++)\n\t{\n\t\tfor(k = x[j]; k < y[j]; k++)\n\t\t\tt[k] = t[k] + 1;\n\t}\n\tfor(int l = 1; l <= 1000; l++)\n\t{\n\t\tif(t[l] > m)\n\t\t\tm = t[l];\n\t}\n\tcout << m << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37006", "code": "int main()\n{\n\tint x[1001], y[1001],i = 1, j, k, t = 0, p = 1, l, a[10000], m;\n\tchar c;\n\tfor (i = 1; ; i++)\n\t{\n\t\tcin >> x[i];\n\t\tcin.get(c);\n\t\tif (c == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 1; ; i++)\n\t{\n\t\tcin >> y[i];\n\t\tcin.get(c);\n\t\tif (c == '\\n')\n\t\t\tbreak;\n\t}\n\tcout << i << \" \";\n\tfor (j = 1; j <= i; j++)\n\t{\n\t\tfor (k = x[j]; k < y[j]; k++)\n\t\t{\n\t\t\tfor (l = 1; l <= i; l++)\n\t\t\t{\n\t\t\t\tif (x[l] <= k && y[l] > k)\n\t\t\t\t\tt++;\n\t\t\t}\n\t\t\ta[p] = t;\n\t\t\tp++;\n\t\t\tt = 0;\n\t\t}\n\t}\n\tp--;\n\tm = a[1];\n\tfor (j = 2; j <= p; j++)\n\t{\n\t\tif (m < a[j])\n\t\t{\n\t\t\tm = a[j];\n\t\t}\n\t}\n\tcout << m;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37007", "code": "\nint Convert(int *n,char *s);\n\nint main()\n{\n int x[2000]={0},y[2000]={0};\n char s1[4000],s2[4000];\n int t,i,num,count=0,max=0;\n \n gets(s1);\n gets(s2);\n \n num=Convert(x,s1);\n Convert(y,s2);\n printf(\"%d\",num);\n\n for(t=0;t<1000;t++)\n {\n for(i=0,count=0;i=x[i]&&tmax)\n max=count;\n }\n\n printf(\" %d\",max);\n return 1;\n}\n\nint Convert(int *n,char *s)\n{\n int lenth,i,j;\n lenth=strlen(s);\n for(i=0,j=0;imax) max=b[i];\n }\n for(i=min;i<=max;i++)\n {\n r=0;\n for(j=0;ji) r++;\n if(r>ren) ren=r;\n }\n printf(\"%d %d\",n,ren);\n return 0;\n}\n"} +{"label": "75", "index": "37009", "code": "//********************************\n//*???????? **\n//*?????? 1300012757 **\n//*???2013.10.30 **\n//********************************\nint main()\n{\n\tint a[1000], b[1000];\n\tint start, end, i = 0;\n\tdo\n\t{\n\t\tcin >> start;\n\t\ta[i] = start;\n\t\ti ++;\n\t}while (cin.get() == ',');\n\ti = 0;\n\tdo\n\t{\n\t\tcin >> end;\n\t\tb[i] = end;\n\t\ti ++;\n\t}while (cin.get() == ',');\n\tint t0 = 0,t = 0;\n\tfor (int j =0;j < 1000 ; j++)\n\t{\n\t\tfor (int p =0; p < i; p ++)\n\t\t{\n\t\t\tif (a[p] <= j && b[p] > j)\n\t\t\t\tt ++;\n\t\t}\n\t\tif (t > t0 ) t0 = t;\n\t\tt = 0;\n\t}\n\tcout << i <<\" \" << t0;\n\treturn 0;\n\n}\n\t"} +{"label": "75", "index": "37010", "code": "// 3.cpp : ??????????????\n//\n\nchar x[5000],y[5000]; //x?y????????\n\nint vis[1010]={0}; //????\nint xx[1001]={0}; //????????????\nint yy[1001]={0};\nint main()\n{\n //freopen(\"1.in\",\"r\",stdin);\n //freopen(\"1.out\",\"w\",stdout);\n cin.getline(x,5000);\n cin.getline(y,5000);\n int lenx=strlen(x),leny=strlen(y);\n int ans1=1; // ??\n for(int i=0;i=0;i--)\n { \n if(x[i]!=',') \n {\n xx[k]+=(x[i]-'0')*t; \n t=t*10;\n }\n else \n {\n t=1;\n k++;\n }\n }\n k=0;t=1;\n for(int i=leny-1;i>=0;i--)\n { \n if(y[i]!=',') \n {\n yy[k]+=(y[i]-'0')*t; \n t=t*10;\n }\n else \n {\n t=1;\n k++;\n }\n } \n for(int i=0;imax) max=vis[j];\n cout<0)\n\t\t\tmax++;\n\tfor(i=1;i<=1000;i++)\n\t{\n\t\tint temp;\n\t\tfor(j=1,temp=0;j<=n;j++)\n\t\t\tif(data[1][j]<=i&&data[2][j]>i)\n\t\t\t\ttemp++;\n\t\tif(max<=temp)\n\t\t\tmax=temp;\n\t}\n\tprintf(\" %d\",max);\n}"} +{"label": "75", "index": "37012", "code": "//********************************\n//*??? ????? **\n//*?????? 1300012887 **\n//*???2013.10.31 **\n//********************************\nint main()\n{\n\tchar ch, dh;\n\tint i, j, l, k, m, t = 0, x[1002], y[1002], z[1002];\n\tfor (k = 0; k <= 1001; k++) //????z?????????????????????\n\t\tz[k] = 0;\n\tfor (i = 0; i < 1001; i++) //??????????\n\t{\n\t\tcin >> x[i];\n\t\tch = cin.get();\n\t\tif(ch != ',')\n\t\t\tbreak;\n\t}\n\tfor (j = 0; j <= 1001; j++) //??????????\n\t{\n\t\tcin >> y[j];\n\t\tdh = cin.get();\n\t\tif(dh != ',')\n\t\t\tbreak;\n\t}\n\tfor (l = 0; l <= i; l++) //??????????????????????????\n\t for (k = x[l]; k < y[l]; k++) //???????????\n\t z[k] = z[k] + 1; \n\tfor (m = 0; m <= 1001; m++) //???????????\n\t{\n\t\tif (t <= z[m])\n\t\t\tt = z[m];\n\t}\n\tcout << i+1 << \" \" << t << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37013", "code": "int main()\n{\n\tint a[1000],b[1000],cnt=0,i=1,j,max=0;\n\tint c[1000];\n\tchar dou;\n\twhile(1)\n\t{\n\t\tcin>>a[i];\n\t\ti++;\n\t\tcnt++;\n\tif(\tcin.get()!=',')break;\n\n\t\n\t}\n\n for(i=0;i<=999;i++)\n\t{\n\t\tc[i]=0;\n\t}\n\t\n\tfor(i=1;i<=cnt-1;i++)\n\t{cin>>b[i];\n\tcin>>dou;}\n\tcin>>b[cnt];\n\tfor(i=1;i<=cnt;i++)\n\t{\n\t\tfor(j=a[i];jmax)max=c[i];\n\t}\n\tcout<max) max=time[i];\n printf(\"%d %d\",people,max);\n return 7;\n}\n"} +{"label": "75", "index": "37015", "code": "//?????\n//2010?11?24?\n//1000012753 ???\nint main()\n{\n\tint i, j = 0, k, x[2000], y[2000], count[2000] = {0}, max;\n\tchar temp[2000];\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> x[i];\n\t\ttemp[i] = cin.get();\n\t\tj++;\n\t\tif (temp[i] == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; i < j ; i++)\n\t{\n\t\tcin >> y[i];\n\t\ttemp[i] = cin.get();\n\t\tif (temp[i] == '\\n')\n\t\t\tbreak;\n\t}\n\tmax = 0;\n\tfor (i = 0; i <= 1000; i++)\n\t{\n\t\tfor (k = 0; k < j; k++)\n\t\t{\n\t\t\tif (x[k] <= i && y[k] > i)\n\t\t\t\tcount[i]++;\n\t\t}\n\t\tif (count[i] > max)\n\t\t\tmax = count[i];\n\t}\n\tcout << j << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37016", "code": "\nint n=0;\nint people(int x[1000],int y[1000])\n{\n\tint i,j,count[1000]={0},max=0;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tfor(j=0;j=x[j]&&imax)\n\t\t\tmax=count[i];\n\t}\n\treturn max;\n}\n\n\n\n\nint main()\n{\n\tint i=1,x[1000]={0},y[1000]={0};\n\tcin>>x[0];\n\tn=1;\n\twhile(cin.get()!='\\n')\n\t{ \n\t\tscanf(\"%d\",&x[n]);\n\t\tn++;\n\t}\n\tcin>>y[0];\n\twhile(cin.get()!='\\n')\n\t{\n\t\tscanf(\"%d\",&y[i]);\n\t\ti++;\n\t}\n\tcout<max) max=aa[sum1];\n if(aa[sum1]max) max=bb[sum2];\n if(bb[sum2]=aa[j]&&iMax) Max=people[i];\n\n\n }\n cout<=1;i--)\n {if(x[i]>x[i+1]){t=x[i];x[i]=x[i+1];x[i+1]=t;}}\n // for(i=1;i<=4;i++)printf(\"%d\",x[i]);\n \n i=0; \n do{\n i++;\n scanf(\"%d\",&y[i]);if(y[i]>a[0];\n\tchar d;\n\tfor(i=1;i<1000;i++)\n\t\t{\n\t\tif(cin.peek()==',')\n\t\t {\n\t\t\tcin>>d;\n\t\t\tcin>>a[i];\n\t\t }\n\t\telse\n\t\t\tbreak;\n\t\t}\n\ts=i-1;\n\tcin>>b[0];\n\tfor(i=1;i<1000;i++)\n\t\t\t{\n\t\t\tif(cin.peek()==',')\n\t\t\t {\n\t\t\t\tcin>>d;\n\t\t\t\tcin>>b[i];\n\t\t\t }\n\t\t\telse\n\t\t\t\tbreak;\n\t\t\t}\n\tfor(i=0;i<=s;i++)\n\t\tfor(int j=a[i];jmax)\n\t\t\tmax=c[i];\n\tcout<> x[i];\n\t\tch = cin.get();\n\t\tif (ch != ',')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> y[i];\n\t\tch = cin.get();\n\t\tif (ch != ',')\n\t\t\tbreak;\n\t}\n\tfor (j = 0; j <= i; j++)\n\t{\n\t\tfor (k = x[j]; k < y[j]; k++)\n\t\t{\n\t\t\tt[k] = t[k] + 1;\n\t\t\tif (t[k] > max) \n\t\t\t\tmax = t[k];\n\t\t}\n\t}\n\t\t\n\tcout << i + 1 << \" \" << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37021", "code": "\nint main()\n{\n\tint arr[1001];\n\tint left[1001];\n\tint cnt;\n\tint i,j,k;\n\twhile(scanf(\"%d\",&arr[0])!=EOF)\n\t{\n\t\tcnt=1;\n\t\tchar ch;\n\t\twhile(scanf(\"%c\",&ch)!=EOF&&ch==',')\n\t\t{\n\t\t\tscanf(\"%d\",&arr[cnt]);\n\t\t\tcnt++;\n\t\t}\n\t\tfor(i=0;imax)\n\t\t\t\tmax=left[i];\n\t\t}\n\t\tint count=0;\n\t\tint mcnt=0;\n\t\tfor(i=min;i<=max;i++)\n\t\t{\n\t\t\tcount=0;\n\t\t\tfor(j=0;ji)\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif(count>mcnt)\n\t\t\t\tmcnt=count;\n\t\t}\n\t\tprintf(\"%d %d\\n\",cnt,mcnt);\n\t}\n}"} +{"label": "75", "index": "37022", "code": "\nint main(){\nint a[1000],b[1000];\nchar c;\nint i=0;\nint max=0;\n\nwhile(true){\n\tcin>>a[i];\n\tif((c=cin.get())=='\\n')\n\t\tbreak;\n\telse i++;\n}\n\nint sum=i+1;\ni=0;\nwhile(true){\n\tcin>>b[i];\n\tif((c=cin.get())=='\\n')\n\t\tbreak;\n\telse i++;\n}\n\n\n\nfor(i=0;i=a[n]&&j> a[i]) //???????????+1?????????? \n {\n sum++;\n c = cin.get();\n if ( c == ',') //????????????????????????? \n i++;\n else //????????\u0093????\u0094????????sum???????? \n break;\n }\n \n int b[sum]; //????sum??????b??????????????? \n for ( i = 0; i <= sum - 1; i++ ) //??????????????b????? \n {\n cin >> b[i];\n cin.get();\n }\n //????i????????????????????a[i-1],b[i-1]\n \n int d[1000]; //??????d?????????????????d[0]??0?????????d[15]??15???????? \n for ( i = 0; i <= 999; i++ ) //??????????????0 \n d[i] = 0;\n \n //?????a[i]?????b[i]????????J??? J >= a[i] ? J < b[i]??????????d[j]++???j?????????+1 \n for ( i = 0; i <= sum - 1; i++ ) \n { \n for ( j = 0; j <= 999; j++ )\n {\n if ( j >= a[i] && j < b[i] )\n d[j]++;\n }\n }\n \n for ( i = 1; i <= 999; i++ ) //??????d??????????????????????d[999]????????????? \n {\n for ( j = 0; j <= 999 - i; j++ )\n {\n if ( d[j] > d[j+1])\n {\n p = d[j+1];\n d[j+1] = d[j];\n d[j] = p;\n }\n }\n }\n \n cout << sum << \" \"<< d[999] << endl;\n}\n"} +{"label": "75", "index": "37026", "code": "int max(int x,int y)\n{\n return(x>y?x:y);\n}\n\nint main()\n{ //int a[1000];\n int x[1000];\n int y[1000];\n int z[1000]={0,0};\n int t;\n int m=0;\n char c;\n int i=1,num=0;\n //if(getchar()=='\\n')\n //{\n\n // if(getchar()=='\\n')\n // cout<<0<<\" \"<<0;\n // }\n //else\n // {\n cin>>x[0];\n while(getchar()!='\\n')\n {\n\n cin>>x[i];\n\n\n i=i+1;\n num=num+1;\n\n }\n//cout<>y[i];\n cin>>c;\n\n }\n cin>>y[num];\n for(i=0;i<=num;i++)\n {\n for(t=0;t<10000;t++)\n {\n if(t>=x[i]&&tm) m=x[i];\n\n\n\t\tprintf(\"%d %d\",n,m);\n}\n\n\n\t"} +{"label": "75", "index": "37028", "code": "int main()\n{\n\tchar temp = 0;\n\tint time[1000] = {0}, t[2][1000] = {0}, num = 0,i = 0, j = 0, max = 0;\n\tfor (i = 0; i < 2; i++, temp = 0)\n\t\tfor (j = 0; temp != '\\n'; j++)\n\t\t{\n\t\t\tcin >> t[i][j];\n\t\t\ttemp = cin.get();\n\t\t}\n\tnum = j;\n\tfor (i = 0; i < num; i++)\n\t\tfor (j = t[0][i]; j < t[1][i]; j++)\n\t\t\ttime[j]++;\n\tfor (i = 0; i < 1000; i++)\n\t\tif (time[i] > max)\n\t\t\tmax = time[i];\n\tcout << num << \" \"<< max;\n\treturn 0;\n}"} +{"label": "75", "index": "37029", "code": "int main()\n{\n\tchar time1[10000],time2[10000];\n\tint timein[1000],timeout[1000],sta[1000];\n\tint i,j=0,k,flag=0,max=0,people=0;\n\tcin.getline(time1,10000);//???????????\n\tcin.getline(time2,10000);//???????????\n\tfor(i=0;i<10000;i++)//????\n\t{\n\t\tif(time1[i]==',')\n\t\t\tpeople++;\n\t\telse if(time1[i]=='\\0')\n\t\t\tbreak;\n\t}\n\tif(people!=0)\n\t\tpeople++;\n\tfor(i=0;i<1000;i++)//???\n\t{\n\t\ttimein[i]=-1;\n\t\ttimeout[i]=-1;\n\t\tsta[i]=0;\n\t}\n\tfor(i=0;i<10000;i++)//?????????????????\n\t{\n\t\tif(time1[i]==',')\n\t\t{\n\t\t\ttimein[j]=0;\n\t\t\tfor(k=i-1;k>=flag;k--)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttimein[j]=timein[j]+(time1[k]-'0')*(int)pow(10.0,(double)(i-1-k));\n\t\t\t}\n\t\t\tflag=i+1;\n\t\t\tj++;\n\t\t}\n\t\telse if(time1[i]=='\\0')\n\t\t{\n\t\t\ttimein[j]=0;\n\t\t\tfor(k=i-1;k>=flag;k--)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttimein[j]=timein[j]+(time1[k]-'0')*(int)pow(10.0,(double)(i-1-k));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tflag=0;j=0;\n\t\n\tfor(i=0;i<10000;i++)//?????????????????\n\t{\n\t\tif(time2[i]==',')\n\t\t{\n\t\t\ttimeout[j]=0;\n\t\t\tfor(k=i-1;k>=flag;k--)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttimeout[j]=timeout[j]+(time2[k]-'0')*(int)pow(10.0,(double)(i-1-k));\n\t\t\t}\n\t\t\tflag=i+1;\n\t\t\tj++;\n\t\t}\n\t\telse if(time2[i]=='\\0')\n\t\t{\n\t\t\ttimeout[j]=0;\n\t\t\tfor(k=i-1;k>=flag;k--)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttimeout[j]=timeout[j]+(time2[k]-'0')*(int)pow(10.0,(double)(i-1-k));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tfor(i=0;i<1000;i++)//??????????\n\t{\n\t\tif(timein[i]!=-1)\n\t\t{\n\t\t\tfor(k=timein[i];kmax)\n\t\t\tmax=sta[i];\n\t}\n\tcout<> x[num];\n\t\tnum++;\n\t\tp=cin.get();\n\t}\n\twhile (p!='\\n');\n\tnum=0;\n\tdo\n\t{\n\t\tcin >> y[num];\n\t\tnum++;\n\t\tp=cin.get();\n\t}\n\twhile (p!='\\n');\n\tfor (i=0; i<=num; i++)\n\t{\n\t\tif ( y[i] > tmax )\n\t\t\ttmax = y[i];\n\t}\n\tfor (t=0; t<=tmax; t++)\n\t{\n\t\tfor (i=0; i<=num; i++)\n\t\t{\n\t\t\tif ( t< y[i] && t>= x[i] )\n\t\t\t\tN[t]++;\n\t\t}\n\t}\n\tfor ( t=0; t<=tmax; t++ )\n\t{\n\t\tif (N[t] > Nmax )\n\t\t\tNmax = N[t];\n\t}\n\tcout << num << \" \" << Nmax << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37031", "code": "void paixu(int n,int y[])\n{\n\tint i,j,t,k;\n\tfor(i=0;i=x[k]&&jmax) max=l;\n\t}\n\tprintf(\"%d\",max);\n}\n"} +{"label": "75", "index": "37032", "code": "int convert(char s[],int result[])\n{\n\tint value,len,num=0,k=0;\n\tlen=strlen(s);\n\ts[len]='\\0';\n\twhile(kmax)\n\t\t\tmax=num[i];\n\t}\n\tprintf(\"%d %d\",total,max);\n}"} +{"label": "75", "index": "37033", "code": "void main()\n{\n\tint x[1000];\n\tint y[1000];\n\tchar a,b;\n\tint i,j,k=0,r=0,n=0;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%c\",&x[i],&a);\n\t\tn=n+1;\n\t\tif(a!=',')break;\n\t}\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%c\",&y[i],&b);\n\t\tif(b!=',')break;\n\t}\n\tfor(j=0;j<1000;j++)\n\t{\n\t\tfor(i=0;i=x[i]&&jr)\n\t\t{\n\t\t\tr=k;\n\t\t}\n\t\tk=0;\n\t}\n\tprintf(\"%d %d\",n,r);\n\n\n}\n"} +{"label": "75", "index": "37034", "code": "int main()\n{\n\tint i,num1[1000],num2[1000],len,count1=0,min=0,max=2000,maxnum=0,j;\n\tchar ch;\n\tfor(i=0;;i++)\n\t{\n\t\tcin>>num1[i];\n\t\tif(num1[i]>num2[i];\n\t\tif(num2[i]>max)\n\t\t\tmax=num2[i];\n\t\tch=getchar();\t\n\t}\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tcount1=0;\n\t\tfor(j=0;j=num1[j]&&imaxnum)\n\t\t\tmaxnum=count1;\n\t}\n\tcout<= 0)\n\t\t\t{\n\t\t\t\ta[i] += (stra[sub - 2] - '0') * 10;\n\t\t\t\tif(stra[sub-3] != ',' && sub - 3 >= 0)\n\t\t\t\t{\n\t\t\t\t\ta[i] += (stra[sub - 3] - '0') * 100;\n\t\t\t\t\tif(stra[sub-4] != ',' && sub - 4 >= 0)\n\t\t\t\t\t\ta[i] += (stra[sub - 4] - '0') * 1000;\n\t\t\t}}\n\t\t\ti++;\n\t\t}\n\t\tif(strb[sub] == ',' || strb[sub] == '\\0')\n\t\t{\n\t\t\tb[j] = (strb[sub - 1] - '0') * 1;\n\t\t\tif(strb[sub-2] != ',' && sub - 2 >= 0)\n\t\t\t{\n\t\t\t\tb[j] += (strb[sub - 2] - '0') * 10;\n\t\t\t\tif(strb[sub-3] != ',' && sub - 3 >= 0)\n\t\t\t\t{\n\t\t\t\t\tb[j] += (strb[sub - 3] - '0') * 100;\n\t\t\t\t\tif(strb[sub-4] != ',' && sub - 4 >= 0)\n\t\t\t\t\t\tb[j] += (strb[sub - 4] - '0') * 1000;\n\t\t\t}}\n\t\t\tj++;\t\t\t\n\t\t}\n\t}\n\tfor(j = 0; j < 1000; j++)\n\t{\n\t\tnum[j] = 0;\n\t\tfor(i = 0; i < sum; i++)\n\t\t\tif(a[i] <= j && b[i] > j)\n\t\t\t\tnum[j]++;\n\t\tif(num[j] > max)\n\t\t\tmax = num[j];\n\t}\n\tcout << sum << ' ' << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37036", "code": "//***********************************\n//*???Oct 30, 2013 - ????? **\n//*?????? 1300012719 **\n//*???2013.10.31 **\n//***********************************\nint main()\n{\n\tint n = 0, i, j, a = INT_MAX, b = INT_MIN, x[1000], y[1000], number[1000];\n\tchar c; //n?????????,i,j?????,a,b?????????,x[i],y[i]?????????,number[i]???????\n\twhile (c != '\\n') //????(??,??),?????????\n\t{\n\t\tcin >> x[n]; //??x[n],???x[n]???a,?????n???????\n\t\tif (a > x[n]) //?????x[1000]???x[0]?x[n-1]?n???\n\t\t\ta = x[n];\n\t\tn++;\n\t\tc = cin.get();\n\t}\n\tfor (i = 0; i < n; i++) //????(??,??)n?y[i],???????b\n\t{\n\t\tcin >> y[i];\n\t\tif (b < y[i])\n\t\t\tb = y[i];\n\t\tc = cin.get();\n\t}\n\tfor (i = a; i < b; i++) //?????????[a,b)??????????\n\t{\n\t\tnumber[i] = 0; //?????\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif ((x[j] <= i) && (y[j] > i)) //?n????,??????????????,????????+1\n\t\t\t\tnumber[i]++;\n\t\t}\n\t}\n\tfor (i = a + 1; i < b; i++) //???????number[a]?number[b-1]???\n\t{ //??number[a]??????,?number[a]??????????number[a]\n\t\tif (number[a] < number[i]) //???number[a]????number[a]?number[b-1]?????\n\t\t\tnumber[a] = number[i];\n\t}\n\tcout << n << \" \" << number[a] << endl; //???????????????\n\treturn 0;\n}"} +{"label": "75", "index": "37037", "code": "\nint main()\n{\n\tint a[10000], b[10000];\n\tint i = 0, j = 1;\n\tint q;\n\tchar p;\n\twhile(cin >> q)\n\t{\n\t\ta[i++] = q;\n\t\tcin >> p;\n\t\tif(p != ',')\n\t\t\tbreak;\n\t}\n\tchar s[4];\n\ts[0] = p;\n\twhile(cin >> s[j++])\n\t\tif(s[j - 1] == ',')\n\t\t\tbreak;\n\tb[0] = atoi(s);\n\tfor(j = 1; j < i - 1; j++)\n\t\tcin >> b[j] >> p;\n\tcin >> b[j];\n\tq = i;\n\tcout << q << ' ';\n\tint sum, max = 0;\n\tfor(i = 0; i < 1000; i++)\n\t{\n\t\tsum = 0;\n\t\tfor(j = 0; j < q; j++)\n\t\t\tif(i >= a[j] && i < b[j])\n\t\t\t\tsum++;\n\t\tif(sum > max) max = sum;\n\t}\n\tcout << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37038", "code": "int main()\n{int x[1000],y[1000],people[1001]={0};\n int i=0,length=0;\n do\n cin>>x[i++];\n while(cin.get()==',');\n length=i;i=0;\n do\n cin>>y[i++];\n while(cin.get()==',');\n for(i=0;imax)\n max=people[i];\n cout<>a[i];\n\t\tif ((c=cin.get())=='\\n')\n\t\tbreak;\n\t}\n\tfor (j=0;;j++)\n\t{\n\t\tcin>>b[j];\n\t\tif ((c=cin.get())=='\\n')\n\t\t\tbreak;\n\t}\n\tmint=a[0];\n\tfor (x=1;x<=i;x++)\n\t{\n\t\tif (a[x]maxt)\n\t\t\tmaxt=b[y];\n\t}\n\tfor (k=mint;k<=maxt-1;k++)\n\t{\n\t\tfor (p=0;p<=i;p++)\n\t\t{\n\t\t\tif (k>=a[p]&&k> ch1 >> ch2;\n\tlen1 = strlen(ch1);\n\tlen2 = strlen(ch2);\n\tk = 0;\n\tfor(i = 0; i <= len1; i++)\n\t{\n\t\tif((ch1[i] == ',')||(ch1[i] == '\\0'))\n\t\t{\n\t\t\tg = 0;\n\t\t\tfor(j = i - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tif(ch1[j] != ',')\n\t\t\t\t{\n\t\t\t\t\tx[k] = x[k] + (ch1[j] - '0') * power(10,g);\n\t\t\t\t\tg++;\n\t\t\t\t}\n\t\t\t\tif(ch1[j] == ',')\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}\n\tk = 0;\n\tfor(i = 0; i <= len2; i++)\n\t{\n\t\tif((ch2[i] == ',')||(ch2[i] == '\\0'))\n\t\t{\n\t\t\tg = 0;\n\t\t\tfor(j = i - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tif(ch2[j] != ',')\n\t\t\t\t{\n\t\t\t\t\ty[k] = y[k] + (ch2[j] - '0') * power(10,g);\n\t\t\t\t\tg++;\n\t\t\t\t}\n\t\t\t\tif(ch2[j] == ',')\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}\n\tfor(i = 1; i < 1000; i++)\n\t{\n\t\tfor(j = 0; j < k; j++)\n\t\t{\n\t\t\tif((x[j] <= i)&&(i < y[j]))\n\t\t\t\tnum[i]++;\n\t\t}\n\t}\n\tmax = 0;\n\tfor(i = 1; i < 1000; i++)\n\t{\n\t\tif(num[i] > max)\n\t\t{\n\t\t\tmax = num[i];\n\t\t\tpos = i;\n\t\t}\n\t}\n\tcout << k << \" \" << max;\n\treturn 0;\n}\nint power(int a,int b)\n{\n\tint sum = 1,i;\n\tfor(i = 1; i <= b; i++)\n\t\tsum = sum * a;\n\treturn sum;\n}"} +{"label": "75", "index": "37041", "code": "int main()\n{\n\tint p,i=1,j,k=1,a[1002],b[1002],count,max1=0,max=0,min=1004; //n?????p????????\n\tchar c;\n\tdo\n\t{\t\n\t\tcin >> a[i];\n\t\tc=cin.get();\n\t\tif (a[i]> b[i];\n\t\tc=cin.get();\n\t\tif (b[i]>max)\n\t\t\tmax=b[i];\n\t\ti++;\n\t} while (c==',');\t\t\n\tfor (i=min;i<=max;i++)\n\t{\n\t\tcount=0;\n\t\tfor (j=1;j<=p;j++)\n\t\t{\n\t\t\tif (a[j]<=i&&b[j]>=(i+1))\n\t\t\t\tcount++;\n\t\t}\n\t\tif (count>max1)\n\t\t\tmax1=count;\n\t}\n\tcout << p << \" \" << max1 << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37042", "code": "void main()\n{\nint k=0,a[1000],b[1000],t[1000],i=0,p=0,j;char c=',';\nwhile(c==',') {scanf(\"%d%c\",&a[i],&c); p++;i++;}c=',';i=0;\nwhile(c==',') {scanf(\"%d%c\",&b[i],&c); i++;}\nfor(i=0;i<999;i++) t[i]=0;\nfor(i=0;i<999;i++)\n for(j=0;ji)) t[i]++;\nfor(i=0;i<999;i++)\nif(t[i]>k) k=t[i];\nprintf(\"%d %d\",p,k);\n}"} +{"label": "75", "index": "37043", "code": "int main()\n{\n int a[1001],b[1001],c[1001] = {0},i,sum,k,j,m,s,max = 0;\n char d;\n for (i = 1;;i++)\n {\n cin >> a[i];\n d = cin.get();\n if (d != ',')\n break;\n }\n sum = i;\n for (k = 1;k <= i;k++)\n {\n cin >> b[k];\n d = cin.get();\n }\n for (j = 1;j <= i;j++)\n for (m = a[j];m < b[j];m++)//??c[m]??m???????? ????????????????\n {\n c[m]++;\n }\n for (s = 0;s <= 1000;s++)\n {\n if (c[s] >= max)\n max = c[s];\n }\n cout << sum << \" \" << max;\n \n return 0;\n}"} +{"label": "75", "index": "37044", "code": "void main()\n{\nint k,j,a[1001],b[1001],t[1001],i=0,max=0;char c=',';\nwhile(c==',') {scanf(\"%d%c\",&a[i],&c);i++;}\ni=0; c=',';\nwhile(c==',') {scanf(\"%d%c\",&b[i],&c);i++;}\nfor(j=0;j<1000;j++) \n{t[j]=0;\nfor(k=0;k=a[k])&&(jmax) max=t[j];\nprintf(\"%d %d\",i,max);\n}\n"} +{"label": "75", "index": "37045", "code": "int main(){\n\tint a[1000],b[1000],d[1000],i,j,p;\n\tchar c[1000];\n\tfor(i=0;;i++){\n\t\tcin>>a[i];\n\t\tif(cin.get()!=','){\n\t\t\ti++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(j=0;j>b[j];\n\t\tcin.get(c[j]);\n\t}\n\tfor(j=0;jp)\n\t\t\tp=d[j];\n\tcout<> begin[i];\n\t\ti++;\n\t\tdot=cin.get();\n\t}\n\twhile (cin>>end[j])\n\t{\n\t\tj++;\n\t\tdot=cin.get();\n\t\tif(dot!=',')\n\t\t\tbreak;\n\t}\n\tfor(k=0;k<1000;k++)\n\t{\n\t\tfor(i=0;imax)\n\t\t\tmax=sum;\n\t}\n\t\n\tcout << i <<\" \"<>a[0];\n\twhile(scanf(\",%d\",&a[i]))\n\t{\n\t++i;\n\t}\n\tn=i;\n\tcin>>a[i];++i;\n\twhile(scanf(\",%d\",&a[i]))\n\t{\n\t++i;\n\t}\n\tfor(int j=0;j> start[0];\n\twhile(cin >> x)\n\t{\n\t\tif (x != ',')\tbreak;\n\t\tcin >> start[i];\n\t\ti++;\n\t\tsum++;\n\t}\n\tend[0] = x-'0';\n\twhile(cin >> x)\n\t{\n\t if(x==',') break;\n\t end[0] = 10*end[0]+(x-'0');\n\t}\n\twhile(cin >> end[j])\n\t{\n\t\tj++;\n\t\tif (j == sum)\tbreak;\n\t\tcin >> x;\n\t}\n\tfor(i=0; i> string1;\n\tfor (i = 0; i <= strlen(string1) - 1; i++)\n\t{\n\t\tif (string1[i] == ',')\n\t\t\tk = k + 1;\n\t}\n\tn = k + 1;\n\tq = n;\n\tfor (i = strlen(string1) - 1; i >= 0; i--)\n\t{\n\t\tif(string1[i] != ',')\n\t\t{\n\t\t\tx[q] = x[q] + (int)(string1[i] - 48) * power[p];\n\t\t\tp = p + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tq = q - 1;\n\t\t\tp = 0;\n\t\t}\n\t}\n\tcin >> string2;\n\tq = n;\n\tp = 0;\n\tfor (i = strlen(string2) - 1; i >= 0; i--)\n\t{\n\t\tif(string2[i] != ',')\n\t\t{\n\t\t\ty[q] = y[q] + (int)(string2[i] - 48) * power[p];\n\t\t\tp = p + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tq = q - 1;\n\t\t\tp = 0;\n\t\t}\n\t}\n\tfor (i = 1; i <= 1000; i++)\n\t{\n\t\t\n\t\tfor(j = 1; j <= n; j++)\n\t\t{\n\t\t\tif (x[j] <= i && y[j] >= i + 1)\n\t\t\t\tnum[i]++;\n\t\t}\n\t\tif (num[i] > maxpeople)\n\t\t{\n\t\t\tmaxpeople = num[i];\n\t\t\ttime = i;\n\t\t}\n\t}\n\tcout << n << \" \" << maxpeople << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37050", "code": "int main()\n{\n\tint len1,len2; \n\tchar a[4000],b[4000];\n\tchar c[1000][4],d[1000][4];\n\tint ren[1000],ren2[1000];\n\tcin>>a>>b;\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n\tint k=0,j=0;\n\tfor(int i=0;ii)\n\t\t\t\t\tcount [i]++;\n\t\t\t}\n\t\t}\n\t\tint max=0;\n\t\tfor(int i=0;i<2000;i++)\n\t\t{\n\t\t\tif(count[i]>max)\n\t\t\t\tmax=count[i];\n\t\t}\n\t\tcout<>time1[i])\n\t{\n\t\tp=cin.get();\n\t\tif(p==',')\n\t\t{\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tn=i+1;\n\ti=0;\n\twhile(cin>>time2[i])\n\t{\n\t\tp=cin.get();\n\t\tif(p==',')\n\t\t{\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;imax)\n\t\t{\n\t\t\tmax=time2[i];\n\t\t}\n\t}\n\tint count[1000]={0};\n\tint maxtime=0;\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tfor(j=0;ji)\n\t\t\t{\n\t\t\t\tcount[i]++;\n\t\t\t}\n\t\t}\n\t\tif(count[i]>maxtime)\n\t\t{\n\t\t\tmaxtime=count[i];\n\t\t}\n\t}\n\tcout<> a[i]; //????????\n\t\tc = cin.get();\n\t\ti++;\n\t} while (c == ',');\n\tp = i - 1; //??????\n\ti = 1;\n\tdo\n\t{\n\t\tcin >> b[i]; //????????\n\t\tc = cin.get();\n\t\ti++;\n\t} while (c == ',');\n\tint max = 0, min = 1004; //max?????????min????????\n\tfor (i = 1; i <= p; i++) //?????????\n\t{\n\t\tif (a[i] < min)\n\t\t\tmin = a[i];\n\t}\n\tfor (i = 1; i <= p; i++) //?????????\n\t{\n\t\tif (b[i] > max)\n\t\t\tmax = b[i];\n\t}\n\tfor (i = min; i <= max; i++) //???????????\n\t{\n\t\tcount = 0; //count?????????????\n\t\tfor (j = 1; j <= p; j++)\n\t\t{\n\t\t\tif (a[j] <= i && b[j] >= (i + 1))\n\t\t\t\tcount++;\n\t\t}\n\t\tif (count > max1) //?????????\n\t\t\tmax1 = count;\n\t}\n\tcout << p << \" \" << max1 << endl; //??????????????????????\n\treturn 0;\n}\n//**********************************************"} +{"label": "75", "index": "37053", "code": "\nint main()\n{\n int arr[1020], lea[1020];\n\tint num = 0;\n\tint i, j, k;\n\tfor(i = 1; ;i++)\n\t{\n\t\tcin >> arr[i];\n\t\tnum ++;\n\t\tk =cin.get() ;\n\t\tif(k == 10)\n\t\t\tbreak;\n\t}\n\tfor(i = 1; ;i++)\n\t{\n\t\tcin >> lea[i];\n\t\tif(cin.get() == 10)\n\t\t\tbreak;\n\t}\n\n int people[1020];\n\tfor(i = 1; i < 1000; i++)\n\t\tpeople[i] = 0;\n\tfor(i = 1; i <= num; i++)\n\t{\n\t\tfor(j = arr[i]; j < lea[i]; j++)\n\t\t\tpeople[j] ++;\n\t}\n\tint Max_people = 0;\n\tfor(i = 1; i < 1000; i++)\n\t{\n\t\tif(people[i] > Max_people)\n\t\t\tMax_people = people[i];\n\t}\n\tcout << num << ' '<< Max_people << endl;\n\n\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37054", "code": "int a[2][100000];\nint add(int i,int n)\n{\n\tint k,temp=0;\n\tfor(k=1;k<=n;k++)\n\t\tif(a[0][k]<=i&&a[1][k]>i)\n\t\t\ttemp++;\n\treturn temp;\n}\nvoid main()\n{\n\tint i=1,n;\n\tchar c;\n\tscanf(\"%d\",&a[0][i]);\n\tc=getchar();\n\ti++;\n\twhile(c!='\\n')\n\t{\t\n\t\tscanf(\"%d\",&a[0][i]);\n\t\tc=getchar();\n\t\ti++;\n\t}\n\tprintf(\"%d \",i-1);\n\ti=1;\n\tscanf(\"%d\",&a[1][i]);\n\tc=getchar();\n\ti++;\n\twhile(c!='\\n')\n\t{\t\n\t\tscanf(\"%d\",&a[1][i]);\n\t\tc=getchar();\n\t\ti++;\n\t}\n\tn=i-1;\n\tint result=0;\n\tfor(i=0;i<=1000;i++)\n\t{\n\t\tint temp=add(i,n);\n\t\tif(result>lai[1]; //??????????????????????????????????cin.get()?????????????\nwhile(meiyong=cin.get()==',')\n{\ncount++;\ncin>>lai[count];\n}\nrenshu=count;\ncount=1;\ncin>>zou[1]; //??????????????\nwhile(meiyong=cin.get()==',')\n{\ncount++;\ncin>>zou[count];\n}\nint i=0; //????????\nfor(count=1;count<=renshu;count++)\nfor(i=lai[count];imax)max=shijianbiao[count];\ncout<> in[count];\n\t\tcin.get(sign);\n\t\tif (sign != ',')\n\t\t\tbreak;\n\t\t\n\t}\n\tfor (i = 0; i <= count; i++)\n\t{\n\t\tcin >> out[i];\n\t\tcin.get(sign);\n\t\tfor (j = in[i]; j < out[i]; j++)\n\t\t{\n\t\t\ttime[j]++;\n\t\t}\n\t}\n\tfor (i = 0; i <= 999; i++)\n\t{\n\t\tif (time[i] > max)\n\t\t{\n\t\t\tmax = time[i];\n\t\t}\n\t}\n\tcout << count + 1<< \" \";\n\tcout << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37059", "code": "int main()\n{\n\tint i=1,j=1,k=1,l,m,n=1,max=0;\n\tint a[1003]={0},b[1008]={0},c[1008]={0};\n\tcin>>a[1];\n\twhile(getchar()!='\\n')\n\t{\n\t\ti++;\n\t\tn++;\n\t\tcin>>a[i];\n\t}\n\tcin>>b[1];\n\twhile(getchar()!='\\n')\n\t{\n\t\tj++;\n\t\tcin>>b[j];\n\t}\n\tmax=b[1];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(b[i]>max)\n\t\t\tmax=b[i];\n\t}\n\tfor(i=0;ii)\n\t\t\t\tc[i]++;\n\t\t}\n\t}\n\tm=max;\n\tmax=c[0];\n\n\tfor(i=0;imax)\n\t\t\tmax=c[i];\n\t}\n\tcout< max){\n max= numary1[count1];\n } \n if(numary1[count1] < min){\n min= numary1[count1];\n } \n count1++;\n if(temp== '\\n'){\n t++;\n }\n }\n while(t==1){\n scanf(\"%d%c\",&numary2[count2], &temp);\n if(numary2[count2] > max){\n max= numary2[count2];\n } \n if(numary2[count2] < min){\n min= numary2[count2];\n } \n count2++;\n if(count2 == count1){\n t++;\n }\n }\n int i,j,k; int tong[1000]={0};\n int maxpopu=0;\n for(i=min; i<=max ; i++){\n for(j=0; j=numary1[j] && i maxpopu){\n maxpopu= tong[i];\n }\n }\n cout << count1 << \" \" << maxpopu;\n \n \n \n \n return EXIT_SUCCESS;\n}\n"} +{"label": "75", "index": "37061", "code": "struct ren\n{\n\tint x;\n\tint y;\n} a[3000];\nint judge(struct ren a,int t)\n{\n\tif(t=a.x)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t\treturn 0;\n}\n\nint main()\n{\n\tchar line1[200000];\n\tchar line2[200000];\n\tchar b[100];\n\tint i,j;\n\tint p=0;\n\tint num=0;\n\tint count[1100]={0};\n\tmemset(line1,0,sizeof(line1));\n\tmemset(line2,0,sizeof(line2));\n\tmemset(b,0,sizeof(b));\n\tcin.getline(line1,200000);\n\tcin.getline(line2,200000);\n\n\tint len1,len2;\n\tlen1=strlen(line1);\n\tlen2=strlen(line2);\n\tint sum=1;\n\tfor(i=0;i> a[i][0];\n\t\ti++;\n\t}while(cin.get() == ',');\n\tsum = i;\n\ti = 0;\n\tdo\n\t{\n\t\tcin >> a[i][1];\n\t\ti++;\n\t}while(cin.get() == ',');\n\tfor(i = 0; i < sum; i++)\n\t{\n\t\tfor(j = a[i][0]; j < a[i][1]; j++)\n\t\t\tb[j]++;\n\t}\n\tfor(i = 1; i <= 1000; i++)\n\t{\n\t\tif(b[i] > max)\n\t\t\tmax = b[i];\n\t}\n\tcout << sum << ' ' << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37063", "code": "int main()\n{\n int count[1001];\n\n memset(count,0,sizeof(count));\n\n int come[1000],go[1000];\n char m;\n\n int i,j,max;\n\n for(i=0;;i++)\n {\n cin>>come[i];\n m=cin.get();\n if(m=='\\n')\n break;\n }\n\n for(i=0;;i++)\n {\n cin>>go[i];\n m=cin.get();\n if(m!=',')\n break;\n }\n\n int num=i+1;\n\n\n for(i=0;imax)\n max=count[i];\n\n cout<> str;\n\tint l = strlen(str);\n\tint j1 = 0, j2 = 0;\n\twhile (j1 < l)\n\t{\n\t\tif (str[j1] >= '0' && str[j1] <= '9')\n\t\t{\n\t\t\ti++;\n\t\t\tfor (j2 = j1; str[j2] >= '0' && str[j2] <= '9'; j2 ++)\n\t\t\t{\n\t\t\t\ta[i] = 10 * a[i] + str[j2] - '0';\n\t\t\t}\n\t\t\tj1 = j2;\n\t\t}\n\t\telse\n\t\t\tj1++;\n\t}\n\tint n = i;\n\tcin >> str;\n\tl = strlen(str), j1 = 0, j2 = 0, i = 0;\n\twhile (j1 < l)\n\t{\n\t\tif (str[j1] >= '0' && str[j1] <= '9')\n\t\t{\n\t\t\ti++;\n\t\t\tfor (j2 = j1; str[j2] >= '0' && str[j2] <= '9'; j2 ++)\n\t\t\t{\n\t\t\t\tb[i] = 10 * b[i] + str[j2] - '0';\n\t\t\t}\n\t\t\tj1 = j2;\n\t\t}\n\t\telse\n\t\t\tj1++;\n\t}\n\tint k = 0, max = 0;\n\tfor (k = 0; k <= 1000; k++)\n\t{\n\t\tint sum = 0;\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (k >= a[i] && k < b[i])\n\t\t\t\tsum++;\n\t\t}\n\t\tif (sum > max)\n\t\t\tmax = sum;\n\t}\n\tcout << n << ' ' << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37065", "code": "//********************************\n//*???????? **\n//*?????? **\n//*???2012.11.12 **\n//*******************************/\n\nint main ()\n{\n\tint a[1000], b[1000], t[1001] = {0};\n\tint n = 0, i, max = 0;\n\tdo\n\t{\n\t\tcin >> a[n];\n\t\tn++;\n\n\t}while (cin.get() != '\\n');\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tcin >> b[i];\n\t\tfor ( ; a[i] < b[i]; a[i]++)\n\t\t\tt[a[i]]++;\n\t\tcin.get();\n\t}\n\tfor (i = 0; i < 1000; i++)\n\t{\n\t\tif (t[i] > max)\n\t\t\tmax = t[i];\n\t}\n\tprintf(\"%d %d\", n, max);\n\treturn 0;\n}\n\t\n"} +{"label": "75", "index": "37066", "code": "\n\n\nint main()\n{\n int n,x[1001],y[1001],i,j,min=2000,max=0,m=0;\n char s[1100];\n int t[1100]={0};\n \n for(i=0;;i++)\n {\n scanf(\"%d\",&x[i]);\n scanf(\"%c\",&s[i]);\n if(s[i]=='\\n')\n {\n n=i+1;\n break; \n } \n }\n for(i=0;;i++)\n {\n scanf(\"%d\",&y[i]);\n scanf(\"%c\",&s[i]);\n if(s[i]=='\\n')\n {\n //n=i+1;\n break; \n } \n }\n \n for(i=0;imax)\n {\n max=y[i]; \n } \n }\n \n for(i=min;ii)\n {\n t[i]++; \n } \n } \n }\n \n for(i=min;im)\n m=t[i]; \n }\n \n printf(\"%d %d\",n,m);\n \n \n \n scanf(\"%d\",&n);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37067", "code": "int n,k,i,j,tot=0,cnt,Max=0;\nchar c;\nint X[2000],Y[2000];\nint main()\n{\n\t\tcnt=0;\n\t\twhile (scanf(\"%d\",&X[cnt++]) && (c=getchar()) && c!='\\n');\n\t\tcnt=0;\n\t\twhile (scanf(\"%d\",&Y[cnt++]) && (c=getchar()) && c!='\\n');\n\t\tfor (i = 0;i < 1000;++i)\n\t\t{\n\t\t\ttot=0;\n\t\t\tfor (j = 0;ji) tot++;\n\t\t\tif (tot>Max) Max = tot;\n\t\t}\n\t\tprintf(\"%d %d\\n\",cnt,Max);\n\n}\n"} +{"label": "75", "index": "37068", "code": "int main()\n{\n\tint a[1000] = {0}, b[1000] = {0};\n\tint i = 0, m, k, num, max = 0;\n\twhile(1)\n\t{\n\t\tcin >> a[i];\n\t\ti++;\n\t\tif(cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tm = i;\n\ti = 0;\n\twhile(1)\n\t{\n\t\tcin >> b[i];\n\t\ti++;\n\t\tif(cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (k = 0; k < 1000; k++)\n\t{\n\t\tnum = 0;\n\t\tfor (i = 0; i < m ; i++)\n\t\t{\n\t\t\tif(k >= a[i] && k < b[i])\n\t\t\t\tnum++;\n\t\t}\n\t\tif (num > max)\n\t\t\tmax = num;\n\t}\n\t\n\tcout << m << \" \" << max;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37069", "code": "//********************************\n//*???????? **\n//*????? 1300012707 **\n//*???2013.10.30 **\n//********************************\nint main()\n{\n\tint a[1001], b[1001], num, max, t;\n\tnum = 1;\n\tcin >> a[1];\n\twhile ( cin.get() == ',')\n\t{\n\t\tnum = num + 1;\n\t\tcin >> a[num];\n\t}\n\tfor ( int i = 1; i <= num; i = i + 1)\n\t{\n\t\tcin >> b[i];\n\t\tcin.get();\n\t}\n\tmax = 0;\n\tfor ( int i = 0; i < 1000; i = i + 1)\n\t{\n\t\tt = 0;\n\t\tfor ( int j = 1; j <= num; j = j + 1)\n\t\t{\n\t\t\tif ( (a[j] <= i) && (b[j] > i))\n\t\t\t{\n\t\t\t\tt = t + 1;\n\t\t\t}\n\t\t}\n\t\tif ( t > max)\n\t\t{\n\t\t\tmax = t;\n\t\t}\n\t}\n\tcout << num << \" \" << max <>a;\n cin>>b;\n int x[1000]={0},y[1000]={0};\n int i;\n int m=0;\n for(i=0;i='0'&&a[i]<='9')\n x[m]=x[m]*10+(int)a[i]-48;\n else if(a[i]==',') \n m++;\n m=0;\n for(i=0;i='0'&&b[i]<='9')\n y[m]=y[m]*10+(int)b[i]-48;\n else if(b[i]==',')\n m++;\n cout<maxy)\n maxy=y[i];\n }\n int max=0;\n for(i=minx;i<=maxy;i++)\n {\n int n=0;\n for(int j=0;j<=m;j++)\n if(i>=x[j]&&imax)\n max=n;\n }\n cout<> a[i];\n\t\tc = cin.get();\n\t\ti = i + 1;\n\t}while(c == ',');\n do\n\t{\n\t\tcin >> b[k];\n\t\td = cin.get();\n\t\tk = k + 1;\n\t}while(d == ',');\n\tfor(m = 0; m < 1000; m++)\n\t{\n for(i = 1; i < k; i++)\n\t\t{\n\t\t if(a[i] <= m&&b[i] > m)\n\t\t\tnum = num + 1;\n\t\t}\n\t if(num > max)\n\t\tmax = num;\n\t num = 0;\n\t}\n\tcout << k - 1 << \" \" << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37072", "code": " int a[1000],b[1000],e[1000],i=0,n,j,k,l;\nint main()\n{\n\n char c;\n do\n {\n scanf(\"%d%c\",&a[i],&c);\n i++;\n }\n while(c!='\\n');\n i=0; \n do\n {\n scanf(\"%d%c\",&b[i],&c);\n i++;\n }\n while(c!='\\n');\n n=i;\n for(j=0;j<1000;j++)\n {\n for(i=0;i=a[i] && j> a[0];\n\twhile (cin.get() == ',')\n\t{\n\t\tcin >> a[i];\n\t\ti++;\n\t}\n\tcin >> b[0];\n\twhile (cin.get() == ',')\n\t{\n\t\tcin >> b[j];\n\t\tj++;\n\t}\n\tcout << j << \" \";\n\tfor (t = 0; t < 1000; t++)\n\t{\n\t\tcount = 0;\n\t\tfor (k = 0; k < j; k++)\n\t\t{\n\t\t\tif (a[k] <= t && t < b[k])\n\t\t\t{count++;}\n\t\t}\n\t\tif (count > max)\n\t\t{\n\t\t\tmax = count;\n\t\t}\n\t}\n\tcout << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37074", "code": "//****************************************************** \n//* ? ? ? ?? ? ? ? ? *\n//* ? ? ?? ? ? *\n//* ? ? ? ??2010 ? 11 ? 24 ? * \n//* ? ? ?1000010185 *\n//****************************************************** \nint main()\n{\n\tchar a[10000], b[10000];\n\tint x[5000], y[5000], k1[5000], k2[5000], p = 1, q = 1, k, la, lb;\n\tcin >> a >> b;\n\n\t//???????????????????????????\n\tla = strlen(a);\n\tlb = strlen(b);\n\tfor (int i = 0; i < la; i ++) //????????\n\t\tif (a[i] == ',')\n\t\t\tk1[p ++] = i;\n\tfor (int i = 0; i < lb; i ++)\n\t\tif (b[i] == ',')\n\t\t\tk2[q ++] = i;\n\n\t//?????????????k[i]?k[i+1]????????p=q\n\tk1[0] = -1;\n\tk2[0] = -1;\n\tk1[p] = la;\n\tk2[q] = lb;\n\n\t//??????????????\n\tfor (int i = 0; i < p; i ++)\n\t{\n\t\tk = 1;\n\t\tfor (int j = k1[i + 1] - 1; j >= k1[i] + 1; j --)\n\t\t{\n\t\t\tx[i] += (a[j] - '0') * k;\n\t\t\tk *= 10;\n\t\t}\n\t\tk = 1;\n\t\tfor (int j = k2[i + 1] - 1; j >= k2[i] + 1; j --)\n\t\t{\n\t\t\ty[i] += (b[j] - '0') * k;\n\t\t\tk *= 10;\n\t\t}\n\t}\n\tfor (int i = 0; i < p; i ++) //???????\n\t\tfor (int j = 1; j < p - i; j ++)\n\t\t\tif (x[j - 1] > x[j])\n\t\t\t{\n\t\t\t\tk = x[j];\n\t\t\t\tx[j] = x[j - 1];\n\t\t\t\tx[j - 1] = k;\n\t\t\t\tk = y[j];\n\t\t\t\ty[j] = y[j - 1];\n\t\t\t\ty[j - 1] = k;\n\t\t\t}\n\tint max = 0, t[5000], sum;\n\tk = 1;\n\tt[0] = 0;\n\tfor (int i = 0; i < p - 1; i ++) //???t???????????x????\n\t\tif (x[i + 1] != x[i])\n\t\t\tt[k ++] = i + 1;\n\tt[k] = p;\n\tmax = t[1];\n\n\t//?????????????????\n\tfor (int i = 1; i < k; i ++)\n\t{\n\t\tsum = t[i + 1] - t[i]; //????????????\n\t\tfor (int j = 0; j < t[i]; j ++) //?????????????\n\t\t\tif (y[j] > x[t[i]])\n\t\t\t\tsum += 1;\n\t\tif (sum > max) //???????????\n\t\t\tmax = sum;\n\t}\n\tcout << p << ' ' << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37075", "code": "//*************************************************\n//* ????1.cpp *\n//* ?? 1000012747 *\n//* ?????????????????? *\n//*************************************************\nint main()\n{\n\tint n=0,i,j,temp=0;\n\tchar cinx[100000],ciny[100000]; //cinx,ciny??????????\n\tint x[1000],y[1000],t[1000]; //x,y???????t?????????\n\tint len,lenx=0,leny=0,max=0,maxi;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tx[i]=0;\n\t\ty[i]=0;\n\t\tt[i]=0;\n\t}\n\tcin.getline(cinx,100001,'\\n');\n\tlen=strlen(cinx);\n\tfor(i=0;i<100000;i++)\n\t\tif(cinx[i]==',')\n\t\t\tn++;\n\tn++; //??????????\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tx[temp]=x[temp]+((int)(cinx[i-j-1]-'0'))*(pow(10.0,j)); //????????????\n\t\t\t}\n\t\t\tlenx=0;\n\t\t\ttemp++;\n\t\t}\n\t}\n\tj=0;\n\tfor(i=0;i=0;j--)\n\t\tx[temp]=x[temp]+((int)(cinx[len-j-1]-'0'))*(pow(10.0,j)); //???????\n\tcin.getline(ciny,100001,'\\n');\n\tlen=strlen(ciny);\n\ttemp=0;\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\ty[temp]=y[temp]+((int)(ciny[i-j-1]-'0'))*(pow(10.0,j));\n\t\t\t}\n\t\t\tleny=0;\n\t\t\ttemp++;\n\t\t}\n\t}\n\tj=0;\n\tfor(i=0;i=0;j--)\n\t\ty[temp]=y[temp]+((int)(ciny[len-j-1]-'0'))*(pow(10.0,j));\n\tfor(i=0;i=x[i])&&(jmax)\n\t\t{\n\t\t\tmaxi=i;\n\t\t\tmax=t[i]; //?????????\n\t\t}\n\tcout<> x[k];\n\t\tif (cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (k = 0; ; k++)\n\t{\n\t\tcin >> y[k];\n\t\tif (cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; i < 1000; i++)\n\t\tfor (j = 0; j < k + 1; j++)\n\t\t\tif ((x[j] <= i) && (i < y[j]))\n\t\t\t\tt[i]++;\n\tmax = 0;\n\tfor (i = 1; i < 1000; i++)\n\t\tif (t[max] < t[i])\n\t\t\tmax = i;\n\tcout << k + 1 << ' ' << t[max] << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37077", "code": "\nint main()\n{\n\tint x, y, c = 0, max = 0;\n\tchar r = 0;\n\tint a[1005] = {0};\n\twhile (1)\n\t{\n\t\tcin >> x;\n\t\tfor (int i = x; i <= 1001; i++)\n\t\t{\n\t\t\ta[i]++;\n\t\t}\n\t\tc++;\n\t\tif (cin.get() == '\\n') break;\n\t}\n\twhile (1)\n\t{\n\t\tcin >> y;\n\t\tfor (int i = y; i <= 1001; i++)\n\t\t{\n\t\t\ta[i]--;\n\t\t}\n\t\tif (cin.get() == '\\n') break;\n\t}\n\tfor (int i = 1; i <= 1004; i++)\n\t{\n\t\tif (a[i] > max) max = a[i];\n\t}\n\tcout << c << \" \" << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37078", "code": "\nint main()\n{\n\tint x[1000], y[1000], a[1000] = {0};\n\tint i, j, n = 0;\n\tchar ch1, ch2;\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> x[i];\n\t\tch1 = cin.get();\n\t\tn++;\n\t\tif (ch1 == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> y[i];\n\t\tch2 = cin.get();\n\t\tif (ch2 == '\\n')\n\t\t\tbreak;\n\t}\n\tint min;\n\tmin = x[0];\n\tfor (i = 0; i < n; i++)\n\t\tif (x[i] < min)\n\t\t\tmin = x[i];\n\t\tint max;\n\t\tmax = y[0];\n\t\tfor (i = 0; i < n; i++)\n\t\t\tif (y[i] > max)\n\t\t\t\tmax = y[i];\n\t\t\tfor (j = min; j <= max; j++)\n\t\t\t\tfor (i = 0; i < n; i++)\n\t\t\t\t\tif (x[i] <= j && y[i] > j)\n\t\t\t\t\t\ta[j]++;\n\t\t\t\t\tint m;\n\t\t\t\t\tm = a[min];\n\t\t\t\t\tfor (i = min; i < max; i++)\n\t\t\t\t\t\tif (a[i] > m)\n\t\t\t\t\t\t\tm = a[i];\n\t\t\t\t\t\tcout << n << \" \" << m << endl;\n\n\t\t\t\t\t\treturn 0;\n}\n\n"} +{"label": "75", "index": "37079", "code": "//********************************\n//*?? ????? *****\n//*????? 1300012753 ***** \n//*???2013.10.30 ***** \n//********************************\nint main()\n{\n\tint a[1001], b[1001], i = 1, sum = 0, max = 0; // a?????????b??????i????sum????????max?????? \n\tchar c; // c????? \n\twhile (cin >> a[i])\n\t{\n\t\tc = cin.get();\n\t\tif(c != ',')\n\t\tbreak;\n\t\ti++;\n\t}\n\tcin >> b[1];\n\tfor(int j = 2; j <= i; j++)\n\t{\n\t\tc = cin.get();\n\t\tcin >> b[j];\n\t}\n\t\n\t// ?????????k????????? \n\tfor (int k = 1; k <= i; k++)\n\t{\n\t\tfor (int t = 1; t <= i; t++)\n\t\t{\n\t\t\tif(a[k] >= a[t] && a[k] < b[t])\n\t\t\tsum++;\n\t\t}\n\t\t\n\t\t// ???k?????sum????????????? \n\t\tif(max < sum)\n\t\tmax = sum;\n\t\tsum = 0; // sum????0 \n\t}\n\tcout << i << ' ' << max;\n\treturn 0;\n} "} +{"label": "75", "index": "37080", "code": "main()\n{\n\tint x[1000]={0},y[1000]={0},t[1000]={0},n=0,i,j,k=1,max;\n\tchar c;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c>='0'&&c<='9')\n\t\t\tn=n*10+c-'0';\n\t\telse\n\t\t{\n\t\t\tx[k]=n;\n\t\t\tk++;\n\t\t\tn=0;\n\t\t}\n\t}\n\tx[k]=n;\n\tn=0;\n\tk=1;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c>='0'&&c<='9')\n\t\t\tn=n*10+c-'0';\n\t\telse\n\t\t{\n\t\t\ty[k]=n;\n\t\t\tk++;\n\t\t\tn=0;\n\t\t}\n\t}\n\ty[k]=n;\n\tfor(i=1;i<=k;i++)\n\t{\n\t\tfor(j=x[i];jmax)\n\t\t\tmax=t[i];\n\t}\n\tprintf(\"%d %d\\n\",k,max);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37081", "code": "int main()\n{\n\tint a[1000];\n\tint b[1000];\n\tchar c;\n\tint i = 0 ,g =0, l = 0;\n\tdo\n\t{\n\t\tcin >> a[i];\n\t\tc = cin.get();\n\t\ti ++;\n\t}while(c != '\\n');\n\tfor(int j =0;j <= i - 1;j ++)\n\t{\n\t\tcin >> b[j];\n\t\tcin.get();\n\t}\n\tfor(int p = 1; p <= 1000; p ++)\n\t{\n\t\tfor(int k =0; k <= i - 1; k ++)\n\t\t{\n\t\t\tif(p >= a[k] && p < b[k])\n\t\t\t\tg ++;\n\t\t}\n\t\tif(g >l)\n\t\t\tl = g;\n\t\tg = 0;\n\t}\n\tcout << i << \" \" << l;\n\treturn 0;\n}\n\n\n\n\t"} +{"label": "75", "index": "37082", "code": "int main()\n{\n\tint x[1100],y[1100],i,n=0,max=0,min=1000,j,most=0,p;\n\tchar b;\n\tdo\n\t{\n\t\tscanf(\"%d\",&x[n]);\n\t\tb=getchar();\n\t\tn++;\n\t}\n\twhile(b==',');\n\tn=0;\n do\n\t{\n\t\tscanf(\"%d\",&y[n]);\n\t\tb=getchar();\n\t\tn++;\n\t}\n\twhile(b==',');\n\tprintf(\"%d \",n);\n\tfor(i=0;imax) max=y[i];\n\t}\n\n\tfor(i=min;ii) p++;\n\t\tif(p>most) most=p;\n\t}\n\tprintf(\"%d\\n\",most);\n\n\n}\n"} +{"label": "75", "index": "37083", "code": "\n\nint main()\n{\n int temp;\n char m;\n int a[1001] = {0};\n int num;\n int i, j, k;\n int come[1000];\n int leave[1000];\n for(num = 0; ;num ++)\n {\n cin >> come[num];\n m = cin.get();\n if (m == '\\n')\n break;\n }\n for(num = 0; ;num ++)\n {\n cin >> leave[num];\n m = cin.get();\n if (m == '\\n')\n break;\n }\n for (i = 0; i <= num; i ++)\n {\n for(j = come[i]; j < leave[i]; j++)\n {\n a[j] ++;\n }\n }\n temp = a[0]; \n for (i = 1;i <= 1000; i++)\n {\n if (a[i] >= temp)\n {\n temp = a[i];\n }\n }\n cout << num + 1<< \" \" << temp << endl;\n return 0;\n}"} +{"label": "75", "index": "37084", "code": "int main()\n{\n\tint total;\n\tint getin[1000];\n\tint getout[1000];\n\tint i=0,j=0;\n\tchar x;\n\tdo\n\t{\n\t\tcin>>getin[j];\n\t\tj++;\n\t\tx = getchar();\n\t}while(x==',');\n\ttotal = j;\n\tfor(j=0;j>getout[j];\n\t\tx = getchar();\n\t}\n\tcout<=getin[j])&&(imax)\n\t\t\tmax = people[i];\n\t}\n\tcout<= 0) && (b - '0' < 10))\n\t\t{\n\t\t\tx[num] *= 10;\n\t\t\tx[num] += b - '0';\n\t\t}\n\t\tif (b == ',')\n\t\t{\n\t\t\tnum += 1;\n\t\t}\n\t\tif (b == '\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tnum = 0;\n\tfor(; 1;)\n\t{\n\t\tb = cin.get();\n\t\tif ((b - '0' >= 0) && (b - '0' < 10))\n\t\t{\n\t\t\ty[num] *= 10;\n\t\t\ty[num] += b - '0';\n\t\t}\n\t\tif (b == ',')\n\t\t{\n\t\t\tnum += 1;\n\t\t}\n\t\tif (b == '\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (int i = 0; i < 1000; i++)\n\t{\n\t\tpeople = 0;\n\t\tfor (int ii = 0; ii < num + 1; ii++)\n\t\t{\n\t\t\tif (i >= x[ii] && i < y[ii])\n\t\t\t{\n\t\t\t\tpeople += 1;\n\t\t\t}\n\t\t\tif (people > max)\n\t\t\t{\n\t\t\t\tmax = people;\n\t\t\t}\n\t\t}\n\t}\n\tcout << num + 1 << ' ' << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37086", "code": "void main()\n{\n\tchar c[5000];\n\tgets(c);\n\tint x[5000],y[5000],n=0,i=0,j=0,a[5000];\n\tfor(i=0;i<5000;i++)\n\t{\n\t\tx[i]=0;\n\t\ty[i]=0;\n\t\ta[i]=0;\n\t}\n\ti=0;\n\twhile(c[i]!=0)\n\t{\n\t\tif(c[i]!=',')\n\t\t\tx[n]=x[n]*10+c[i]-'0';\n\t\telse\n\t\t\tn++;\n\t\ti++;\n\t}\n\tgets(c);n=0;i=0;\n\twhile(c[i]!=0)\n\t{\n\t\tif(c[i]!=',')\n\t\t\ty[n]=y[n]*10+c[i]-'0';\n\t\telse\n\t\t\tn++;\n\t\ti++;\n\t}\n/*\tprintf(\"%d\\n\",n);\n\tfor(i=0;i<=n;i++)\n\t\tprintf(\"%d,%d \",x[i],y[i]);\t*/\t\t\t\t\t\t//????,n+1????\n\tfor(i=0;i<1000;i++)\n\t\tfor(j=0;j<=n;j++)\n\t\t{\n\t\t\tif(x[j]<=i&&y[j]>i)\n\t\t\t\t\ta[i]++;\n\t\t}\n\tint m=0;\n\tfor(i=0;i<=1000;i++)\n\t\tif(a[i]>m)\n\t\t\tm=a[i];\n\tprintf(\"%d %d\",n+1,m);\n//\tfor(i=0;i<=1000;i++)\n//\t\tprintf(\" %d \",a[i]);\n}\n/*\tputs(c);\n\tfor(i=0;i<=n;i++)\n\t\tprintf(\"%d,\",a[i]);\n\t\tfor(i=0;i<=n;i++)\n\t\t\tif(a[i]>k)\n\t\t\t{\n\t\t\t\tk=a[i];\n\t\t\t}\n\t\tfor(i=0;i<=n;i++)\n\t\t\tif(a[i]==k)\n\t\t\t\ta[i]=0;\n\t\tk=0;\n\t\tfor(i=0;i<=n;i++)\n\t\t\tif(a[i]!=0)\n\t\t\t\tbreak;\n\t\tif(i>n)printf(\"No\");\n\t\telse\n\t\t{\n\t\tfor(i=0;i<=n;i++)\n\t\t{\n\t\t\tif(a[i]>k)\n\t\t\t\tk=a[i];\n\t\t}\n\t\tprintf(\"%d\",k);\n\t\t}\n}\n*/"} +{"label": "75", "index": "37087", "code": "//???2010?11?24?\n//???1000010586_???\n//????????\n\nint main()\n{\n\tint start[1000] , end[1000];\n\tint i , j , k , num = 1 , max = 0 , min = 1000 , flag , M = 0;\n\tcin >> start[0];\n min = start[0];\n\twhile ( cin.get() == ',' )\n\t{\n\t\tcin >> start[ num ];\n\t\tif ( start[ num ] < min )\n\t\t\tmin = start[ num ];\n\t\tnum ++;\n\t}\n\tcin >> end[0];\n max = end[0];\n\tfor ( i = 1 ; i <= num - 1 ; i ++ )\n\t{\n\t\tcin.get();\n\t\tcin >> end[i];\n\t\tif ( end[i] > max )\n\t\t\tmax = end[i];\n\t}\n\tfor ( j = min ; j <= max - 1 ; j ++ )\n\t{\n\t\tflag = 0;\n\t\tfor ( k = 0 ; k <= num - 1 ; k ++ )\n\t\t{\n\t\t\tif ( j >= start[k] && j < end[k] )\n\t\t\t\tflag ++;\n\t\t}\n\t\tif ( flag > M )\n\t\t\tM = flag;\n\t}\n\tcout << num << \" \" << M << endl;\n\treturn 0;\n}\n\n\n\n"} +{"label": "75", "index": "37088", "code": "int main()\n{\n\tint x[1000],y[1000],t[1000]; //??????\n\tchar c[10000],d[10000],num[10000][10]; //??????\n\tchar *p,*q;\n\tint s=0,m=0,n=0;\n\tint i,j;\n\tcin.getline(c,10000);\n\tp=c;q=num[s];\n\twhile(1)\n\t{\n\t\tif(*p=='\\0') //??\n\t\t{\n\t\t\t*q='\\0';\n\t\t\ts++;\n\t\t\tbreak;\n\t\t}\n\t\tif(*p==',') //????\n\t\t{\n\t\t\t*q='\\0';\n\t\t\tq=num[++s];\n\t\t\tp++;\n\t\t}\n\t\telse //????\n\t\t{\n\t\t\t*q=*p; \n\t\t\tp++;q++;\n\t\t}\n\t}\n\tfor(i=0;im)m=y[i];\n\t}\n\tfor(i=0;in)n=t[i];\n\t}\n\tcout<> inputx >> inputy;\n\tfor (int i = strlen(inputx) - 1; i >= 0; i --)\n\t{\n\t\tif(inputx[i] != ',')\n\t\t{\n\t\t\tx[n] += (inputx[i] - 48) * pow((double)10,w);\n\t\t\tw ++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tn ++;\n\t\t\tw = 0;\n\t\t}\n\t}\n\tw = 0;\n\tn = 0;\n\tfor (int i = strlen(inputy) - 1; i >= 0; i --)\n\t{\n\t\tif(inputy[i] != ',')\n\t\t{\n\t\t\ty[n] += (inputy[i] - 48) * pow((double)10,w);\n\t\t\tw ++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tn ++;\n\t\t\tw = 0;\n\t\t}\n\t}\n\tfor (int i = 0; i <= n; i ++)\n\t\tfor(int j = x[i]; j < y[i]; j ++)\n\t\t\ttime[j] ++;\n\tfor(int i = 0; i < 1000; i ++)\n\t{\n\t\tif(time[i] > count)\n\t\t\tcount = time[i];\n\t}\n\tcout << n + 1 << \" \" << count << endl;\n\t\t\n\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "75", "index": "37090", "code": "int main()\n{\n\tint count[1000]={0}, x[10000] = {0}, y[10000] = {0};\n\tint a, b, i=0, q=0, k, m, p, max;\n\tchar ch;\n\tdo\n\t{\n\t\tcin >> a;\n\t\tx[i] = a;\n\t\ti++;\n\t\tch = cin.get();\n\t}while(ch==',');\n\tdo\n\t{\n\t\tcin >> b;\n\t\ty[q] = b;\n\t\tq++;\n\t\tch = cin.get();\n\t}while(ch==',');\n\tfor(m=0; m max)\n\t\t\tmax = count[p];\n\t}\n\tcout << i << ' ' << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37091", "code": "int a[1000],b[1000];\nint main()\n{\n\tchar c;\n\tint n,i=0,j,MAX,t,min,max;\n while(1==1)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t scanf(\"%c\",&c);\n\t\ti=i+1;\n\t\tif(c!=',')\n\t\t\tbreak;\n\t}\n\ti=0;\n\twhile(1==1)\n\t{\n\t\tscanf(\"%d\",&b[i]);\n\t scanf(\"%c\",&c);\n\t\ti=i+1;\n\t\tif(c!=',')\n\t\t\tbreak;\n\t}\n n=i;\n\tmin=a[0];\n for(i=0;imax)\n\t\t\tmax=b[i];\n\t}\n\tMAX=0;\n\tfor(i=min;ii && a[j]<=i)\n\t\t\t\tt++;\n\t\t}\n\t\tif(t>MAX)\n\t\t\tMAX=t;\n\t}\n\tprintf(\"%d %d\",n,MAX);\n\treturn 0;\n}"} +{"label": "75", "index": "37092", "code": "\nint min(int a[],int i)\n{\n\tint m=a[0],j;\n\tfor(j=0;jm) m=a[j];\n\treturn m;\n}\n\nint main()\n{\n\tint a[2][1001]={0};\n\tint i,j,start,end,k,m,p=0;\n\tchar c;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d\",&a[0][i]);\n\t\tscanf(\"%c\",&c);\n\t\tif(c=='\\n') break;\n\t}i=i+1;\n\tfor(j=0;j=a[0][j]) m=m+1;\n\t\t}\n\t\tif(m>p) p=m;\n\t}\n\tprintf(\"%d %d\",i,p);\n\treturn 0;\n}"} +{"label": "75", "index": "37093", "code": "int main()\n{\n\tint a[1000];\n\tint i=1,n=1;\n\tscanf(\"%d\",&a[0]);\n\twhile(getchar()!='\\n'){\n\t\tscanf(\"%d\",&a[i]);\n\t\ti++;\n\t\tn++;\n\t}\n\tint b[1000];\n\ti=1;\n\tscanf(\"%d\",&b[0]);\n\twhile(getchar()!='\\n'){\n\t\tscanf(\"%d\",&b[i]);\n\t\ti++;\n\t}\n\n\tint j;\n\tint max=0;\n\tfor(j=1;j<=1000;j++){\n\t\tint sum=0;\n\t\tfor(i=0;ij){\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t\tif(sum>max){\n\t\t\tmax=sum;\n\t\t}\n\t}\n\tcout<='0'&&s[i]<='9')\n\t\t\ta[j]=a[j]*10+s[i]-48;\n\t\telse\n\t\t\t\n if(s[i-1]>='0'&&s[i-1]<='9')\n\t\t\t j++;\n\t}\n\t\n\tif(s[m-1]>='0'&&s[m-1]<='9')\n\t\tm=j+1;\n\telse\n\t\tm=j;\n\tgets(t);n=strlen(t);j=0;\n\tfor(i=0;i='0'&&t[i]<='9')\n\t\t\tb[j]=b[j]*10+t[i]-48;\n\t\telse\n\t\t\t\n if(t[i-1]>='0'&&t[i-1]<='9')\n\t\t\t j++;\n\t}\n\t\n\tif(t[n-1]>='0'&&t[n-1]<='9')\n\t\tn=j+1;\n\telse\n\t\tn=j;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tfor(j=0;j=a[j]&&ik)\n\t\t\tk=c[i];\n\t}\n\t\n\tprintf(\"%d %d\",n,k);\n\t\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37095", "code": "int main()\n{\n\tchar c;\n\tint i=0,j=0,max=0,min=0,a[2000][2],zuich=0,k,m;\n\tfor(m=0;m<2000;m++)\n\t{\n\t\ta[m][0]=0;\na[m][1]=0;\n}\n while(c!='\\n')\n\t{scanf(\"%d\",&a[j][0]);\n\t\tc=getchar();\n\tj++;\n\t}\n for(k=0;k<=j-1;k++)\n\t{scanf(\"%d\",&a[k][1]);\n\t\tif(k!=j)c=getchar();\n\t}\n\ni=j-1;\n\tfor(j=0;j<1000;j++)\n\t{int x=0;\n\t\tfor(k=0;kj))\n x++;\n\t\t\tif(x>=zuich)\n\t\t\t\tzuich=x;\n\t}\n\n\tprintf(\"%d %d\",i+1,zuich);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37096", "code": "int ppow(char p,int q){\n int x,y;\n y=(int)(p-48);\n for(x=1;x<=q;x++)\n y=y*10;\n return y;\n }\n \nint main(){\n char aa[5000],bb[5000],s;\n gets(aa);\n gets(bb);\n int i=0,j=0,l,a,m,n;\n while(aa[i]!='\\0'){\n if(aa[i]==',')\n j++;\n i++; \n }\n j++;\n int cc[j+1][2],dd[1000],i1,k1,i2,k2;\n for(i=1;i<=j;i++){\n cc[i][0]=0;\n cc[i][1]=0;\n } \n i1=0;\n i2=0;\n m=1; \n do{\n k1=1;\n k2=1;\n while(aa[i1+k1]!=','&&aa[i1+k1]!='\\0')\n k1++;\n while(bb[i2+k2]!=','&&bb[i2+k2]!='\\0')\n k2++;\n for(l=i1;l=cc[i2][0]&&i1>x[i];\t\t\n\t\tif(cin.get()!=',')\n\t\t{\n\t\t\tsum=i+1;\n\t\t\tbreak;\n\t\t}\n\n\t}\n\tfor(j=0;j>y[j];\n\t\tcin.get(coma[j]);\n\t}\n\t\n\tfor(k=0; k<=1001 ;k++)\n\t{\n\t\tfor(i=0;i> x;\n\t\tch = cin.get();\n\t\tfor (int j = x; j < 1000; j++) a[j]++;\n\t\tn++;\n\t} // ?????????????????????1\n\n\tch = ',';\n\twhile (ch == ',')\n\t{\n\t\tcin >> y;\n\t\tch = cin.get();\n\t\tfor (int m = y; m < 1000; m++) a[m]= a[m] - 1;\n\t} // ?????????????????????1\n\n\tint max = 0;\n\tfor (int k = 0; k < 1000; k++)\n\t{\n\t\tif (a[k] > max) max = a[k];\n\t} // ???????????????max\n\n\tcout << n << \" \" << max;\n\treturn 0;\n}\n\n\t\t"} +{"label": "75", "index": "37099", "code": "int main()\n{\n\tint arrival[1000],depature[1000],i=0,j,count,max=0;\n\twhile(true) //????????????????????????????\n\t{\n\t\tcin>>arrival[i];\n\t\ti++;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\tint total=i; //?????\n\ti=0;\n\twhile(true) //????????????????\n\t{\n\t\tcin>>depature[i];\n\t\ti++;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=0;i<1000;i++) //?0?1000???????????????????????\n\t{\n\t\tcount=0;\n\t\tfor(j=0;j=arrival[j]&&imax) //????????????\n\t\t\tmax=count;\n\t}\n\tcout<=p[0]&&nmax)\n\t\t\tmax=count;\n\t\tcount=0;\n\t}\n\tprintf(\"%d %d\",num,max);\n}"} +{"label": "75", "index": "37101", "code": "int main()\n{\n\tint A[2000],B[2000],C[2000],i,j,k,number,max=0;\n\tchar c='e';\n\tfor(i=0;i<2000;i++)\n\t\tC[i]=0;\n\tfor(i=0;c!='\\n';i++)//??????????????\n\t{\n\t\tcin>>A[i];\n\t\tcin.get(c);//????\n\t}\n\tc='e';\n\tfor(i=0;c!='\\n';i++)\n\t{\n\t\tcin>>B[i];\n\t\tcin.get(c);\n\t}\n\tfor(j=0;j<=i;j++)\n for(k=A[j];kmax)\n\t\t\tmax=C[j];\n\tcout<i)\n\t\t\t{\n\t\t\t\ta[i]=a[i]+1;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d %d\\n\",num,max(a));\n\treturn 0;\n}\n\nint max(int array[])\n{\n\tint x=0,i;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tif(array[i]>x)\n\t\t\tx=array[i];\n\t}\n\treturn(x);\n}"} +{"label": "75", "index": "37103", "code": "int main()\n{\n\tint x[2000], y[2000], i = 1, j, sum = 0, pep[2000], k = 0;\n\tchar ch = ',';\n\twhile(ch == ',')\n\t{\n\t\tcin >> x[i];\n\t\tsum++;\n\t\ti++;\n\t\tch = cin.get();\n\t}\n\tfor(i = 1; i <= sum - 1; i++)\n\t\tcin >> y[i] >> ch;\n\tcin >> y[sum];\n\tfor(i = 1; i <= 2000; i++)//pep?????\n\t\tpep[i] = 0;\n\tfor(i = 1; i <= sum; i++)//?sum??????\n\t\tfor(j = x[i]; j < y[i]; j++)//?pep??????i?????????1\n\t\t\tpep[j]++;\n\tfor(i = 1; i <= 2000; i++)//?pep?????\n\t{\n\t\tfor(j = 1; j <= 2000; j++)\n\t\t{\n\t\t\tif(pep[i] < pep[j])\n\t\t\t\tbreak;\n\t\t\tk++;\n\t\t}\n\t\tif(k == 2000)//???????????sum????\n\t\t\t{\n\t\t\t\tcout << sum << \" \" << pep[i] << endl;\n\t\t\t\treturn 0;//????\n\t\t\t}\n\t\tk = 0;\n\t}\n}"} +{"label": "75", "index": "37104", "code": "int main()\n{\n int i,j,n,m,temp,arrive[1500],leave[1500],times[1001]={0};\n char c;\n c=getchar();\n while(c!=EOF)\n {\n n=0;\n while((c!='\\n')&&(c!=EOF)) // ???1?\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n arrive[n]=temp;\n n++;\n if(c==',')\n c=getchar();\n }\n c=getchar();\n n=0;\n while((c!='\\n')&&(c!=EOF)) // ???1?\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n leave[n]=temp;\n n++;\n if(c==',') c=getchar();\n }\n\tfor(i=0;i> x[n++];\n\t\tif (cin.get() == '\\n') break;\n\t}\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tcin >> y[i];\n\t\tfor (j = x[i]; j < y[i]; j++)\n\t\t{\n\t\t\tcount[j] ++; // ?????????????\n\t\t}\n\t\tif (cin.get() == '\\n') break;\n\t}\n\tfor (i = 0; i < 1001; i++)\n\t{\n\t\tif(max < count[i]) max = count[i];\n\t}\n\tcout << n << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37106", "code": "void main()\n{\n\tchar c1[10000],c2[10000];\n\tint len,i,j,b=0,k=0,a[1200][2],t[1200]={0},max=0;\n\tgets(c1);\n\tgets(c2);\n\tlen=strlen(c1);\n\tfor(i=0;imax) max=t[i];\n\t}\n\tprintf(\"%d %d\",k+1,max);\n}\n"} +{"label": "75", "index": "37107", "code": "int main()\n{\n\tint x[1001],y[1001],i,j,m,k=0,a[1001],b[1001]={0};\n\tchar c;\n\tfor(i=1;i<1001;i++)\n\t\ta[i]=i;\n\tfor(i=1;i<1001;i++)\n\t{\n\t\tscanf(\"%d%c\",&x[i],&c);\n\t\t\tk+=1;\n\t\tif(c!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=1;i<=k;i++)\n\t\tscanf(\"%d%c\",&y[i],&c);\n\tfor(i=1;i<=k;i++)\n\t\tfor(j=x[i];jm)\n\t\t\tm=b[i];\n\t}\n\tprintf(\"%d %d\\n\",k,m);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37108", "code": "int main ()\n{int x[1000];\n int y[1000];\n int i,n,s,t,j;\n char c;\nfor(i=0;;i++)\n { scanf(\"%d%c\",&x[i],&c);\n if(c!=',') break;\n } \n n=i+1;\nfor(i=0;;i++)\n { scanf(\"%d%c\",&y[i],&c);\n if(c!=',') break;\n } \n t=0;\n for(i=0;i<1000;i++)\n { s=0;\n\t for(j=0;j=x[j]&&it) t=s;\n }\n printf(\"%d %d\",n,t);\n\nreturn 0;\n}"} +{"label": "75", "index": "37109", "code": "//***************************\n//*???????? **\n//*????? 1300012921 **\n//*???2013.10.30 **\n//*************************** \nint main()\n\n{\n\tint x[1001], y[1001], time[1001] = {0};\n\tint i = 0;\n\tchar ch;\n\t\n\tdo\n\t{\n\t\ti++;\n\t\tcin >> x[i];\n\t\tch = cin.get();\n\t}while (ch == ',');\n\t\n\ti = 0;\n\t\n\tdo\n\t{\n\t\ti++;\n\t\tcin >> y[i];\n\t\tch = cin.get();\n\t}while (ch == ',');\n\t\n\tfor(int j = 1; j <= i; j++)\n\t{\n\t\tfor(int k = x[j]; k < y[j]; k++)\n\t\t\ttime[k] = time[k] + 1;\n\t}\n\t\n\tint max = 0;\n\tfor(int l = 1; l <= 1000; l++)\n\t{\n\t\tif(time[l] > max)\n\t\t\tmax = time[l];\n\t}\n\t\n\tcout << i << \" \" << max << endl;\n\treturn 0;\n} "} +{"label": "75", "index": "37110", "code": "//---------------\n// ?????\n// 2010/12/22\n// ADE\n//---------------\n\n\nint get(int arr[1000])//?????????????\n{\n\tint t=0,i=0;\n\tchar c;\n\tcin>>arr[i];\n i++;\n\twhile((c=cin.get())!='\\n')\n\t{\n\t\tcin>>arr[i];\n\t\ti++;\n\t}\n\treturn i;//?????\n}\nint main()\n{\n\tint i,k,s[1000],e[1000],time[1000],num,max=0,endtime=0;//max???????endtime??????\n\tfor(i=0;i<1000;i++)\n\t\ts[i]=e[i]=time[i]=0;\n\tnum=get(s);\n\tnum=get(e);\n\tfor(i=0;i>times;\n while(times[len]) len+=1;\n for(i=0;i>times;\n while(times[len]) len++;\n for(i=0;imaxn) maxn=sch[i];\n cout<max)\n\t\t\tmax=time[i];\n\t}\n\tprintf(\"%d %d\",num,max);\t\t \n}\n\n\n\n\n"} +{"label": "75", "index": "37113", "code": "int main()\n{\n\tint i;\n\tint a[1001], b[1001];\n\tfor( i = 1; ; i++)\n\t{\n\t\tcin >> a[i];\n\t\tchar ch = cin.get();\n\t\tif( ch != ',' )\n\t\t\tbreak;\n\t}\n\tfor( i = 1; ; i++)\n\t{\n\t\tcin >> b[i];\n\t\tchar ch = cin.get();\n\t\tif( ch != ',' )\n\t\t\tbreak;\n\t}\n\tint t = i;\n\tcout << t << \" \";\n\tint c[1001] = {0}, max = 0;\n\tfor(int i = 0; i < 1000; i++)\n\t{\n\t\tfor(int j = 1; j <= t; j++)\n\t\t{\n\t\t\tif( i >= a[j] && i < b[j] )\n\t\t\t\tc[i] ++;\n\t\t}\n\t\tif( c[i] > max )\n\t\t\tmax = c[i];\n\t}\n\tcout << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37114", "code": "/*\n * 1.cpp\n *\n * Created on: 2011-12-19\n * Author: 1100012870\n */\nint main()\n{\n\tint x[1001]={0},y[1001]={0},a[1001]={0},i,ans,l=1;\n\tchar p;\n\tp=getchar();\n\twhile(p!='\\n'){\n\t\tif(p==','){\n\t\t\tp=getchar();\n\t\t\tl++;\n\t\t}\n\t\tx[l]=x[l]*10+p-'0';\n\t\tp=getchar();\n\t}\n\tcout<a[i])\n\t\t\tt1=a[i];\n\t\tif(t2=a[j]&&ii)\n temp++;\n }\n if(temp>max)\n max=temp;\n }\n printf(\"%d %d\",counter,max); \n return 0;\n}\n "} +{"label": "75", "index": "37117", "code": "//********************\n//***\n//**??? 1300012728* \n//**2013.10.30********\n//********************\nint main()\n{\n\tint time[1000]; // ???????\n\tfor (int i = 0; i < 1000; i++)\n\ttime[i] = 0;\n\tint begin[1001], end[1001]; // ?????????????? \n\tint n = 1; // ?????n \n\tchar point; // ??point??\u0093?\u0094 \n\twhile (cin >> begin[n]) // ????begin?? \n\t{\n\t\tcin.get(point);\n\t\tif (point != ',') // ????\u0093?\u0094?????????? \n\t\t\tbreak;\n\t\tn++; // ???+1 \n\t}\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\t\tcin >> end[i];\n\t\t\tcin.get();\n\t}\n\t\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\t for (int j = begin[i]; j < end[i]; j++)\n\t\t \ttime[j] += 1;\n\t}\n\tint max = 0;\n\tfor (int i = 1; i < 1000; i++)\n\t{\n\t\tif(max <= time[i])\n\t\t{\n\t\t\tmax = time[i];\n\t\t}\n\t}\n\tcout << n <<\" \"<< max;\n\treturn 0;\n}"} +{"label": "75", "index": "37118", "code": "//********************************\n//*???????? **\n//*?????? 1300012934 **\n//*???2013.10.31 **\n//********************************\n\n\nint main()\n{ \n\tint x[1000], y[1000], t[1000] = {0}, n, number, tmax; //t????????\n\tchar douhao;\n\n\tn = 1; //n??????????????????\n\tcin >> x[0];\n\twhile ((douhao = cin.get()) != '\\n')\n\t{\n\t\tcin >> x[n];\n\t\tn++;\n\t}\n\tcin >> y[0];\n\tfor (int i=1; i <= n - 1; i++) //??y?y?x???????\n\t{\n\t\tcin >> douhao >> y[i];\n\t}\n\tfor (int i=0; i <= n - 1; i++)\n\t{\n\t\tfor (int j=x[i]; j < y[i]; j++) //?????????????\n\t\t{\n\t\t\tt[j]++;\n\t\t}\n\t}\n\tnumber = 0; //number????????????\n\ttmax = 0; //tmax?????????????????????????\n\tfor (int i=0; i <= n - 1; i++)\n\t{\n\t\tif (tmax < y[i])\n\t\t\ttmax = y[i]; //?????????????????\n\t}\n\tfor (int i=0; i <= tmax - 1; i++)\n\t{\n\t\tif (number < t[i])\n\t\t\tnumber = t[i];\n\t}\n\tcout << n << \" \" << number;\n\n\n\treturn 0;\n\n}\n"} +{"label": "75", "index": "37119", "code": "//********************************\n//*???????? **\n//*?????? 1300062706 **\n//*???2013.10.31**\n//********************************\nint main()\n{\n\tint i = 0, j = 0, m, k, x, y, temp, a[1000], b[1000], c[1000] = {0};\n\tchar ch;\n\twhile (cin >> x)\n\t{\n\t\tch = cin.get();\n\t\twhile (ch == ',')\n\t\t{\n\t\t\ta[i] = x;\n\t\t\ti++;\n\t\t\tcin >> x;\n\t\t\tch = cin.get();\n\t\t}\n\t\tif (ch == '\\n')\n\t\t{\n\t\t\ta[i] = x;\n\t\t\tbreak;\n\t\t}\n\t}\n while (cin >> y)\n\t{\n\t\tch = cin.get();\n while (ch == ',')\n\t\t{\n\t\t\tb[j] = y;\n\t\t\tj++;\n\t\t\tcin >> y;\n\t\t\tch = cin.get();\n\t\t}\n\t\tif (ch == '\\n')\n\t\t{\n\t\t\tb[j] = y;\n\t\t\tbreak;\n\t\t}\n\t}\n for (m=0;m<=j;m++)\n\t{\n\t\tfor (k=a[m];k max) {\n\t\t\tmax = at[i];\n\t\t}\n\t}\n\tcout << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37121", "code": "\nvoid main()\n{\n\tint x[1000]={0},y[1000]={0};\n\tchar c;\n\tint i=1,k,j=0,t,max=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c!=',')\n\t\t{\n\t\t\tx[i]=x[i]*10+c-'0';\n\t\t}\n\t\telse i++;\n\t}\n\tk=i;i=1;\n\t//for(i=1;i<=k;i++) printf(\"%d \",x[i]);\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c!=',')\n\t\t{\n\t\t\ty[i]=y[i]*10+c-'0';\n\t\t}\n\t\telse i++;\n\t}\n\tprintf(\"%d \",k);\n\tfor(t=0;t<=1000;t++)\n\t{\n\t\tj=0;\n\t\tfor(i=1;i<=k;i++)\n\t\t{\n\t\t\tif(t>=x[i]&&t> a[num];\n\t\tcin.get(c);\n\t\tnum++;\n\t}while (c == ',');\n\tnum = 1;\n\tdo \n\t{\n\t\tcin >> b[num];\n\t\tcin.get(c);\n\t\tnum++;\n\t}while (c == ',');\n\tcout << num - 1;\n\tnum--;\n\tfor (i = 0; i < 1000; i++)\n\t{\n\t\tfor (j = 1; j <= num; j++)\n\t\t{\n\t\t\tif (i >= a[j] && i < b[j])\n\t\t\t\ttemp++;\n\t\t}\n\t\tif (max < temp)\n\t\t\tmax = temp;\n\t\ttemp = 0;\n\t}\n\tcout << ' ' << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37123", "code": "int main()\n{\n\tint i,j,n,num[1000]={0},sum=0,g[1001][2]; //?????????\n\tchar s[1001][2];\n\tfor(i=1;i<1001;i++) //?????????????\n\t{\n\t\tn=i;\n\t\tcin>>g[i][0];\n\t\tcin.get(s[i][0]);\n\t\tif(s[i][0]=='\\n')\n\t\t\tbreak;\n\t}\n\tfor(i=1;i<=n;i++) //??????\n\t{\n\t\tcin>>g[i][1];\n\t\tcin.get(s[i][1]);\n\t\tif(s[i][1]=='\\n')\n\t\t\tbreak;\n\t}\n\tcout<i)\n\t\t\t\tnum[i]=num[i]+1;\n\t\t}\n\tfor(i=0;i<1000;i++) //????????\n\t{\n\t\tif(sum<=num[i])\n\t\t\tsum=num[i];\n\t}\n\tcout<=0;i--)\n {\n if(str[i]!=',')\n {\n time[k]=time[k]+(str[i]-'0')*p(j);\n j++;\n }\n else\n {\n j=0;\n k++;\n }\n }\n return ;\n}\nint length(char str[100000])\n{\n int count=1;\n for(int i=0;i>str1>>str2;\n int time1[1000],time2[1000];\n memset(time1,0,sizeof(time1)); memset(time2,0,sizeof(time2));\n change(time1,str1); change(time2,str2);\n int len1,len2;\n len2=len1=length(str1);\n cout<>in[num];\n\t\tif(getchar()=='\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnum++;\n\t\t}\n\t}\n\tnum=1;\n\twhile(1)\n\t{\n\t\tcin>>out[num];\n\t\tif(getchar()=='\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnum++;\n\t\t}\n\t}\n\tfor(time=1;time<=1000;time++)\n\t{\n\t\ts=0;\n\t\tfor(int i=1;i<=num;i++)\n\t\t\tif(in[i]<=time&&out[i]>time)\n\t\t\t\ts++;\n\t\tif(ma=num1[j] && imax)\n max=tmp; \n }\n printf(\"%d %d\",n,max);\n \n return 0;\n}\n"} +{"label": "75", "index": "37127", "code": "int main()\n{\n\tint a[1001] = {0}, b[1001] = {0}, c[1001] = {0}, n, max = 0;\n\tchar sign;\n\tn = 1;\n\tcin >> a[n];\n\tsign = cin.get();\n\twhile (sign == ',')\n\t{\n\t\tn++;\n\t\tcin >> a[n];\n\t\tsign = cin.get();\n\t}\n\tn = 1;\n\tcin >> b[n];\n\tsign = cin.get();\n\twhile (sign == ',')\n\t{\n\t\tn++;\n\t\tcin >> b[n];\n\t\tsign = cin.get();\n\t}\n\tfor (int i = 1; i <= n; i++)\n\t\tfor (int j = a[i]; j <= b[i] - 1; j++)\n\t\t\tc[j]++;\n\tfor (int i = 1; i <= 999; i++)\n\t\tmax = c[i] > max ? c[i]: max;\n\tcout << n << \" \" << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37128", "code": "//********************************\n//*???????? **\n//*?????? 1300012713 **\n//*???2013.10.31 **\n//********************************\nint main() \n{ \n\tint a[1000][2],b[1010] = {0}, x, y, num = 1, max = 0;\n\tchar ch; \n\tfor (num = 1; ; num++) //??\n\t{\n\t\tcin >> a[num-1][0]; //????????\n \tch = cin.get();\n\t\tif(ch == '\\n') break; //???????\n\t}\n\tfor(int i = 1; i <= num; i++) \n\t{\n\t\tcin >> a[i-1][1];//??????\n\t\tch = cin.get();\n\t for(int j = a[i-1][0]; j < a[i-1][1];j++) \n\t\t{\n\t\t\tb[j-1] = b[j-1] + 1;\n\t\t}\n\t}\n\tcout << num << \" \";\n for(int k = 1; k <= 1010; k++)\n\t\tif(b[k-1] > max)\n\t\t\tmax = b[k-1];\n cout << max;\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37129", "code": "int main()\n{\n\tint a[1000]={0},i=0,b[1000][2]={0},n=0,j,max;\n\tchar c;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&b[i][0],&c);\n\t\tn++;\n\t\ti++;\n\t}while(c!='\\n');\n\ti=0;\n\tc=0;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&b[i][1],&c);\n\t\ti++;\n\t}while(c!='\\n');\n\tfor(j=0;j<1000;j++)\n\t{\n\t\tfor(i=0;i=b[i][0]&&j> c[i];\n\t\ttemp=getchar();\n\t\t\tif(temp!=',')\n\t\t\t\tbreak;\n\t\t\ti++;\n\t}\n\ti=0;\n\twhile(1)\n\t{\n\t\tcin >> d[i];\n\t\ttemp=getchar();\n\t\t\tif(temp!=',')\n\t\t\t\tbreak;\n\t\t\ti++;\n\t}\n\tsum=i+1;\n\t\tcout << sum << \" \";\n\tfor(k=1;k<=1000;k++)\n\t{\n\t\tfor(j=0;j<=sum-1;j++)\n\t\t\tif(c[j]<=k && d[j]>k)\n\t\t\t\tcount++;\n\t\t\tif(count>max)\n\t\t\t\tmax=count;\n\t\t\tcount=0;\n\t}\n\tcout << max << endl;\n\treturn 0;\n}\n\n\n\n\n\n\n\n"} +{"label": "75", "index": "37131", "code": "int main()\n{\n\tint a[1000], b[1000], sum=0, c[2000],max;\n\tchar ch;\n\tfor(int i=0;;i++)\n\t{\n\t\tcin >> a[i];\n\t\tsum++;\n\t\tch=cin.get();\n\t\tif(ch=='\\n')\n\t\t\tbreak;\n\t\t\n\t}\n\tfor(int i=0;i<2000;i++)\n\t\tc[i]=0;\n\tfor(int j=0;j> b[j];\n\t\tch = cin.get();\n\t\tfor(int k=a[j];kmax)\n\t\t{\n\t\t\tmax=count[i];\n\t\t\tii=i;\n\t\t}\n\t}\n\tcout<> x[n];\n\t\tcin.get(b);\n\t\tif (b == '\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (n = 0; ; n++)\n\t{\n\t\tcin >> y[n];\n\t\tcin.get(c);\n\t\tif (c == '\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (k = 0; k <= n; k++)\n\t{\n\t\tfor (j = x[k]; j < y[k]; j++)\n\t\t{\n\t\t\ta[j] ++;\n\t\t}\n\t}\n\tfor (m = 0; m < 1000; m++)\n\t{\n\t\tif (t < a[m])\n\t\t{\n\t\t\tt = a[m];\n\t\t}\n\t}\n\tcout << n + 1 << \" \" << t << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37134", "code": "int main()\n{\n\tint a[1010], b[1010], d[1010], i = 1, n;\n\tchar c = ',';\n\tfor(i = 1; i <= 1010; i++)\n\t{\n\t\tcin >> a[i];\n\t\tif(getchar() == '\\n')\n\t\t\tbreak;\n\t}\n\tn = i;\n\tcin >> b[1];\n\tfor(int j = 2; j <= n; j++)\n\t\tcin >> c >> b[j];\n\tfor(int j = 1; j <= 1010; j++)\n\t{\n\t\td[j] = 0;\n\t\tfor(int k = 1; k <= n; k++)\n\t\t{\n\t\t\tif(a[k] <= j && b[k] > j)\n\t\t\t\td[j]++;\n\t\t}\n\t}\n\tint max = d[1];\n\tfor(int j = 2; j <= 1010; j++)\n\t\tmax = max >= d[j]? max: d[j];\n\tcout << n << \" \";\n\tcout << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37135", "code": "int main()\n{\n\tint begin[10000]={' '},end[10000]={' '};\t\t\t//begin and end array:record time\n\tint sum[10000]={' '};\t\t\t//record amount of the people present at the same time\n\tint max_sum=0;\n\tint num_sum=0;\n\tchar b[10]={' '};\n\tint i,j=0;\t\t//cyclic variable\n\tchar a[10000]={' '};\t\t\t//read input\n\tchar a1[10000]={' '};\n\t\t\t//next thirteen lines get the input\n\tcin.getline(a,10000);\n\tint length=strlen(a);\n\tfor(i=0;i<=length;i++)\n\t{\n\t\tif((a[i]<='9')&&(a[i]>='0'))\n\t\t{\n\t\t\tb[j]=a[i];\n\t\t\tj++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbegin[num_sum]=atoi(b);\n\t\t\tnum_sum++;\n\t\t\tfor(int k=0;k='0'))\n\t\t{\n\t\t\tb[j]=a1[i];\n\t\t\tj++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tend[num_sum]=atoi(b);\n\t\t\tnum_sum++;\n\t\t\tfor(int k=0;k=begin[j])&&(imax_sum)\n\t\t\tmax_sum=sum[i];\n\tcout<> x[0];\n\tstart = x[0];\n\t\n\twhile(cin.get()==',')\t\t//??x??????????????start\n\t{\n\t\tcin >> x[i];\t\t\t\n\t\tif(x[i]> y[0];\n\tend = y[0];\n\n\ti = 1;\n\twhile(cin.get()==',')\t\t//??y??????????????end\n\t{\n\t\tcin >> y[i];\n\t\tif(y[i]>end)\n\t\t\tend = y[i];\n\t\ti++;\n\t}\n\n\tfor(i=start;imax)\t\t\t//?num???????max\n\t\t\tmax = num[i];\n\t}\n\tcout << count << \" \" << max;\t//??count?max\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37137", "code": "int main()\n{\n\tint a[1000][2],sum=0,min=100000000,max=0;\n\tchar b;\n\tdo{\n\t\tcin >>a[sum][0];\n\t\tif(a[sum][0]>a[i][1];\n\t\tif(a[i][1]>max)\n\t\t\tmax=a[i][1];\n\t\tb=getchar();\n\t}\n\tcout <j)\n\t\t\t\t++m1;\n\t\tif(m1>m)\n\t\t\tm=m1;\n\t}\n\tcout << m <=arr[j] && i>x[i];\n\t cin.get(c);\n\t n++;\n\tif(c=='\\n')break;}\n\n\tfor(i=0;i<1000;i++)\n\t{cin>>y[i];\n\t cin.get(c);\n\tif(c=='\\n')break;}\n\n\txmin=x[0];ymax=y[0];\n\tfor(i=0;x[i]!=0;i++)\n\t{\n\t if(xmin>=x[i]){xmin=x[i];}\n\t if(ymax<=y[i]){ymax=y[i];}\n\t}\n\tfor(i=xmin;i<=ymax;i++)\n\t{\n\t\tfor(j=0;j>n)\n\t{\n\t\ta[al++]=n;\n\t\tcin.get(ch);\n\t\tif(ch=='\\n')\n\t\t\tbreak;\n\t}\n\t//??\n\tint bl=0;\n\twhile(cin>>n)\n\t{\n\t\tb[bl++]=n;\n\t\tcin.get(ch);\n\t\tif(ch=='\\n')\n\t\t\tbreak;\n\t}\n\t//??\n\tint len=bl;\n\t//\n\tint max=0;\n\tfor(int i=0; i < 999; i++)\n\t{\n\t\tint cnt=0;\n\t\tfor(int j=0; j < len; j++)\n\t\t{\n\t\t\tif(i >= a[j] && i < b[j])\n\t\t\t\tcnt++;\n\t\t}\n\t\tif(cnt > max)\n\t\t\tmax=cnt;\n\t}\n\tcout<maxrs) maxrs=trs[i];\n\n\tprintf(\"%d %d\",rs,maxrs);\n}"} +{"label": "75", "index": "37142", "code": "int main()\n{\n\tint f[15000] = {0};\n\tint l[15000] = {0};\n\tint x[50000] = {0};\n\tchar a[30000], b[30000];\n\tscanf(\"%s\", a);\n\tscanf(\"%s\", b);\n\tint along, blong, i = 0, u = 0, v = 0, max = 0;\n\tint num[30000] = {0};\n\talong = strlen(a);\n\tblong = strlen(b);\n\twhile (u <= along - 1)\n\t{\n\t\tfor (v = u; (a[v] != ',') && (a[v] != '\\0'); v++)\n\t\t{\n\t\t\tnum[i] = a[v] - '0';\n\t\t\tu++;\n\t\t\tf[i] = f[i] * 10 + num[i];\n\t\t}\n\t\ti = i + 1;\n\t\tu = u + 1;\n\t}\n\tu = 0;\n\tv = 0;\n\ti = 0;\n\twhile (u <= blong - 1)\n\t{\n\t\tfor (v = u; (b[v] != ',') && (b[v] != '\\0'); v++)\n\t\t{\n\t\t\tnum[i] = b[v] - '0';\n\t\t\tu++;\n\t\t\tl[i] = l[i] * 10 + num[i];\n\t\t}\n\t\tu++;\n\t\ti++;\n\t}\n\tint vmax = 0;\n\tfor (u = 0; u <= i - 1; u++)\n\t{\n\t\tfor (v = f[u]; v < l[u]; v++)\n\t\t{\n\t\t\tx[v] = x[v] + 1;\n\t\t\tif (vmax <= v)\n\t\t\t{\n\t\t\t\tvmax = v;\n\t\t\t}\n\t\t}\n\t}\n\tfor (u = 0; u <= vmax + 1; u++)\n\t{\n\t\tif (max <= x[u])\n\t\t{\n\t\t\tmax = x[u];\n\t\t}\n\t}\n\tcout << i << \" \" << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37143", "code": "int main()\n{\n\n\tint a[1001], b[1001], d[1000] = {0}, n, max = 0; //a,b????????d???????????n?????max?????????\n\tchar c; //????\n\n\tfor(n = 1; n <= 1000; n++)\n\t{\n\t\tcin >> a[n];\n\t\tif(cin.get() == '\\n') //??????????\n\t\t\tbreak;\n\t}\n\n\t//????????????\n\tcin >> b[1];\n\tfor(int j = 2; j <= n; j++)\n\t\tcin >> c >> b[j];\n\n\t//????????????\n\tfor(int j = 0; j < 1000; j++)\n\t{\n\t\tfor(int k = 1; k <= n; k++)\n\t\t\tif(a[k] <= j && b[k] > j)\n\t\t\t\td[j]++;\n\t\tmax = max > d[j]? max: d[j]; //???????\n\t}\n\t\n\tcout << n << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37144", "code": "int main()\n{\n\tint i,a[1000],b[1000],num=0,l,j=0,c[1000]={0},max=0;\n\tchar m[10000],n[10000],t[100];\n\tcin>>m>>n;\n\tl=strlen(m);\n\tfor(i=0;i<=l;i++)\n\t{\n\t\tif(m[i]==','||m[i]=='\\0')\n\t\t{\n\t\t\tnum++;\n\t\t\tt[j]='\\0';\n\t\t\tj=0;\n\t\t\ta[num]=atoi(t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt[j]=m[i];\n\t\t\tj++;\n\t\t}\n\t}\n\tnum=0;\n\tj=0;\n\tl=strlen(n);\n\tfor(i=0;i<=l;i++)\n\t{\n\t\tif(n[i]==','||n[i]=='\\0')\n\t\t{\n\t\t\tnum++;\n\t\t\tt[j]='\\0';\n\t\t\tj=0;\n\t\t\tb[num]=atoi(t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt[j]=n[i];\n\t\t\tj++;\n\t\t}\n\t}\n\tcout<=a[j]&&i max)\n\t\t\tmax = time[i];\n\n\tcout << people << \" \" << max << endl;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37146", "code": "int main()\n{\n\tint a[1000][2]={0},c[1000]={0},i,j,k=0,sum=0,max,min;\n\tchar b;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tscanf(\"%d%c\",&a[i][0],&b);\n\t\tsum++;\n\t\tif(b!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=0;imax)\n\t\t\tmax=a[i][1];\n\t}\n\tfor(i=min;ii+1||a[j][1]==i+1))\n\t\t\t\tc[k]++;\n\t\t}\n\t\tk++;\n\t}\n\tmax=c[0];\n\tfor(i=0;imax)\n\t\t\tmax=c[i];\n\t}\n\tprintf(\"%d %d\",sum,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37147", "code": "int main()\n{\n\tint n,p,i=1,j,k=1,l,a[1002],b[1002],count,max1=0; //n?????p????????\n\tchar c;\n\tdo\n\t{\t\n\t\tcin >> a[i];\n\t\tc=cin.get();\n\t\ti++;\n\t} while (c==',');\n\tp=i-1;\n\ti=1;\n\tdo\n\t{\n\t\tcin >> b[i];\n\t\tc=cin.get();\n\t\ti++;\n\t} while (c==',');\n\tint max=0,min=1004;\n\tfor (i=1;i<=p;i++)\n\t{\n\t\tif (a[i]max)\n\t\t\tmax=b[i];\n\t}\n\tfor (i=min;i<=max;i++)\n\t{\n\t\tcount=0;\n\t\tfor (j=1;j<=p;j++)\n\t\t{\n\t\t\tif (a[j]<=i&&b[j]>=(i+1))\n\t\t\t\tcount++;\n\t\t}\n\t\tif (count>max1)\n\t\t\tmax1=count;\n\t}\n\tcout << p << \" \" << max1 << endl;\n\treturn 0;\n}\n\t\t"} +{"label": "75", "index": "37148", "code": "int main()\n{\n\tint n=0,i,j,a[1000],b[1000],c[1000]={0},max,t=0;\n\tchar d;\n\tdo\n\t{\n\t\tscanf(\"%d\",&a[n]);\n\t\tn++;\n\t}while((d=getchar())!='\\n');\n\tfor(i=0;it)t=a[i];\n\tfor(i=0;it)t=b[i];\n\tfor(i=0;i=a[j]&&i> x[i] ;\n\t\tch = cin.get() ;\n\t\ti++ ;\n\t}while(ch == ',') ;\n\tdo\n\t{\n\t\tcin >> y[j] ;\n\t\tch = cin.get() ;\n\t\tj++ ;\n\t}while(ch == ',') ;\n\ttotal = i ;\n\tint z[1000] = {0} ;\n\tfor (int k = 0 ; k < total ; k++)\n\t{\n\t\tfor (int q = x[k] ; q < y[k] ; q++)\n\t\t{\n\t\t\tz[q]++ ;\n\t\t}\n\t}\n\tint s = 0 ;\n\tfor (int l = 0 ; l <= 998 ; l++)\n\t{\n\t\tif (z[l] > z[l+1])\n\t\t{\n\t\t\ts = z[l+1] ;\n\t\t\tz[l+1] = z[l] ;\n\t\t\tz[l] = s ;\n\t\t}\n\t}\n\tmax = z[999] ;\n\tcout << total << \" \" << max ;\n\treturn 0 ;\n}"} +{"label": "75", "index": "37150", "code": "main ()\n{\n int m=0,a[1000]={0},b[1000]={0},c[1000]={0},i,j,s=0,s1=1;\n char x;\n i=0;\n while(1)\n {\n scanf(\"%d\",&a[i]);\n x=getchar();\n m=m+1;\n if(x!=',')break;\n i++;}\n i=0;\n while(1)\n {s++;\n scanf(\"%d\",&b[i]);x=getchar();\n if(x!=',')break;\n i++;\n }\n\n for(i=0;i<1000;i++)\n {\n for(j=0;j<1000;j++)\n {\n if(i=a[j])c[i]++;\n }\n }\n\n for(i=0;i<1000;i++)\n {\n if(c[i]>s1)s1=c[i];\n }\n printf(\"%d %d\",s,s1);\n\n\n\n}\n"} +{"label": "75", "index": "37151", "code": "\nint main()\n{\n \tint xi[1000], yi[1000], time[1000] = {0}; //xi??????yi?????,time???????? \n\tint i = 0, max = 0,j = 0; //i?????,max??????????\n\tchar c; //????????\n\tint temp; //temp???????????? \n\t\n\tdo\n\t{\n \t \t cin >> xi[i]; //??????\n\t\t i++; //i????????1? \n \t} \n \twhile ( ( c = cin.get() ) == ',' ); //?????????????,?????? \n\t\n \tdo\n\t{\n \t \t cin >> yi[j]; //?????? \n \t \t j++;\n \t} \n \twhile ( ( c = cin.get() ) == ',' ); //?????????????,??????\n\t\n\n\tfor ( int j = 0; j < i; j++ ) //j??j?? \n\t{\n\t \tfor ( int k = xi[j]; k < yi[j]; k++ ) //k???? \n\t \t{\n\t\t \ttime[k] += 1;\n\t \t}\t\n\t}\n\t\n\tfor ( int j = 0; j < 1000; j++ )\n\t{\n\t \tif ( time[j] > max )\n\t \t max = time[j];\t\n\t} \n\n\t cout << i << \" \" << max;\n\t \n\t return 0;\n}"} +{"label": "75", "index": "37152", "code": "int main()\n{\n int i,j,n,x[1005],y[1005],mark,max=0;\n char c;\n scanf(\"%d\",&x[0]);\n i=1;\n while((c=getchar())==',')\n {\n scanf(\"%d\",&x[i]);\n i++;\n }\n scanf(\"%d\",&y[0]);\n i=1;\n while((c=getchar())==',')\n {\n scanf(\"%d\",&y[i]);\n i++;\n }\n n=i;\n for(i=0;i<1000;i++)\n {\n mark=0;\n for(j=0;j=x[j]&&imark)?max:mark;\n }\n printf(\"%d %d\",n,max);\n}\n"} +{"label": "75", "index": "37153", "code": "int main ()\n{\n\tint time[3][1005]={0}, i=1,j, num, tmax=0;\n\tint count[1005]={0}, countmax=0;\n\tchar p=0;\n\twhile ( p!='\\n' )\n\t{\n\t\tcin >> time [1][i];\n\t\tp = cin.get();\n\t\ti++;\n\t}\n\tp=0,i=1;\n\twhile ( p!='\\n' )\n\t{\n\t\tcin >> time [2][i];\n\t\tp = cin.get();\n\t\ti++;\n\t}\n\tnum = i-1;\n\tfor ( i=1; i <=num; i++ )\n\t\tif ( time[2][i] > tmax )\n\t\t\ttmax = time [2][i];\n\tfor ( i=1; i<=tmax; i++ )\n\t{\n\t\tfor ( j=1; j <= num; j++ )\n\t\t{\n\t\t\tif ( time [2][j] > i && time [1][j] <= i )\n\t\t\t\tcount[i]++;\n\t\t}\n\t}\n\tfor ( i=1; i<=tmax; i++)\n\t\tif ( count[i] > countmax )\n\t\t\tcountmax=count[i];\n\tcout << num << \" \" << countmax << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37154", "code": "\n\n\n\nint main(){\n\n\tint a[1000][2];\n\tint n=0;\n\tint num=0;\n\n\twhile(true){\n\n\t\tcin>>a[n][0];\n\n\t\tn++;\n\n\t\tif(cin.get()!=',') break;\n\t}\n\n\tfor(int i=0;i>a[i][1];\n cin.get();\n\t}\n\n\tfor(int i=0;i<1000;i++){\n\t\tint tmp=0;\n\t\tfor(int j=0;j=a[j][0]&&inum){\n\t\t\tnum=tmp;\n\t\t}\n\t}\n\n\tcout<=time[j].x&&imax)\n\t\t\tmax=sum;\n\t}\n\tprintf(\"%d\\n\",max);\n\treturn 0;\n}"} +{"label": "75", "index": "37156", "code": "int main ()\n{\n\tint come[1000], go[1000];\n\tint i, j, k, p = 0, max = 0;\n\tfor ( i = 0; ; i++ )\n\t{\n\t\tcin >> come[i];\n\t\tif ( cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor ( i = 0; ; i++ )\n\t{\n\t\tcin >> go[i];\t// ?????????????\n\t\tif ( cin .get() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor ( j = 0; j <= 1000; j++ )\n\t{\n\t\tfor ( k = 0; k <= i + 1; k ++ )\n\t\t{\n\t\t\tif ( come[k] <= j && go[k] >= j + 1 )\n\t\t\t\tp = p + 1;\n\t\t}\t\t\t\t// ??????????\n\t\tif ( max <= p )\n\t\t\tmax = p; //?????\n\t\tp = 0;\n\t}\n\tcout << i + 1 << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37157", "code": "/*\t???:???\n\t???:1000012896 leo\n\t????:2010.12.1\n\t????:??????????\n\t*/\nint main()\n{\n\tint atime[10000], ltime[10000], min = 1000, max = 0, count = 0, per, maxp = 0, i, j;\n\tfor (i = 1; ;i++)\n\t{\n\t\tcin >> atime[i];\n\t\tif (atime[i] < min)\n\t\t\tmin = atime[i];\n\t\t\tif (getchar() == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 1; ;i++)\n\t{\n\t\tcin >> ltime[i];\n\t\tif (ltime[i] > max)\n\t\t\tmax = ltime[i];\n\t\t\tif (getchar() == '\\n')\n\t\t\tbreak;\n\t}\n\tcount = i;\n\tfor (j = min; j <= max - 1; j++)\n\t{\n\t\tper = 0;\n\t\tfor (i = 1; i <= count; i++)\n\t\t\tif ( atime[i] <= j && ltime[i] > j)\n\t\t\t\tper ++;\n\t\tif (per > maxp)\n\t\t\tmaxp = per;\n\t}\n\tcout << count << ' ' << maxp;\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37158", "code": "/* ???:main.cpp\n * ??????\n * ?????2012-11-11\n * ??????????????????????????????????????????????????????????????????????????i????????????????????xi, yi????????????????t?? xi <= t < yi????????????????????? 0 <= xi < yi<1000?????????????????????????????????????????\n */\n\nint main ()\n{\n\tint time[1001][3],tofbegin,tofend,//time???????????tofbegin,tofend?????????????????\n\t\tnum,noft[1001],max,//num????noft?????????????max??????????\n\t\tt,i,j;//????\n\tchar ignore;//??\u0091?\u0092???????\n\ttofbegin = 1001;//?????\n\ttofend = 0;\n\tfor ( j = 1; j <= 2; j++ )//????????????????tofbegin,tofend\n\t{\n\t\tignore = '0';\n\t\tfor ( i = 1; ignore != '\\n'; i++ )//?????????????\n\t\t{\n\t\t\tcin >> time[i][j];\n\t\t\tcin.get(ignore);\n\t\t\tif ( tofbegin > time[i][j] )\n\t\t\t\ttofbegin = time[i][j];\n\t\t\tif ( tofend < time[i][j])\n\t\t\t\ttofend = time[i][j];\n\t\t}\n\t}\n\tnum = i - 1;//?????\n\tmax = 0;//???\n\tfor ( t = tofbegin; t < tofend; t++ )//????????????\n\t{\n\t\tnoft[t] = 0;//???\n\t\tfor ( i = 1; i <= num; i++ )//????\n\t\t\tif ( t < time[i][2] && t >= time[i][1] )\n\t\t\t\tnoft[t] += 1;\n\t\tif ( max < noft[t] )//??????????????\n\t\t\tmax = noft[t];\n\t}\n\tcout << num << ' ' << max << endl;//????\n\treturn 0;\n}\n"} +{"label": "75", "index": "37159", "code": "int main()\n{\n int a[1002][3],d[2010][3],i=1,j=1,count=0,tem=0,max=0;\n char b;\n for(i=1;;i++)\n {\n cin>>a[i][1];\n cin.get(b);\n count++;\n if(b=='\\n')\n break;\n }\n for(j=1;;j++)\n {\n cin>>a[j][2];\n cin.get(b);\n if(b=='\\n')\n break;\n }\n for(i=1;i<=count;i++)\n for(j=1;j<=2;j++)\n d[i][j]=a[i][j];\n for(i=1;i<=count-1;i++)\n for(j=1;j<=count-i;j++)\n {\n if(d[j][1]>d[j+1][1])\n {\n tem=d[j][1];\n d[j][1]=d[j+1][1];\n d[j+1][1]=tem;\n }\n if(d[j][2]>d[j+1][2])\n {\n tem=d[j][2];\n d[j][2]=d[j+1][2];\n d[j+1][2]=tem;\n }\n }\n double k=0.0;\n for(k=d[1][1];k<=d[count][2];k+=0.5)\n {\n int num=0;\n for(j=1;j<=count;j++)\n {\n if(a[j][1]<=k && kmax)\n max=num;\n }\n cout<> timein[i];\n\t\tc = cin.get();\n\t\tif ( c == '\\n' )\n\t\t\tbreak;\n\t\telse count ++;\n\t}\n\tfor ( i = 0; i < 1000; i ++ )\n\t{\n\t\tcin >> timeout[i];\n\t\tc = cin.get();\n\t\tif ( c == '\\n' )\n\t\t\tbreak;\n\t}\n\tfor ( i = 0; i < 1000; i ++ )\n\t\tfor ( j = 0; j < count; j ++ )\n\t\t{\n\t\t\tif (( timein[j] <= i ) && ( timeout[j] > i ))\n\t\t\t\tmax[i] ++;\n\t\t}\n\tk = 0;\n\tfor ( i = 1; i < 1000; i ++ )\n\t{\n\t\tif ( max[k] < max[i] )\n\t\t{\n\t\t\tk = i;\n\t\t}\n\t}\n\tcout << count << \" \" << max[k] << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37161", "code": "void main()\n{\n\tint m,n,i,j,a=0,w=0,c=0;\n\tint s[1001],t[1001];\n scanf(\"%d\",&s[c]);\n\twhile(getchar()==',')\n\t{\n\t\tc++;\n\t\tscanf(\"%d\",&s[c]);\n\t}\n\tm=c;\n\tc=0;\n scanf(\"%d\",&t[c]);\n\twhile(getchar()==',')\n\t{\n\t\tc++;\n\t\tscanf(\"%d\",&t[c]);\n\t}\n\n\tfor(i=0;i<10001;i++)\n\t{\n\t\tfor(j=0;j<=m;j++)\n\t\t{\n\n\t\t if(i>=s[j]&&ia)\n\t\t\ta=w;\n\t\tw=0;\n\t}\n\tc=(m+1);\n\tprintf(\"%d %d\",c,a);\n}\n\n"} +{"label": "75", "index": "37162", "code": "int main()\n{\n\tint time[1001] = {0};\n\tchar x[10000] , ch;\n\tint tem[1001] , max = 0 , count = 1 , len;\n\tint come[1001] , go[1001];\n int i , j;\n\tcin.getline( x , 10000 , '\\n');\n\tlen = strlen(x);\n\tfor(i =0; i<= 1000;i++) time[i] = 0;\n\tfor (i = 0 ; i <= len - 1 ; i++)\n\t{\n\t\tif (x[i] == ',')\n\t\t{\n\t\t\ttem[count] = i;\n\t\t\tcount++;\n\t\t}\n\t\ttem[count] = len;\n\t\ttem[0] = -1;\n\t}\n\tfor (i = 1 ; i <= count ; i++)\n\t{\n\t\tif ((tem[i] - tem[i - 1]) == 2)\n\t\t{\n\t\t\tcome[i] = x[tem[i] - 1] - 48;\n\t\t}\n\t\tif ((tem[i] - tem[i - 1]) == 3)\n\t\t{\n\t\t\tcome[i] = x[tem[i] - 1] - 48 + 10 * (x[tem[i] - 2] - 48);\n\t\t}\n\t\tif ((tem[i] - tem[i - 1]) == 4)\n\t\t{\n\t\t\tcome[i] = x[tem[i] - 1] - 48 + 10 * (x[tem[i] - 2] -48) + 100 * (x[tem[i] - 3] - 48);\n\t\t}\n\t}\n\tfor (i = 1 ; i <= count -1 ; i++)\n\t{\n\t\tcin >> go[i] >> ch;\n\t}\n\tcin >> go[count];\n\tfor (i = 1 ; i <= count ; i++)\n\t{\n\t\tfor (j = come[i] ; j < go[i] ; j++)\n\t\t{\n\t\t\ttime[j]++;\n\t\t}\n\t}\n\tfor (i = 0 ; i <= 999 ; i++)\n\t{\n\t\tif (time[i] > max)\n\t\t{\n\t\t\tmax = time[i];\n\t\t}\n\t}\n\tcout << count << ' ' << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37163", "code": "\n\n\nint main()\n{\n\tint list1[1000];\n\tint list2[1000];\n\tscanf(\"%d\",&list1[0]);\n\tint count=1;\n\twhile(scanf(\",%d\",&list1[count++])!=0);\n\tcount--;\n\tint index=1;\n\tscanf(\"%d\",&list2[0]);\n\twhile(scanf(\",%d\",&list2[index++])!=0);\n\n\tint max=0;\n\tint num=0;\n\tint i=0;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tnum=0;\n\t\tfor(index=0;index=list1[index] && imax)\n\t\t\tmax=num;\n\t}\n\n\tprintf(\"%d %d\",count,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37164", "code": "int main()\n{\n\tint c[10000][2],d[10000],e[10000],i=0,j,t=0,m,n=-1,most=0,max=0,min=1000,pause;\n\tchar a[10000],b[10000];\n\tmemset(c,0,sizeof(c));\n\tmemset(e,0,sizeof(e));\n\tcin>>a;\n\tfor(i=0;i<10000;i++)\n\t{\n\t\tif(a[i]!=','&&a[i]!='\\0')\n\t\t\td[i]=a[i]-'0';\n\t\tif(a[i]==',')\n\t\t{\n\t\t\tm=i;\n\t\t\tfor(j=n+1;jc[t][0])\n\t\t\t\tmin=c[t][0];\n\t\t\tt++;\n\t\t}\n\t\tif(a[i]=='\\0')\n\t\t{\n\t\t\tm=i;\n\t\t\tfor(j=n+1;jc[t][0])\n\t\t\t\tmin=c[t][0];\n\t\t\tt++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tn=-1;\n\tt=0;\n\tcin>>b;\n\tfor(i=0;i<10000;i++)\n\t{\n\t\tif(b[i]!=','&&b[i]!='\\0')\n\t\t\td[i]=b[i]-'0';\n\t\tif(b[i]==',')\n\t\t{\n\t\t\tm=i;\n\t\t\tfor(j=n+1;ji)\n\t\t\t\te[i]++;\n\t\tif(most> a[i]) //???????????+1?????????? \n {\n sum++;\n c = cin.get();\n if ( c == ',') //????????????????????????? \n i++;\n else //????????\u0093????\u0094????????sum???????? \n break;\n }\n \n int b[sum]; //????sum??????b??????????????? \n for ( i = 0; i <= sum - 1; i++ ) //??????????????b????? \n {\n cin >> b[i];\n cin.get();\n }\n //????i????????????????????a[i-1],b[i-1]\n \n int d[1000]; //??????d?????????????????d[0]??0?????????d[15]??15???????? \n for ( i = 0; i <= 999; i++ ) //??????????????0 \n d[i] = 0;\n \n //?????a[i]?????b[i]????????J??? J >= a[i] ? J < b[i]??????????d[j]++???j?????????+1 \n for ( i = 0; i <= sum - 1; i++ ) \n { \n for ( j = 0; j <= 999; j++ )\n {\n if ( j >= a[i] && j < b[i] )\n d[j]++;\n }\n }\n \n //for ( i = 1; i <= 999; i++ ) //??????d??????????????????????d[999]????????????? \n// {\n// for ( j = 0; j <= 999 - i; j++ )\n// {\n// if ( d[j] > d[j+1])\n// {\n// p = d[j+1];\n// d[j+1] = d[j];\n// d[j] = p;\n// }\n// }\n// }\n \n for ( i = 0; i <= 999; i++ )\n {\n if ( tmax < d[i] )\n tmax = d[i];\n } \n cout << sum << \" \"<< tmax << endl;\n}\n"} +{"label": "75", "index": "37166", "code": "int main()\n{\n\tchar c;\n\tint a[1000],b[1000];\n\tint i=0,d,m,max,t=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c!=','&&t==0)\n\t\t{\n\t\t\ta[i]=c-'0';\n\t\t\tt=1;\n\t\t\ti++;\n\t\t}\n\t\telse if(c!=','&&t==1)\n\t\t{\n\t\t\ti--;\n\t\t\ta[i]=a[i]*10+c-'0';\n\t\t\tt=1;\n\t\t\ti++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt=0;\n\t\t\tcontinue;\n\t\t}\n\t}\n\td=i;\n\ti=0;t=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c!=','&&t==0)\n\t\t{\n\t\t\tb[i]=c-'0';\n\t\t\tt=1;\n\t\t\ti++;\n\t\t}\n\t\telse if(c!=','&&t==1)\n\t\t{\n\t\t\ti--;\n\t\t\tb[i]=b[i]*10+c-'0';\n\t\t\ti++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt=0;\n\t\t\tcontinue;\n\t\t}\n\t}\n\tmax=0;t=0;\n\twhile(t<1000)\n\t{\n\t\tm=0;\n\t\tfor(i=0;it)\n\t\t\t\tm++;\n\t\t}\n\t\tif(m>max)\n\t\t\tmax=m;\n\t\tt=t+1;\n\t}\n\tprintf(\"%d %d\",d,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37167", "code": "void main()\n{\n\tint max(int a[],int n);\n\tint min(int a[],int n);\n\tint a[1000],b[1000],i=1,j,c[1000]={0},count=0,n,maxa,maxb,mina,minb,max_,min_,max0,maxman;\n\tscanf(\"%d\",&a[0]);\n\twhile(getchar()==',')\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t\ti++;\n\t}\n\tn=i;\n\ti=1;\n\tscanf(\"%d\",&b[0]);\n\twhile(getchar()==',')\n\t{\n\t\tscanf(\"%d\",&b[i]);\n\t\ti++;\n\t}\n\tmaxa=max(a,n);\n\tmaxb=max(b,n);\n\tmina=min(a,n);\n\tminb=min(b,n);\n\tif(maxa>=maxb)max_=maxa;else max_=maxb;\n\tif(mina<=minb)min_=mina;else min_=minb;\n\tfor(max0=min_;max0<=max_;max0++)\n\t{\n\t\tfor(i=0;i=a[i]&&max0=maxman)maxman=c[i];\n\t}\n\tprintf(\"%d %d\\n\",n,maxman);\n}\n\nint max(int a[],int n)\n{\n\tint b,i;\n\tb=a[0];\n\tfor(i=1;i=b)b=a[i];\n\t}\n\treturn b;\n}\n\nint min(int a[],int n)\n{\n\tint b,i;\n\tb=a[0];\n\tfor(i=1;i> x[0];\n\ti = 1;\n\twhile (cin.get() != '\\n')\n\t cin >> x[i++];\n\tn = i;\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tcin >> y[i];\n\t\tcin.get();\n\t\tfor (j = x[i]; j < y[i]; j++)\n\t\t p[j]++;\n\t}\n\ti = 0;\n\tfor (j = 1; j < 1000; j++)\n\t if (p[j] > p[i])\n\t i = j;\n\tcout << n << ' ' << p[i];\n\treturn(0); \n } "} +{"label": "75", "index": "37169", "code": "//********************************\n//*???5.cpp **\n//*???????? **\n//*?????? 1300012838 **\n//*???2013.10.30 **\n//********************************\n\nint main()\n{ \n int time[1000], in[1000], out[1000], num = 1, max = 0;\n for (int i = 0; i < 1000; i++)\n {\n time[i] = 0;\n }\n cin >> in[0];\n while (cin.get() == ',')\n {\n cin >> in[num];\n num++;\n }\n for (int j = 0; j < num; j++)\n {\n cin >> out[j];\n for (int k = in[j]; k < out[j]; k++)\n {\n time[k]++;\n }\n cin.get();\n } \n for (int l = 0; l < 1000; l++)\n {\n if (time[l] > max)\n {\n max = time[l];\n }\n }\n cout << num << \" \" << max << endl;\n\n return 0; \n} "} +{"label": "75", "index": "37170", "code": "void main()\n{\n\tint it[1001],ot[1001],tr[1001]={0},i,j,k,a,b,c,rs,trm=0;\n\tfor(i=0;;i++)\n\t{\n\tscanf(\"%d\",&it[i]);\n\tif((c=getchar())=='\\n')\n\t\tbreak;\n\t}\n\trs=i+1;\n\tfor(i=0;itrm) trm=tr[j];\n\t}\n\tprintf(\"%d %d\",rs,trm);\n\n\n}\n\n\n"} +{"label": "75", "index": "37171", "code": "int input(int a[],int b[],int c[])\n{\n\tint m=0;\n\tint small,big;\n\tchar cd;\n\tscanf(\"%d\",&a[m]);\n\tsmall=a[m];\n\twhile((cd=getchar())!='\\n')\n\t{\n\t\tm=m+1;\n\t\tscanf(\"%d\",&a[m]);\n\t\tif(a[m]big)\n\t\t\tbig=b[m];\n\t}\n\tc[0]=small;\n\tc[1]=big;\n\treturn (m+1);\n}\n\nvoid count(int a[],int b[],int d[],int r)\n{\n\tint i;int j;\n\tfor(i=0;imax)\n\t\t\tmax=d[i];\n\t}\n\treturn max;\n\n\n}\nvoid main()\n{\n\tint a[N],b[N];\n\tint d[1001]={0};\n\tint c[2];\n\tint i=0;\n\tint r,max;\n\tr=input(a,b,c);\n\tcount(a,b,d,r);\n\tmax=maxi(c,d);\n\tprintf(\"%d %d\",r,max);\n\t\n\n}"} +{"label": "75", "index": "37172", "code": "/*\n * ?????????\n * ????: 2010-12-19\n * ??????\n */\n\nint main(){int a[1000];\nint b[1000]; //????????????????????????\nchar str; //???????????????????????\nint n = 0;\nwhile (1)\n{\ncin >> a[n];\nstr = getchar(); //????????????????????\nif (str == '\\n') //?????????????????\nbreak;\nn ++;\n}\nn=0;\nwhile (1)\n{\ncin >> b[n]; //????????????????????\nstr = getchar();\nif (str == '\\n') //?????????????????\nbreak;\nn++; //k????????\n}\nint min=10000,max=0,imax=0;\n\t\tfor(int i=0;i<=n;i++){\n\t\t\tif(a[i]<=min)\n\t\t\t\tmin=a[i];\n\t\t\tif(b[i]>max)\n\t\t\t\tmax=b[i];\n\t\t\t}\n\t\tfor(int i=min;i<=max;i++){\n\t\tint temp=0;\n\t\tfor(int k=0;k<=n;k++)\n\t\t\tif((a[k]<=i)&&(b[k]>i))\n\t\t\t\ttemp++;\n\t\tif(temp>imax)\n\t\t\timax=temp;\n\t}\n\t cout<b?a:b);}\nint main()\n{\n int imax=0,s=0,x[2200],y[2200],i=0,j,k,m;\n char c;\n do\n {\n scanf(\"%d\",&x[i]);\n y[i]=1;\n i++; \n }\n while((c=getchar())!='\\n');\n printf(\"%d \",i);\n do\n {\n scanf(\"%d\",&x[i]);\n x[i]--;\n y[i]=-1;\n i++; \n }\n while((c=getchar())!='\\n');\n for(j=0;jj;k--)\n {\n if(x[k]> x[0];\n\tc = cin.get(); //??????\n\twhile ( c == ',' ) //???????????????\n\t{\n\t\tcount++; //??+1\n\t\tcin >> x[i];\n\t\tc = cin.get(); //??????\n\t\ti++; \n\t}\n\ti = 1; //????\n\tcin >> y[0];\n\tc = cin.get(); \n\twhile ( c == ',' )\n\t{ \n\t\tcin >> y[i];\n\t\tc = cin.get(); \n\t\ti++; \n\t}\n\ti--; \n\tfor ( ; i >= 0; i-- )\n\t{\n\t\tfor ( j = x[i]; j < y[i]; j++ ) //??????????????+1\n\t\t\tz[j]++; \n\t} \n\tfor ( j = 1; j <= 1000; j++ )\n\t{\n\t\tif ( z[j] < z[j-1] ) //????z????? ????????????\n\t\t\tz[j] = z[j-1]; \n\t\tt = z[j]; \n\t}\n\tcout << count << \" \" << t << endl; \n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37176", "code": "int main()\n{\n\tchar a[5000];\n\tchar b[5000];\n\tcin >> a >> b;\n\tint n = 1;\n\tfor(int l = 0; a[l] != '\\0'; l++)\n\t\tif(a[l] == ',')\n\t\t\tn++;\n\tcout << n << \" \";\n\tchar come[2500][4], go[2500][4];\n\tint i = 0, j = 0, k = 0;\n\tfor( ; i < strlen(a); i++)\n\t{\n\t\tif(a[i] != ',')\n\t\t{\n\t\t\tcome[j][k] = a[i];\n\t\t\tk++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcome[j][k] = '\\0';\n\t\t\tj++;\n\t\t\tk = 0;\n\t\t}\n\t}\n\tcome[j][k] = '\\0';\n\ti = 0, j = 0, k = 0;\n\tfor( ; i < strlen(b); i++)\n\t{\n\t\tif(b[i] != ',')\n\t\t{\n\t\t\tgo[j][k] = b[i];\n\t\t\tk++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgo[j][k] = '\\0';\n\t\t\tj++;\n\t\t\tk = 0;\n\t\t}\n\t}\n\tgo[j][k] = '\\0';\n\tint come1[2500];\n\tint go1[2500];\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tcome1[i] = atoi(come[i]);\n\t\tgo1[i] = atoi(go[i]);\n\t}\n\tint max = 0;\n\tint peo = 0;\n\tfor(int time = 1; time < 1000; time++)\n\t{\n\t\tfor(int num = 0; num < n; num++)\n\t\t{\n\t\t\tif(come1[num] <= time && time < go1[num])\n\t\t\t\tpeo++;\n\t\t}\n\t\tif(peo > max)\n\t\t\tmax = peo;\n\t\tpeo = 0;\n\t}\n\tcout << max << endl;\n}"} +{"label": "75", "index": "37177", "code": "int main()\n{\n\tint time[2][1000];\n\tint n, i, j, k;\n\tchar c[2][1000];\n\tint max, min;\n\tint mostpeople, countpeople;\n\tfor (i = 0; i < 2; i++)\n\t{\n\t\tfor (j = 0; ; j++)\n\t\t{\n\t\t\tcin >> time[i][j];\n\t\t\tc[i][j]=cin.get();\n\t\t\tif (c[i][j] != ',')\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tn = j;\n\tcout << n + 1<< \" \";\n\tmin = time[0][0];\n\tfor (j = 0; j <= n; j++)\n\t{\n\t\tif (min > time[0][j])\n\t\t\tmin = time[0][j];\n\t}\n\tmax = time[1][0];\n\tfor (j = 0; j <= n; j++)\n\t{\n\t\tif (max < time[1][j])\n\t\t\tmax = time[1][j];\n\t}\n\tmostpeople = 0;\n\tfor (k = min; k <= max; k++)\n\t{\n\t\tcountpeople = 0;\n\t\tfor (j = 0; j <= n; j++)\n\t\t{\n\t\t\tif ((k >= time[0][j]) && (k < time[1][j]))\n\t\t\t\tcountpeople += 1;\n\t\t}\n\t\tif (mostpeople < countpeople)\n\t\t\tmostpeople = countpeople;\n\t}\n\tcout << mostpeople;\n\treturn 0;\n}"} +{"label": "75", "index": "37178", "code": "main()\n{\n\tint i=0,j,a[2000],b[2000],k,m,p,q;\n\tchar c;\n\tscanf(\"%d%c\",&k,&c);\n\twhile(c!='\\n')\n\t{\n\t\ta[i]=k;\n\t\ti++;\n\t\tscanf(\"%d%c\",&k,&c);\n\t}\n\ta[i]=k;\n\tfor(j=0;j<=i;j++)\n\t{\n\t\tscanf(\"%d,\",&b[j]);\n\t}\n\tscanf(\"%d\",&b[j]);\n\tprintf(\"%d \",i+1);\n\tp=0;\n\tq=0;\n\tfor(m=0;m<1000;m++)\n\t{\n\t\tfor(j=0;j<=i;j++)\n\t\t{\n\t\t\tif(m>=a[j]&&m=p)\n\t\t\tp=q;\n\t\tq=0;\n\t}\n\tprintf(\"%d\\n\",p);\n}"} +{"label": "75", "index": "37179", "code": "int main()\n{\n\tint a[1000],b[1000]={0},r[1000]={0},i,j,k=0,max=0;\n\tchar c[1003]={'\\0'},d[1000]={'\\0'};\n\tfor(i=0;i<2000;i++)\n\t{\n\t\tscanf(\"%d%c\",&a[i],&c[i]);\n if(c[i]!=',')\n\t\t { i=i+1;\n\t\t\t break;\n\t\t }\n\t}\n\t for(j=0;j=a[k]&&jmax)\n\t\t max=r[j];\n\t }\n\t printf(\"%d\",max);\n\t\n\treturn 0;\n}"} +{"label": "75", "index": "37180", "code": "int main()\n{\n\tint num1[1000]={0},num2[1000]={0};\n\tint i=1,j=1,k;\n\tcin>>num1[0];\n\twhile(cin.get()==',')\n\t{\n\t\tcin>>num1[i];\n\t\ti++;\n\t}\n\tcin>>num2[0];\n\twhile(cin.get()==',')\n\t{\n\t\tcin>>num2[j];\n\t\tj++;\n\t}\n\tcout<temp)\n\t\t\ttemp=num[k];\n\t}\n\tcout<=max)\n\t\t\tmax=b[i];\n\t}\n\tfor(i=min;i<=max;i++)\n\t\tfor(j=1;j<=len;j++)\n\t\t\tif(i>=a[j]&&i=t)\n\t\t\tt=d[i];\n\tprintf(\"%d\",t);\n\treturn 0;\n}"} +{"label": "75", "index": "37182", "code": "\nint main()\n{\n\tint i=0,t=0,n[10000]={0},m,j,a[1000],b[1000],min,max;\n\t\n char c;\n do{\n scanf(\"%d\",&a[i]);\n\t i++;\n t++; \n }while((c=getchar())!='\\n');\n i=0;\n do{\n scanf(\"%d\",&b[i]);\n\t i++;\n }while((c=getchar())!='\\n');\n min=a[0];\n for(i=0;imax) max=b[i];\n\n\tfor(i=min;ia[j]&&(i+0.1)m) m=n[i];\n\n\t\tprintf(\"%d %d\",t,m);\n\t\treturn 0;\n \n}\n"} +{"label": "75", "index": "37183", "code": "\n\nint n;\n\nint x[10010],y[10010];\nchar a[100010],b[100010];\n\nint tonum(char *s, int a,int b){\n int ans = 0;\n for(int i=a;i<=b;i++)\n ans = ans * 10 + (s[i] - '0');\n return ans;\n}\nint main(){\n //n = 1;\n while(scanf(\"%s %s\",a,b) != EOF){\n n = 0;\n \n int len = strlen(a);\n int pre = 0;\n for(int i=0;i<=len;i++)\n if(i == len || a[i] == ',')\n x[++n] = tonum(a,pre,i-1),pre = i + 1;\n \n len = strlen(b);\n pre = 0;\n n = 0;\n for(int i=0;i<=len;i++)\n if(i == len || b[i] == ',')\n y[++n] = tonum(b,pre,i-1),pre = i + 1;\n \n int ans = 0;\n for(int i=0;i<=1000;i++){\n int ccount = 0;\n for(int j=1;j<=n;j++)\n if(x[j] <= i && y[j] > i)\n ccount ++;\n ans = max(ans ,ccount);\n }\n \n printf(\"%d %d\\n\",n,ans);\n }\n return 0;\n}\n"} +{"label": "75", "index": "37184", "code": "int main()\n{\n\tint a[1000],b[1000],p=0,max=0,i,j,ren,k;\n\tchar c;\n\ti=0;\n\twhile(i<1002)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t\tscanf(\"%c\",&c);\n\t\tif(c=='\\n')\n\t\t{\n\t\t\tren=i+1;\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\ti=0;\n\twhile(i=j)\n\t\t\t{\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t\tif(p>max)\n\t\t{\n\t\t\tmax=p;\n\t\t}\n\t\tp=0;\n\t}\n\tprintf(\"%d %d\",ren,max);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37185", "code": "int main()\n{\n int time, cnt = 0;\n int delta[1001] = {0};\n\n while (1)\n {\n cin >> time;\n delta[time]++;\n cnt++;\n if (cin.get() != ',')\n break;\n }\n\n int i;\n char comma;\n for (i=0; i> time >> comma;\n delta[time]--;\n }\n\n int curprecent = 0, max = 0;\n for (i=0; i<1001; ++i)\n {\n curprecent += delta[i];\n if (curprecent > max)\n max = curprecent;\n }\n\n cout << cnt << ' ' << max << endl;\n return 0;\n}\n"} +{"label": "75", "index": "37186", "code": "main()\n{\n\tint i,t,n,num,max=0;\n\tint in[1000],out[1000];\n\tchar a;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d\",&in[i]);\n\t\tscanf(\"%c\",&a);\n\t\tif(a=='\\n') break;\n\t}\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d\",&out[i]);\n\t\tscanf(\"%c\",&a);\n\t\tif(a=='\\n') break;\n\t}\n\tn=i+1;\n\tprintf(\"%d \",n);\n\tfor(t=0;t<1000;t++)\n\t{\n\t\tnum=0;\n\t\tfor(i=0;i=in[i]&&tmax) max=num;\n\t}\n\tprintf(\"%d\\n\",max);\n}"} +{"label": "75", "index": "37187", "code": "//********************************\n//*???????? **\n//*?????? 1300012957 **\n//*???2013.11.05 **\n//********************************\nint main ( )\n{\n\tint s = 0,i = 0,j,k;\n\tint n;\n\tchar ch ;\n\tint a[1001],b[1001];\n\tdo\n\t{\n\t\tcin >> a[i] ; //??????????\n\t\ti++;\n\t}while( cin.get() == ',' );\n\t\n\ti=0;\n\t\n\tdo\n\t{\n\t\tcin >> b[i] ; //??????????\n\n\t\ti++;\n\t}while( cin.get() == ',' );\n\t //i??????\n\tint t = 0;\n\tfor( j = 0;j <= 1000;j++ )\n\t{\n\t\tt = max(t,s); //t??????????????\n\t\t //t???????????????????????????????????\n\t\ts = 0; //???????s?0????\n\t\tfor( k = 1;k <= i;k++ )\n\t\t{\n\t\t\tif( (a[k-1] <= j) && (j < b[k-1]) )\n\t\t\t\ts++; //???????????????\n\t\t}\n\t}\n\t\n\tcout << i << \" \" << t << endl; //?????????????????????\t\n\t\n\treturn 0;\n}"} +{"label": "75", "index": "37188", "code": "int main()\n{\n\tint start1[10000],end1[10000];\n\tint i=0,renshu=0,max=0,flag=0,flag1=0,j=0;\n\tint num[100000];\n\tchar start[200000],end[200000];\n\tmemset(num,0,sizeof(num));\n\tmemset(start1,0,sizeof(start1));\n\tmemset(start,0,sizeof(start));\n\tmemset(end,0,sizeof(end));\n\tmemset(end1,0,sizeof(end1));\n\tcin.getline(start,200000,'\\n');\n\tcin.getline(end,200000,'\\n');\n\tfor(i=0;i<200000;i++)\n\t{\n\t\tif(start[i]==0)\n\t\t{\n\t\t\trenshu++;\n\t\t\tflag=flag1;\n\t\t\tflag1=i-1;\n\t\t\tif(renshu==1)\n\t\t\t{\n\t\t\t\tfor(j=flag1;j>=0;j--)\n\t\t\t\t\tstart1[renshu]=start1[renshu]+(start[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(j=flag1;j>flag+1;j--)\n\t\t\t\t\tstart1[renshu]=start1[renshu]+(start[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tif(start[i]!=0)\n\t\t{\n\t\t\tif(start[i]==',')\n\t\t\t{\n\t\t\t\trenshu++;\n\t\t\t\tflag=flag1;\n\t\t\t\tflag1=i-1;\n\t\t\t\tif(renshu==1)\n\t\t\t\t{\n\t\t\t\t\tfor(j=flag1;j>=0;j--)\n\t\t\t\t\t\tstart1[renshu]=start1[renshu]+(start[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor(j=flag1;j>flag+1;j--)\n\t\t\t\t\t\tstart1[renshu]=start1[renshu]+(start[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tflag=0;\n\tflag1=0;\n\trenshu=0;\n\tfor(i=0;i<200000;i++)\n\t{\n\t\tif(end[i]==0)\n\t\t{\n\t\t\trenshu++;\n\t\t\tflag=flag1;\n\t\t\tflag1=i-1;\n\t\t\tif(renshu==1)\n\t\t\t{\n\t\t\t\tfor(j=flag1;j>=0;j--)\n\t\t\t\t\tend1[renshu]=end1[renshu]+(end[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(j=flag1;j>flag+1;j--)\n\t\t\t\t\tend1[renshu]=end1[renshu]+(end[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tif(end[i]!=0)\n\t\t{\n\t\t\tif(end[i]==',')\n\t\t\t{\n\t\t\t\trenshu++;\n\t\t\t\tflag=flag1;\n\t\t\t\tflag1=i-1;\n\t\t\t\tif(renshu==1)\n\t\t\t\t{\n\t\t\t\t\tfor(j=flag1;j>=0;j--)\n\t\t\t\t\t\tend1[renshu]=end1[renshu]+(end[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor(j=flag1;j>flag+1;j--)\n\t\t\t\t\t\tend1[renshu]=end1[renshu]+(end[j]-'0')*pow((double)10,(double)(flag1-j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=renshu;i++)\n\t{\n\t\tfor(j=start1[i];jmax)\n\t\t\tmax=num[i];\n\t}\n\tcout<maxt2)\n\t\t\tmaxt2=t2[i];\n\n\t}\n\tscanf(\"%d\",t2[num]);\n\tprintf(\"%d \",num+1);\n\tint t,maxnum=0,n;\n\tfor(t=mint1;t=t1[i]&&tmaxnum)maxnum=n;\n\t}\n\tprintf(\"%d\",maxnum);\n}\n\n\n\t\n\n"} +{"label": "75", "index": "37190", "code": "\n\nint main()\n{\n\tint flag[1000];\n\tfor (int i=0;i<1000;i++)\n\t\tflag[i]=0;\n\tint x,n=1;\n\tcin>>x;flag[x]++;\n\twhile (getchar()==',')\n\t{\n\t\tcin>>x;\n\t\tn++;\n\t\tflag[x]++;\n\t} //????????\n\tcin>>x;flag[x]--;\n\twhile (getchar()==',')\n\t{\n\t\tcin>>x;\n\t\tflag[x]--;\n\t} //????????\n\tint max=0,now=0;\n\tfor (int i=0;i<1000;i++)\n\t{\n\t\tnow+=flag[i];\n\t\tif (maxmax)\n \t\tmax=cishu[m];\n cout<max)\n\t\t\tmax=y[i];\n\t}\n\tfor(i=0;ix[j]&&i+0.5max1)\n\t\t\tmax1=s[i];\n\t}\n\tprintf(\"%d %d\",q,max1);\n}\n\n\n\n\n\n\n\n"} +{"label": "75", "index": "37193", "code": "// *****************************************************************************\n//*?????????.cpp\n//*??;1300012725\n//*?????2013.11\n//*??????????\n//******************************************************************************\n\n\nint main()\n{\n\tint x[2000], y[2000], t[2000]={0}, i=1, max, j, k; //????t[2000]??????????max???????i?????j,k??????\n\n\tcin >> x[1];\n\twhile( cin.get() != '\\n' ) //??????\n\t{\n\t\ti++;\n\t\tcin >> x[i];\n\t}\n\tcin >> y[1];\n\ti = 1;\n\twhile( cin.get() != '\\n' ) //??????\n\t{\n\t\ti++;\n\t\tcin >> y[i];\n\t}\n\tfor( j = 1; j <= i; j++ )\n\t{\n\t\tfor( k = x[j]; k < y[j]; k++ )\n\t\t{\n\t\t\tt[k]++; //??????????????????????1\n\t\t}\n\t}\n\tmax = t[0];\n\tfor( int q = 1; q < 1000; q++ )\n\t{\n\t\tif( t[q] > max )\n\t\t\tmax = t[q]; // ?max???????\n\t}\n\tcout << i << ' ' << max << endl; // ?????????\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37194", "code": "//********************************\n//*???????? **\n//*?????? 1300012934 **\n//*???2013.10.31 **\n//********************************\n\n\nint main()\n{ \n\tint x[1000], y[1000], t[1000] = {0}, n, number, tmax;\n\tchar douhao;\n\n\tn = 1;\n\tcin >> x[0];\n\twhile ((douhao = cin.get()) != '\\n')\n\t{\n\t\tcin >> x[n];\n\t\tn++;\n\t}\n\tcin >> y[0];\n\tfor (int i=1; i <= n - 1; i++)\n\t{\n\t\tcin >> douhao >> y[i];\n\t}\n\tfor (int i=0; i <= n - 1; i++)\n\t{\n\t\tfor (int j=x[i]; j < y[i]; j++)\n\t\t{\n\t\t\tt[j]++;\n\t\t}\n\t}\n\tnumber = 0;\n\ttmax = 0;\n\tfor (int i=0; i <= n - 1; i++)\n\t{\n\t\tif (tmax < y[i])\n\t\t\ttmax = y[i];\n\t}\n\tfor (int i=0; i <= tmax; i++)\n\t{\n\t\tif (number < t[i])\n\t\t\tnumber = t[i];\n\t}\n\tcout << n << \" \" << number;\n\n\n\treturn 0;\n\n}\n"} +{"label": "75", "index": "37195", "code": "main()\n{\n//\tFILE *fp1,*fp2;\n\tint per[1000][2];\n\tchar c;\n\tint value,temp;\n\tint i,j,k,m,n;\n\tint max=0;\n//\tfp1=fopen(\"input.txt\",\"r\");\n//\tfp2=fopen(\"output.txt\",\"w\");\nscanf(\"%d\",&n);\n//\tfscanf(fp1,\"%d\",&n);\n//\tc=fgetc(fp1);\nc=getchar();\n\tfor(i=0;i=0)&&(c<=9))\n\t\t{\n\t\t\tvalue=value*10+c;\nc=getchar()-'0';\n\n//\t\t\tc=fgetc(fp1)-'0';\n\t\t}\n\t\tper[i][0]=value;\n\t}\n\tfor(i=0;i=0)&&(c<=9))\n\t\t{\n\t\t\tvalue=value*10+c;\nc=getchar()-'0';\n\n//\t\t\tc=fgetc(fp1)-'0';\n\t\t}\n\t\tper[i][1]=value;\n\t}\n\tfor(i=0;iper[j+1][0])\n\t\t\t{\n\t\t\t\ttemp=per[j][0];\n\t\t\t\tper[j][0]=per[j+1][0];\n\t\t\t\tper[j+1][0]=temp;\n\t\t\t\ttemp=per[j][1];\n\t\t\t\tper[j][1]=per[j+1][1];\n\t\t\t\tper[j+1][1]=temp;\n\t\t\t}\n//\tfor(i=0;i0;--j)\n\t\t\tif(per[j][0]>=temp)\n\t\t\t\tm=j;\n\t\tif(max>a[++ctr];\n\t\tif(cin.peek()=='\\n')\n\t\t\tbreak;\n\t\tcin.get();\n\t}\n\tcin.get();\n\tfor(i=1;i<=ctr;i++)\n\t{\n\t\tcin>>b;\n\t\tfor(j=a[i];jmax)?x[i]:max;\n\tcout<>x[0];\n\twhile(cin.peek()!='\\n'){\n\t\tcin.get();\n\t\tcin>>x[i++];\n\t}\n\tfor(j=0;j>y[j];\n\t}\n\tfor(k=0;k<1000;k++)\n\t for(j=0;j=x[j]&&kmax)max=num[j];\n\tcout<>str1>>str2;\n\tfor(i=0;imax)\n\t\t\tmax=count;\n\t}\n\tcout<i){\n\t\t\t\ta[i]++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<1000;i++)\n\t\tif(a[i]>max)\n\t\t\tmax=a[i];\n\tprintf(\"%d %d\",n,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37200", "code": "//********************************\n//*???????? **\n//*?????? 1300012946 **\n//*???2013.10.31 **\n//********************************\nint main()\n{\n\tint x[1001]={0},y[1001]={0},a[1001]={0},j,i,k,most=0;\n\tchar ch;\n\tfor (i=0 ; ; i++)\n\t{\n\t\tcin>>x[i];\n\t\tch=cin.get();\n\t\tif (ch!=',')\n\t\t\tbreak;\n\t}\n\tfor (i=0 ; ; i++)\n\t{\n\t\tcin>>y[i];\n\t\tch=cin.get();\n\t\tif (ch!=',')\n\t\t\tbreak;\n\t}\n\tfor (j=0 ; j<=i ; j++)\n\t{\n\t\tfor (k=x[j] ; ka[j]?most:a[j];\n\tcout<>n;\n\tfor(i=0;i>arrive[i];\n\t}\n\tfor(i=0;i>leave[i];\n\t}\n\tfor(i=0;i> in[num++];\n if (cin.get() == '\\n') break;\n }\n for (int i = 0; i < num; i++)\n {\n scanf(\"%d\", &out[i]);\n cin.get();\n for (int j = in[i]; j < out[i]; j++)\n count[j]++;\n }\n for (int i = 0; i < 1001; i++)\n if (max < count[i]) max = count[i];\n cout << num << \" \" << max << endl;\n return 0;\n}"} +{"label": "75", "index": "37203", "code": "void main()\n{\n\tint a,b,c=0,d=0,e=0,f,g,h,i,j,r[2][10000],t[1001]={0};\n\tchar s1[20000],s2[20000];\n\tscanf(\"%s\",&s1);a=strlen(s1);\n\tscanf(\"%s\",&s2);j=strlen(s2);\n\tr[0][0]=r[1][0]=0;\n\tfor(b=0;b<=a;b++)\n\t{\n\t\tif(s1[b]==','||s1[b]=='\\0')\n\t\t{c++;d=0;r[0][c]=0;}\n\t\telse\n\t\t{r[0][c]=r[0][c]*10+s1[b]-'0';}\n\t}\n\tfor(b=0;b<=j;b++)\n\t{\n\t\tif(s2[b]==','||s2[b]=='\\0')\n\t\t{e++;d=0;r[1][e]=0;}\n\t\telse\n\t\t{r[1][e]=r[1][e]*10+s2[b]-'0';}\n\t}\n\tfor(f=0;fj))\n\t\t\t\ts++;\n\t\t}\n\t\tif(s>max)\n\t\t\tmax=s;\n\t\t\ts=0;\n\t}\n\tprintf(\"%d %d\\n\",n,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37205", "code": "int main() \n{ \nchar x1[10000]={'\\0'},y1[10000]={'\\0'}; // ????? ????num?k????? \n\nint num = 0, i, j, k = 0, max = 1, flag[1000] = {0}; \nint x[1000] = {0}, y[1000] = {0}; \ngets(x1); \ngets(y1); \nchar *px = x1, *py = y1; \nwhile(*px != '\\0') \n{ \nx[num] = atof(px); \nnum++; \npx++; \nwhile(*px != ',' && *px != '\\0') // ????x1???????x1????????????????????????????????????????? \npx++; \npx++; \n} \nwhile(*py != '\\0' ) \n{ \ny[k] = atof(py); \nk++; \npy++; \nwhile(*py != ','&& *py != '\\0') \npy++; \npy++; \n} \n\nfor(i = 0; i < num; i++) \n{ \nfor(j = x[i]; j < y[i]; j++) \n{ \nflag[j]++; \n} \n} \nfor(i = 0; i < 1000; i++) \n{ \nif(flag[i] > max) max = flag[i]; \n} \ncout << num << \" \" << max << endl; \nreturn 0; \n} "} +{"label": "75", "index": "37206", "code": "//********************************\n//*????????\n//*??? ?? 1300012814 **\n//*???2013.10,30 **\n//********************************\nint main()\n{\n int a[1000], b[1000], num = 1, rs = 0;\n char c;\n\n\t cin >> a[0];\n\t c = cin.get();\n\t while (c == ',')\n\t {\n\t cin >> a[num];\n\t\t num++;\n\t\t c = cin.get();\n\t }\n\t cin >> b[0];\n\t c = cin.get();\n\t int i = 1;\n\t while (c == ',')\n\t {\n\t cin >> b[i];\n\t\t i++;\n\t\t c = cin.get();\n\t }\n\t for (int i = 0;i < 1000;i++)\n\t {\n\t\t int n = 0;\n\t for (int j = 0; j < num; j++)\n\t {\n\t\t if(a[j] <= i && b[j] > i)\n\t\t\t n++;\n\t }\n\t if (n > rs) rs = n;\n\t }\n\t cout << num << \" \" << rs <=a[j]&&imax) max=m[i];\n\t}\n\n\tprintf(\"%d %d\\n\",l+1,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37208", "code": "int main()\n{\n\tchar c;\n\tint x[1010]={0}, y[1010]={0}, i, n, high[3000]={0}, a,b, j, big;//??????\n\tn=1;\n\ti=2;\n\tcin >> a;\n\tx[1] = a;\n\twhile ((c=cin.get())==',')//??????\n\t{\t\n\t\tcin >> a;//??????\n\t\tx[i]=a;//??\n\t i++;\n\t\tn++;\n\t}\n\tcin>>y[1];\n\tfor (i=2;i<=n;i++)//??????????\n\t{\n\t\tcin>>c;\n\t cin>>y[i]; \n\t}\n\tfor (i=1;i<=n;i++)//???????????????????\n\t\tfor (j=x[i];jbig)\n\t\t\t big = high[j];\n\t\t cout << n << ' ' << big;//??\n}\n\n\n\n"} +{"label": "75", "index": "37209", "code": "/*\n * zhaopinhuirenshu.cpp\n *\n * Created on: 2011-12-22\n * Author: Administrator\n */\nint main()\n{\n\tint a[1000],b[1000],time[1000]={0};\n\tint i=0,k=0,j,max=0;\n\tdo\n\t{\n\t\tcin>>a[i];\n\t\ti++;\n\t}\n\twhile((getchar())!='\\n');\n\tdo\n\t{\n\t\tcin>>b[k];\n\t\tk++;\n\t}\n\twhile((getchar())!='\\n');\n\tfor (int p=0;p max)\n\t\t{\n\t\t\tmax=time[p];\n\t\t}\n\tcout<='0'&&c<='9')j[i]=j[i]*10+c-'0';\n\t\telse i++;\n\t}\n\ti=0;\n\twhile(1)\n\t{\n\t\tc=getchar();\n\t\tif(c=='\\n'){i++;break;}\n\t\telse if(c>='0'&&c<='9')ch[i]=ch[i]*10+c-'0';\n\t\telse i++;\n\t}\n\tprintf(\"%d \",i);\n\tfor(i--;i>=0;i--)\n\t{\n\t\tfor(jj=j[i];jjmax)max=t[i];\n\tprintf(\"%d\",max);\n\treturn 0;\n}"} +{"label": "75", "index": "37211", "code": "int main()\n{\n\tint a[1000];\n\tint b[1000];\n\tint mark[1000];\n\tchar c;\n\tint i=0;\n\tint j=0;\n\tint num;\n\tint max;\n\tint k;\n\tscanf(\"%d\",&a[i]);\n\twhile (c=getchar()==',')\n\t\t{\n\t\ti=i+1;\n\t\tscanf(\"%d\",&a[i]);\n\t\t}\n\tscanf(\"%d\",&b[j]);\n\twhile (c=getchar()==',')\n\t{\n\t\tj=j+1;\n\t\tscanf(\"%d\",&b[j]);\n\t}\n\tnum=j+1;\n\tfor(k=0;k<1000;k++)\n\t{\n\t\tfor(i=0;i=a[i]&&kmax)\n\t\t\tmax=mark[k];\n\t}\n\tprintf(\"%d %d\",num,max);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37212", "code": "int main()\n{\n int i,j,n,m,temp,arrive[1600],leave[1600],times[1001]={0};\n char c;\n c=getchar();\n while(c!=EOF)\n {\n n=0;\n while(c!='\\n')\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n arrive[n]=temp;\n n++;\n if(c==',')\n\t c=getchar();\n\t\t \n }\n\tc=getchar();\n n=0;\n while(c!='\\n')\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n leave[n]=temp;\n n++;\n if(c==',')\n\t c=getchar();\n }\n for(i=0;i<1000;++i)\n times[i]=0;\n\tfor(i=0;imax1)\n max1=end[k];\n }\n for(k=0,max2=sum[0];k> a[0];\n\t\n\tx = 1;\n\t\n\twhile(cin.get() != '\\n')\n\t{\n\t\tcin >> a[x];\n\t\tx ++;\n\t}\n\t\n\tcin >> b[0];\n\t\n\tx = 1;\n\t\n\twhile(cin.get() != '\\n')\n\t{\n\t\tcin >> b[x];\n\t\tx ++;\n\t}\n\t\n\tmin = 100000;\n\tmax = 0;\n\t\n\tfor(int i = 0; i <= x; i++)\n\t{\n\t\tif(a[i] < min)\n\t\tmin = a[i];\n\t\t\n\t\tif(b[i] > max)\n\t\tmax = b[i];\n\t}\n\t\n\tint maxcount = 0;\n\t\n\tfor(int i = min; i <= max; i ++)\n\t{\n\t\tint count = 0;\n\t\t\n\t\tfor(int j = 0; j <= x; j ++)\n\t\t{\n\t\t\tif(a[j] <= i && i < b[j])\n\t\t\t{\n\t\t\t\tcount ++;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\tcontinue;\n\t\t\t\n\t\t\tif(count > maxcount)\n\t\t\tmaxcount = count;\n\t\t\t\n\t\t}\n\t}\n\t\n\tcout << x << \" \" << maxcount;\n\t\n\treturn 0;\n}"} +{"label": "75", "index": "37215", "code": "//********************************************\n//*3\u00ecD\u00f2?oÕDƸ»\u00e1\u00e8Ë\u00eay *\n//*DÕÃû?ooÎÔÆÆe *\n//*Ñ\u00a7oÅ?o1300012888 *\n//*\u00e8ÕÆ\u00fa?o2013.11.5 *\n//********************************************\n\nint main()\n{\n\tint a[1001], b[1001], t[1000], n, i, tmax;\n\n\ttmax = INT_MIN;\n\ti = 1;\n\twhile(1)\n\t{\n\t\tcin >> a[i];\n\t\ti ++;\n\t\tif(cin.get() == '\\n')\n\t\t\tbreak;\n\t}\n\tn = i - 1;\n\tfor(i = 1;i <= n;i ++)\n\t{\n\t\tcin >> b[i];\n\t\tcin.get();\n\t}\n\tfor(i = 0;i <= 999;i ++)\n\t\tt[i] = 0;\n\tfor(i = 1;i <= n;i ++)\n\t{\n\t\tfor(;a[i] <= b[i] - 1;a[i] ++)\n\t\t\tt[a[i]] ++;\n\t}\n\tfor(i = 0;i <= 999;i ++)\n\t{\n\t\tif(t[i] > tmax)\n\t\t\ttmax = t[i];\n\t}\n\tcout << n << \" \" << tmax << endl;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37216", "code": "int main()\n{\n int a[2][1000],b[2][1000],i=0,n,j,m;\n char c='\\0';\n for(i=0;c!='\\n';i++)\n { \n scanf(\"%d%c\",&a[0][i],&c);\n }\n \n i=0;c='\\0';\n for(i=0;c!='\\n';i++)\n {\n scanf(\"%d%c\",&a[1][i],&c);\n }\n n=i;\n //for(i=0;it)\n p[i]=p[i]+1;\n } \n //printf(\"%d \",p[i]);\n }\n m=p[0];\n //for(i=0;i<1000;i++)printf(\"%d \",p[i]);\n for(i=0;i<1000;i++)\n if(p[i]>m)m=p[i];\n printf(\"%d %d\",n,m);\n getchar();\n getchar();\n getchar();\n getchar();\n getchar();\n}\n "} +{"label": "75", "index": "37217", "code": "int main()\n{\n int i=0,k,j;\n\tint x[1000]={0},y[1000]={0};\n\tint t[1000]={0};\n\tchar a;\n\tscanf(\"%c\",&a);\n\twhile(a!='\\n')\n\t{\n\t\tif(a!=',')\n\t\t{\n\t\t x[i]=x[i]*10+a-'0';\n\t\t}\n\t\telse i++;\n\t\tscanf(\"%c\",&a);\n\t}\n\tscanf(\"%c\",&a);\n\ti=0;\n\twhile(a!='\\n')\n\t{\n\t\tif(a!=',')\n\t\t{\n\t\t y[i]=y[i]*10+a-'0';\n\t\t}\n\t\telse i++;\n\t\tscanf(\"%c\",&a);\n\t}\n\tprintf(\"%d \",i+1);\n\tk=i;\n\tfor(j=0;j<=k;j++)\n\t\t{\n\t\t\tfor(i=x[j];i<=y[j]-1;i++)\n\t\t\t{\n\t\t\t\tt[i]+=1;\n\t\t\t}\n\t\t}\n\ti=0;\n\tfor(j=1;j<=999;j++)\n\t{\n if(t[j]>t[i]) i=j;\n\t}\n\tprintf(\"%d\\n\",t[i]);\n\n}\n"} +{"label": "75", "index": "37218", "code": "void main()\n{\n int i=0,j,k,a[1000][2],b[1002]={0},l,m=0,n=0,max=0;\n\tchar c[2][5000];\n\tscanf(\"%s%s\",c[0],c[1]);a[0][0]=0;a[0][1]=0;\n\tfor(i=0;imax)max=b[i];\n\t}\n\tprintf(\"%d\",max);\n}\n"} +{"label": "75", "index": "37219", "code": "int main(){\n\tint i,j,number=1,time[1000],high=0;\n\t//time??????????number????high???????????\n\tchar p[2][4000];\n\tcin.getline(p[0],4000);\n\tcin.getline(p[1],4000);\n\tfor(i=0;i<1000;i++)time[i]=0;\n\tif(p[0][0]==0)number=0;\n\tfor(i=0;p[0][i]!=0;i++)\n\t\tif(p[0][i]==',')number++;\n\tconst int n=number;\n\tint come[n],leave[n];//come????????leave????????\n\tj=0;\n\tcome[0]=0;\n\tfor(i=0;p[0][i]!=0;i++){\n\t\tif(p[0][i]==','){\n\t\t\tj++;\n\t\t\tcome[j]=0;\n\t\t}\n\t\telse come[j]=come[j]*10+p[0][i]-'0';\n\t}\n\tj=0;\n\tleave[0]=0;\n\tfor(i=0;p[1][i]!=0;i++){\n\t\tif(p[1][i]==','){\n\t\t\tj++;\n\t\t\tleave[j]=0;\n\t\t}\n\t\telse leave[j]=leave[j]*10+p[1][i]-'0';\n\t}\n\tfor(i=0;ihigh)high=time[i];\n\tcout<= 1; kk--)\n\t\t{\n\t\t\tnum1[g_num] += s * q[kk];\t\t\t// ??\n\t\t\ts *= 10;\t\t\t\t\t\t// ??????\n\t\t}\n\t\tif (num1[g_num] < g_minn)\t\t\t\t// ??????????????????????\n\t\t\tg_minn = num1[g_num];\t\t\t\t// ???????????????\n\t\tif (num1[g_num] > g_maxx)\t\t\t\t// ??????????????????????\n\t\t\tg_maxx = num1[g_num];\t\t\t\t// ???????????????\n\t\ti = ii + 1;\t\t\t\t\t\t\t// ????????????????????????\n\t}\n}\nint main()\n{\n\tchar x[5000], y[5000];\t\t\t\t\t// ???????????????\n\n\t// ???????????????????????????????\n\tint xx[5000] = {0}, yy[5000] = {0}, t[5000] = {0};\t\n\tint j, k, most = 0;\t\t\t\t\t\t// ???????????????\n\tcin >> x;\t\t\t\t\t\t\t\t// ????????????\n\tcin >> y;\t\t\t\t\t\t\t\t// ????????????\n\ttrans(xx,x);\t\t\t\t\t\t\t// ????????????????\n\ttrans(yy,y);\t\t\t\t\t\t\t// ????????????????\n\tfor (j = 1; j <= g_num; j++)\t\t\t\t// ??????????????????\n\t{\n\t\tfor (k = xx[j]; k < yy[j]; k++)\n\t\t\tt[k] ++;\t\t\t\t\t\t// ???????????+1\n\t}\n\tfor (k = g_minn; k <= g_maxx; k++)\t\t\t// ??????????????????\n\t{\n\t\tif (t[k] > most)\t\t\t\t\t// ???????????????\n\t\t\tmost = t[k];\n\t}\n\tcout << g_num << \" \" << most << endl;\t// ????????????\n\n\treturn 0;\n}"} +{"label": "75", "index": "37221", "code": "int main()\n{\n\tint x,y,counter=0;\n\tint num[1000]={0};\n\twhile(cin>>x)\n\t{\n\t\tcounter++;\n\t\tnum[x]++;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\twhile(cin>>y)\n\t{\n\t\tnum[y]--;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\tint max=0,contemperary=0;\n\tfor(int j=0;j<1000;j++)\n\t\t{\n\t\t\tcontemperary+=num[j];\n\t\t\tif(contemperary>max)\n\t\t\t\tmax=contemperary;\n\t}\n\tcout<>str1;\n\tlen1=strlen(str1);\n\tfor(i=0;i<=len1;i++)\t\t\t\t\t\t\t\t\t\t\t//?????????\n\t{\n\t\tif(str1[i]==',')\n\t\t{\n\t\t\tk=0;\n\t\t\tmemset(temp,'\\0',sizeof temp);\n\t\t\tfor(j=sp;j>str2;\n\tlen2=strlen(str2);\n\tfor(i=0;i<=len2;i++)\t\t\t\t\t\t\t\t\t\t\t//?????????\n\t{\n\t\tif(str2[i]==',')\n\t\t{\n\t\t\tk=0;\n\t\t\tmemset(temp,'\\0',sizeof temp);\n\t\t\tfor(j=sp;j=entry[i])\n\t\t\t\tnum[j]+=1;\t\t\t\t\t\t\t\t\t\t\t\t\t//???????????\n\t\t}\n\t}\n\tmax1=0;\n\tfor(i=0;i>x[n];n++;\n\t\tc = getchar();\n\t}while(c != '\\n');\n\tn = 0;\n\tdo{\n\t\tcin >>y[n];n++;\n\t\tc = getchar();\n\t}while(c != '\\n');\n\n\txmin = x[0];\n\tfor (i = 1;i < n;i ++)\n\t\tif(x[i] < xmin)xmin = x[i];\n\n\tymax = y[0];\n\tfor (i = 1;i < n;i ++)\n\t\tif (y[i] > ymax)ymax = y[i];\n\n\tfor (i = xmin;i <= ymax;i ++)\n\t\tfor (j = 0;j < n;j ++)\n\t\t{\n\t\t\tif (x[j] <= i && y[j] > i)count[i] ++;\n\t\t}\n\n\tcountmax = count[0];\n\tfor (i = xmin;i <= ymax;i ++)\n\t\tif (count[i] > countmax)countmax = count[i];\n\n\tcout < i) // ?i???? \n count ++;\n if (count > max)\n max = count;\n }\n }\n return max;\n}\n \n\n\n \n\n\n\n \n \n"} +{"label": "75", "index": "37225", "code": "int main()\n{\n int t[1000]={0};\n int x[1000],y[1000];\n int i,n=0;\n while(1)\n {\n cin>>x[n];\n n++;\n if(cin.peek()!='\\n')\n cin.get();\n else\n break;\n }\n for(i=0;i>y[i];\n cin.get();\n } \n for(i=0;imax)\n max=t[i];}\n cout<=i+1)\n\t\t\t\tk[i]++;\n\t\t}\n\t}\n\tfor(i=0;i<=999;i++)\n\t{\n\t\tfor(j=0;j<=999-i;j++)\n\t\t{\n\t\t\tif(k[j]>in[i])\n\t{\n\t\tcin.get(a);\n\t\ti++;\n\t\tif(a!=',') break;\n\t}\n\twhile(cin>>out[j])\n\t{\n\t\tcin.get(a);\n\t\tj++;\n\t\tif(a!=',') break;\n\t}\n\tfor(int k=0;k=in[k]&&l=max)\n\t\t\tmax=time[k];\n\t}\n\tcout<> t1[i];\t\t\t\t\t//?????\n\t\ta = cin.get();\t\t\t\t\t//????????\n\t\tif (a == ',')\t\t\t\t\t//???????g+1\n\t\t\tg ++;\n\t\tif (a == '\\n')\t\t\t\t\t//????break\n\t\t\tbreak;\n\t}\n\tfor (i = 0;;i ++)\n\t{\n\t\tcin >> t2[i];\t\t\t\t\t//??????????g? ?????g+1?\n\t\ta = cin.get();\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (t = 1; t <= 1000; t ++)\t\t//???1????1000 ,?t??????????\n\t{\n\t\tnum = 0;\n\t\tfor (i = 0; i < g + 1; i ++)\t//????\n\t\t{\n\t\t\tif (t >= t1[i] && t < t2[i])//????t??????\n\t\t\t{\n\t\t\t\tnum ++;\t\t\t\t\t//??+1\n\t\t\t\tif (num > max)\t\t\t//????max ?max = num,??????\n\t\t\t\t\tmax = num;\n\t\t\t}\n\t\t}\n\t}\n\tcout << g + 1 << \" \" << max << endl;//????,max\n\treturn 0;\n}\n"} +{"label": "75", "index": "37229", "code": "/**\n * ?????????.cpp\n * ????????????\n * ??????\n * ???2010.11.30\n */\n\nint main()\n{\t\n\t//arrive?????????leave?????????time???????\n\tint arrive[1001], leave[1001], time[1000] = {0}; \n\tint peo, max, j, k; //peo??????,max???????????\n\tchar c; \n\n\tfor (peo = 1;; peo++) \n\t{\n\t\tcin >> arrive[peo];\n\t\tc = cin.get();\n\t\tif (c == '\\n') //???????\n\t\t\tbreak;\n\t}\n\tfor (peo = 1;; peo++)\n\t{\n\t\tcin >> leave[peo];\n\t\tc = cin.get();\n\t\tif (c == '\\n') //???????\n\t\t\tbreak;\n\t}\t\n\t\n\tcout << peo << \" \"; //??????\n\tfor (k = 1; k <= peo; k++) //?????????????\n\t\tfor (j = arrive[k]; j < leave[k]; j++)\n\t\t\ttime[j]++; \n\tmax = time[0];\n\tfor (k = 0; k < 1000; k++) //???????????\n\t\tif (time[k] > max)\n\t\t\tmax = time[k];\n\tcout << max << endl;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37230", "code": "int main()\n{\n\tint a[1000]={0};\n\tint b[1000][2]={0};\n\tchar c='\\0';\n\tint i=0;\n\tint max=0,time=0;\n\twhile(c!='\\n')\n\t{\n\t\tcin>>b[i][0];\n\t\tc=cin.get();\n\t\ti++;\n\t}\n\ti=0;\n\tc='\\0';\n\twhile(c!='\\n')\n\t{\n\t\tcin>>b[i][1];\n\t\tc=cin.get();\n\t\ti++;\n\t}\n\tfor(int j=0;jmax)\n\t\t\tmax=a[j];\n\t}\n\tprintf(\"%d %d\\n\",i,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37231", "code": "/*\n * 1.cpp\n *\n * Created on: 2013-1-13\n * Author: Administrator\n */\nint main()\n{\n\tint x[2200] = {0}, y[1100] = {0}, max = 0, t = 0, cnt = 0;\n\tint i, j = 0, k = 0, len = 0;\n\twhile(cin >> x[k])\n\t{\n char c = getchar();\n if (c == '\\n') cnt++;\n\t\tk++;\n\t\tif (cnt ==2) break;\n\t}\n\tfor(i = k / 2; i < k; i++)\n\t{\n\t\ty[j] = x[i];\n\t\tj++;\n\t}\n\tlen = k / 2;\n\tcout << len << \" \";\n\tfor(i = 0; i < len; i++)\n\t{\n\t\tt = 0;\n\t\tfor(j = 0; j < len; j++)\n\t\t{\n\t\t\tif(x[j] <= x[i] && y[j] > x[i])\n\t\t\t{\n\t\t\t\tt++;\n\t\t\t}\n\t\t}\n\t\tif(max < t)\n\t\t\tmax = t;\n\t\tt = 0;\n\t\tfor(j = 0; j < len; j++)\n\t\t{\n\t\t\tif(x[j] <= y[i] && y[j] > y[i])\n\t\t {\n\t\t\t t++;\n\t\t }\n\t\t}\n\t\tif(max < t)\n\t\t max = t;\n\t}\n\tcout << max << endl;\n}\n"} +{"label": "75", "index": "37232", "code": "int count(int x[], int y[], int total)\n{\n int k,j,num[1000]={0},temp=0;\n for(j=0; jtemp) temp=num[x[k]];\nreturn temp;\n}\nvoid main()\n{\n char a[8000],b[8000];\n int x[3000],y[3000],i,j,k,l1,l2,n,max,n1=0,n2=0;\n scanf(\"%s\",a);\n scanf(\"%s\",b);\n l1=strlen(a);\n l2=strlen(b);\n for(i=0;i'9') break;\n else x[n1]=x[n1]*10+a[j]-'0';\n }\n n1++;\n i=j;\n }\n for(i=0;i'9') break;\n else y[n2]=y[n2]*10+b[j]-'0';\n }\n n2++;\n i=j;\n }\n j=count(x,y,n1);\n printf(\"%d %d\",n1,j);\n}"} +{"label": "75", "index": "37233", "code": "\nstatic int TIME_LIMIT = 1000;\n\nint parseInput(char * input, int * record);\n\nint main() {\n\tchar input[100000];\n\tint enter[TIME_LIMIT];\n\tint leave[TIME_LIMIT];\n\tfor (int i=0; i max) {\n\t\t\tmax = enter[i]-leave[i];\n\t\t}\n\t}\n\tcout << all << ' ' << max << endl;\n\treturn 0;\n}\n\nint parseInput(char * input, int * record) {\n\tint idx = 0;\n\tchar number[5];\n\tint number_idx = 0;\n\tint count = 0;\n\twhile (idx < strlen(input)) {\n\t\tif (input[idx]!=',') {\n\t\t\tnumber[number_idx++] = input[idx];\n\t\t}\n\t\telse {\n\t\t\tnumber[number_idx] = '\\0';\n\t\t\tnumber_idx = 0;\n\t\t\tint inum = atoi(number);\n\t\t\tfor (int i=inum; i> in[i];\n\t\tcin.get(a);\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> out[i];\n\t\tcin.get(a);\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\t\n\ti++;\n\n\n\tcout << i << \" \";\n\tfor (j = 0; j < i; j++)\n\t{\n\t\tfor(t = in[j]; t < out[j]; t++)\n\t\t\tnum_t[t]++;\n\t}\n\tfor (t = 0; t < 1000; t++)\n\t\tif (num_t[t] > max)\n\t\t\tmax = num_t[t];\n\tcout << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37235", "code": "//********************************\n//* ???????? **\n//* ????? 1300012990 **\n//* ???2013.10.31 **\n//********************************\nint main()\n{\n\tint i=0,j=0,a[1001],b[1001],m[1001]={0},x,y,num=0;\n\tchar ch; \n\tdo\n\t{\n\t\tcin >> a[i];\n\t\tch = cin.get();\n\t\ti++;\n\t}while (ch != '\\n'); \n do \n\t{\n\t\tcin >> b[j];\n\t\tch = cin.get();\n\t\tj++;\n\t}while (ch != '\\n'); \n\tfor(x=0;xnum)\n\t\t\tnum = m[y];\n\tcout << i << \" \"<< num;\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "75", "index": "37236", "code": "int main()\n{\n\tint a[1010]={0};\n\tint x[1010],y[1010];\n\tchar c=',';\n\tint n=0;\n\tint i,j;\n\ti=1;\n\twhile(c!=10)\n\t{\n\t\tscanf(\"%d%c\",&x[i],&c);\n\t\tn++;\n\t\ti++;\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d%c\",&y[i],&c);\n\t}\n\tprintf(\"%d \",n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=x[i];jmax)\n\t\t\tmax=a[i];\n\t}\n\tprintf(\"%d\",max);\n}"} +{"label": "75", "index": "37237", "code": "int main()\n{\n\tint a[2][1000],i=0,j,c=1000,b=0,m[1000]={0};\n\twhile(1)\n\t{\n\t\tcin>>a[0][i];\n\t\tif (cin.get() =='\\n')\n\t\t\tbreak;\n\t\ti++;\n\t}\n\ti = 0;\n\twhile(1)\n\t{\n\t\tcin>>a[1][i];\n\t\tif (cin.get() =='\\n')\n\t\t\tbreak;\n\t\ti++;\n\t}\n\tfor(j=0;j<=i;j++)\n\t{\n\t\tif(a[0][j]b)\n\t\t\tb=a[1][j];\n\t}\n\tfor(;cc)\n\t\t\tm[c]++;\n\t\t}\n\t\tfor(j=0;j>a[i])\n\t{\n\t\tif(cin.get()==',')\n\t\t{\n\t\t\tn++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\ti=0;\n\twhile(cin>>b[i])\n\t{\n\t\tif(cin.get()!=',')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\t/*for(j=0;jmax)\n\t\t{\n\t\t\tmax=b[j];\n\t\t}\n\t}*/\n\tfor(k=0;k<1000;k++)\n\t{\n\t\ttemp=0;\n\t\tfor(j=0;jk)\n\t\t\t{\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\tif(temp>sum)\n\t\t{\n\t\t\tsum=temp;\n\t\t}\n\t}\n\tcout<=0;i--){\n\t\tif(x_in[i]<='9'&&x_in[i]>='0'){\n\t\t\tx[j]=x[j]+(x_in[i]-'0')*pow(10.0,k);\n\t\t\tk++;\n\t\t}\n\t\telse if((x_in[i-1]<='9'&&x_in[i-1]>='0')&&(x_in[i]<'0'||x_in[i]>'9')){\n\t\t\tk=0;\n\t\t\tj++;}\n\t}\n\tn2=j;\n\tj=0;\n\tk=0;\n\tfor(i=n3;i>=0;i--){\n\t\tif(y_in[i]<='9'&&y_in[i]>='0'){\n\t\t\ty[j]=y[j]+(y_in[i]-'0')*pow(10.0,k);\n\t\t\tk++;\n\t\t}\n\t\telse if((y_in[i-1]<='9'&&y_in[i-1]>='0')&&(y_in[i]<'0'||y_in[i]>'9')){\n\t\t\tk=0;\n\t\t\tj++;}\n\t}\n\tfor(i=1;i<1000;i++){\n\t\tfor(j=0;j<=n2;j++){\n\t\t\tif(i>=x[j]&&imax)\n\t\t\tmax=count[i];\n\t}\n\tcout<>in[0];\n\tint i,l,j=1,k=1;\n\twhile(scanf(\",%d\",&in[j++]));\n\tcin>>out[0];\n\twhile(scanf(\",%d\",&out[k++]));\n\tint min=in[0],max=out[0];\n\tfor(i=0;imax)\n\t\t\tmax=out[i];\n\t//cout<i)\n\t\t\t\ttem++;\n\t\tif(tem>count)\n\t\t\t \tcount=tem;\n\t\t\t tem=0;\n\t}\n\tcout<= i + 1)\n\t\t\t\tz++;\n\t\t}\n\t\tif(z > m)\n\t\t\tm = z;\n\n\t}\n\tcout << t << \" \" << m << endl;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37242", "code": "int main()\n{\n\tchar in[10000],out[10000],*p=in,*q=out;\n\tint x[1000],y[1000],temp1[5],temp2[5],*r=temp1,*s=temp2,i=0,j,count=0,max=0,period;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tx[i]=y[i]=0;\n\t}\n\ti=0;\n\tcin>>in>>out;\n\twhile(*p!=0)\n\t{\n\t\tif(*p==',')\n\t\t{\n\t\t\tp++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(*p!=','&&*p!=0)\n\t\t\t{\n\t\t\t\t*r=*p-'0';\n\t\t\t\tp++;\n\t\t\t\tr++;\n\t\t\t}\n\t\t\tj=0;\n\t\t\twhile(r>temp1)\n\t\t\t{\n\t\t\t\tr--;\n\t\t\t\tx[i]=x[i]+(*r)*pow((double)10,j);\n\t\t\t\tj++;\n\t\t\t\t*r=0;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n\ti=0;\n\twhile(*q!=0)\n\t{\n\t\tif(*q==',')\n\t\t{\n\t\t\tq++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(*q!=','&&*q!=0)\n\t\t\t{\n\t\t\t\t*s=*q-'0';\n\t\t\t\tq++;\n\t\t\t\ts++;\n\t\t\t}\n\t\t\tj=0;\n\t\t\twhile(s>temp2)\n\t\t\t{\n\t\t\t\ts--;\n\t\t\t\ty[i]=y[i]+(*s)*pow((double)10,j);\n\t\t\t\tj++;\n\t\t\t\t*s=0;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n\tcout<period)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count>max)\n\t\t{\n\t\t\tmax=count;\n\t\t}\n\t\tcount=0;\n\t}\n\tcout<=a2[l]&&ia2[i])\n\t\t{\n\t\t\tmin=a2[i];\n\t\t}\n\t\tif(maxx max) max = flag[i];\n\t}\n\tcout << num << \" \" << max << endl;\n\t/*if((num == 200) && (max == 103))\n\t{\n\t\tcout<> start[i])\n\t{\n\t\tc = cin.get();\n\t\tif (c != '\\n')\n\t\t{\n\t\t\ti++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\twhile (cin >> out[j])\n\t{\n\t\tc = cin.get();\n\t\tif (c != '\\n')\n\t\t{\n\t\t\tj++;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (k = 0; k <= i ; k++)\n\t{\n\t\tfor (int s = start[k]; s < out[k]; s++)\n\t\t{\n\t\t\ttime[s]++;\n\t\t}\n\t}\n\tfor (int r = 0; r < 1001; r++)\n\t{\n\t\tif (max < time[r])\n\t\t{\n\t\t\tmax = time[r];\n\t\t}\n\t}\n\tcout << i + 1 << \" \" << max ;\n\treturn 0;\n}\n\t\t"} +{"label": "75", "index": "37246", "code": "\nint main()\n{\n\tchar a[5000], b[5000];\n\tint c[1000] = {0}, d[1000] = {0}, i, j, t = 0, count;\n\t\n\tcin >> a ;\n\tcin >> b;\n\tint l = strlen(a);\n\tj = 0;\n\tfor (i = 0;i < l;i++)\n\t{\n\t\tif (a[i] != ',')\n\t\t\tc[j] = c[j] * 10 + (a[i] - '0');\n\t\telse\n\t\t\tj++;\n\t}\n\tint l1 = strlen(b);\n\tj = 0;\n\tfor (i = 0;i < l1;i++)\n\t{\n\t\tif (b[i] != ',')\n\t\t\td[j] = d[j] * 10 + (b[i] - '0');\n\t\telse\n\t\t{\n\t\t\tj++;\n\t\t\tt++;\n\t\t}\n\t}\n\tint sum = 0;\n\tfor (i = 1;i < 1000;i++)\n\t{\n\t\tcount = 0;\n\t\tfor (j = 0;j < t+1;j++)\n\t\t{\n\t\t\tif (i >= c[j] && i < d[j])\n\t\t\t\tcount++;\n\t\t}\n\t\tsum =( sum > count )? sum : count;\n\t}\n\tcout << t + 1 << \" \" << sum;\n\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37247", "code": "//* * * * * * * * * * * * * * * * * * * * * * * * \n//*????????? *\n//*?????????.cpp *\n//*????? 1000012839 *\n//*???2010.11.27 *\n//* * * * * * * * * * * * * * * * * * * * * * * * \n\n\nint main()\n{\n\tchar x[5000], y[5000];\t//\t??????x[5000], y[5000]?\n\tint X[1000] = {0}, Y[1000] = {0};\t//\t???????????????\n\tint t[1000] = {0};\t//\t????????t[1000]?????????????????????0?\n\tint i, j, k, p, max, m, n = 0, l1, l2;\t//\t??????i,j,k,m,?max??t[1000]??????n???????????l1,l2???????\n\n\tcin >> x >> y;\t//\t??????x?y?\n\tl1 = strlen(x);\n\tl2 = strlen(y);\n\tj = 0;\n\tk = 0;\t//\t????\n\tfor (i = 0; x[i] != '\\0'; i++)\n\t{\n\t\tif (x[i] == ',')\n\t\t\tj++;\t//\tj???????????????1?\n\t}\n\tm = j + 1;\n\tp = j + 1;\n\tfor (i = l1; i >= 0; i--)\t\n\t{\n\t\tif (x[i] >= '0' && x[i] <= '9')\n\t\t{\n\t\t\tX[m] += (x[i] - '0') * pow(10, k);\t//\t?????????????????????????X??\n\t\t\tk++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm--;\n\t\t\tk = 0;\t//\t??????????????\n\t\t}\n\t}\n\tk = 0;\n\tfor (i = l2; i >= 0; i--)\n\t{\n\t\tif (y[i] >= '0' && y[i] <= '9')\n\t\t{\n\t\t\tY[p] += (y[i] - '0') * pow(10, k);\n\t\t\tk++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tp--;\n\t\t\tk = 0;\n\t\t}\n\t}\t//\t????????x???????????????Y??\n\tmax = t[0];\t//\t????max?t[0]?\n\tfor (i = 0; i < 1000; i++)\n\t{\n\t\tfor (k = 0; k <= j; k++)\n\t\t{\n\t\t\tif (X[k] <= i && Y[k] >= i + 1)\n\t\t\t\tt[i]++;\t//\t?????????????????????t?1?\n\t\t}\n\t\tif (t[i] > max)\n\t\t\tmax = t[i];\t//\t????t???????????????????\n\t}\n\tcout << j + 1 << ' ' << max << endl;\t//\t??????????????????;\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37248", "code": "int main()\n{\n\tint a[1000]={0},b[1000]={-1},c[1000]={-1},i,j;\n\tint k=0,p,q,h=0;\n char s=',';\n scanf(\"%d\",&b[0]);\n for(i=1;s=getchar()==',';i++){\n\t scanf(\"%d\",&b[i]);}\ns=',';\n scanf(\"%d\",&c[0]);\n for(j=1;s=getchar()==',';j++){\n\t scanf(\"%d\",&c[j]);}\n\n \n\t for(p=0;p> intime;\n count++;\n for (i=intime;i<1000;i++)\n {\n time[i]++;\n }\n cin.get(a);\n }\n while (a!='\\n');\n do \n {\n cin >> outtime;\n \n for (i=outtime;i<1000;i++)\n {\n time[i]--;\n }\n cin.get(a);\n }\n while (a!='\\n');\n int max=time[0];\n for (i=1;i<1000;i++)\n {\n if (time[i]>max)\n {\n max=time[i];\n }\n }\n cout << count << \" \" << max << endl;\n\n\n return 0;\n}\n"} +{"label": "75", "index": "37250", "code": "//********************************\n//*????5.cpp **\n//*?????? 1300012966 **\n//*???2013.10.30 **\n//*???????? **\n//********************************\nint main()\n{\n\tint i, j, k, x[1001], y[1001], m[1001] = {0}, n;\n\tchar s;\n\ti = 1;\n\tcin >> x[1];\n\ts = cin.get();\n\twhile (s == ',')\n\t{\n\t\ti++;\n\t\tcin >> x[i];\n\t\ts = cin.get();\n\t}\n\ti = 1;\n\tcin >> y[1];\n\ts = cin.get();\n\twhile (s == ',')\n\t{\n\t\ti++;\n\t\tcin >> y[i];\n\t\ts = cin.get();\n\t}\n\tfor (j = 1; j <= 1000; j++)\n\t{\n\t\tfor (k = 1; k <= i; k++)\n\t\t{\n\t\t\tif (j >= x[k] && j < y[k])\n\t\t\t{\n\t\t\t\tm[j]++;\n\t\t\t}\n\t\t}\n\t}\n\tn = 0;\n\tfor (j = 1; j <= 1000; j++)\n\t{\n\t\tif( n < m[j])\n\t\t{\n\t\t\tn = m[j];\n\t\t}\n\t}\n\t\tcout << i << \" \" << n;\n\treturn 0;\n}\n\n\n\n\n\n\n\t\n"} +{"label": "75", "index": "37251", "code": "int main()\n{\n\tint i=0,n=0,j;\n\tint a[1000],b[1000],c[1001];\n\tchar comma;\n\tint max=0;\n\t\n\tmemset(c,0,sizeof(c));\n\n\twhile (cin>>a[n++])\n\t{\n\t\tcomma=getchar();\n\t\tif (comma!=',') break;\n\t}\n\n\tfor (i=0;i>b[i];\n\t\tif (imax) max=c[j];\n\t\t}\n\t}\n\n\tcout<='0'&&s[i]<='9'){st*=10;st+=s[i]-'0';i++;}\n\t\ti++;\n\t\twhile(e[j]>='0'&&e[j]<='9'){et*=10;et+=e[j]-'0';j++;}\n\t\tj++;\n\t\tans++;\n\t\tfor(k=st;kmax)max=f[i];\n\tprintf(\"%d %d\\n\",ans,max);\n\t\n\treturn 0;\n}"} +{"label": "75", "index": "37253", "code": "//??????????????????????\n//??:???????????????\n//????wayne\n//????:11.5\nint main()\n{\n\tint a[1001],b[1001],count[1001]; //a,b??????????\n\tint i,j,n,max,min,maxcount;\n\tchar x[100000],y[100000]; //???????????\n\tcin>>x; \n\tn=1,a[1]=0; \n\tfor (i=0;;i++) \n\t{\n\t\tif (x[i]==',')\n\t\t{\n\t\t\tn=n+1; //??\",\"??????????\n\t\t\ta[n]=0; //?????????0\n\t\t}\n\t\telse if (x[i]=='\\0') //??\"\\0\"??????????\n\t\t\tbreak; //???????\n\t\telse\n\t\t{\n\t\t\ta[n]=a[n]*10+x[i]-48; //?ascii???????\n\t\t}\n\t}\n\tcin>>y; //????????????????\n\tn=1,b[1]=0;\n\tfor (i=0;;i++)\n\t{\n\t\tif (y[i]==',')\n\t\t{\n\t\t\tn=n+1;\n\t\t\tb[n]=0;\n\t\t}\n\t\telse if (y[i]=='\\0')\n\t\t\tbreak;\n\t\telse\n\t\t{\n\t\t\tb[n]=b[n]*10+y[i]-48;\n\t\t}\n\t}\n\tmax=0,min=1000; \n\tfor (i=1;i<=n;i++)\n\t{\n\t\tif (maxa[i]) min=a[i];\n\t}\n\tmaxcount=0;\n\tfor (i=min;i<=max-1;i++)\n\t{\n\t\tcount[i]=0; //????????????0\n\t\tfor (j=1;j<=n;j++)\n\t \tif (a[j]<=i&&b[j]>=i+1) //??????????????????????\n\t\t\t count[i]=count[i]+1;\n\t\tif (maxcountmax)max=a[n-1][1];\n\t}\n\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tsum=0;\n\t\tfor(j=0;j=a[j][0]&&iMAX)MAX=sum;\n\t}\n\tprintf(\"%d %d\\n\",n,MAX);\n}"} +{"label": "75", "index": "37255", "code": "int main()\n{\n int x , y , n , i , j , l , max ;\n char c ;\n n = 0 ;\n int m[1000]={0};\n for ( i=0 ; ; i++ )\n {\n if (i%2==0)\n {\n cin>>x;\n m[i/2]= x;\n n++;\n }\n else\n {\n c=cin.get();\n if (c==',')\n {\n continue;\n }\n else\n {\n break;\n }\n }\n }\n int a[n] , b[n] , t[n] ;\n for ( i=0 ; i<=n-1 ; i++ )\n {\n a[i]=m[i];\n }\n for ( i=0 ; i<=2*n-2 ; i++ )\n { \n if (i%2==0)\n {\n cin>>y;\n b[i/2]=y;\n }\n else\n {\n c=cin.get();\n }\n }\n for ( i=0 ; i<=n-1 ; i++ )\n {\n l=0 ;\n for ( j=0 ; j<=n-1 ; j++)\n {\n if ((a[i]>=a[j])&&(a[i]max)\n {\n max=t[i];\n }\n }\n cout<=a[j]&&ima)\n\t\t\tma=p[i];\n\t}\n\n\n\tprintf(\"%d %d\",s,ma);\n\n}\n\n"} +{"label": "75", "index": "37257", "code": "int main()\n{\n\tint x[1001], y[1001];\n\tchar comma;\n\tint i, j;\n\tfor(i = 1;;i++)\n\t{\n\t\tcin >> x[i];\n\t\tcomma = cin.get();\n\t\tif(comma == ',')\n\t\t\tcontinue;\n\t\tif(comma == '\\n')\n\t\t\tbreak;\n\t}\n\tfor(i = 1;;i++)\n\t{\n\t\tcin >> y[i];\n\t\tcomma = cin.get();\n\t\tif(comma == ',')\n\t\t\tcontinue;\n\t\tif(comma == '\\n')\n\t\t\tbreak;\n\t}\n\tint num = i;\n\tint time[1001] = {0};\n\tfor(i = 1; i <= num; i++)\n\t\tfor(j = x[i]; j < y[i]; j++)\n\t\t\ttime[j]++;\n\tint max = time[1];\n\tfor(i = 1; i <= 1000; i++)\n\t\tif(max < time[i])\n\t\t\tmax = time[i];\n\tcout << num << \" \" << max << endl;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37258", "code": "int main()\n{\n\tint people[1000][2],sum=1,time[1000]={0};\n\tcin>>people[0][0];\n\twhile(scanf(\",%d\",&people[sum++][0]));\n\tcin>>people[0][1];\n\tsum=1;\n\twhile(scanf(\",%d\",&people[sum++][1]));\n\n\tfor(int i=0;imax) max=time[i];\n\t}\n\tcout<=a[i]&&jl) l=x[i];\n printf(\"%d %d\",n,l);\n scanf(\"%d\",&i);\n}\n"} +{"label": "75", "index": "37261", "code": "void main()\n{\n\tchar str1[5000],str2[5000];\n\tint x[1001],y[1001];\n\tint i,j,k=0,min=1000,max=0,high=0,count=0,num;\n\tfor(i=0;i<=1000;i++)\n\t{\n\t\tx[i]=0;\n\t\ty[i]=0;\n\t}\n\tgets(str1);\n\tgets(str2);\n\tfor(i=0;i='0'&&str1[i]<='9')\n\t\t{\n\t\t\tfor(j=i;str1[j]>='0'&&str1[j]<='9';j++)\n\t\t\t{\n\t\t\t\tx[k]=x[k]*10+str1[j]-'0';\n\t\t\t}\n\t\t\tif(x[k]='0'&&str2[i]<='9')\n\t\t{\t\n\t\t\tfor(j=i;str2[j]>='0'&&str2[j]<='9';j++)\n\t\t\t{\n\t\t\t\ty[k]=y[k]*10+str2[j]-'0';\n\t\t\t}\n\t\t\tif(y[k]>max)\n\t\t\t\tmax=y[k];\n\t\t\tk++;\n\t\t\ti=j;\n\t\t}\n\t\telse i++;\n\t}\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tnum=0;\n\t\tfor(j=0;ji)\n\t\t\t\tnum++;\n\t\t}\n\t\tif(num>high)\n\t\t\thigh=num;\n\t}\n\tprintf(\"%d %d\\n\",count,high);\n}\n\n\n"} +{"label": "75", "index": "37262", "code": "void main()\n{ int n=0,m,f,i,j=-1,l1,l2;char q[10000],w[10000];int a[1000]={0},b[1000]={0};int c[1000]={0},k,flag=0;\n scanf(\"%s\",q);\n scanf(\"%s\",w);\n l1=strlen(q);l2=strlen(w);\n for(k=0;k'9') {flag++;break;}\n else a[k]=a[k]*10+q[j]-'0';\n }\n f=flag+1;j=-1;\n for(k=0;k'9') break;\n else b[k]=b[k]*10+w[j]-'0';\n }\n\n int min=a[0],max=a[0];\n for(j=0;jmax) max=a[j];\n }\n for(j=0;jmax) max=b[j];\n }\n for(k=min;ki) i=c[j];\n }\n\n printf(\"%d %d\",f,i);\n }\n"} +{"label": "75", "index": "37263", "code": "int come[1000],out[1000];\nint in(); //??\nint check(int max); //??????\nint search(int same[1000]);//???\nint main()\n{ int max;\n max=in(); //???????\n cout<>come[i++];\n\t\tcin.get(a); //????\n\t\tif(a=='\\n')break;\n\t\n\t\t}\n\ti=0;\n\t\nwhile(true)\n\t{ cin>>out[i++];\n\t\tcin.get(a);\n\t\tif(a=='\\n')break;\n\t\n\t\t}\nreturn i-1;\n}\nint check(int max)\n{\n\tint i,j,k=0,same[1000]={0};\n\tfor(i=0;i<=1000;i++) //?????\n\t{for(j=0;j<=max;j++)\n\t\tif(i>=come[j]&&i> x;\n\tcin >> y;\n\ti = 0;\n\tnum = 0;\n\tn1 = strlen(x);\n\tn2 = strlen(y);\n\twhile (i < n1)\n\t{\n\t\ts = 1;\n\t\tnum ++;\n\t\tii = i;\n\t\tjj = 1;\n\t\twhile ((x[ii] != ',') && (ii < n1))\n\t\t{\n\t\t\tq[jj] = x[ii] - '0';\n\t\t\tjj ++;\n\t\t\tii ++;\n\t\t//\tcout << xx[num]<< endl;\n\t\n\t\t}\t\n\t\tfor (kk = jj - 1; kk >= 1; kk--)\n\t\t\t{\n\t\t\t\txx[num] += s * q[kk];\n\t\t\t\ts *= 10;\n\t\t\t}\n\t//\tcout << xx[num]<< endl;\n\t\tif (xx[num] < min)\n\t\t\tmin = xx[num];\n\t\ti = ii + 1;\n\t\t//cout << i << endl;\n\t}\n\t//cout << num << endl;\n\ti = 0;\n\tnum = 0;\n\twhile (i < n2)\n\t{\n\t\ts = 1;\n\t\tii = i;\n\t\tnum ++;\n\t\tjj = 1;\n\t\twhile ((y[ii] != ',') && (ii < n2))\n\t\t{\n\t\t\tq[jj] = y[ii] - '0';\n\t\t\tjj ++;\n\t\t\tii ++;\n\t\t\t\n\t\t}\n\t\tfor (kk = jj - 1; kk >= 1; kk--)\n\t\t\t{\n\t\t\t\tyy[num] += s * q[kk];\n\t\t\t\ts *= 10;\n\t\t\t}\n\t\tif (yy[num] > max)\n\t\t\tmax = yy[num];\n\t\ti = ii + 1;\n\t}\n//\tcout << num<< endl;\n//\tcout << min << \" \" << max << endl;\n\t//cout << i << endl;\n\tfor (j = 1; j <= num; j++)\n\t{\n\t\t//cout << xx[j] << endl;\n\t\tfor (k = xx[j]; k < yy[j]; k++){\n\t\t\tt[k] ++;}\n\t}\n\tfor (k = min; k <= max; k++)\n\t{\n\t\t//cout << t[k] << endl;\n\t\tif (t[k] > most)\n\t\t\tmost = t[k];\n\t\tif (t[k] < least)\n\t\t\tleast = t[k];\n\t}\n\tcout << num << \" \" << most << endl;\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37265", "code": "int main()\n{\n\tint x[1000], y[1000]; //????????\n\tint cnt = 0;\n\tint man[1000] = {0};\n\tint manmax = 0;\n\tint xmin, ymax;\n\txmin = INT_MAX; //???\n\tymax = INT_MIN;\n\tchar ch;\n\tfor ( int q = 0; q <= 1000; q++ ) //????????ch??\",\"???\n\t{\n\t\tcin >> x[q];\n\t\tch = cin.get();\n\t\tcnt++; //?????\n\t\tif ( ch != ',' )\n\t\t\tbreak;\n\t}\n\tfor ( int o = 0; o <= 1000; o++ )\n\t{\n\t\tcin >> y[o];\n\t\tch = cin.get();\n\t\tif ( ch != ',' )\n\t\t\tbreak;\n\t}\n\tfor ( int w = 0; w < cnt; w++ ) //??????????\n\t{\n\t\tif ( x[w] <= xmin )\n\t\t\txmin = x[w];\n\t}\n\tfor ( int z = 0; z < cnt; z++ ) //??????????\n\t{\n\t\tif ( y[z] >= ymax )\n\t\t\tymax = y[z];\n\t}\n\n\tfor ( int i = xmin; i < ymax; i++ ) //?????????????????\n\t{\n\t\tfor ( int j = 0; j < cnt; j++ )\n\t\t{\n\t\t\tif( x[j] <= i && y[j] > i )\n\t\t\t\tman[i] ++;\n\t\t}\n\t}\n\n\tfor ( int t = xmin; t < ymax; t++ ) //??????????????\n\t{\n\t\tif ( man[t] >= manmax )\n\t\t\tmanmax = man[t];\n\t}\n\tcout << cnt << \" \" << manmax;\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "75", "index": "37266", "code": "char a[100000], b[100000];\nint power(int, int);\nint main()\n{\n\tint a1[1000], b1[1000], i, j, k, count, num = 0, n, m, time[1000], max = 0;\n\tmemset(time, 0, sizeof(time));\n\tcin.getline(a, 100000);\n\tcin.getline(b, 100000);\n\tk = 0;\n\tcount = 0;\n\tfor(i = 0; ; i++)\n\t{\n\t\tif(a[i] == ',')\n\t\t{\n\t\t\tm = 0;\n\t\t\tn = count - 1;\n\t\t\tfor(j = i - count; j < i; j++)\n\t\t\t\tm = m + (a[j] - '0') * power(10, n--);\n\t\t\ta1[k++] = m;\n\t\t\tnum++;\n\t\t\tcount = 0;\n\t\t}\n\t\telse if(a[i] == '\\0')\n\t\t{\n\t\t\tm = 0;\n\t\t\tn = count - 1;\n\t\t\tfor(j = i - count; j < i; j++)\n\t\t\t\tm = m + (a[j] - '0') * power(10, n--);\n\t\t\ta1[k++] = m;\n\t\t\tnum++;\n\t\t\tbreak;\n\t\t}\n\t\telse count++;\n\t}\n\tk = 0;\n\tcount = 0;\n\tfor(i = 0; ; i++)\n\t{\n\t\tif(b[i] == ',')\n\t\t{\n\t\t\tm = 0;\n\t\t\tn = count - 1;\n\t\t\tfor(j = i - count; j < i; j++)\n\t\t\t\tm = m + (b[j] - '0') * power(10, n--);\n\t\t\tb1[k++] = m;\n\t\t\tcount = 0;\n\t\t}\n\t\telse if(b[i] == '\\0')\n\t\t{\n\t\t\tm = 0;\n\t\t\tn = count - 1;\n\t\t\tfor(j = i - count; j < i; j++)\n\t\t\t\tm = m + (b[j] - '0') * power(10, n--);\n\t\t\tb1[k++] = m;\n\t\t\tbreak;\n\t\t}\n\t\telse count++;\n\t}\n\tfor(i = 0; i <= num; i++)\n\t\tfor(j = a1[i]; j < b1[i]; j++)\n\t\t\ttime[j]++;\n\tfor(i = 0; i < 1000; i++)\n\t{\n\t\tif(time[i] > max)\n\t\t\tmax = time[i];\n\t}\n\tcout << num << \" \" << max << endl;\n\treturn 0;\n}\nint power(int i, int j)\n{\n\tint k, m = 1;\n\tfor(k = 0; k < j; k++)\n\t\tm = m * i;\n\treturn m;\n}\n"} +{"label": "75", "index": "37267", "code": "int main()\n{\n\tint in[1001], out[1001], i, j, n, count[1001] = {0}, climax;\n\tchar a;\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> in[i];\n\t\tcin.get(a);\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> out[i];\n\t\tcin.get(a);\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tn = ++i;\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tfor (j = in[i]; j < out[i]; j++)\n\t\t\tcount[j]++;\n\t}\n\tclimax = count[0];\n\tfor (j = 0; j < 1000; j++)\n\t\tif (count[j] > climax)\n\t\t\tclimax = count[j];\n\tcout << n << \" \" << climax << endl;\n\treturn 0;\n}\n\t\n\n"} +{"label": "75", "index": "37268", "code": "int main()\n{\n\tint arrival[1000],depature[1000],i=0,j,count,max=0,t=0;\n\tchar a[2000];\n\twhile(true)\n\t{\n\t\tcin>>arrival[i];\n\t\t//cout<>depature[i];\n\t\t//cout<=arrival[j]&&imax)\n\t\t\t{\n\t\t\tmax=count;\n\t\t\t//cout<<\"max=\"<> a[i]) //???????????+1??????????\n {\n sum++;\n c = cin.get();\n if ( c == ',') //?????????????????????????\n i++;\n else //????????\u0093????\u0094????????sum????????\n break;\n }\n\n int b[sum]; //????sum??????b???????????????\n for ( i = 0; i <= sum - 1; i++ ) //??????????????b?????\n {\n cin >> b[i];\n cin.get();\n }\n //????i????????????????????a[i-1],b[i-1]\n\n int d[m]; //??????d?????????????????d[0]??0?????????d[15]??15????????\n for ( i = 0; i < m; i++ ) //??????????????0\n d[i] = 0;\n\n //?????a[i]?????b[i]????????J??? J >= a[i] ? J < b[i]??????????d[j]++???j?????????+1\n for ( i = 0; i <= sum - 1; i++ )\n {\n for ( j = 0; j < m; j++ )\n {\n if ( j >= a[i] && j < b[i] )\n d[j]++;\n }\n }\n int dmax = -9999;\n for(i = 0; i < m; i++)\n {\n if(dmax < d[i]) dmax = d[i];\n }\n /*\n for ( i = 1; i < m; i++ ) //??????d??????????????????????d[999]?????????????\n {\n for ( j = 0; j <= m - i; j++ )\n {\n if ( d[j] > d[j+1])\n {\n p = d[j+1];\n d[j+1] = d[j];\n d[j] = p;\n }\n }\n }\n*/\n cout << sum << \" \"<< dmax << endl;\n}\n"} +{"label": "75", "index": "37270", "code": "int main()\n{\n\tint i,j,k,a[10000],b[10000],t=0,p[1000]={0},n,q;\n\tchar c=',';\n\tfor(i=0;c==',';i++)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t\tc=getchar();\n\t}\n\tfor(j=0;j=t+1)\n\t\t\t\tp[k]=p[k]+1;\n\t\t\telse;\n\t\t}\n\t\tk=k+1;\n\t}\n\tq=p[0];\n\tfor(i=0;iq)\n\t\t\tq=p[i];\n\t\telse;\n\t}\n\tprintf(\"%d\",q);\n\treturn 0;\n}"} +{"label": "75", "index": "37271", "code": "///********************************\n//*???????? **\n//*?????? 1300012745 **\n//*???2013.10.31 **\n//********************************\nint main()\n{\n\tint a[1000]={0}, n=1, i, x, y, k, max;\n\tchar ex;\n\tcin >> x;\n\tfor (i=x; i<1000; i++)\n\t\ta[i]+=1;\n\twhile ((ex=cin.get())==',')\n\t{\n\t\tcin>>x;\n\t\tn++;\n\t\tfor (i=x;i<1000;i++)\n\t\t\ta[i]++;\n\t}\n\tcin >>y;\n\tfor (i=y;i<=999;i++)\n\t\ta[i]--;\n\tfor (k=1;k<=n-1;k++)\n\t{\n\t\tcin >> ex >> y;\n\t\tfor (i=y;i<=999;i++)\n\t\t\ta[i]--;\n\t}\n\tmax=a[0];\n\tfor (i=1;i<=999;i++)\n\t\tif(a[i]>max)\n\t\t\tmax=a[i];\n\tcout<>in>>out;\n int lenin=strlen(in);\n int lenout=strlen(out);\n in[lenin]=','; out[lenout]=',';\n int p=lenin; //???? \n //cout<=0)\n {\n if(in[p]==',')\n {\n i=p-1;\n {\n while(in[i]!=','&&i!=-1)\n {\n x[k]=x[k]+(int)(in[i]-'0')*(int)(pow(10.0,(double)(p-1-i)));\n i--;\n }\n p=i;\n k++;\n }\n }\n }\n k=0;\n while(q>=0)\n {\n if(out[q]==',')\n {\n i=q-1;\n {\n while(out[i]!=','&&i!=-1)\n {\n y[k]=y[k]+(int)(out[i]-'0')*(int)(pow(10.0,(double)(q-1-i)));\n i--;\n }\n q=i;\n k++;\n }\n }\n }\n num=k; cout<=x[j]&&it))\n {\n count1++;\n // printf(\" i=%d \",i);\n }\n if(count1>count)\n count=count1;\n // printf(\"%d\\n\",count1);\n }\n printf(\"%d %d\",n,count);\n return 0;\n}"} +{"label": "75", "index": "37274", "code": "void main()\n{\n int a[1000],i=0,j=0;\n char d=',';\n while(d==',')\n {\n scanf(\"%d%c\",&a[i],&d);\n i++;\n }\n int n=i,max=0;\n int b[n];\n i=0;\n while(imax)\n max=b[i];\n i++;\n }\n int c[max];\n i=0;\n while(im)\n m=c[i];\n i++;\n }\n printf(\"%d %d\",n,m);\n}"} +{"label": "75", "index": "37275", "code": "void main()\n{\n\tint x[1010]={0},y[1010]={0},i=0,a=0,k=0,b=0,j,g[1010]={0},max;\n\tchar str1[100000],str2[100000];\n\tscanf(\"%s\",str1);\n\twhile(str1[i]!='\\0')\n\t{\n\t\tif(str1[i]!=',')\n\t\tx[a]=str1[i]-'0'+x[a]*10;\n\t\telse a++;\n\t\ti++;\n\t}\n\ti=0;\n\tscanf(\"%s\",str2);\n\twhile(str2[i]!='\\0')\n\t{\n\t\tif(str2[i]!=',')\n\t\ty[b]=str2[i]-'0'+y[b]*10;\n\t\telse b++;\n\t\ti++;\n\t}\n\tprintf(\"%d \",a+1);\n\nfor(i=0;imax)\n\t max=g[i];\n\tprintf(\"%d\",max);\n}\n \n"} +{"label": "75", "index": "37276", "code": "int main()\n{\n char input[4000], comma;\n int enter[1000], leave[1000];\n cin >> input;\n int len = strlen(input), i, j, k, u = 0, min = 1000, max = 0;\n\n for (i = 0; i < len; i++) {\n if (input[i] != ',') {\n char temp[2000];\n k = 0;\n for (j = i; input[j] >= '0' && input[j] <= '9'; j++, k++) temp[k] = input[j]; temp[k] = '\\0';\n enter[u] = atoi(temp);\n if (enter[u] < min) min = enter[u];\n i = j;\n u++;\n }\n }\n\n len = u;\n for (i = 0; i < len - 1; i++) {\n cin >> leave[i] >> comma;\n if (leave[i] > max) max = leave[i];\n }\n cin >> leave[len - 1];\n if (leave[len - 1] > max) {\n max = leave[len - 1];\n }\n\n int num[1000];\n for (i = min; i < max; i++) {\n for (j = 0; j < len; j++) {\n if (i >= enter[j] && i < leave[j]) num[i]++;\n }\n }\n\n int maxans = num[min];\n for (i = min; i < max; i++) {\n if (num[i] > maxans) maxans = num[i];\n }\n cout << len << \" \" << maxans << endl;\n return 0;\n}\n"} +{"label": "75", "index": "37277", "code": "/*\n * main.cpp\n *\n * Created on: 2012-11-16\n * Author: ??\n * ?????\n */\n\n\nint main()\n{\n\tchar str1[5000],str2[5000];\n\tint a[1010][3];\n\tint k1=0,k2=0,l1,x,y,s=0,max=0,i,l2,t,j,m1=0,m2=2000;\n\n\tcin>>str1>>str2;l1=strlen(str1);l2=strlen(str2);\n\twhile (k1x) x=m1; if(m2i)) t++;\n\t\tif (t>max) max=t;\n\t}\n\tcout<max) max=b[i];\n\n\nfor(t=1;tt)) c++;}\nif (c>maxp) maxp=c;\n}\n\nprintf(\"%d %d\",n,maxp);\n\n} \n"} +{"label": "75", "index": "37280", "code": "main()\n{\n\tint arv[1000],lve[1000],min=0,max=0,num,sum=0,person=0;\n\tchar c;\n\tint i,j,k;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d\",&arv[i]);\n\t\tc=getchar();\n\t\tif(min>arv[i]) min=arv[i];\n\t\tif(c=='\\n')\n\t\t{\n\t\t\tnum=i+1;break;\n\t\t}\n\t}\n\tscanf(\"%d\",&lve[0]);max=lve[0];\n\tfor(i=1;imax) max=lve[i];\n\t}\n\tfor(j=min;j<=max-1;j++)//min,max-1~min+1,max\n\t{\n\t\tfor(k=0;kperson) person=sum;\n\t\tsum=0;\n\t}\n\tprintf(\"%d %d\\n\",num,person);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37281", "code": "int main()\n{\n\tint x[1001], y[1001], z[1001] = {0}, n, i, j, k;\n\tchar a;\n\tfor(i = 1; i <= 1000; i++)\n\t{\n\t\tcin >> x[i];\n\t\ta = cin.get();\n\t\tif (a == ',');\n\t\telse\n\t\t{\n\t\t\tn = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i = 1; i <= 1000; i++)\n\t{\n\t\tcin >> y[i];\n\t\ta = cin.get();\n\t\tif (a == ',');\n\t\telse\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\tfor (j = x[i]; j <= y[i] - 1; j++)\n\t\t\tz[j]++;\n\t}\n\tfor (i = 1, k = 0; i <= 1000; i++)\n\t{\n\t\tif (z[i] > k)\n\t\t{\n\t\t\tk = z[i];\n\t\t}\n\t}\n\tcout << n << \" \" << k;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37282", "code": "/*\n * 123.cpp\n *\n * Created on: 2010-12-18\n * Author: 378073652\n */\n\n\nint main(){\n\tchar a[30000],b[30000];\n\tint c[10000],d[10000],e[1005],la,lb,i,j,sa=0,sb=0,max=0;\n\tfor(i=0;i<=1004;i++) e[i]=0;\n\tcin>>a;\n\tcin>>b;\n\tla=strlen(a);\n\tlb=strlen(b);\n\tc[0]=atof(a);\n\tfor(i=0;imax) max=e[i];\n\t}\n\n\n\n\n\n\tcout<> a;\n\t\t\txijinping=cin.get(); //????\n\t\t while (xijinping==',')\n\t\t\t{\n x[jishu]=a;\n\t\t\t jishu=jishu+1; //????????\n\t\t\t\tcin >> a ;\n\t\t\t\txijinping=cin.get();\n\t\t\t}\n\t\t\tx[jishu]=a; //??????????\n\t\t\tjishu=jishu+1;\n\t\t}\n\t\tif(i==2)\n\t\t{\n\t\t\tjishu=0; //???????????y??\n\t\t\tcin >> b ;\n\t\t\txijinping=cin.get();\n\t\t\twhile (xijinping==',')\n\t\t\t{\t\n\t\t\t\ty[jishu]=b;\n\t\t\t\tjishu=jishu+1;\n\t\t\t\tcin >> b ;\n\t\t\t\txijinping=cin.get();\n\t\t\t}\n\t\t\ty[jishu]=b;\n\t\t\tjishu=jishu+1;\n\t\t}\n\t}\n for (j=0;j<=1000;j++)\n\t{\n\t\tif (ren>x[i]; //????\n\t\ti++; \n\t\tnum ++; //??????\n\t\tc=cin.get();\n\t}while(c!='\\n'); //?c?????????????????????????\n\ti = 0;\n\tdo //?????y[i]\n\t{\n\t\tcin>>y[i];\n\t\ti++;\n\t\tc=cin.get();\n\t}while(c!='\\n');\n\n\tfor (i = 0; i < 1000; i ++)\n\t{\n\t\tfor (j = 0; j < num; j ++)\n\t\t{\n\t\t\tif (x[j] <= i && y[j] > i) //???????????????\n\t\t\t\tt[i] ++;\n\t\t}\n\t}\n\tmax = t[0];\n\tfor (i = 0; i < 1000; i ++) //???????\n\t{\n\t\tif (t[i] > max)\n\t\t\tmax = t[i];\n\t}\n\tcout<j)\n //?????????????????????1\n\t\t\t{\n\t\t\t\tc[j]++;\n\t\t\t}\n\t\t}\n\t\tif(c[j]>m)\n\t\t{\n\t\t\tm=c[j]; //??????\n\t\t}\n\t}\n\tcout<> in[i];\n\t\tc[i] = cin.get();\n\t}\n\tn = i;\n\tfor ( i = 0; c[i - 1] != '\\n'; i ++ )\n\t{\n\t\tcin >> out[i];\n\t\tc[i] = cin.get();\n\t}\n\tfor ( i = 0; i < n; i ++ )\n\t\tfor ( j = in[i]; j < out[i] ; j ++ )\n\t\t\ttime[j] ++; //???????1\n\tmax = 0;\n\tfor ( i = 1; i < 1000; i ++ ) //????????\n\t\tif ( time[max] < time[i] )\n\t\t\tmax = i;\n\tcout << n << ' ' << time[max] << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37288", "code": "int main()\n{\n\tint x[1020]={0},y[1020]={0},n=0,i,j,k=0,t=0,p=0,max=0;\n\tchar c[3000];\n\tgets(c);\n\tfor(i=0;c[i]!=0;i++)\n\t{\n\t\tif(c[i]!=',') x[n]=x[n]*10+c[i]-'0';\n\t\telse n++;\n\t}\n\tn++;\n\tfor(i=0;ix[j+1])\n\t\t\t{\n\t\t\t\tx[j]=x[j]+x[j+1];\n\t\t\t\tx[j+1]=x[j]-x[j+1];\n\t\t\t\tx[j]=x[j]-x[j+1];\n\t\t\t}\n\t\t\tif(y[j]>y[j+1])\n\t\t\t{\n\t\t\t\ty[j]=y[j]+y[j+1];\n\t\t\t\ty[j+1]=y[j]-y[j+1];\n\t\t\t\ty[j]=y[j]-y[j+1];\n\t\t\t}\n\t\t}\n\t}\n\tj=0;\n\tfor(t=0;t<=y[n-1];t++)\n\t{\n\t\tfor(i=j;;i++)\n\t\t{\n\t\t\tif(t==x[i])\n\t\t\t{\n\t\t\t\tp++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif(tmax) max=p;\n\t}\n\tprintf(\"%d %d\\n\",n,max);\n\treturn 0;\n}"} +{"label": "75", "index": "37289", "code": "\n\nint main()\n{\n\tchar c;\n\tint x[1001], y[1001], sum[1001] = {0};\n\tint i, j, n, h, m, k, max = 0;\n\tfor(i = 0; ; i++)\n\t{\n\t\tcin >> x[i];\n\t\tc = getchar();\n\t\tif(c == '\\n')\n\t\t\tbreak;\n\t}\n\tfor(j = 0; j <= i; j++)\n\t{\n\t\tcin >> y[j];\n\t\tc = getchar();\n\t}\n\tfor(k = 0; k < 1000; k++)\n\t{\n\t\tfor(m = 0; m <= i; m++)\n\t\t{\n\t\t\tif(x[m] <= k && y[m] > k)\n\t\t\t{\n\t\t\t\tsum[k]++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(h = 0; h < 1000; h++)\n\t{\n\t\tif(sum[h] > max)\n\t\t\tmax = sum[h];\n\t}\n\tcout << i + 1<<\" \" << max << endl;\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37290", "code": "\nint main() {\n int start[1000];\n int end[1000];\n\n int time[1024];\n int n = 0;\n for(int i = 0;;i++) {\n n ++;\n cin >> start[i] ;\n char c = cin.get();\n if (c!=',')\n break;\n }\n for(int i = 0; ; i ++) {\n cin >> end[i];\n char c = cin.get();\n if(c!=',')\n break;\n }\n\n for (int i = 0; i < 1024; i ++)\n time[i] = 0;\n for (int i = 0; i < n; i ++) {\n for (int j = start[i]; j < end[i]; j ++)\n time[j] ++;\n }\n int max = 0;\n for (int i = 0; i < 1024; i ++) {\n if (max < time[i])\n max = time[i];\n }\n cout << n << \" \" << max << endl;\n return 0;\n}\n"} +{"label": "75", "index": "37291", "code": "/*\n2010 12 22 ??\n?????\n????\n????2???2????????? \n?1????i???????xi?????????? \n?1????i??????????yi??????????? \n??? \n2,5,4,6,7,3,1,6,2 \n5,6,7,7,8,4,3,9,4 \n\n???9????????????? \n[2,5),[5,6),[4,7),[6,7),[7,8),[3,4),[1,3),[6,9),[2,4)\n?? 1000012760\n*/\n\n\nint main(){\n\tint T[1000]= {0}, x[1000]= {0}, y[1000]= {0}, i= 0, n= 0, k= 0, MostPeople= 0, People= 0;;\n\tchar test;\n\twhile(1){\n\t\tcin>>x[i];\n\t\ttest= getchar();\n\t\tPeople++;\n\t\ti++;\n\t\tif(test== '\\n')\n\t\t\tbreak;\n\t}\n\ti= 0;\n\twhile(1){\n\t\tcin>>y[i];\n\t\ttest= getchar();\n\t\ti++;\n\t\tif(test== '\\n')\n\t\t\tbreak;\n\t}\n\n\tfor(i= 0; i< People; i++){\n\t\tk= 0;\n\t\twhile(k< (y[i]- x[i])){\n\t\t\tT[x[i]+ k]++;\n\t\t\tk++;\n\t\t}\n\t}\n\n\tfor(i= 0; i< 1000; i++){\n\t\tif(T[i]> MostPeople)\n\t\t\t\tMostPeople= T[i];\n\t}\n\n\tcout<>x[n];\n\t\tcin.get(lt);\n\t\tif(lt!=',')break;\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>y[i];\n\t\tcin.get(lt);\n\t}\n\tint max=0;\n\tfor(int i=0;i<1000;i++){\n\t\tint cnt=0;\n\t\tfor(int j=1;j<=n;j++){\n\t\t\tif(x[j]<=i&&icnt?max:cnt;\n\t}\n\tcout<max) max=exit[i];\n\t}\n\tfor(i=min;ii) point[i]++;//????????????????????1\n\t\t}\n\t}\n\n\t\n\tfor(i=min;i=result) result=point[i];//?point???????\n\t}\n\tcout<> in[i];\n\t\tx=cin.get();\n\t\tif (x=='\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tnum=num+1;\n\t}\n\tx='0';\n for (i=0;;i++)\n\t{\n\t cin >> out[i];\n\t\tx=cin.get();\n\t\tif (x=='\\n')\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (j=0;j<=num-1;j++)\n\t{\n\t\tfor (k=in[j];kresult)\n\t\t{\n\t\t\tresult=t[i];\n\t\t}\n\t}\n\tcout << num << \" \" << result << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37295", "code": "\nint main()\n{\n\tint time[1001] = {0}, tin[1001], tout[1001];\n\tchar a = ',';\n\tint p_num = 1;\n\tcin >> tin[1];\n\twhile ((a = getchar()) != '\\n')\n\t{\n\t\tp_num++;\n\t\tcin >> tin[p_num];\n\t}\n\tp_num = 1;\n\tcin >> tout[1];\n\twhile ((a = getchar()) != '\\n')\n\t{\n\t\tp_num++;\n\t\tcin >> tout[p_num];\n\t}\n\tfor (int p = 1; p <= p_num; p++)\n\t\tfor (int i = tin[p]; i < tout[p]; i++)\n\t\t\ttime[i]++;\n\tint p_max = 0;\n\tfor (int i = 0; i <= 1000; i++)\n\t\tif (p_max < time[i])\n\t\t\tp_max = time[i];\n\tcout << p_num << ' ' << p_max;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37296", "code": "/*****************\n*file:5.cpp\n*author:?? \n*time:2013-10-30\n*description:?????????? \n*******************/\nint main()\n{\n\tint n = 0, i = 1, j = 1, max = -1000, x;\n\tint a[1000], b[1000], c[1000]={0}; //?? c???????????? \n\tcin >> a[0];\n\twhile (scanf(\",%d\",&x)>0)\n\t{\n\t\ta[i] = x;\n n++;\n\t\ti++;\n\t}//????a \n\tcin >> b[0];\n\twhile (scanf(\",%d\",&x)>0)\n\t{\n\t\tb[j] = x;\n\t\tj++;\n\t}//????b \n\tfor (int k = 0; k < i; k++)\n\t{\n\t\tfor (int p = a[k]; p < b[k]; p++)\n\t\t{\n\t\t\tc[p]++;\n\t\t}\n\t}//??????????????? \n\tfor (int k = 1; k < 1000; k++)\n\t{\n\t\tif (max < c[k])\n\t\t\tmax = c[k];\n\t}//??????????? \n\tif (n == 0)//??????????????????1 \n\t{\n\t\tcout << \"1 1\";\n\t}\n\telse //????1??? \n\t{\n\t\tcout << n + 1 << ' ' << max;\n\t}\n\treturn 0;\n}"} +{"label": "75", "index": "37297", "code": "\n\n\nint in[20000]={0},out[20000]={0};\nchar line1[20000], line2[20000];\nint t=1,s=1;\n\n\nstruct time\n{\n int in;\n int out;\n}person[10000];\n\nint convert();\n\nint main()\n{\n\t\n\tint\t max = 0;\n\t\n\tcin.getline(line1,20000);\n\tcin.getline(line2,20000);\n\tconvert();\n\n\tfor(int i=0; i<1000; i++)\n\t{\n\t\tint counter=0;\n\t\tfor(int j=0; ji)\n\t\t\t{\n\t\t\t\tcounter++;\n\t\t\t\tif(counter>max)\n\t\t\t\t\tmax=counter;\n\t\t\t}\n\t\t\n\t\t\n\t\t}\n\n\t\n\t}\n\n\tcout<max1)\n\t\t\t\tmax1=a[i];\nif(b[i]>max2)\n\t\t\t\tmax2=b[i];\n\t\t\t\t\tif(a[i]i)\nd[t]++;\n}\nt++;\n}\n\nfor(i=0;imax)\n\t\t\t\tmax=d[i];\n}\nprintf(\"%d %d\",n1,max);\n\t\t\t\n\t\t\n\t\t\n\n\nreturn 0;\n\n}"} +{"label": "75", "index": "37299", "code": "int main()\n{\n\tint i = 0, n, m = 0, x[1000], y[1000], j, s[1000] = {0};\n\tchar c;\n for(;;i++)\n\t{\n\t\tcin >> x[i] ;\n\t\tcin.get (c);\n\t\tif(c != ',') break;\n\t}\n\tn = i + 1;\n\tfor(j = 0 ; j < n ; j ++)\n\t{\n\t\tcin >> y[j];\n\t\tcin.get (c);\n\t}\n\tfor(i = 0 ; i < n ; i ++)\n\t{\n\t\tfor(j = x[i]; j < y[i] ; j ++)\n\t\t{\n\t\t\ts[j] ++;\n\t\t}\n\t}\n\tfor(i = 0 ; i < 1000 ; i ++)\n\t{\n\t\tif(s[i] > m)\n\t\t{\n\t\t\tm = s[i];\n\t\t}\n\t}\n\tcout << n << \" \" << m;\n\treturn 0;\n}"} +{"label": "75", "index": "37300", "code": "main()\n{\n\tint i=0,j,k,reach[10000],leave[10000],num=0,max=0;char a;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&reach[i],&a);\n\t\ti++;\n\t}\n\twhile(a!='\\n');\n\tprintf(\"%d \",i);\n\tfor(j=0;jj)num++;\n\t\tif(num>max)max=num;\n\t\tnum=0;\n\t}\n\tprintf(\"%d\",max);\n}\n\n\n\t\t\n"} +{"label": "75", "index": "37301", "code": "int main()\n{\n\tint i,j,k,s=0,max=0,t=0;\n\tint a[1020],b[1020],d[1000]={0};\n\tchar c;\n\tfor(i=1;;i++)\n\t{\n\t\tcin>>a[i];\n\t\tc=cin.get();\n\t\tif(c!=',') break;\n\t}\n\tfor(j=1;j<=i;j++)\n\t{\n\t\tcin>>b[j];\n\t\tcin.get();\n\t\tif(b[j]>t) t=b[j];\n\t}\n\tfor(j=1;j<=i;j++)\n\t{\n\t\tfor(k=a[j];kmax) max=d[j];\n\t}\n\tcout<> intime[i];\n\t\tmark = cin.get();\n\t\tpeoplesum++;\n\t\ti++;\n\t}while(mark != '\\n');\n\ti = 0;\n\tdo{\n\t\tcin >> outtime[i];\n\t\tmark = cin.get();\n\t\ti++;\n\t}while(mark != '\\n');\n\tfor (i = 0; i < peoplesum; i++)\n\t\tfor (j = intime[i]; j < outtime[i]; j++)\n\t\t\ttime[j]++;\n\tfor (j = 0; j < 1000; j++)\n\t\tif (time[j] > maxsum)\n\t\t\tmaxsum = time[j];\n\tcout << peoplesum << \" \" << maxsum;\n\treturn 0;\n}"} +{"label": "75", "index": "37303", "code": "void main()\n{\n\tint a[10000],i,j,b[10000],s,t,n[10000],max=0;\n\tchar c[10000],d[10000];\n\tfor(i=0; ;i++)\n\t{\n\t\tscanf(\"%d%c\",&a[i],&c[i]);s=i+1;\n\t\tif(c[i]!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=0; ;i++)\n\t{\n\t\tscanf(\"%d%c\",&b[i],&d[i]);t=i+1;\t\tif(d[i]!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tn[i]=0;\n\t\tfor(j=0;j=i+1)\n\t\t\t\tn[i]=n[i]+1;\n\t\t}\n\t}\n\tfor(i=0;i<1000;i++)\n\t{\n\t if(max> a[i];\n cin.get(ch);\n i++;\n if(ch == '\\n')\n break;\n }\n n = i;\n for(i = 0; i < n-1; i++)\n cin >> b[i] >> ch;\n cin >> b[n-1];\n for(i = 0; i < n; i++)\n {\n for(j = a[i]; j < b[i]; j++)\n {\n c[j] = c[j] + 1;\n }\n }\n for(j = 0; j < 1001; j++)\n {\n if(c[j] > max)\n max = c[j];\n }\n cout << n << \" \" << max << endl;\n return 0;\n}\n"} +{"label": "75", "index": "37305", "code": "int main()\n{\n\tchar x[4000],y[4000];\n\tint xi[1000] = {0},yi[1000] = {0};\n\tint jl[1000] = {0};\n\tint i,j,l,js,s = 0,n = 1,max = 0;\n\tcin >> x >> y;\n\tl = strlen(x);js = 1;\n\tfor (i = l-1;i >= 0; i--)\n\t{\n\t\tif (x[i] == ',')\n\t\t{\n\t\t\tn ++;\n\t\t\tjs = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\txi[n] = xi[n] + (x[i] - '0') * js;\n\t\t\tjs *= 10;\n\t\t}\n\t}\n\tcout << n << ' ';\n\tn = 1;\n\tl = strlen(y);js = 1;\n\tfor (i = l-1;i >= 0; i--)\n\t{\n\t\tif (y[i] == ',')\n\t\t{\n\t\t\tn ++;\n\t\t\tjs = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tyi[n] = yi[n] + (y[i] - '0') * js;\n\t\t\tjs *= 10;\n\t\t}\n\t}\n\tfor (i = 1;i <= n; i++)\n\t\tfor (j = xi[i]; j < yi[i] ;j++)\n\t\t{\n\t\t\tjl[j] ++;\n\t\t\tif (jl[j] > max) \n\t\t\t\tmax = jl[j];\n\t\t}\n\tcout << max;\n\tcin >> i;\n\treturn 0;\n}\n\n\n\n\n\n\n\n\n\t\t\t\n\t\t\t\n"} +{"label": "75", "index": "37306", "code": "/*\n * ???: 1000010191_39_8.cpp\n * ??: ???\n * ????: 2011-1-1\n * ??: ?????\n */\n\n\nint main()\n{\n\tint n=0;\n\tchar ch;\n\tint s[2000],e[2000];\n\tint d[1001]={0};\n\t//??\n\tdo\n\t{\n\t\tn++;\n\t\tcin>>s[n];\n\t\tch=cin.get();\n\t} while (ch==',');\n\tfor (int i=1;i<=n;i++)\n\t{\n\t\tcin>>e[i];\n\t\tcin.get();\n\t}\n\t//??\n\tfor (int i=1;i<=n;i++)\n\t\tfor (int j=s[i];jmax) max=d[i];\n\tcout<> x[i];\n\t\tn++;\n\t\tif(cin.get() != ',')\n\t\t\tbreak;\n\t}\n\t\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tcin >> y[i];\n\t\tcin.get();\n\t}\n\n\tcount(n, x, y, a);\n\tcout << n << \" \" << findmax(a);\n\treturn 0;\n}\n\nvoid count(int n, int x[], int y[], int a[])\n{\n\tint i, j;\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tfor(j = x[i]; j < y[i]; j++)\n\t\t\ta[j]++;\n\t}\n}\n\nint findmax(int a[])\n{\n\tint i;\n\tint\tmax = 0;\n\tfor(i = 1; i <= 1000; i++ )\n\t{\n\t\tif(max < a[i])\n\t\t\tmax = a[i];\n\t}\n\n\treturn max;\n\n\n}\n"} +{"label": "75", "index": "37308", "code": "int main()\n{\n\tchar x[5000],y[5000]; //????????????????\n\tchar str_x[5000][4],str_y[5000][4]; \n\tint time_x[5000],time_y[5000];\n\tint num[5000]={0}; \n\t\n\tint k=0,i=0,j=0;\n\tint m,sum=1,max=0;\n\n\tcin.getline(x,5000); //???????????\n\tcin.getline(y,5000);\n\n\tfor(m=0;mmax)\n\t\t\tmax=num[j];\n\tcout<='0'&&s[i]<='9')\n\t\t{\n\t\t\tif(s[i-1]>='0'&&s[i-1]<='9')\n\t\t\t\ta[j]=a[j]*10+s[i]-'0';\n\t\t\telse \n\t\t\t{\t\n\t\t\t\tj++;\n\t\t\t\ta[j]=s[i]-'0';\n\t\t\t}\n\t\t}\t\t\n\treturn(j+1);\n}\nvoid main()\n{\n\tchar a[5050],b[5050];\n\tint x[1010],y[1010],n,i,count[1010]={0};\n\tgets(a);\n\tgets(b);\n\tn=input(a,x);\n\tn=input(b,y);\n\tint p;\n\tfor(p=0;p<1000;p++)\n\t\tfor(i=0;i=x[i]&&pmax)max=count[p];\n\tprintf(\"%d %d\",n,max);\n}\n"} +{"label": "75", "index": "37310", "code": "int main()\n{\n\tint count[100000]={0},a[100000],i,j,p=0,max=0,len1,len2,m=0,n=0;\n\tchar str1[100000],str2[100000],strx[100000],stry[100000];\n\tcin.getline(str1,100000);\n\tcin.getline(str2,100000);\n\tlen1=strlen(str1);\n\tlen2=strlen(str2);\n\tfor(i=0;i='0'&&str1[i]<='9'&&i='0'&&str2[i]<='9'&&imax)\n\t\t\tmax=count[i];\n\t}\n\tcout<

max)max=b[i];\n\t}\nfor(i=min;i<=max;i++)\n\t{\n\t\tfor(j=0;j=a[j]&&is)s=k;\n\t\t\tk=0;\n\t}\t\n\tprintf(\"%d %d\",n,s);\n}\n\n"} +{"label": "75", "index": "37312", "code": "/* Note:Your choice is C IDE */\nvoid main()\n{\n\tchar c;\n int pre[1000][1000],beg[1000],en[1000],pptt[1000],tmax,pmax,p,t,n,sl,i;\n /*????????????*/\n n=1;\n scanf(\"%d,\",&beg[0]);\n do\n {\n \tn++;\n \tscanf(\"%d%c\",&beg[n-1],&c);\n }while(c==44&&n<=1000);\n scanf(\"%d\",&en[0]);\n for(i=1;i<=n-1;i++) scanf(\",%d\",&en[i]);\n tmax=en[0];\n for(i=1;i<=n-1;i++)\n {\n \tif(tmaxj)\n\t\t\t{\n\t\t\t\tt[j]++;\n\t\t\t}\n\t\t}\n\t}\n\n\tint max=0;\n\tfor(j=0;j<=999;j++)\n\t{\n\t\tif(t[j]>max)\n\t\t{\n\t\t\tmax=t[j];\n\t\t}\n\t}\n\t\n\tcout<>start[i];\n char c=cin.get();\n if(c!=',')\n break;\n }\n for(i=0;;i++)\n {\n cin>>end[i];\n char c=cin.get();\n if(c!=',')\n break;\n }\n for(i=0;i<1024;i++)\n time[i]=0;\n for(i=0;i=x[j]&&im) m=a[i-s];\n\t}\n\tprintf(\"%d %d\",k,m);\n\treturn 0;\n}\n"} +{"label": "75", "index": "37316", "code": "int main()\n{\n\tint a[1000] = {0}, b[1000] = {0}; \n\tint i, len1, len2, n, max = 0, sum = 0;\n\tint counts[1000] = {0};\n\tchar c[10000] = {0}, d[10000];\n\tint k;\n\tlen1 = 0;\n\tcin.getline(c, 10000);\n\tfor(i = 0 ; c[i] != '\\0' ; i++)\n\t{\n\t\tif(c[i] > 47 && c[i] < 58)\n\t\t{\n\t\t\ta[len1] = 10 * a[len1] + (c[i] - '0');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlen1++;\n\t\t}\n\t}\n\tlen2 = 0;\n\tcin.getline(d, 10000);\n\tfor(i = 0 ; d[i] != '\\0' ; i++)\n\t{\n\t\tif(d[i] > 47 && d[i] < 58)\n\t\t{\n\t\t\tb[len2] = 10 * b[len2] + (d[i] - '0');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlen2++;\n\t\t}\n\t}\n\tn = len1;\n\tfor(k = 0 ; k <= 1000 ; k++)\n\t{\n\t\tfor(i = 0 ; i <= len1 ; i++)\n\t\t{\n\t\t\tif((k - a[i] >= 0) && (k - b[i]) < 0)\n\t\t\t{\n\t\t\t\tcounts[k] = counts[k] + 1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 0 ; i < 1000 ; i++)\n\t{\n\t\tif(counts[i] >= sum)\n\t\t{\n\t\t\tsum = counts[i];\n\t\t}\n\t}\n\t\tcout << n + 1 << \" \" << sum << endl; \n\treturn 0;\n}\n"} +{"label": "75", "index": "37317", "code": "void main()\n{\n\tint a[2000],b[2000],i,j,n,m,k,p;\n\tscanf(\"%d\",&a[1]);\n\ti=2;\n\twhile(scanf(\",%d\",&a[i]))\n\t\ti++;\n\tscanf(\"%d\",&b[1]);\n\tj=2;\n\twhile(scanf(\",%d\",&b[j]))\n\t\tj++;\n\tj--;\n\tprintf(\"%d \",j);\n\tn=0;\n\tfor(i=1;i<=j;i++)\n\t\tif(b[i]>n)\n\t\t\tn=b[i];\n\tm=0;\n\tfor(i=0;i=a[k]&&im)\n\t\t\tm=p;\n\t}\n\tprintf(\"%d\",m);\n}\n"} +{"label": "75", "index": "37318", "code": "//*********************** \n//?????????? \n//?????? 1300012849 \n//???2013?11?1? \n//*********************** \nint main ()\n{\n int sum = 0; //????????sum \n char c; //??cin.get()??????c \n int i = 0 , j , p;\n int a[1000]; //???????????????????????????? \n while ( cin >> a[i]) //???????????+1?????????? \n {\n sum++;\n c = cin.get();\n if ( c == ',') //????????????????????????? \n i++;\n else //????????\u0093????\u0094????????sum???????? \n break;\n }\n \n int b[sum]; //????sum??????b??????????????? \n for ( i = 0; i <= sum - 1; i++ ) //??????????????b????? \n {\n cin >> b[i];\n cin.get();\n }\n //????i????????????????????a[i-1],b[i-1]\n \n int d[1000]; //??????d?????????????????d[0]??0?????????d[15]??15???????? \n for ( i = 0; i <= 999; i++ ) //??????????????0 \n d[i] = 0;\n \n //?????a[i]?????b[i]????????J??? J >= a[i] ? J < b[i]??????????d[j]++???j?????????+1 \n for ( i = 0; i <= sum - 1; i++ ) \n { \n for ( j = 0; j <= 999; j++ )\n {\n if ( j >= a[i] && j < b[i] )\n d[j]++;\n }\n }\n \n for ( i = 1; i <= 999; i++ ) //??????d??????????????????????d[999]????????????? \n {\n for ( j = 0; j <= 1000 - i; j++ )\n {\n if ( d[j] > d[j+1])\n {\n p = d[j+1];\n d[j+1] = d[j];\n d[j] = p;\n }\n }\n }\n if (d[999] == 248)\n d[999] = 249;\nif (d[999] == 250)\n d[999] = 251;\n\n cout << sum << \" \"<< d[999] << endl;\n}\n"} +{"label": "75", "index": "37319", "code": "int Min(int array[]);\nint Max(int array[]);\nint i,j,MaxTime,MinTime,n=1,arrive[1000],leave[1000];\nint main()\n{\n int k,max=0; //max??????,k ?????????\n char c; //??\n int count[1000]={0}; //arrive??????????????leave??????????\n cin>>arrive[1]; //??????????????\n while((c=getchar())==',') //???????????????????\n {\n cin>>arrive[++n]; \n }\n for(i=1;i<=n;i++)\n count[i]=0; //????0\n cin>>leave[1];\n for(i=2;i<=n;i++)\n {\n cin>>c>>leave[i]; //???????\n }\n for(i=1;i<=n;i++)\n {\n MinTime=Min(arrive); //????????\n }\n for(j=1;j<=n;j++)\n { \n MaxTime=Max(leave); //?????????????\n }\n for(k=MinTime;k<=MaxTime;k++)\n {\n for(i=1;i<=n;i++)\n {\n\t if(k>=arrive[i]&& kmax)\n max=count[i]; //???????\n }\n cout<max)\n max=leave[j];\n }\n MaxTime=max;\n return MaxTime;\n}\n"} +{"label": "75", "index": "37320", "code": "void main()\n{\n\tint m,n,i=0,j=0,s1[1000],s2[1000],t,max,min,max1,a[1000];\n\tchar c;\n\tdo\n\t{\n\t\ti=i+1;\n\t\tscanf(\"%d%c\",&s1[i],&c);\n\t}\n\twhile(c==',');\n\tm=i;\n\tdo\n\t{\n\t\tj=j+1;\n\t\tscanf(\"%d%c\",&s2[j],&c);\n\t}\n\twhile(c==',');\n\tn=j;\n\tmin=s1[i];\n\tfor(i=1;i<=m;i++)\n\t{\n\t\tif(s1[i]max)\n\t\t\tmax=s2[j];\n\t}\n\tfor(t=min;t<=max;t++)\n\t{\n\t\ta[t]=0;\n\t\tfor(i=1;i<=m;i++)\n\t\t{\n\t\t\tif(t>=s1[i]&&tmax1)\n\t\t\tmax1=a[t];\n\t}\n\tprintf(\"%d %d\",m,max1);\n}\n\n\n\n\n\t\t\n"} +{"label": "75", "index": "37321", "code": "/**\n *???6.cpp\n *??????\n *????????\n *???10.12.29\n */\nint main()\n{\n\tint a[1000],b[1000],c[1000]={0}; //a,b,c?????????????????\n\tint i,j,n=0,max=0; \n\tchar s;\n\tfor(n=0;;n++)\n\t{ \n\t\tcin>>a[n]; \n\t\ts=cin.get();\n\t if(s=='\\n')\n\t\t break;\n\t}\n\tfor(n=0;;n++)\n\t{ \n\t\tcin>>b[n]; \n\t\ts=cin.get();\n\t if(s=='\\n')\n\t\t break;\n\t}\n\tfor(i=0;imax)\n\t\t\t\tmax=c[j];\n\t\t}\n\t}\n\tcout<i)\n\t\t c[i]++;\n\t\t }\n\t }\n\t j=0;\n\t for(i=0;i<1000;i++)\n\t {\n\t\t if(c[i]>c[j])\n\t j=i;\n\t }\n //if(c[j]==27)\n//{c[j]=c[j]+1;}\n\t printf(\"%d %d\",n,c[j]);\n return 0;\n}"} +{"label": "75", "index": "37323", "code": "int main()\n{\n\tint i=0,j,total_num=0,num=0,minx,maxy,max_num=0,lenx,leny,mark=0;\n\t\t//i?j??????total_num?????minx???????maxy????????max_num????????\n\tint x[10000],y[10000];//??????\n\tchar strx[10000],stry[10000];//????????\n\tcin.getline(strx,10000);\n\tcin.getline(stry,10000);\n\tlenx=strlen(strx);\n\tleny=strlen(stry);\n\twhile(i<=lenx)\n\t\t//??????????????\n\t{\n\t\tif(strx[i]!=',' && strx[i]!='\\0')\n\t\t\tmark++;\n\t\telse\n\t\t{\n\t\t\tif(mark==1)\n\t\t\t\tx[total_num]=strx[i-1]-'0';\n\t\t\tif(mark==2)\n\t\t\t\tx[total_num]=strx[i-1]-'0'+(strx[i-2]-'0')*10;\n\t\t\tif(mark==3)\n\t\t\t\tx[total_num]=strx[i-1]-'0'+(strx[i-2]-'0')*10+(strx[i-3]-'0')*100;\n\t\t\tmark=0;\n\t\t\ttotal_num++;\n\t\t}\n\t\ti++;\n\t}\n\ttotal_num=0;\n\ti=0;\n\twhile(i<=leny)\n\t\t////??????????????\n\t{\n\t\tif(stry[i]!=',' && stry[i]!='\\0')\n\t\t\tmark++;\n\t\telse\n\t\t{\n\t\t\tif(mark==1)\n\t\t\t\ty[total_num]=stry[i-1]-'0';\n\t\t\tif(mark==2)\n\t\t\t\ty[total_num]=stry[i-1]-'0'+(stry[i-2]-'0')*10;\n\t\t\tif(mark==3)\n\t\t\t\ty[total_num]=stry[i-1]-'0'+(stry[i-2]-'0')*10+(stry[i-3]-'0')*100;\n\t\t\tmark=0;\n\t\t\ttotal_num++;\n\t\t}\n\t\ti++;\n\t}\n\tcout<maxy)\n\t\t\t\tmaxy=y[i];\n\t\t}\n\t}\n\tfor(i=minx;i<=maxy;i++)\n\t\t//??????????????????????\n\t{\n\t\tfor(j=0;j<=total_num;j++)\n\t\t{\n\t\t\tif(x[j]<=i && y[j]>i)\n\t\t\t\tnum++;\n\t\t}\n\t\tif(num>=max_num)\n\t\t{\n\t\t\tmax_num=num;\n\t\t}\n\t\tnum=0;\n\t}\n\tcout<> a[num-1][0]; //????????\n \tch = cin.get();\n\t\tif(ch == '\\n') break; //???????\n\t}\n\tfor(int i = 1; i <= num; i++) \n\t{\n\t\tcin >> a[i-1][1];//??????\n\t\tch = cin.get();\n\t for(int j = a[i-1][0]; j < a[i-1][1];j++) \n\t\t{\n\t\t\tb[j-1] = b[j-1] + 1; //????????????\n\t\t}\n\t}\n\tcout << num << \" \"; //?????\n for(int k = 1; k <= 1010; k++) //????????\n\t\tif(b[k-1] > max)\n\t\t\tmax = b[k-1];\n cout << max; //????????\n\treturn 0;\n}\n\n\n\n"} +{"label": "75", "index": "37325", "code": "int main()\n{\n\tint i,j,num=0,a[1000]={0},b[1000]={0},max[1000]={0};\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tcin>>a[i];\n\t\tnum++; //??\n\t\tif(getchar()=='\\n') //????????????Xi??????\n\t\t\tbreak;\n\t}\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tcin>>b[i];\n\t\tif(getchar()=='\\n') //????\n\t\t\tbreak;\n\t}\n\tfor(i=0;i>x[i++];\n\t\ts=getchar();\n\t\tif(s=='\\n')\n\t\t\tbreak;\n\t}\n\tnum=i;\n\ti=0;\n\twhile(1)\n\t{\n\t\tcin>>y[i++];\n\t\ts=getchar();\n\t\tif(s=='\\n')\n\t\t\tbreak;\n\t}\n\tcout<max)\n\t\t\tmax=time[i];\n\t}\n\tcout<=HalaMadrid[j]&&i+0.5 max )\n\t\t\tmax = in[i];\n\t}\n\n\tprintf(\"%d %d\\n\" , ren , max );\n\n\n\n\n\treturn 0;\n}"} +{"label": "75", "index": "37330", "code": "\nint main()\n{\n\tint myarray[1000]={0};\n\tint people[100000][2]={0};\n\tint size=0;\n\tint num=0;\n\tchar a;\n\twhile(1)\n\t{\n\t\tscanf(\"%d%c\",&people[size++][0],&a);\n\t\tif(a!=',')break;\n\t}\n\tfor(int i=0;inum) num=myarray[i];\n\t}\n\n\tprintf(\"%d %d\\n\",size,num);\n}"} +{"label": "75", "index": "37331", "code": "int main()\n{\nint in[1000],out[1000],flag[1000]={0},t;\nint i,j,k;\nint num=0;\nchar temp;\nfor(i=0;;i++){\n\tcin>>in[i];\n\ttemp=cin.get();\n\tnum++;\n\tif(temp=='\\n')break;\n}\nfor(i=0;;i++){\n\tcin>>out[i];\n\ttemp=cin.get();\n\tif(temp=='\\n')break;\n}\nfor(i=1;i<=999;i++){\n\tfor(j=0;j<=num-1;j++){\n\t\tif(in[j]<=i&&out[j]>i){\n\t\t\tflag[i]=flag[i]+1;\n\t\t}\n\t}\n}\nint tem=0;\nfor(i=1;i<=999;i++){\n\tif(tem<=flag[i]){\n\t\ttem=flag[i];\n\t}\n}\n\tcout<max)\n\t\t\tmax=count[i];\n\tcout< a[k][0])\n\t\t\tmint = a[k][0];\n\t\tif (maxt < a[k][1])\n\t\t\tmaxt = a[k][1];\n\t}\n\tmax=0;\n\tfor (k=mint;k<=maxt;k++)\n\t{\n\t\t\t\n\t\t\tg=0;\n\t\t\tfor (l=0;lk)\n\t\t\t\t\tg++;\n\t\t\t}\n\t\t\tif (max < g)\n\t\t\t\tmax = g;\n\t}\n\tcout << i << \" \"<< max;\n\treturn 0;\n}"} +{"label": "75", "index": "37334", "code": "int main()\n{\n\tint x[1000],y[1000],i=1,j,k,num[1000]={0},max=0;\n\t// x????????y????????ijk??????num???????????????max?????????\n\tcin>>x[0];\n\twhile(cin.peek()!='\\n'){\n\t\tcin.get();//????\n\t\tcin>>x[i++];\n\t}\n\tfor(j=0;j>y[j];\n\t}\n\t for(j=0;jmax)max=num[j];\n\tcout<=a[s]&&m> x[0];\n\tch = cin.get();\n\twhile (ch == ',')\n\t{\n\t\tcin >> x[i];\n\t\ti++;\n\t\tch = cin.get();\n\t}\n\t\n\n\tcin >> y[0];\n\tch = cin.get();\n\twhile (ch == ',')\n\t{\n\t\tcin >> y[j];\n\t\tj++;\n\t\tch = cin.get();\n\t}\n\tn = i;\n\tfor (k = 0; k < n; k++)\n\t{\n\t\tfor (m = x[k]; m < y[k]; m++)\n\t\t{\n\t\t\tflag[m]++;\n\t\t}\n\t}\n\tfor (p = 0; p < 1000; p++)\n\t{\n\t\tif (flag[p] > max)\n\t\t\tmax = flag[p];\n\t}\n\tcout << n << \" \" << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37337", "code": "\n\nint main()\n{\n int x[1000] = {0}, y[1000] = {0};\n int i, j, mm, k, m;\n int num[1000] = {0};\n char ch;\n cin >> x[0] >> ch;\n i = 0;\n while(ch == ',')\n {\n i ++;\n cin >> x[i];\n ch = cin.get();\n }\n cin >> y[0] >> ch;\n j = 0;\n while(ch == ',')\n {\n j ++;\n cin >> y[j];\n ch = cin.get();\n }\n for(k = 0; k <= i; k++)\n {\n for(m = x[k]; m < y[k]; m++)\n num[m] ++;\n }\n mm = 0;\n for(k = 0; k < 1000; k++)\n {\n if(num[k] > mm)\n mm = num[k];\n }\n cout << i+1 << \" \" << mm << endl;\n\n return 0;\n}\n"} +{"label": "75", "index": "37338", "code": "void main()\n{int n=0,s1[1001],s2[1001],i=1,j,k=0,f[1006]={0};char c;\nwhile(1){scanf(\"%d\",&s1[i]);i++;if((c=getchar())=='\\n')break;}n=i-1;i=0;\nwhile(1){i++;if(i>n)break;scanf(\"%d\",&s2[i]);c=getchar();}\nfor(i=1;i<=n;i++){for(j=s1[i];jf[i])?k:f[i];\nprintf(\"%d %d\\n\",n,k);\n}"} +{"label": "75", "index": "37339", "code": "int main(void)\n{\n int x[1000] = {0}, y[1000] = {0}, a[1000] = {0}, num = 0, i = 0, j;\n char ch = ','; \n while( ch == ',' )\n {\n cin >> x[i]; //??????????????????x[i]\n ch = getchar(); //?????????????????????????????????\n i++; //i??1??????????????????\n }\n cout << i << \" \"; //?????????????i??????\n i = 0; //i???\n ch = ','; //ch???\n while( ch == ',' ) //?????????????\n {\n cin >> y[i];\n ch = getchar();\n i++;\n }\n for( i = 0 ; i < 1000 ; i++ ) //??????????\n for( j = x[i] ; j < y[i] ; j++ ) \n a[j] = a[j] + 1; //a[i]??i???????????????????????????????+1\n for( i = 0 ; i < 1000 ; i++ )\n if( a[i] > num )\n num = a[i]; //???????????a[i]\n cout << num;\n return 0;\n}\n"} +{"label": "75", "index": "37340", "code": "int main()\n{\n\tchar a[5200]={'\\0'},b[5200]={'\\0'};\n\tint i,k=0,j=0,t,sum=0,e=0,max=0;\n\tint x[1100]={0},y[1100]={0};\n\tint z[1100]={0};\n\tgets(a);\n\tgets(b);\n\tfor(i=0;a[i]!='\\0';i++)\n\t{\n\t\tif('0'<=a[i] && a[i]<='9')\n\t\t{\n\t\t\tt=a[i]-'0';\n\t\t\tsum=sum*10+t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tx[e]=sum;\n\t\t\te++;\n\t\t\tsum=0;\n\t\t}\n\t}\n\tx[e]=sum;\n\tsum=0;\n\te=0;\n\tfor(i=0;b[i]!='\\0';i++)\n\t{\n\t\tif('0'<=b[i] && b[i]<='9')\n\t\t{\n\t\t\tt=b[i]-'0';\n\t\t\tsum=sum*10+t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty[e]=sum;\n\t\t\te++;\n\t\t\tsum=0;\n\t\t}\n\t}\n\ty[e]=sum;\n\te++;\n\tsum=0;\n\tfor(i=0;i<=1000;i++)\n\t{\n\t\tsum=0;\n\t\tfor(j=0;j> x[ i ] ;\n\n\t\tcin.get( non , 1 ) ;\n\n\t\tif( non[ 0 ] == '\\n' )\n\t\t\tbreak ;\n\t}**/\n\n\tcin.getline( str , 9999 ) ;\n\n\tlen = strlen( str ) ;\n\n\tfor( i = 0 ; i <= len ; i ++ )\n\t\tif( str[ i ] == ',' || str[ i ] == '\\0' )\n\t\t{\n\t\t\tnon[ j ] = i ;\n\n\t\t\tj ++ ;\n\t\t}\n\n\tn = j - 1 ;\n\n\tfor( j = 0 ; j < non[ 1 ] ; j ++ )\n\t\tx[ 1 ] = 10 * x[ 1 ] + str[ j ] - '0' ;\n\n\tfor( i = 2 ; i <= n ; i ++ )\n\t\tfor( j = non[ i - 1 ] + 1 ; j < non[ i ] ; j ++ )\n\t\t\tx[ i ] = 10 * x[ i ] + str[ j ] - '0' ;\n\n\tfor( i = 1 ; i <= n ; i ++ )\n\t{\n\t\tcin >> y[ i ] ;\n\n\t\tcin.get() ;\n\t}\n\n\tmin = x[ 1 ] , max = y[ 1 ] ;\n\n\tfor( i = 1 ; i <= n ; i ++ )\n\t{\n\t\tif( min > x[ i ] )\n\t\t\tmin = x[ i ] ;\n\n\t\tif( max < y[ i ] )\n\t\t\tmax = y[ i ] ;\n\t}\n\n\tfor( i = min ; i <= max ; i ++ )\n\t\tfor( j = 1 ; j <= n ; j ++ )\n\t\t\tif( x[ j ] <= i && y[ j ] >= i + 1 )\n\t\t\t\tp[ i ] ++ ;\n\n\tmax_p = p[ min ] ;\n\n\tfor( i = min + 1 ; i <= max ; i ++ )\n\t\tif( max_p < p[ i ] )\n\t\t\tmax_p = p[ i ] ;\n\t\t\n\tcout << n << ' ' << max_p ;\n\n\treturn 0 ;\n}"} +{"label": "75", "index": "37342", "code": "int main()\n{\n int RS[1001]={0};\n int n=0,i=0;\n int X[1010],Y[1010];\n while(1)\n {\n cin>>X[i];\n i++;\n if(cin.get()!=',')\n {\n n=i;\n break;\n }\n }\n char comma;\n for(int i=0; i>Y[i]>>comma;\n cin>>Y[n-1];\n for(i=0; i=RS[0])\n RS[0]=RS[j];\n cout<max)\n\t\t\tmax=time[j];\n\t}\n\tcout<> a[i];\n\t\td = cin.get();\n\t\tif (d =='\\n')\n\t\t\tbreak;\n\t}//???????????','????????????????\n\tfor ( j = 0; j <= i; j++)\n\t{\t\n\t\tcin >> b[j];\n\t\td = cin.get();\n\t}//??????????','\n\tfor ( n = 0; n <= i;n++)\n\t\tfor (j = a[n];j < b[n]; j++)\n\t\t\tc[j]++;//??????????????\n\tfor ( j = 0; j < 1000; j++)\n\t{\n\t\tif (c[j] > max)\n\t\t\tmax = c[j];\n\t}//??????\n\tcout << i + 1 << \" \" << max << endl;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37345", "code": "main()\n{\n\tchar a1[10000],a2[10000];\n\tint b[1000]={0},c[1000]={0};\n\tint i,j=0,k=0,l,r1,r2,m,n,p;\n\tgets(a1);\n\tgets(a2);\n\tr1=strlen(a1);\n\tr2=strlen(a2);\n\tfor (i=0;il) l=c[j];\n\t\t\tj++;\n\t\t}\n\t}\n\tprintf(\"%d \",j+1);\n\tfor (i=1;ii) n++;\n\t\t}\n\t\tif (i==1) p=n;\n\t\telse if (n>p) p=n;\n\t}\n\tprintf(\"%d\",p);\n}"} +{"label": "75", "index": "37346", "code": "int main()\n{\n\tint tim[1000], i, j, num, mac = 0;\n\tint star[1000],end[1000];\n\tfor(i = 0; i < 1000; i++)\n\t\ttim[i] = 0;\n\tcin >> star[0];\n\ti = 1;\n\twhile(cin.get() != '\\n')\n\t\tcin >> star[i++];\n\tnum = i; \n\tcin >> end[0];\n\tfor(i = 1; i < num; i++)\n\t{\n\t\tcin.get();\n\t\tcin >> end[i];\n\t}\n\tfor(i = 0; i < num; i++)\n\t\tfor(j = star[i]; j < end[i]; j++)\n\t\t\ttim[j]++;\n\tfor(i = 0; i < 1000; i++)\n\t\tmac = mac > tim[i] ? mac : tim[i];\n\tcout << num << \" \"<< mac << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37347", "code": "int main()\n{\n int come[10000],go[10000],i=0,j=0;\n int num[1100]={0};\n char s;\n while(1)\n {\n s=getchar();\n if(s==',')\n {\n come[i]=j;\n i++;\n j=0;\n }\n else if(s=='\\n')\n {\n come[i]=j;\n i++;\n j=0;\n break;\n }\n else\n j=j*10+s-'0';\n }\n i=0,j=0;\n while(1)\n {\n s=getchar();\n if(s==',')\n {\n go[i]=j;\n i++;\n j=0;\n }\n else if(s=='\\n')\n {\n go[i]=j;\n i++;\n j=0;\n break;\n }\n else\n j=j*10+s-'0';\n }\n int n=i;\n printf(\"%d \",n);\n for(i=0;i<=1000;i++)\n {\n for(j=0;j=come[j]&&imax)\n max=num[i];\n printf(\"%d\\n\",max);\n getchar();\n getchar();\n}\n"} +{"label": "75", "index": "37348", "code": "int main()\n{\n\tchar c;\n\tint a[1000]={0},b[1000]={0},d[1000]={0},i=0,j,n=0,t=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c==',') i++;\n\t\telse\n\t\t{\n\t\t\ta[i]*=10;\n\t\t\ta[i]+=(c-'0');\n\t\t}\n\t}\n\tn=i+1;\n\ti=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c==',') i++;\n\t\telse\n\t\t{\n\t\t\tb[i]*=10;\n\t\t\tb[i]+=(c-'0');\n\t\t}\n\t}\n\tfor(i=0;it)\n\t\t\tt=b[i];\n\tj=0;\n\tfor(i=0;ij)\n\t\t\tj=d[i];\n\tprintf(\"%d %d\",n,j);\n\treturn 0;\n}"} +{"label": "75", "index": "37349", "code": "int main()\n{\n\tint tmax=0;\n\tint a[3][1001];\n\tcin>>a[1][1];\n\tint tmin=a[1][1];\n\tint sum=1;\n\twhile(cin.get()==',')\n\t{\n\t\tcin>>a[1][sum+1];\n\t\tif(a[1][sum+1]>a[2][i];\n\t\tif(a[2][i]>tmax)\n\t\t\ttmax=a[2][i];\n\t\tgetchar();\n\t}\n\tcin>>a[2][sum];\n\tif(a[2][sum]>tmax)\n\t\ttmax=a[2][sum];\n\tcout<=a[1][i]&&t>in[i];\n\t\ta = cin.get();\n\t\tif(a != 44)\n\t\t\tbreak;\n\t}\n\tfor(i = 0;;i++)\n\t{\n\t\tchar b;\n\t\tcin>>out[i];\n\t\tb = cin.get();\n\t\tif(b != 44)\n\t\t\tbreak;\n\t}\n\tn = i + 1;\n\tfor(i = 0;i <= 1000;i++)\n\t{\n\t\tfor(int j = in[i]; j < out[i]; j++)\n\t\t\t{\n\t\t\t\ttime[j]++;\n\t\t}\n\t}\nfor(int j = 0; j <= 1000 ; j++) \n\t\tfor(int h = 0; h <=1000; h++)\n\t\t\t{\n\t\t\t\tif(time[h] < time[h+1])\n\t\t\t\t{\n\t\t\t\t\tint temp = time[h];\n\t\t\t\t\ttime[h] = time[h+1];\n\t\t\t\t\ttime[h+1] = temp;\n\t\t\t\t}\n\t\t}\n\t\ta = time[0];\n\tcout<> ch;\n\tfor (j = 0; ch[j] != '\\0'; j++)\n\t{\n\t\tif (ch[j] == ',')\n\t\t{\n\t\t\tnum[i] = j;\n\t\t\ti++;\n\t\t}\n\t}\n\tx[1] = ch[0] - 48;\n\tfor (j = 1; j < num[1]; j++)\n\t{\n\t\tx[1] = 10 * x[1] + ch[j] - 48;\n\t}\n\tfor (j = 2; j <= i; j++)\n\t{\n\t\tx[j] = ch[num[j - 1] + 1] - 48;\n\t\tif (j == i)\n\t\t{\n\t\t\tfor (k = num[i - 1] + 2; ch[k] != '\\0'; k++)\n\t\t\t{\n\t\t\t\tx[i] = 10 * x[i] + ch[k] - 48; \n\t\t\t}\n\t\t}\n\t\tfor (k = num[j - 1] + 2; k < num[j]; k++)\n\t\t{\n\t\t\tx[j] = 10 * x[j] + ch[k] - 48;\n\t\t}\n\t}\n\tcin >> y[1];\n\tfor (j = x[1]; j < y[1]; j++)\n\t{\n\t\tcount[j]++;\n\t}\n\tfor (j = 2; j <= i; j++)\n\t{\n\t\tcin >> t >> y[j];\n\t\tfor (k = x[j]; k < y[j]; k++)\n\t\t{\n\t\t\tcount[k]++;\n\t\t}\n\t}\n\tfor (j = 1; j < 1000; j++)\n\t{\n\t\tif (count[j] > most)\n\t\t{\n\t\t\tmost = count[j];\n\t\t}\n\t}\n\tcout << i << \" \" << most << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37352", "code": "int main()\n{\n\tint a[1000],b[1000],n,i,j;char c;\n\ti=0;\n\twhile(i<1001)\n\t{\n\t\tscanf(\"%d%c\",&a[i],&c);\n\t\ti++;\n\t\tif(c=='\\n')\n\t\t{\n\t\t\tn=i;break;\n\t\t}\n\t}\n\tfor(i=0;ii)\n\t\t\t{\n\t\t\t\tt++;\n\t\t\t}\n\t\t}\n\t\tif(t>m)\n\t\t{\n\t\t\tm=t;\n\t\t}\n\t\tt=0;\n\t}\n\tprintf(\"%d\",m);\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37353", "code": "int main()\n{\n int i,j,n,max=0,a[2000],b[2000];\n for(i=1; ;i++)\n {\n cin>>a[i];\n if(cin.get()=='\\n') break;\n }\n for(j=1;j<=i;j++)\n {\n cin>>b[j];\n cin.get();\n }\n n=i;\n for(i=0;i<=999;i++)\n {\n int s=0;\n for(j=1;j<=n;j++)\n {\n if(a[j]<=i&&imax)\n max=s;\n }\n cout<> x[i];\n\t\ti++;\n\t}while((ch = cin.get()) == ',');\n\tdo\n\t{\n\t cin >> y[j];\n\t\tj++;\n\t}while((ch = cin.get()) == ',');\n for(k = 0; k < i; k++)\n\t{ \n\t\tfor(u = x[k]; u < y[k]; u++)\n\t\t a[u]++;\n\t}\n\tfor(l = 0; l < 1001; l++)\n\t{\n\t if(a[l] > max)\n\t\t\tmax = a[l];\n\t}\n\tcout << i << \" \" << max << endl;\n\t return 0;\n}\n"} +{"label": "75", "index": "37355", "code": "//**************************\n//*???????? **\n//*?????? 1300012863 **\n//*???2013.11.1 **\n//**************************\nint main() \n{ \n\tint x[1005],y[1005],c[1005],d[1005]; //???????x??????y?????\n\tchar ch;\n\tint i,p,n,a;\n\tfor(i=1; ;i++) //?????????\n\t{\n\t\tcin>>x[i];\n\t\tch=cin.get();\n\t\tc[i]=x[i];\n\t\tif(ch!= ',')\n\t\t{break;}\n\t}\n\tfor(a=1; ;a++) //?????????\n\t{\n\t\tcin>>y[a];\n\t\tch=cin.get();\n\t\td[a]=y[a];\n\t\tif(ch!= ',')\n\t\t{break;}\n\t}\n\t\tfor(int m=1;m<=i-1;m++) //??????????????? \n\t\t{\n\t\t\tif(x[m]y[m+1])\n\t\t\t{\n\t\t\t\tp = y[m];\n\t\t\t\ty[m] = y[m+1];\n\t\t\t\ty[m+1] = p;\n\t\t\t}\n\t\t}\n\t\tfor(int m=1;m<=i-2;m++) //????????????????\n\t\t{\n\t\t\tif(y[m]>y[m+1])\n\t\t\t{\n\t\t\t\tp = y[m];\n\t\t\t\ty[m] = y[m+1];\n\t\t\t\ty[m+1] = p;\n\t\t\t}\n\t\t}\n\tint h[1005];\n\tfor(int k=x[i];k<=y[i-1];k++) //?????????????,???????h?\n\t{\n\t\tn = 0;\n\t\tfor(int p=1;p<=i;p++)\n\t\t{\n\t\t\tif((c[p]<=k)&&(kh[j+1])\n\t\t\t{\n\t\t\t\tp = h[j];\n\t\t\t\th[j] = h[j+1];\n\t\t\t\th[j+1] = p;\n\t\t\t}\n\t}\n cout<> x[k][0];\n\t\twhile ((y[k][i] = cin.get()) == ',')\n\t\t{\n\t\t\ti ++;\n\t\t\tcin >> x[k][i];\n\t\t}\n\t}\n\n\tfor(k = 0; k < 1000; k ++)\n\t{\n\t\tfor (j = 0; j < i + 1; j ++)\n\t\t\tif(k >= x[0][j] && k < x[1][j])\n\t\t\t\tcount[k] ++;\n\n\t\tif (count[k] > max)\n\t\t\tmax = count[k];\n\t} \n\tcout << i + 1 << \" \" << max << endl;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37357", "code": "int main()\n{\n\tint intime[9999],outtime[9999],count=0,sum[1000]={0};\n\t//intime???????outtime???????count?????sum?????????\n\tchar temp;\n\tint i=0,j=0,max=0;//????i,j?max?????\n\n\twhile (1) //?????\n\t{\n\t\tcin>>intime[count];\n\t\tcin.get(temp);\n\t\tif (temp!='\\n') count++;\n\t\telse { count++; break;}\n\t}\n\tcount=0;\n\twhile (1) //?????\n\t{\n\t\tcin>>outtime[count];\n\t\tcin.get(temp);\n\t\tif (temp!='\\n') count++;\n\t\telse { count++; break;}\n\t}\n\n\tfor (i=0;imax) max=sum[i];\n\t}\n\n\tcout<i) a[i]++;\n} for(i=0;i<1000;i++)\n{ if(m> a[i++];\n\t\tch = cin.get();\n\t}\n\tcout << i << ' ';\n\twhile (j < i)\n\t{\n\t\tcin >> k;\n\t\tch = cin.get();\n\t\tfor (l = a[j]; l < k; l++)\n\t\t\tb[l]++;\n\t\tj++;\n\t}\n\tk = 0;\n\tfor (i = 0; i < 1000; i++)\n\t\tk = (k > b[i]) ? k : b[i];\n\tcout << k;\n\tch = cin.get();\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37360", "code": "int main()\n{\n\tint qiumax(int s[1005],int n);\n\tint a[1005]={0},b[1005]={0},i=0;\n\tchar c;\n\tdo\n\t{\n\t\ti++;\n\t\tscanf(\"%d\",&a[i]);\n\t\tc=getchar();\n\t}\n\twhile(c!='\\n');\n\tint num=i;\n\tfor(i=1;i<=num;i++)\n\t{scanf(\"%d\",&b[i]);c=getchar();}\n\tint cnt[1002]={0},j,maxb=qiumax(b,num);\n\tfor(i=1;i<=num;i++)\n\t{\n\t\tfor(j=a[i];jmax)\n\t\t\tmax=s[i];\n\t}\n\treturn max;\n}\n\n\n"} +{"label": "75", "index": "37361", "code": "int main()\n{\n\tint a[2][1000]={0},i,j=0,k,n,p=0,max=0;\n\tchar q;\n\tfor(i=0;i<2;i++)\n\t{\n\t\tj=0;\n\t\tdo\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tj++;\n\t\t}\n\t\twhile((q=cin.get())!='\\n');\t\n\t}\n for(k=0;k<=1000;k++)\n\t{\n\t\tfor(n=0;nk)\n\t\t\t\tp=p+1;\n\t\t}\n\t\tif(p>max)max=p;\n\t\tp=0;\n\t}\n\tcout<=a[j]&&imax)\n\t\t\tmax=c[i];\n\tprintf(\"%d %d\",count,max);\n}\n\n"} +{"label": "75", "index": "37363", "code": "/*\n * qimofuxi8.cpp\n *\n * Created on: 2010-12-22\n * Author: l\n */\nint main(){\n\tchar a1[10000],a2[10000];\n\tcin.getline(a1,10000);\n\tcin.getline(a2,10000);\n\tint l1,l2,i,j,n=0;\n\tl1=strlen(a1);\n\tl2=strlen(a2);//?????????????\n\tfor(i=0;it))\n\t\t\t\tk=k+1;\n\tif(k>max)\n\t\tmax=k;//???????\n\t}\n\tcout<> come[i];\n\n\t\tch = cin.get();\n\n\t\tif ( ch == '\\n' )\n\n\t\t\tbreak;\n\n\t\tnum++;\n\t}\n\tfor ( int i = 0; i < num; i++ )\n\t{\n\t\tcin >> leave;\n\n\t\tch = cin.get();\n\n\t\tfor ( int j = come[i]; j < leave; j++ )\n\n\t\t\tc[j]++;\n\t}\n\tmax = c[0];\n\n\tfor ( int i = 0; i < 1003; i++ )\n\n\t\tif ( max < c[i] )\n\n\t\t\tmax = c[i];\n\n\tcout << num << \" \" << max << endl;\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37365", "code": "/**\n * @file 5.cpp\n * @author ???\n * @date 2013-10-30\n * @description\n * ????????????\n */\n\n\n\nint main()\n{\n\tint a[1000], b[1000], t[1000] = {0}, k = 1, c = 0; // ??a?b??????????t????????????\n\n\tcin >> a[0];\n\t\n\twhile (cin.get() == ',') // ??????????????????i??????\n\t{\n\t\tcin >> a[k];\n\t\t++k;\n\t}\n\n\tcout << k; // ?????????\n\n\tcin >> b[0];\n\n\tk = 1;\n\n\twhile (cin.get() == ',') // ???i??????\n\t{\n\t\tcin >> b[k];\n\t\t++k;\n\t}\n\n\tfor (int i = 0; i < k; ++i) // ????????????\n\t{\n\t\tfor (int j = a[i]; j < b[i]; ++j)\n\t\t\t++t[j];\n\t}\n\n\tfor (int n = 1; n < 1000; ++n) // ????????????\n\t{\n\t\tif (t[n] > t[c]) c = n;\t\t\n\t}\n\n\tcout << \" \" << t[c];\n\n\treturn 0;\n}"} +{"label": "75", "index": "37366", "code": "int main()\n{\n\tchar str1[10000],str2[10000],temp[5];\n\tint le1,le2,k=0,i,m,a[10000],b[10000],c[10000]={0},j,max;\n\tcin>>str1;\n\tcin>>str2;\n\tle1=strlen(str1);\n\tle2=strlen(str2);\n\tfor(i=0;i<=le1-1;i++)\n\t{\n\t\tif((str1[i-1]==','&&i-1>=0)||(i==0))\n\t\t{\n\t\t for(j=0;j<=4;j++)\n\t\t {\n\t\t\t if(str1[j+i]!=',')\n\t\t\t\t temp[j]=str1[j+i];\n\t\t\t if(str1[j+i]==',')\n\t\t\t\t break;\n\t\t }\n\t\t temp[j]='\\0';\n\t\t a[k]=temp[0]-'0';\n\t\t for(m=1;m=0)||(i==0))\n\t\t{\n\t\t\tfor(j=0;j<=4;j++)\n\t\t\t{\n\t\t\t\tif(str2[j+i]!=',')\n\t\t\t\t\ttemp[j]=str2[j+i];\n\t\t\t\tif(str2[j+i]==',')\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttemp[j]='\\0';\n\t\t\tb[k]=temp[0]-'0';\n\t\t\tfor(m=1;mi)\n\t\t\t\tt[i]++;\n\t}\n\tint max=t[0];\n\tfor(i=0;i<1002;i++)\n\t{\n\t\tif(t[i]>max)\n\t\t\tmax=t[i];\n\t}\n\tprintf(\"%d %d\",l,max);\n}"} +{"label": "75", "index": "37368", "code": "int main()\n{\n\tint a[1001][2],i,j,count,n,num=0;\n\tchar c=',';\n\tfor(i=1;c==',';i++)\n\t\tcin>>a[i][0]>>c;\n\tn=i-1;\n\ta[1][1]=c-'0';\n\tcin>>c;\n\twhile (c!=',')\n\t{\n\t\ta[1][1]=a[1][1]*10+c-'0';\n\t\tcin>>c;\n\t}\n\tfor(i=2;i<=n-1;i++)\n\t\tcin>>a[i][1]>>c;\n\tcin>>a[n][1];\n\t\n\tint min, max;\n\tmin=a[1][0];\n\tmax=a[1][1];\n\tfor(i=2;i<=n;i++)\n\t{\n\t\tif(a[i][0]max)\n\t\t\tmax=a[i][1];\n\t}\n\tfor(i=min; i<=max-1;i++)\n\t{\n\t\tcount=0;\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(i>=a[j][0]&&inum)\n\t\t\tnum=count;\n\t}\n\n\tcout <> x[i];\n\t\tch = cin.get();\n\t\tnum++;\n\t\tif(ch != ',')\n\t\t\tbreak;\n\t}while(1);\n\ti = 0;\n\tdo\n\t{\n\t\ti++;\n\t\tcin >> y[i];\n\t\tch = cin.get();\n\t\tif(ch != ',')\n\t\t\tbreak;\n\t}while(1);\n\tfor (int k = 1; k <= num; k++)\n\t{\n\t\tfor (int j = x[k]; j < y[k]; j++)\n\t\t{\n\t\t\ttime[j]++;\n\t\t}\n\t}\n\tfor (int k = 0; k < 1000; k++)\n\t{\n\t\tif (maxpeople < time[k])\n\t\t\tmaxpeople = time[k];\n\t}\n\tcout << num << \" \" << maxpeople << endl;\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37370", "code": "void main()\n{\n\tint i=0,j=0,x[1000]={0},y[1000]={0},n=0,k,min=1000,max=0,m=0,l;\n\tchar a;\n\twhile(1)\n\t{\n\t\tscanf(\"%d\",&x[i]);\n\t\ti++;\n\t\ta=getchar();\n\t\tif(a=='\\n')\n\t\t\tbreak;\n\t}\n\n\twhile(1)\n\t{\n\t\tscanf(\"%d\",&y[j]);\n\t\tj++;\n\t\ta=getchar();\n\t\tif(a=='\\n')\n\t\t\tbreak;\n\t}\n\tfor(k=0;kmax)\n\t\t\tmax=y[k];\n\tfor(k=min;kk)\n\t\t\t\tn++;\n\t\t}\n\t\tif(n>m)\n\t\t\tm=n;\n\t}\n\tprintf(\"%d %d\",i,m);\n\n\n}\n"} +{"label": "75", "index": "37371", "code": "int main()\n{\n\tint n[1000][2],i=0,j=0,count=0,m[1000]={0},max=0,flag=0,t=0;\n\tdo\n\t{\n\t\tcin>>n[i][0];\n\t\tm[n[i][0]]++;\n\t\ti++;\n\t\tcount++;\n\t}\n\twhile(cin.get()==',');\n\ti=0;\n\tdo\n\t{\n\t\tcin>>n[i][1];\n\t\tm[n[i][1]]=m[n[i][1]]-1;\n\t\ti++;\n\t}\n\twhile(cin.get()==',');\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tif(m[i]!=0)\n\t\t{\n\t\t\tif(flag==0)\n\t\t\t{\n\t\t\t\tt=m[i];\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm[i]+=t;\n\t\t\t\tt=m[i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tcontinue;\n\t\tif(maxm)m=a[i];\n\t printf(\"%d %d\",n,m);\n}\n\n"} +{"label": "75", "index": "37373", "code": "int main()\n{\n\tchar a;\n\tint x[1000], y[1000], hour[1000] = {0}, peo = 0, temp;\n\n\tfor (int i = 0; i < 1000; i++)\n\t{\n\t\tcin >> x[i];\n\t\tcin.get(a);\n\t peo++;\n\t\tif (a == '\\n') break;\n\t}\n\tfor (int j = 0; j <= peo; j++)\n\t{\n\t\tcin >> y[j];\n\t\tcin.get(a);\n\t\tif (a == '\\n') break;\n\t}\n\tfor (int k = 0; k < peo; k++)\n\t{\n\t\tfor (int p = x[k]; p < y[k]; p++)\n\t\t{\n\t\t\thour[p]++;\n\t\t}\n\t}\n\tfor (int m = 0; m < 1000; m++)\n\t{\n\n\t\tif (hour[m] > hour[m + 1])\n\t\t{\n\t\t\ttemp = hour[m + 1];\n\t\t\thour[m + 1] = hour[m];\n\t\t\thour[m] = temp;\n\t\t}\n\t}\n\n\tcout << peo << ' ' << hour[999];\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37374", "code": "int a[1000]={0},b[1000]={0};\nint zhuan1(char c[])\n{\n\tint i,j=0;\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\tfor(i=0;i=a[j]&&i+1<=b[j])\n\t\t\t\tg[i]=g[i]+1;\n\tfor(i=0;igmax)\n\t\t\tgmax=g[i];\n\tprintf(\"%d %d\",n,gmax);\n\n\n}"} +{"label": "75", "index": "37375", "code": "//*************************************************\n//***????????***\n//***??????***\n//***???2012.11.10***\n//*************************************************\nint main ()\n{\n\tint i,j,k,p,max = 0,x[1000],y[1000];\n\tchar a;\n\ti = 0;\n\tcin >> x[0];\n\twhile (1)\n\t{\n\t\ta = cin.get();\n\t\tif (a == '\\n') break;\n\t\tcin >> x[++i];\n\t}\n\ti = 0;\n\tcin >> y[0];\n\twhile (1)\n\t{\n\t\ta = cin.get();\n\t\tif (a == '\\n') break;\n\t\tcin >> y[++i];\n\t}\n\tfor(k = 0; k < 1000; k++)\n\t{\n\t\tp = 0;\n\t\tfor (j = 0; j <= i; j++)\n\t\t{\n\t\t\tif (x[j] <= k && y[j] > k)\n\t\t\t\tp++;\n\t\t}\n\t\tif (p > max)\n\t\t\tmax = p;\n\t}\n\tcout << i + 1 << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37376", "code": "int main()\n{\n\tint max = 0, n = 0, x[1000], y[1000], s[1000] = {0}, i = 0, j;\n\tchar c;\n\twhile(cin >> x[n])\n\t{\n\t\tcin.get(c);\n\t\tn++;\n\t\tif(c != ',')\n\t\t\tbreak;\n\t}\n\tcin >> y[0];\n\tfor(i = 1; i < n; i++)\n\t{\n\t\tcin >> c;\n\t\tcin >> y[i];\n\t}\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tfor(j = x[i]; j < y[i]; j++)\n\t\t\ts[j]++;\n\t}\n\tfor(i = 0; i < 1000; i++)\n\t\tif(max < s[i])\n\t\t\tmax = s[i];\n\tcout << n <<\" \" << max << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37377", "code": "struct p{\n\tint in;\n\tint out;\n}a[1000];\n\nvoid main()\n{\n\tint i,n,j,max;\n\tint t[1000]={0};\n\tscanf(\"%d\",&a[0].in);\n\ti=1;\n\twhile(scanf(\",%d\",&a[i++].in)==1);\n\tscanf(\"%d\",&a[0].out);\n\ti=1;\n\twhile(scanf(\",%d\",&a[i++].out)==1);\n\tn=i-1;\n\n\tfor(j=0;j<999;j++){\n\t\tfor(i=0;i=j+1)\n\t\t\t\tt[j]++;\n\t\t}\n\t}\n\t//max//\n\tfor(j=0;j<999;j++){\n\t\tif(j==0)\n\t\t\tmax=t[j];\n\t\telse if(t[j]>max)\n\t\t\tmax=t[j];\n\t}\n\t//print//\n\tprintf(\"%d %d\\n\",n,max);\n}"} +{"label": "75", "index": "37378", "code": "\nint t[1005];\nint in[1000];\nint out[1000];\nvoid main()\n{\n\tchar buf[4000], *p;\n\tint count;\n\tint i,j;\n\tint max=0;\n\n\tmemset(t, 0, sizeof(t));\n\n\tfgets(buf, sizeof(buf), stdin);\n\ti=0;\n\tp = strtok(buf, \",\");\n\tfor (; p; p=strtok(NULL, \",\"))\n\t{\n\t\tin[i++] = atoi(p);\n\t}\n\tcount = i;\n\n\tfgets(buf, sizeof(buf), stdin);\n\ti=0;\n\tp = strtok(buf, \",\");\n\tfor (; p; p=strtok(NULL, \",\"))\n\t{\n\t\tout[i++] = atoi(p);\n\t}\n\n\tfor (i=0; i> a[i];\n\t\ti++;\n\t} while (cin.get() != '\\n');\n\tcount = i;\n\ti = 0;\n\tdo\n\t{\n\t\tcin >> b[i];\n\t\ti++;\n\t\tcin.get();\n\t} while (i < count);\n\tfor (i = 0; i < count; i++)\n\t\tfor (j = a[i]; j < b[i]; j++)\n\t\t\tt[j]++;\n\tfor (i = 0; i < 1000; i++)\n\t\tif (t[i] > maxNum)\n\t\t\tmaxNum = t[i];\n\tcout << count << \" \" << maxNum;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37380", "code": "//?????\n//??????\n//???2010.11.27\n\nint main()\n{\n\tint i = 0;\n\tdouble j = 0.0;\n\tchar a[10000]; //???a,b?????????\",\"\n\tchar b[10000];\n\tint begin[10000]; //?????????????begin,end?\n\tint end[10000];\n\tint p = 0;\n\tint q = 0;\n\tint last_time = 0; //??last_time?????????\n\tint max = 0; //??max????????????\n\tint count = 0;\n\tint flag = 0;\n\n\tmemset(a,0,sizeof(a)); //????\n\tmemset(b,0,sizeof(b));\n\tmemset(begin,0,sizeof(begin));\n\tmemset(end,0,sizeof(end));\n\n\tcin.getline(a,10000);\n\tcin.getline(b,10000);\n\n\n\n\tfor (i = 0; i <= 10000; i ++) //????????\n\t{\n\t\tif ((a[i] != ',') && (a[i] != '\\0'))\n\t\t\tflag ++;\n\t\tif ((a[i] == ',') || (a[i] == '\\0'))\n\t\t{\n\t\t\tif (flag == 3) //???????????begin[i]???\n\t\t\t\tbegin[p ++] = a[i - 1] - '0' + 10 * (a[i - 2] - '0')\n\t\t\t\t+ 100 * (a[i - 3] - '0');\n\t\t\tif (flag == 2)\n\t\t\t\tbegin[p ++] = a[i - 1] - '0' + 10 * (a[i - 2] - '0');\n\t\t\tif (flag == 1)\n\t\t\t\tbegin[p ++] = a[i - 1] - '0';\n\t\t\tflag = 0;\n\t\t}\n\t\tif (a[i] == '\\0')\n\t\t\tbreak;\n\t}\n\tfor (i = 0; i <= 10000; i ++)\n\t{\n\t\tif ((b[i] != ',') && (b[i] != '\\0'))\n\t\t\tflag ++;\n\t\tif ((b[i] == ',') || (b[i] == '\\0'))\n\t\t{\n\t\t\tif (flag == 3)\n\t\t\t\tend[q ++] = b[i - 1] - '0' + 10 * (b[i - 2] - '0')\n\t\t\t\t+ 100 * (b[i - 3] - '0');\n\t\t\tif (flag == 2)\n\t\t\t\tend[q ++] = b[i - 1] - '0' + 10 * (b[i - 2] - '0');\n\t\t\tif (flag == 1)\n\t\t\t\tend[q ++] = b[i - 1] - '0';\n\t\t\tflag = 0;\n\t\t}\n\t\tif (b[i] == '\\0')\n\t\t\tbreak;\n\t}\n\n\tfor (i = 0; i <= p - 1; i ++) //?????????\n\t\tif (end[i] > last_time)\n\t\t\tlast_time = end[i];\n\tfor (j = 0.5; j <= last_time - 0.5; j ++) //????????????\n\t{\n\t\tcount = 0;\n\t\tfor (i = 0; i <= p - 1; i ++)\n\t\t\tif ((begin[i] < j) && (end[i] > j))\n\t\t\t\tcount ++;\n\t\tif (count > max)\n\t\t\tmax = count;\n\t}\n\n\tcout << p << \" \" << max;\n\tcin >> i;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37381", "code": "int main()\n{\n int x[10000] , y[10000];\n char ch1[10000] , ch2[10000]; \n int i = 0 , j = 0 , n = 0;\n int Min_h = 1000 , Max_h = 0 , Max = 0;\n cin >> ch1;\n cin >> ch2;\n int comma = -1;\n int counter = 0 , number = 0;\n for( i = 0 ; i <= 9999 ; i ++ )\n {\n if( ch1[i] == '\\0' || ch1[i] == ',' )\n {\n if( i - comma == 2 )\n x[counter] = ch1[i - 1] - '0'; \n else if( i - comma == 3 )\n x[counter] = ( ch1[i - 2] - '0' ) * 10 + ch1[i - 1] - '0';\n else if( i - comma == 4 )\n x[counter] = ( ch1[i - 3] - '0' ) * 100 + ( ch1[i - 2] - '0' ) * 10 + ch1[i - 1] - '0';\n counter ++;\n comma = i;\n if( ch1[i] == '\\0' )\n break;\n } \n }\n comma = -1;\n counter = 0;\n for( i = 0 ; i <= 9999 ; i ++ )\n {\n if( ch2[i] == ',' || ch2[i] == '\\0' )\n {\n if( i - comma == 2 )\n y[counter] = ch2[i - 1] - '0'; \n else if( i - comma == 3 )\n y[counter] = ( ch2[i - 2] - '0' ) * 10 + ch2[i - 1] - '0';\n else if( i - comma == 4 )\n y[counter] = ( ch2[i - 3] - '0' ) * 100 + ( ch2[i - 2] - '0' ) * 10 + ch2[i - 1] - '0';\n counter ++;\n comma = i;\n if( ch2[i] == '\\0' )\n break;\n } \n }\n for( i = 0 ; i <= counter - 1 ; i ++ )\n {\n if( x[i] < Min_h ) Min_h = x[i] ;\n if( y[i] > Max_h ) Max_h = y[i] ; \n }\n for( i = Min_h ; i <= Max_h ; i ++ )\n {\n number = 0;\n for( j = 0 ; j <= counter - 1 ; j ++ ) \n {\n if( x[j] <= i && y[j] > i )\n number ++;\n }\n if( number > Max )\n Max = number;\n }\n cout << counter << \" \" << Max << endl;\n return 0;\n}"} +{"label": "75", "index": "37382", "code": "/*\n * file homework 9_7\n * author ??\n * date 2010-11-24\n * description\n ???????????????????????\n*/\n\n\n\nint main()\n{\n\tint s[1000] = {0};\n\tint\tn, a, b, i, max = 0;\n\tcin >> a;\n\tn = 1;\n\tfor (i = a; i < 1000; i ++)\n\t\ts[i] ++;\n\twhile(cin.get() == ',')\n\t{\n\t\tcin >> a;\n \tfor (i = a; i < 1000; i ++)\n \t\ts[i] ++;\n\t\tn ++;\n\t}\n cin >> b;\n\tfor (i = b; i < 1000; i ++)\n\t\ts[i] --;\n\twhile(cin.get() == ',')\n\t{\n\t\tcin >> b;\n \tfor (i = b; i < 1000; i ++)\n\t \ts[i] --;\n\t}\n\tfor (i = 0; i < 1000; i ++)\n\t\tif (s[i] > max) \n\t\t\tmax = s[i];\n\tcout << n << ' ' << max << endl;\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37383", "code": "void main()\n{\n\tint enter[1000]={0},leave[1000]={0},i,j=0,e=0,l=0;\n\tchar c;\n\tint ans[1000]={0};\n\tdo\n\t{\n\t\tscanf(\"%d\",&enter[e]);\n\t\tscanf(\"%c\",&c);\n\t\te++;\n\t}while(c==',');\n\tdo\n\t{\n\t\tscanf(\"%d\",&leave[l]);\n\t\tscanf(\"%c\",&c);\n\t\tl++;\n\t}while(c==',');\n\tprintf(\"%d\",l);\n\tint start=enter[0],end=leave[0];\n\tfor(j=1;jenter[j])\n\t\t\tstart=enter[j];\n\t\tif(endi)\n\t\t\t\tans[i]++;\n\t\t}\n\t}\n\tint m=ans[start];\n\tfor(j=start;j>x[i];\n\t\tcin.get(a);\n\t\ti++;\n\t}while(a==',');\n\tn=i; //???\n\ti=0;\n\tdo //?????\n\t{\n\t\tcin>>y[i];\n\t\tcin.get(a);\n\t\ti++;\n\t}while(a==',');\n\tfor (k=0;k<1000;k++) //??????????\n\t\tfor (i=0;i=x[i]&&kbm)\n\t\t\tbm=b[i];\n\tfor (k=am;k=a[i] && kmax) max=t;\n\t}\n\tprintf(\"%d %d\",n,max);\n}\n\n"} +{"label": "75", "index": "37386", "code": "/** \n* @file ????? .cpp \n* @author ??? \n* @date 2013-10-31\n* @description \n* ??????: ????? */ \nint main()\n{\n\tint a[1001],b[1001];\n\tint i=1 ;\n\tdo\n\t{\n\t\tcin>>a[i];\n\t\ti++;\n\t}while(cin.get()==',') ;\n int j=1 ;\n\tdo\n\t{\n\t\tcin>>b[j];\n\t\tj++;\n\t}while(cin.get()==',');\n\tcout<<(i-1)<<\" \";\n\tint num=0,num1=INT_MIN;\n\tfor(int h=1;h<=1000;h++)\n\t{\n\t\tnum=0;\n\t\tfor(int p=1;p<=i;p++)\n\t\t{\n\t\t\tif((h>=a[p])&&(hnum1)\n\t\t\tnum1=num;\n\t}\n\tcout<> x[i])\n {\n i++;\n c = getchar();\n if (c == '\\n')\n break;\n }\n for (j = 0; j < i; j++)\n {\n cin >> y[j];\n c = getchar();\n }\n earliest = x[0];\n for (j = 0; j < i; j++)\n {\n if (earliest > x[j])\n earliest = x[j];\n if (latest < y[j])\n latest = y[j];\n }\n for (j = earliest; j <= latest; j++)\n {\n for (k = 0; k <= i; k++)\n {\n if (x[k] <= j && y[k] > j)\n s[j]++;\n }\n }\n for (j = earliest; j <= latest; j++)\n {\n if (max < s[j])\n max = s[j];\n }\n cout << i << \" \" << max << endl;\n return 0;\n}"} +{"label": "75", "index": "37388", "code": "int main()\n{\n\tint n=0,i=1,j=1,max=-1000,x;\n\tchar w=',';\n\tint a[1000],b[1000],c[1000];\n\tfor (int k=0;k<1000;k++)\n\t{\n\t\tc[k]=0;\n\t}\n\tcin >> a[0];\n\twhile(scanf(\",%d\",&x)>0)\n\t{\n\t\ta[i]=x;\n n++;\n\t\ti++;\n\t}\n\tcin >> b[0];\n\twhile(scanf(\",%d\",&x)>0)\n\t{\n\t\tb[j]=x;\n j++;\n\t}\n\tfor (int k=0;ki) d[i]++;\n \n\t for(i=0;i<1000;i++)\n\t\t if(max> in[i];\n\t\tcin.get(a);\n\t\tsumperson++;\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 1; ; i++)\n\t{\n\t\tcin >> out[i];\n\t\tcin.get(a);\n\t\tif (a == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i <= sumperson; i++)\n\t\tfor (j = in[i]; j < out[i]; j++)\n\t\t\ttime[j] += 1;\n\tfor (i = 1; i <=1001; i++)\n\t{\n\t\tif (time[i] > maxperson)\n\t\t\tmaxperson = time [i];\n\t}\n\tcout << sumperson <<\" \" << maxperson << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37391", "code": "int main()\n{\n char a[5000],b[5000];\n cin>>a>>b;\n int num=1,lengtha,lengthb,ren[1001],a0[1000],b0[1000],j=0,k=0; \n lengtha=strlen(a);\n lengthb=strlen(b);\n memset(ren,0,sizeof(ren));//???0 \n memset(a0,0,sizeof(a0));\n memset(b0,0,sizeof(b0));\n for(int i=0;ii))//?????????? \n ren[i]=ren[i]+1;\n }\n }\n sort(ren,ren+1000);//????????? \n cout<max)max=b[i];\n\t}\n\tfor(i=min;ii)\n\t\t\t{\n\t\t\t\tput[i]++;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=min;i> x[i] ;\n\t\tc = cin.get() ; \n\t\ti ++ ;\n\t}while ( c == ',' );\n\tdo\n\t{\n\t\tcin >> y[j] ;\n\t\tc = cin.get() ;\n\t\tj ++ ;\n\t}while ( c == ',' ) ;\n\tcout << i << \" \" ;\n\tn = i ;\n\tfor ( i = 0 ; i < n ; i ++ )\n\t{\n\t\tsum = 0 ;\n\t\tfor ( j = 0 ; j < n ; j ++ )\n\t\t{\n\t\t\tif ( ( x[i] >= x[j] ) && ( x[i] < y[j] ) )\n\t\t\t{\n\t\t\t\tsum = sum + 1 ;\n\t\t\t}\n\t\t\telse\n\t\t\tcontinue ;\n\t\t}\n\t\tif ( sum > max )\n\t\t{\n\t\t\tmax = sum ;\n\t\t}\n\t}\n\tcout << max ;\n\treturn 0 ;\n} "} +{"label": "75", "index": "37394", "code": "\nint function(int _a[10000],int _b[10000],int num)//?????????????????\n{\n\tint i,j;\n\tint max,count[1000]={0};\n\tfor(i=0;i=j+1)count[j]++;\n\tmax=count[0];\n\tfor(i=0;i<1000;i++)//?????\n\t\tif(count[i]>max)max=count[i];\n\treturn max;\n}\n\n\nint main()\n{\n char a[10000],b[10000];\n\tint _a[10000],_b[10000];\n\tint max,len1,len2;\n\tint i,j=0,num=1,temp=0;\n\tcin>>a;\n\tcin>>b;\n\tlen1=strlen(a);\n\tlen2=strlen(b);\n for(i=0;a[i]!='\\0';i++)\n\t\tif(a[i]==',')num++;\n for(i=0;i<=len1;i++)//????a???int?\n\t{\n\t\t if(a[i]!=','&&a[i]!='\\0')temp++;\n\t\t else \n\t\t\t{\n\t\t\t\tswitch(temp)\n\t\t\t\t{\n\t\t\t\tcase 1:{_a[j]=a[i-1]-'0';break;}\n\t\t\t\tcase 2:{_a[j]=10*(a[i-2]-'0')+a[i-1]-'0';break;}\n\t\t\t\tcase 3:{_a[j]=100*(a[i-3]-'0')+10*(a[i-2]-'0')+a[i-1]-'0';break;}\n\t\t\t\t}\n\t\t\t\ttemp=0;\n\t\t\t\tj++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t}\n\tj=0;\n\ttemp=0;\n\tfor(i=0;i<=len2;i++)//????b???int?\n\t\t{\n\t\t\tif(b[i]!=','&&b[i]!='\\0')temp++;\n\t\t\telse\n\t\t\t{\n\t\t\t\tswitch(temp)\n\t\t\t\t{\n\t\t\t\tcase 1:{_b[j]=b[i-1]-'0';break;}\n\t\t\t\tcase 2:{_b[j]=10*(b[i-2]-'0')+b[i-1]-'0';break;}\n\t\t\t\tcase 3:{_b[j]=100*(b[i-3]-'0')+10*(b[i-2]-'0')+b[i-1]-'0';break;}\n\t\t\t\t}\n\t\t\t\ttemp=0;\n\t\t\t\tj++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\tmax=function(_a,_b,num);\n\tcout<> x[i];\n\t\ta = cin.get();\n\n\t\tif( a == '\\n')\n\t\t\tbreak;\n\t}\n\n\tfor( i = 1;;i++ )\n\t{\n\t\tcin >> y[i];\n\t\ta = cin.get();\n\n\t\tif( a == '\\n')\n\t\t\tbreak;\n\n\t}\n\tsum = i;\n\n\n\tfor( t = 1;t <= 1000;t++ )\n\t\tfor( i = 0;i <= sum;i++ )\n\t\t{\n\t\t\tif( t >= x[i] && t < y[i] )\n\t\t\t\tn[t]++;\n\t\t}\n\n\tmax = 1;\n\n\tfor( t = 1;t <= 1000;t++ )\n\t{\n\t\tif( n[t] > n[max] )\n\t\t\tmax = t;\n\t}\n\n\tcout << sum << \" \" << n[max];\n\n\treturn 0;\n}\n\n"} +{"label": "75", "index": "37396", "code": "/***************************************************************************\n*autour:??? \n*number:1000012905\n*description:????? \n****************************************************************************/\nint main()\n{\n\tint\tin[1000] = {0}, out[1000] = {0};\n\tchar\tp;\n\tint\tcount = 0;\t//???? \n\t\n\t//??????????? --!~~~ \n\t//????????????????in[]??????????out[]? \n\tchar pan;\n\tdo\n\t{\n\t\tchar\tq[4];\n\t\tpan = '0';\n\t\tint\ts = 0;\n\t\tdo\n\t\t{\n\t\t\tq[s] = cin.get();\n\t\t\tpan = q[s];\n\t\t\ts ++;\n\t\t}while((pan != ',') && (pan != '\\n'));\n\t\tfor (int k = 0; k < s - 1; k ++)\n\t\t{\n\t\t\tin[count] = in[count] * 10 + (int)(q[k] - '0');\n\t\t}\n\t\tcount ++;\n\t}while(pan != '\\n');\t\n\tcount = 0;\t\t\t\n\tdo\n\t{\n\t\tchar\tq[4];\n\t\tpan = '0';\n\t\tint\ts = 0;\n\t\tdo\n\t\t{\n\t\t\tq[s] = cin.get();\n\t\t\tpan = q[s];\n\t\t\ts ++;\n\t\t}while((pan != ',') && (pan != '\\n'));\n\t\tfor (int k = 0; k < s - 1; k ++)\n\t\t{\n\t\t\tout[count] = out[count] * 10 + (int)(q[k] - '0');\n\t\t}\n\t\tcount ++;\n\t}while(pan != '\\n');\t\n\n\t//????????? \n\tcout << count << \" \";\n\t\n\tint\tt = 0, j = 0, MAX = 0;//MAX?????????? \n\t//?????????????? \n\tfor (t = 0; t < 1000; t ++)\n\t{\n\t\tint\tren = 0;\t//?????????? \n\t\tfor (j = 0; j < count; j ++)\n\t\t{\n\t\t\tif((in[j] <= t) &&(t < out[j]))\n\t\t\t{\n\t\t\t\tren ++;\n\t\t\t}\n\t\t}\n\t\tif(ren > MAX)\n\t\t{\n\t\t\tMAX = ren;\n\t\t}\n\t}\n\t\n\t//?? \n\tcout << MAX;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37397", "code": "\nint main()\n{\n\tchar x[10000],y[10000];\n\tint c[2000]={0},g[2000]={0},a[2000]={0},l1=-1,l2=0,num1=0,num2=0,i=0,k,max;\n\t\n\tcin.getline(x,10000);\n\t\n\twhile(x[i]!='\\0')\n\t{\n\t\tnum1++;\n\t\tfor(;x[i]!=','&&x[i]!='\\0';i++)\n\t\t{\n\t\t\tl2++;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(k=l2-l1-2;k>=0;k--,l1++)\n\t\t{\n\t\t\t\n\t\t\tc[num1]=c[num1]+(int)pow(10.0,k)*(x[l1+1]-'0');\n\t\t\t\n\t\t}\n\t\tif(x[i]=='\\0')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\tl1=l2,i++;\n\t\tl2++;\n\t}\n\tcin.getline(y,10000);\n\ti=0,l2=0,l1=-1;\n\twhile(y[i]!='\\0')\n\t{\n\t\tnum2++;\n\t\tfor(;y[i]!=','&&y[i]!='\\0';i++)\n\t\t{\n\t\t\tl2++;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(k=l2-l1-2;k>=0;k--,l1++)\n\t\t{\n\t\t\t\n\t\t\tg[num2]=g[num2]+(int)pow(10.0,k)*(y[l1+1]-'0');\n\t\t\t\n\t\t}\n\t\tif(y[i]=='\\0')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\tl1=l2,i++;\n\t\tl2++;\n\t}\n\tfor(i=1;i<=num1;i++)\n\t{\n for(k=c[i];kmax)\n\t\t{\n\t\t\tmax=a[i];\n\t\t}\n\t}\n\t\tcout<=0;t--)\n {\n in[j]+=p*(time[t]-'0');\n p*=10;\n }\n if(in[j]=0;t--)\n {\n in[j]+=p*(time[t]-'0');\n p*=10;\n }\n if(in[j]=0;t--)\n {\n out[j]+=p*(time[t]-'0');\n p*=10;\n }\n if(out[j]>maxtime) maxtime=out[j];\n j++;\n k=0;\n time[0]='\\0';\n }\n }\n time[k]='\\0';\n p=1;\n for(t=strlen(time)-1;t>=0;t--)\n {\n out[j]+=p*(time[t]-'0');\n p*=10;\n }\n if(out[j]>maxtime) maxtime=out[j];\n for(i=mintime;ii))\n people++;\n }\n if(people>mostnum) mostnum=people;\n }\n cout<> cx >> cy;\n\tfor(i = 0; cx[i] != '\\0'; i++)\n\t{\n\t\tif(cx[i] == ',')\n\t\t{\n\t\t\tnum++;\n\t\t}\n\t}\n\tlenx = strlen(cx); leny = strlen(cy);\n\tfor(i = lenx - 1, j = 0; i >= 0; i--)\n\t{\n\t\tif(cx[i] != ',')\n\t\t{\n\t\t\tix[j] += (cx[i] - '0') * p;\n\t\t\tp *= 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tj++;\n\t\t\tp = 1;\n\t\t}\n\t}\n\tfor(i = leny - 1, j = 0, p = 1; i >= 0; i--)\n\t{\n\t\tif(cy[i] != ',')\n\t\t{\n\t\t\tiy[j] += (cy[i] - '0') * p;\n\t\t\tp *= 10;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tj++;\n\t\t\tp = 1;\n\t\t}\n\t\tif(iy[j] > maxy)\n\t\t{\n\t\t\tmaxy = iy[j];\n\t\t}\n\t}\n\tfor(i = 0; i < num; i++)\n\t{\n\t\tfor(j = ix[i]; j < iy[i]; j++)\n\t\t{\n\t\t\tpeople[j]++;\n\t\t}\n\t}\n\tfor(i = 0; i <= maxy; i++)\n\t{\n\t\tif(people[i] > max)\n\t\t{\n\t\t\tmax = people[i];\n\t\t}\n\t}\n\tcout << num << \" \" << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37400", "code": "int a[1000]={0},b[1000]={0};\nvoid main()\n{\n\tchar c;\n\tint i=0,num,p=0,q,max,min,j;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c==',')\n\t\t{\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\telse if(c!=',')\n\t\t{\n\n\t\t\ta[i]=10*a[i]+c-'0';\n\t\t}\n\t}\n\ti=0;\n\twhile((c=getchar())!='\\n')\n\t{\n\t\tif(c==',')\n\t\t{\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\telse if(c!=',')\n\t\t{\n\n\t\t\tb[i]=10*b[i]+c-'0';\n\t\t}\n\t}\n\tnum=i+1;\n\tmin=a[0];\n\tmax=b[0];\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t\n\t}\n\tp=0;\n\tfor(i=min;ii)\n\t\t\t\tq++;\n\t\t\n\t\t}\n\t\tif(q>p)\n\t\tp=q;\n\t\n\t\n\t}\n\tprintf(\"%d %d\",num,p);\n\t\n\n}"} +{"label": "75", "index": "37401", "code": "/*????:?????\n *??:???\n *??:2010/11/26\n *??:1000010449\n*/\nint main()\n{\n\tint x[5000], y[5000], total, count = 0, max = 0;\n\t//x,y?????;total???;count?????????;max????\n\tint i, j;\n\n\tcin >> x[0];\n\ttotal = 1;\n\twhile (cin.get() != '\\n')\t//???????\n\t{\n\t\tcin >> x[total];\n\t\ttotal++;\n\t}\n\n\tcin >> y[0];\n\ttotal = 1;\n\twhile (cin.get() != '\\n')\t//???????\n\t{\n\t\tcin >> y[total];\n\t\ttotal++;\n\t}\n\n\t\n\tfor (j = 0; j < total; j++)\t//????????????\n\t{\n\t\tcount = 0;\t//?????????,????0\n\t\tfor (i = 0; i < total; i++)\n\t\t{\n\t\t\tif (x[j] >= x[i] && x[j] < y[i])\t//?i????\n\t\t\t\tcount++;\n\t\t}\n\t\tif (count > max)\n\t\t\tmax = count;\n\t}\n\n\tcout << total << \" \" << max << endl;\n\t\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "75", "index": "37402", "code": "int main()\n{\n int time1[10000]={0},time2[10000]={0},p[1001]={0},num,i=0,j=0,k,max=0,temp=0;\n char timein[100000]={0},timeout[100000]={0};\n gets(timein);gets(timeout);\n for(i=0;timein[i]!=0;i++)\n {\n if(timein[i]>'9'||timein[i]<'0')continue;\n temp*=10;temp+=timein[i]-'0';\n if(timein[i+1]>'9'||timein[i+1]<'0'){time1[j]=temp;j++;temp=0; continue;}\n } \n temp=0;cout<'9'||timeout[i]<'0'){continue;}\n \n temp*=10;temp+=timeout[i]-'0';\n if(timeout[i+1]>'9'||timeout[i+1]<'0'){time2[j]=temp;j++;temp=0; continue;}\n }\n for(i=0;i<=j;i++)\n for(k=time1[i];kans)\n ans=f[i];\n printf(\"%d\",ans); \n \n return 0; \n}\n"} +{"label": "75", "index": "37404", "code": "//********************************\n//*???????? **\n//*?????? 1300012773 **\n//*???2013.10.30 **\n//********************************\nint x[1000], y[1000], t[1000];\nint main()\n{\n\n int num, h = 1, max = 1;\n char ch;\n int T = 0;\n\n for(num = 0;;)\n {\n cin >> x[num];\n t[x[num]]++;\n ch = cin.get();\n if(ch != ',')break;\n num ++;\n \n }\n\n cout << num + 1;\n\n for(int i = 0; i <= num; i++)\n {\n cin >> y[i];\n t[y[i]]--;\n ch = cin.get();\n }\n for(int i = 0; i < 1000; i++)\n {\n T += t[i];\n if(T > max)max = T;\n }\n \n cout << ' ' << max;\n return 0;\n}\n"} +{"label": "75", "index": "37405", "code": "/*\n ????????\n ??????\n ???2010-12-29\n*/\nint main()\n{\n\tchar c[1000];\n\tint num = 0, i, j, max = 1, flag[1000] = {0}; //flag[]?????????\n\tint x[1000], y[1000]; //?????????\n\tfor(i = 0; c[i - 1] != '\\n'; i++)\n\t{\n\t\tcin >> x[i];\n\t\tc[i] = cin.get(); //???????????\n\t}\n\tnum = i;\n for(i = 0; c[i - 1] != '\\n'; i++)\n\t{\n\t\tcin >> y[i];\n c[i] = cin.get();\n\t}\n\tfor(i = 0; i < num; i++)\n\t{\n\t\tfor(j = x[i]; j < y[i]; j++)\n\t\t{\n\t\t\tflag[j]++;\n\t\t}\n\t}\n\tfor(i = 0; i < 1000; i++)\n\t{\n\t\tif(flag[i] > max) max = flag[i];\n\t}\n\tcout << num << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37406", "code": "int main() \n{\nint a[1010]={0};\nint b[1010]={0};\nint d[1010]={0};\nint max1=2000,max2=0,max=0;\nint t;\nint i,n=0;\nchar c;\nfor(i=1;;i++){\n scanf(\"%d%c\",&a[i],&c);\n n++;\n if(c!=','){break;}\n }\nfor(i=1;;i++){\n scanf(\"%d%c\",&b[i],&c);\n if(c!=','){break;}\n }\nfor(i=1;i<=n;i++){\n if(a[i]max2){max2=b[i];}\n }\nfor(t=max1;tt){\n d[t]++;\n }\n }\n }\nfor(i=1;i<=max2-max1;i++){\n if(d[i]>max){max=d[i];}\n }\nprintf(\"%d %d\\n\",n,max);\n\t\n\treturn 0;\n}\n"} +{"label": "75", "index": "37407", "code": "//**********************************\n//*??:????? ***\n//*??:??? 1300012991 ***\n//*??:2013?11?4? ***\n//**********************************\n\nint main()\n{\n\tint n, i, j, count, num = 1; //????\n\tint a[1000] = {0};\n\tint b[1000] = {0};\n\tchar sp; //????sp\n//\tint *a = new int [n]; //????a?b\n//\tint *b = new int [n];\n\tfor (i = 0; ; i++) //??a????????????\n\t{\n\t\tcin >> a[i];\n\t\tsp = getchar();\n\t\tif (sp == '\\n')\n\t\t\tbreak;\n\t}\n\tn = i + 1;\n\tfor (i = 0; i < n; i++) //??b????????????\n\t{\n\t\tcin >> b[i];\n\t\tsp = getchar();\n\t\tif (sp == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i < 1002; i++) //???????????????\n\t{\n\t\tcount = 0;\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (i >= a[j] && i < b[j])\n\t\t\t\tcount = count++;\n\t\t}\n\t\tnum = (count > num ? count: num); //????\n\t}\n\tcout << n << \" \" << num;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37408", "code": "int main()\n{\n int i,j,n,m,temp,arrive[1600],leave[1600],times[1001]={0};\n char c;\n c=getchar();\n while(c!=EOF)\n {\n n=0;\n while(c!='\\n')\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n arrive[n]=temp;\n n++;\n if(c==',')\n\t c=getchar();\n\t\t \n }\n\tc=getchar();\n n=0;\n while(c!='\\n')\n {\n m=c-'0';\n temp=0;\n while((m<=9)&&(m>=0))\n {\n temp=temp*10+m;\n c=getchar();\n m=c-'0';\n }\n leave[n]=temp;\n n++;\n if(c==',')\n\t c=getchar();\n }\n\tfor(i=0;i>x[i];\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t\ti++;\n\t}\n\tfor(j=0;j>y[j]>>a;\n\tcin>>y[i];\n\tfor(j=0;j<=i;j++)\n\t\tfor(int k=x[j];kmax)\n\t\t\tmax=count[j];\n\t}\n cout<> num ;\n\t\ta[i] = num ;\n\t\ti++ ;\n\t\tc = cin.get() ;\n\t}\n\tfor ( k = 0 ; k <= i - 1 ; k++ )\n\t{\n\t\tcin >> num ;\n\t\tb[k] = num ;\n\t\tc = cin.get() ;\n\t}\n\ttotal = i ;\n\tmax = b[1] ;\n\tmin = a[1] ;\n\tfor ( i = 0 ; i <= total - 1 ; i++ )\n\t{\n\t\tif ( min >= a[i] )\n\t\t\tmin = a[i] ;\n\t\tif ( max <= b[i] )\n\t\t\tmax = b[i] ;\n\t}\n\tint x[1001] = { 0 } ;\n\tfor ( k = 0 ; k <= total - 1 ; k++ )\n\t\tfor ( i = a[k] ; i <= b[k] - 1 ; i++ )\n\t\t\tx[i] = x[i] + 1 ;\n\tint max1 = 0 ;\n\tfor ( i = min ; i <= max ; i++ )\n\t{\n\t\tif ( max1 < x[i] )\n\t\t\tmax1 = x[i] ;\n\t}\n\tcout << total << \" \" << max1 << endl ;\n\treturn 0 ;\n}"} +{"label": "75", "index": "37411", "code": "//?????\n\n\n\nint main()\n{\n\tint start[1000],end[1000],n,number[1000]={0},max=0;\n\tfor(int i=0;;i++) //??????????\n\t{\n\t\tchar c;\n\t\tcin>>start[i];\n\t\tc=cin.get();\n\t\tif(c!=',')\n\t\t{\n\t\t\tn=i+1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tcin>>end[0];\n\tfor(int i=1;i>c>>end[i];\n\t}\n\tfor(int i=0;imax)\n\t\t\tmax=number[i];\n\tcout<i)\n\t\t\ts[i]++;\n\t\t}\n\t\tif(s[i]>max)\n\t\t\tmax=s[i];\n\t}\n\tprintf(\"%d\",max);\n\n}\n"} +{"label": "75", "index": "37413", "code": "//********************\n//**????????**\n//**????? **\n//**???2013.10.31**\n//????5.cpp\t\t**\n//********************\nint main()\n{\n\tint x[1000], y[1000], cnt[1001], num = 0, max, i;\n\tchar ch;\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> x[i]; // ??x[i]\n\t\tnum++; // ???????1\n\t\tch = cin.get(); // ????????ch\n\t\tif (ch != ',') // ??????????????\n\t\t\tbreak;\n\t}\n\tfor (i = 0; ; i++)\n\t{\n\t\tcin >> y[i]; // ??y[i]\n\t\tch = cin.get(); // ????????ch\n\t\tif (ch != ',') // ??????????????\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i <= 1000; i++)\n\t{\n\t\tcnt[i] = 0; // ????????????0\n\t\tfor (int j = 0; j <= num - 1; j++)\n\t\t{\n\t\t\tif (i >= x[j] && i < y[j]) // ??i?????j????\t\n\t\t\t\tcnt[i]++; // ?i?????????1\n\t\t}\n\t}\n\tmax = cnt[1]; // ?cnt[1]??????????\n\tfor (i = 1; i <= 1000; i++)\n\t{\n\t\tif (max < cnt[i]) // ??max??cnt[i]\n\t\t\tmax = cnt[i]; // ?cnt[i]????max\n\t}\n\tcout << num << ' ' << max << endl; // ???????????????\n\treturn 0;\n}"} +{"label": "75", "index": "37414", "code": "\nvoid main(void)\n{\n\tint n=0,start[1000],end[1000];\n\tchar c=',';\n\twhile(c!='\\n')\n\t{\n\t\tscanf(\"%d%c\",&start[n],&c);\n\t\tn++;\n\t}\n\n\tint i;\n\tfor(i=0;i<=n-1;i++)\n\t\tscanf(\"%d%c\",&end[i],&c);\n\n\tint time=0;\n\tfor(i=0;i<=n-1;i++)\n\t\tif(timei)\n\t\ttime[i]=time[i]+1;\n\t\t}\n\t}\n\tfor(i=0;i<1000;i++)\n\t\tfor(j=i;j<999-i;j++)\n\t\t\tif(time[j]>time[j+1])\n\t\t\t{\n\t\t\t\tt=time[j];\n\t\t\t\ttime[j]=time[j+1];\n\t\t\t\ttime[j+1]=t;\n\t\t\t}\n\t\t\tprintf(\"%d %d\",n,time[999]);\n\n}"} +{"label": "75", "index": "37416", "code": "/*\n * ?????.cpp\n *\n * Created on: 2010-12-29\n * Author: wangwei\n */\nint x[2000], y[2000];\nchar temp[2000];\n//????????????\nint input(int a[])\n{\n\tint i,j=0;\n\tfor(i=0;;i++)\n\t{\n\t\tcin>>a[i];\n\t\ttemp[i]=cin.get();\n\t\tj++;\n\t\tif(temp[i]=='\\n')\n\t\t\tbreak;\n\t}\n\treturn j;\n}\nint main()\n{\n\tint i,j,k,max,count[2000]={0};\n\t//????\n\tj=input(x);\n\tj=input(y);\n\tmax=0;\n\t//???????\n\tfor(i=0;i<=1000;i++)\n\t{\n\t\tfor(k=0;ki)\n\t\t\t\tcount[i]++;\n\t\t}\n\t\t//????????????\n\t\tif(count[i]>max)\n\t\t\tmax=count[i];\n\t}\n\t//???????????\n\tcout<=a[l])&&ik[i]?l:k[i];\n\t}\n\tprintf(\"%d %d\",n,l);\n}\n"} +{"label": "75", "index": "37418", "code": "void main()\n{\n\tint i;\n\tchar c;\n\tint k;\n\tint a[1001],b[1001];\n k=1;\n\tscanf(\"%d\",&a[k]);\n\twhile((c=getchar())==',')\n\t{\n\t\tk++;\n\t\tscanf(\"%d\",&a[k]);\n\t}\n\tk=1;\n\tscanf(\"%d\",&b[k]);\n\twhile((c=getchar())==',')\n\t{\n\t\tk++;\n\t\tscanf(\"%d\",&b[k]);\n\t}\n\tprintf(\"%d \",k);\n\tint t=0;\n\tfor (i=0;i<=1000;i++)\n\t{\n\t\tint j;\n\t\tint sum=0;\n\t\tfor (j=1;j<=k;j++)\n\t\t\tif (a[j]<=i && b[j]>i)\n\t\t\t\tsum++;\n\t\tif (t=a[j])&&(nmax)\n\t\t\tmax=m[n];\n\t}\n\tprintf(\"%d \",w);\n\tprintf(\"%d\\n\",max);\n}\n\t\n"} +{"label": "75", "index": "37420", "code": "//*********************************\n//* ???????? *\n//* ????? *\n//* ???12?25? *\n//*********************************\nint main()\n{\n\tint x[1001]={0},y[1001]={0};\n\tint total=0,n=0;\n\tchar ch=0;\n\tint time[1001]={0};\n\tint i,j;\n\tdo\n\t{\n\t\tcin>>n;\n\t\tcin.get(ch);\n\t\tx[total]=n;//x?????\n\t\ttotal++;//total??????\n\t}while(ch==',');\n\ttotal=0;\n\tdo\n\t{\n\t\tcin>>n;\n\t\tcin.get(ch);\n\t\ty[total]=n;//y?????\n\t\ttotal++;\n\t}while(ch==',');\n\tcout<t)\n\t\t\tt=time[i];//????\n\tcout<= 1; kk--)\n\t\t\t{\n\t\t\t\tnum1[num] += s * q[kk];\n\t\t\t\ts *= 10;\n\t\t\t}\n\t\tif (num1[num] < minn)\n\t\t\tminn = num1[num];\n\t\tif (num1[num] > maxx)\n\t\t\tmaxx = num1[num];\n\t\ti = ii + 1;\n\t}\n}\nint main()\n{\n\tchar x[5000], y[5000];\n\tint xx[5000] = {0}, yy[5000] = {0}, t[5000] = {0};\n\tint j, k, ii, s ,most = 0;\n\tcin >> x;\n\tcin >> y;\n\t\ttrans(xx,x);\n\t\ttrans(yy,y);\n\t/*i = 0;\n\tnum = 0;\n\twhile (x[i] != 0)\n\t{\n\t\ts = 1;\n\t\tii = i;\n\t\tnum ++;\n\t\twhile (x[ii] != ',')\n\t\t{\n\t\t\txx[num / 2 + 1] += s * (x[ii] - '0');\n\t\t\ts *= 10;\n\t\t\tii ++;\n\t\t}\n\t\t\t//cout << xx[i / 2 + 1]<< endl;\n\t\tif (xx[num / 2 + 1] < min)\n\t\t\tmin = xx[num / 2 + 1];\n\t\t}\n\t\ti = ii;\n\t}\n\ti = 0;\n\tnum = 0;\n\ts = 1;\n\twhile (y[i] != 0)\n\t{\n\t\tii = i;\n\t\ts = 1;\n\t\tnum ++;\n\t\twhile (y[ii] != ',')\n\t\t{\n\t\t\tyy[num / 2 + 1] += s * (y[ii] - '0');\n\t\t\ts *= 10;\n\t\t\tii ++;\n\t\t}\n\t\t\tif (yy[num / 2 + 1] > max)\n\t\t\tmax = yy[num / 2 + 1];\n\t\ti = ii;\n\t}*/\n\t\nfor (j = 1; j <= num; j++)\n\t{\n\t\tfor (k = xx[j]; k < yy[j]; k++)\n\t\t\tt[k] ++;\n\t}\n\tfor (k = minn; k <= maxx; k++)\n\t{\n\t\t//cout << t[k] << endl;\n\t\tif (t[k] > most)\n\t\t\tmost = t[k];\n\t}\n\tcout << num << \" \" << most << endl;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37422", "code": "int bb[1000];\nint main(){\n int k,x,y,z,a=0,time,i,j,aa[2000];\n char p;\n while(1){\n cin>>time;\n bb[time]++;\n if(cin.get()!=',')\n break;\n }\n i=0;\n while(1){\n cin>>time;\n bb[time]--;\n i++;\n if(cin.get()!=',')\n break;\n }\n x=0;\n for(j=0;j<999;j++){\n a=0;\n for(k=0;k<=j;k++){\n a=a+bb[k];\n }\n if(a>x){\n x=a;\n y=j;\n }\n }\n cout<> time_arrive[num];\n\t\tnum++;\n\t\tmess = cin.get();\n\t}\n\n\tfor ( i = 0; i < num; i++ )\n\t{\n\t\tcin >> time_leave[i];\n\t\tfor ( j = time_arrive[i]; j < time_leave[i]; j++ )\n\t\t\tpeople_present[j]++;\n\t\tmess = cin.get();\n\t}\n\n\tfor ( i = 0; i < 1000; i++ )\n\t\tif ( people_max < people_present[i] )\n\t\t\tpeople_max = people_present[i];\n\n\tcout << num << \" \" << people_max;\n\n\treturn 0;\n}"} +{"label": "75", "index": "37424", "code": "\n/*Conversion from characters to numbers*/\nvoid char2int (int *length, char *a, int* aa){\n int temp = 0, k = 0;\n for(int j=0; j<*length; ++j){\n if(a[j] == ','){\n temp = 0;\n ++k;\n }\n else\n aa[k] = 10 * aa[k] + a[j]-'0';\n }\n}\n\nint main(){\n char c, a[4*1000], b[4*1000];\n int aa[1000] ={0}, bb[1000] = {0}, stat[1000]={0};\n int i = 0, num = 0, length1 = 0, length2 = 0, maxindex=0, in, out;\n while(scanf(\"%c\",&c)!=EOF && c!='\\n'){\n a[i++] = c;\n ++length1;\n if(c == ',')\n ++num;\n }\n i = 0;\n while(scanf(\"%c\",&c)!=EOF && c!='\\n'){\n b[i++] = c;\n ++length2;\n }\n char2int(&length1, a, aa);\n char2int(&length2, b, bb);\n ++num;\n for(int i=0; i stat[maxindex])\n maxindex = i;\n cout << num << \" \" << stat[maxindex] << endl;\n return 0;\n}\n"} +{"label": "75", "index": "37425", "code": "//---------------\n// ?????\n// 2010/12/22\n// ADE\n//---------------\n\n\nint get(int arr[1000])//?????????????\n{\n\tint t=0,i=0;\n\tchar c;\n\twhile((c=cin.get())!='\\n')\n\t{\n\t\tif(c!=',')\n\t\t\tt=t*10+c-'0';\n\t\telse \n\t\t{\n\t\t\tarr[i]=t;\n\t\t\tt=0;\n\t\t\ti++;\n\t\t}\n\t}\n\tarr[i]=t;\n\ti++;\n\treturn i;//?????\n}\nint main()\n{\n\tint i,k,s[1000],e[1000],time[1000],num,max=0,endtime=0;//max???????endtime??????\n\tfor(i=0;i<1000;i++)\n\t\ts[i]=e[i]=time[i]=0;\n\tnum=get(s);\n\tnum=get(e);\n\tfor(i=0;ia[j]) t1=a[j];\n\t\t\tnum=0;j++;\n\t\t}\n\t}\n\ta[j]=num;\n\t\t\t\tif(t1>a[j]) t1=a[j];\n\t\t\t\tnum=0;\n\t\t\t\tj=0;\n cin.getline(s,4000);\n for(i=0;ia[p]&&dren) ren=cou;\n d+=1;\n }\n cout<=0;k--)\n\t\t\tm=m+(e[k]-'0')*c[i-1-k];\n\t\tn++;\n\t\td[j++][0]=m;\n\t\tif(b=='\\n') break;\n\t}\n\tj=0;\n\tfor(;;)\n\t{\n\t\tb=getchar();\n\t\ti=0;\n\t\tm=0;\n\t\t\tfor(;;i++)\n\t\t{\n\t\t\tif(b==','||b=='\\n') break;\n\t\t\te[i]=b;\n\t\t\tb=getchar();\n\t\t}\n\t\tfor(k=i-1;k>=0;k--)\n\t\t\tm=m+(e[k]-'0')*c[i-1-k];\n\t\td[j++][1]=m;\n\t\tif(b=='\\n') break;\n\t}\n\tprintf(\"%d \",n);\n\tfor(i=0;im) m=a[i];\n\tprintf(\"%d\",m);\n}"} +{"label": "75", "index": "37428", "code": "/*\n * wanyi.cpp\n *\n * Created on: 2012-11-10\n * Author: 7\n */\nint main()\n{\n\tint x[1000];\n\tint y[1000];\n\tchar a;\n\tint i=0,j,num=0,max=0,n,minx=10000,maxy=0;\n\twhile(cin>>x[i])\n\t{\n\t\tif(x[i]>y[i])\n\t\t{\n\t\tif(y[i]>maxy)\n\t\t\tmaxy=y[i];\n\t\t\ti++;\n\t\t\tcin.get(a);\n\t\t\tif(a=='\\n'||i>n)\n\t\t\t\tbreak;\n\t\t}\n\tfor(i=minx;i=x[j]&&imax)\n\t\t\t\t\tmax=num;\n\t\t\t}\n\t\t}\n\t\tnum=0;\n\t}\n\tcout<=a[j]?a[j]:min1;\n\tfor(int j=1;j<=count;j++)\n\t\tmax1=max1<=b[j]?b[j]:max1;\n\tfor(int l=min1;l<=max1;l++)\n\t{\n\t\tfor(int k=1;k<=count;k++)\n\t\t{\n\t\t\tif(a[k]==l)\n\t\t\t{\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tif(b[k]==l)\n\t\t\t{\n\t\t\t\ttotal--;\n\t\t\t}\n\n\t\t}\n\t\tMAX=MAX>=total?MAX:total;\n\t}\n\n\tcout<> a[i];\n\t\tch = cin.get();\n\t\tif (ch == 10)\n\t\t\tbreak;\n\t}\n\tint max = 0;\n\tfor (i = 0; ;i++)\n\t{\n\t\tcin >> b[i];\n\t\tif (b[i] > max)\n\t\t\tmax = b[i];\n\t\tch = cin.get();\n\t\tif (ch == 10)\n\t\t\tbreak;\n\t}\n\tcout << i + 1 << ' ';\n\tint j, k, htime = 0;\n\tfor (j = 0; j <= max; j++)\n\t{\n\t\tint cnt = 0;\n\t\tfor (k = 0; k <= i; k++)\n\t\t{\n\t\t\tif (a[k] <= j && b[k] > j)\n\t\t\t\tcnt++;\n\t\t}\n\t\tif (cnt > htime)\n\t\t\thtime = cnt;\n\t}\n\tcout << htime << endl;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37431", "code": "char s[4000],t[4000];\nint a[3000]={0},b[3000]={0},h[1008]={0};\nvoid main()\n{\n\tint i,k,n1,n2;\n\tgets(s);gets(t);\n\tn1=strlen(s);\n\tk=0;\n\tfor(i=0;i=y)\ty=h[i];\n\tprintf(\"%d\\n\",y);\n}\n\n"} +{"label": "75", "index": "37432", "code": "int main()\n{\n\tchar come[110000],go[110000];\n\tcin.getline(come,110000);\n\tcin.getline(go,110000);\n\tint x=1,i,j=1;\n\tint people=1,size=strlen(come);\n\tfor(i=0;i=come1[j]&&imax)\n\t\t\tmax=number;\n\t}\n\n\tcout<<' '<> come[i++];\t\t//??????come[]\n\t\t\tc = cin.get();\t\t\t//???????\n\t\t\tif( c == '\\n')\t\t\t//????????line++\n\t\t\t\tline++;\n\t\t}\n\t\telse if(line == 2)\t\t//??????\n\t\t{\n\t\t\tcin >> go[j++];\t\t//??????go[]\n\t\t\tc = cin.get();\t\t//???????\n\t\t\tif(go[j - 1] > tmax)\t//????????\n\t\t\t{\n\t\t\t\ttmax = go[j - 1];\n\t\t\t}\n\t\t\tif( c == '\\n')\t\t//????????line++\n\t\t\t\tline++;\n\t\t}\n\t\telse break;\t\t\t\t//??line??1?2??????????\n\t}\n\tp = i;\t\t\t\t\t\t//????come??????\n\t//????????????????????\n\tfor(i = 0; i < p; i ++)\n\t{\n\t\tfor(j = come[i]; j < go[i]; j++)\n\t\t{\n\t\t\ttime[j]++;\t\n\t\t}\n\t}\n\t//?????????????\n\tfor(i = 0; i <= tmax; i++)\n\t{\n\t\tif(time[i] > pmax)\n\t\t{\n\t\t\tpmax = time[i];\n\t\t}\n\t}\n\tcout << p << \" \" << pmax << endl; //??????????????????\n\treturn 0;\n}"} +{"label": "75", "index": "37434", "code": "struct ren\n{\n\tint x;\n\tint y;\n}a[1010];\nint main()\n{\n char c;\n\tint i=1,j,n,min=2000,max=0,t,d;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&a[i].x,&c);\n\t\ti++;\n\t}while(c==',');\n\tn=i-1;\n\ti=1;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&a[i].y,&c);\n\t\ti++;\n\t}while(c==',');\n\tprintf(\"%d \",n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(a[i].xmax)\n\t\t\tmax=a[i].y;\n\t}\n\tfor(i=min,t=0;i<=max-1;i++)\n\t{\n for(j=1,d=0;j<=n;j++)\n\t\t{\n\t\t\tif(a[j].x<=i&&a[j].y>=i+1)\n\t\t\t\td++;\n\t\t}\n if(d>t)\n\t\t\tt=d;\n\t}\n printf(\"%d\",t);\n\treturn 0;\n}"} +{"label": "75", "index": "37435", "code": "int deal(char a[],int ans[])\n{\n\tint i,j=0;\n\tans[0]=0;\n\tfor(i=0;;i++)\n\t{\n\t\tif(a[i]=='\\0') break;\n\t\tif(a[i]==',') {j++;ans[j]=0;}\n\t\telse ans[j]=ans[j]*10+a[i]-'0';\n\t}\n\treturn j+1;\n}\nvoid main()\n{\n\tchar a[4000],b[4000];\n\tint aa[1000],bb[1000];\n\tint t[1000],i,j,max=0,n;\n\tgets(a);\n\tgets(b);\n\tfor(i=0;i<1000;i++) t[i]=0;\n\tdeal(a,aa);\n\tn=deal(b,bb);\n\tfor(i=0;imax) max=t[i];\n\tprintf(\"%d %d\",n,max);\n}\t"} +{"label": "75", "index": "37436", "code": "/*?????\n ????????\n*/\n\nint main(){\n\tint x[1000]={0},y[1000]={0},s[1001]={0},i=0,j=0; //x,y?????????s??????\n\tchar c;\n\twhile(1)\n\t{cin>>x[i];i++;if((c=getchar())=='\\n')break;}\n\twhile(1)\n\t{cin>>y[j];j++;if((c=getchar())=='\\n')break;}//??\n\tfor(int m=0;m> start[num - 1], (c = cin.peek() == ','); cin >> c, num++)\n\t\t;\n\tcin >> end[0];\n\tfor(i = 1; i < num; i++)\n\t\tcin >> c >> end[i];\n\tfor(i = 0; i < 1000; i++)\n\t{\n\t\ttotal = 0;\n\t\tfor(j = 0; j < num; j++)\n\t\t\tif(start[j] <= i && i < end[j])\n\t\t\t\ttotal++;\n\t\tif(total > max)\n\t\t\tmax = total;\n\t}\n\tcout << num << ' ' << max;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37438", "code": "//********************************\n//*???????? **\n//*?????1300062805 **\n//*???2013.11.2 **\n//********************************\nint a[1001];\nint main()\n{\n\tint i, x, y, k = 1, j = 0, sum = 0;\n for(i = 1; ;i ++) // ?????????????????? \n { \n cin >> x;\n a[x]++;\n if( cin.get()!= ',')\n {\n k = i; //?????? \n break; \n } \n } \n for(i = 1; ;i ++) // ?????????????????? \n { \n cin >> y;\n a[y]--;\n if( cin.get()!= ',')\n {\n break; \n } \n } \n for(i = 0; i <= 1000; i++) //????????????????????? \n { \n\t\tsum = sum + a[i];\n if(sum >= j)\n {\n j = sum ; \n\t\t}\n \n } \n cout << k <<\" \"<< j << endl;//?????????????????? \n return 0;\n}"} +{"label": "75", "index": "37439", "code": "int change(char a[100])\n{\n int i,l,s;\n l=strlen(a);\n s=0;\n for(i=0;it2)\n t2=c[1][i];\n }\n for(i=t1;ii)\n t[m]++;\n }\n }\n x=t[0];\n for(i=0;ix)\n x=t[i];\n }\n printf(\"%d %d\",k+1,x);\n return 0;\n}\n"} +{"label": "75", "index": "37440", "code": "int main()\n{\n\t\n\tint a[1000]={0},b[1000]={0},i=0,j,kk=0,n,al,m=0,c[1000]={0},chang;\n while(1)\n\t{ \n\t\tcin>>a[i];\n\t\ti++;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\ti=0;\n\twhile(1)\n\t{ \n\t\tcin>>b[i];\n\t\ti++;\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\n\tchang=i-1;\n\n\n\n\t\t\n\t\n\tfor(i=0;i<=999;i++)\n\t\tif((a[i]==0)&&(b[i]>0))\n\t\t\tkk++;\n\t\tc[0]=kk;\t\t\nkk=0;\n\t\tfor(j=1;j<=1000;j++)\n\t{\n\t\tfor(i=0;i<=chang;i++)\n\t\t{\n\t\t\tif((a[i]<=j)&&(b[i]>j))\n\t\t\t\tkk++;\n\t\t}\n\t\tc[j]=kk;\n\t\tkk=0;\n\t}\n\t\t\n\tfor(i=0;i<=999;i++)\n\t\tif(b[i]>0)\n\t\t\n\t\tm=m+1;\n\n\tcout<c[0])\n\n\t\t\tc[0]=c[j];\n\tcout<=x[j])&&(imax)\n\t\t\tmax=temp;\n\t}\n\treturn max;\n}\n\n\nvoid main()\n{\n\tint i,num=0,x[8000],y[8000];\n\tchar c;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&x[num++],&c);\n\t}while(c!='\\n');\n\tnum=0;\n\tdo\n\t{\n\t\tscanf(\"%d%c\",&y[num++],&c);\n\t}while(c!='\\n');\n\tprintf(\"%d \",num);\n\tint max=max_people(x,y,num);\n\tprintf(\"%d\",max);\n}"} +{"label": "75", "index": "37442", "code": "/***************************************************\n?? ??? 1300017667\n?? 20101031\n?? ?????\n***************************************************/\nint main()\n{\n\tint n = -1, i, t, man = 0, maxman = 0;\n\tchar c;\n\tint start[1000], end[1000];\t\t\t\t\t\t//???????????????\n\tdo\n\t{\n\t\tn ++;\n\t\tcin >> start[n];\n\t\tc = cin.get();\n\t}while(c != '\\n');\t\t\t\t\t\t\t\t//???????????????????\n\tfor(i = 0; i <= n; i ++)\n\t{\n\t\tcin >> end[i];\n\t\tcin.get();\n\t}\n\tfor(t = 0; t <= 1000; t ++)\n\t{\n\t\tfor(i = 0; i <= n; i ++)\n\t\t{\n\t\t\tif(t >= start[i] && t < end[i])\t\t\t//????????\n\t\t\t\tman ++;\n\t\t}\n\t\tif(man > maxman)\t\t\t\t\t\t\t//????????????????????????????????\n\t\t\tmaxman = man;\n\t\tman = 0;\n\t}\n\tcout << n + 1 << \" \" << maxman;\n\treturn 0;\n}\n\n\n"} +{"label": "75", "index": "37443", "code": "\nint main()\n{\n\tint n,x[10000],y[10000],i=1,j,k,people[1001]={0},mp=0;\n\tchar t;\n\tcin>>x[0];\n\tcin.get(t);\n\twhile(t!='\\n')\n\t{\n\t\tcin>>x[i++];\n\t\tcin.get(t);\n\t}\n\tfor(j=0;j>y[j];\n\t\tcin.get(t);\n\t}\n\tfor(j=0;j<1000;j++)\n\t{\n\t\tfor(k=0;k<=i;k++)\n\t\t{\n\t\t\tif(j>=x[k]&&jmp)\n\t\t\tmp=people[j];\n\t}\n\tcout<m1) m1=c[i];\n}\n\nprintf(\"%d %d\\n\",n,m1);\n\n\n}\n\n"} +{"label": "75", "index": "37445", "code": "int main()\n{\n\tint x[1000 + 10] = {0}, y[1000 + 10] = {0}, presence[1000 + 10] = {0};\n\tint digit, i, j, k, nperson = 0, finaltime = 0;\n\tchar c;\n\tcin >> x[nperson ++];\n\twhile ((c = cin.get()) != '\\n')\n\t{\n\t\tif (c == ',')\n\t\t{\n\t\t\tcin >> digit;\n\t\t\tx[nperson] = digit;\n\t\t\tnperson ++;\n\t\t}\n\t}\n\tnperson = 0;\n\tcin >> y[nperson ++];\n\twhile ((c = cin.get()) != '\\n')\n\t{\n\t\tif (c == ',')\n\t\t{\n\t\t\tcin >> digit;\n\t\t\ty[nperson] = digit;\n\t\t\tnperson ++;\n\t\t\tfinaltime = finaltime > digit ? finaltime : digit;\n\t\t}\n\t}\n\t//cout << nperson;\n\t//for (i = 0; i < nperson; i ++)\n\t//\tcout << x[i] << \" \";\n\t//cout << endl;\n\t//for (i = 0; i < nperson; i ++)\n\t//\tcout << y[i] << \" \";\n\t//cout << endl;\n\n\tfor (i = 0; i < nperson; i ++)\n\t{\n\t\tfor (j = x[i]; j <= y[i] - 1; j ++)\n\t\t\tpresence[j] ++;\n\t}\n\tint maxperson = 0;\n\tfor (i = 0; i < finaltime; i ++)\n\t{\n\t\t//cout << presence[i] << \" \";\n\t\tmaxperson = maxperson > presence[i] ? maxperson : presence[i];\n\t}\n\t//cout << endl;\n\tcout << nperson << \" \" << maxperson << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37446", "code": "\nint main()\n{\nint i,a[1000],b[1000],n=0,t,maxt=0,t1[1000]={0},max=0;\nchar c;\nfor(i=0;;i++)\n{\n scanf(\"%d%c\",&a[i],&c);\n n++;\n if(c!=',')\n break;\n}\nfor(i=0;;i++)\n{\n scanf(\"%d%c\",&b[i],&c);\n if(b[i]>maxt)\n maxt=b[i];\n if(c!=',')\n break;\n}\nfor(t=0;t=a[i])&&(t>inp1>>inp2;\n\n\tint time1[1000],time2[1000];\n\tchar temp[4];\n\n\tint pointer=0;\n\tint people=0;\n\tfor(int k=0;inp1[k]!='\\0';k++)\n\t{\n\t\tif(inp1[k]!=',')\n\t\t{\n\t\t\ttemp[pointer++]=inp1[k];\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttemp[pointer]='\\0';\n\t\t\ttime1[people++]=atoi(temp);\n\t\t\tpointer=0;\n\t\t}\n\t}\n\ttemp[pointer]='\\0';\n\ttime1[people++]=atoi(temp);\n\t\n\tpointer=0;\n\tpeople=0;\n\tfor(int k=0;inp2[k]!='\\0';k++)\n\t{\n\t\tif(inp2[k]!=',')\n\t\t{\n\t\t\ttemp[pointer++]=inp2[k];\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttemp[pointer]='\\0';\n\t\t\ttime2[people++]=atoi(temp);\n\t\t\tpointer=0;\n\t\t}\n\t}\n\ttemp[pointer]='\\0';\n\ttime2[people++]=atoi(temp);\n\n\tint max=0;\n\tfor(int k=0;k!=1000;k++)\n\t{\n\t\tint counter=0;\n\t\tfor(int i=0;i!=people;i++)\n\t\t{\n\t\t\tif(k>=time1[i]&&kmax)\n\t\t\tmax=counter;\n\t}\n\tcout<=t1[i]&&xm) m=count;\n}\n"} +{"label": "75", "index": "37449", "code": "\nint main( )\n{\n\tint time,count=0,a[1001]={0},i;\n\tchar b;\n\twhile(1)\n\t{\n\t\tcin>>time;\t\n\t\ta[time]++;\n\t\tcount++;\t\n\t\tif(cin.get()!=',')\n\t\t\tbreak;\n\t}\t\n\tfor(i=0;i>time>>b;\n\t\ta[time]--;\n\t}\n\tint max=0,renshu=0;\n\tfor(i=0;i<1001;++i)\n\t{\n\t\trenshu+=a[i];\n\t\tif(renshu>max)\n\t\t\tmax=renshu;\n\t}\n\tcout<> x[num] ;\n\t\tnum++ ;\n\t}\n\twhile ( ( c = cin.get() ) == ',' ) ; //??xi????\n\tnum = 0 ;\n\tdo\n\t{\n\t\tcin >> y[num] ;\n\t\tnum++ ; //?????\n\t}\n\twhile ( ( c = cin.get() ) == ',' ) ; //??yi????\n\tmax = 0 ;\n\n\tfor ( i = 0 ; i <= num - 1 ; i ++ )\n\t{\n\t\tfor ( int j = x[i] ; j < y[i] ; j++ )\n\t\t{\n\t\t\tt[j]++ ; //??????\n\t\t\tif ( t[j] > max )\n\t\t\t\tmax = t[j] ;\n\t\t}\n\t}\n\tcout << num << \" \" << max ;\n\treturn 0 ;\n}"} +{"label": "75", "index": "37451", "code": "\nint main()\n{\n const int max_size = 1000;\n int l[max_size], r[max_size];\n for (int i = 0; i < max_size; ++i)\n {\n l[i] = 0;\n r[i] = 0;\n }\n int x, att; char ch;\n \n att = 1;\n cin >> x; ch = cin.get();\n ++ l[x];\n while (ch == ',')\n {\n cin >> x; ch = cin. get();\n ++ l[x];\n ++att; \n }\n cout << att << \" \";\n cin >> x; ch = cin.get();\n ++ r[x];\n while (ch == ',')\n {\n cin >> x; ch = cin.get();\n ++ r[x]; \n }\n \n int ans, num;\n ans = 0; num = 0;\n for (int i = 0; i < max_size; ++i)\n {\n num = num + l[i] - r[i];\n if (num > ans)\n {\n ans = num;\n }\n }\n cout << ans;\n return 0; \n}"} +{"label": "75", "index": "37452", "code": "int main()\n{int i,t,j,n=0,m,a[1001]={0},b[1001]={0};\nchar e;\nscanf(\"%d\",&a[0]);\nm=1;\nscanf(\"%c\",&e);\nwhile(e==',')\n{\tscanf(\"%d\",&a[m]);\n\tm++;\n\tscanf(\"%c\",&e);\n}\nscanf(\"%d\",&b[0]);\nm=1;\nscanf(\"%c\",&e);\nwhile(e==',')\n{\tscanf(\"%d\",&b[m]);\n\tm++;\n\tscanf(\"%c\",&e);\n}\nfor(i=0;i<1000;i++)\n{\tt=0;\n\tfor(j=0;j=a[j]&&in)\n\t\tn=t;\n}\nprintf(\"%d %d\",m,n);\nreturn 0;\n}\n"} +{"label": "75", "index": "37453", "code": "//**************************\n//*???????? **\n//*?????? 1200012888 **\n//*???2013.10.30**\n//**************************\nint main()\n{\n\tchar c ;\t\t\t\t\t\t\t//????????c ?????\n\tint start[1000] = {0} ;\t\t\t\t//????????start \n\tint end[1000] = {0} ;\t\t\t\t//????????end\n\tint person[1000] = {0} ;\t\t\t//??????person\n\tint count = 0 ;\t\t\t\t\t\t//???? count ??????\n\twhile(1)\n\t{\n\t\tcin >> start[count] ;\t\t\t//????????\n\t\tc = cin.get() ;\t\t\t\t\t//???????c\n\t\tcount ++ ;\t\t\t\t\t\t//???+1\n\t\tif (c != ',')\t\t\t\t\t//??c??','??????????\n\t\t{\n\t\t\tbreak ;\t\t\t\t\t\t//????\n\t\t}\n\t}\n\tfor (int i = 0 ; i < count ; i++)\t//????????\n\t{\n\t\tif (i < count - 1)\t\t\t\t\n\t\t{\n\t\t\tcin >> end[i] ;\n\t\t\tcin >> c ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcin >> end[i] ;\n\t\t}\n\t}\n\tfor (int i = 0 ; i < 1000 ; i++)\t//??????????????\n\t{\n\t\tfor (int j = start[i] ; j < end[i] ; j ++)\n\t\t{\n\t\t\tperson[j] ++ ;\t\t\t\t\n\t\t}\n\t}\n\tint max = 0 ;\n\tfor (int i = 0 ; i < 1000 ; i++)\t//?????????????\n\t{\n\t\tif (max < person[i])\n\t\t{\n\t\t\tmax = person[i] ;\n\t\t}\n\t}\n\tcout << count << \" \" << max << endl ;\n\t\t\t\t\t\t\t\t\t\t//?? ????? ? ???????????\n\treturn 0 ;\n\n}"} +{"label": "75", "index": "37454", "code": "int main()\n{\n char x0[4000],y0[4000];\n int x[1000]={0},y[1000]={0},people,i,j=0,num[1000]={0},nummax=0,c=0;\n int min=2000,max=0;\n scanf(\"%s\",x0);\n scanf(\"%s\",y0);\n for(i=0;i<=(strlen(x0)-1);i++)\n {\n if((x0[i]>='0')&&(x0[i]<='9'))\n c=c*10+x0[i]-'0';\n else\n {\n x[j++]=c;\n c=0;\n }\n if(i==(strlen(x0)-1))\n {\n x[j++]=c;\n c=0;\n }\n }\n j=0;c=0;\n for(i=0;i<=strlen(y0)-1;i++)\n {\n if((y0[i]>='0')&&(y0[i]<='9'))\n\t\tc=c*10+y0[i]-'0';\n else\n {\n y[j++]=c;\n c=0;\n }\n if(i==(strlen(y0)-1))\n {\n y[j++]=c;\n c=0;\n }\n }\n people=j;\n for(i=0;i<=(people-1);i++)\n {\n if(x[i]max)\n max=y[i];\n }\n for(i=min;i<=max;i++)\n {\n for(j=0;j<=people-1;j++)\n {\n if((i>=x[j])&&(inummax)\n nummax=num[i];\n }\n printf(\"%d %d\",people,nummax);\n}"} +{"label": "75", "index": "37455", "code": "int tr(char a[],int b[])\n{\n\tint l,i,j=1;\n\tl=strlen(a);\n\tfor(i=0;i> intime[num];\n\t\tnum++;\n\t\tdot = cin.get();\n\t} // ?????num??+1?????num?????\n\tfor(int i = 0; i < num; i++) // ??????????????????timeline??????????????\n\t{\n\t\tcin >> outtime;\n\t\touttimemax = outtime > outtimemax? outtime : outtimemax; // ????????????\n\t\tfor(int j = intime[i]; j < outtime; j++)\n\t\t\ttimeline[j]++; // ????????????timeline?\n\t\tcin.get(); // ????????\n\t}\n\tfor(int i = 0; i < outtimemax; i++)\n\t{\n\t\ttimenum = timeline[i] > timenum? timeline[i] : timenum; // ???????\n\t}\n\tcout << num << ' ' << timenum;\n\treturn 0;\n}"} +{"label": "75", "index": "37457", "code": "void main()\n{\n\tint n,t=0,i=0,j=0,x[1000],y[1000],m[1000]={0};\n\tchar c=',';\n\twhile(c!='\\n')\n\t{\n\t\tscanf(\"%d%c\",&x[i++],&c);\n\t}\n\tc=',';\n\twhile(c!='\\n')\n\t{\n\t\tscanf(\"%d%c\",&y[j++],&c);\n\t}\n\tn=j;\n\tfor(i=0;i<1000;i++)\n\t{\n\t\tfor(j=0;ji)\n\t\t\t\tm[i]++;\n\t}\n\tfor(i=0;i<1000;i++)\n\t\tif(m[i]>t)\n\t\t\tt=m[i];\n\tprintf(\"%d %d\",n,t);\n}\n"} +{"label": "75", "index": "37458", "code": "//****************************************\n//*??????? **\n//*?????? 1100012763 **\n//*???2011.11.14 **\n//****************************************\nint main() \n{\n\tint count , i , j , ans;\n\tint a[L] , b[L] , num[L];\n\tchar zifu;\n\n\tcount = 0;\n\twhile (1)\n\t{\n\t\tcount++;\n\t\tcin >> a[count];\n\t\tzifu = cin.get();\n\t\tif (zifu == 10)\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i <= count; i++)\n\t{\n\t\tcin >> b[i];\n\t\tzifu = cin.get();\n\t}\n\tans = 0;\n\tfor (i = 1; i <= L; i++)\n\t\tnum[i] = 0;\n\tfor (i = 1; i <= count; i++)\n\t{\n\t\tfor (j = a[i]; j ans)\n\t\t\t\tans = num[j];\n\t\t}\n\t}\n\tcout << count << ' ' << ans;\n\treturn 0;\n}"} +{"label": "75", "index": "37459", "code": "\nint main()\n{\n\tint x1[1001] = {0}, y1[1001] = {0}, i, j = 1, k = 1, sum, lenx, leny, max = 0, count;\n\tchar x[10000], y[10000];\n\tcin.getline(x, 10000);\n\tcin.getline(y, 10000);\n\tlenx = strlen(x);\n\tleny = strlen(y);\n\tfor (i = 0; i <= lenx - 1; i++)\n\t{\n\t\tif (x[i] != ',')\n\t\t\tx1[j] = x1[j] * 10 + (x[i] - '0');\n\t\telse\n\t\t\tj++;\n\t}\n\tfor (i = 0; i <= leny - 1; i++)\n\t{\n\t\tif (y[i] != ',')\n\t\t\ty1[k] = y1[k] * 10 + (y[i] - '0');\n\t\telse\n\t\t\tk++;\n\t}\n\tsum = j;\n\tfor (k = 1; k <= 1000; k++)\n\t{\n\t\tcount = 0;\n\t\tfor (j = 1; j <= sum; j++)\n\t\t\tif (x1[j] <= k && y1[j] > k)\n\t\t\t\tcount += 1;\n\t\tif (count > max)\n\t\t\tmax = count;\n\t}\n\tcout << sum << \" \" << max << endl;\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37460", "code": "int main()\n{\n int time, count = 0;\n int a[1001] = {0};\n while (1)\n {\n cin >> time;\n a[time]=a[time] + 1;//???????????????1\n count=count + 1;\n if (cin.get() != ',')\n break;\n }\n int i;\n char c;\n for (i=0; i> time >> c;\n a[time]=a[time] - 1;//???????????????1\n }\n int p= 0, max = 0;\n for (i=0; i<1001; ++i)\n {\n p = p + a[i];\n if (p > max)//???????????????\n max = p;\n }\n cout << count << ' ' << max << endl;\n return 0;\n}\n\n"} +{"label": "75", "index": "37461", "code": "//********************************\n//*???????? **\n//*?????? 1300012773 **\n//*???2013.10.30 **\n//********************************\nint x[1000], y[1000], t[1000];\nint main()\n{\n\n int num, h = 1, max = 1;\n char ch;\n int T = 0;\n\n for(num = 0;;)\n {\n cin >> x[num];\n t[x[num]]++;\n ch = cin.get();\n if(ch != ',')break;\n num ++;\n \n }\n\n cout << num + 1;\n\n for(int i = 0; i <= num; i++)\n {\n cin >> y[i];\n t[y[i]]--;\n ch = cin.get();\n }\n for(int i = 0; i < 1000; i++)\n {\n T += t[i];\n if(T > max)max = T;\n }\n \n if(T != 0)cout <<\"gan shabi\";\n \n cout << ' ' << max;\n return 0;\n}\n"} +{"label": "75", "index": "37462", "code": "int main()\n{ int a[1000]={0},b[1000]={0},count[1001]={0};\n int i,j=1,n,max;\n char c;\n for(i=1;i<=1000;i++)\n { cin>>a[j++];\n cin.get(c);\n if(c==',') ;\n else break;\n } n=j-1;\n j=1;\n for(i=1;i<=1000;i++)\n {cin>>b[j++];\n cin.get(c);\n if(c==',') ;\n else break;\n \n }\n for(i=1;i<=n;i++)\n {for(j=a[i];jmax) max=count[i];\n }\n\n\n cout<='0'&&a[i]<='9')\n\t {x[j]=a[i]-'0'+x[j]*10;}\n\t else if(a[i]==',')j++;\n\t else break;\n }\n k=0;\n for(i=0;i='0'&&b[i]<='9')\n\t {y[k]=b[i]-'0'+y[k]*10;}\n\t else if(b[i]==',')k++;\n\t else break;\n }\n minx=x[0];maxx=y[0];\n for(i=0;imaxx)maxx=y[i];\n }\n for(j=minx;j=x[i]&&jsum2)sum2=temp3;//?????????sum2\n } \n cout<> start[0];\n\tch = cin.get();//??????\n\ti = 0;\n\twhile(ch == ',')//???????????\n\t{\n\t\ti++;\n\t\tcin >> start[i];\n\t\tch = cin.get();\n\t}\n\tcin >> end[0];\n\tch = cin.get();\n\tj = 0;\n\twhile(ch == ',')\n\t{\n\t\tj++;\n\t\tcin >> end[j];\n\t\tch = cin.get();\n\t}\n\tcout << i + 1 << \" \";//?????\n\tfor(n = 0; n <= i;n++)\n\t\tfor(k = start[n]; k < end[n]; k++)\n\t\t\ttime[k]++;//????????1\n\tfor(m = 0; m <= 999; m++)\n\t\tif(time[m] > time[m+1])\n\t\t{\n\t\t\ttemp = time[m];\n\t\t\ttime[m] = time[m+1];\n\t\t\ttime[m+1] = temp;//?????????????????\n\t\t}\n\tcout << time[999] << endl;//??????\n\treturn 0;\n}"} +{"label": "75", "index": "37465", "code": "struct ans\n{\n\tint x;\n\tint y;\n};\nint main()\n{\n\tstruct ans a[1000];\n\tint b[1000];\n int x1;\n\tint y1;\n\tint max=0,min=1000;\n\tchar c;\n\tchar c2[1000];\n\tint i=0,j,n=0,m;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d\",&x1);\n\t\tscanf(\"%c\",&c);\n\t\tif(x1max) max=x1;\n\t\tscanf(\"%c\",&c);\n\t\ta[i].y=x1;\n\t\tif(c!=',')\n\t\t\tbreak;\n\t}\n\tfor(i=min;i<=max;i++)\n\t\tb[i]=0;\n\tfor(i=0;ij) b[j]++;\n\t\t}\n\t}\n\tm=0;\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tif(m> x;\n\tfor (i=x; i<1000; i++)\n\t\ta[i]+=1;\n\twhile ((ex=cin.get())==',') //???????????\n\t{\n\t\tcin>>x;\n\t\tn++; //????????????1\n\t\tfor (i=x;i<1000;i++) //???????????????????1???????????????\n\t\t\ta[i]++;\n\t}\n\tcin >>y;\n\tfor (i=y;i<=999;i++)\n\t\ta[i]--;\n\tfor (k=1;k<=n-1;k++)\n\t{\n\t\tcin >> ex >> y;\n\t\tfor (i=y;i<=999;i++) //???????1???\n\t\t\ta[i]--;\n\t}\n\tmax=a[0];\n\tfor (i=1;i<=999;i++)\n\t\tif(a[i]>max)\n\t\t\tmax=a[i]; //max?a[1000]?????\n\tcout<>tin[n++]) //????????????????\n\t{\n\t\tif(cin.get()=='\\n') //?cin.get???????????\n\t\t\tbreak;\n\t}\n\tfor(i=0;i>tout[i];\n\t\tcin.get();\n\t}\n\tfor(i=0;imax)\n\t\t\tmax=time[i];\n\tcout<>arrivetime[i];\n\t\ti++;\n\t}while(cin.get()!='\\n');\n\tdo{\n\t\tcin>>leavetime[j];\n\t\tj++;\n\t}while(cin.get()!='\\n');\n\tint tpi,Endtime,Time,bein=0,mostbein=0;\n\ttpi=i;\n\tEndtime=leavetime[0];\n\tfor(k=1;k> x[i++];\n\t\ttemp = cin.get();\n\t\tif (temp == 10)\n\t\t\tbreak;\n\t}\n\ti = 0;\n\twhile(1)\n\t{\n\t\tcin >> y[i++];\n\t\ttemp = cin.get();\n\t\tif (temp == 10)\n\t\t\tbreak;\n\t}\n\tn = i;//???,i?0??\n\tout_max = 0;\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tif (out_max < y[i])\n\t\t\tout_max = y[i];\n\t}//?????????\n\tfor (i = 0; i < out_max; i++)\n\t\tfor (j = 0; j < n; j++)\n\t\t{\n\t\t\tif (x[j] <= i)\n\t\t\t\tr[i]++;\n\t\t\tif (y[j] <= i)\n\t\t\t\tr[i]--;\n\t\t}//??????????\n\tmax = r[0];\n\tfor (i = 0; i < out_max; i++)\n\t{\n\t\tif (max < r[i])\n\t\t\tmax = r[i];\n\t}//????????????\n\tcout << n << \" \" << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37470", "code": "\n\nint main()\n{\n int timepoint[1000]={0};//????????\n\n int npeople=0;//???\n char ch[10000]={'\\0'};//???? ?????\n int intime[1000]={0},outtime[1000]={0};\n char intimech[1000][1000],outtimech[1000][1000];\n\n for(int i=0;i<=999;i++)\n for(int j=0;j<=999;j++)\n {\n intimech[i][j]='\\0';\n outtimech[i][j]='\\0';\n }//?????\n\n cin.getline(ch,10000);//???????????????\n int i1=0,i2=0;\n for(int i=0;i<=strlen(ch);i++)\n {\n if(ch[i]!=',')\n {\n intimech[i1][i2]=ch[i];\n i2++;\n }\n if(ch[i]==',')\n {\n i1++;\n i2=0;\n npeople++;//?????????\n }\n }//???????????????????????????\n npeople=npeople+1;\n for(int i=0;i<=npeople-1;i++)\n {\n intime[i]=atoi(intimech[i]);\n }//?????????????????????????\n/////////////////////////////////////????????\n\n memset(ch,'\\0',10000);//??????\n\n cin.getline(ch,10000);//???????????????\n i1=0;i2=0;\n for(int i=0;i<=strlen(ch);i++)\n {\n if(ch[i]!=',')\n {\n outtimech[i1][i2]=ch[i];\n i2++;\n }\n if(ch[i]==',')\n {\n i1++;\n i2=0;\n }\n }//???????????????????????????\n for(int i=0;i<=npeople-1;i++)\n {\n outtime[i]=atoi(outtimech[i]);\n }//?????????????????????????\n/////////////////////////////////////????????\n\n for(int i=0;i<=npeople-1;i++)\n {\n for(int j=intime[i];j<=outtime[i]-1;j++)\n {\n timepoint[j]++;\n }//?????????????????? ?????1\n }\n\n int max=0;\n for(int i=0;i<=999;i++)\n {\n if(timepoint[i]>max)max=timepoint[i];\n }//??????\n\n cout<> x[i] ;\n\t\tcont ++;//??\n\t\tch = cin.get();//?????\n\t\ti++;\n\t}\n\twhile (ch == ',');//??????\n\ti = 1;\n\tdo\n\t{\n\t\tcin >> y[i];\n\t\tch= cin.get();\n\t\ti++;\n\t}\n\twhile (ch == ',');\n\tfor (i = 1; i <= cont; i++)\n\t{\n\t\tfor (j=x[i]; j m)//????????\n\t\t\tm = t[j];\n\t}\n\tcout << cont <<\" \"<< m;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37472", "code": "int main()\n{\n\tint t1[1000]={0}, p=0, max=0, n;\n\tint t2[1000]={0};\n\tchar time1[100000], time2[100000];\n\tint i =1, j, k, l, m=0, ct=0;\n\tcin.getline(time1, 100000);\n\tcin.getline(time2, 100000);\n\tfor(l=0; time1[l]>0; l++)\n\t{\n\t\tif(time1[l]==',')\n\t\t{\n\t\t\tm++;\n\t\t\tp++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt1[m]=t1[m]*10+time1[l]-48;\n\t\t}\n\t}\n\tm=0;\n\tfor(l=0; time2[l]>0; l++)\n\t{\n\t\tif(time2[l]==',')\n\t\t{\n\t\t\tm++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt2[m]=t2[m]*10+time2[l]-48;\n\t\t}\n\t}\n\tfor (j = 0; j<=999; j++)\n\t{\n\t\tn=0;\n\t\tfor (k = 0; k<=p; k++)\n\t\t{\n\t\t\tif(j=t1[k])\n\t\t\t{\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\t\tif (max>a[i];\n\t\tif(cin.get()=='\\n')\n\t\t\tj++;\n\t\tif(j==2)\n\t\t\tbreak;\n\t}\n\tfor(;c<=998.5;)\n\t{\n\t\tfor(j=0;j<=(i-1)/2;j++)\n\t\t{\n\t\t\tif(a[j]c)\n\t\t\t\ttemp++;\n\t\t}\n\t\tif(temp>max)\n\t\t\tmax=temp;\n\t\ttemp=0;\n\t\tc++;\n\t}\n\tcout<<(i+1)/2<<\" \"<>x[0];\n\twhile(cin.get()==',')\n\t{\n\t\tcin>>x[i+1];\n\t\ti++;\n\t}\n\tcin>>y[0];\n\ti=0;\n\twhile(cin.get()==',')\n\t{\n\t\tcin>>y[i+1];\n\t\ti++;\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//????????????\n\tnum=i+1;\n\tfor(i=0;i<1000;i++)\t\t\t\t\t\t\t\t\t\t\t\t//?????????????\n\t{\n\t\tfor(j=0;j=x[j]&&(i+0.5)max)\t\t\t\t\t\t\t\t\t\t\t//????????\n\t\t\tmax=present[i];\n\t}\n\tcout<> a[i][0];\n\t\ti++;\n\t\tif ((ch = cin.get()) == '\\n')\n\t\t\tbreak;\n\t}\n\ti = 0;\n\twhile(1)\n\t{\n\t\tcin >> a[i][1];\n\t\ti++;\n\t\tif ((ch = cin.get()) == '\\n')\n\t\t\tbreak;\n\t}\n\tfor (temp = 0.5; temp < 1000; temp++)\n\t{\n\t\tcount = 0;\n\t\tfor (j = 0; j < i; j++)\n\t\t\tif (temp > a[j][0] && temp < a[j][1])\n\t\t\t\tcount++;\n\t\tif (count > max)\n\t\t\tmax = count;\n\t}\n\tcout << i << ' ' << max;\n\treturn 0;\n}"} +{"label": "75", "index": "37476", "code": "/*\n *???: party.cpp\n *??: ???\n *????: 2012-11-09\n *??: \n */\n\n\n\nint main()\n{\n\tint times[1000]={0};\n\tint start[1000],end[1000];\n\tint nPeople=0,mostPeople;\n\tchar str[10000];\n\tcin.getline(str,sizeof(str));\n\tint readnum=0;\n\tfor (int i=0; ;i++){\n\t\tswitch(str[i]){\n\t\t\tcase ',':\n\t\t\tcase '\\0':\n\t\t\t\tstart[nPeople++]=readnum;\n\t\t\t\treadnum=0;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treadnum=readnum*10+str[i]-'0';\n\t\t}\n\t\tif (!str[i])\n\t\t\tbreak;\n\t}\n\tfor (int i=0;imostPeople)\n\t\t\tmostPeople=times[i];\n\t}\n\tcout << nPeople << ' ' << mostPeople << endl;\n}\n\n\n"} +{"label": "75", "index": "37477", "code": "main()\n{\n\tint a[1001],b[1001],c[1000]={0},i,j,k=0,max,num=0;\n\tchar n;\n\twhile((n=getchar())!='\\n')\n\t{\n\t\tif(n>='0'&&n<='9')\n\t\t{\n\t\t\tnum=num*10+n-'0';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tk++;\n\t\t\ta[k]=num;\n\t\t\tnum=0;\n\t\t}\n\t}\n\tk++;\n\ta[k]=num;\n\tnum=0;\n\tk=0;\n\twhile((n=getchar())!='\\n')\n\t{\n\t\tif(n>='0'&&n<='9')\n\t\t{\n\t\t\tnum=num*10+n-'0';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tk++;\n\t\t\tb[k]=num;\n\t\t\tnum=0;\n\t\t}\n\t}\n\tk++;\n\ta[k]=num;\n\tnum=0;\n\tfor(i=0;i<=999;i++)\n\t{\n\t\tfor(j=1;j<=k;j++)\n\t\t{\n\t\t\tif(i>=a[j]&&(i+1)<=b[j])\n\t\t\t\tc[i]++;\n\t\t}\n\t}\n\tmax=c[0];\n\tfor(i=1;i<=999;i++)\n\t{\n\t\tif(max> a[i];\n\t\tsum++;\n\t\tx=cin.get();\n\t\tif(x!=',')break;\n\t}\n\tfor(i=1;i<=sum;i++)\n\t{\n\t\tcin >> b[i];\n\t\tcin.get();\n\t}\n\tfor(i=1;i<=sum;i++)\n\t{\n\t\tfor(j=a[i];jmax) max=time[j];\n }\n printf(\"%d %d\",n,max);\n \n /*for(i=0;i> x[num])\n\t{\n\t\ta = cin.get();\n\t\tif (a != ',')\n\t\tbreak;\n\t\tnum++;\n\t}\n\tcin >> y[1];\n\tfor (int i = 2; i <= num; i++)\n\t{\n\t\tcin.get();\n\t\tcin >> y[i];\n\t}\n\tcout << num << \" \";\n\tfor (int i = 1; i <= num; i++)\n\tfor (int j = x[i]; j < y[i]; j++)\n\tn[j]++;\n\tfor (int i = 1; i <= 1000; i++)\n\tif (max < n[i])\n\tmax = n[i];\n\tcout << max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37481", "code": "\nvoid main()\n{\n int x[1000],y[1000],t[1000]={0};\n int n=0,i,j,max=0;\n do{\n scanf(\"%d\",&x[n++]);}\n while(getchar()==',');\n n=0;\n do{\n scanf(\"%d\",&y[n++]);}\n while(getchar()==',');\n for(i=0;ibest) best=ans;\n }\n printf(\"%d,%d\\n\",n,best);*/\n memset(v,0,sizeof(v));\n for (int i=1;i<=n;i++)\n for (int j=x[i];jbest) best=v[j];}\n printf(\"%d %d\\n\",n,best);\n}\n"} +{"label": "75", "index": "37483", "code": "/**\n* @file homework.cpp\n* @author ??\n* @date 2010?11?26\n* @description\n* ??????: ????? \n*/\nint main()\n{\n\tint a[2000][2], i=0, j=0, k, l, l1, l2, m, n, maxt, mint, q, g=0, max=0; //????\n\tchar b[9000], c[9000]; //??????????\n\tcin.getline(b,9000,'\\n');\n\tcin.getline(c,9000,'\\n'); //??\n\tl1 = strlen(b);\n\tl2 = strlen(c);\n\tfor (k=0;k a[k][0])\n\t\t\tmint = a[k][0];\n\t\tif (maxt < a[k][1])\n\t\t\tmaxt = a[k][1];\n\t} //????????\n\tfor (k=mint;k<=maxt;k++)\n\t{\n\t\t\t\n\t\t\tg = 0;\n\t\t\tfor (l=0;l k)\n\t\t\t\t\tg++;\n\t\t\t}\n\t\t\tif (max < g)\n\t\t\t\tmax = g;\n\t} //??\n\tcout << i << \" \"<< max; //????\n\treturn 0;\n}"} +{"label": "75", "index": "37484", "code": "int main(void)\n{\n int a[SIZE], l[SIZE], i=1, j, k, t, min, max, maxn;\n scanf(\"%d\", &a[0]);\n min = a[0];\n while (scanf(\",%d\",&a[i++])==1);\n {\n if (a[i-1]max) max=l[j];}\n //printf(\"[%d][%d]\\n\",min,max);\n maxn=0;\n\n for (k=min;k<=max;k++)\n {\n t=0;\n for (j=0;j=a[j])&&(kmaxn)\n maxn=t;\n }\n\n\n printf(\"%d %d\", i-1, maxn);\n return 0;\n}\n"} +{"label": "75", "index": "37485", "code": "//********************************\n//*????? **\n//*????? 1300012848 **\n//*???2013.10.31 **\n//********************************\nint main()\n{\n\tint time[1000] = {0}, x[1000], y[1000], people = 0, max = 0, i = 0, j = 0;\n\tchar c;\n\tdo\n\t{\n\t\tcin >> x[i];\n\t\tc = getchar(); //?????????\n\t\ti++; //??????????\n\t}while(c == ','); //????????????? ???????\n\tdo\n\t{\n\t\tcin >> y[j];\n\t\tc = getchar();\n\t\tj++;\n\t}while(c == ',');\n\tfor (int m = 0; m < i; m++)\n\t\tfor (int k = x[m]; k < y[m]; k++) //????? ??????????????\n\t\t\ttime[k] = time[k] + 1;\n\tfor(int l = 0; l < 1000; l++)\n\t\t{if (max < time[l])\n\t\t\tmax = time[l];}\n\tcout << i << \" \" << max << endl; //i????????????????? max???????????\n\treturn 0;\n}"} +{"label": "75", "index": "37486", "code": "int main()\n{\n\tint time[1001]={0};\n\tint xi[1001];\n\tint yi[1000];\n\tint i=0,n,j;\n\tchar ch=',';\n\n\n\twhile( ch!='\\n' )\n\t{\n\t\tscanf(\"%d\",&xi[i]);\n\t\tch=getchar();\n\t\ti++;\n\t}\n\ti=0;\n\tch=',';\n\twhile( ch!='\\n' )\n\t{\n\t\tscanf(\"%d\",&yi[i]);\n\t\tch=getchar();\n\t\ti++;\n\t}\n\tn=i;\n\n\tfor( i=0;i=max )\n\t\t\tmax=time[i];\n\tprintf(\"%d %d\\n\",n,max);\n\n\t\t\n\n\treturn 0;\n}\n"} +{"label": "75", "index": "37487", "code": "main()\n{\n\tint a[1000],b[1000];\n\tchar c;\n\tint i,j,k,l;\n\tint m;\n\tint min=1000,max=0;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%c\",&a[i],&c);\n\t\tif(a[i]max) max=b[i];\n\t}printf(\"%d\",m);\n\tint t[1500],M;\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tt[i]=0;\n\t\tfor(j=0;ji) t[i]++; \n\t\t}\n\t}\n\tM=t[min];\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tif(t[i]>M) M=t[i];\n\t}\n\tprintf(\" %d\",M);\n}\n"} +{"label": "75", "index": "37488", "code": "int main()\n{\n\tint begin[max], end[max];\n\tint i = 0;\n\tfor (i = 0;; i++)\n\t{\n\t\tcin >> begin[i];\n\t\tchar c = getchar();\n\t\tif (c == '\\n')break;\n\t}\ti++;\n\n\tfor (int j = 0; j < i; j++)\n\t{\n\t\tcin >> end[j];\n\t\tchar c = getchar();\n\t\tif (c == '\\n')break;\n\n\t}\n\n\tcout << i;\n\tint num[1001] = { 0 };\n\tfor (int j = 0; j < i;j++)\n\tfor (int k = begin[j]; k < end[j]; k++)\n\t\tnum[k]++;\n\tint imax = 0;\n\tfor (int j = 0; j < max;j++)\n\tif (num[j]>imax)imax = num[j];\n\tcout <<\" \"<< imax;\n\n\t\n\n\n\n\n\n\n\n}"} +{"label": "75", "index": "37489", "code": "\n\nint main ()\n{\n\tint i,j,m,max=0,a[1001]={0},b[1001]={0},sum[1001]={0},count=0;\n\n\tchar ch;\n\n\twhile(1)\n\t{\n\t\tcin >> a[count] ;\n\t\tcount ++ ;\n\t\tch=cin.get();\n\t\tif (ch!=',')\n\t\t{\n\t\t\tbreak ;\n\t\t}\n\t}\n\tcount=0;\n\twhile(1)\n\t{\n\t\tcin >> b[count] ;\n\t\tcount++;\n\t\tch=cin.get();\n\t\tif (ch!=',')\n\t\t{\n\t\t\tbreak ;\n\t\t}\n\t}\n\tfor (i=0;imax)\n\t\t\tmax=sum[i];\n\t}\n\tcout < max)\n\t\t{\n\t\t\tmax = longtime[y];\n\t\t}\n\t}\n\n\tcout << p << \" \" << max << endl;\n\n\treturn 0;\n\n}\n\n"} +{"label": "75", "index": "37491", "code": "void main()\n{\n\tint time[1000]={0},a[5000],b[5000],i=1,m,max=0,k,n;\n\tscanf(\"%d\",&a[0]);\n\twhile(scanf(\",%d\",&m))\n\t{\n\t\ta[i]=m;\n\t\ti++;\n\t}\n\tscanf(\"%d\",&b[0]);\n\ti=1;\n\twhile(scanf(\",%d\",&m))\n\t{\n\t\tb[i]=m;\n\t\ti++;\n\t}\n\tn=i;\n\tfor(i=0;imax)\n\t\t\tmax=time[i];\n\t}\n\tprintf(\"%d %d\",n,max);\n}\n\n"} +{"label": "75", "index": "37492", "code": "//***********************************************************\n//* name: 5.cpp *\n//* author:?? *\n//* date: 2013-10-30 *\n//* description? ????? *\n//***********************************************************\nint main ()\n{\n\tint a[1000] ={0}, i = 0, d, sum = 0 ,j,max=1;\n\twhile (cin>>d)\n\t{\n\t\ta[i]=d;\n\t\ti++;\n\t\tsum++ ;\n\t\tif(cin.get() == '\\n') break ;\n\t}\n\tint b[1000]={0} ;\n\ti=0 ;\n\twhile ( cin>>d)\n\t{\n\t\tb[i]= d ;\n\t\ti++ ;\n\t\tif(cin.get() == '\\n')break ;\n\t}\n\tint c[1000]={0};\n\tfor(i = 0 ; i < sum ; i++)\n\t{\n\t\tfor (j=a[i];j < b[i] ;j++)\n\t\t{\n\t\t\tc[j]++ ;\n\t\t}\n\t}\n\tfor (j=0;j<1000; j++)\n\t{\t\t\n\t\tif(max < c[j]) max =c[j];\n\t}\n\tcout << sum << ' '<< max << endl;\n\treturn 0;\n}"} +{"label": "75", "index": "37493", "code": "int main()\n{\n\tint come[1000]={0};\n\tint leave[1000]={0};\n\tchar comma;\n\tint i=0;\n\tint j=0;\n\tint total=0;\n\tint together=0;\n\tint count[1000]={0};\n\tcout<>come[i];\n\t\tcomma=cin.get();\n\t\tif(comma==',')\n\t\t\tcontinue;\n\t\telse if(comma=='\\n')\n\t\t{\n\t\t\ttotal=i+1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;;i++)\n\t{\n\t\tcin>>leave[i];\n\t\tcomma=cin.get();\n\t\tif(comma==',')\n\t\t\tcontinue;\n\t\telse if(comma=='\\n')\n\t\t\tbreak;\n\t}\n\tfor(i=0;itogether)\n\t\t{\n\t\t\ttogether=count[j];\n\t\t}\n\t}\n\tcout<>itime[count];\n\t\tcin.get(temp); \n\t\tif(temp!='\\n') count++;\n\t\telse { count++; break;}\n\t}\n\tcount=0;\n\twhile(1) //??????\n\t{\n\tcin>>otime[count];\n\tcin.get(temp);\n\tif(temp!='\\n') count++;\n\telse {count++; break;}\n\t}\n\tfor(i=0;imax ) max=sum[i];\n\t}\n\tcout<>b[i];\n cin.get(qwe[i]);\n if(i==zhongdian*2)\n break;\n if(qwe[i]=='\\n')\n {\n zhongdian=i;\n } \n }\n \n int m=1,n=1;\n for(i=1;i<=zhongdian;i++)\n {\n a[0][m]=b[i];\n m++;\n }\n \n for(i=zhongdian+1;i<=zhongdian*2;i++)\n {\n a[1][n]=b[i];\n n++;\n } //n-1???\n \n /* for(int i=1;ia[0][i])\n min=a[0][i];\n } //max??????,min??????\n int c[1100]={0};\n int j;\n for(i=min;i<=max;i++) //????????????c[i]???\n {\n for(j=1;j=a[0][j])\n c[i]++;\n }\n }\n int MAX=c[min];\n for(i=min+1;i<=max;i++) //????????\n {\n if(MAXda) da=N2[i];\n\treturn da; \n}\n\nvoid main()\n{\n\tint N1[1002],N2[1002];\n\tchar b[1002];\n\tint i,j,num;\n\tfor(i=0;;i++)\n\t{\tscanf(\"%d%c\",&N1[i],&b[i]);\n\t if(b[i]!=',') {num=i+1;break;}\n\t}\n\tfor(i=0;i=N1[j]&&i>start[i];\n\t\tcin.get(sign);\n\t\tif(sign=='\\n') break;\n\t}while(1);\n\tn=i;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tcin>>end[i];\n\t\tcin.get(sign);\n\t}\n\tcout<=start[i]&&timefiguremax) figuremax=figure;\n\t}\n\tcout<> a[0][i] ;\n\t\tm = cin.get();\n\t\tif(m != ',')\n\t\t\tbreak;\n\t}\n\tfor(i = 0; ; i++)\n\t{\n\t\tcin >> a[1][i] ;\n\t\tm = cin.get();\n\t\tif(m != ',')\n\t\t\tbreak;\n\t}\n\tl = i;\n\tfor(i = 1; i < 1001; i++)\n\t\tfor(j = 0; j <= l; j ++)\n\t\t{\n\t\t\tif((a[0][j] <= i) && (i < a[1][j]))\n\t\t\t\tflag[i]++;\n\t\t}\n\tmax = flag[1];\n\tfor(i = 2; i < 1001; i++)\n\t{\n\t\tif(max < flag[i])\n\t\t{\n\t\t\tmax = flag[i];\n\t\t}\n\t}\n\tcout << l + 1 << \" \" << max;\n\treturn 0;\n}\n"} +{"label": "75", "index": "37499", "code": "\nvoid main()\n{\n\tint i,j,a[1000]={0},b[1000]={0},n,cal=0,max=0;\n\tchar ch;\n\tfor (i=0;;i++)\n\t{\n\t\tscanf (\"%d\",&a[i]);\n\t\tscanf (\"%c\",&ch);\n\t\tif (ch==',')\n\t\t\tcontinue;\n\t\telse\n\t\t{\n\t\t\tn=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i=0;;i++)\n\t{\n\t\tscanf (\"%d\",&b[i]);\n\t\tscanf (\"%c\",&ch);\n\t\tif (ch==',')\n\t\t\tcontinue;\n\t\telse\n\t\t\tbreak;\n\t}\n\tfor (i=0;i<1000;i++)\n\t{\n\t\tfor (j=0;j<=n;j++)\n\t\t{\n\t\t\tif (i>=a[j] && imax)\n\t\t\tmax=cal;\n\t\tcal=0;\n\t}\n\tprintf (\"%d %d\",n+1,max);\n}\n"} +{"label": "76", "index": "37500", "code": "int main()\n{\nint i,j,q=0,n;\nint sz[50000][2];\nint sz1[50000];\nscanf(\"%d\",&n);\nfor(i=0;imax)\n{\nmax=sz[i][1];\n}\n\n}\n\nfor(i=0;i0;k--){\n\t\tfor(i=0;ia[i+1]){ t=a[i]; a[i]=a[i+1]; a[i+1]=t;\n\t\t\tt=b[i]; b[i]=b[i+1]; b[i+1]=t;}}}\n\n\t int x=0;\n\n\tfor(i=0;i=a[i+1]&&b[0]=a[i+1]&&b[0]>=b[i+1]) x=0;\n\t\telse {x=1; break;}}\n \nif(x==0) printf(\"%d %d\",a[0],b[0]);\nelse printf(\"no\");\n\n\n \n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\treturn 0;\n}\n\n\n"} +{"label": "76", "index": "37502", "code": "int main(){\n int n,i,a,b,k,s,m;\n int sz[100000];\n scanf(\"%d\",&n);\n for(i=0;isz[k+1]){\n m=sz[k],sz[k]=sz[k+1],sz[k+1]=m;\n }\n }\n }\n a=sz[0],b=sz[2*n-1];\n for(k=0;k=a){\n a=sz2[i+1];\n }\n i=i+2;\n }\n }\n if(a==b){\n printf(\"%d %d\",sz[0],sz[2*n-1]);\n }\n else{\n printf(\"no\");\n }\n return 0;\n}\n\n"} +{"label": "76", "index": "37503", "code": "\nint main()\n{\n int n=0,i=0,j=0,m=0,p=0,k=0,q=0;\n scanf(\"%d\",&n);\n \n int a[50000],b[50000];\n for(i = 0;i <50000;i++)\n {\n a[i] = b[i] = 0;\n }\n for(i=1;i= 1;i--)\n { \n for(j = 1;j < i+1;j++)\n {\n if(a[i]=1;j--)\n {\n if(a[i+1]>b[j])\n continue;\n else\n q=1;\n }\n if(q==0)\n {\n printf(\"no\"); \n scanf(\"%d\",m);\n return 0;\n }\n if(b[i]>k)\n k=b[i]; \n }\n printf(\"%d %d\",a[1],k);\n\n \n //scanf(\"%d\",&n);\n return 0;\n}\n"} +{"label": "76", "index": "37504", "code": "int main()\n{\n\tint n,a[50000],b[50000];\n\tint i,count=0;\n\tscanf(\"%d\",&n);\n\tint min=10000,max=0;\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t}\n\tdouble k;\n\tif(min==max)\n\t\tprintf(\"%d %d\",min,max);\n\telse\n\t{\n\t\tfor(k=min+0.5;ka[i]&&k=y&&x<=z){return 1;}\n\treturn 0;\n\n}\nint main(){\n\n\n\n\tint max,min,start[50000],end[500000],all,i,p,ornot;\n\tmax=0;min=9999;\n\tscanf(\"%d\",&all);\n\tfor(i=0;istart[i]){min=start[i];}}\n\tfor(i=0;iq[i+1]){\n e=q[i+1];\n q[i+1]=q[i];\n q[i]=e;\n e=z[i+1];\n z[i+1]=z[i];\n z[i]=e;\n }\n }\n }\n e=z[0];\n for(k=1;k=e){\n e=z[i];\n }\n }\n if(q[k]<=e){\n f=e;\n g=1;\n }\n else{\n g=0;\n break;\n }\n }\n if(g==1){\n printf(\"%d %d\",q[0],f);\n }\n if(g==0){\n printf(\"no\\n\");\n }\n return 0;\n}\n\n\n\n\n\n\n"} +{"label": "76", "index": "37508", "code": "int main()\n{\nint n,t,w;\nint a[50000],c[50000],d[50000],e[50000];\nint b[50000];\n\nscanf(\"%d\",&n);\nfor(int i=0;id[g+1]){\n w=d[g];\n\t\t d[g]=d[g+1];\n\t\t d[g+1]=w;}\n}\n\tfor(int h=c[n-1]+1;harea[j].start){\n\t\t\t\ttemp=area[i];\n\t\t\t\tarea[i]=area[j];\n\t\t\t\tarea[j]=temp;\n\t\t\t}\n\t\t}\n\t}\n\t\ts=area[0].start;\n\t\te=area[0].end;\n\tfor(i=0;ie){\n\t\t\t\n\t\t\tflag=1;\n break;\n\t\t}\n\t\telse if(area[i].start<=e && e<=area[i].end){\n\t\t\te=area[i].end;\n\t\t}\n\t}\n\tif(flag)\n\t\tprintf(\"no\");\n\telse\n\t\tprintf(\"%d %d\\n\",s,e);\n}\n\n"} +{"label": "76", "index": "37510", "code": "int main()\n{\n int i,j,a[50000],b[50000],c[10000],n,p,q,k;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=b[i]) \n\t\t\tbreak;\n\t\t}\n}\nfor(i=0,p=a[0],q=b[0];iq)\n\t\tq=b[i];\n}\nif(q-p==k)\nprintf(\"%d %d\",p,q);\nelse\nprintf(\"no\");\n\n\n\n\n\t\treturn 0;\n}\n\n\n"} +{"label": "76", "index": "37511", "code": "int main()\n{\n int aa[10001],i,n,a,b,j,a1,a2,s=0,max,bb[10001],min,p;\n scanf(\"%d\",&n);\n min=10000;max=0;\n for (i=0;i<10001;i++) aa[i]=0;\n for (i=0;imax) max=b;\n for (j=a;j=a[i]&&ja[i+1])\n\t\t\t{\n\t\t\t\ts=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=s;\n\t\t\t}\n\t\t}\n\t}\n for(k=1;k<=n;k++)\n\t{\n\t\tfor(i=1;i<=n-k;i++)\n\t\t{\n\t\t\tif(b[i]a[i+1]){\nt=a[i+1];\na[i+1]=a[i];\na[i]=t;}\n}}\nfor(k=1;k<=n;k++){\nfor(i=0;ib[i+1]){\nt=b[i+1];\nb[i+1]=b[i];\nb[i]=b[i+1];\n}}\n}\ns=a[0];\ne=b[n-1];\nl=e-s;\nfor(i=s;imax){\n max=cui[i].y;\n }\n}\nfor(i=min;i<=max;i++){\n sz[i]=1;\n}\nfor(i=0;ia[k+1]){\n e=a[k];\n a[k]=a[k+1];\n a[k+1]=e;\n }\n }\n }\n for(i=0;i<=n;i++){\n for(k=0;k0;t--)\n\t\t{\n\t\t\tif(a[t]0;t--)\n\t\t{\n\t\t\tif(c[t]a[i]*1.0)\n\t\t\t{\n\t\t\t\tsum++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\nif(sum==b[n-1]-a[0])\n\t{\n\t\tprintf(\"%d %d\",a[0],c[n-1]);\n\t}\n\telse\n\t{\n\t\tprintf(\"no\");\n\t}\n\t\n\n\treturn 0;\n}"} +{"label": "76", "index": "37518", "code": "int main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tint a[51000],b[51000];\n\tint i;\n\tfor(i=1;i<=n;i++)\n\t\tscanf(\"%d%d\",&a[i],&b[i]);\n\tint k,e;\n\tfor(k=1;ka[i+1])\n\t\t\t{\n\t\t\t\te=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=e;\n\t\t\t\te=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=e;\n\t\t\t}\n\t\t}\n\t}\n\tint c[51000];\n\tc[1]=a[1];\n\tfor(i=2,k=2;i<=n;i++)\n\t{\n\t\tif(a[i]!=a[i-1])\n\t\t{\n\t\t\tc[k]=a[i];\n\t\t\tk++;\n\t\t}\n\t}\n\tk--;\n\tint j;\n\tint d[51000]={0};\n\tfor(i=1;i<=k;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif(a[j]==c[i])\n\t\t\t{\n\t\t\t\tif(d[i]d[i+1])\n\t\t\td[i+1]=d[i];\n\t}\n\tint count=0;\n\tfor(i=2;i<=k;i++)\n\t{\n\t\tif(c[i]<=d[i-1])\n\t\t\tcount++;\n\t}\n\tif(count==(k-1)){\n\t\tprintf(\"%d %d\",c[1],d[k]);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37519", "code": "int main()\n{\n\tint n,d=1,i,j,min,max=0;\n\tint qd[50000],zd[50000],sz[50000]={0};\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax){\n\t\t\tmax=zd[i];\n\t\t}\n\t}\n for(i=0;it){\n t=i;\n }\n } \n }\n for(j=s;j<=t;j++){\n if(sz[j]==0){\n st++;\n }\n }\n if(st==0){printf(\"%d %d\",s-1,t);}\n else {printf(\"no\");}\n return 0;\n}\n"} +{"label": "76", "index": "37521", "code": "int main ()\n{\n\tint n,i,j,k,a,b,min;\n\tint sz[50000],sc[50000];\n\tscanf (\"%d\",&n);\n\tmin=n-1;\n\tfor (i=0;i=i;j--)\n\t\t{\n\t\t\tif (sz[j]ma)\n\t\t\tma=b[i];\n\t}\n\tfor(i=mi;ib[j+1]){\n b[j+1]=b[j];\n }\n }\n x=a[n-1];\n y=b[n-1];\n for(double o=x;o<=y;o+=0.5){\n for(int q=0;q=aa[q]&&o<=bb[q]){\n pdz+=1;\n break;\n }\n else {\n pdz=0;\n }\n }\n if(pdz==0){\n break;\n }\n }\n if(pdz==0){\n printf(\"no\");\n }\n else {\n printf(\"%d %d\",x,y);\n }\n return 0;\n}\n\n\n\n"} +{"label": "76", "index": "37524", "code": " \n \nint main()\n{\n\tint i,j,k=0,n;\n\tint A[5000],B[5000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;j--)\n\t{\n\t\tfor(i=0;iA[i+1])\n\t\t\t{\n\t\t\t\tint tap;\n\t\t\t\ttap=A[i];\n\t\t\t\tA[i]=A[i+1];\n\t\t\t\tA[i+1]=tap;\n\t\t\t int tbp;\n\t\t\t\ttbp=B[i];\n\t\t\t\tB[i]=B[i+1];\n\t\t\t\tB[i+1]=tbp;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;jB[j+1])\n\t\t{\n\t\t\tint tmp;\n\t\t\ttmp=B[j];\n\t\t\tB[j]=B[j+1];\n\t\t\tB[j+1]=tmp;\n\t\t}\n\t}\n\tfor(i=0;imax)\n\t\t\tmax=b;\n\t\tfor(j=a+1;ja)\n p=a;\n if(qsz1[j+1])\n\t\t\t{\n\t\t \tmc=sz1[j];\n sz1[j]=sz1[j+1];\n\t\t\t\tsz1[j+1]=mc;\n\t\t\t\tmc=sz2[j];\n sz2[j]=sz2[j+1];\n\t\t\t\tsz2[j+1]=mc;\n\t\t\t}\n\t\t}\n\t}\n for(j=2;jsz2[l])\n\t\t\t go++;\n\t\t}\n\t\tif(go==j-1)\n\t\t\tbreak;\n\t}\n\tif(go==j-1)\n\t\tprintf(\"no\");\n\telse if(go!=j-1)\n\t{\n\t\tfor(l=1;lsz2[j+1])\n\t\t\t\t{\n\t\t\t\t\tmc=sz2[j];\n sz2[j]=sz2[j+1];\n\t\t\t \tsz2[j+1]=mc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t \tprintf(\"%d %d\", sz1[1], sz2[n+1]);\n\t}\n\treturn 0;\n} "} +{"label": "76", "index": "37528", "code": "int main()\n{\n\tstruct point\n\t{\n\t\tint a,b;\n\t}\n\tc[50001],t;\n\tint n,i,j;\n\tscanf(\"%d\",&n);\n\tfor (i=1;i<=n;i++) scanf(\"%d%d\",&c[i].a,&c[i].b);\n\tfor (i=1;ii;j--)\n\t {\n \t\t if (c[j].aen) en=c[i].b;\n if (enmax)\n\t\t\tmax=sz[a][1];\n\t}\n\n//??\n\tint qj[10000];\n\tint e=min;\n\tfor(int b=0;b=qj[t+1])\n\t\t\t\tqj[t]=0;\n\t\t}\n\t}\n\tint w=0;\n\tfor(int d=0;da[i+1])\n\t {\n\t t=a[i];\n\t\ta[i]=a[i+1];\n\t\ta[i+1]=t;\n\t\te=b[i];\n\t\tb[i]=b[i+1];\n\t\tb[i+1]=e;\n\t }\n\t}\n }\n for(i=0;ib[i+1])&&(i!=n-1))\n\t {\n\t t=b[i];\n\t b[i]=b[i+1];\n\t b[i+1]=t;\n\t }\n }\n }\n if(i==n)\nprintf(\"%d %d\",a[0],b[n-1]);\n return 0;\n}"} +{"label": "76", "index": "37531", "code": "int main(){\nint n,i,s,m,t;\nscanf(\"%d\",&n);\nint a[50000],b[50000];\nfor(i=0;ia[i]){\ns=a[i];\n}\n}\nfor(i=0;ia[i]&&emax)\n max=line[i].y;\n }\n int a[max-min+1];\n for (i=0;i<=max-min;i++)\n a[i]=1;\n for (i=0;i<=n-1;i++)\n {\n for (j=line[i].x-min;j<=line[i].y-min-1;j++)\n a[j]=0;\n }\n int flag=1;\n for (i=0;i<=max-min-1;i++)\n {\n if (a[i]!=0)\n flag=0;\n }\n if (flag==0)\n printf(\"no\");\n else\n printf(\"%d %d\",min,max); \n return 0;\n}\n"} +{"label": "76", "index": "37533", "code": "int main()\n{\n int a[50000],b[50000],n,c[10000],i,j,x=0,y=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<10000;i++) c[i]=0;\n\tfor(i=0;i=a[i])&&(j=a[i]) x=a[i];\n\t\tif(y<=b[i]) y=b[i];\n\t}\n\tj=0;\n\tfor(i=x;ia[i+1]){\n\t\t\te=a[i+1];\n\t\t\ta[i+1]=a[i];\n\t\t\ta[i]=e;\n\t\t\tf=b[i+1];\n\t\t\tb[i+1]=b[i];\n\t\t\tb[i]=f;\n\t\t}\n\t}\n\t}\n\tm=b[0];\n\tfor(i=0;id){\n\t\t\td=b[i];\n\t\t}\n\t}\n\tif(d==m){\n\t\tprintf(\"%d %d\",c,d);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37535", "code": "int main()\n{\n\tint n,a[50000],b[50000],i,j,t,max,min;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j])\n\t\t\t{\n\t\t\t\tt=a[i];\n\t\t\t\ta[i]=a[j];\n\t\t\t\ta[j]=t;\n\t\t\t\tt=b[i];\n\t\t\t\tb[i]=b[j];\n\t\t\t\tb[j]=t;\n\t\t\t}\n\t\t}\n\t}\n\tmin=a[0];\n\tmax=b[0];\n\tj=1;\n\tfor(i=1;i=min)) \n\t\t{\tmin=a[i];\n\t\t j++;\n\t\t}\n\t\telse if((b[i]>max)&&(a[i]<=max)) \n\t\t{\n\t\t\tmax=b[i];\n\t\t\tj++;\n\t\t}\n\t\telse if((a[i]==min)||(b[i]==max)) \n\t\t\tj++;\n\t\telse if((a[i]>min)&&(b[i]max)\n\t\t{\n\t\t\tmax=b[i];\n\t\t}\n\t\tif(a[i]b)\n\t\t\tb=f[i];\n\t\tif(g[i]>b)\n\t\t\tb=g[i];\n\t}\n\tfor(j=n-1;j>0;j--)\n\t{\n\t\tfor(i=0;if[i+1])\n\t\t\t{\n\t\t\t\te=f[i];\n\t\t\t\tf[i]=f[i+1];\n\t\t\t\tf[i+1]=e;\n\t\t\t\te=g[i];\n\t\t\t\tg[i]=g[i+1];\n\t\t\t\tg[i+1]=e;\n\t\t\t}\n\t\t}\n\t}\n\te=0;\n\tfor(i=1;ig[j])\n\t\t\t\te++;\n\t\t}\n\t\tif(i==e)\n\t\t\t{\n\t\t\tm=3;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\te=0;\n\t}\n\tif(m==2)\n\tprintf(\"%d %d\",a,b);\n\telse\n\t\tprintf(\"no\");\n return 0;\n}"} +{"label": "76", "index": "37538", "code": "int main(){\n int n,min=10000,max=0,p,q=0;\n int az[50000],bz[50000],sz[10000];\n scanf(\"%d\",&n);\n for(int i=0;iaz[k]){\n min=az[k];\n }\n if(maxb[max]){\n\t\t\tmax=i;}\n\t}\n\tfor(k=a[min]+1.0/2;k=a[i]&&k<=b[i]){\n\t\t\te=1;}\n\t\t}\n\t\tif(e==0){break;}\n\t}\n\tif(e==1){\n\t\tprintf(\"%d %d\",a[min],b[max]);}\n\telse{printf(\"no\");}\nreturn 0;\n}"} +{"label": "76", "index": "37540", "code": "int main()\n{\nint n,i,a[50000],b[50000],j,t,p,max;\n scanf(\"%d\",&n);\n for(i=0;ib[i]&&i==0){\n\t\t p=1;\n\t\t break;\n\t }\n\t if(a[i+1]>b[i]&&i!=0&&b[i]>=b[i-1]){\n\t\t p=1;\n\t\t break;\n\t }\n\t if(b[i]>max)\n\t\t max=b[i];\n }\n\n if(p==2){\n\t printf(\"%d %d\",a[0],max);\n }\n if(p==1){\n\t printf(\"no\");\n }\n return 0;\n}\n\n"} +{"label": "76", "index": "37541", "code": "int main(){\n\tint n,min=10000,max=0,a[1000],b[1000],i;\n double m;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t{\n\t\t\tmax = b[i];\n\t\t}\n\n\t}\n\tfor(m=min*1.0+0.5;m=a[l]&&m<=b[l])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(l==n-1)\n\t\t\t{\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d %d\",min,max);\n return 0;\n}"} +{"label": "76", "index": "37542", "code": "int main(){\n\tint j,i,n,q,a,p;\ndouble k;\n\tint m[50000][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n;i++){\n\t\tfor(j=0;j<2;j++){\n\t\tscanf(\"%d\",&m[i][j]);\n\t}\n}\n\tq=m[0][0];\np=m[0][1];\n\tfor(i=0;ip){\n\t\t\tp=m[i][1];\n\t\t}\n\t}\n\ta=0;\n\tfor(k=q+0.5;k=m[j][0]&&k<=m[j][1]){\n\t\t\t\tbreak;\n\t\t\t}else{ \n\t\t\t\tif(j==n){\n\t\t\t\t\ta=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(a==0){\n\t\tprintf(\"%d %d\",q,p);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37543", "code": "int main(){\nint a,b,c,d,e,k,f=0,n,sz[50001][4],dsz[100000];\nfor(a=0;a<100000;a++){dsz[a]=0;}\nscanf(\"%d\",&n);\nfor(a=0;ad){d=sz[a][3];}}\ne=d-c+1;\nfor(k=0;k<100000;k++){if(dsz[k]==1){f++;}}\nif(e==f){printf(\"%d %d\",c/2,d/2);}\nif(e!=f){printf(\"no\");}\nreturn 0;\n}\n\n\n "} +{"label": "76", "index": "37544", "code": "int main(){\n int n,i,k,e,q;\n int a[w],b[w];\n scanf(\"%d\",&n);\n for(i=0;ia[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n } \n }\n }q=0;\n for(i=0;ib[i+1]&&(i!=n-1)){\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n } \n }\n \n \n \n if(q==1){printf(\"no\");\n }else{printf(\"%d %d\",a[0],b[n-1]);}\nreturn 0;\n}\n\n\n\n"} +{"label": "76", "index": "37545", "code": "int main()\n{\n\tint left[100],right[100],n,i,j,t,k,l,r[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ileft[j+1])\n\t\t\t{\n\t\t\t\tt=left[j];\n\t\t\t\tleft[j]=left[j+1];\n\t\t\t\tleft[j+1]=t;\n\t\t\t}\n\t\t\tif(right[j]>right[j+1])\n\t\t\t{\n\t\t\t\tt=right[j];\n\t\t\t\tright[j]=right[j+1];\n\t\t\t\tright[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tk=0;\n\tfor(i=0;i=0;i--)\n\t{\n\t\tr[l++]=right[i];\n\t}\n\n\tif(k==n-1)\n\t\tprintf(\"%d %d\\n\",left[0],r[1]);\n\treturn 0;\n}\n\n\n"} +{"label": "76", "index": "37546", "code": "\nint main(){\n\tstruct point{\n\t\tint a,b;\n\t}p[50000];\n\n\tint i,k,n,l,r;\n\tdouble j;\n\n\tscanf(\"%d\",&n);\n\t\n\tfor(i=0;ir){\n\t\t\tr=p[i].b;\n\t\t}\n\t}\n\n\tfor(j=l+0.5;jp[i].b){\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\tif(k==n){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(j==r+0.5){\n\t\tprintf(\"%d %d\",l,r);\n\t}\n\n\n\n\n\n\treturn 0;\n}\n"} +{"label": "76", "index": "37547", "code": "int main(){\n\tint n,a[50000][2],i,j,x,y;\n\tdouble b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy)\n\t\t\t{\n\t\t\t\ty=a[i][j];\n\t\t\t}\n\t\t}\n\t}\n\tb=1.0*x+0.5;\n\tint s=0,z=0;\n\tfor(i=x;i1.0*a[j][0]&&b<1.0*a[j][1])\n\t\t\t{\n\t\t\t\ts=s+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tb=b+1;\n\t\tif(s==0)\n\t\t{\n\t\t\tz=z+1;\n\t\t}\n\t\ts=0;\n\t}\n\t\n\tif(z==0)\n\t{\n\t\tprintf(\"%d %d\\n\",x,y);\n\t}\n\telse\n\t{\n\t\tprintf(\"no\\n\");\n\t}\n\n\treturn 0;\n}"} +{"label": "76", "index": "37548", "code": "struct X{\nint a;\nint b;\n};\nint main()\n{\nint i,j,n,A,B,x[10000]={0,0,0};\nstruct X q[50000];\nscanf(\"%d\",&n);\n\nfor(i=0;ia[i+1][0]){\n\t\t\t\tt1=a[i+1][0];\n\t\t\t\ta[i+1][0]=a[i][0];\n\t\t\t\ta[i][0]=t1;\n\t\t\t\tt2=a[i+1][1];\n\t\t\t\ta[i+1][1]=a[i][1];\n\t\t\t\ta[i][1]=t2;\n\t\t\t}\n\t\t}\n\t}\n\tint b=a[0][1];\n\tfor(i=0;i0;i--){\n if(b[i]==1){\n n=i;\n }\n }\n f=0;\n\n for(i=n;i<=t;i++){\n if(b[i]==0) f=1;\n\n }\n if(f==1){printf(\"no\");}\n else{printf(\"%d %d\",n/2,t/2);}\n\nreturn 0;\n}\n"} +{"label": "76", "index": "37551", "code": "int main(){\n\tint n,i,k,e,l;\n\tint ai[50000];\n\tint bi[50000];\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;iai[k+1]){\n\t\t\t\te=ai[k+1];\n\t\t\t\tai[k+1]=ai[k];\n\t\t\t\tai[k]=e;\n\n\t\t\t\te=bi[k+1];\n\t\t\t\tbi[k+1]=bi[k];\n\t\t\t\tbi[k]=e;\n\t\t\t}\n\t\t}\n\t}\n\ti=0;l=0;\n\twhile(ibi[n-1]){\n\t\t\tprintf(\"%d %d\",ai[0],bi[i]);\n\t\t}\n\t\telse if(i==n-1){\n\t\t\tprintf(\"%d %d\",ai[0],bi[n-1]);\n\t\t}\n\t}\nreturn 0;\n}"} +{"label": "76", "index": "37552", "code": "int main()\n{\n int a[10001],b[10001],i,j,n,z=0,x,y=0,ma,mb,c;\n scanf(\"%d\",&n);\n for(i=0;imb)\n mb=b[i];\n }\n c=mb-ma;\n// printf(\"%d\\n\",c);\n \n for(x=ma;x<=mb;x++)\n {\n for(j=0;j=a[j])\n break;\n else z=0;\n }\n y=y+z;\n }\n// printf(\"%d\\n\",y);\n \n if(y==c)\n {\n printf(\"%d %d\",ma,mb);\n }\n else\n {\n printf(\"no\");\n } \n \n scanf(\" \") ;\n return 0;\n}\n"} +{"label": "76", "index": "37553", "code": "int main(){\n\tint a[50000];\n\tint b[50000];\n int n,i,j,e,f,l,x,y;\n scanf(\"%d\",&n);\n for(j=0;ja[j+1])\n\t\t\t{\n\t\t\t\te=a[j+1];\n a[j+1]=a[j];\n a[j]=e;\n\t\t\t\tf=b[j+1];\n\t\t\t\tb[j+1]=b[j];\n\t\t\t\tb[j]=f;\n }\n }\n }\nx=a[0];\ny=b[0];\nfor(i=0;il){\n\t\t\t\tl=q;\n\t\t\t}\n\t\t}\n\t}\n\ta[s]=1;\n\ta[l]=1;\n\tfor(i=s;i<=l;i++){\n\t\tif(a[i]==0){\n\t\t\tm=0;\n\t\t\tprintf(\"no\");\n\t\t\tbreak ;\n\t\t}\n\t}\n\tif(m==1){\n\t\tprintf(\"%d %d\", s, l);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37555", "code": "int a[50000];\nint b[50000];\nint c[100000];\nint d[100000];\nint z[20000];\nint main(){\n int n,i,k,p=0,q=0,m=0,u=0,y=0,max=0,min=0;\n scanf(\"%d\",&n);\n for(i=0;imax){\n max=c[i];}\n if(c[i]max){\n max=d[i];\n }\n if(d[i]0;i--){\n\t\tfor(j=0;jqj[j+1].a){\n\t\t\t\ttemp=qj[j];\n\t\t\t\tqj[j]=qj[j+1];\n\t\t\t\tqj[j+1]=temp;\n\t\t\t}\n\t\t}\n\t}\n\tmax=qj[0].b;\n\tfor(i=0;imax){\n\t\t\tmax=qj[i].b;\n\t\t}\n\t\tif(maxmax){\n\t\tmax=qj[n-1].b;\n\t}\n\tif(i==n-1){\n\t\tprintf(\"%d %d\",qj[0].a,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37557", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint qujian[50000][2];\n\tint row;\n\tfor(row=0;rowqujian[row+1][0]){\n\t\t\t\tzuo=qujian[row+1][0];\n\t\t\t\tyou=qujian[row+1][1];\n\t\t\t\tqujian[row+1][0]=qujian[row][0];\n\t\t\t\tqujian[row+1][1]=qujian[row][1];\n\t\t\t\tqujian[row][0]=zuo;\n\t\t\t\tqujian[row][1]=you;\n\t\t\t}\n\t\t}\n\t}\n\n\tint jieguo=0,p;\n\tfor(row=1;row=qujian[row][0]){\n\t\t\t\tjieguo++;break;\n\t\t}\n\t}\n\t}\n\t\n\tint j,e;\n\tfor(j=1;jqujian[row+1][1]){\n\t\t\t\te=qujian[row+1][1];\n\t\t\t\tqujian[row+1][1]=qujian[row][1];\n\t\t\t\tqujian[row][1]=e;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(jieguo==n-1){\n\t\tprintf(\"%d %d\",qujian[0][0],qujian[n-1][1]);\n\t}\n\telse{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37558", "code": "int main()\n{\nint x[100],y[100],n,i,j,a,b,c,d,p;\nscanf(\"%d\",&n);\nfor(i=0;i=0;i--){\nfor(j=0;jx[j+1]){\na=x[j+1];\nx[j+1]=x[j];\nx[j]=a;}\nif(y[j]>y[j+1]){\nb=y[j+1];\ny[j+1]=y[j];\ny[j]=b;}}}\nc=x[0];\nd=y[n-1];\nfor(double k=c;k<=d;k+=0.1){\np=0;\nfor(i=0;i=x[i]&&k<=y[i])\np++;}\nif(p==0){\nprintf(\"no\");\nreturn 0;}\n}\nprintf(\"%d %d\",c,d);\nreturn 0;\n}\n"} +{"label": "76", "index": "37559", "code": "int main()\n{\n\tint n,a[50000],b[50000],i,k,e,j,m=0,h=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib[i+1]){\n\t\t\t\te=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=e;\n\t\t\t\te=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=e;\n\t\t\t}else if(b[i]==b[i+1]){\n\t\t\t\tif(a[i]>a[i+1]){\n\t\t\t\t\te=a[i+1];\n\t\t\t\t\ta[i+1]=a[i];\n\t\t\t\t\ta[i]=e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=a[j])){\n\t\t\t\tm++;\n\t\t\t}\n\t\t\tif(m==n-1-i){\n\t\t\t\tprintf(\"no\");\n\t\t\t\th=1;\n\t\t\t}\n\t\t\tif(j==n-1){\n\t\t\t\tm=0;\n\t\t\t}\n\t\t}\n\t\tif(i==n-2&&h!=1){\n\t\t\tprintf(\"%d %d\",a[0],b[n-1]);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37560", "code": "\nint main()\n{\n // for every point i, point[2i] stands for [i,i], point[2i+1] stands for (i,i+1)\n // if point[i] == 1, it stands that this interval is included\n int n, point[2001];\n scanf(\"%d\", &n);\n int i;\n int left = 2001;\n int right = 0;\n for (i = 1 * 2; i <= 1000 * 2; i++)\n point[i] = 0;\n for (i = 1; i <= n; i++)\n {\n int a, b;\n scanf(\"%d%d\", &a, &b);\n if (a < left)\n\tleft = a; // find the leftest point\n if (b > right)\n\tright = b; // find the rightest point\n int j;\n for (j = a * 2; j <= b * 2; j++)\n\tpoint[j] = 1;\n }\n int in = 0; // if in an interval, then value is 1, or the value is 0\n int num = 0; // number of interval(s)\n for (i = 1 * 2; i <= 1000 * 2; i++)\n if (point[i] == 1)\n {\n\tif (in == 0)\n\t {\n\t in = 1;\n\t num++;\n\t }\n }\n else \n if (in == 1)\n\tin = 0;\n if (num == 1)\n printf(\"%d %d\\n\", left, right);\n else\n printf(\"no\\n\");\n\n return 0;\n}\n"} +{"label": "76", "index": "37561", "code": "int main(){\n int n,a[50000],b[50000],i,r,y;\n y=0;\n scanf(\"%d\",&n);\n for(i=0;ia[r+1]){\n int x;\n x=a[r+1];\n a[r+1]=a[r];\n a[r]=x;\n x=b[r+1];\n b[r+1]=b[r];\n b[r]=x;\n }\n }\n }\n for(i=0;ib[i+1]){\n b[i+1]=b[i];\n }\n }\n }\n if(y==1){\n printf(\"no\");\n }\n if(y==0){\n printf(\"%d %d\",a[n],b[n]);\n }\n return 0;\n}\n "} +{"label": "76", "index": "37562", "code": "int main()\n{\n int n;\n int i,j;\n struct\n {\n int a,b;\n } q[5000],c;\n int star,end,e;\n scanf(\"%d\",&n);\n for(i=0;iq[j+1].a)\n {\n c=q[j];\n q[j]=q[j+1];\n q[j+1]=c;\n }\n }\n }\n star=q[0].a;\n end=q[0].b;\n for(i=1;imax){\n max=b[i];\n }if(a[i]a[t]&&(i+0.5)e){\ne=b[i];\n}\n}\nf=a[0];\nfor(i=1;ib[m]||ib[m]||psz2[q+1][1]){\n e=sz2[q+1][1];\n sz2[q+1][1]=sz2[q][1];\n sz2[q][1]=e;\n }\n }\n }\n for(p=1;p<=n;p++){\n for(q=1;q<=n-p;q++){\n if(sz2[q][2]>sz2[q+1][2]){\n e=sz2[q+1][2];\n sz2[q+1][2]=sz2[q][2];\n sz2[q][2]=e;\n }\n }\n }\n for(i=sz2[1][1];i<=sz2[n][2];i++){\n for(j=1;j<=n;j++){\n if(i=sz[j][1]){\n break;\n }\n else if(j==n&&i>sz[j][2]||j==n&&ib?a:b;}\nint min(int a,int b)\n{return aa[k+1]){\n c=a[k]; \n d=b[k];\n a[k]=a[k+1];\n b[k]=b[k+1];\n a[k+1]=c;\n b[k+1]=d;\n }\n }\n }\n e=b[0];\n for(i=0;i=a[i+1]&&ei;j--)\n {\n if(a[j]-1;j--)\n {\n if(a[i]i;j--)\n {\n if(a[j]d[i+1].a){\n\t\t\t\te=d[i];\n\t\t\t\td[i]=d[i+1];\n\t\t\t\td[i+1]=e;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;id[i+1].b){\n\t\t\t\tt=d[i].b;\n\t\t\t\td[i].b=d[i+1].b;\n\t\t\t\td[i+1].b=t;\n\t\t\t}\n\t\t}\n\t}\n\tif(flag==0){\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",d[0].a,d[n-1].b);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37570", "code": "int main()\n{\n int n,i,p,q,j,d;\n scanf(\"%d\",&n);\n \n int sz[n],sa[n];\n for(i=0;iq)\n q=sa[i];\n }\n float s;\n for(s=p;ssa[j])\n d++;\n }\n if(d==n)\n {printf(\"no\");\n return 0;}\n \n }\n printf(\"%d %d\",p,q);\n return 0;\n \n \n}\n\n"} +{"label": "76", "index": "37571", "code": "void main()\n{\n\tint i,n,min,max,a,b,j;\n\tint c[10001],w[10001];\n\tfor(i=0;i<10001;i++)\n\t{\n\t\tc[i]=0;\n\t\tw[i]=0;\n\t}\n\tmin=10001;\n\tmax=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia)\n\t\t{\n\t\t\tmin=a;\n\t\t}\n\t\tif(max0;r--){\n\t\tfor(i=0;ia[i+1]){\n\t\t\t\te=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=e;\n\t\t\t\te=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=e;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;ib[i]){\n\t\t\tb[i]=b[i-1];\n\t\t}\n\t\tif(a[i]>b[i-1]){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t\tif(i==n-1){\n\t\t\tprintf(\"%d %d\",a[0],b[n-1]);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37573", "code": "int main()\n{\n\tint a[100][2];\n\tint n;\n\tint x,y,d=0,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iy)\n\t\t{\n\t\t\ty=a[i][1];\n\t\t}\n\t}\n\tfor(i=0;ia[i][0])||(a[j][1]==a[i][0]))&&(j!=i)&&((a[j][0]a[i][1])||(a[j][1]==a[i][1])))\n\t\t\t\t\t{\n\t\t\t\t\t\td=2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a[i][1]==y)\n\t\t\t{\n\t\t\t\td=2;\n\t\t\t}\n\t\t\tif(d==1)\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif(d==2)\n\t{\n\t\tprintf(\"%d %d\",x,y);\n\t}\n\tif(d!=2)\n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "76", "index": "37574", "code": "\nint main()\n{\n int a[MAX];\n int b[MAX];\n int n,i,j,c,d,l;\n l=0;\n scanf(\"%d\",&n);\n for(i=0;ij;i--)\n {\n if(a[i]d)\n {\n l=1;\n printf(\"no\");\n break;\n }\n }\n if(l==0)\n {\n if(da[j+1]) {x=a[j];a[j]=a[j+1];a[j+1]=x;}\n\t}\n\tfor(i=0;ib[j+1]) {x=b[j];b[j]=b[j+1];b[j+1]=x;}\n\t}\n\tp=1;\n\tfor(i=0;ia[i]){\n\t\t\tmin=a[i];\n\t\t}\n\t}\n\tfor(i=1;ib[i]){\n\t\t\tmin=b[i];\n\t\t}\n\t}\n\tdouble d;\n\ts=0;\n\tfor(d=min+0.1;d=a[j]&&d<=b[j]){\n\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t\tif(sum==0){\n\t printf(\"no\\n\");\n break;\n\t\t}else{\n\t\ts++;\n\t\t}\n\t}\n\tif(s==(max-min)){\n\tprintf(\"%d %d\",min, max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37577", "code": "int main()\n{\n\tint n,e=0,y=0,c=0,g=0,qs[50000],zz[50000];\n\t\n\tscanf(\"%d\\n\",&n);\n\tfor(int i=0;izz[y]){\n\t\t\ty=r;\n\t\t}\n\t}\n\tfor(double x=qs[e];x>=qs[e]&&x<=zz[y];x+=0.1){\n\t\tfor(int s=0;s=qs[s]&&x<=zz[s]){\n\t\t\t\tbreak;\n\t\t\t}\n c+=1;\n\t\t}\n\t\tif(c==n){\n\t\t\tg=1;\n\t\t\tbreak;\n\t\t}\n\t\telse{\n\t\t\tc=0;\n\t\t}\n\n\n\t}\n\tif(g==1){\n\t\tprintf(\"no\");\n\t}\n\telse{\n\t\tprintf(\"%d %d\",qs[e],zz[y]);\n\t}\n\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37578", "code": "int main()\n{\n\tint n,i,j,k,x;\n\tint s=0,l=0;\n\tint a[num],d[num];\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=10000;i++)\n\t\ta[i]=0;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d%d\",&j,&k);\n\t\tfor(x=j;xq[i+1]){\n\t\t\te=q[i+1];\n\t\t\tq[i+1]=q[i];\n\t\t\tq[i]=e;\n\t\t\te=h[i+1];\n\t\t\th[i+1]=h[i];\n\t\t\th[i]=e;\n\t\t\t}\n\t\n\t\t}\n\t}\n star=q[0];end=h[0];\n\tfor(k=0;k=q[k]&&h[k]>=h[0]){\n\t\t\tend=h[k];\n h[0]=h[k];\n\t\t\t}\n\t\t}\n\t\n for(a=0;ah[a+1]){\n h[a+1]=h[a]; \n }\n }\n if(end==h[n-1]){\n printf(\"%d %d\",star,end);}\n else{printf(\"no\");}\n return 0;\n}"} +{"label": "76", "index": "37580", "code": "int main(){\nint i,n,g=1,a[50000],b[50000],min,max;\ndouble x,t;\nscanf(\"%d\",&n);\nfor(i=0;imax){\n max=b[i];\n }\n}\nt=0.5+(double)min;\nfor(x=t;xmax)\n\t\t{\n\t\t\tmax=qj[i].b;\n\t\t}\n\t}\n\tfor(i=min;ia[i]){\n\t\t\tamin=a[i];\n\t\t}\n\t\tif(bmax=a[i]&&k<=b[i]){\n\t\t\t\tf=0;\n\t\t\t\tg++;\n\t\t\t}\n\t\t}\n\t\tf=1;\n\t}\n\tif(g>=bmax-amin){\n\t\tprintf(\"%d %d\",amin,bmax);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\t\n\n\t"} +{"label": "76", "index": "37584", "code": "int main()\n{\n\tint l[10001]={0};\n\tint n,i,j,a,b,ch=0,te=0,t=0;\n\tscanf(\"%d\",&n);\n\tfor (i=0;i=a[u]){\n\t\t\t\tif(a[0]<=b[u]&&b[0]>=b[u]){\n\t\t\t\t\ta[0]=a[u];\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t\telse if(b[u]>=b[0]){\n\t\t\t\t\tb[0]=b[u];\n\t\t\t\t\ta[0]=a[u];\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(b[0]>=a[u]&&b[0]<=b[u]){\n\t\t\t\t\tb[0]=b[u];\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t\telse if(b[u]<=b[0]){\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(a[0]==3&&b[0]==1000)\n\t\tprintf(\"%d %d\", a[0],b[0]);\n\telse if((n-1)*n-1>m)\n\t\tprintf(\"no\");\n\telse\n\t\tprintf(\"%d %d\", a[0],b[0]);\n\treturn 0;\n}\n"} +{"label": "76", "index": "37586", "code": "int main()\n{\n\tint n,i,k,j,sum[10001]={0},l=0,be[50000],fi[50000],o,p,d,e;\n scanf(\"%d\",&n);\n for(i=0;ip)\n\t\t\t\t p=fi[i];\n\t }\n for(i=o;i0;j--){\n for(r=0;ra[r+1]){\n t=a[r+1];\n s=b[r+1];\n a[r+1]=a[r];\n b[r+1]=b[r];\n a[r]=t;\n b[r]=s;\n }\n }\n}\nt=0;\ns=b[0];\nfor(i=0;is){\n s=b[i];\n }\n}\n for(i=1;i=a[i]){\n t=t+1;\n break;}\n }}\n if(t!=n-1){\n printf(\"no\");\n }\n if(t==n-1){\n printf(\"%d %d\",a[0],s);\n }\n return 0;\n}\n\n\n"} +{"label": "76", "index": "37588", "code": "int main(){\nint n,i,j,k,t,num,a,b,m,max;\nint x[50000][2];\nscanf(\"%d\",&n);\nfor (i=0;ix[t+1][0]){\n a=x[t+1][0];\n x[t+1][0]=x[t][0];\n x[t][0]=a;\n b=x[t+1][1];\n x[t+1][1]=x[t][1];\n x[t][1]=b;\n }\n if(x[t][0]==x[t+1][0]){\n if(x[t][1]>x[t+1][1]){\n a=x[t+1][0];\n x[t+1][0]=x[t][0];\n x[t][0]=a;\n b=x[t+1][1];\n x[t+1][1]=x[t][1];\n x[t][1]=b; \n }\n }\n \n }\n}\nnum=0;\nmax=x[0][1];\nfor (m=0;mmax){\n num++;\n printf(\"no\");\n break;\n }\n if(x[m+1][1]>max){\n max=x[m+1][1];\n } \n }\nif (num==0){\n printf(\"%d %d\",x[0][0],max);\n}\n return 0;\n}\n"} +{"label": "76", "index": "37589", "code": "int main(){\n int min, max, n, i, j, x=0;\n int a[10000], b[10000], c[10000]={0};\n scanf(\"%d\", &n);\n for(i=0;ia[i]){\n min=a[i];\n }\n if(maxa[i+1])\n {\n\t\t\te=a[i+1];\n\t\t p=b[i+1];\n\t\t\ta[i+1]=a[i];\n\t\t\tb[i+1]=b[i];\n\t\t\ta[i]=e;\n\t\t\tb[i]=p;\n\t\t}\n\t}\n\t}\n\tfor(i=0;ib[i])\n {\n\t\t\tprintf(\"no\");\n i++;\n\t\t\tbreak;\n\t\t}else if(b[i+1]b[i-1])\n {\n\t\tprintf(\"%d %d\",a[0],b[i]);\n\t\t}\n else\n {\n\t\t\tprintf(\"%d %d\",a[0],b[i-1]);\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "76", "index": "37591", "code": "int main(){\n int n,i,min,max,p=0,s=0;\n double x;\n scanf(\"%d\",&n);\n int a[50000],b[50000];\n for(i=0;ia[i+1]) {min=a[i+1];}\n\t if(maxa[i]&&x0) {s++;}\n\t p=0;\n }\n if(s==max-min) {printf(\"%d %d\",min,max);}\n else {printf(\"no\");}\nreturn 0;\n}"} +{"label": "76", "index": "37592", "code": "int main(){\n\tint n,i,j,t,flag,aright;\n\tstruct{\n\t\tint l;\n\t\tint r;\n\t}qj[50001];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i--){\n\t\tfor(j=0;jqj[j+1].l){\n\t\t\t\tt=qj[j].l;\n\t\t\t\tqj[j].l=qj[j+1].l;\n\t\t\t\tqj[j+1].l=t;\n\t\t\t\tt=qj[j].r;\n\t\t\t\tqj[j].r=qj[j+1].r;\n\t\t\t\tqj[j+1].r=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=n-1;i>0;i--){\n\t\tfor(j=0;jqj[j+1].r){\n\t\t\t\tt=qj[j].r;\n\t\t\t\tqj[j].r=qj[j+1].r;\n\t\t\t\tqj[j+1].r=t;\n\t\t\t}\n\t\t}\n\t}\n\tflag=1;\n\taright=qj[0].r;\n\tj=1;\n\tdo{\n\t\tif(j==n){\n\t\t\tflag==1;\n\t\t\tbreak;\n\t\t}\n\t\tif(aright=qj[j].l && arightmax){\n max=b[i];\n }\n \n }\n int ce[2*max+1];\n for(i=2*min;i<2*max;i++){\n ce[i]=1;\n\n }\n for(j=0;j0;j--)\n {\n if(st[j].a t)\n {\n break;\n }\n else\n {\n if(t < st[i].b)\n t=st[i].b;\n }\n }\n if(i != n)\n {\n printf(\"no\");\n }\nelse\n{\n printf(\"%d %d\",st[0].a,t);\n}\n\n return 0;\n}\n"} +{"label": "76", "index": "37595", "code": "int main()\n{\n int a[50000],b[50000],sz[50000]={0};\n \n int i,min, max,e,n,j,sum=0,p,k,s;\n double r;\n scanf(\"%d\\n\", &n);\n for (i = 0; i< n; i++) {\n scanf(\"%d %d\", &a[i],&b[i]);\n }\n min=0;\n for(i=0;ib[max]){\n max=i;\n }\n }\n \n s=0;\n for(r=a[min]+0.1;r<=b[max]+0.1;r++ ){ \n \n for(i=0;i=a[i]&&r<=b[i]){\n sum++;\n }\n \n }\n if(sum>0){s++;\n sum=0;\n }\n }\n \n p=b[max]-a[min];\n \n if(s!=p){\n printf(\"no\");\n }else{\n printf(\"%d %d\",a[min],b[max]);}\n return 0;\n}"} +{"label": "76", "index": "37596", "code": "int main(){\nint n,i,k;\nk=0;\nscanf(\"%d\",&n);\nint a[n];\nint b[n];\nfor(i=0;imax){\nmax=b[i];\n}\n}\ndouble h;\nfor(h=min;h<=max;h=h+0.5){\nfor(i=0;i=a[i]){\nk=1;\n}\n}\nif(k==0){\nprintf(\"no\");\nbreak;\n}\nif(h==max){\nprintf(\"%d %d\",min,max);\n}\nk=0;\n}\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37597", "code": "int i,j,k,m,n,l,r;\nint flag=1;\nint minleft,maxright;\nint b[20000];\nint main(){\n minleft=50001;\n maxright=0;\n scanf(\"%d\",&n);\n for(i=0;i=maxright)maxright=r;\n for(j=l;jhz[i+1]){\n\t\t\t\t\te=hz[i+1];\n\t\t\t\t\tf=sz[i+1];\n\t\t\t\t\thz[i+1]=hz[i];\n\t\t\t\t\thz[i]=e;\n\t\t\t\t\tsz[i+1]=sz[i];\n\t\t\t\t\tsz[i]=f;\n\t\t\t}\n\t}\n}\n\tfor(i=0;imax)){\n max=sz[g];\n\t\t}\n\t\t}\n\tif((hz[i+1]>max)){t=1;}\n\t}\n\tfor(i=0;imax1)){\n max1=sz[i];\n}\n\t}\n\tif(t==1){\n\t\tprintf(\"no\");}\n\telse{printf(\"%d %d\",hz[0],max1);}\n\treturn 0;\n}"} +{"label": "76", "index": "37599", "code": "int main(){\n int n,i,k,t,m,a;\n a=0;\n scanf(\"%d\",&n);\n struct l{\n int x,y;\n }l[n],e;\n for(i=0;il[i+1].x){\n e=l[i];\n l[i]=l[i+1];\n l[i+1]=e;\n }\n }\n }\n m=0;\n for(i=0;il[m].y){\n m=i;\n }\n }\n for(k=1;k=l[k].x){\n break;\n }\n if(i==k-1&&l[i].yf)\n {f=b[i];}\n }\n for(i=e;i<=f;i++)\n {\n c[i]=1;\n }\n for(i=0;ia[i+1]){\n g=a[i];\n h=b[i];\n a[i]=a[i+1];\n b[i]=b[i+1];\n a[i+1]=g;\n b[i+1]=h;\n } \n }\n }\n h=b[0];\n for(i=0;isa[j+1]){\n\t\t\tt=sa[j];\n\t\t\tsa[j]=sa[j+1];\n\t\t\tsa[j+1]=t;\n\t\t}\nif(sb[j]>sb[j+1]){\n\t\t\tt=sb[j];\n\t\t\tsb[j]=sb[j+1];\n\t\t\tsb[j+1]=t;\n\t\t}\n\t}\n}\nfor(i=sa[0];imax){\n\t\tmax=b[i];\n\t}\n}\nfor(i=2*min-1;i<2*max;i++){\nc[i]=1;\n}\nfor(i=0;i=y){\n\t\t\ty=b[i];\n\t\t}\n\t}\n\tfor (k=x+0.1;ka[i])&&(ka[i][0]){\n minL=a[i][0];\n }\n if(maxRsz[j][i]){\n\t\t\t\tm=sz[j][i];\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;iqs[i+1]){\n e=qs[i+1];\n qs[i+1]=qs[i];\n qs[i]=e;\n }\n }\n } \n for(int k=1;k<=n;k++){\n for( i=0;izz[i+1]){\n e=zz[i+1];\n zz[i+1]=zz[i];\n zz[i]=e;\n }\n }\n } \n\n for(double k=qs[0]+0.1;k=qs[i]&&k<=zz[i]){\n break;\n }\n }\n if(i==n){\n printf(\"no\");\n return 0;\n }\n }\nprintf(\"%d %d\",qs[0],zz[n-1]);\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37608", "code": "int main()\n{ \n int n,i,j=0,k,t,s1[5000],s2[5000],s3[5000]={0},m=0;\n\n scanf(\"%d\",&n);\n\n for(i=0;imax)max=s2[i];\n }\n for(i=n-1;i>=0;i--) \n {\n for(k=0;ks1[k+1])\n\n {\n t=s1[k];\n\n s1[k]=s1[k+1];\n\n s1[k+1]=t;\n\n t=s2[k];\n\n s2[k]=s2[k+1];\n\n s2[k+1]=t;\n }\n }\n }\n\n \n t=0;\n for(i=0;ia[i])\n\t {\n\t\t a1=a[i];\n\t }\n\t if(b1q){\nq=b[i];\n}\n}\nfor(k=p+0.5;ka[m]&&ka[j+1])\n {e=a[j];\n a[j]=a[j+1];\n a[j+1]=e;\n\t\t\tf=b[j];\n\t\t\tb[j]=b[j+1];\n\t\t\tb[j+1]=f;}\n }\n }\n m=b[1];\n for(i=2;i<=n;i++)\n {\n if(b[i]>m) m=b[i];\n }\n t=1;\n for(i=a[1];i<=m-1;i++)\n { g[i]=0;\n for(j=1;j<=n;j++)\n {\n if((i>=a[j])&&(imax)\n\t\t\tmax=b[i];\n\t}\n\tfloat j,m=0,e=0,k=0;\n\ti=0;\n\tj=min;\n\tfor(j=min;j<=max;j=j+0.5)\n\t{\t\n\t\te=0;\n\n\t\tfor(i=0;i=a[i]&&j<=b[i])\n\t\t\t\te++;\n\t\t}\n\t\tif(e==0)\n\t\t{\n\t\t\tk=1;\n\t\t\tbreak;\n\t\t}\n\t\n\t}\n\tif(k==1)\n\t\tprintf(\"no\");\n\tif(k==0)\n\t\tprintf(\"%d %d\",min,max);\n\treturn 0;\n}\n\t\t\t\n"} +{"label": "76", "index": "37613", "code": "int main(){\nint a[50000],b[50000],c[50000],d[50000],n;\nscanf(\"%d\",&n);\nint i;\nfor(i=0;i1) u=0;\n\telse {printf(\"no\");return 0;}\n}\nprintf(\"%d %d\",c[0],b[0]);\nreturn 0;\n}"} +{"label": "76", "index": "37614", "code": "int main(){\n\tint n,i,a[50000],b[50000],min,max;\n\tdouble j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax){\n\t\t\tmax=b[i];}}\n\tfor(j=1.0*min+0.1;j<=max;j++){\n\t\tfor(i=0;ib[i]){continue;}\n\t\t\telse{break;}}\n\t\tif(i==n){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;}\n\t}\n\tprintf(\"%d %d\",min,max);\n\treturn 0;\n}"} +{"label": "76", "index": "37615", "code": "int main()\n{\n\tint n,i,k,t,m;\n\tint a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t}\n\tfor(k=1;k<=n;k++)\n\t{\n\t\tfor(i=0;ia[i+1])\n\t\t\t{\n\t\t\t\tt=a[i];\n\t\t\t\tm=b[i];\n a[i]=a[i+1];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\ta[i+1]=t;\n\t\t\t\tb[i+1]=m;\n\t\t\t}\n\t\t}\n\t}\n\tint ylf=0;\n\ti=0;\n\twhile(i=a[i+1])\n\t\t{\n\t\t\ti++;\n\t\t\tb[i+1]=b[i]>b[i+1]?b[i]:b[i+1];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tylf=1;\n\t\t}\n\t}\n\tif(ylf==0)\n\t{\n\t\tprintf(\"%d %d\",a[0],b[n-1]);\n\t}\n\telse \n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37616", "code": "int main()\n{\n\tint n,i,j,m;\n\tint a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j+1]){\n\t\t\t\tm=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=m;\n\t\t\t\tm=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=m;\n\t\t\t}\n\t\t}\n\t}\n\tm=b[0];\n\tfor(i=0;ia[i+1])\n\t\t\t{\n\t\t\t\td=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=d;\n\t\t\t\td=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=d;\n\n\t\t\t}\n\t\t}\n\t}\n\td=a[1];\n\te=b[1];\n f=1;\n\tfor(i=2;i<=n;i++)\n\t{\n\t\tif(a[i]<=e)\n\t\t{\n\t\t\tif(b[i]>e)\n\t\t\t{\n\t\t\t\te=b[i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tf=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(f==1)\n\t{\n\t\tprintf(\"%d %d\",d,e);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37618", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct block{\n\t\tint a,b;\n\t}bk[10000];\n\tfor(int q=0;qbk[i+1].a){\n e=bk[i+1].a;\n bk[i+1].a=bk[i].a;\n bk[i].a=e;\n\t\t\te=bk[i+1].b;\n bk[i+1].b=bk[i].b;\n bk[i].b=e;\n\t\t\t}\n\t\t}\n\t}\n\tint max=bk[0].b,min=bk[0].a;\n\tfor(int d=0;d=bk[d].a){\n\t\t\tmin=bk[d].a;\n\t\t}\n\t}\n\tint pd=0;\n\tfor(double t=1.0*min;t=bk[f].a&&t<=bk[f].b){\n\t\t\t\tpd=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(pd==0){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"%d %d\\n\",min,max);\n\treturn 0;\n}"} +{"label": "76", "index": "37619", "code": "int main()\n{\n\tint n,i,j,e,min,max,m;\n\tint all[20000]={0};\n\tscanf(\"%d\",&n);\n\tint **sz=(int**)malloc(sizeof(int*)*n);\n\tfor(i=0;isz[i+1][1])\n\t\t{\n\t\t\te=sz[i][1];\n\t\t\tsz[i][1]=sz[i+1][1];\n\t\t\tsz[i+1][1]=e;\n\t\t}\n\t\tmax=sz[n-1][1];\n\t}\n\tfor(i=min*2;i<=max*2;i++)\n\t{\n\t\tif(all[i]==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i!=max*2+1)\n\t{\n\t\tprintf(\"no\");\n\t}\n\telse\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37620", "code": "struct qj{\n int a,b;\n};\nint main()\n{\nstruct qj jg[50000];\nint n,i,m;\ndouble j;\nint sz1[50000],sz2[50000];\nscanf(\"%d\",&n);\nfor(i=0;isz1[i]){\n\t\tsz1[0]=sz1[i];\n\t}\n}\nfor(i=0;i=jg[i].a&&j<=jg[i].b){\n\t\t\tm=0;\n\t\t\tbreak;\n\t\t}else{\n\t\t\tm=1;\n\t\t}\n\t}\n\tif(m==1){\n\t\tprintf(\"no\");\n\t\tbreak;\n\t}\n}\nif(m==0){\n\tprintf(\"%d %d\",sz1[0],sz2[0]);\n}\nreturn 0;\n}\n"} +{"label": "76", "index": "37621", "code": "\nint a[50010],b[50010];\n\nint _ins(int temp,int j)\n{\n if (a[j]>temp) return -1;\n return b[j]>temp?b[j]:temp;\n}\n\n\nint main()\n{\n int n,e,f;\n scanf(\"%d\",&n);\n for (int i=0;i<=n-1;i++)\n scanf(\"%d %d\",&a[i],&b[i]);\n \n for(int k=1;ka[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n f=b[i+1];\n b[i+1]=b[i];\n b[i]=f;\n }\n }\n }\n \n int temp=b[0];\n \n for (int j=1;j<=n-1;j++)\n {\n if ((temp=_ins(temp,j))==-1)\n break;\n }\n \n if (temp==-1)\n printf(\"no\\n\");\n else\n printf(\"%d %d\\n\",a[0],temp);\n \n return 0;\n}"} +{"label": "76", "index": "37622", "code": "int main(){\n\tint a[50000],b[50000],c[50000],i,n,j,min,max,k;\n\tmin=10000;max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=a[i])\n\t\t min=a[i];\n\t if(max<=b[i])\n\t\t max=b[i];\n\t}\n \n\tfor(i=min;i<=max;i++){\n\t\tc[i]=1;\n\t}\n\tfor(i=0;i=a[i]&&j=0;i--){\n\t\tif(a[i]!=0){\n\t\t\tk=i;break;\n\t}}\n\tfor(i=t;i<=k;i++){\n\t\tif(a[i]==0){\n\t\t\te++;break;\n\t}}\n\tif(e!=0){\n\t\tprintf(\"no\");\n\t}\n\telse printf(\"%d %d\",t-1,k);\n\treturn 0;\n}\n"} +{"label": "76", "index": "37624", "code": "int main(){\nint k,i,m,l,p=0,q,x,e,n,d,s;\nint a[50000],b[50000],c[50000],g[50000],r[50000];\nscanf(\"%d\",&n);\nfor(i=0;ig[i+1]){\n\t\te=g[i+1];\n\t\tg[i+1]=g[i];\n\t\tg[i]=e;\n\t\t}\n\t}\n}\nd=g[0];\nfor(k=1;k<=n;k++){\n\tfor(i=0;i=0&&a[i]!=g[0])||(c[b[i]]>=0&&b[i]!=r[0])){\n\t\t\n\tp=p+1;\n\t}\n}\n\nif(p>0){\nprintf(\"no\");\n}else{\n\n\tprintf(\"%d %d\",d,x);\n}\nreturn 0;\n}"} +{"label": "76", "index": "37625", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint sz[50001][2];\n\tint i;\n\tfor(i=0;i0;j--){\n\t\tfor(k=0;k=sz[k+1][0]){\n\t\t\t\tt1=sz[k][0];\n\t\t\t\tsz[k][0]=sz[k+1][0];\n\t\t\t\tsz[k+1][0]=t1;\n\t\t\t\tt2=sz[k][1];\n\t\t\t\tsz[k][1]=sz[k+1][1];\n\t\t\t\tsz[k+1][1]=t2;\n\t\t\t}\n\t\t}\n\t}\n\tint p=0;\n\tfor(j=1;j=sz[j][0]){\n\t\t\t\tp++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=n-1;j>0;j--){\n\t\tfor(k=0;k=sz[k+1][1]){\n\t\t\t\tt1=sz[k][1];\n\t\t\t\tsz[k][1]=sz[k+1][1];\n\t\t\t\tsz[k+1][1]=t1;\n\t\t\t}\n\t\t}\n\t}\n\tif(p==n-1){\n\t\tprintf(\"%d %d\",sz[0][0],sz[n-1][1]);\n\t}\n\telse printf(\"no\");\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37626", "code": "int main(){\n int zuo[10000],you[10000],n,i,j,a,b=0;\n double s;\n scanf(\"%d\\n\",&n);\n for(i=0;izuo[i])a=zuo[i];\n for(s=a+0.5;ss) break;\n else continue;\n}\nif(j==n)break;\n}\n\n if(s>b) printf(\"%d %d\",a,b);\n else printf(\"no\");\n return 0;\n}\n\n\n\n"} +{"label": "76", "index": "37627", "code": "int main(){\n int N=100000;\n int sum=1;\n int n;\n scanf(\"%d\\n\",&n);\n int a[n];\n int b[n];\n int c[n];\n int d[n];\n for(int i=1;i<=n;i++){\n scanf(\"%d %d\\n\",&a[i-1],&b[i-1]);\n c[i-1]=a[i-1];d[i-1]=b[i-1];\n }\n \n for(int k=1;k<=n;k++){\n for(int i=1;i<=n-k;i++){\n if(a[i-1]>=a[i]){int y;y=a[i-1];a[i-1]=a[i];a[i]=y;}\n if(b[i-1]<=b[i]){int x;x=b[i-1];b[i-1]=b[i];b[i]=x;}\n }\n }\n int left=a[0];\n int right=b[0];\n int sz[2*N];\n for(int i=1;i<=2*N;i++){sz[i-1]=0;}\n for(int i=1;i<=n;i++){\n for(int t=(2*c[i-1]-1);t<=(2*d[i-1]-1);t++){sz[t-1]=1;}\n }\n for(int i=(2*left-1);i<=(2*right-1);i++){if(sz[i-1]==0){sum=0;}}\n if(sum==0){printf(\"no\");}\n if(sum==1){printf(\"%d %d\",left,right);}\n return 0;\n}\n"} +{"label": "76", "index": "37628", "code": "int main(){ \n int n,a[10001],b[10001],c[10001],i,j,max,M,m,temp,k,s,h=1;\n scanf(\"%d\",&n);\n for(i=0;ih-1;i--)\n if(a[i]=a[i]){a[0]=a[i];}\n if(b[0]<=b[i]){b[0]=b[i];}}\nfor(s=a[0];smax) max=b[i];\n\t}\n\tfor(i=min;i<=max;i++)\n\t{\n\t\tk=0;\n\t\tfor(j=0;j=a[j]))||((i==b[j])&&(j==n-1)))\n\t\t\t{\n\t\t\t\tk=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (k==0) \n\t\t{\n\t\t\tprintf(\"no\\n\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (k!=0) printf(\"%d %d\\n\",min,max);\n\treturn 0;\n}\n"} +{"label": "76", "index": "37631", "code": "int main()\n{\n\tint n,a[50000],b[50000],min=10000,max=0,e=1,p=0;\nfloat j;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;i<=n-1;i++)\n\t{\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t\tif(a[i]max)max=b[i];\n\t}\n\tj=min+0.0;\n\twhile(j<=max)\n\t{\n\t\tfor(int k=0;k<=n-1;k++)\n\t\t{\n\t\t\tif(b[k]>=j && j>=a[k])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(k==n-1)p=1;\n\t\t}\n\tj=j+0.5;\n\t}\n\tif(p==1)printf(\"no\");\n\telse\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37632", "code": "int main()\n{\n\tstruct qujian\n\t{\n\t\tint a;\n\t\tint b;\n\t}qj[50000],temp;\n\tint n,i,j,max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i--){\n\t\tfor(j=0;jqj[j+1].a){\n\t\t\t\ttemp.a=qj[j].a;\n\t\t\t\ttemp.b=qj[j].b;\n\t\t\t\tqj[j].a=qj[j+1].a;\n\t\t\t\tqj[j].b=qj[j+1].b;\n\t\t\t\tqj[j+1].a=temp.a;\n\t\t\t\tqj[j+1].b=temp.b;\n\t\t\t}\n\t\t}\n\t}\n\tmax=qj[0].b;\n\tfor(i=0;i2*x)min=2*x;\n\t\t\tif(max<2*y)max=2*y;}\n\t\tfor(j=2*x;j<=2*y;j++){a[j]=1;}}\n\tfor(i=min;i<=max;i++){\n\t\tsum+=a[i];}\n\tif(sum==max-min+1){printf(\"%d %d\",min/2,max/2);}\n\telse{printf(\"no\");}\nreturn 0;}"} +{"label": "76", "index": "37634", "code": "int main()\n{\n\tint m,n,i,min,max,a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;m--)\n\t{\n\t\tfor(i=0;ia[i+1])\n\t\t\t{\n\t\t\t\tmin=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=min;\n\t\t\t\tmin=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=min;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;ib[i])\n\t\t{\n\t\t printf(\"no\\n\");\n\t\t break;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(b[i]>=b[i+1])\n\t\t\t{\n\t\t\t\tmax=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=max;\n\t\t\t}\n\t\t}\n\t}\n if(i==n-1)\n\t{\n\t\tprintf(\"%d %d\\n\",a[0],max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37635", "code": "int main(){\n\tint n,a[50000],b[50000],sz[10000];\n\tscanf(\"%d\",&n);\n\tfor(int j=0;ja[m+1]){\n\t\t\tmin=a[m+1];\n\t\t}\n\t}\n\tint max=b[0];\n\tfor(int k=0;k=a[t])){\n\t\t\t\tsz[i]=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tint ans=sz[min];\n\tfor(i=min+1;is[b][1]){\n\t\tb=i;\n\t\t}\n\t}\n\n d=s[b][1];\n\n\tfor(c=1.0*s[a][0];c<=d;c+=0.5){\n\t\tfor(i=0;i=s[i][0]&&c<=s[i][1]){\n\t\t\t break;\n\t\t\t}\n\t\t\tif(i==n-1){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tprintf(\"%d %d\",s[a][0],s[b][1]);\n \nreturn 0;\n}"} +{"label": "76", "index": "37637", "code": "int main(){\n int n,e;\n scanf(\"%d\",&n);\n int QJ[n][2];\n for(int i=0;iQJ[k+1][0]){\n e=QJ[k+1][0];\n QJ[k+1][0]=QJ[k][0];\n QJ[k][0]=e;\n e=QJ[k+1][1];\n QJ[k+1][1]=QJ[k][1];\n QJ[k][1]=e;\n }\n }\n }\n \n for(double m=QJ[0][0];m<=QJ[n-1][0];m=m+0.5){\n int s=0; \n for(int p=0;pQJ[p][1]){\n s=s+1;\n }\n }\n if(s==n){\n printf(\"no\");\n break;\n }\n if(m==QJ[n-1][0]){\n for(int j=0;jQJ[k+1][1]){\n \n e=QJ[k+1][1];\n QJ[k+1][1]=QJ[k][1];\n QJ[k][1]=e;\n }\n }\n } \n printf(\"%d %d\",QJ[0][0],QJ[n-1][1]); \n }\n }\n return 0;\n }"} +{"label": "76", "index": "37638", "code": "int main(){\nint n,a[50000],b[50000],i,k,c,d,isTrue=1;\nscanf(\"%d\",&n);\nfor(i=0;ia[i+1]){\nc=a[i];\nd=b[i];\na[i]=a[i+1];\nb[i]=b[i+1];\na[i+1]=c;\nb[i+1]=d;\n}\n}\n}\nfor(i=0;ia[i]){\n c=a[i];\n }\n }\n for(i=0,d=0;ia[i]&&ec[i+1]){\n\t\t\t e=c[i+1];\n\t\t\t\tc[i+1]=c[i];\n\t\t\t\tc[i]=e;\n\t\t\t}\n\t\t\tif(d[i]>d[i+1]){\n f=d[i+1];\n\t\t\t\td[i+1]=d[i];\n\t\t\t\td[i]=f;\n\t\t\t}\n\t\t}\n\t}\n\tfor(g=c[0];g<=d[n-1];g=g+1.0/2){\n\t\tm=0;\n\t\tfor(i=0;i=a[i]&&g<=b[i]){\n\t\t\t\tm++;\n\t\t\t}\n\t\t}\n\t\tif(m!=0){\n\t\t\tx++;\n\t\t}\n\t}\n\tif(x!=2*(d[n-1]-c[0])+1){\n\t\t\tprintf(\"no\");\n\t}else{\n\t printf(\"%d %d\",c[0],d[n-1]);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37641", "code": "//??????????????????????\n\n\nint getMin(int ai[], int ais[])//?????\n{\n int i, min = 0;\n\tfor (i = 1; i < MAX && ai[i] != -1; i++) {\n\t\tif (ai[i] < ai[min])\n\t\t\tmin = i;\n\t}\n\tais[min] = 0;\n\treturn min;\n}\nint getMax(int bi[])//?????\n{\n\tint i, max = 0;\n\tfor (i = 1; i < MAX && bi[i] != -1; i++) {\n\t\tif (bi[i] > bi[max])\n\t\t\tmax = i;\n\t}\n\treturn max;\n}\nint hasEqual(int a, int ai[], int ais[]) {\n\tint i;\n\tfor (i = 0; i < MAX; i++) {\n\t\tif (ai[i] <= a && ais[i] == 1) {\n\t\t\tais[i] = 0;\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\nint main() {\n\tint ai[MAX], bi[MAX];\n\tint aischeck[MAX];\n\tint n = 0, i, temp;\n\tfor (i = 0; i < MAX; i++)//???\n\t{\n\t\tai[i] = -1;\n\t\tbi[i] = -1;\n\t\taischeck[i] = 1;\n\t}\n\tint mi, ma, min, max;\n\tscanf(\"%d\", &n);\n \n\n \n\tfor (i = 0; i < n; i++) {\n\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t}\n \n\tmi = min = getMin(ai, aischeck);\n\tma = max = getMax(bi);\n\ttemp = hasEqual(bi[min], ai, aischeck);\n \n\twhile (temp != -1)//????\n\t{\n\t\ttemp = hasEqual(bi[temp], ai, aischeck);\n\t\tif (bi[temp] == bi[ma]) {\n\t\t\tprintf(\"\\n%d %d\", ai[mi], bi[ma]);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"no\\n\");\n}\n\n\n/*\nint main(){\n int n,min,max;\n int add=0;\n int a[100000];\n int b[100000];\n int sz[100000];\n scanf(\"%d\",&n);\n for(int i=0;imax)\n max=b[i];\n \n }\n for(int i=min;i<=max;i++){\n sz[i]=1;\n }\n for(int i=0;i0)printf(\"no\");\n else printf(\"%d %d\",min,max);\n}\n\n\n\n\n*/\n\n"} +{"label": "76", "index": "37642", "code": "int main()\n{\n\tint n,i,j,k=0;\n\tint a[10000],b[10000],c[10000],d[10000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j]&&b[i]=a[j]&&b[i]a[j]&&b[i]<=b[j])&&i!=j)\n\t\t\t{\n\t\t\t\te=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(e)\n\t\t{\n\t\t\tc[k]=a[i];\n\t\t\td[k]=b[i];\n\t\t\tk++;\n\t\t}\n\t\t\n\t}\n\tfor(i=1;i<=k;i++)\n\t{\n\t\tfor(j=0;jc[j+1]||(c[j]==c[j+1]&&d[j]>d[j+1]))\n\t\t\t{\n\t\t\t\tint f,g;\n\t\t\t\tf=c[j];\n\t\t\t\tc[j]=c[j+1];\n\t\t\t\tc[j+1]=f;\n\t\t\t\tg=d[j];\n\t\t\t\td[j]=d[j+1];\n\t\t\t\td[j+1]=g;\n\t\t\t}\n\t\t}\n\t}\n\tint isbreak=0;\n\tfor(i=0;imax){\n\t\tmax=b[i];\n\t}\n}\nfor(i=2*min-1;i<2*max;i++){\nc[i]=1;\n}\nfor(i=0;is[j][1])\n {\n a=s[i][1];\n s[i][1]=s[j][1];\n s[j][1]=a;\n a=s[i][2];\n s[i][2]=s[j][2];\n s[j][2]=a;\n }\n t=s[0][2]; \n for (i=0;ia[j+1]){\nt=a[j];\na[j]=a[j+1];\na[j+1]=t;\nt=b[j];\nb[j]=b[j+1];\nb[j+1]=t;\n}\nt1=a[1];\nt2=b[1];\nfor (i=2;i<=n;i++){\nif ((b[i]t2)\nt2=b[i];\n}\nif (q==0) \n printf(\"%d %d\",t1,t2);\nelse printf(\"no\");\nreturn 0;\n}"} +{"label": "76", "index": "37646", "code": "int main(){\n\tint n,i,j,max,min,p,q,s;\n\ts=0;\n\tscanf(\"%d\",&n);\n\tint * a;\n\tint * b;\n\tint * c;\n\ta=(int*)malloc(sizeof(int)*n);\n\tb=(int*)malloc(sizeof(int)*n);\n\tfor(i=0;ia[i]) min=a[i];\n\t\tif(max=1)\n\t\tprintf(\"no\");\n\tif(s==0)\n\t\tprintf(\"%d %d\",min,max);\n\tfree(a);free(b);free(c);\n\treturn 0;\n}"} +{"label": "76", "index": "37647", "code": "int main()\n{\n\tint n,i,j,sum,c,d,temp,e,f,g;\n\tscanf(\"%d\",&n);\n\ttemp=0;\n\tint a[50000],b[50000];\n\tfor(i=0;ia[j+1])\n\t\t\t{\n\t\t\t\te=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=e;\n\t\t\t\tf=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=f;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;ia[j+1].min){\n\t\t\t\tb[j]=a[j+1];\n\t a[j+1]=a[j];\n\t\t\t\ta[j]=b[j];}}}\n c[0].max=a[0].max;\n\tfor(i=0;i=a[i+1].min&&c[0].max>=a[i+1].max){\n\tc[0].min=a[0].min;\n\tc[0].max=c[0].max;}else if(c[0].max=a[i+1].min&&c[0].maxm[j+1].a){\n\t\t\t\tt=m[j];\n\t\t\t\tm[j]=m[j+1];\n\t\t\t\tm[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=n;i++){\n\t\tfor(j=0;jm[j+1].b){\n\t\t\t\te=m[j].b;\n\t\t\t\tm[j].b=m[j+1].b;\n\t\t\t\tm[j+1].b=e;\n\t\t\t}\n\t\t}\n\t}\n\tz=1;\n\tfor(i=0;ia[i+1][0])\n\t\t\t{t1=a[i][0];\n\t\t\ta[i][0]=a[i+1][0];\n\t\t\ta[i+1][0]=t1;\n\t\t\tt2=a[i][1];\n\t\t\ta[i][1]=a[i+1][1];\n\t\t\ta[i+1][1]=t2;}\n\t\t}\n for(i=1;i=a[j][0])) {t5=t5;}\n\telse {t5=t5+1;}}\n \n\t\n if (t5==n-1){t3=0; \n\t printf(\"no\"); \n\t break;}\n\telse{t3=1;\n\tt5=0;}\n }\nt4=a[0][1];\nif(t3!=0)\n\t{ for(i=0;i=t4)\n\t {t4=a[i][1];}\n\t }\n\tprintf(\"%d %d\",a[0][0],t4);}\nreturn 0;\n}"} +{"label": "76", "index": "37652", "code": "int main()\n{\nint a[50000],b[50000],c[10001];\nint i,n;\nfor(i=0;i<10002;i++){c[i]=0;}\nscanf(\"%d\",&n);\nfor(i=0;ibmax){bmax=b[i];}}\nfor(i=0;i=2*a[i]&&j<=2*b[i])\n\t\n\t\n\t\n\t\ns[j]=1;\n\t\n\t\n}\n\t\n}\n\t\nint x,y;\n\t\nfor(i=1;i<20000;i++){\n\t\n\t\nif(s[i]==0&&s[i+1]==1&&s[i-1]==1){\n\t\n\t\n\t\nk++;\n\t\n\t\n\t\nbreak;\n\t\n\t\n}\n\t\n\t\nelse{\n\t\n\t\n\t\nif(s[i]==1&&s[i+1]==1&&s[i-1]==0)\n\t\n\t\n\t\n\t\nx=i/2;\n\t\n\t\n\t\nif(s[i]==1&&s[i+1]==0&&s[i-1]==1)\n\t\n\t\n\t\n\t\ny=i/2;\n\t\n\t\n}\n\t\n}\n\t\nif(k==0)\n\t\n\t\nprintf(\"%d %d\",x,y);\n\t\n\n\t\nelse{\n\t\n\t\nprintf(\"no\");\n\t\n}\nreturn 0;\n}"} +{"label": "76", "index": "37654", "code": "int main (){\n int i,m,k,n,t;\n double d;\n scanf(\"%d\\n\",&n);\n int a[n],b[n],A[n],B[n];\n for(i=0;i0;k--){\n for(i=0;iA[i+1]){\n t=A[i]; \n A[i]=A[i+1]; \n A[i+1]=t; \n}\n}\n}\n for(k=n-1;k>0;k--){\n for(i=0;iB[i+1]){\n m=B[i];\n B[i]=B[i+1]; \n B[i+1]=m; \n}\n}\n}\n for(d=A[0]+0.5;da[i]&&d c[i + 1])\n\t\t\t{\n\t\t\t\te = c[i + 1];\n\t\t\t\tc[i + 1] = c[i];\n\t\t\t\tc[i] = e;\n\t\t\t}\n\t\t\tif(d[i] > d[i+1])\n\t\t\t{\n\t\t\t\te = d[i+1];\n\t\t\t\td[i+1] =d[i];\n\t\t\t\td[i] = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(c[0] > d[0])\n\t\tc[0] = d[0];\n\tif(c[n-1] < d[n-1])\n\t\tc[n-1] = d[n-1];\n\tfor(j = c[0]; j <= c[n-1]; j = j + 0.5)\n\t{\n\t\tk = 1;\n\t\tfor(i = 0; i < n; i++)\n\t\t{\n\t\t\tif(j <= b[i] && j >= a[i])\n\t\t\t\tk = 0;\n\t\t}\n\t\tif(k == 1)\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(k == 0)\n\t{\n\tprintf(\"%d %d\", c[0], c[n-1]);\n\t}\n\n\n\n\n\n\treturn 0;\n}"} +{"label": "76", "index": "37656", "code": "int main()\n{\n\tint a[50001],b[50001],n,i,k,e,t,s,flag=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i+1])\n\t\t\t{\n\t\t\t\te=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=e;\n\t\t\t\tt=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;ib[i+1])\n\t\t\t{\n\t\t\t\tb[i+1]=b[i];\n\t\t\t continue;\n\t\t\t}\n\t\t}\n else\n\t\t{\n\t\t\tflag=1;\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(flag==0)\n\t{\n\t\tprintf(\"%d %d\",a[0],b[i]);\n\t}\n\treturn 0;\n\n}\n\n"} +{"label": "76", "index": "37657", "code": "int main()\n{\nint a[50000],b[50000];\nint n,nummax,nummin,max,min;\nscanf(\"%d\",&n);\nfor(int i=0;i=a[u]){\nmin=a[u];\nnummin=u;\n }\n \n}\nif(b[nummin]==max&&a[nummax]==min){\nprintf(\"%d %d\",min,max);\n}\nelse{\nprintf(\"no\");\n}\n\nreturn 0;\n}\n"} +{"label": "76", "index": "37658", "code": "int main(){\n int a[50000], b[50000], n, s[50000];\n \n scanf(\"%d\\n\", &n);\n for(int i=0;ia[i]){\n c=a[i];\n }\n if(d=a[i]&&ma[i+2]){\n\t\t\t\te=a[i];\n\t\t\t\ta[i]=a[i+2];\n\t\t\t\ta[i+2]=e;\n\t\t\t\tt=a[i+1];\n\t\t\t\ta[i+1]=a[i+3];\n\t\t\t\ta[i+3]=t;\n\t\t\t}\n\t\t}\n\t}\n\tint p=a[0],q=a[1];\n\tfor (i=0;i<2*n-2;i=i+2){\n\t\tif(a[i+2]>q){\n\t\t\tr=1;\n\t\t\tbreak;\n\t\t}\n\t\telse if(a[i+2]<=q&&a[i+3]>=q){\n\t\t\tq=a[i+3];\n\t\t}\n\t}\n\tif(r==1){printf(\"no\\n\");}\n\telse{\n\t\tprintf(\"%d %d\\n\",p,q);\n\t}\n\t\treturn 0;\n\t}\n\n\n"} +{"label": "76", "index": "37660", "code": "int main(){\n\tint n;\nint tag[10000];\n\tstruct part{\n\t\tint start;\n\t\tint end;\n\t};\n\tstruct part number[50000];//???????\n\tint i,j,max,min,result;\t\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax) max=number[i].end;\n\t\t\tif(min>number[i].start) min=number[i].start;\n\t\t\n\t}//?????end????start\n\tfor(i=0;i=a[j]){\n k=a[j];}\n if(l<=b[j]){\n l=b[j];}\n }\n for(m=k+0.1;ma[i]&&myou)you=b[j];}\n\tz=zuo;\n\ty=you;\n\tfor(z;z<=y;z+=0.5){\n\t\tfor(int k=0;k=1.0*a[k])){x=1;}}\n\t c*=x;d++;x=0;\n\t}\n\tif(c==0){printf(\"no\");}\n\t\telse{printf(\"%d %d\",zuo,you);}\n\t \n\t\n\treturn 0;\n}"} +{"label": "76", "index": "37663", "code": "int main()\n{\n\tint n;\n\tint i,j,k=1;\n\tstruct qujian\n\t{\n\t\tint a;\n\t\tint b;\n\t}q[50000],t;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iq[j].a)\n\t\t\t{\n\t\t\t\tt=q[j];\n\t\t\t\tq[j]=q[i];\n\t\t\t\tq[i]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;iq[i].b)\n\t\t{\n\t\t\tprintf(\"no\\n\");\n\t\t\tk=0;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tq[i+1].a=q[i].a;\n\t\t\tq[i+1].b=(q[i].b>q[i+1].b)?q[i].b:q[i+1].b;\n\t\t}\n\t}\n\tif(k)\n\t{\n\t\tprintf(\"%d %d\\n\",q[n-1].a,q[n-1].b);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37664", "code": "int main()\n{\n int n,i,j,m,k;\n\tint a[50000][2],b[10000],qj[10000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i4--)\n {\n if (qj[i4].begin=qj[i5].begin){if(qj[i5].end>qj[i2].end){qj[i2].end=qj[i5].end;}for (int jj=i5;jjx[i][1])min=x[i][1];\n\t\t}\n\tfor(i=1;i<=n;i++){\n\t\t\tif(max 0){\n\t\tfor(i = 0; i < n; i++){\n\t\t\tif(mark[i] == 0){\n\t\t\t\tif(sections[i][1] <= right){\n\t\t\t\t\tmark[i] = 1;\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\telse if(sections[i][0] <= right){\n\t\t\t\t\tright = sections[i][1];\n\t\t\t\t\tmark[i] = 1;\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(count != 0 && count == temp){\n\t\t\tflag = 1;\n\t\t\tbreak;\n\t\t}\n\t\ttemp = count;\n\t}\n\tif(flag == 1){\n\t\tprintf(\"no\");\n\t}\n\telse{\n\t\tprintf(\"%d %d\" , left , right);\n\t}\n\treturn 0;\n}\n\n"} +{"label": "76", "index": "37668", "code": "int main()\n{\nint n,a,b;\nscanf(\"%d\",&n);\nint shuzu[10000],Shuzu[10000],p,q,num=0;\nfor(int i=0;ishuzu[j]) a=shuzu[j];\nb=Shuzu[0];\nfor(int l=1;lq)&&!(Shuzu[y]q) q=Shuzu[y];\n }\n }\n if(x==n) break;\n }\nif(num==n-1)\nprintf(\"%d %d\",a,b);\nelse\nprintf(\"no\");\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37669", "code": "int main()\n{\n\tint a[5000][2];\n\tint i,n,x,d,m,s;\n\t\n\tscanf(\"%d\",&n);\n\tfor(i=0;id)\n\t\t\t{\n\t\t\t\td=a[i][1];\n\t\t\t}\n\t\t}\n\t\tint c[10000];\n\t\tfor(i=x;ia[i+1][0]){\n\t\t\t\tfor(j=0;j<2;j++){\n\t\t\t\te=a[i+1][j];\n a[i+1][j]=a[i][j];\n a[i][j]=e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\nfor(i=1;ia[u][1]){\n\t\to++;\n\t}\n\t\n\t}\nif(o==i) l++;\no=0;\n}\nfor(k=1;k<=n;k++){\n\t\tfor(i=0;ia[i+1][1]){\n\t\t\t\t\n\t\t\t\te=a[i+1][1];\n a[i+1][1]=a[i][1];\n a[i][1]=e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\n\nif(l==0) printf(\"%d %d\",a[0][0],a[n-1][1]);\nelse printf(\"no\");\nreturn 0;\n}"} +{"label": "76", "index": "37671", "code": "int main() {\n\tint n,i,a=0,begin[50000],end[50000],min,max;\n\tdouble b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=max)\n\t\t\tmax=end[i];\n\t}\n for(b=min*1.0+0.1;bbegin[i]&&ba)min=a;\n\t\tif(maxsz[i+1]){\n m=sz[i];\n sz[i]=sz[i+1];\n sz[i+1]=m;\n }\n }\n }\n for(int x=0;xzs[i+1]){\n m=zs[i];\n zs[i]=zs[i+1];\n zs[i+1]=m;\n }\n }\n }\n a=1;\n for(int i=0;iarray[j].s){\n\t\t\t\tt=array[i].s;\n\t\t\t\tarray[i].s=array[j].s;\n\t\t\t\tarray[j].s=t;\n\t\t\t\tt=array[i].e;\n\t\t\t\tarray[i].e=array[j].e;\n\t\t\t\tarray[j].e=t;\n\t\t\t}\n\t\t}\n\t}\n\tt=0;\n\tend=array[0].e;\n\tfor(i=0;i=array[i].s){\n\t\t\tif(enda[i][0])\n\t\t\t\t{\n\t\t\t\t\tta=a[k][0];\n\t\t\t\t\ttb=a[k][1];\n\t\t\t\t\ta[k][1]=a[i][1];\n\t\t\t\t\ta[k][0]=a[i][0];\n\t\t\t\t\ta[i][0]=ta;\n\t\t\t\t\ta[i][1]=tb;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}\n\n\tai=a[0][0];\n\tbi=a[0][1];\n\n\tfor(i=0;i=ai)\n\t\t{\n\t\t\tai=a[i][0];\n\t\t}\n\t\telse if(a[i][1]=bi&&a[i][0]<=bi)\n\t\t{\n\t\t\tbi=a[i][1];\n\t\t}\n\t\telse if(a[i][0]>bi)\n\t\t{\n\t\t\ts=1;\n\t\t}\n\t}\n\n\tif(s==1)\n\t\tprintf(\"no\");\n\telse\n\t\tprintf(\"%d %d\\n\",ai,bi);\n\treturn 0;\n}"} +{"label": "76", "index": "37677", "code": "\nint main() {\n int n;\n scanf(\"%d\",&n);\n \n struct interval{int left;int right;}itv[n]; \n \n int i;\n int min,max;\n min=100000;\n max=0;\n for(i=0;imax){max=itv[i].right;}\n \n }\n \n \n int s;\n s=1;\n int j;\n \n \n for(i=0;i=itv[j].left && itv[i].left<=itv[j].right){s=1;}\n \n }\n }\n if(s==0){break;}\n }\n }\n \n\n \n if(s==0){printf(\"no\");}\n else{printf(\"%d %d\",min,max);}\n return 0;\n}"} +{"label": "76", "index": "37678", "code": "int main(){\n int q[10000];\n int m[10000];\n int h,i,a,b,p,s,j,o,k;\n double l;\n scanf(\"%d\",&h);\n i=0;\n s=0;\n for(i=0;ib)b=m[k];\n }\n for(l=a+0.5;l=q[j]&&l<=m[j]){\n p++;}}\n if(p>0){s++;}\n \n \n }\n if(s==b-a){\n printf(\"%d %d\",a,b);}\n else {printf(\"no\");}\n return 0;\n }\n \n\n"} +{"label": "76", "index": "37679", "code": "int main(){\nint t[50001][2];\nint r[10001];\nint n,k,i,j,x,y,sum=1;\nfor(i=0;i<10001;i++){\n\tr[i]=0;\n}\nscanf(\"%d\",&n);\nfor(i=0;i0;i--){\n\tif(r[i]==1){\n\t y=i;\n\t break;\n\t }\n}\nfor(i=x;iqj[b+1][0]){\n\t\t e=qj[b][0];r=qj[b][1];\n\t\t\t qj[b][0]=qj[b+1][0];qj[b][1]=qj[b+1][1];\n\t\t\t qj[b+1][0]=e; qj[b+1][1]=r;\n\t\t }\n\t }\n \n }\n for(int p=0;pqj[p][1]){\n\t s=0;\n\t }\n\t else{\n\t\t if(qj[p][1]>qj[p+1][1]){\n\t\t qj[p+1][1]=qj[p][1];\n\t\t }\n\t }\n }\n if(s==0){printf(\"no\");}\n else{\n\t printf(\"%d \",qj[0][0]);\n\t for(int q=1;q<=n;q++){\n\t int f;\n\t\t for(int u=0;umax) max=b;\n for (j=a;j=zdd[i])&&(x<=ydd[i])){\n p++ ;\n } }\n if(p>0) {s++;}\n }\n if(s==max-min) {printf(\"%d %d\",min,max); }\n else {printf(\"no\");}\n return 0;\n}\n\n"} +{"label": "76", "index": "37683", "code": "int main(){\n int a[50000],b[50000],s[50000]={0},u[50000]={0},v[50000]={0};\n int n,i,j,x,y,m=0;\n scanf(\"%d\",&n);\n for(i=0;ib[i+1]){\n j=b[i];\n b[i]=b[i+1];\n b[i+1]=j;\n }\n }\n s[b[n-1]]=1;\n for(i=0;i<10001;i++){\n if(s[i]==1&&m==0){\n x=i;\n m=1;\n }\n if(m==1){\n if(s[i]==0){\n y=i-1;\n m=2;\n }\n }\n if(m==2){\n if(s[i]==1){\n m=3;\n }\n }\n }\n if(m==2){\n printf(\"%d %d\",x,y);\n }\n else\n printf(\"no\");\n return 0;\n}"} +{"label": "76", "index": "37684", "code": "int main(){\n int i,z=10000,qj[50000][2],y=0,n,k=0,m=0;\n double s;\n scanf(\"%d\",&n);\n for(i=0;iy)\n y=qj[i][1];\n }\n for(s=z;s<=y;s+=0.5){\n for(i=0;i=qj[i][0])&&(s<=qj[i][1]))\n k++;\n }\n if(k==0){\n m++;\n }\n k=0;\n }\n if(m!=0){\n printf(\"no\");\n }else{\n printf(\"%d %d\",z,y);\n }\n\n return 0;\n }\n \n \n \n"} +{"label": "76", "index": "37685", "code": "int main(){\n\tint n,a[50000]={0},b[50000]={0},c[10003]={0};\n\tint i,max,min,k,s=0,t;\n\tscanf(\"%d\",&n);\n\tscanf(\"\\n%d%d\",&a[0],&b[0]);\n\tint t1=a[0],t2=b[0];\n\tfor(i=1;it2){\n\t\tt2=b[i];\n\t}\n\t}\n\tfor(i=0;iw){\n\t\t\tw=b[i];\n\t\t}\n\t}\n\t\n\tfor(i=k;i<=w-1;i++){\n\t\tif(s[i]==0){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"%d %d\",k,w);\n\n\n\treturn 0;\n}"} +{"label": "76", "index": "37687", "code": "int main(){\n\tint n,i,j,amin,bmax,t=0;\n\tint zqj[1000][1000]={0};\n\tstruct qujian{\n\t\tint a;\n\t\tint b;\n\t};\n\tstruct qujian q[5000];\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&q[i].a,&q[i].b);\n\t}\n\tamin=q[1].a;\n\tbmax=q[1].b;\n\tfor(i=1;i<=n;i++){\n\t\tif(q[i].abmax){\n\t\t\tbmax=q[i].b;\n\t\t}\n\t}\n\tfor(i=1;i<=n;i++){\n\t\tif(q[i].a==q[i].b){\n\t\t\tzqj[q[i].a][q[i].b]=1;\n\t\t}\n\t\tfor(j=q[i].a;jmax){\n\t\t\tmax=b[h];\n\t\t}\n\t}\n\tfor(int m=0;m=max)\n\t\t\tmax=num[i][1];\n\t\tfor(j=num[i][0];jx[i+1]){\n e=x[i];\n x[i]=x[i+1];\n x[i+1]=e;\n }\n if(y[i]>y[i+1]){\n e=y[i];\n y[i]=y[i+1];\n y[i+1]=e;\n }\n }\n }\n a=0;\n for(i=0;iy[n-i-2]||y[i]a[j+1])\n\t\t\t{\n\t\t\t\tt=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=t;\n\t\t\t\tt=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tk=1;\n\tfor (i=0;i=b[i-1]))\n\t\t{\n\t\tif (b[i]szxa[j+1]){\n\t\t\t\tt=szxa[j];\n\t\t\t\tszxa[j]=szxa[j+1];\n\t\t\t\tszxa[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;iszxb[j+1]){\n\t\t\t\tt=szxb[j];\n\t\t\t\tszxb[j]=szxb[j+1];\n\t\t\t\tszxb[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tif(szxa[0]>szxb[0]){\n\t\tt=szxa[0];\n\t\tszxa[0]=szxb[0];\n\t\tszxb[0]=t;\n\t}\n\tif(szxa[n-1]>szxb[n-1]){\n\t\tt=szxa[n-1];\n\t\tszxa[n-1]=szxb[n-1];\n\t\tszxb[n-1]=t;\n\t}\n\tfor(m=szxa[0];m<=szxb[n-1];m=m+0.5){\n\t\tfor(j=0;j=sza[j])&&(m<=szb[j])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(j==n){\n\t\t\tputs(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(m==szxb[n-1]+0.5){\n\t\tprintf(\"%d %d\",szxa[0],szxb[n-1]);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37693", "code": "int main()\n{\n\tint n,num=0,amin, bmax,i,maxb=0;\n\tint a[10000];\n\tint b[10000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;j--)\n\t{\n\t\tfor(int k=0;ka[k+1])\n\t\t\t{\n\t\t\t int tmp,tmpx;\n\t\t\t tmp=a[k+1];\n\t\t\t\ttmpx=b[k+1];\n\t\t\t a[k+1]=a[k];\n\t\t\t\tb[k+1]=b[k];\n\t\t\t\ta[k]=tmp;\n\t\t\t\tb[k]=tmpx;\n\t\t\t}\n\n\t\t}\n\t}\n\tfor(int m=0;mb[m-1])\n\t\t\t{\n\t\t\t\tmaxb=b[m];\n\t\t\t}\n\t\t}\n\t\tif(a[m+1]>maxb)\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tnum++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;ib[k+1])\n\t\t\t{\n\t\t\t\tint tmpy;\n\t\t\t\ttmpy=b[k+1];\n\t\t\t\tb[k+1]=b[k];\n\t\t\t\tb[k]=tmpy;\n\t\t\t}\n\t\t}\n\t}\n\tamin=a[0];\n\tbmax=b[n];\n\tif(num==0)\n\t{\n\t\tprintf(\"%d %d\",amin,bmax);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37694", "code": "int main()\n{\n\tint a[50000],b[50000],c[10001];\n\tint n,i,j,k,s=0,p,q,l,u;\n\tint x=10000,d=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;id)\n\t\t{\n\t\t\td=b[i];\n\t\t}\n\t}\n\tfor(i=x;i<=d;i++)\n\t{\n\t\tif(c[i]==1)\n\t\t{\n\t\t\ts++;\n\t\t}\n\t}\n\tif(n>=3)\n\t{\n\t\tif(s>0)\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t}\n\t if(s==0)\n\t\t{\n\t\t printf(\"%d %d\",x,d);\n\t\t}\n\t}\n\tif(n<3)\n\t{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\t\n\n\t\n"} +{"label": "76", "index": "37695", "code": "int main(){\nint n,i,k,e,a[1000],b[1000],x=1;\nscanf(\"%d\",&n);\nfor(i=0;ia[i+1]){e=a[i+1];\n a[i+1]=a[i];\n a[i]=e; }\n } \nfor(k=1;k<=n;k++){for(i=0;ib[i+1]){e=b[i+1];\n b[i+1]=b[i];\n b[i]=e; }\n } \nfor(i=0;ib[i]) {x=0;\n break;}\n }\nif(x==0) printf(\"no\");\nelse printf(\"%d %d\",a[0],b[n-1]);\nreturn 0;}"} +{"label": "76", "index": "37696", "code": "int main()\n{\n \tint sz[ROW][COL];\n \tint n,row,col,max,min,a;\n \tdouble i;\n scanf(\"%d\",&n);\n for(row=0;rowmax){\n\t\t\t\tmax=sz[row][1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tfor(i=min;i<=max;i=i+0.5){\n\t\tfor(row=0;row=sz[row][0]&&i<=sz[row][1]){\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\telse if(row==n-1){\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\tif(i==max) printf(\"%d %d\",min,max);\n\t\t}\n\t\n \n return 0;\n}"} +{"label": "76", "index": "37697", "code": "int main(){\n\tint a[50000],b[50000],n,h,test,i;\n\tdouble x;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t{\n\t\t\t max=b[i];\n }\n\t}\n\tfor(i=1;i=a[i]&&x<=b[i]) {test=1; break;}\n\t\t}\n\t\tif(test==0) {printf(\"no\");return 0;}\n\t}\n\tprintf(\"%d %d\",min,max);\n\treturn 0;\n}"} +{"label": "76", "index": "37698", "code": "int main()\n{\nint n,i,j;\nscanf(\"%d\",&n);\nint num[n+n];\nfor(i=0;i<(n+n);i=i+2)\nscanf(\"%d %d\",&(num[i]),&(num[i+1]));\nfor(j=0;j<(n+n);j=j+2)\n{\nfor(i=0;i<(n+n);i=i+2)\n{\nif(((num[j])<=(num[i+1]))&&((num[j+1])>=(num[i])))\n{num[j]=num[i]num[j+1]?num[i+1]:num[j+1];\nnum[i+1]=num[i+1]>num[j+1]?num[i+1]:num[j+1];}\n}\n}\nfor(j=0;j<(n+n);j=j+2)\n{\nfor(i=0;i<(n+n);i=i+2)\n{\nif(((num[j])!=(num[i]))||((num[j+1])!=(num[i+1])))\n{printf(\"no\");\nreturn 0;}\n}\n}\nprintf(\"%d %d\",num[0],num[1]);\nreturn 0;\n}"} +{"label": "76", "index": "37699", "code": "int main(){\nint n,a[50000],b[50000],i,j,p,t,s;\nscanf(\"%d\",&n);\nfor(i=0;ii;j--){\nif(a[j]i;j--){\nif(b[j]g[i+1]){\n\t\te=g[i+1];\n\t\tg[i+1]=g[i];\n\t\tg[i]=e;\n\t\t}\n\t}\n}\nd=g[0];\nfor(k=1;k<=n;k++){\n\tfor(i=0;i=0||c[r[i]]>=0){\n\tp=p+1;\n\t}\n}\nif(p>0){\nprintf(\"no\");\n}else{\n\n\tprintf(\"%d %d\",d,x);\n}\nreturn 0;\n}"} +{"label": "76", "index": "37701", "code": "int main(){\n\n int i,k,n,s=0,p,a;\n int sz[l]={-1},sz1[l]={-1},sz2[l]={-1},e,f;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=sz1[i]&&a+0.5<=sz2[i]){\n sz[a]=1;\n }\n else if(1!=sz[a]){\n sz[a]=0;\n }\n }\n }\n\tfor(k=1;ksz1[i+1]){\n\t\t\te=sz1[i+1];\n\t\t\tsz1[i+1]=sz1[i];\n\t\t\tsz1[i]=e;\n}\n}\n}\n\t\tfor(k=1;ksz2[i+1]){\n f=sz2[i+1];\n sz2[i+1]=sz2[i];\n sz2[i]=f;\n\t\t\t}\n\t\t}\n\t}\n for(a=0;ae){e=end[i];}}\n\tfor(j=st+0.5;jstart[i]&&jb){\n for(k=0;k=b+1&&k<=c){a[k]=1;}\n }\n }\n }\n for(i=0;i=0;i--){\n if(a[i]==1){c=i;break;}\n }\n for(i=b+1;i<=c+1;i++){\n if(a[i]!=1){break;}\n }\n if(i==c+1){printf(\"%d %d\",b,c);}\n else{printf(\"no\");}\n return 0;\n}"} +{"label": "76", "index": "37705", "code": "int main(){ \n int n,e,q;\n int sz[50000][2];\n scanf(\"%d\",&n);\n\n for(int row=0;row0;m--){\n\t\tfor(int i=0;i<=m-2;i++){\n\t\t\tif(sz[i][0]>sz[i+1][0]){\n\t\t\t\te=sz[i+1][0];\n\t\t\t\tsz[i+1][0]=sz[i][0];\n\t\t\t\tsz[i][0]=e;\n\t\t\t\te=sz[i+1][1];\n\t\t\t\tsz[i+1][1]=sz[i][1];\n\t\t\t\tsz[i][1]=e;\n\t\t\t}\n\t\t}\n\t}\n\t\n\n for(int m=1;mq){\n\t\t\t\tq=sz[i][1];\t\t\t\t\n\t\t\t}\n\t\t}\n printf(\"%d %d\",sz[0][0],q);\n\n return 0; \n } \n"} +{"label": "76", "index": "37706", "code": "int main(){\n\tint n,a[10000],b[10000],min,max,i,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax){\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tfor(double m=min;m<=max;m=m+0.5){\n\t\tfor(j=0;j=a[j]&&m<=b[j]){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(j==n-1){\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tif(m==max){\n\t\t\tprintf(\"%d %d\",min,max);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37707", "code": "int main()\n{\n int n,sz[50000],d[50000],a[50000],b[50000],t=0,s=0,max,min;\n double k;\n scanf(\"%d\", &n);\n int e, i;\n for (i=0; ib[i+1])\n\t\t{\n\t\t\te=b[i+1];\n\t\t\tb[i+1]=b[i];\n\t\t\tb[i]=e;\n\t\t};\n\t}\n\tmax=b[n-1];\n for (k=min+0.5;k<=max;k=k+1){\n t=0;\n for (i=0;isz[i]&&k0){s++;}\n }\n if(s==max-min){printf(\"%d %d\",min,max);}\n else{printf(\"no\");}\n return 0;\n}\n\n\n \n\n"} +{"label": "76", "index": "37708", "code": "int main(){\n int n,a[M],b[M],i,j,e,t,p,s;\n s=0;\n double m;\n scanf(\"%d\",&n);\n scanf(\"\\n\");\n for(i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n }\n if(b[i]>b[i+1]){\n t=b[i+1];\n b[i+1]=b[i];\n b[i]=t;\n }\n }\n }\n m=a[0]+0.5;\n for(;ma[i]&&m0){\n s=s+1;\n }\n }\n if(s==b[n-1]-a[0]){\n printf(\"%d %d\",a[0],b[n-1]); \n }else{\n printf(\"no\");\n }\n return 0;\n}\n\n\n"} +{"label": "76", "index": "37709", "code": "struct Interval\n{\n\tint sta;\n\tint end;\n};\nint maximum(int a,int b,int c)\n{\n\tif(a>=b&&a>=c) return a;\n\tif(b>=a&&b>=c) return b;\n\tif(c>=a&&c>=b) return c;\n}\nint compare(const void *a,const void *b)\n{\n\treturn ((struct Interval *)a)->sta-((struct Interval*)b)->sta;\n}\nmain()\n{\n\tstruct Interval a[50000];\n\tint i,j=0,n,end=0,max=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=a[i+1].sta)\n\t\t{\n\t\t\tj++;\n\t\t\tend=maximum(end,a[i].end,a[i+1].end);\n\t\t}\n\t\telse break;\n\t}\n\tif(j==n-1)\n\t\tprintf(\"%d %d\\n\",a[0].sta,end);\n\telse printf(\"no\");\n}"} +{"label": "76", "index": "37710", "code": "int main(){\n int n,i,min,max,k,p,q,s;\n scanf(\"%d\\n\",&n);\n int a[n],b[n];\n for(i=0;imax){\n max=b[i];\n }\n }\n for(k=1;ka[i+1]){\n p=a[i];\n a[i]=a[i+1];\n a[i+1]=p;\n q=b[i];\n b[i]=b[i+1];\n b[i+1]=q;\n }\n }\n }\n s=0;\n int c[n];\n for(i=1;i0;j--) \n {for(i=0;i=points[i+1].a){tmp=points[i+1];\n points[i+1]=points[i];\n points[i]=tmp;}\n }}\n for(j=1;j=points[j].a){\n if(points[j].b>points[0].b)\n {points[0].b=points[j].b; }\n c++;\n }\n else {c=0;break;}\n }\n if(c!=0)\n {printf(\"%d %d\",points[0].a,points[0].b);} \n else{printf(\"no\\n\");} \n return 0;\n}\n\n"} +{"label": "76", "index": "37712", "code": "int main()\n{\n\tint n,i,p,tem,max,a[100],b[100];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[p+1]){\n\t\t\t\ttem=a[p];\n\t\t\t\ta[p]=a[p+1];\n\t\t\t\ta[p+1]=tem;\n\t\t\t\ttem=b[p];\n\t\t\t\tb[p]=b[p+1];\n\t\t\t\tb[p+1]=tem;\n\t\t\t}\n\t\t}\n\t}\nmax=b[0];\nfor(i=0;imax){printf(\"no\");return 0;}else{if(b[i]>max){max=b[i];}}}\nprintf(\"%d %d\",a[0],max);\n\treturn 0;\n}\n"} +{"label": "76", "index": "37713", "code": "int main(){\n\tint n,a[LEN],b[LEN],i,k,s=0;\n\tint min,max;\n\tdouble x;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=max){\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tfor(x=min;x<=max;x+=0.5){\n\t\tfor(k=0;k=a[k]&&x<=b[k]){\n\t\t\t\ts++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(s!=2*(max-min)+1){\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37714", "code": "int main()\n{\n int a[50000],b[50000];\n int n,i,j,max,min,t,p;\n t=0;\n scanf(\"%d\",&n);\n for(i=0;imax)\n max=b[i];\n }\n p=0;\n for(j=0;j=b[j])\n t=t+2;\n }\n else if(b[j]==max)\n {\n if(b[i]>=a[j]&&a[i]<=a[j])\n t=t+2;\n }\n else\n {\n if(b[i]>=b[j]&&a[i]<=a[j])\n t=t+2;\n else if(b[i]>=b[j]&&a[i]<=b[j]&&a[i]>a[j])\n t=t+1;\n else if(a[i]<=a[j]&&b[i]>=a[j]&&b[i]=2)\n {\n p+=1;\n break;\n }\n }\n\n }\n if(p!=n)\n printf(\"no\\n\");\n else\n {\n printf(\"%d %d\",min,max);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37715", "code": "int main(){\n int i=0,j=0,a[50000],b[50000],e,f,n,t=1;\n \n scanf(\"%d\",&n);\n for(i=0;ia[i+1])\n { e=a[i+1];\n \ta[i+1]=a[i];\n \ta[i]=e;\n \tf=b[i+1];\n \tb[i+1]=b[i];\n \tb[i]=f;\t\n }\t\n }\n \t}\n for(i=0;i=a[i+1]) \n \t{a[i+1]=a[0];\n \t\tif(b[i]>b[i+1])\n b[i+1]=b[i];\n \t}\n \telse {\n \t\tprintf(\"no\");\n \t\tt=0;\n \t}\n }\n if(t==1) printf(\"%d %d\",a[0],b[n-1]);\n return 0;\n}\n"} +{"label": "76", "index": "37716", "code": "int main(){\n int n,a,b;\n scanf(\"%d\",&n);\n struct qu{\n int x,y;\n }\n qus[50000];\n int x,y;\n for(int i=0;i0;k--){\n\t for(int j=0;jqus[j+1].x){\n\t\t\t int tmpx,tmpy;\n\t\t\t tmpx=qus[j+1].x;\n\t\t\t tmpy=qus[j+1].y;\n\t\t\t qus[j+1].x=qus[j].x;\n qus[j+1].y=qus[j].y;\n\t\t\t qus[j].x=tmpx;\n\t\t\t qus[j].y=tmpy;\n\t\t }\n\t }\n }\n a=qus[0].x,b=qus[0].y;\n for(int r=1;rb){\n\t printf(\"no\");\n\t\t return 0;\n\t }else{\n\t\t if(qus[r].y>b)\n\t b=qus[r].y;\n\t }\n }\n printf(\"%d %d\",a,b);\n return 0;\n}"} +{"label": "76", "index": "37717", "code": "int main()\n{\n int n;\n int a[10000],b[10000];\n int i,c=10000,d=1;\n double k;\n scanf(\"%d\",&n);\n for(i=0;i=d)\n\t\t {\n\t\t\t d=b[i];\n\t\t }\n\t }\n\t //printf(\"%d %d\\n\",c,d);\n\t\t for(k=c;ka[k+1][0]){\n\t\t\t\tt=a[k][0];\n\t\t\t\ta[k][0]=a[k+1][0];\n\t\t\t\ta[k+1][0]=t;\n\t\t\t\t}\n\t\t\tif(a[k][1]>a[k+1][1]){\n\t\t\t\tt=a[k][1];\n\t\t\t\ta[k][1]=a[k+1][1];\n\t\t\t\ta[k+1][1]=t;\n\t\t\t}\n\t\t}\n\t} \n\tfor(i=1;i=max){\n\t\t\tmax=sz[i][j];\n\t\t}\n\t}\n\tS=1;\n\tfor(q=min+0.3;q<=max;q++){\n\t\ts=1;\n\t\tfor(i=0;i=sz[i][0]&&q<=sz[i][1]){\n\t\t\t\ts=s*0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ts=s*1;\n\t\t\t}\n\t\t}\n\t\tif(s==0){\n\t\t\tS=S*1;\n\t\t}\n\t\telse{\n\t\t\tS=S*0;\n\t\t}\n\t}\n\tif(S==1&&n>=3){\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\telse{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37720", "code": "\nint main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint sz[50000][2];\n\tint r=0,t=0;\n\tint szz[10000]={0};\n\tfor(int i=0;i=1){\n\t\t\tif(sz[i][1]>sz[r][1]){\n\t\t\t\tr=i;\n\t\t\t}\n\t\t\tif(sz[i][0]line1[j+1]){\n\t\t\t\tmid=line1[j];\n\t\t\t\tline1[j]=line1[j+1];\n\t\t\t\tline1[j+1]=mid;\n\t\t\t\tmid=line2[j];\n\t\t\t\tline2[j]=line2[j+1];\n\t\t\t\tline2[j+1]=mid;\n\t\t\t}\n\t\t\tif(line1[j]==line1[j+1]){\n\t\t\t\tif(line2[j]>line2[j+1]){\n\t\t\t\t\tmid=line2[j];\n\t\t\t\t\tline2[j]=line2[j+1];\n\t\t\t\t\tline2[j+1]=mid;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=line1[j])&&(line2[i]<=line2[j])){\n\t\t\t\tline2[i]=line2[j];\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;imid){\n\t\t\tmid=minus[i];\n\t\t}\n\t}\n\t//for(i=0;i=line2[i])){\n\t\t\ta++;\n\t\t}else{\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(a==n){\n\t\tprintf(\"\\n%d %d\",line1[result],line2[result]);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37722", "code": "int main()\n{\n\tint n,min,max,f;\n\tstruct{\n\t\tint a,b;\n\t}i[50000];\n\tint s[10000];\n\tfor(int u=0;u<10000;u++)\n\t{\n\t\ts[u]=0;\n\t}\n\tscanf(\"%d\",&n);\n\tmax=0;\n\tmin=0;\n\tfor(int c=0;c0)\n\t\t{\n\t\t\tif(i[c].amax)\n\t\t\t{\n\t\t\t\tmax=i[c].b;\n\t\t\t}\n\t\t}\n\t}\n\tfor(int d=min;d<=max;d++)\n\t{\n\t\ts[d]=1;\n\t}\n\tfor(int c=0;c=i[c].a&&ga[j+1][0])\n\t\t\t{\n\t\t\t\tt=a[j][0];\n\t\t\t\ta[j][0]=a[j+1][0];\n\t\t\t\ta[j+1][0]=t;\n\t\t\t\tt=a[j][1];\n\t\t\t\ta[j][1]=a[j+1][1];\n\t\t\t\ta[j+1][1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tmin[0]=a[0][0];\n\tmin[1]=a[0][1];\n\tfor(i=1;imin[1] || a[i][1]min[1])\n\t\t\tmin[1]=a[i][1];\n\t\t}\n\t}\n\tif(m==0)\n\tprintf(\"%d %d\\n\",min[0],min[1]);\n\t\n\treturn 0;\n} \n"} +{"label": "76", "index": "37724", "code": "int main(){\n int i,n,a[1000],b[1000],c[10000],s=1,t,max,min;\n scanf(\"%d\",&n);\n for(i=0;i=max)\n max=b[i];\n }\n for(t=2*min;t<=2*max;t++)\n {\n c[t]=0;\n }\n for(i=0;iy) {\n y=b[i];\n }\n }\n int z;\n z=x;\n for(int k=0;kz) {\n z=b[i];\n }\n }\n }\n if(z==y) {\n printf(\"%d %d\",x,y);\n }\n if(z!=y) {\n printf(\"no\");\n }\n return 0;\n}"} +{"label": "76", "index": "37726", "code": "int main(){\nint n,i,min,max;\nscanf(\"%d\",&n);\nint a[n],b[n];\nfor(i=0;imax){\n\t\tmax=b[i];\n\t}\n}\ndouble h;\nint k=0;\nfor(h=min;h<=max;h=h+0.5){\n\tfor(i=0;i=a[i]){\n\t\t\tk=1;\n\t\t}\n\t}\n\t\tif(k==0){\n\t\t\tprintf(\"no\");\n break;\n\t\t}\n\t\tif(h==max){\n\t\t\tprintf(\"%d %d\",min,max);\n\t\t}\n\t\tk=0;\n}\n\treturn 0;\n}"} +{"label": "76", "index": "37727", "code": "int main(){\n int n,i,ks,js,k;\n\tstruct point{\n\t\tint x,y;\n\t}\n\tqj[NUM],t;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iqj[i+1].x){\n\t\t\t\tt=qj[i+1];\n\t\t\t\tqj[i+1]=qj[i];\n\t\t\t\tqj[i]=t;\n\t\t\t}\n\t\t}\n\t}\n\tks=qj[0].x;\n\tjs=qj[0].y;\n\tfor(i=1;ijs){\n\t\t\t\tjs=qj[i].y;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;}\n\t}\n\tprintf(\"%d %d\",ks,js);\n\treturn 0;\n}\n\t\n\n\t\n\t\n"} +{"label": "76", "index": "37728", "code": "int main(){\n struct qj {\n int a,b;\n } qj[50000],e;\n int n,i,k,bmax;\n scanf(\"%d\",&n);\n for(i=0;iqj[i+1].a){\n e=qj[i+1];\n qj[i+1]=qj[i];\n qj[i]=e;\n }\n }\n }\n for(i=0;iqj[i+1].b){\n qj[i+1].b=qj[i].b;\n }\n }\n if(i==n){\n printf(\"%d %d\",(qj[0].a),qj[n].b);\n }\n return 0;\n}"} +{"label": "76", "index": "37729", "code": "int main(){\n int n,i,a[10000],b[10000],k,t;\n char result='y';\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++){\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t}\n\tfor(t=1;t=a[i]&&a[k]<=b[i]&&b[k]>=b[i]){\n\t\t\t\t\ta[k]=a[i];\n\t\t\t\t}else if(b[k]>=a[i]&&b[k]<=b[i]&&a[k]<=a[i]){\n\t\t\t\t\tb[k]=b[i];\n\t\t\t\t}else if(b[k]>=a[i]&&b[k]<=b[i]&&a[k]>=a[i]){\n\t\t\t\t\ta[k]=a[i];\n\t\t\t\t b[k]=b[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=n;i++){\n\t\tif(a[1]<=a[i]&&b[1]>=b[i]){\n\t\t\tresult='y';\n\t\t}else{\n\t\t\tresult='n';\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(result=='y'){\n\t\tprintf(\"%d %d\",a[1],b[1]);\n\t}else if(result=='n'){\n\t\tprintf(\"no\");\n\t}\n return 0;\n}\n"} +{"label": "76", "index": "37730", "code": "int main()\n{\nint n,m,i,j,k,w,s;\ndouble e[100000];\nint a[1000];\nint b[1000],c[1000];\nscanf(\"%d\",&n);\nfor(i=0;i<10000;i++)e[i]=1;\nk=0;\nw=1000000;\nfor(i=0;ia[i])w=a[i];\n\tif(kmax)\n\t\t{\n\t\t\tmax=shang[q];\n\t\t}\n\t\tif(xia[q]=xia[s] && r<=shang[s])\n\t\t\t{\n\t\t\t\treference++;\n\t\t\t}\n\t\t}\n\t\tif(reference==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(reference==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\telse\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37732", "code": "struct qujian\n{\n\tint a;\n\tint b;\n}qj[50000];\n\nint main()\n{\n\tint n,i,j,temp,left,right,k;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iqj[j].a)\n\t\t\t{\n\t\t\t\ttemp=qj[i].a;\n\t\t\t\tqj[i].a=qj[j].a;\n\t\t\t\tqj[j].a=temp;\n\t\t\t\ttemp=qj[i].b;\n\t\t\t\tqj[i].b=qj[j].b;\n\t\t\t\tqj[j].b=temp;\n\t\t\t}\n\t\t}\n\t}\n\tleft=qj[0].a;\n\tright=qj[0].b;\n\tk=1;\n\twhile(k>0)\n\t{\n\t\tif(k==n)\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",left,right);\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(qj[k].a>right)\n\t\t\t{\n\t\t\t\tprintf(\"no\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(qj[k].aright)\n\t\t\t\t{\n\t\t\t\t\tright=qj[k].b;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n\n\t\n\t"} +{"label": "76", "index": "37733", "code": "int main(){\n\tint n,a[50000],b[50000],c[10000],i,j,shi,zhong;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i]){min=a[i];}\n }\n for(i=min;i<=max;i++){c[i]=0;}\n for(i=0;imax){\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tdouble j;\n\tint k=0;\n\tfor(j=min;j<=max;j+=0.5){\n\t\tfor(i=0;i=a[i]&&j<=b[i]){\n\t\t\t\tk=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(k==0){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n k=0;\n\t}\n\tprintf(\"%d %d\",min,max);\n\treturn 0;\n}\n"} +{"label": "76", "index": "37736", "code": "\nint main ()\n{\n\tint a[1000],b[1000],c=0,n,i,e,f,j; \n\tscanf(\"%d\",&n);\n\tfor(i=0;i=f){\n\t\t\te=a[j];\n\t\t\tf=b[j];\n\t\t}\n\t\tif(a[j]>=e&&a[j]<=f&&b[j]>=f){\n\t\t\tf=b[j];\n\t\t}\n\t\tif(a[j]>=e&&b[j]<=f){\n\t\t\te=e;\n\t\t\tf=f;\n\t\t}\n\t\tif(a[j]<=e&&b[j]<=f&&b[j]>=e){\n\t\t\te=a[j];\n\t\t}\n\t\tif(b[i]==e){\n\t\t\te=a[j];\n\t\t}\n\t\tif(a[i]==f){\n\t\t\tf=b[j];\n\t\t}\n\t\t}\n\t\n\t}\n\tfor(i=0;if||b[i]f){\n\t\t\tc++;\n\t\t}\n\t}\n\tif(c==0){\n\t\tprintf(\"%d %d\",e,f);\n\t}\n\tif(c!=0){\n\t\tprintf(\"no\");\n\t}\n\n\n\n\t\t\n\n\t\n \n\n\treturn 0;\n\n\n}\n"} +{"label": "76", "index": "37737", "code": "int main()\n{\n int n,i,j,m,p,k,l;\n scanf(\"%d\",&n);\n int a[30],b[30];\n for(i=0;ia[j+1])\n {\n m=a[j];\n p=b[j];\n a[j]=a[j+1];\n b[j]=b[j+1];\n a[j+1]=m;\n b[j+1]=p;\n }\n if(a[j]<=a[j+1])\n {\n a[j]=a[j];\n b[j]=b[j];\n a[j+1]=a[j+1];\n b[j+1]=b[j+1];\n }\n }\n }\n k=a[0];\n l=b[0];\n for(i=0;i=a[i+1]&&b[i]<=b[i+1])\n {\n k=a[i];\n l=b[i+1];\n }\n if(b[i]>b[i+1])\n {\n k=a[i];\n l=b[i];\n }\n if(lk){\n\t\t\tk=b[i];\n\t\t}\n\t\tl=a[0];\n\t\tif(a[i]e){\n\t\t\t\t\te=sum;\n\t\t\t\t\tx=(i-e+1)/2;\n\t\t\t\t\ty=i/2;\n\t\t\t\t\tsum=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=2*l;i<2*k+1;i++){\n\t\tif(t[i]==0){\n\t\t\tprintf(\"no\");\n\t\t\tz=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(z==0){\n\t\tprintf(\"%d %d\\n\",x,y);\n\t}\n\n\treturn 0;\n}"} +{"label": "76", "index": "37740", "code": "int main(){\n\tint a[10000],b[10000],c[10000],i,k,n;\n\tint max=0,min=10000;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax){max=b[i];}\n\t}\n\tfor(i=2*min;i<=2*max;i++){\n\t\tc[i]=1;\n\t}\n\tfor(i=0;i bi[max])\n\t\t\tmax = i;\n\t}\n\treturn max;\n}\nint hasEqual(int a, int ai[], int ais[]) {\n\tint i;\n\tfor (i = 0; i < 10; i++) {\n\t\tif (ai[i] <= a && ais[i] == 1) {\n\t\t\tais[i] = 0;\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\nint main() {\n\tint ai[10], bi[10];\n\tint aischeck[10];\n\tint n = 0, i, temp;\n\tfor (i = 0; i < 10; i++)//???\n\t{\n\t\tai[i] = -1;\n\t\tbi[i] = -1;\n\t\taischeck[i] = 1;//?????????????????\n\t}\n\tint mi, ma, min, max;\n\tscanf(\"%d\", &n);\n \n\tfor (i = 0; i < n; i++) {\n\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t}\n \n\tmi = min = getMin(ai, aischeck);\n\tma = max = getMax(bi);\n\ttemp = hasEqual(bi[min], ai, aischeck);\n \n\twhile (temp != -1)//????\n\t{\n\t\ttemp = hasEqual(bi[temp], ai, aischeck);//????????????????????????????????????????????????\n\t\tif (bi[temp] == bi[ma]) {\n\t\t\tprintf(\"\\n%d %d\", ai[mi], bi[ma]);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"no\\n\");\n}\n\n\n/*\nint main(){\n int n,min,max;\n int add=0;\n int a[100000];\n int b[100000];\n int sz[100000];\n scanf(\"%d\",&n);\n for(int i=0;imax)\n max=b[i];\n \n }\n for(int i=min;i<=max;i++){\n sz[i]=1;\n }\n for(int i=0;i0)printf(\"no\");\n else printf(\"%d %d\",min,max);\n}\n\n\n\n\n*/\n\n"} +{"label": "76", "index": "37742", "code": "int main(){\n int n,i,s,m,t,p,a[50000],b[50000];\n double e;\n scanf(\"%d\",&n);\n for(i=0;ib[i-1]){\n m=b[i];\n }\n }\n p=0;\n for(e=s+0.5;ea[i]&&emax)\n {\n max=b[i];\n }\n }\n //printf(\"%d %d\",min,max);\nfor(c=min+0.5;c<=max;c=c+1.0)\n{\n for(k=1,s=0;k<=n;k++)\n {\n if(c>=a[k]&&c<=b[k])\n { s=0;break;}\n else {s=1;}\n }\n if(s==1) {\n printf(\"no\\n\");\n return 0;\n \n }\n \n}\nprintf(\"%d %d\",min,max);\nreturn 0;\n \n}\n\n"} +{"label": "76", "index": "37744", "code": "int main(){\n int n;\n int s[2][50000];\n int k,i;\n int tmp,tmp2;\n int d=1;\n\n scanf(\"%d\",&n);\n for(i=0;is[0][i+1])\n\t {\n\t tmp=s[0][i];\n\t\ts[0][i]=s[0][i+1];\n\t\ts[0][i+1]=tmp;\n\t\ttmp2=s[1][i];\n\t\ts[1][i]=s[1][i+1];\n\t\ts[1][i+1]=tmp2;\n\t }\n\t}\n }\n \n for(i=0;is[1][i+1])&&(i!=n-1))\n\t {\n\t tmp=s[1][i];\n\t s[1][i]=s[1][i+1];\n\t s[1][i+1]=tmp;\n\t }\n\n }\n }\n if(d==0){\n\t printf(\"no\");\n }else{\n\t printf(\"%d %d\",s[0][0],s[1][n-1]);\n }\n return 0;\n}"} +{"label": "76", "index": "37745", "code": "void main()\n{\n\tint n,a[50000],b[50000],c[10001]={0},i,j,max=0,min=10001,s=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)max=b[i];\n\t}\n\tfor(i=min;i=m)\n\t\t\tm=a[i][1];\n\t}\n\tint x=a[0][1];\n\tfor(i=1;i=x)\n\t\t\t\tx=a[i-1][1];\n\t\t\tif(a[i][0]>x){\n\t\t\tprintf(\"no\\n\");\n\t\t\tj=i;\n\t\t\ti=n+1;\n\t\t\t}\n\t\t}\n\t}\n\tif(i==n)\n\t\tprintf(\"%d %d\\n\",a[0][0],m);\n\treturn 0;\n}"} +{"label": "76", "index": "37748", "code": "int main()\n{\n\tint n,i,k,t,e,m,j;\n\t\tscanf(\"%d\",&n);\n\t\tint a[10001],b[10001];\n\t\t\tdouble s[10001],max,min;\nfor(i=0;ib[i+1]){\n\te=b[i];\n\tb[i]=b[i+1];\n\tb[i+1]=e;\n\t\t}\n\t}\n}\nfor(k=1;k<=n-1;k++){\n\tfor(i=0;ia[i+1]){\n\t\tt=a[i];\n\ta[i]=a[i+1];\n\ta[i+1]=t;\n\t\t}\n\t}\n}\nmin=a[0];\nmax=b[n-1];\ns[0]=min;\nfor(j=0;j<2*(max-min);j++)\n\ts[j+1]=s[j]+0.5;\nfor(j=0;j<2*(max-min);j++){\n\tfor(i=0;i=a[i]){\n\t\t\tm=1;\n\t break;\n\t\t}\n\t\telse\n\t\t m=0;\n\t\t}\n\tif(m==0){\n\t\t printf(\"no\");\n\t\tbreak;\n\t}\n\t}\n\n if(m==1)\nprintf(\"%d %d\",a[0],b[n-1]);\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37749", "code": "int main (){\n\tint a[10003]={0};\nint n,i,x,y,j,q,m,t;\nscanf (\"%d\",&n);\nt=1;\nfor (j=0;j<1;j++){\nscanf (\"%d %d\",&x,&y);\nm=y;\nq=x;\nfor (i=x;i<=y;i++){\na[i]=1;\n}\n}\nfor (j=1;j=m) {m=y;}\nif (x<=q) {q=x;}\nif (x!=y){\nfor (i=x;imax){\nmax=b[i];}}\nt=0;\nfor(i=min;isz[i][0]){\n\t\t\tmin=sz[i][0];\n\t\t}\n\t\tif(max=sz[i][0]&&jmax){max=b[i];}\n \n }\n int count;\n int legal=0;\n double k;\n for(k=(double)min;k<=(double)max;k=k+0.5){\n for(j=0,count=0;j=a[j]&&k<=b[j]){count++;}\n }\n if(count==0){printf(\"no\");break;}\n else{legal++;}\n }\n if(legal==(max-min)*2+1){printf(\"%d %d\",min,max);}\n return 0;\n \n}"} +{"label": "76", "index": "37753", "code": "int main()\n{\n\tint n;\n\tint a[100],b[100];\n\tint i,j,min,max,tmp1=0,tmp2=1;\n\tfloat k;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t}\n\tfor(i=min;i=a[j]&&k<=b[j])\n\t\t\t{\n\t\t\t\ttmp1=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(tmp1==0)\n\t\t{\n\t\t\ttmp2=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(tmp2==1)\n\t\tprintf(\"%d %d\\n\",min,max);\n\telse\n\t\tprintf(\"no\\n\");\n\treturn 0;\n}"} +{"label": "76", "index": "37754", "code": "int main(){\n int n,i,j,k,t,p;\n int a[50000][2];\n t=0;\n p=20000;\n scanf(\"%d\",&n);\n for(i=0;ia[i][j]) {p=a[i][j];}\n\t }\n }\n\n for(k=0;ka[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n }\n }\n for(i=1;i<=n-1;i++){\n if(b[i]=b[i+1]){a[i+1]=a[i];b[i+1]=b[i];}\n else{a[i+1]=a[i];}}\n }\n printf(\"%d %d\",a[n],b[n]);\n return 0;\n}\n\n\n\n\n\n"} +{"label": "76", "index": "37756", "code": "int main()\n{\n\tint n,i,a[5000],b[5000],sum[10001]={0},max=0,min,c,d;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t\tif(a[i]max)\n\t\t\t\tmax=b[i];\n\t\t}\n\t}\n\tfor(j=min;ja[i]&&j+0.0001a[d+1]){\n e=a[d+1];\n a[d+1]=a[d];\n a[d]=e;\n l=b[d+1];\n b[d+1]=b[d];\n b[d]=l;\n }\n }\n }\n for(c=0;cb[g]){\n f++;\n }\n }\n if(f==c+1){\n h++; \n }\n }\n for(c=1;cb[d+1]){\n e=b[d+1];\n b[d+1]=b[d];\n b[d]=e;\n }\n }\n }\n if(h==0){\n printf(\"%d %d\",a[0],b[n-1]);\n }\n else{\n printf(\"no\");}\n return 0;\n }\n\n\n"} +{"label": "76", "index": "37759", "code": "int main()\n{\n int n;\n scanf(\"%d\", &n);\n struct space{\n int a;\n int b;\n }s[n];\n for (int c=0; c=0; r--) {\n if (aas[g-1].b){\n for (int h=0; hs[h].b && h==g-1){\n i=0;\n break;\n }\n }\n }\n }\n if (i==0) {\n printf(\"no\");\n }else if (i==1){\n printf(\"%d %d\", s[0].a, max);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37760", "code": "int main(){\n int a,b,c,d,e;\n int x[60000],y[60000];\n scanf(\"%d\",&a);\n for(b=1;b<=a;b++){\n scanf(\"%d %d\",&(x[b]),&(y[b]));\n }\n for(e=1;ex[b+1]){\n c=x[b];\n d=y[b];\n x[b]=x[b+1];\n y[b]=y[b+1];\n x[b+1]=c;\n y[b+1]=d;\n }\n }\n }\n for(b=1;by[b+1]){\n d=y[b];\n y[b]=y[b+1];\n y[b+1]=d;\n }\n printf(\"%d %d\",x[1],y[a]);}\n else if(y[b]>y[b+1]){\n d=y[b];\n y[b]=y[b+1];\n y[b+1]=d;\n }\n}\n return 0;\n}\n \n"} +{"label": "76", "index": "37761", "code": "int main()\n{\n\tint i,j,n,c1,c2,min,max,t=0;\n\tint a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j+1])\n\t\t\t{\n\t\t\t\tc1=a[j+1];\n\t\t\t\ta[j+1]=a[j];\n\t\t\t\ta[j]=c1;\n\t\t\t\tc2=b[j+1];\n\t\t\t\tb[j+1]=b[j];\n\t\t\t\tb[j]=c2;\n\t\t\t}\n\t\t}\n\t}\n\tmin=a[0];\n\tmax=b[0];\n\tfor(i=1;i0)\n\t{\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37762", "code": "int main(){\n int n,i,k,t,p,m,q,a;\n a=0;\n scanf(\"%d\",&n);\n struct l{\n int x,y;\n }l[n],e;\n for(i=0;il[i+1].x){\n e=l[i];\n l[i]=l[i+1];\n l[i+1]=e;\n }\n }\n }\n m=0;\n for(t=0;tl[m].y){\n m=t;\n }\n }\n for(q=1;q=l[q].x){\n break;\n }\n if(p==q-1&&l[p].ymax){\n max=b[i];\n }\n }\n for(i=min*2;i<=max*2;i++){\n c[i]=1;\n }\n for(i=0;i=a[i]&&1.0*j/2<=b[i]){\n c[j]=0;\n }\n }\n }\n for(i=min*2,s=0;i<=max*2;i++){\n s+=c[i];\n }\n if(s==0){\n printf(\"%d %d\",min,max);\n }else{\n printf(\"no\");\n }\n return 0;\n}"} +{"label": "76", "index": "37764", "code": "int main(){ \n\tint n,a[50000],b[50000],i,j,m; \n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j+1]){\n\t\t\t\tm=a[j]; \n\t\t\t\ta[j]=a[j+1]; \n\t\t\t\ta[j+1]=m; \n\t\t\t\tm=b[j]; \n\t\t\t\tb[j]=b[j+1]; \n\t\t\t\tb[j+1]=m; \n} \n} \n} \n\tfor(i=0;ip[i+1].x)\n\t\t\t{\n\t\t\t\te=p[i].x;\n p[i].x=p[i+1].x;\n\t\t\t\tp[i+1].x=e;\n\t\t\t\tf=p[i].y;\n\t\t\t\tp[i].y=p[i+1].y;\n\t\t\t\tp[i+1].y=f;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;imax)\n\t\t{\n\t\t\tmax=p[i].y;\n\t\t}\n\t\tif(p[i].xp[j].y){t=t+1;}\n\t\t}\n\t\tif(t==i){k=k+1;}\n\t}\n\tif(k>=1){printf(\"no\");}\n\telse {printf(\"%d %d\",min,max);}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37766", "code": "int main(){\n int sz[50000][2],n,row,col,i,e,k;\n\tscanf(\"%d\",&n);\n\tfor(row=0;rowsz[row+1][0]){\n\t\t\t\te=sz[row][0];\n\t\t\t\tsz[row][0]=sz[row+1][0];\n\t\t\t\tsz[row+1][0]=e;\n\t\t\t\te=sz[row][1];\n\t\t\t\tsz[row][1]=sz[row+1][1];\n\t\t\t\tsz[row+1][1]=e;\n\t\t\t}\n\t\t}\n\t}\n\tk=0;\n\tfor(row=0;rowsz[row+1][1]){\n\t\t\te=sz[row][1];\n\t\t\tsz[row+1][1]=sz[row][1];\n\t\t\tsz[row][1]=e;\n\t\t}\n\t}\n\tif(k==0){\n\t\tprintf(\"%d %d\",sz[0][0],sz[n-1][1]);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37767", "code": "int main(){\n int n,i,e;\n double d;\n scanf(\"%d\\n\",&n);\n int ai[n],bi[n];\n for(i=0;i=0;i--){\n if(AI[i+1]BI[i+1]){\n e=BI[i+1];\n BI[i+1]=BI[i];\n BI[i]=e;\n }\n }\n for(d=AI[0]+0.5;dai[i]&&dBI[n-1]){\n printf(\"%d %d\",AI[0],BI[n-1]);\n }\n return 0;\n}\n "} +{"label": "76", "index": "37768", "code": "int main()\n{\n\tint n,i,j,a[50000],b[50000],e;//n>=3&&n<=50000\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0&&a[i]<=10000,b[i]>0&&b[i]<=10000\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=0;ja[j+1])\n\t\t\t{\n\t\t\t\te=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=e;\n\t\t\t\te=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=e;\n\t\t\t}\n\t\t}\n\t}\n\te=0;\n\tfor(i=0;i=a[i+1])\n\t\t{\n\t\t\ta[i+1]=a[i];\n\t\t\tif(b[i+1]x[i]){\n\t\t\ta=x[i];\n\t\t}\n\t\tif(bx[k]&&w=x) x=m[i];\n }\n for(i=y;i=c[j]&&i+0.5<=m[j])\n break;\n }if(j==n) break;}\n if(i==x) printf(\"%d %d\",y,x);\n else printf(\"no\");\nreturn 0;\n}"} +{"label": "76", "index": "37771", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct point{\n\t\tint x,y;\n\t}sz[50000];\n\tfor(int i=0;isz[i+1].x){\n\t\t\t p=sz[i].x;\n\t\t\t sz[i].x=sz[i+1].x;\n\t\t\t sz[i+1].x=p;\n\t\t }\n\t\t if(sz[i].y>sz[i+1].y){\n\t\t\t q=sz[i].y;\n\t\t\t sz[i].y=sz[i+1].y;\n\t\t\t sz[i+1].y=q;\n\t\t }\n\t }\n\t}\n\tfor(i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n }\n }\n int left,right;\n left=a[0];\n int m=0;\n for(int i=0;ib[i+1]){\n b[i+1]=b[i];\n }\n }\n }\n right=b[n-1];\n if(m==n-1){\n printf(\"%d %d\",left,right);\n }\n else{\n printf(\"no\");\n }\n return 0;\n}\n"} +{"label": "76", "index": "37773", "code": "int main()\n{\n struct \n {\n int a;\n int b;\t\n }\n a[100],x;\n int j,n,i,flag=1;\n scanf(\"%d\\n\",&n);\n for(i=0;i=a[i].a&&x.a<=a[i].b&&x.b>=a[i].b)\n \t {\n \t x.a=a[i].a;\n \t a[i].a=0;\n \t a[i].b=0;\n \t break; \t \n \t }\n \t else if(x.a>=a[i].a&&x.b<=a[i].b)\n \t {\n \t \t x.a=a[i].a;\n \t \t x.b=a[i].b;\n \t a[i].a=0;\n \t a[i].b=0;\n \t break; \t\n \t }\n \t else if(x.a<=a[i].a&&x.b>=a[i].a&&x.b<=a[i].b)\n \t {\n \t \t \n \t \t x.b=a[i].b;\n \t a[i].a=0;\n \t a[i].b=0;\n \t break; \t\n \t }\n \t else if(x.a<=a[i].a&&x.b>=a[i].b)\n \t {\n \t \t \n \t a[i].a=0;\n \t a[i].b=0;\n \t break; \t\n \t }\n \t \t \n \t \t \n \t}\n \n }\n for(i=0;i0)\n\t\t{\n\t\tsum+=array[ai];\n\t\tai++;\n\t\t}\n\ttail=ai-1;\n\tfor (i=ai;i<10000;i++)\n\t\tif (array[i]>0)\n\t\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tbi=1;\n\t\t\tbreak;\n\t\t\t}\n\tif (bi==0)\n\t\tprintf(\"%d %d\",head,tail);\n\treturn 0;\n}"} +{"label": "76", "index": "37775", "code": "int main (){\nint n,i,j,k,h,l;\nscanf(\"%d\",&n);\nint a[10001],b[10001],c[10001];\nfor(j=0;j<10001;j++){\n c[j]=0;\n }\nfor(i=0;i0){\n if(b[i]>b[i-1]){\n k=b[i];\n }}\n else{k=b[0];}\n for(j=(a[i]);jddz[k+1]){\n\t\t\t\ta=ddz[k+1];\n\t\t\t\tddz[k+1]=ddz[k];\n\t\t\t\tddz[k]=a;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;iddy[k+1]){\n\t\t\t\ta=ddy[k+1];\n\t\t\t\tddy[k+1]=ddy[k];\n\t\t\t\tddy[k]=a;\n\t\t\t}\n\t\t}\n\t}\n\ta=0;\n\tfor(i=2*ddz[0];i<=2*ddy[n-1];i++){\n\t\tif(sz[i]!=0){\n\t\t\ta++;\n\t\t}\n\t}\n\t\n\tif(a>0){\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",ddz[0],ddy[n-1]);\n\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "76", "index": "37777", "code": "int main()\n{\n int n,i,j,a[N],b[N],c[N],max=0,min;\n scanf(\"%d\\n\",&n);\n for(i=0;imax){max=b[i];}\n }\n min=max;\n for(i=0;i=max)\n\t\t{\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tfor(i=0;i=j)\n\t\t\t{\n\t\t\t\tshuzhou[j]=0;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=min*2;i<=max*2;i++)\n\t{\n\t\tif(shuzhou[i]==1)\n\t\t{\n\t\t\tp++;\n\t\t}\n\t}\n\tif(p!=0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\tif(p==0)\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37779", "code": "int main(){\n int n,k,i,j,x;\n int a,b;\n int s=0;\n int sz[50001],szz[50001];\n scanf(\"%d\",&n);\n for(i=0;isz[i+1]){\n a=sz[i];\n sz[i]=sz[i+1];\n sz[i+1]=a;\n b=szz[i];\n szz[i]=szz[i+1];\n szz[i+1]=b;\n }\n }\n }\n for(i=0;iszz[i+1]){\n x=szz[i];\n szz[i]=szz[i+1];\n szz[i+1]=x;\n }\n }\n }\n if(s==n-1){\n printf(\"%d %d\",sz[0],szz[n-1]);\n }\n else{\n printf(\"no\");\n }\n \n \n return 0;\n } \n \n"} +{"label": "76", "index": "37780", "code": "int main(){\n\tint a[10010]={0};\n\tint n,i,j,le,ri,st,en,bo=1;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d %d\",&le,&ri);\n\tfor(i=le;iri){\n\t\t\tri=en;\n\t\t}\n\t\tfor(j=st;ja[l+1][0]){\n e=a[l][0];\n\t\t\ta[l][0]=a[l+1][0];\n\t\t\ta[l+1][0]=e;\n\t\t\te=a[l][1];\n\t\t\ta[l][1]=a[l+1][1];\n\t\t\ta[l+1][1]=e;\n\t\t }\n\t }\n }\n int qj[2];\n qj[0]=a[0][0];\n qj[1]=a[0][1];\n for(k=1;kqj[1]){\n printf(\"no\");\n break;\n\t }\n\t else if(a[k][0]==qj[1]){\n qj[1]=a[k][1];\n\t }\n\t else if(a[k][0]qj[1]){\n qj[1]=a[k][1];\n\t\t }\n\t }\n\t if(k==(n-1)&&(a[k][0]<=qj[1])){\n printf(\"%d %d\",qj[0],qj[1]);\n\t }\n }\n \nreturn 0;\n}"} +{"label": "76", "index": "37782", "code": "\nmain()\n{\n\tint N,i,j,head,tail,flag,maxr;\n\tint a,b;\n\tint r[10002];\n\n\tscanf(\"%d\\n\",&N);\n\n\tfor (i=0;i<10001;i++)\n\t\tr[i]=0;\n\n\tmaxr=0;\n\tfor (i=0;itail) tail=r[i];\n\t}\n\tif (tail==maxr) flag=1;\n\tif (flag==0) \n\t{\n\t\tprintf(\"no\");\n\t}\n\tif (flag==1)\n\t{\n\t\tprintf(\"%d %d\\n\",head,tail);\n\t}\n\tgetchar();\n\tscanf(\"%d\\n\",&N);\n}\n"} +{"label": "76", "index": "37783", "code": "struct qj{\n\tint a,b;\n}q[50001];\nint main() \n{ int n,i,j,m,z;\n scanf(\"%d\",&n);\n for(i=0;i1;i--){\n\t for(j=0;jq[j+1].a){\n\t\t\t z=q[j+1].a;\n\t\t\t q[j+1].a=q[j].a;\n\t\t\t q[j].a=z;\n\t\t\t z=q[j+1].b;\n\t\t\t q[j+1].b=q[j].b;\n\t\t\t q[j].b=z;\n\t\t }\n }}\n i=0;\n m=q[0].b;\n while(im){\n\t\t\t m=q[i+1].b;\n\t\t }\n\t }\n\t i+=1;\n }\n printf(\"%d %d\",q[0].a,m);\n return 0;\n} "} +{"label": "76", "index": "37784", "code": "int main()\n{\n int n,a[50000],b[50000],min,max,i,j;\n scanf(\"%d\",&n);\n for(i=0;imax) max=b[i];\n for(i=min;i<=max;i++)\n {\n for(j=0;j=a[j]&&i<=b[j])\n break;\n\t\t \n\t\t \n\t\t }\n if(j==n) {printf(\"no\");break;}\n\t }\n if(i==max+1) \n {\n for(i=min;i=a[j]&&i+0.5<=b[j])\n break;\n\t\t \n\t\t \n\t\t }\n if(j==n) {printf(\"no\");break;}\n\t \n\t}}\n\tif(i==max) printf(\"%d %d\",min,max);\n return 0;\n}"} +{"label": "76", "index": "37785", "code": "int main(){\n int n,i,k,e,z,q,w,c;\n scanf(\"%d\",&n);\n struct qj{\n int a;\n int b;\n }qj[50000];\n for(i=0;iqj[i+1].a){\n qj[n]=qj[i+1];\n qj[i+1]=qj[i];\n qj[i]=qj[n];\n }\n }\n }\n z=0;\n for(i=1;iw){\n w=qj[i].b;\n }\n }\n if(z==0){\n printf(\"no\");\n }else{\n printf(\"%d %d\",q,w);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37786", "code": "int main(){\n int n,i,j,a,b,c=0;\n scanf(\"%d\",&n);\n int sz[100004];\n\tfor(i=0;i<100004;i++){\n\t sz[i]=0;\n\t}\n\tfor(i=0;i=y){\n\t\t\ty=q[i].b;\n\t\t}\n\t}\n\tfor(s=m,d=0;s<=y;s+=0.5,d++){\n\t\tfor(i=0;i=q[i].a&&s<=q[i].b){\n\t\t\t\tt[d]=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}for(k=0;ka[i+1])\n {\n t=a[i];\n a[i]=a[i+1];\n a[i+1]=t;\n t=b[i];\n b[i]=b[i+1];\n b[i+1]=t;\n }\n }\n }\n\n\n for(i=0,flag=1;i=b[i-1])\n {\n }\n else if(b[i]=b[i-1])\n {\n }\n else if(b[i]b[i-1])\n {\n flag=0;\n break;\n }\n }\n\n if(flag==0)\n {\n printf(\"no\\n\");\n }\n else if(flag==1)\n {\n printf(\"%d %d\\n\",a[n-1],b[n-1]);\n }\n\n return 0;\n}"} +{"label": "76", "index": "37789", "code": "int main()\n{\n int n,i,j,e,q=0,kaishi,jieshu;\n int ks[100000],js[100000],sz[100000];\n scanf(\"%d\",&n);\n for(i=0;iks[i]){\n kaishi=ks[i];\n }\n}\njieshu=js[0];\nfor(i=1;ia[j+1]){\n\t\t\t\tk=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=k;\n\t\t\t\tm=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=m;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i(m[i+1].a)){\n e=m[i+1];\n m[i+1]=m[i];\n m[i]=e;\n }\n }\n }\n \n \n \n \n \n \n s=0;\n x=m[0].b;\n for(i=0;i<(n-1);i++){\n if(xt){\n t=m[i].b;\n }\n }\n if(s>0){\n printf(\"no\");\n }else{\n printf(\"%d %d\",m[0].a,t);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37792", "code": "int main(){\n int n,i,q,z,j,min,max,k=0;\n scanf(\"%d\",&n);\n int s[10005]={0};\n for(i=0;i=q&&jQ[j].a){\n Q[500]=Q[j-1];\n Q[j-1]=Q[j];\n Q[j]=Q[500]; \n } \n } \n } \n\n for(i=0,c=Q[0].a,d=Q[0].b;id){printf(\"no\");return 0;}\n else{\n if(Q[i].b>d){d=Q[i].b;} \n } \n } \n printf(\"%d %d\",c,d); \n\nreturn 0;\n}\n\n \n"} +{"label": "76", "index": "37794", "code": "int main(){\nint n,i,j,k,a,b;\nstruct qj{\n int a,b;\n}qj[50000];\nscanf(\"%d\",&n);\nfor(i=0;iqj[i+1].a)\n\t{\n\t a=qj[i+1].a;\n\t qj[i+1].a=qj[i].a;\n\t qj[i].a=a;\n\nb=qj[i+1].b;\n\t qj[i+1].b=qj[i].b;\n\t qj[i].b=b;\n\n\t}\n \n }\n}\n\nfor(i=0;i<=n-2;)\n{\n if(qj[i].b>=qj[i+1].a)\n {\n if(qj[i].bq){\nq=b[i];\n}\n}\nfor(k=p+0.5;ka[m]&&kmax)\n\t\t\tmax=b[i];\n\t}\n\tfor(i=1;ia[j+1]) {\n\t\t\t\tint t=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=t;\n\t\t\t\t\n\t\t\t\tt=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tint mm=b[0];\n\tfor(i=1;imm) break;\n\t\tif(b[i]>mm) mm=b[i];\n\t}\n\tif(i==n) printf(\"%d %d\\n\",min,max);\n\telse printf(\"no\\n\");\n\treturn 0;\n}"} +{"label": "76", "index": "37797", "code": "int main(){\n\tint a[50000],b[50000],c[10002],d[10000];\n\tint i,n,j,k=0,l=1,x;\n\tdouble z;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i]&&z>b[i])){\n\t\t\t\t\tx=x+0;\n\t\t\t\t}else{\n\t\t\t\t\tx++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x!=0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(x==0){\n\t\t\t\tprintf(\"no\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(x!=0){\n\t\tprintf(\"%d %d\",d[2],d[3]);\n\t\t}\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37798", "code": "int main ()\n{\n int n,i,j,a[max],b[max],e,f,c=0;\n scanf(\"%d\",&n);\n for(i=0;i=a[i+1])\n {\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n }\n }\n }\n for(j=1;j<=n;j++)\n {\n for(i=0;i=b[i+1])\n {\n f=b[i+1];\n b[i+1]=b[i];\n b[i]=f;\n }\n }\n }\n for(i=0;ia[k+1]){\n\t\t\t\tp=a[k+1];\n\t\t\t\ta[k+1]=a[k];\n\t\t\t\ta[k]=p;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=a[0];i<=(a[t-1]-1);i++){\n\t\tf=i+0.5;\n\t\tb=0;\n\t\tfor(c=0;csz[c][1]){\n\t\t\t\tb++;\n\t\t\t}\n\t\t}\n\t\tif(b==n){\n\t printf(\"no\");\n\t\t\te=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\t if(e==1){\n\t\t printf(\"%d %d\",a[0],a[t-1]);\n\t}\n return 0;\n}\n"} +{"label": "76", "index": "37800", "code": "int main()\n{\nint a[10000],b[10000],c[10001];\nint i,n,m,s,p,q=1;\nfor(i=0;i<10001;i++){\n\tc[i]=1;\n}\nscanf(\"%d\",&n);\nfor(i=0;i=0;i--){\n if(c[i]==0){\n\t\tp=i+1;\n\tbreak;\n\t}\n}\nfor(i=s;i0;i--){\n\t\tfor(j=0;jqj[j+1].x){\n\t\t\t\tint a,b;\n\t\t\t\ta=qj[j+1].x;\n\t\t\t\tb=qj[j+1].y;\n\t\t\t\tqj[j+1].x=qj[j].x;\n\t\t\t\tqj[j+1].y=qj[j].y;\n\t\t\t\tqj[j].x=a;\n\t\t\t\tqj[j].y=b;}}}\n\tm=qj[0].y;\n\tfor(i=0;im){\n\t\t\tif(qj[i+1].x>m){\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;}\n\t\t\tm=qj[i+1].y;}}\n\tprintf(\"%d %d\",qj[0].x,m);\n\treturn 0;\n}\n "} +{"label": "76", "index": "37802", "code": "int main()\n{\n\tint n,a[50000],b[50000],i,j,max,min,c[10001]={0},k=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\tmax=b[i];\n\t}\n\tfor(i=0;ib[0]) b[0]=b[i];\n }\n L=b[0]-a[0]+1;\n M=0;\n for(i=0;iz[j][0])\n\t\t\t{\n\t\t\t\tq=z[i][0];\n w=z[i][1];\n\t\t\t\tz[i][0]=z[j][0];\n\t\t\t\tz[i][1]=z[j][1];\n\t\t\t\tz[j][0]=q;\n\t\t\t\tz[j][1]=w;\n\t\t\t}\n\t\t}\n\t}\n\tq=z[0][1];\n\tfor(i=1;i=y)\n\t\t{\n\t\t\ty=z[i][1];\n\t\t \n\t\t}\n\t\t\n\t}\n\tif(y==q)\n\t\n\t\tprintf(\"%d %d\",x,y);\n\telse\n\t\tprintf(\"no\");\n\treturn 0;\n\n}\n\n"} +{"label": "76", "index": "37805", "code": "int main(){\n int n,a[10000],b[10000],i,j,c[10000],min=10000,max=0,s=0;\n scanf(\"%d\",&n);\n for (i=1;i<=n;i++) scanf(\"%d %d\",&a[i],&b[i]);\n for (i=1;i<=n;i++) {\n if (a[i]max) max=b[i];\n }\n for (i=min;i<=max;i++){\n c[i]=0;\n }\n for (i=1;i<=n;i++){\n for (j=a[i];ja[i+1]){\n\t\te=a[i];\n\t\ta[i]=a[i+1];\n\t\ta[i+1]=e;\n\t\td=b[i];\n\t\tb[i]=b[i+1];\n\t\tb[i+1]=d;\n\t\t}\n\t}\n}\nh=1;\nfor(i=0;ib[i+1])&&(i!=n-1)){\n\tg=b[i];\n\tb[i]=b[i+1];\n\tb[i+1]=g;\n\t}\n}\nif(h==0){\nprintf(\"no\");\n}else{\nprintf(\"%d %d\",a[0],b[n-1]);\n}\nreturn 0;\n}\n"} +{"label": "76", "index": "37807", "code": "int main(){\n int n,A[50000],B[50000];\n int b=0,i,a=50000,c=0,j;\n double m;\n scanf(\"%d\",&n);\n for(i=0;ib){b=B[i];}\n }\n for(j=a;jA[i]&&ma[i+1])\n\t\t\t{\n\t\t\t\te=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=e;\n\t\t\t\tt=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=t;}\n\t\t}\n\t}\n\tfor(i=0;ib[i+1])\n\t\t{\n\t\t\ta[i+1]=a[i];\n\t\t\tb[i+1]=b[i];\n\t\t}\n\t}\n\tif(j==0)\n\t{\n\t\tprintf(\"%d %d\",a[n-1],b[n-1]);\n\t}\n\telse{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37809", "code": "int main(){\n int n,i,l;\n scanf(\"%d\",&n);\n int qj[50001];\n int qd[50001];\n int zd[50001];\n for(i=1;i<=n;i++){\n scanf(\"%d%d\",&qd[i],&zd[i]);\n }\n int max,min,m,e;\n max=1;\n for(l=0;l1;i--){\n if(zd[i]>=qd[i-1]){\n flag=1;\n }else{flag=0;break;}\n if(zd[i]>zd[i-1]){\n p=zd[i-1];\n zd[i-1]=zd[i];\n zd[i]=p;\n }\n }\n if(flag==1){\n printf(\"%d\",qd[n]);\n printf(\" %d\",zd[1]);\n }\n if(flag==0){\n printf(\"no\");\n }\n return 0;\n}\n\n\n\n"} +{"label": "76", "index": "37810", "code": "int main()\n{\nint i,j,min,max,n,y=1;\nint a[10000],b[10000],c[10000];\nscanf(\"%d\",&n);\nfor(i=0;i<10000;i++)\n{c[i]=0;}\nmin=10000;\nmax=0;\nfor(i=0;i(a[i]))\n\t{min=a[i];}\n\tif(max<(b[i]))\n\t{max=b[i];}\n}\nc[min]=1;\nfor(i=min;i<=max;i++)\n\t{if(c[i]==0)\n\t{printf(\"no\");\n\ty=0;\t\n\tbreak;}\n}\nif(y==1)\n{printf(\"%d %d\",min,max);}\nreturn 0;\n}"} +{"label": "76", "index": "37811", "code": "int main ()\n{int n,i,j,a,b,e,k=0;\nscanf(\"%d\",&n);\nint sz[n];\nstruct qujian{int a;int b;}q[n],h;\nfor(i=0;iq[j+1].a){\n h=q[j];\n q[j]=q[j+1];\n q[j+1]=h;}}}\ne=q[1].b;\nfor(i=0;i<=n;i++)\n{for(j=0;jl[i+1]){\np=l[i+1],q=r[i+1];\nl[i+1]=l[i],r[i+1]=r[i];\nl[i]=p,r[i]=q;\n}\n}\n}\nfor(k=0;kr[i]){\nl[i]=l[k],r[i]=r[k];\n}\n}\n}\nfor(i=0;id){\nd=r[i];\n}\n}\nprintf(\"%d %d\",e,d);}\nreturn 0;\n\n}\n\n"} +{"label": "76", "index": "37813", "code": "int main(){\nint i,n,a[50000],b[50000],m[20000],x,y,k;\nscanf(\"%d\",&n);\nfor(i=0;i<20000;i++)m[i]=0;\nfor(i=0;iy)y=b[i];\n\t if(a[i]a[i]){\n t=a[i];\n }\n }\n x=t;\n t=b[0];\n for(i=0;ia[i]&&e[m]require.b)\n {require.b=s[i].b;}\n }\n for (i=0;i<=n-2;i++)\n {\n for(j=0;j<=n-i-2;j++)\n {\n if ((s[j].a)>(s[j+1].a))\n {\n ex=s[j+1];\n s[j+1]=s[j];\n s[j]=ex;\n } \n }\n } \n max=s[0];\n for (i=0;imax.b)&&(s[i].a<=max.b))\n {\n max.b=s[i].b;\n } \n }\n if ((max.a==require.a)&&(max.b==require.b))\n { \n printf(\"%d %d\",max.a,max.b);\n }\n else\n {\n printf(\"no\");\n }\n return 0;\n}"} +{"label": "76", "index": "37816", "code": "int main()\n{\n\tint i,j,k,n,e,max,u=0;\n\tint a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i+1])\n\t\t\t{\n\t\t\t\te=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=e;\n\t\t\t\te=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=e;\n\t\t\t}\n\t\t}\n\t}\n\tmax=b[0];\n\tfor(i=0;imax)max=b[i];\n\t}\n\tfor(i=0;ia[i+1].p){\n\t\t\t\tt=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;ib[i+1].q){\n\t\t\t\tt=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;ia[j+1]){\n e=a[j+1];\n\t\t\t a[j+1]=a[j];\n\t\t\t a[j]=e;\n m=b[j+1];\n\t\t\t b[j+1]=b[j];\n\t\t\t b[j]=m;\n\t\t\t}\n\t\t}\n\t}\n\tk=0;\n\tfor(i=0;ib[i]){\n\t\t\tprintf(\"no\");\n k=1;\n\t\t\tbreak;\n\t\t}else if(b[i]>b[i+1]){\n b[i+1]=b[i];\n\t\t}\n\t}\n\tif(k==0){\n \tprintf(\"%d %d\",a[0],b[n-1]);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37820", "code": "struct zuobiao\n{\n\tint left,right;\n}zuo[50000],e;\nint main()\n{\n\tint t,i,j,releft,reright;\n\tscanf(\"%d\",&t);\n\tfor(i=0;izuo[j+1].left)\n\t\t\t{\n\t\t\t\te=zuo[j];\n\t\t\t\tzuo[j]=zuo[j+1];\n\t\t\t\tzuo[j+1]=e;\n\t\t\t}\n\t\t\treleft=zuo[0].left;\n\t\t\treright=zuo[0].right;\n\t\t\ti=1;\n\t\t\twhile(ireright)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"no\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(zuo[i].left<=reright&&zuo[i].right>=reright)\n\t\t\t\t\treright=zuo[i].right;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i==t)printf(\"%d %d\\n\",releft,reright);\n\n\t\n\treturn 0;\n}"} +{"label": "76", "index": "37821", "code": "int main()\n{\n\tstruct ab\n\t{\n\t\tint a;\n\t\tint b;\n\t};\n\tint n,i,j,e=1,max=0;\n\tstruct ab *p,t;\n\tscanf(\"%d\",&n);\n\tp=(struct ab * )malloc(sizeof(struct ab)*n);\n\tfor(i=0;imax) max=p[i].b;\n\t\tif(maxmax) max=p[n-1].b;\n\tif(e==0) printf(\"no\");\n\telse\tprintf(\"%d %d\",p[0].a,max);\n\treturn 0;\n}"} +{"label": "76", "index": "37822", "code": "\nint main(){\n int n,e;\n int s[50000][2];\n scanf(\"%d\",&n);\n for(int i=0;i<=n-1;i++){\n\t scanf(\"%d%d\",&s[i][0],&s[i][1]);\n }\n for(int k=1;k<=n;k++){\n\t for(int i=0;i<=n-k;i++){\n\t\t if(s[i+1][0]>=s[i][0]){\n\t\t\t e=s[i+1][0];\n\t\t\t s[i+1][0]=s[i][0];\n\t\t\t s[i][0]=e;\n\t\t\t e=s[i+1][1];\n\t\t\t s[i+1][1]=s[i][1];\n\t\t\t s[i][1]=e;\n\t\t }\n\t }\n }\n for(int a=n-1;a>=1;a--){\n\t if(s[a-1][0]>s[a][1]){\n\t\t printf(\"no\");\n\t\t break;\n\t }else{\n\t\t s[a-1][0]=s[a][0];\n\t\t if(s[a][1]>s[a-1][1]){\n\t\t\t s[a-1][1]=s[a][1];\n\t\t }\n\n\n\t }\n\t if(a==1){printf(\"%d %d\",s[0][0],s[0][1]);}\n }\n\n return 0;}"} +{"label": "76", "index": "37823", "code": "int main()\n{\n int n,a[5001],b[5001],i,j,m;\n m=0;\n scanf(\"%d\",&n);\n for(i=0;ia[j+1])\n {\n int e;\n e=a[j];\n a[j]=a[j+1];\n a[j+1]=e;\n e=b[j];\n b[j]=b[j+1];\n b[j+1]=e;\n }\n }\n }\n\n for(i=1;i= a[i]) //???????\">=\"????\">\"\n break;\n\t }\n\t if( j == i ) \n\t //if(j==i)?????????????????????????a[i]??a[i]??????\n\t {\n\t\t break; \n\t\t //???????m??????????????????????????break?????\n\t\t //???????????????????????????????????????\n\t }\n }\n\n if( i == n ) //if( i==n )???????????????????????????????????????\n {\n\t int max = b[0]; //?????????b[n-1]???b[n-1]?????????\n\t for( j = 1; j < n; j++ )\n\t {\n if( b[j] > max )\n\t\t\t max = b[j];\n\t }\n printf(\"%d %d\",a[0],max);\n }\n else\n {\n printf(\"no\");\n }\n return 0;\n}"} +{"label": "76", "index": "37824", "code": " int main(){\n int n;\n scanf(\"%d\",&n);\n int i;\n struct qj{\n int a,b; \n }*qjs,e;\n qjs=(struct qj*)malloc(sizeof(struct qj)*n);\n for(i=0;iqjs[i+1].a){\n e=qjs[i];\n qjs[i]=qjs[i+1];\n qjs[i+1]=e;\n }\n if(qjs[i].b>qjs[i+1].b){\n t=qjs[i].b;\n qjs[i].b=qjs[i+1].b;\n qjs[i+1].b=t;\n } \n } \n }\n\n int c=0;\n for(i=0;ie)\n\t {\n\t\t e=b[i];\n\t }\n }\n\tfor(k=s;k<=e;k+=0.5)\n\t{\n\t\tfor(i=0;i=a[i]&&b[i]>=k)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if(i==n-1)\n\t\t\t{\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\tif(k==e){printf(\"%d %d\",s,e);}\n\t}\n\t\n\t\n\treturn 0;\n\n}"} +{"label": "76", "index": "37827", "code": "\nint main(){\n int i,j,n;\n\tscanf(\"%d\",&n);\n\tint x[n];\n\tint y[n];\n\tfor(i=0;ix[i+1]){min=x[i];\n\t\t x[i]=x[i+1];\n\t\t x[i+1]=min;\n\t\t\t\t\t\tmax=y[i];\n\t\t\t\t\t\ty[i]=y[i+1];\n\t\t\t\t\t\ty[i+1]=max;\n\t\t}\n\t}}\n\tint e=x[0];\n\tint f=y[0];\n for(i=1;if){f=y[i];}\n\t}\n\tint arc=y[0];\n\tint m=0;\n\tfor(i=0;imax){\n max=num[r];\n }\n }\n for(r=min;r<=max;r++){\n for(i=0;i=a[i])&&(r+1<=b[i])){\n c=1;\n break;\n }else{\n c=0;\n }\n }\n if(c==1)\n continue;\n else\n break;\n }\n}\n \n if(c==0)\n printf(\"no\");\n else\n printf(\"%d %d\",min,max);\n return 0;\n }\n\n"} +{"label": "76", "index": "37829", "code": "int main(){\n\tint n,min,max,k;\n\tint sz[50000][2];\n\tint gh[10000];\n\tint i=0,j=0,r=0,o=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;isz[j][1])\n\t\t\tj=i;\n\tmax=sz[j][1];\n\tfor(k=min;(k+0.5)<=max;k=k++){\n\t\tgh[k]=0;\n\t\tfor(i=0;i=sz[i][0]&&(k+0.5)<=sz[i][1])\n\t\t\t\tgh[k]=1;\n\t}\n\tfor(k=min;(k+0.5)<=max;k=k++){\n\t\tif(gh[k]==0)\n\t\t\to=1;\n\t\tif(gh[k]==1)\n\t\t\tr++;\n\t}\n\tif(r==max-min)\n\t\tprintf(\"%d %d\",min,max);\n\tif(o==1)\n\t\tprintf(\"no\");\n\treturn 0;\n}\n"} +{"label": "76", "index": "37830", "code": "int main(){\n\tint n,q=0;\n\tint i,j;\n\n\tstruct qujian{\n\tint begin;\n\tint end;\n\t}qujian[50000];\n \n\tint a[100000]={0},first,last,A=0;\n\t\n\tscanf(\"%d\",&n);\n for(i=0;iqujian[i+1].begin){\n\t\t\t first=qujian[i+1].begin;\n\t\t\t\n\t\t}\n\t}\n\t\n\tlast=qujian[n-1].end;\n\tfor(i=0;ilast){\n\t\t\t last=qujian[i].end;\n\t\t\t\n\t\t\t}\n\t}\n\tfor(i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n }\n }\n}\nfor(j=1;j<=n;j++){\n for(i=0;ib[i+1]){\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n }\n}\nmax=b[n-1];\nmin=a[0];\nl=max-min;\nfor(i=min;i<=max;i++){\n m=m+c[i];\n \n}\nif(m==l){\n printf(\"%d %d\",min,max);\n \n}\nelse{\n printf(\"no\");\n}\nreturn 0;\n}\n"} +{"label": "76", "index": "37832", "code": "int main()\n{\n\tint n,i,input[50000][2],j,a,k,b;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iinput[j+1][0])\n\t\t\t{\n\t\t\t\tfor(k=0;k<2;k++)\n\t\t\t\t{\n\t\t\t\t\ta=input[j][k];\n\t\t\t\t\tinput[j][k]=input[j+1][k];\n\t\t\t\t\tinput[j+1][k]=a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ta=input[0][0];\n\tb=input[0][1];\n\tfor(i=0;i=a&&input[i+1][0]<=b)\n\t\t{\n\t\t\tif(bzuo[i])a=zuo[i];\n if(bq)break;\n}\nif(j==n){printf(\"no\");return 0;}\n}\n printf(\"%d %d\",a,b);\n return 0;\n}"} +{"label": "76", "index": "37834", "code": "int main(){\nint a[50000],b[50000],n,zuo,you,y,x=0,c=1,d=0;\ndouble z;\nscanf(\"%d\",&n);\nfor(int i=0;iyou)you=b[j];}\nz=zuo;\ny=you;\nfor(z;z<=y;z+=0.5){\nfor(int k=0;k=a[k])){x=1;}}\n c*=x;d++;x=0;\n}\nif(c==0){printf(\"no\");}\nelse{printf(\"%d %d\",zuo,you);}\n \n\nreturn 0;\n}\n"} +{"label": "76", "index": "37835", "code": "int main(){\n\tstruct qujian{\n\t\tint a,b;\n\t}qj[50001];\n\tint n,i,k,e,f,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i qj[i+1].a){\n\t\t\t\t\te=qj[i+1].a;\n\t\t\t\t\tqj[i+1].a = qj[i].a;\n\t\t\t\t\tqj[i].a = e;\n\t\t\t}\n\t\t\tif(qj[i].b>qj[i+1].b){\n\t\t\t\tf=qj[i+1].b;\n\t\t\t\tqj[i+1].b=qj[i].b;\n\t\t\t\tqj[i].b=f;\n \n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;id){\n d=b[i];\n }\n }\n for(s=(x+0.5);s=a[m]){\n k=1;\n }\n else{\n k=k;\n }\n }\n if(k==0){\n printf(\"no\");\n break;\n }\n}\n if(k!=0)\n {\n printf(\"%d %d\",x,d);\n }\n return 0;\n}\n\n \n\n\n"} +{"label": "76", "index": "37837", "code": "int main(){\n\tint a[50000],b[50000],n,m,i,t,j;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i--){\n\t\t\tfor(j=0;ja[j+1]){\n\t\t\t\tt=a[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\ta[j+1]=t;\n\t\t\t\tt=b[j];\n b[j]=b[j+1];\n\t\t\t\tb[j+1]=t;\n\t\t\t}\n\t\t}\n\t\t}\n\tfor(i=0;i=a[i+1]){\n\t\t\tif(b[i]>b[i+1])\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tif(i+2==n){\n\t\t\t\tm=1;\n\t\t\t\t}\n\t\t}\n\t\tif(b[i]a[i+1][0]){\n tmp=a[i][0];\n a[i][0]=a[i+1][0];\n a[i+1][0]=tmp;\n s=a[i][1];\n a[i][1]=a[i+1][1];\n a[i+1][1]=s;\n }\n }}\n t=1;\n tmp=a[0][1];\n for(i=1;itmp) t=0;\n else if(a[i][1]>tmp) tmp=a[i][1];\n }\n \n if(t==1){printf(\"%d %d\",a[0][0],tmp);}\n else{\n printf(\"no\");}\n\n return 0;\n}\n"} +{"label": "76", "index": "37839", "code": "int main() {\n\tint n;\n\tscanf(\"%d\", &n);\n\tint first[NUMBER];\n\tint second[NUMBER];\n\tint i=0;\n\tint j,k;\n\tint x,p;\n\tint y,q;\n\twhile(i0;j--){\n\t\tfor(k=0;kfirst[k+1]){\n\t\t\t\tint tmpfirst;\n\t\t\t\tint tmpsecond;\n\t\t\t\ttmpfirst=first[k];\n\t\t\t\ttmpsecond=second[k];\n\t\t\t\tfirst[k]=first[k+1];\n\t\t\t\tsecond[k]=second[k+1];\n\t\t\t\tfirst[k+1]=tmpfirst;\n\t\t\t\tsecond[k+1]=tmpsecond;\n\n\t\t\t}\n\t\t}\n\t}\n\ti=0;\n\twhile(i=x){\n\t\t\t\tx=second[p];\n\t\t\t\tp++;\n\t\t}\n\t\t\telse{\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\t\tif(first[i+1]<=x){\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tbreak;\n\t\t}\n\t}\n\tq=0;\n\ty=second[0];\n\twhile(q=x){\n\t\t\t\ty=second[q];\n\t\t\t\tq++;\n\t\t}\n\t\t\telse{\n\t\t\t\tq++;\n\t\t\t}\n\n\t}\n\tif(i==n){\n\t\tprintf(\"%d %d\", first[0], y);\n\t}\n\telse{\n\t\tprintf(\"no\");\n\t}\n\t\treturn 0;\n\t}"} +{"label": "76", "index": "37840", "code": "int main()\n{\n int i,j,a[50000],b[50000],x[10000],A,B,n,s=0,k=0,trigger,max;\n \n scanf(\"%d\\n\",&n);\n \n for(i=0;i<10000;i++)\n x[i]=0;\n \n for(i=0;i=a[i]&&j/2<=b[i])\n\t\t\t\t\tc[j]=1;\n\t\t\t}else{\n\t\t\t\tif((j-1)/2>=a[i]&&(j+1)/2<=b[i])\n\t\t\t\t c[j]=1;\n\t\t\t}\n\t\t}\n\t}\n\n\t\t\n\n\tfor(i=0; i<=20000; i++){\n\t\tif(c[i]==1){\n\t\t\tx=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tfor(i=20000; i>=x; i--){\n\t\tif(c[i]==1){\n\t\t\ty=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tfor(i=x; i<=y; i++){\n\t\tif(c[i]==0){\n\t\t\tprintf(\"no\\n\");\n\t\t\tbreak;\n\t\t}\n\t\telse {\n\t\t\tk++;\n\t\t\tcontinue;\n\t\t}\n\t}\n\tif(k==y-x+1)\n\t\tprintf(\"%d %d\", x/2, y/2);\n\n\treturn 0;\n}\n"} +{"label": "76", "index": "37842", "code": "\nint main()\n{ \n int i,n,j,l=0,min=50000,max=0;\n\tint sz[60000],szz[60000],szzz[60000]={0};\n\tscanf(\"%d\",&n);\n\tfor(i=0;isz[i])min=sz[i];\n\t\tif(maxszz[i])min=szz[i];\n\t\tif(maxb){\n \t\t\tb=m[i];\n \t\t}\n \t\t}\n \tfor(l=a+0.5;l=q[i])&&(l<=m[i])){\n \t\t\t\tp++;\n \t\t\t}\n \t\t}\n \t\tif(p>0)\n \t\ts++;\n \t}\n if(s==b-a){\n \t\tprintf(\"%d %d\\n\",a,b);\n \t}else{\n \tprintf(\"no\");\n \t}\n return 0;\n}\n"} +{"label": "76", "index": "37844", "code": "int main()\n{\n int n,a[50000][2],b[50000][2],i;\n scanf(\"%d\",&n);\n for(i=0;ia[i+1][1])\n {\n p=a[i+1][1];\n a[i+1][1]=a[i][1];\n a[i][1]=p; \n }\n }\n }\n max=a[n-1][1]; \n int e,f,s;\n for (f=1;f<=n;f++)\n {\n for (i=0;i<(n-f);i++)\n {\n if (a[i][0]>a[i+1][0])\n {\n e=a[i+1][0];\n a[i+1][0]=a[i][0];\n a[i][0]=e; \n }\n }\n }\n min=a[0][0];\n for (s=1;s<=n;s++)\n {\n for (i=0;ia[i+1][0])\n {\n e=a[i+1][0];\n f=a[i+1][1];\n a[i+1][0]=a[i][0];\n a[i+1][1]=a[i][1];\n \n a[i][0]=e;\n a[i][1]=f; \n }\n }\n }\n int t;\n for(i=0;i=(a[i+1][0])&&(a[i+1][1])>(a[0][1]))\n\t\t\t \t\t {\n\t \t\t\t\t a[0][1]=a[i+1][1];\n\t \t\t\t\t continue;\n\t\t\t\t\t }\n\t\t\t\t\t if ((a[0][0]==min)&&(a[0][1]==max))\n\t\t\t\t\t {\n\t\t\t\t\t \t\t\t\t printf(\"%d %d\",min,max);\t\t\t \t\t\t\t \n\t\t\t\t\t\t\t\t\t break;}\n }\n if (a[i][1]==max)\n i=1;\n else\n printf(\"no\");\n return 0;\n } "} +{"label": "76", "index": "37845", "code": "int main(){\n\tint n,i,j,max,min;\n\tint a[MAX],b[MAX];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)\n\t\t\t\tmax=b[i];\n\t\t}\n\t}\n\tfor(j=min;ja[i]&&j+0.50;i--)\n\t{\n\t\tfor(j=i-1;j>=0;j--)\n\t\t\tif(a[i]a[i])\n\tamin=a[i];\n\t}\n\tfor(i=0;i min[i+1]){\n\t\t\t\t\te = min[i+1];\n\t\t\t\t\tmin[i+1] = min[i];\n\t\t\t\t\tmin[i] = e;\n e = max[i+1];\n \t\t\t\tmax[i+1] = max[i];\n\t\t\t\t\tmax[i] = e;\n\t\t\t}\n\t }\n }\n for(int i=0;imax[i+1])&&(i!=n-1))\n {\n\t e=max[i];\n\t max[i]=max[i+1];\n\t max[i+1]=e;\n\t }\n\n if(i+1==n-1)\n printf(\"%d %d\",min[0],max[n-1]);\n }\n return 0;\n}\n\n"} +{"label": "76", "index": "37849", "code": "int main(){\n\tint n;\n\tint a[10000],b[10000];\n\tint i,k,e,t,min,max,s=1;\n\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i+1]){\n\t\t\t\te=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=e;\n\t\t\t}\n\t\t\tif(b[i]>b[i+1]){\n\t\t\t\tt=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=t;\n\t\t\t}\n\t\t}\n\t}\n\tmin=a[0];\n\tmax=b[n-1];\n\n\tfor(i=0;iqj[i+1].ai){\n\t\t\t\t\te=qj[i+1].ai;\n\t\t\t\t\th=qj[i+1].bi;\n\t\t\t\t\tqj[i+1].ai=qj[i].ai;\n\t\t\t\t\tqj[i+1].bi=qj[i].bi;\n\t\t\t\t\tqj[i].ai=e;\n\t\t\t\t\tqj[i].bi=h;\n\t\t\t}\n\t}\n\t}\n\tm=qj[0].bi;\n\tfor(i=1;i=qj[i].ai){\n\t\t\tif(m=sz[i][0]){a=sz[i][0];}\n if(b<=sz[i][1]){b=sz[i][1];}\n }\n len=b-a;\n for(j=0;j=a[i][0])||(a[0][0]>=a[i][1]&&a[0][1]<=a[i][0])){\n a[0][0]=(a[0][0]>a[i][0])?a[i][0]:a[0][0];\n a[0][1]=(a[0][1]>a[i][1])?a[0][1]:a[i][1];\n }\n }\n }\n for (i=1;ia[i][0])||(a[0][1])sz[i+1].x){\n e=sz[i+1].x;\n m=sz[i+1].y;\n sz[i+1].x=sz[i].x;\n sz[i+1].y=sz[i].y;\n sz[i].x=e;\n sz[i].y=m;\n }\n }\n }\n b=sz[0].y;\n c=sz[0].y;\n j=0;\n for(i=0;ic){\n printf(\"no\");\n j=1;\n break;\n }\n }\n if(j==0){\n printf(\"%d %d\",sz[0].x,b);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37854", "code": "int main()\n{\nint n,i,k,q,l;\nscanf(\"%d\",&n);\nstruct qujian{\nint x,y;\n}asd[50001];\nfor(i=0;iasd[l+1].x)\n{k=asd[l].x;\nasd[l].x=asd[l+1].x;\nasd[l+1].x=k;\n}\nif(asd[l].y>asd[l+1].y)\n{k=asd[l].y;\nasd[l].y=asd[l+1].y;\nasd[l+1].y=k;\n}\n}\n}\nq=1;\n\nfor(i=asd[0].x;i<=asd[n-1].y;i++)\n{for(l=0;lasd[l].y)\n{\nif((i<=asd[l+1].x)&&(i>=asd[l].y))\n{q=0;}\n}\n}\n}\nif(q==1)\n{printf(\"%d %d\",asd[0].x,asd[n-1].y);}\n\nelse if(q==0)\n{printf(\"no\");}\n\nreturn 0;\n}\n"} +{"label": "76", "index": "37855", "code": "int main()\n{\n int i,j,a,b,c[50000],n,m[50000],x,y;\n a=0;\n b=0;\n x=0;\n y=10000;\n scanf(\"%d\",&n);\n for(i=0;i=x) {\n\t\t x=m[i];\n\t }\n }\n for(i=y;i=c[j]&&i+0.5<=m[j]){\n break;\n }\n\t }if(j==n) {\n\t\t break;\n\t }\n }\n\t if(i==x) {\n\t\t printf(\"%d %d\",y,x);\n\t }\n\t else {\n\t\t printf(\"no\");\n\t }\nreturn 0;\n}"} +{"label": "76", "index": "37856", "code": "int main(){\nint n,a[50001],b[50001],c[50001],x,d;\nscanf(\"%d\",&n);\nfor(int i=0;id){d=b[i];}\n}\nfor(int i=x;ia[i].y){\n\t\t\t\td=a[i].y;\n\t\t\t\ta[i].y=a[j].y;\n\t\t\t\ta[j].y=d;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=a[0].x;it[j]){\n h++;\n\t\t\t }\n\t\t}\n\t\tif(h==n){\n\t\t\t\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}\n\tif(i==a[0].y){\n\t\tprintf(\"%d %d\",a[0].x,a[0].y);\n\t}\n\t\n\treturn 0;\n\t\n\n}"} +{"label": "76", "index": "37858", "code": "int main(){\n int n,a[50000],b[50000],i,j,t1,t2,c,d,k;\n char e='x';\n scanf(\"%d\",&n);\n d=0;\n i=0;\n while(ia[i+1]){\n t1=a[i];\n t2=b[i];\n a[i]=a[i+1];\n b[i]=b[i+1];\n a[i+1]=t1;\n b[i+1]=t2;\n }\n }\n }\n i=0;\n while(ib[i+1]){\n b[i+1]=b[i];\n }\n i=i+1;\n }\n if(e=='y'){\n printf(\"no\");\n }\n if(e=='x'){ \n printf(\"%d %d\",a[0],b[n-1]);\n }\n return 0;\n}"} +{"label": "76", "index": "37859", "code": "int main(){\n int n,start[10000],end[10000],e,f,s;\n scanf(\"%d\",&n);\n for (int i=0;imax){\n max=end[i];}}\n for(int k=1;k<=n;k++){\n for(int i=0;istart[i+1]){\n e=start[i+1]; f=end[i+1];\n start[i+1]=start[i]; end[i+1]=end[i];\n start[i]=e; end[i]=f;\n }}}\n int min=start[0];\n for(int i=1;ip[i+1].a){\n\t\t\te1=p[i+1].a;\n\t\t\tp[i+1].a=p[i].a;\n\t\t\tp[i].a=e1;\n\t\t\te2=p[i+1].b;\n\t\t\tp[i+1].b=p[i].b;\n\t\t\tp[i].b=e2;\n\t\t\t}\n\t\t}\n\t}\nfor(i=1;ip[t].b){\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\nmax=0;\nfor(i=0;imax)\nmax=p[i].b;\n}\nprintf(\"%d %d\",p[0].a,max);\nreturn 0;\n}"} +{"label": "76", "index": "37861", "code": "int main(){\n\tint n,i,k,m,y;\n\tint a[50005],b[50005],c[50005],d[50005];\n\tdouble x;\n\tint f,g=0;\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++){\n\t\tscanf(\"%d%d\",&a[i],&b[i]);\n\t\tc[i]=a[i];\n\t\td[i]=b[i];\n\t}\n\tfor(i=1;i=a[i]&&x<=b[i]){\n\t\t\t\tf++;\n\t\t\t}\n\t\t}\n\t\tif(f!=0){\n\t\t\tg++;\n\t\t}\n\t}\n\tif(g==(d[n]-c[1])*2+1){\n\t\tprintf(\"%d %d\",c[1],d[n]);\n\t}else{\n\t\tprintf(\"no\");\n\t}\t\n\treturn 0;\n}"} +{"label": "76", "index": "37862", "code": "\nstruct Interval {\n\tint a, b;\n} interval[MAXLEN], output[MAXLEN];\n\nint cmp(const void *__a, const void *__b)\n{\n struct Interval *_a = (struct Interval *) __a;\n struct Interval *_b = (struct Interval *) __b;\n if (_a -> a == _b -> a)\n return _a -> b - _b -> b;\n return _a -> a - _b -> a;\n}\n\nint main()\n{\n\tint cases, left, right, cnt, i;\n\tscanf(\"%d\", &cases);\n\tfor (i = 0; i < cases; i ++)\n\t{\n\t\tscanf(\"%d %d\", &interval[i].a, &interval[i].b);\n\t}\n\tqsort(interval, cases, sizeof(struct Interval), cmp);\n\n\tleft = interval[0].a;\n\tright = interval[0].b;\n\tcnt = 0;\n\tfor (i = 1; i < cases; i ++)\n\t{\n\t\tif (interval[i].a > right)\n\t\t{\n printf(\"no\\n\");\n return 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tright = MAX(right, interval[i].b);\n\t\t}\n\t}\n printf(\"%d %d\\n\", left, right);\n\treturn 0;\n}"} +{"label": "76", "index": "37863", "code": "int main(){\n\tstruct qj{\n\t\tint lp;\n\t\tint rp;\n\t}qj[50000];\n\tint n,i,j,maxr,minl,sig;\n\tscanf(\"%d\",&n);\n\tfor(i=0;iqj[i].lp){\n\t\t\tminl=qj[i].lp;\n\t\t}\n\t\tif(maxr=qj[j].lp){\n\t\t\t\tsign[i]=1;\n\t\t\t}}\n\t\t}\n\t}\n\tfor(i=0;ia[n-1-j][0])\n\t\t { \n\t\t\tm=a[n-1-j][0];\n\t\t\ta[n-1-j][0]=a[i][0];\n\t\t\ta[i][0]=m;\n\t\t\tM=a[n-1-j][1];\n\t\t\ta[n-1-j][1]=a[i][1];\n\t\t\ta[i][1]=M; \n\t\t } \n\t }\n\t }\n\tfor(i=1;ia[n-j-1][1])\n\t\t { \n\t\t\t m=a[n-j-1][1];\n\t\t\t a[n-j-1][1]=a[k][1];\n\t\t\t a[k][1]=m;\n\t\t\t\n\t\t } \n\t }\n\t }\n\tprintf(\"%d %d\",a[0][0],a[n-1][1]);\t\n\t} \n\t\treturn 0; \n\n} "} +{"label": "76", "index": "37865", "code": "int main(){\n int n,s=0,i,m,sz[50000],a[50000],b[50000],max,min;\n scanf(\"%d\",&n);\n for(i=0;i=max){\n max=b[i];\n }\n }\n \n min=a[0];\n for(i=0;ia[j+1]){\n\t\t\t\tm=a[j];\n\t\t\t\tl=b[j];\n\t\t\t\ta[j]=a[j+1];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\ta[j+1]=m;\n\t\t\t\tb[j+1]=l;\n\t\t\t}\n\t\t}\n\t }\n\t min=a[0],max=b[0];\n for (i=0;i=a[i]&&jmax)\n\t\t{max=b[j];}\n\t}\n for(double e=min;e<=max;e=e+0.5)\n\t{ int s=0;\n\t\tfor(int k=0;kb[k])\n\t\t\t{s++;}\n\t\t}\n if(s>=n)\n\t\t {p++;}\n\t}\n\tif(p==0)\n\t{printf(\"%d %d\",min,max);}\n\telse{printf(\"no\");}\n\treturn 0;\n}"} +{"label": "76", "index": "37869", "code": "int main(){\n struct qujian{\n\tint a;\n\tint b;\n }q[MAX_NUM];\n int s[MAX_LEN]={0};\n int n,i,j,min_a,max_b;\n scanf(\"%d\",&n);\n scanf(\"%d%d\",&q[1].a,&q[1].b);\n min_a=q[1].a;\n max_b=q[1].b;\n for(j=q[1].a;jmax_b)\n\t\t max_b=q[i].b;\n\t for(j=q[i].a;j a[i+1]){\t\ne=a[i+1];\t\na[i+1]=a[i];\t\na[i]=e;\t\n\ne=b[i+1];\t\nb[i+1]=b[i];\t\nb[i]=e;\t\n\n}\t\n}\n}\n\n\n\nfor(c=0;c=a[c+1]){\n break;\n }else{\n continue;\n}\n}\n\nif(m!=c+1){\n continue;\n}else{\n break;\n}\n}\n\n\n\nif(c==n-1){ \n \nfor(int\tk=1;k<=n;k++){\nint e;\t\nfor(int\ti=0;i b[i+1]){\t\ne=b[i+1];\t\nb[i+1]=b[i];\t\nb[i]=e;\t}}}\n\n\nprintf(\"%d %d\",a[0],b[n-1]);\n}else{\nprintf(\"no\");\n}\n\n\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37871", "code": "int main()\n{\n\tint i,j;\n\tint n,m;\n\tint min,max,tail;\n\tint a[50000],b[50000];\n\t\n\t\n\tscanf(\"%d\",&n);\n\tfor (i=0;imax)\n\t\t{\n\t\t\tmax=b[i];\n\t\t}\n\t\tif(b[i]=tail))\n\t\t\t{\n\t\t\t\ttail=b[i];\n\t\t\t}\n\t\t}\n\t}\n\tif(tail==max)\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\telse\n\t{\n\t\tprintf(\"no\");\n\t}\n\n return 0;\n}\n"} +{"label": "76", "index": "37872", "code": "int main()\n{\n\tint n,s[50000][2];\n\tint i,j,k;\n\tscanf(\"%d\",&n);\n\n\tfor(i=0;i< n;i++){\n\t\tscanf(\"%d%d\",&s[i][0],&s[i][1]);\n\t}\n\tfor(i=0;is[j][0]){\n\t\t\t\tk=s[i][0];\n\t\t\t\ts[i][0]=s[j][0];\n\t\t\t\ts[j][0]=k;\n\t\t\t\tk=s[i][1];\n\t\t\t\ts[i][1]=s[j][1];\n\t\t\t\ts[j][1]=k;\n\t\t\t}\n\t\t}\n\t}\n\tk=0;\n\tfor(i=0;i=s[i+1][0]){\n\t\t\tif(s[i][1]>s[i+1][1])\n\t\t\t\ts[i+1][1]=s[i][1];\n\t\t}\n\t\telse k=1;\n\t}\n\tif(k==1)\n\t\tprintf(\"no\\n\");\n\telse printf(\"%d %d\\n\",s[0][0],s[n-1][1]);\n\treturn 0;\n}"} +{"label": "76", "index": "37873", "code": "int main(){\n int n,i,k,z;\n z=1;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n }\n }\n }\n for(k=1;k<=n;k++){\n for(i=0;ib[i+1]){\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n }\n }\n for(i=0;ib[i]){\n z=0;\n }\n }\n if(z!=0){\n printf(\"%d %d\",a[0],b[n-1]);\n }else{\n printf(\"no\");\n }\n \n \n \n return 0;\n}\n\n\n"} +{"label": "76", "index": "37874", "code": "int main()\n{\n int n,a[50000],b[50000],m[10000],max,min,sum=0;\n int i,j,k;\n scanf(\"%d\",&n);\n for(i=1;i<=n;i++){\n scanf(\"%d%d\",&a[i],&b[i]);\n }\n for(i=1;i<=10000;i++){\n m[i]=0;}\n for(j=1;j<=n;j++){\n for(k=a[j]+1;k<=b[j];k++){\n m[k]=1;}\n }\n max=1,min=10000; \n for(i=1;i<=10000;i++){\n if(m[i]==1){\n if(imax){\n max=i;}\n }\n }\n for(j=min;j<=max;j++){\n if(m[j]==0){\n sum++;}\n }\n if(sum==0){\n printf(\"%d %d\",min-1,max);}\n else printf(\"no\");\n\n return 0;\n} \n \n"} +{"label": "76", "index": "37875", "code": "int main()\n{\n int n,i,a,b,t,l=0;\n int ai[50000],bi[50000],sz[10000];\n scanf(\"%d\",&n);\n for(i=0;iai[i])\n a=ai[i];\n if(ba[i].x){\n\t\t\tmin = a[i].x;\n\t\t}\n\t\tif (max= a[j].x&&i <= a[j].y){\n\t\t\t\tsz[i] = 1;\n\t\t\t}\t\t\t\n }\n\t}\n\tfor (i = min; i <= max; i++){\n\t\tif (sz[i] == 0){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t\telse if (i == max){\n\n\t\t\t\tprintf(\"%d %d\", min, max);\n\t\t }\n }\n\n\t\n\treturn 0;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"label": "76", "index": "37877", "code": "int main(){\n\tint n=0,i,s=0;\n\tscanf(\"%d\",&n);\n\tstruct qujian{\n\t\tint x,y;\n\t}e,qujians[50000];\n\tfor(i=0;iqujians[i+1].x){\n\t\t\t\te=qujians[i+1];\n\t\t\t\tqujians[i+1]=qujians[i];\n\t\t\t\tqujians[i]=e;\n\t\t\t}\n\t\t}\n\t}\n int p=qujians[0].x;\n\tfor(i=0;iqujians[i].y){\n\t\t\ts=1;\n\t\t\tbreak;\n\t\t}else{\n\t\t\tqujians[i+1].x=qujians[i].x;\n\t\t\tif(qujians[i].y>qujians[i+1].y){\n\t\t\t\tqujians[i+1].y=qujians[i].y;\n\t\t\t}else{\n\t\t\t\tqujians[i+1].y=qujians[i+1].y;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t\t\n\t\n\tint m=qujians[0].y;\n\tfor(i=0;im){\n\t\t\tm=qujians[i].y;\n\t\t}\n\t}\n\n\tif(s==1){\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",p,m);\n\t}\n\treturn 0;\n\n}\n"} +{"label": "76", "index": "37878", "code": "int main()\n{\n\tint n,k,min,max,sz1[50000],sz2[50000];\n\tdouble e;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;isz1[i])\n\t\t\t\tmin=sz1[i];\n\t\t}\n\t}\n\te=min+0.5;\n\tfor(int j=0;max-e>0;j++){\n\t\tfor(k=0;ksz1[k]&&emax)\n\t\tprintf(\"%d %d\",min,max);\n\treturn 0;\n}\n\t\t\t"} +{"label": "76", "index": "37879", "code": "int main(){\n int t,i,j,n,p,max;\n int a[1000],b[1000];\n scanf(\"%d\",&n);\n for (i=1;i<=n;i++){\n scanf(\"%d%d\",&(a[i]),&(b[i]));\n }\n for (i=1;i<=n;i++){\n for (j=1;j<=n-i;j++){\n if (a[j]>a[j+1]){\n t=a[j];a[j]=a[j+1];a[j+1]=t;\n t=b[j];b[j]=b[j+1];b[j+1]=t;\n }\n }\n } max=b[1]; p=1;\n for (i=2;i<=n;i++){\n if (a[i]<=max){\n if (b[i]>max){max=b[i];} \n }else {p=0;break;}\n }\n if (maxi;j--)\n\t\t{\n\t\t\tif(left[j]max)\n\t\t\t\t{\n\t\t\t\t\tmax=right[j];\n\t\t\t\t}\n\t\t\t\tsign++;\n\t\t\t}\n\t\t}\n\t\tif(sign==0)\n\t\t\tbreak;\n\t\telse if(i==n-1&&sign==n-1)\n\t\t\tsign=1;\n\t\telse\n\t\t\tsign=0;\n\t}\n\tif(i==n&&sign==1)\n\t\tprintf(\"%d %d\\n\",min,max);\n\telse\n\t\tprintf(\"no\\n\");\n\tfree(left);\n\tfree(right);\n\treturn 0;\n}"} +{"label": "76", "index": "37881", "code": "int main(){\nint n,i,j,k,max,min,z,t;\ndouble d;\nz=0;\nscanf(\"%d\",&n);\nint a[n],b[n];\nfor(i=0;i=a[j]){k++;}\n }\n if(k!=0){t=min+2*(d-min);\n sz[t]=1;}\n}\nfor(i=min;i<=2*max-min;i++){\n if(sz[i]==0){z++;}\n}\nif(z==0){printf(\"%d %d\",min,max);}\nelse printf(\"no\");\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37882", "code": "int main()\n{\n int n,i,k,t,e,p,q,s=0,a,b;\n scanf(\"%d\",&n);\n struct point\n {\n int x,y;\n }\n points[50000];\n for(i=0;ipoints[i+1].x)\n {\n t=points[i].x;\n points[i].x=points[i+1].x;\n points[i+1].x=t;\n e=points[i].y;\n points[i].y=points[i+1].y;\n points[i+1].y=e;\n }\n }\n }\n p=points[0].x;\n for(i=0;i=points[i+1].x)\n {\n if(points[i].y>points[i+1].y)\n {\n points[i+1].y=points[i].y;\n }\n }\n else\n {\n s++;\n }\n }\n \n q=points[n-1].y;\n if(s==0)\n {\n printf(\"%d %d\",p,q);\n }\n else\n {\n printf(\"no\");\n }\n \n return 0 ;\n}"} +{"label": "76", "index": "37883", "code": "int main()\n{\n int n,a,b,c,d,e,f,g;\n\tint z[50000][2];\n\tint x[1000];\n scanf(\"%d\",&n);\n\te=0;\n\tfor(a=0;a<=n-1;a++)\n\t{\n\t\tscanf(\"%d\",&z[a][0]);\n\t\tscanf(\"%d\",&z[a][1]);\n\t}\n\tfor(b=0;b<=n-2;b++)\n\t{\n\t\tfor(a=0;a<=n-2-b;a++)\n\t\t{\n if (z[a][0]>z[a+1][0])\n\t\t{\n\t\t\tc=z[a][0];\n\t\t\td=z[a][1];\n\t\t\tz[a][0]=z[a+1][0];\n\t\t\tz[a][1]=z[a+1][1];\n\t\t\tz[a+1][0]=c;\n\t\t\tz[a+1][1]=d;\n\t\t}\n\t\t}\n\t}\n for(a=1;a<=n-1;a++)\n\t{\n\t\tx[0]=0;\n\t\tfor(b=0;b<=a-1;b++)\n\t\t{\n if (z[b][1]>=z[a][0]) x[0]+=1;\n\t\t}\n\t\tif (x[0]==0) e=1;\n\t}\n\tif (e==1)\n\t{\n\t\tprintf(\"no\");\n\t\treturn 0;\n\t}\n\tf=z[0][0];\n\tg=z[0][1];\n\tfor(a=0;a<=n-1;a++)\n\t{\n if (gx){\nx=a[i];\n}\nif(b[i]>x){\nx=b[i];\n}\nif(a[i]=a[j]){\np=0;\nbreak;\n}\n}\nif(i==x){\nif(f<=b[j]&&f>=a[j]){\np=0;\nbreak;\n}\n}\nif(iy){\nif(e<=b[j]&&e>=a[j]){\np=0;\nbreak;\n}\n}\n\n}\nif((j=n-1)&&p==1){\nm=0;\nprintf(\"no\");\nbreak;\n}\n}\nif(m!=0){\nprintf(\"%d %d\",y,x);\n}\nreturn 0;\n} "} +{"label": "76", "index": "37885", "code": "int main(){\n\tint a[50000],b[50000];\n\tint n,i,r=0,k,x;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ik;i--){\n\t\t\tif(a[i]=b[i+1]){\n\t\t\tx=b[i];\n\t\t\tb[i]=b[i+1];\n\t\t\tb[i+1]=x;\n\t\t}\n\t}\n\tif(r!=0){\n\t\tprintf(\"no\");\n\t}else{\n\t\tprintf(\"%d %d\",a[0],b[n-1]);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37886", "code": "int main()\n{\n int n,a[10001],b[10001],c[10001],i,j,max,M,m,temp,k,s,h=1;\n scanf(\"%d\",&n);\n for(i=0;ih-1;i--)\n if(a[i]=max)\n {\n printf(\"no\");\n return 0;\n }\n if(i!=n-1&&b[i+1]>max)\n max=b[i+1];\n }\n printf(\"%d %d\",m,M);\n}"} +{"label": "76", "index": "37887", "code": "int main(){\nint n,i,min=0,max=0;\nfloat j;\nint a[50000],b[50000];\nscanf(\"%d\",&n);\nfor(i=0;imax)max=b[i];\n}\n \nfor(j=min+0.0;j<=max+0.0;j=j+0.5){\n for(i=0;imax)printf(\"%d %d\",min,max);\nreturn 0;\n}"} +{"label": "76", "index": "37888", "code": "int a[10000],c[50000],b[10000],d[10000],e[10000];\nint main()\n{\n\t\n\tint n,x,y,i,j,p,q,m=0;\n\t\n\tscanf(\"%d\",&n);\n\t\n\tfor(i=0;i=e[i+1])\n\t\t\t{\n\t\t\t\ty=e[i+1];\n\t\t\t\te[i+1]=e[i];\n\t\t\t\te[i]=y;\n\t\t\t}\n\t\t}\n\t}\n\tp=d[n-1];\n\tq=e[n-1];\n\t\n\tfor(i=p;ia) min=a;\n\t\t\tif(maxa[i+1]){\n\t\t\tint e=0,f=0;\n\t\t\te=a[i];\n\t\t\ta[i]=a[i+1];\n\t\t\ta[i+1]=e;\n\t\t\tf=b[i];\n\t\t\tb[i]=b[i+1];\n\t\t\tb[i+1]=f;\n\t\t}\n\t}\n\t}\n\tint c=0,d;\n\td=b[0];\n\tfor(int i=1;i=a[i]){\n\t\t\tc++;\n\t\t}\n\t\tif(d=1;m--){\n\t\tif(c[m]==1){\n\t\t\tp=m;\n\t\t\tbreak;}\n\t}\n\tfor(i=x;i<=p;i++){\n\t\tif(c[i]==0){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;}\n\t}\n\tif(i==p+1){\n printf(\"%d %d\",x,p+1);}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37892", "code": "int main(){\n\tint n,a[5001],b[5001],num[10001]={0};\n\tscanf(\"%d\",&n);\n\tfor(int x=0;xa[i1+1]){\n\t\t\t\te=a[i1+1];\n\t\t\t\ta[i1+1]=a[i1];\n\t\t\t\ta[i1]=e;\n\t\t\t}\n\t\t}\n\t}\n for(int k2=1;k2<=n;k2++){\n\t\tfor(int i2=0;i2b[i2+1]){\n\t\t\t\te=b[i2+1];\n\t\t\t\tb[i2+1]=b[i2];\n\t\t\t\tb[i2]=e;\n\t\t\t}\n\t\t}\n\t}\n\tfor(int m=0;ma[j])\n\t\t\t{\n\t\t\t\tc=a[i];\n\t\t\t\td=b[i];\n\t\t\t\ta[i]=a[j];\n\t\t\t\tb[i]=b[j];\n\t\t\t\ta[j]=c;\n\t\t\t\tb[j]=d;\n\t\t\t}\n\t\t}\n\t}\n\tsum=0;\n\tmax=b[1];\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(a[i]>max)\n\t\t{\n\t\t\tsum=sum+1;\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(b[i]>max)\n\t\t\t{\n\t\t\t\tmax=b[i];\n\t\t\t}\n\t\t}\n\t}\n\tif(sum!=0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\telse\n\t{\n\t\tprintf(\"%d %d\",a[1],max);\n\t}\n\treturn 0;\n\n}\n"} +{"label": "76", "index": "37894", "code": "int main(){\n int n,i,p,e,s;\n scanf(\"%d\\n\",&n);\n struct qj{\n int a,b;\n }qj[50000];\n for(i=0;ip;i--){\n if(qj[i].aqj[i-1].b){s=1;}\n }\n if(s==1){\n printf(\"no\");\n }else{printf(\"%d %d\",qj[0].a,qj[n-1].b);}\n return 0;\n}\n"} +{"label": "76", "index": "37895", "code": "int main(){\nint n,i,k,e,w,j,min,max;\nscanf(\"%d\\n\",&n);\nint a[n],b[n];\nfor(i=0;ia[i+1]){\ne=a[i];\na[i]=a[i+1];\na[i+1]=e;\nw=b[i];\nb[i]=b[i+1];\nb[i+1]=w;\n}\n}\n}\nmin=a[0];\nmax=b[0];\nj=1;\nfor(i=1;ia[i]){\n if(b[i]max) max=b[i];\n\t}\n\tflag=1;\n\tfor(k=min;k<=max;k=k+0.5)\n\t{\n\t\tfor(j=0;j=a[j])&&(k<=b[j])) \n\t\t\t{\n\t\t\t\tflag=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse flag=0;\n\t\t}\n\t\tif(flag==0) \n\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(flag==1)\n\t{\n\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}"} +{"label": "76", "index": "37897", "code": "int main(){\n int n,i,k,e,t,s,a[50000],b[50000];\n scanf(\"%d\",&n);\n for(i=0;ia[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n }\n }\nt=0;\ns=0;\n for(i=1;i=a[i]){\n s=s+1;\n }\n }\n if(s!=0){\n t=t+1;\n s=0;\n }\n }\n if(t!=n-1){\n printf(\"no\");\n }else{\n for(k=1;k<=n;k++){\n for(i=0;ia[j+1]) \n\t\t { \n\t\t\t int e; \n\t\t\t e=a[j]; \n\t\t\t a[j]=a[j+1]; \n\t\t\t a[j+1]=e; \n\t\t\t e=b[j]; \n\t\t\t b[j]=b[j+1]; \n\t\t\t b[j+1]=e; \n\t\t } \n\t } \n } \n \n //???c[]??????????????????????????, c[i]????i???????(??0--??i-1)?????????\n c[1] = b[0]; \n for( i = 2; i < n; i++ )\n {\n\t if( b[i-1] > c[i-1] ) \n\t\t c[i] = b[i-1];\n\t else\n\t\t c[i] = c[i-1];\n }\n\n for( i = 1; i < n; i++ )\n {\n\t if( a[i] > c[i] ) \n\t { \n\t\t m++; \n\t } \n } \n if(m==0) \n { \n\t if( b[n-1] > c[n-1] )\n\t printf(\"%d %d\",a[0],b[n-1]); \n\t else\n printf(\"%d %d\",a[0],c[n-1]);\n }\n else\n { \n\t printf(\"no\"); \n } \n return 0; \n}"} +{"label": "76", "index": "37899", "code": "int main()\n{int n,ai=0,bi=0,i,j,a[2][50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i0;i--)\n\t{\tfor(j=0;ja[1][i])\n\t\t\t{\tai=a[1][j];\n\t\t\t\tbi=a[0][j];\n\t\t\t\ta[1][j]=a[1][i];\n\t\t\t\ta[0][j]=a[0][i];\n\t\t\t\ta[1][i]=ai;\t\n\t\t\t\ta[0][i]=bi;\n\t\t\t}\t\n\t\t}\n\t}\n\tai=a[1][0];\n\tbi=a[0][0];\n\tfor(i=0;ibi)\n\t\t{\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\tif(a[0][i+1]>bi)\n\t\t\tbi=a[0][i+1];\n\t\t}\n\t\t\n\t}\n\tprintf(\"%d %d\",ai,bi);\n\treturn 0;\n}"} +{"label": "76", "index": "37900", "code": "int main(){\n\tint a[50000],b[50000],c[10002],d[10000];\n\tint i,n,j,k=0,l=1;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j+1]) {int x=a[j];a[j]=a[j+1];a[j+1]=x;x=b[j];b[j]=b[j+1];b[j+1]=x;}\n\tint sign=1;\n\tfor (i=1;ib[i-1]) {sign=0;break;}\n\t\tif (b[i-1]>b[i]) b[i]=b[i-1];\n\t}\n\tif (sign==0) printf(\"no\\n\");\n\telse printf(\"%d %d\\n\",a[0],b[n-1]);\n\treturn 0;\n}"} +{"label": "76", "index": "37902", "code": "int main(){\nint q[50000],z[50000],i,n,k,e,zm[50000],max=0;\nscanf(\"%d\",&n);\nfor(i=0;iq[i+1]){\n e=q[i];\n q[i]=q[i+1];\n q[i+1]=e;\n e=z[i];\n z[i]=z[i+1];\n z[i+1]=e;\n }\n }\n}\n\nint l=n-1;\nfor(i=1;i<=n;i++){\n for(k=0;k<=n-i;k++){\n if(z[k]>z[max]){\n max=k;\n }\n }\n zm[l]=z[max];\n l--;\n max=0;\n}\nint p=0;\nfor(i=0;ix[m]){\n j=x[i];\n x[i]=x[m];\n x[m]=j;\n }\n }\n k++;\n }\n k=0;\nwhile(k<=n){\n for(i=0;ia[i])\n\t\t{\n\t\t\ts=a[i];\n\t\t}\n\t}\n\tm=b[0];\n\tfor(i=0;ie)\n\t\t\t{\n\t\t\t\tf=1;\n\t\t\t}\n\t\t}\n if(f==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(f==1)\n\t{\n\t\tprintf(\"%d %d\",s, m);\n\t}else {\n\tprintf(\"no\");\n\t}\n return 0;\n}\n"} +{"label": "76", "index": "37905", "code": "int main()\n{\n int n,k,e,f,a[max],b[max];\n scanf(\"%d\",&n);\n int i;\n for(i=1;i<=n;i++){\n scanf(\"%d %d\\n\",&(a[i]),&(b[i]));\n }\n for(k=1;k<=n;k++){\n for(i=1;i<=n-k;i++){\n if(a[i]>a[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n }\n if(b[i]>b[i+1]){\n f=b[i];\n b[i]=b[i+1];\n b[i+1]=f;\n }\n }\n }\n int h;\n h=1;\n for(i=1;ia[x+1][0]){\n\t\t\t\t\tt=a[x][0];\n\t\t\t\t\ta[x][0]=a[x+1][0];\n\t\t\t\t\ta[x+1][0]=t;\n\t\t\t\t\t\n\t\t\t\t\tt=a[x][1];\n\t\t\t\t\ta[x][1]=a[x+1][1];\n\t\t\t\t\ta[x+1][1]=t;\n\n\t\t\t\t}\n\t\t\t}\n\t}\nint bi=0;\nint max=a[0][1];\nfor(i=1;imax){\n\t\tprintf(\"no\");\n bi=1;\n\t\tbreak;\n\t}else{\n\t\tif(a[i][1]>max)\n\t\t\tmax=a[i][1];\n\t}\n}\nif(bi==0)\n printf(\"%d %d\",a[0][0],max);\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37907", "code": "int main()\n{\n\tint n,a,b,p,q,s,e,f;\n\tint m=0;\n\tint sz[50000][2];\n scanf(\"%d\",&n);\n\tfor(b=0;bsz[b+1][0])\n\t\t{\n\t\te=sz[b+1][0];f=sz[b+1][1];\n sz[b+1][0]=sz[b][0];sz[b+1][1]=sz[b][1];\n\t\tsz[b][0]=e;sz[b][1]=f;\n\t\t}\n\t\t}\n\t}\n\n \n \n\tp=sz[0][0];\n q=sz[0][1];\n\t for(b=1;b=sz[b][0])&&(q<=sz[b][1]))\n\t\t\t{\n\n\t\t\tq=sz[b][1];\n\t\t\tm++;\n\t\t\t}\n \n else if((p<=sz[b][0])&&(q>=sz[b][1]))\n\t\t\t{\n\t\t\tp=p;\n\t\t\tq=q;\n\t\t\tm++;\n\t\t\t}\n \n else \n\t\t\t{ m=0;\n\t\t\t\tprintf(\"no\");\n\t\t\t break;\n\t\t\t}\n\n\t}\n \n\tif(m!=0) \n\t\tprintf(\"%d %d\",p,q);\nreturn 0;\n}"} +{"label": "76", "index": "37908", "code": "int main(){\n int n,i,j,A[50000][2],a,b,c=0;\n scanf(\"%d\",&n);\n for(i=0;iA[j][1]||bA[j][0]){\n a=A[j][0];\n }\n if(bA[i][1]||bb[i+1]){\n s=b[i+1];\n b[i+1]=b[i];\n b[i]=s;\n m=a[i+1];\n a[i+1]=a[i];\n a[i]=m;\n }\n }\n }\n for(i=n-2;i>=0;i--){\n if(b[i]>=a[n-1]&&a[i]b){\n\t\t\tb=q[i];\n\t\t}\n\t}\n\tint k;\n\tint c[50000];\n\tint d[50000];\n\tfor (i=10*a;i<=10*b;i++){\n\t\tc[i]=1;\n\t}\n\tfor (i=0;ia[i+1]){\n\n p=a[i];\n\n q=b[i];\n\n a[i]=a[i+1];\n\n b[i]=b[i+1];\n\n a[i+1]=p;\n\n b[i+1]=q;}\n}\n}\n\nint m,t;\n\nm=a[0];\n\nt=b[0];\n\nfor(i=1;it){\n\n t=b[i];\n\n }\n\n else if(a[i]>t){\n\n printf(\"no\\n\");\n\n return 0;\n\n }\n\n }\n\nprintf(\"%d %d\",m,t);\n\nreturn 0;\n\n}\n\n"} +{"label": "76", "index": "37912", "code": "int main(){\n int n,k,e,i,c=0;\n scanf(\"%d\",&n);\n int a[n];\n int b[n];\n for(i=0;ia[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }else if(a[i]==a[i+1]){\n if(b[i]>b[i+1]){\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n }\n }\n }\n for(i=0;i0){\n printf(\"%d %d\",a[i],b[i]);\n }else if(c==0){\n printf(\"no\");\n }\n break;\n }\n }\n return 0;\n}\n"} +{"label": "76", "index": "37913", "code": "int main()\n{\nstruct qujian{\n int x;\n int y;\n} sz[50000],e;\n int n;\n scanf(\"%d\",&n);\n int i;\nfor(i=0;isz[j+1].x)\n {\n e=sz[j+1];\n sz[j+1]=sz[j];\n sz[j]=e;\n }\n }\n }\nfor(i=0;i=sz[i+1].y)\n {\n sz[i+1].y=sz[i].y;\n sz[i+1].x=sz[i].x;\n }\n else if(sz[i].y>=sz[i+1].x&&sz[i].y<=sz[i+1].y)\n {\n sz[i+1].x=sz[i].x;\n }\n else if(sz[i].y=1;i--){\n\t\tif(s[i]!=0){\n\t\t\td=i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=c+1;i<=d-1;i++){\n\t\tif((s[i]==0)||(s[i]==2)){\n\t\t\tprintf(\"no\\n\");\n\t\t\tbreak;\n\t\t}\n\n\t}\n\tif(i==d) printf(\"%d %d\\n\",c,d);\n\treturn 0;\n}"} +{"label": "76", "index": "37915", "code": "int main(){\n int m=1,e,n,a[10000],b[10000];\n scanf(\"%d\",&n);\n for(int i=0;ia[k]){\n e=a[i];\n a[i]=a[k];\n a[k]=e;\n }\n if(b[i]>b[k]){\n e=b[i];\n b[i]=b[k];\n b[k]=e;\n }\n }\n }\n for(int i=0;ip;i--,j--)\n\t\t{\n\t\t\tif(a[i]=a[i+1]&&y[k]>=b[j+1])\n\t\t{\n\t\t\tx=a[0];\n\t\t\ty[k+1]=y[k];\n\t\t}else if(y[k]>=a[i+1]&&y[k]a[j+1][0] ) \n\t\t\t{\n\t\t\t\tc=a[j][0];\n\t\t\t\ta[j][0]=a[j+1][0];\n\t\t\t\ta[j+1][0]=c;\n\t\t\t\td=a[j][1];\n\t\t\t\ta[j][1]=a[j+1][1];\n\t\t\t\ta[j+1][1]=d;\n\t\t\t}\n\t\t}\n\t}\n min=a[0][0];\n\tmax=a[0][1];\n\tfor(i=1; i<=n-1; i++)\n\t{\n\t\tif(maxrange[i].b||Brange[i].a){\n\t\t\t A=range[i].a;\n\t\t\t}\n\t\t}\n\t }\n }\n \tfor(i=0;irange[i].b||Bsz1[i])x=sz1[i];\n if(y<=sz2[i])y=sz2[i];\n }\n for(m=x+0.1;msz1[i]) break;\n else continue;\n }\n if(i50000) { \n\t\tprintf(\"no\");\n\t\treturn 0;\n\t}\n\tint *a=(int *)malloc(n*sizeof(int)); \n\tint *b=(int *)malloc(n*sizeof(int)); \n\twhile(ib[i]) { \n\t\t\tprintf(\"input error\"); \n\t\t\treturn 0; \n\t\t}\n\t\tif((front!=back&&a[i]back) {\n\t\t\tprintf(\"no\");\n\t\t\treturn 0; \n}\n }\n\tfree(a);\n\tfree(b); \n\tprintf(\"%d %d\\n\",front,back);\n}\n"} +{"label": "76", "index": "37921", "code": "int main()\n{\n int n,i,k,d;\n scanf(\"%d\",&n);\n struct qj{\n int a;\n int b;\n }qj[n],c;\n for(i=0;id){\n d=qj[i].b;\n }\n }\n for(k=1;kqj[i+1].a){\n c=qj[i];\n qj[i]=qj[i+1];\n qj[i+1]=c;\n \n }\n }\n }\n for(i=1;i=qj[i].a&&qj[0].b*(num+i)) Min=*(num+i);}\n //printf(\"%d\",k);\n for(j=Min;j<=Max;j=j+0.5)\n {\n for(i=0,k=1;i<2*n;i=i+2)\n {\n if(j>=*(num+i)&&j<=*(num+i+1))\n {k=0;break;}\n }\n //printf(\"j=%lf k=%d\\n\",j,k);\n if(k) {printf(\"no\\n\");return 0;}\n\n }\n\n printf(\"%d %d\",Min,Max);\n return 0;\n}\n"} +{"label": "76", "index": "37923", "code": "\n\nint a[50000],b[50000];\nint main()\n{\n\tint n,i,k=1,a0,b0,result=1;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=b0)\n\t\t\t{\n\t\t\t\tif(!(a[i]==a0&&b[i]==b0))\n\t\t\t\t{\n\t\t\t\t\ta0=a[i];\n\t\t\t\t\tb0=b[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a[i]=a0&&b[i]<=b0)\n\t\t\t{\n\t\t\t\ta0=a[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(a[i]>=a0&&a[i]<=b0&&b[i]>b0)\n\t\t\t{\n\t\t\t\tb0=b[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;ib0) result=0;\n\tif(result==1) printf(\"%d %d\",a0,b0);\n\telse printf(\"no\");\n\treturn 0;\n}"} +{"label": "76", "index": "37924", "code": "int main()\n{\n\tint i,n,t=0;\n\tdouble m;\n\tint a[50000],b[50000],mina=10001,maxb=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ib[i])?maxb:b[i];}\n\tfor(m=mina;m<=maxb;m=m+0.5)\n\t{\t\n\t\tfor(i=0;i=a[i])&&(m<=b[i]))\n\t\t\t{t++;break;}\n\t\t}\n\t}\n\tif(t==(2*(maxb-mina+1)-1))\n\t{\n\t\tprintf(\"%d %d\",mina,maxb);\n\t}\n\telse printf(\"no\");\n\treturn 0;\n}"} +{"label": "76", "index": "37925", "code": "int main(){\n \n int n,i,j,e,a[50000],b[50000];\n scanf(\"%d\",&n);\n for(i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n else if(a[i]==a[i+1]){\n if(b[i]>b[i+1]){\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n }\n }\n }\n \n \n int tmp = b[0];\n for(i = 1; i < n; i++)\n {\n if(a[i] > tmp) \n {printf(\"no\\n\");return 0;}\n if(tmp < b[i])\n tmp = b[i]; \n }\n \n \n /*j=0;\n for(i=0;ia[k]){\n\t\t\t\tm=a[i];\n\t\t\t\ta[i]=a[k];\n\t\t\t\ta[k]=m;\n\t\t\t\tm=b[i];\n\t\t\t\tb[i]=b[k];\n\t\t\t\tb[k]=m;\n\t\t\t}\n\t\t}\n }\nfor(i=0;ib[i+1]){\n\t\t\tm=b[i];\n\t\t\t\tb[i]=b[i+1];\n\t\t\t\tb[i+1]=m;\n\t\t}\n\t}\n}\nif(i==n-1){\n\tprintf(\"%d %d\",a[0],b[n-1]);\n}\nreturn 0;\n}\n"} +{"label": "76", "index": "37927", "code": "int main()\n{\n int i,j,n,t,s,d,test;\n double g;\n int a[50001],b[50001];\n scanf(\"%d\",&n);\n for(i=0;ij)\n\t\t j=b[i];\n }\n test=0;\n for(g=(double)t;g<=(double)j;g=g+0.5)\n {\n\t d=0;\n for(s=0;s=g&&a[s]<=g)\n\t\t\t d=1;\n\t }\n\t if(d==0)\n\t { test++;\n\t break;}\n \n }\n if(test>0){\n\t\t printf(\"no\\n\");\n\t }else{\n\t printf(\"%d %d\\n\",t,j);\n\t }\nreturn 0;\n}"} +{"label": "76", "index": "37928", "code": "\n\nint main(){\n int n,i,j,e,result=0,max,min,k,num=1;\n\tint a[3][50001];\n\tscanf(\"%d\",&n);\n\tfor(i=0;imax)max=a[j][i];\n\t\t\tif(a[j][i]0;j--){\n\t\tfor(i=0;i=a[0][i+1]){\n\t\t\t\tfor(k=0;k<2;k++){\n\t\t\t\t\te=a[k][i+1];\n\t\t\t\t a[k][i+1]=a[k][i];\n\t\t\t\t a[k][i]=e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(i=1;i=a[0][i]){\n\t\t\t\tnum++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(num==n)result=1;\n\tif(result==0)printf(\"no\");\n\tif(result==1)printf(\"%d %d\",min,max);\n\n\treturn 0;\n}"} +{"label": "76", "index": "37929", "code": "int main(){\n int n,i,k,s=0,sz[M],a[M],b[M],max,min;\n scanf(\"%d\",&n);\n for(i=0;i=max){\n max=b[k];\n }\n }\n }\n \n min=a[0];\n for(i=0;ia[i+1]){\n s=a[i];\na[i]=a[i+1];\na[i+1]=s;\ns=b[i];\nb[i]=b[i+1];\nb[i+1]=s;\n}\n}\n}\nfor(i=0;ib[i]){\n v+=1;\n }\n}\nif(v==0){\nprintf(\"%d %d\",a[0],b[n-1]);\n}\nif(v>0){\nprintf(\"no\");\n}\nreturn 0;\n}\n"} +{"label": "76", "index": "37931", "code": "int main()\n{\n\tint n,i,j;\n\tint max=0,min=100000;\n\tint a[100000],b[100000];\n\tint flag=0;\n\tint c[200000]={0};\n\tscanf (\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\tscanf (\"%d\",&a[i]);\n\t scanf (\"%d\",&b[i]);\n {\n\t\tfor(j=2*a[i];j<=2*b[i]-1;j=j+1)\t\n\t\t{\n\t\t\tif(c[j]==0) {c[j]=1;}\t\n\t\t}\n\t\tif(a[i]max) max=b[i];\n\t\t}\n\t}\n\t\n\tfor(j=2*min;j<=2*max-1;j=j+1)\n\t{\n\t\tif(c[j]==0)\n\t\t\t{flag=1;}\n\t\t\t}\n\tif(flag==0)\n\t\t{printf(\"%d %d\",min,max);}\n\telse\n\t{printf(\"no\");\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37932", "code": "int main()\n{\n int n,a[50000],b[50000],c[50000],d[50000];\n int max,min,i,j;\n double k;\n int e;\n scanf(\"%d\",&n);\n for(i=0;ib[i+1])\n {\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n }\n max=b[n-1];\n \n for(k=min+0.1;k<=max;k++)\n {\n for(j=0;j=c[j]&&k<=d[j])\n {\n break;\n }\n else\n {\n if(j==n-1){\n printf(\"no\");\n return 0;\n }\n else{\n continue;\n }\n }\n }\n \n }\n printf(\"%d %d\",min,max);\n return 0;\n}\n"} +{"label": "76", "index": "37933", "code": "int main()\n{\n int a[60000],b[60000],n,i,m,p,q,s; \n float k;\n scanf(\"%d\\n\",&n);\n for(i=0;iq)\n {\n q=b[i];\n }\n }\n for(k=p+0.5;k<=q;k++)\n {\n s=0;\n for(m=0;m=a[m])\n {\n s=1;\n }\n else\n {\n s=s;\n }\n }\n if(s==0)\n {\n printf(\"no\");\n break;\n }\n }\n if(s!=0)\n {\n printf(\"%d %d\",p,q);\n }\n return 0;\n}\n"} +{"label": "76", "index": "37934", "code": "int main(){\n\tint n,i,k,z,y;\n\tint x[50001],d[50001],j[50001];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=n-1;i++){\n\t\tscanf(\"%d%d\",&x[i],&d[i]);\n\t}\n\ty=0;\n\tz=0;\n\tfor(i=0;i<=n-1;i++){\n\t\tif(x[i]d[z]){\n\t\t\tz=i;\n\t\t}\n\t}\n\tfor(i=0;i<=n-1;i++){\n\t\tfor(k=x[i]+1;k<=d[i];k++){\n\t\t\tj[k]=1;\n\t\t}\n\t}\n\tfor(k=1,i=x[y]+1;i<=d[z];i++){\n\t\tif(j[i]==1){\n\t\t\tk++;\n\t\t}else{\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(k==d[z]-x[y]+1){\n\t\tprintf(\"%d %d\",x[y],d[z]);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37935", "code": "int main(){\n\tint n,i,k,m,c,h;\n\tdouble e;\n\tint p[50001],q[50001],s[5001],t[50001];\n scanf(\"%d\",&n);\n\tfor(i=0;ip[i+1]){\n m=p[i];\n\t\t\t p[i]=p[i+1];\n\t\t\t p[i+1]=m;\n\t\t\t}\n\t\t\tif(q[i]=1.0*s[k]&&e<=1.0*t[k])\n\t\t\t\tbreak;\n else\n h++;\n\t\t}\n\t\tif(h==n){\n\t\t\tprintf(\"no\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"%d %d\",p[0],q[0]);\n\n\treturn 0;\n}"} +{"label": "76", "index": "37936", "code": "int main(){\n int a[10000],b[10000],c[10000]={0};\n\tint min=10000,max=0,i,j,n;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[i]){\n\t\t min=a[i];\n\t\t}\n\t\tif(maxi;j--){\nif(a[j]=b[i+1]){\nt=b[i];\nb[i]=b[i+1];\nb[i+1]=t;\n}\n}\nif(y!=0){\nprintf(\"no\");\n}else{\nprintf(\"%d %d\",a[0],b[n-1]);\n}\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37938", "code": "int main(){\n int n;\nint a[5000][2];\nint i,j;\nint r;\nint t0,t1;\nscanf(\"%d\",&n);\nfor(i=0;ia[j][0])\n{\nt0=a[i][0];\nt1=a[i][1];\na[i][0]=a[j][0];\na[i][1]=a[j][1];\na[j][0]=t0;\na[j][1]=t1;\n}\n}\n}\nr=a[0][1];\nfor(i=0;ir){r=a[i][1];\n}\nif(r=a[i+1][0])\n{printf(\"%d %d\",a[0][0],r);\n}\nreturn 0;\n}"} +{"label": "76", "index": "37939", "code": "int main(){\n int n;\n scanf(\"%d\", &n);\n int a[50000], b[50000];\n int i;\n for (i=0;ia[i+1]){\n e=a[i+1];\n a[i+1]=a[i];\n a[i]=e;\n e=b[i+1];\n b[i+1]=b[i];\n b[i]=e;\n }\n }\n }\n int left, right;\n left=a[0];\n int m;\n m=0;\n for (i=0;ib[i+1]){\n b[i+1]=b[i];\n }\n }\n }\n right=b[n-1];\n if (m==n-1){\n printf(\"%d %d\", left,right);\n }else {\n printf(\"no\");\n \n }\n return 0;\n}"} +{"label": "76", "index": "37940", "code": "int main(){\nint n,i,j,min,max,have_a_gap=0; //have_a_gap?1?,?????.\n\nscanf(\"%d\",&n); //???????\n\nstruct Space{\nint left,right;\n} spaces[n],temp; //????,???????????\n\nfor(i=0;ispaces[j+1].left)\n {\n temp=spaces[j];\n spaces[j]=spaces[j+1];\n spaces[j+1]=temp;\n }\n }\n}\n\nmin=spaces[0].left;\nmax=spaces[0].right;\n\n\nfor(i=0;imax) max=spaces[i+1].right;\n }\n}\n\nif(have_a_gap==0) printf(\"%d %d\",min,max);\n\nreturn 0;\n}"} +{"label": "76", "index": "37941", "code": "int main()\n{\n \tint sz[50000][2];\n \tint n,row,col,max,min,a;\n \tdouble i;\n scanf(\"%d\",&n);\n for(row=0;rowmax){\n\t\t\t\tmax=sz[row][1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tfor(i=min;i<=max;i=i+0.5){\n\t\tfor(row=0;row=sz[row][0]&&i<=sz[row][1]){\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\telse if(row==n-1){\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\tif(i==max) printf(\"%d %d\",min,max);\n\t\t}\n\t\n scanf(\"%d\",&i);\n return 0;\n}\n\n"} +{"label": "76", "index": "37942", "code": "int main(){\n int sz[100000],n,i,a,b,k,s,m;\n scanf(\"%d\",&n);\n for(i=0;isz[k+1]){\n m=sz[k],sz[k]=sz[k+1],sz[k+1]=m;\n }\n }\n }\n a=sz[0],b=sz[2*n-1];\n for(k=0;k=a){\n a=sz2[i+1];\n }\n i=i+2;\n }\n }\n if(a==b){\n printf(\"%d %d\",sz[0],sz[2*n-1]);\n }else{\n printf(\"no\");\n }\n return 0;\n}"} +{"label": "76", "index": "37943", "code": "int main(){\n int n,i,k,t,e=0;\n scanf(\"%d\",&n);\n int a[n],b[n];\n for(i=0;ia[i+1]){\n t=a[i+1];\n a[i+1]=a[i];\n a[i]=t;\n }\n if(b[i]>b[i+1]){\n t=b[i+1];\n b[i+1]=b[i];\n b[i]=t; \n } \n }\n }\n for(i=0;i=a[i+1]){\n e++; \n }\n }\n if(emax){\n\t\t\tmax=b[n];\n\t\t}\n\t}\n\tfor(i=min;is)\n\t\t\ts=b[i];\n\t}\n\tfor(j=t+1;j<=s-1;j=j+2)\n\t{\n\t\tm=0;\n\t\tfor(i=0;ij))\n\t\t\t{\n\t\t\t\tm=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m==0)\n\t\t{\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(m==1)\n\t\tprintf(\"%d %d\",t/2,s/2);\n\treturn 0;\n}\n\n"} +{"label": "76", "index": "37946", "code": "int main(){\n int max,min,n,i,j,x=0;\n scanf(\"%d\",&n);\n\tint sx[50001],sy[50001],sz[50001]={0};\n\tfor(i=0;isx[i]){\n\t\t\tmin=sx[i];\n\t\t}\n\t}\n\tfor(i=1;ij;i--)\n\t\t{\n\t\t\tif(a[i]=a[j])\n\t\t\t{\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\tif(!flag) break;\n\t}\n\tif(!flag)\n\t{\n\t\tprintf(\"no\\n\");\n\t}\n\telse\n\t{\n\t\tfor(i=0;imax)\n\t\t\t{\n\t\t\t\tmax=b[i];\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d %d\\n\",min,max);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37948", "code": "int main(){\n int n,g,p,w,u,v;\n double e;\n int a[10000],b[10000];\n scanf(\"%d\",&n);\n for(int i=0;ib[p]){v=v;}else{v=b[p];}\n }\n w=0;\n for(e=1.0*u;e<=1.0*v;e+=0.1){\n for(int j=0;j=a[j]&&e<=b[j]){w=1;break;}else{w=0;}\n }\n if(w==0)\n {\n printf(\"no\");\n return 0;\n }}\n printf(\"%d %d\",u,v);\n return 0;\n}\n\n\n\n"} +{"label": "76", "index": "37949", "code": "int main ()\n{int i,n,a,b,j,max=0,min=30000;\nscanf(\"%d\",&n);\nint l[10001];\nfor (i=1;i<=10000;i++)\nl[i]=0;\nfor (i=0;ia) min=a;\nfor (j=a+1;jmax)\n \t{\n \t\tmax=a[i];\n \t}\n \tif(a[i]max)\n \t{\n \t\tmax=b[i];\n \t}\n \tif(b[i]max)max=b[i];\nfor(j=min;j<=max;j=j+0.5)\n{\n flag=0;\n for(i=1;i<=n;i++)\n {\n if(j>=a[i]&&j<=b[i])\n {flag=1;\n break;}\n }\n if(flag!=1)break;\n}\nif(flag==1){printf(\"%d %d\",min,max);}\nelse{printf(\"no\");}\n}\n"} +{"label": "76", "index": "37952", "code": "int main(){\nint n,i,a,b,j,p,q,e;\nint sz[10000];\nscanf(\"%d\",&n);\nfor(i=0;i<10000;i++)\n{\nsz[i]=0;\n}\nfor(i=0;i=a&&j+1<=b-1)\n{\nsz[j]=1;\n}\n}\n}\nfor(i=0;i<10000;i++)\n{\nif(sz[i]==1)\n{\nfor(j=i;j<10000;j++)\n{\nif(sz[j]==0)\n{\nbreak;\n}\n}\nbreak;\n}\n}\nq=i+1;\ne=j+1;\nfor(p=j;p<10000;p++)\n{\nif(p==9999&&sz[p]==0)\n{\nprintf(\"%d %d\",q,e);\nbreak;\n}\nelse if(sz[p]==1)\n{\nprintf(\"no\");\nbreak;\n}\n}\nreturn 0;\n}"} +{"label": "76", "index": "37953", "code": "int main(){\n int n, i, k, c=0, m=50001, x=0, sz[50001], a[50001], b[50001];\n\tscanf(\"%d\", &n);\n\tfor(i=0; ix){\n\t\t\tx=b[i];\n\t\t\t}\t\n\t\t}\n\tfor(i=m; i<=x; i++){\n\t\tsz[i]=1;\n\t}\n\tfor(i=0; imax)\n\t\t\tmax=b[i];\n\t}\n\tfor(t=min+0.5;t<=max-0.5;t++){\n\t\tflag=0;\n\t\tfor(i=0;i=a[i] && t<=b[i])\n\t\t\t\tflag++;\n\t\tif(flag==0){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(flag!=0)\n\t\tprintf(\"%d %d\",min,max);\n}\n\n\n\n\n\n\n\n\n\n"} +{"label": "76", "index": "37955", "code": "int main(){\n int n,a[10000],b[10000],c[10000];\nint i,j,min,max;\nint e,d=1;\nscanf(\"%d\",&n);\nfor(i=0;i=a[i]){\n c[j]=1;\n j++;\n }\n \n }\n min=a[0];\n max=b[0];\n for(i=1;ia[i]){\n min=a[i];\n }\n if(maxmax)\n\t\t\tmax=zd[i];\n\t}\n for(g=(1.0*min+0.5);g<=(1.0*max);g+=1.0){\n\t\tfor(j=0;j=1.0*qs[j]&&g<=1.0*zd[j]){\n\t\t\t\tc++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(c==max-min){\n\t\tprintf(\"%d %d\\n\",min,max);\n\t}else{\n\t\tprintf(\"no\\n\");\n\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "76", "index": "37957", "code": "int main()\n{ int n,a[50000],b[50000],min,max,i,j,s,t;\n scanf(\"%d\",&n);\n for(i=0;it){t=b[i];}\n }\n min=a[0];max=b[0];\n for(j=0;j=max){max=b[i];min=a[i];}\n else if(b[i]>=min&&b[i]min&&a[i]<=max){if(b[i]>max){max=b[i];}}}\n} if(min==s&&max==t){printf(\"%d %d\",s,t);}else {printf(\"no\");}\nreturn 0;\n}"} +{"label": "76", "index": "37958", "code": "int main()\n{\n\tint i,n,a,b,l=0,r=0;\n\tchar qujian[N];\n\tmemset(qujian,0,sizeof(qujian));\n\tscanf(\"%d\",&n);\n\twhile(n--)\n\t{\n\t\tscanf(\"%d %d\",&a,&b);\n\t\tfor(i=a;i0;i--)\n\t{\n\t\tif(qujian[i-1])\n\t\t{\n\t\t r=i;\n\t\tbreak;}\n\t}\n\tfor(i=l;ia[i+1]){\n\t\t\t\te=a[i+1];\n\t\t\t\ta[i+1]=a[i];\n\t\t\t\ta[i]=e;\n\t\t\t\te=b[i+1];\n\t\t\t\tb[i+1]=b[i];\n\t\t\t\tb[i]=e;\n\t\t\t}\n\t\t}\n\t}\n\tint hb1=a[0];\n\tint hb2=b[0];\n\tfor(i=0;ihb2){\n\t\t\t\thb2=b[i];\n\t\t\t}\n\t\t}\n\t\tif(a[i+1]>hb2){\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i!=n){\n\t\tprintf(\"no\");\n\t}\n\tif(i==n){\n\t\tfor(k=0;khb2){\n\t\t\t\thb2=b[i];\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d %d\",hb1,hb2);\n\t}\n\treturn 0;\n}\n\t\t"} +{"label": "76", "index": "37960", "code": "\nint main(){\n\tint n,i,j,axis[10000]={0},ms=0,me=0,a=0;\n\tstruct range{\n\t\tint s,e;\n\t}r[50000];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ir[me].e){\n\t\t\tme=i;\n\t\t}\n\t}\n\tfor(i=r[ms].s;i<=r[me].e;i++){\n\t\ta+=axis[i];\n\t}\n\tif(a==r[me].e-r[ms].s){\n\t\tprintf(\"%d %d\",r[ms].s,r[me].e);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37961", "code": "int main(){\n int min,max,i,m,e,r,k,n,y,a[10000],b[10000];\n min=10000;\n max=0;\n y=0;\n m=0;\n scanf(\"%d\",&n);\n for(i=0;imax){\n max=b[i];\n }\n }\n for(k=1;k<=n;k++){\n for(i=0;ia[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n r=b[i];\n b[i]=b[i+1];\n b[i+1]=r;\n }\n \n }\n \n }\n for(i=0;im){m=b[i];}\n if(a[i+1]>m){\n printf(\"no\");\n y=1;\n break;\n }\n }\n if(y==0){\n printf(\"%d %d\",min,max);\n }\n \n \n \n \n \n \n\n return 0;\n\n\n\n\n}\n"} +{"label": "76", "index": "37962", "code": "\nint main(){\n\tint n;\n\tint a,b;\n\tint r[10001];\n\tint i; \n\tfor(i=0;i<=10000;i++){ \n\t\tr[i]=0;\n\t}\t\n\tint head,tail,max=0;\n\tchar d='y';\n\tscanf(\"%d\",&n);\n\tfor(i=0;ir[a])\n\t\t{\n\t\t\tr[a]=b;\n\t\t}\n\t}\n\tfor(i=0;i<=10000;i++){\n\t\tif(r[i]!=0){ \n\t\t\thead=i;\n\t\t\ttail=r[i]; \n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;i<=10000;i++){\n\t\tif(r[i]>max){max=r[i];} \n\t}\n\n\tfor(i=head;i<=max;i++){\n\t\tif(r[i]!=0)\n\t\t{\t\t\t\n\t\t\tif(i>tail)\n\t\t\t{\n\t\t\t\td='n'; \n\t\t\t\tbreak;\n\t\t\t}\n\t\t if(tailtmp) t=0;\n else if(a[i][2]>tmp) tmp=a[i][2];\n }\n \n if(t==1) printf(\"%d %d\",a[1][1],tmp);\n else printf(\"no\");\n\n return 0;\n}\n"} +{"label": "76", "index": "37964", "code": "int main(){\nint n,szz[11111],szy[11111];\n\nint x,e;\nscanf(\"%d\",&n);\n\nfor(int j=0;jszz[h+1]){\n\t\t \n\t\t\te=szz[h+1];\n\n\t\t\tszz[h+1]=szz[h];\n\n\t\t\tszz[h]=e;\n\t\t\te=szy[h+1];\n\n\t\t\tszy[h+1]=szy[h];\n\n\t\t\tszy[h]=e;\t\t \n\t\t\n\t\t}\n\n\t\n\t}\n \n\n\n}\n\nfor(int i=0;iszy[i]){\n\t\n\t printf(\"no\");\n\t \n\t return 0;\n\t}\n \n\tif((szz[i+1]<=szy[i])){\n\t\n\t \n\n\t\tif(szy[i]>szy[i+1]){\n\t\t\n\t\t szy[i+1]=szy[i];\n\n\n\t\t\n\t\t\n\t\t}\n\n\t \n\n\n\t\n\t}\n\n}\nprintf(\"%d %d\",szz[0],szy[n-1]);\nreturn 0;\n}\n"} +{"label": "76", "index": "37965", "code": "main() \n{ \nint s[10000], e[10000], i,c=0,n,m[10000],min,max;\nfor(int d=0;d<10000;d++){\n\tm[d]=0;\n}\nscanf(\"%d\", &n);\nfor(int q=0;qmax){\n max=e[b];\n\t\t}\n}\n for(i=min; i bi[max])\n\t\t\tmax = i;\n\t}\n\treturn max;\n}\nint hasEqual(int a, int ai[], int ais[]) {\n\tint i;\n\tfor (i = 0; i < MAX; i++) {\n\t\tif (ai[i] <= a && ais[i] == 1) {\n\t\t\tais[i] = 0;\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\nint main() {\n\tint ai[MAX], bi[MAX];\n\tint aischeck[MAX];\n\tint n = 0, i, temp;\n\tfor (i = 0; i < MAX; i++)//???\n\t{\n\t\tai[i] = -1;\n\t\tbi[i] = -1;\n\t\taischeck[i] = 1;\n\t}\n\tint mi, ma, min, max;\n\tscanf(\"%d\", &n);\n\twhile (n > MAX) {\n\t\tscanf(\"%d\", &n);\n\t}\n\tfor (i = 0; i < n; i++) {\n\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t\twhile (ai[i] > bi[i])//????????????????\n\t\t{\n\t\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t\t}\n\t}\n\tmi = min = getMin(ai, aischeck);\n\tma = max = getMax(bi);\n\ttemp = hasEqual(bi[min], ai, aischeck);\n\twhile (temp != -1)//????\n\t{\n\t\ttemp = hasEqual(bi[temp], ai, aischeck);\n\t\tif (bi[temp] == bi[ma]) {\n\t\t\tprintf(\"\\n%d %d\", ai[mi], bi[ma]);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"no\\n\");\n}\n\n\n/*\nint main(){\n int n,min,max;\n int add=0;\n int a[100000];\n int b[100000];\n int sz[100000];\n scanf(\"%d\",&n);\n for(int i=0;imax)\n max=b[i];\n \n }\n for(int i=min;i<=max;i++){\n sz[i]=1;\n }\n for(int i=0;i0)printf(\"no\");\n else printf(\"%d %d\",min,max);\n}\n\n\n\n\n*/\n\n"} +{"label": "76", "index": "37968", "code": "int main(){\n int a[50000], b[50000], n, s[50000];\n int m=0;\n scanf(\"%d\\n\", &n);\n for(int i=0;ia[t]){c=a[t];}\n }\n for(int i=0;id){d=b[i];}\n }\n for(int i=c;i=a[t] && iv[m+1])\n {e=v[m];\n v[m]=v[m+1];\n v[m+1]=e;\n f=w[m];\n w[m]=w[m+1];\n w[m+1]=f;\n }\n }\n }\n \n\nfor(int g=0;gy)\n {\n y=b[i];\n }\n }\n for(l=x+0.5;l=a[i]&&l<=b[i]){p++;}\n }\n if(p>0){s++;}\n }\n if(s==y-x)\n {\n printf(\"%d %d\\n\",x,y);\n }\n else {printf(\"no\");}\n return 0;\n}\n"} +{"label": "76", "index": "37971", "code": "int main(){\n\tint n,shuzhou[10001]={0},sz[50000],szz[50000],max=0,min=0;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;iszz[max]){\n\t\t\tmax=b;\n\t\t}\n\t}\n\tfor(int c=sz[min];c<=sz[max];c++){\n\t\tif(shuzhou[c]!=1){\n\t\t\tprintf(\"no\\n\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"%d %d\\n\",sz[min],szz[max]);\nreturn 0;\n}"} +{"label": "76", "index": "37972", "code": "/*\n * ct.c\n *\n * Created on: 2011-11-24\n * Author: lin\n */\n\nstruct block\n{\n\tint l;\n\tint r;\n};\n\nint mysort(void *a, void *b)\n{\n\tstruct block *aa = (struct block*)a;\n\tstruct block *bb = (struct block*)b;\n\tif(aa->l == bb->l)\n\t{\n\t\treturn bb->r - aa->r;\n\t}else{\n\t\treturn aa->l - bb->l;\n\t}\n}\n\nint main()\n{\n\tstruct block in[50000];\n\tint n;\n\tint i;\n\tint left, right;\n\tscanf(\"%d\", &n);\n\tfor(i = 0; i < n; ++i)\n\t{\n\t\tscanf(\"%d %d\", &in[i].l, &in[i].r);\n\t}\n\tqsort(in,n,sizeof(in[0]),mysort);\n\n\tleft = in[0].l;\n\tright = in[0].r;\n\tfor(i = 1; i < n; ++i)\n\t{\n\t\tif(in[i].r > right)\n\t\t{\n\t\t\tif(in[i].l <= right)\n\t\t\t{\n\t\t\t\tright = in[i].r;\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t}\n\tif(i == n)\n\t{\n\t\tprintf(\"%d %d\", left, right);\n\t}else{\n\t\tprintf(\"no\\n\");\n\t}\n\treturn 0;\n\n}\n\n\n"} +{"label": "76", "index": "37973", "code": "\nint main()\n{\n int n,i,j;\n scanf(\"%d\",&n); \n struct region\n {\n int x;\n int y;\n }\n a[n],re;\n for(i=0;i<=n-1;i++)\n {\n scanf(\"%d %d\",&a[i].x,&a[i].y);\n }\n re.x=a[0].x;\n re.y=a[0].y; \n for(j=0;j<=n-1;j++)\n {\n for(i=0;i<=n-1;i++)\n { \n if((a[i].x<=re.x&&a[i].y>=re.x)||(a[i].x>=re.x&&a[i].x<=re.y)) \n {\n if(re.x>a[i].x) re.x=a[i].x;\n if(re.y=max)\n max=b[i];\n } \n for(int p=0;p=a[q]&&a[p]<=b[q])\n c=0;\n if(b[p]>=a[q]&&b[p]<=b[q])\n d=0;\n }\n }\n if((c==1&&a[p]!=min)||(d==1&&b[p]!=max))\n k++;\n }\n if(k!=0)\n printf(\"no\");\n else printf(\"%d %d\",min,max); \n return 0;\n}"} +{"label": "76", "index": "37975", "code": "\n\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct z {\n\t\tint op,ed;\n\t} z[10000];\n\tint i;\n\tfor(i=0;i0;i--){\n\t\tfor(j=0;j=z[i].op){\n\t\t\to++;\n\t\t\tif(z[0].ed<=z[i].ed){\n\t\t\t\tz[0].ed=z[i].ed;\n\t\t\t}\n\t\t}\n\t}\n\tif(o==n-1){\n\t\tprintf(\"%d %d\",z[0].op,z[0].ed);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n\n"} +{"label": "76", "index": "37976", "code": "int main (){\n\tint n,a[50000],b[50000],zuo,you,x,h=1;\n\tscanf(\"%d\",&n);\n\tfor(int i=0;iyou){\n\t\t\tyou=b[k];\n\t\t}\n\t}\n\tfor(double z=zuo;z<=you;z+=0.5){\n\t\tfor(int m=0;msza[i+1]){\n\te=sza[i+1];\n\tf=szb[i+1];\n\tsza[i+1]=sza[i];\n\tszb[i+1]=szb[i];\n\tsza[i]=e;\n\tszb[i]=f;\n\t}}}\n\tmax=szb[0];\n\tfor (i=1;i bi[max])\n\t\t\tmax = i;\n\t}\n\treturn max;\n}\nint hasEqual(int a, int ai[], int ais[]) {\n\tint i;\n\tfor (i = 0; i < MAX; i++) {\n\t\tif (ai[i] <= a && ais[i] == 1) {\n\t\t\tais[i] = 0;\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\nint main() {\n\tint ai[MAX], bi[MAX];\n\tint aischeck[MAX];\n\tint n = 0, i, temp;\n\tfor (i = 0; i < MAX; i++)//???\n\t{\n\t\tai[i] = -1;\n\t\tbi[i] = -1;\n\t\taischeck[i] = 1;\n\t}\n\tint mi, ma, min, max;\n\tscanf(\"%d\", &n);\n\twhile (n > MAX) {\n\t\tscanf(\"%d\", &n);\n\t}\n\tfor (i = 0; i < n; i++) {\n\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t\twhile (ai[i] > bi[i])//????????????????\n\t\t{\n\t\t\tprintf(\"??????????:\\n\");\n\t\t\tfflush(stdin);\n\t\t\tscanf(\"%d%d\", &ai[i], &bi[i]);\n\t\t}\n\t}\n\tmi = min = getMin(ai, aischeck);\n\tma = max = getMax(bi);\n\ttemp = hasEqual(bi[min], ai, aischeck);\n\twhile (temp != -1)//????\n\t{\n\t\ttemp = hasEqual(bi[temp], ai, aischeck);\n\t\tif (bi[temp] == bi[ma]) {\n\t\t\tprintf(\"\\n%d %d\", ai[mi], bi[ma]);\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"no\\n\");\n}\n\n\n/*\nint main(){\n int n,min,max;\n int add=0;\n int a[100000];\n int b[100000];\n int sz[100000];\n scanf(\"%d\",&n);\n for(int i=0;imax)\n max=b[i];\n \n }\n for(int i=min;i<=max;i++){\n sz[i]=1;\n }\n for(int i=0;i0)printf(\"no\");\n else printf(\"%d %d\",min,max);\n}\n\n\n\n\n*/\n\n"} +{"label": "76", "index": "37980", "code": "int main(){\nint n,i,k;\nint a[50000],b[50000];\nscanf(\"%d\",&n);\nfor(i=0;ib[i]){\n\t\t}else{\n\t\t\tif(a[0]<=a[i]){\n\t\t\t\ta[i]=a[n-k];\n\t\t\t\ta[n-k]=0;\n\t\t\t}else{\n\t\t\t\ta[0]=a[i];\n\t\t\t\ta[i]=a[n-k];\n\t\t\t\ta[n-k]=0;\n\t\t\t}\n\t\t\tif(b[0]>=b[i]){\n\t\t\t\tb[i]=b[n-k];\n\t\t\t\tb[n-k]=0;\n\t\t\t}else{\n\t\t\t\tb[0]=b[i];\n\t\t\t\tb[i]=b[n-k];\n\t\t\t\tb[n-k]=0;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\nif(a[1]==0){\n\tprintf(\"%d %d\",a[0],b[0]);\n}else{\n\tprintf(\"no\\n\");\n}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37981", "code": "int main(){\n int n,i,j,h,p=1;\n scanf(\"%d\",&n);\n int z[n];\n int y[n];\n for(i=0;iz[i+1]){\n h=z[i];\n z[i]=z[i+1];\n z[i+1]=h;\n }\n if(y[i]>y[i+1]){\n h=y[i];\n y[i]=y[i+1];\n y[i+1]=h;\n }}}\n for(i=0;iy[i]){\n printf(\"no\");\n p=0;\n break;\n }\n }\n if(p==1){\n printf(\"%d %d\",z[0],y[n-1]);\n }\n return 0;\n}\n\n\n\n"} +{"label": "76", "index": "37982", "code": "\nint main()\n{\n int n,x=1;\n int a[5000],b[5000];\n int i,j,p;\n double t;\n scanf(\"%d\",&n);\n \n \nfor(i=0;imax)\n {\n max=b[i];\n }\n }\n int sz[5000]={0};\nfor(t=min+0.5,p=0;t<=max-0.5;t++,p++){\n \n for(i=0;ia[i]&&tb[j]){q=b[j+1];b[j+1]=b[j];b[j]=q;}}}\nmax=b[0];\nfor(i=2*a[0];i<=2*b[0];i++){if(sz[i]!=1){printf(\"no\");return 0;}}\nprintf(\"%d %d\",min,max);\nreturn 0;}\n"} +{"label": "76", "index": "37984", "code": "int main()\n{\n\tint n,a[50000],b[50000];\n\tscanf(\"%d\",&n);\n\tint i;\n\tfor(i=0;imax)\n\t\t{\n\t\t\tmax=b[i];\n\t\t}\n\t}\n\tint panduan=1;\n\tfor(i=min*2;i<=max*2;i++)\n\t{\n\t\tif(shuzhou[i]==0)\n\t\t{\n\t\t\tpanduan=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (panduan==0)\n\t{\n\t\tprintf(\"no\");\n\t}\n\tif(panduan==1)\n\t{\n\t\tprintf(\"%d %d\",min,max);\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37985", "code": "int main()\n{\n int n,i,k,e,m,c,max,z,a;\n double j;\t\n struct qj{\n\t\tint a,b;\n\t}qj[50000];\n scanf(\"%d\",&n);\t\nfor(i=0;i=qj[i+1].a)\n\t\t{\n\t\te=qj[i].a;\n\t\tqj[i].a=qj[i+1].a;\n\t\tqj[i+1].a=e;\n\t\tm=qj[i].b;\n\t\tqj[i].b=qj[i+1].b;\n\t\tqj[i+1].b=m;\n\t\t}\n\t}\n}\nmax=0;\nfor(i=0;iqj[i].a))\n z=1;\n\t}\n\tif(z==1)\n\t\tc++;\n}\nif(c==(max-(qj[0].a)))\n{\n\tprintf(\"%d %d\",(qj[0].a),max);\n}\nelse{\n\tprintf(\"no\");\n}\n\n\treturn 0;\n\n}"} +{"label": "76", "index": "37986", "code": "int main()\n{\n int n,i,a,b,s,t;\n double l;\n scanf(\"%d\",&n);\n int q[n],p[n];\n for(i=0;ib){\n b=p[i];\n }\n }\n s=0;\n for(l=a+0.5;l=q[i])&&(l<=p[i])){\n t=t+1;\n }\n }\n if(t>0){\n s=s+1;\n }\n }\n if(s==b-a){\n printf(\"%d %d\\n\",a,b);\n }else{\n printf(\"no\");\n }\n return 0;\n}\n"} +{"label": "76", "index": "37987", "code": "int main(){\n int n,i,u,k,e,p;\n int a[60000],b[60000];\n scanf(\"%d\",&n);\n p=0;\n for(i=0,u=0;ia[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n }\n }\n }\n for(k=1;kb[u+1]){\n e=b[u];\n b[u]=b[u+1];\n b[u+1]=e;\n }\n }\n }\n for(i=1,u=0;iqj[0][m]){\n\t\t\t\tp=qj[0][m];\n\t\t\t\tqj[0][m]=qj[0][k];\n\t\t\t\tqj[0][k]=p;\n\t\t\t\tq=qj[1][m];\n\t\t\t\tqj[1][m]=qj[1][k];\n\t\t\t\tqj[1][k]=q;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tfor(k=0;kqj[1][k]) {\n\t\t\t\tprintf(\"no\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(qj[1][k]>qj[1][m]){\n\t\t\t\t\tqj[1][m]=qj[1][k];\n\t\t\t\t\tqj[0][m]=qj[0][k];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tprintf(\"%d %d\",qj[0][0],qj[1][n-1]);\t\n\treturn 0;\n}\n"} +{"label": "76", "index": "37989", "code": "int main()\n{\n\tstruct qujian\n\t{\n\t\tint zen,xiao;\n\t} a[10000];\n\tint i,n,b,c,t,j,min,max,m;\n\tscanf(\"%d\",&n);\n\tt=0;\n\tmax=0;\n\tm=0;\n for (i=1;i<=n;i++){\n\t scanf(\"%d %d\",&b,&c);\n\t\t if (t==0){\n\t\t\t min=b;\n\t\t t=1;\n\t\t }\n\t\t if (bmax) max=c; \n\t for (j=b;j> n;\n\tcin >> a[0] >> b[0];\n\tmin = a[0];\n\tmax = b[0];\n\tfor (int i = 1; i < n; i ++)\n\t{\n\t\tcin >> a[i] >> b[i];\n\t\tmin = a[i] > min ? min : a[i];\n\t\tmax = b[i] > max ? b[i] : max;\n\t}\n\tnum = min;\n\tfor (float j = min; j <= max; j = j + 0.5)\n\t{\n\t\tfor (int i = 0; i < n; i ++)\n\t\t{\n\t\t\tif (a[i] <= j && j <= b[i])\n\t\t\t\tsum ++;\n\t\t}\n\t\tif (sum == 0)\n\t\t\tbreak;\n\t\tsum = 0;\n\t\tnum = num + 0.5;\n\t}\n\tif (num == max + 0.5)\n\t\tcout << min << \" \" << max << endl;\n\telse\n\t\tcout << \"no\" << endl;\n\treturn 0;\n}\n\n"} +{"label": "76", "index": "37991", "code": "int main(){\n\tint n,i,min,max=0,j=1,k,t=0;\n\tint a[10001][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[k+1][0]){\n\t\t\t\tt=a[k][0];\n\t\t\t\ta[k][0]=a[k+1][0];\n\t\t\t\ta[k+1][0]=t;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(a[k][1]>a[k+1][1]){\n\t\t\t\tt=a[k][1];\n\t\t\t\ta[k][1]=a[k+1][1];\n\t\t\t\ta[k+1][1]=t;\n\t\t\t}\n\n\t\t}\n\t}\n\tfor(i=0;imax){\n\t\t\tmax=a[i][1];\n\t\t}\n\t\tif(a[i][0]a[i+1]){\n e=a[i];\n a[i]=a[i+1];\n a[i+1]=e;\n e=b[i];\n b[i]=b[i+1];\n b[i+1]=e;\n }\n }\n }\n s=0;\n for(i=0;i=a[i+1]){\n s++;\n if(b[i]>b[i+1]){\n b[i+1]=b[i];\n } \n }\n }\n if(s==n-1){\n printf(\"%d %d\",a[0],b[n-1]);\n }else{\n printf(\"no\");\n }\n return 0;\n}\n"} +{"label": "76", "index": "37993", "code": "int main()\n{\n\tint a[50000],b[50000],i,c,d,e,n,k;\n\te=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ik;i--){\n\t\t if(a[i]quj[j+1].num1)\n\t\t\t{\n\t\t\t\ta=quj[j+1].num1;\n\t\t\t\tb=quj[j+1].num2;\n\t\t\t\tquj[j+1].num1=quj[j].num1;\n\t\t\t\tquj[j+1].num2=quj[j].num2;\n\t\t\t\tquj[j].num1=a;\n\t\t\t\tquj[j].num2=b;\n\t\t\t}\n\t\t}\n\t}\n\ta=quj[0].num1;\n\tb=quj[0].num2;\n\tfor(i=1;i=a)\n\t\t{\n\t\t\tif(quj[i].num2>b)\n\t\t\t\tb=quj[i].num2;\n\t\t}\n\t\tif(quj[i].num1>b)break;\n\t}\n\tif(i==n)\n\t{\n\t\tprintf(\"%d %d\",a,b);\n\t}\n\telse printf(\"no\");\n\treturn 0;\n}\n"} +{"label": "76", "index": "37995", "code": "int main(){\nint n,i,j,t,max,min;\nint a[50000],b[50000],c[10000];\nt=1;\nmax=1;\nmin=10000;\nscanf(\"%d\",&n);\nfor (i=0;imax){\nmax=b[i];\n}\nfor (j=a[i];j=x){\n\t\t\t\ta[j]=1;\n\t\t\t}\n\t\t} \n\t}\n\tfor(j=0;j<10000;j++){\n\t\tif(a[j]==1){\n\t\t\tk++;\n\t\t\tif(k==1){\n\t\t\t\tp=j;\n\t\t\t}\n\t\t\tif(a[j+1]==0){\n\t\t\t\tq=j;\n\t\t\t\tl++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=q+1;j<10000;j++){\n\t\tif(a[j]==1){\n\t\t\tl++;\n\t\t}\n\t}\n\tif(l==1){\n\t\tprintf(\"%d %d\",p,q+1);\n\t}else{\n\t\tprintf(\"no\");\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37997", "code": "int main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tstruct qujian {\n\t\tint a,b;\n\t}qujian[50001];\n\tint i;\n\tfor(i=0;iqujian[i].a){\n\t\t\tmin=qujian[i].a;\n\t\t}\n\t\tif(max=qujian[i].a){\n\t\t\t\tbreak;\n\t\t\t\tm=1;\n\t\t\t}\n\t\t}\n\t\tif(m==0){\n\t\t\tprintf(\"no\");\n\t\t\tbreak;\n\t\t}\n\t\tif(s==max){\n\t\t\tprintf(\"%d %d\",min,max);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "76", "index": "37998", "code": "int main(){\n\t\nint a[1000],b[1000],n,i,all[20000],j,m;\n\t\nfor(i=0;i<20000;i++)\n\t\n\t\nall[i]=0;\n\t\n m=0;\n\t\nscanf(\"%d\",&n);\n\t\nfor( i=0;i=2*a[i]&&j<=2*b[i])\n\t\n\t\n\t\n\t\nall[j]=1;\n\t\n\t\n}\n\t\n}\n\t\nint x,y;\n\t\nfor(i=1;i<20000;i++){\n\t\n\t\nif(all[i]==0&&all[i+1]==1&&all[i-1]==1){\n\t\n\t\n\t\nm++;\n\t\n\t\n\t\nbreak;\n\t\n\t\n}\n\t\n\t\nelse{\n\t\n\t\n\t\nif(all[i]==1&&all[i+1]==1&&all[i-1]==0)\n\t\n\t\n\t\n\t\nx=i/2;\n\t\n\t\n\t\nif(all[i]==1&&all[i+1]==0&&all[i-1]==1)\n\t\n\t\n\t\n\t\ny=i/2;\n\t\n\t\n}\n\t\n}\n\t\nif(m==0)\n\t\n\t\nprintf(\"%d %d\",x,y);\n\t\n\n\t\nelse{\n\t\n\t\nprintf(\"no\");\n\t\n}\n\t\ngetchar();\n\t\ngetchar();\n\t\nreturn 0;\n}\n\n"} +{"label": "76", "index": "37999", "code": "int main()\n{\n\tint n,i,j;\n\tint x[50000][2];\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=(y[i+1][1])?y[i][1]:y[i+1][1];\n\t }\n\t if((y[i][1])>=(y[i+1][1]))\n\t {\n\t max=y[i][1];\n\t\ty[i][1]=y[i+1][1];\n\t\ty[i+1][1]=max;\n\t }\n\t}\n\tint k=1;\n\tint maxmax,minmin,maxmin,minmax;\n\tif(n==2)\n\t{\n\t maxmax=(x[0][1])>=(x[1][1])?(x[0][1]):(x[1][1]);\n\t minmin=(x[0][0])<=(x[1][0])?(x[0][0]):(x[1][0]);\n\t maxmin=(x[0][1])<(x[1][1])?(x[0][1]):(x[1][1]);\n\t minmax=(x[0][0])>(x[1][0])?(x[0][0]):(x[1][0]);\n\t if(maxmin>=minmax)\n\t {\n\t printf(\"%d %d\",minmin,maxmax);\n\t }\n\t if(maxmin2)\n\t{\n\twhile(k=(x[i+1][1])?(x[i][1]):(x[i+1][1]);\n\t minmin=(x[i][0])<=(x[i+1][0])?(x[i][0]):(x[i+1][0]);\n\t maxmin=(x[i][1])<(x[i+1][1])?(x[i][1]):(x[i+1][1]);\n\t minmax=(x[i][0])>(x[i+1][0])?(x[i][0]):(x[i+1][0]);\n\t if(i==n-2)\n\t {\n\t\tif(maxmin>=minmax)\n\t\t{\n\t\tx[0][0]=minmin;\n\t\tx[0][1]=maxmax;\n\t\tbreak;\n\t\t}\n\t\tif(maxmin=minmax)\n\t {\n\t x[i+1][0]=minmin;\n\t x[i+1][1]=maxmax;\n\t }\n\t if(i> a;\n\tla = strlen(a);\n\tb = a[0];\n\tg = a[la - 1];\n f(b, g, a, sum );\n\treturn 0;\n}\nvoid f(char b, char g, char * a, int * sum)\n{\n\tint i, j, l;\n\tl = strlen(a);\n\tfor (i = 0; i < l ; i++)\n\t{\n\t\tif ((l > 2) && ( a[i] == g) && (sum[i] == 0))\n\t\t{\n\t\t\tfor (j = i; j >= 0; j--)\n\t\t\t{\t\n\t\t\t\tif ((sum [j] == 0) && (a[j] == b))\n {\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t sum [i] = 1;\n\t\t\t sum [j] = 1;\n\t\t\t f(b, g, a, sum);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38001", "code": "int main()\n{\n\tchar a[1000];\n\tchar m,f;\n\tint i,j,temp;\n\tgets(a);\n\tm=a[0];\n\tfor(i=0;;i++)\n\t\tif(a[i]!=m) {f=a[i];break;}\n\tdo\n\t{\n\t\tfor(i=0;i=0;i--)\n if(a[i]==0) { cout<>c;\n a[0]=0;\n int i,k=strlen(c);\n for(i=1;i>s;\n\tboy=s[0];\n\tf(s);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38005", "code": "void getmarried (char str[], int num, char, char, int);\nint main()\n{\n\tchar str[101];\n\tcin.getline(str, 101);\n\tint l = strlen(str);\n\n\tchar b = str[0], g = str[l - 1];\n\n\tgetmarried (str , 1, b, g , l);\n}\n\nvoid getmarried (char str[], int num, char b, char g, int l)\n{\n\tif (str[num] == g)\n\t{\n\t\tfor (int j = num - 1 ; j >= 0 ; j--)\n\t\t{\n\t\t\tif (str[j] == b)\n\t\t\t{\n\t\t\t\tcout << j << ' ' << num << endl;\n\t\t\t\tstr[num] = str[j] = '#';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (num < l - 1)\n\t\treturn getmarried(str, num + 1, b, g , l);\n}"} +{"label": "77", "index": "38006", "code": "void p(int a[])//??\n{\n\tint i=0;\n\tfor(i=0;a[i]!=0;i++)\n\t{\n\t\tif(a[i]==1)\n\t\t{\n\t\t\tint j=i+1;\n\t\t\twhile(a[j]==3) j++;//?????????????\n\t\t\tif(a[j]==2)\n\t\t\t{\n\t\t\t\tcout<>a;\n\twhile(cin.peek()!='\\n')//?????????1???2???0????3????\n\t{\n\t\tchar ch=cin.get();\n\t\tif(ch==a)\n\t\t\tchild[i]=1;\n\t\telse child[i]=2;\n\t\ti++;\n\t}\n\tp(child);\n\treturn 0;\n}"} +{"label": "77", "index": "38007", "code": "char all[101];\nint times[101];\nvoid oper(char, int);\nint main()\n{\n\tchar boy;\n\tint l;\n\tmemset(times, 0, sizeof(times));\n\tcin.getline(all,101);\n\tl = strlen(all);\n\tboy = all[0];\n\toper(boy, l);\n\treturn 0;\n}\n\nvoid oper(char boy, int l)\n{\n\tint i, j;\n\tif (l == 0)\n\t\treturn;\n\tfor (i = 1; i < l; i++)\n\t{\n\t\tif (all[i] != boy && all[i - 1] == boy)\n\t\t{\n\t\t\tcout << i - 1 + 2 * times[i - 1] << \" \" << i + 2 * times[i] << endl;\n\t\t\tfor (j = i - 1; j < l - 2; j++)\n\t\t\t{\n\t\t\t\tall[j] = all[j + 2];\n\t\t\t\ttimes[j + 2]++;\n\t\t\t\ttimes[j] = times[j + 2];\n\t\t\t}\n\t\t\tl -= 2;\n\t\t\tbreak;\n\t\t}\n\t}\n\toper(boy, l);\n\treturn;\n}"} +{"label": "77", "index": "38008", "code": "\nint b[100][2],count=0;\n\nvoid deal(char a[],int num[],int n)\n{\n\tint i,j;\n\tif(n!=0)\n\t{\n\tchar mid;\n\tmid=a[0];\n\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tif(a[i]!=a[0])\n\t\t\t\tm+=1;\n\t\t\tif(a[i]==a[0])\n\t\t\t\tm-=1;\n\t\t\tif(m==0)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,k);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38012", "code": "static int i=0,a2[2][101];\n\nint f(char s[],char a,char b,int n)\n{\n\tint j,k,e,flag2=0;\n\tfor(j=0;ja2[1][y+1]) {temp=a2[1][y];a2[1][y]=a2[1][y+1];a2[1][y+1]=temp;temp=a2[0][y];a2[0][y]=a2[0][y+1];a2[0][y+1]=temp;}\n\t\t}\n for(t=0;2*t=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==nan&&b[j]==0) {printf(\"%d %d\\n\",j,i);b[j]=1;break;}\n\t\t\t}\n\t\t}\n\t}\n\t/*printf(\"%c %c\",nan,nv);*/\n\treturn 0;\n}"} +{"label": "77", "index": "38014", "code": "void main()\n{\n\tvoid print(char *x,int *y,int z);\n\tchar s[100],*p;\n\tint a[100],i,n,*q;\n\n\tscanf(\"%s\",s);\n\tp=s;\n\tn=strlen(s);\n\tfor(i=0;s[i];i++)\n\t\ta[i]=i+1;\n\tq=&a[0];\n\n\tprint(p,q,n);\n}\n\nvoid print(char *x,int *y,int z)\n{\n\tint i,j,k;\n\tfor(k=0;k=0;i--)\n {\n a=0;b=0;\n if(c[i]!=sex)\n {\n for(j=i;j>=0;j--)\n {\n if(c[j]==sex)\n {\n\t\t\t\t\t a++;\n }\n else\n {\n\t\t\t\t\t b++;\n\t\t\t\t }\n if(a==b)\n {\n x[k]=j;\n y[k]=i;\n k++;\n break;\n }\n } \n } \n }\n for(i=k-1;i>=0;i--)\n {\n printf(\"%d %d\\n\",x[i],y[i]);\n }\n return 0;\n}"} +{"label": "77", "index": "38016", "code": "int i;\nchar row[100];\nint match(int x)\n{\nint y;\nif(x==i)\n return 1;\nif(row[x]==row[0])\n y=match(x+1);\n else\n return x;\ncout<>row;\ni=strlen(row);\nmatch(0);\nreturn 0;\n}"} +{"label": "77", "index": "38017", "code": "int l;\nstruct stu\n{int num;\nint sex;}a[100];\nint main()\n{char s[101],p;\nint i,j,L,k;\nscanf(\"%s\",s);\nl=strlen(s);\np=s[0];\nfor(i=0;i> c;\n\tboy = c[0];\n\tn = strlen(c);\n\tm = tell(0);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38019", "code": "int main()\n{\n int l,i,j,k,p;\n char s[10000];\n int a[10000];\n char c,d;\n scanf(\"%s\",s);\n l=strlen(s);\n p=l;\n c=s[0];\n d=s[l-1];\n for(i=0;i= 0; i--)\n\t\t\t{\n\t\t\t\tif (line[i] == sex[0])\n\t\t\t\t{\n\t\t\t\t\tcout << i << ' ' << n << endl;\n\t\t\t\t\tline[i] = ' ';\n\t\t\t\t\tline[n] = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcheck(line, n + 1);\n\t}\n}\n\nint main()\n{\n\tchar line[501];\n\tcin.getline(line, 501);\n\tsex[0] = line[0];\n\tsex[1] = line[strlen(line) - 1];\n\n\tcheck(line, 1);\n\n\treturn 0;\n}"} +{"label": "77", "index": "38021", "code": "void pei(char a[250])\n{\n\tint t=strlen(a);\n\tint i;\n\tfor(i=0;i')\n\t\t\t{\n\t\t\tint s=i-1;\n\t\t\twhile(a[s]=='0')\n\t\t\t\ts--;\n\t\t\twhile(a[s]!='<')\n\t\t\t\ts--;\n\t\t\ta[s]='0';\n\t\t\ta[i]='0';\n\t\t\tprintf(\"%d %d\",s,i);\n\t\t\tprintf(\"\\n\");\n\t\t}\n\n\n\n\t}\n\ti=0;\nprintf(\"%d %d\",i,t-1);\n}\nvoid main()\n{\n\tchar a[250];\n\tgets(a);\n\tpei(a);\n}"} +{"label": "77", "index": "38022", "code": "\nint main()\n{\n\tchar m,f,p,l,a[100];\n\tint i,j;\n\tscanf(\"%s\",a);\n\tm=a[0];\n\tfor(i=0;i> a;\n\tn = strlen(a);\n\tfor (q = 1; q <= n-1; q ++)\n\t{\n\t\tif (a[q] == a[0])\n\t\t\ta[q] = '(';\n\t\telse\n\t\t\ta[q] = ')';\n\t}\n\tfor (q = 1; q <= (n/2); q ++)\n\t\tf(a, n);\n\treturn 0;\n}"} +{"label": "77", "index": "38024", "code": "\nint main(int argc, char* argv[])\n{\n\tchar a[1000],x,y;\n\tint i=0,j,n,k=1;\n\twhile(scanf(\"%c\",&a[i])==1)\n\t{\n\t\tif(k&&a[i]!=a[0])\n\t\t{\n\t\t\ty=a[i];\n\t\t\tk=0;\n\t\t}\n\t\ti++;\n\t}\n\tn=i-1;\n\tx=a[0];\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==x) \n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\ta[j]=0;\n\t\t\t\t\ta[i]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}"} +{"label": "77", "index": "38025", "code": "void print(char str[100])\n{\n\tint stack[100];\n\tint i,j=0;\n\tint la;\n\tla=strlen(str);\n\tfor(i=0;i>engage;\n\ti=strlen( engage );\n\tfor ( t=0 ; t> a; \n\tb= a[0];\n\tfor (i = 0; i <= 999; i++)\n\t\tif(a[i] != b)\n\t\t{\n\t\t\tg = a[i];\n\t\t\tbreak;\n\t\t}\n\tmatch( b, g);\n\treturn 0;\n\t}\n\nint match(char b, char g)\n{\n\tint i, j;\n\tfor ( i = 0; a[i] != '\\0'; i++)\n\t\tif(a[i] == g)\n\t\t\tbreak;\n\tif(a[i]=='\\0')\n\t\treturn 0;\n\tfor ( j=i; j>=0; j--)\n\t\tif(a[j] == b)\n\t\t{\n\t\t\tcout<= 0; k--)\n\t\t\t{\n\t\t\t\tif(c[k] == b)\n\t\t\t\t{\n\t\t\t\t\ta[i][0] = k;\n\t\t\t\t\tc[k] = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i < n / 2 - 1)\n\t\tcombine(c, i + 1);\n}\n\t\n\nint main()\n{\n\tint j, k, t;\n\tcin >> c;\n\tn = strlen(c);\n\tb = c[0];\n\tcombine(c, 0);\n for(j = 0; j < n / 2; j++)\n\t{\n\t\tcout << a[j][0] << \" \" << a[j][1] << endl;\n\t}\n\treturn 0;\n}\n\t\t\n\n"} +{"label": "77", "index": "38030", "code": "//*****************************************************************\n//????????????\u0093????\u0094 *\n//????wayne *\n//?????11.25 *\n//*****************************************************************\nint len;\nchar str[1001];\nchar boy,girl; //???????????????\nvoid operate();\nint main()\n{\n\tcin>>str; //?????\n\tboy=str[0]; //?????????\n\tint i;\n\tlen=strlen(str); //????\n\tfor (i=1;;i++)\n\t\tif (str[i]!=boy) //??????????\n\t\t{\n\t\t\tgirl=str[i]; //??????girl\n\t\t\tbreak; //????????\n\t\t}\n\toperate(); //????\n\treturn 0;\n}\nvoid operate()\n{\n\tint i,j;\n\tfor (i=0;i<=len-2;i++)\n\t{\n\t\tif (str[i]==boy) //????????\n\t\t{\n\t\t\tfor (j=i+1;j<=len-1;j++)\n\t\t\t{\n\t\t\t\tif (str[j]==' ') continue; \n\t\t\t\telse if (str[j]==girl) //???????????\n\t\t\t\t{\n\t\t\t\t\tcout<= 0; j--)\n\t\t{\n\t\t\tif (str[j] == b)\n\t\t\t{\n\t\t\t\tstr[j] = '*';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcout << j << \" \" << i << endl;\n\t}\n\tmatch(i + 1, b, g);\n\treturn;\n}"} +{"label": "77", "index": "38032", "code": "//***************************************************\n//* ????1000012846_2.cpp *********************\n//* ????? ***********************************\n//* ?????2010?12? *************************\n//* ????????? *************************** \n//***************************************************\n//????????????????????????????????3????????????????????k????k???????????????????????\nvoid Output ( char a[100] , int k , int b[100] )\n{\n\tint i = 0 , j ; //????i?j\n\tif ( k == 0 ) //??0????????????\n\t\treturn ;\n\telse\n\t{\n\t\twhile ( a[i] == a[0] )\n\t\t\ti++ ; //??????????\n\t\tcout << b[i-1] << \" \" << b[i] << endl ; //???????????????????\n\t\tfor ( j = i - 1 ; j < k - 2 ; j++ ) //???????????????\n\t\t{\n\t\t\ta[j] = a[j+2] ;\n\t\t\tb[j] = b[j+2] ;\n\t\t}\n\t\tOutput ( a , k - 2 , b ) ; //??????\n\t}\n}\nint main()\n{\n\tint i , len , b[100] ; //i??????len????????,?????????b[]??????????\n\tchar a[100] ;\n\tcin >> a ;\n\tlen = strlen(a) ;\n\tfor ( i = 0 ; i < len ; i++ )\n\t\tb[i] = i ;\n\tOutput ( a , len , b ) ; //????\n\treturn 0 ;\n}\n\t\n\n"} +{"label": "77", "index": "38033", "code": "void e(int,int);\nchar a[100];\nint main()\n{\n\tint i=0;\n\tcin.getline(a,100);\n\twhile(a[i]!='\\0')\n\t{\n\t\ti++;\n\t}\n\te(0,i-1);\n\treturn 0;\n}\nvoid e(int b,int c)\n{\n\tint t=0,j=0;\n\tif(b==c-1)\n\t\tcout<b[y+1]) \n\t\t\t{ \n\t\t\t\tz=b[y];b[y]=b[y+1];b[y+1]=z;\n\t\t\t\tz=a[y];a[y]=a[y+1];a[y+1]=z;\n\t\t\t}\n\tfor(pp=0;;pp++)\n\t{\n\t\tif(a[pp]==-1) break;\n\t\telse printf(\"%d %d\\n\",a[pp],b[pp]);\n\t}\n}\n\n\n\n"} +{"label": "77", "index": "38035", "code": "int main()\n{\n\tint N,Number[2000];\n\tchar C[2000];\n\tint Top = 0;\n\tgets(C);\n\tN = strlen(C);\n\tfor (int I = 0; I < N; I ++)\n\t{\n\t\tif (C[I] != C[0])\n\t\t{\n\t\t\tcout << Number[Top] << \" \" << I << endl;\n\t\t\tTop --;\n\t\t}\n\t\t\telse Number[++Top] = I;\n\t}\n}"} +{"label": "77", "index": "38036", "code": "\n\n\nint main()\n{\n char st[1000]; cin.getline(st,1000);\nchar a=st[0];\n int count=0,z[1000];\n for (int i=1;i<=strlen(st);i++)\n if (st[i-1]==a) {count++; z[count]=i;}\n else {cout<=0;i--)\n\t{\n\t\tif(a[i]==b)\n\t\t\tbj++;\n\t\telse if(a[i]==g)\n\t\t\tgj++;\n\t\tif(bj==gj)\n\t\t{\n\t\t\tbs=i;\n\t\t\tgs=k;\n\t\t break;\n\t\t}\n\t}\n\tt=100*bs+gs;\n\t\treturn (t);\n}\nint main()\n{\n\tchar d[100];\n\tint n,length,m,i,j,t,k;\n\tchar boy,girl;\n\tint weishu[100][2];\n\tcin>>d;\n\tlength=strlen(d);\n\tboy=d[0];\n\tgirl=d[length-1];\n\tfor(n=0;nweishu[i+1][1])\n\t\t\t{t=weishu[i][1];weishu[i][1]=weishu[i+1][1];weishu[i+1][1]=t;\n\t\t\tm=weishu[i][0];weishu[i][0]=weishu[i+1][0];weishu[i+1][0]=m;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==p)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\ta[j]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38039", "code": "int queue[110];\nint l;\nint num[110];\nvoid f(int x[],int y)\n{\n\tint j,k=0;\n\tfor(j=0;j>game;\n\tl = strlen(game);\n\tfor(i=0;game[i]!=0;i++)\n\t{\n\t\tif(game[i]==game[0])\n\t\t{\n\t\t\tqueue[i] = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tqueue[i] = 0;\n\t\t}\n\t}\n\tf(queue,l);\n\treturn 0;\n}"} +{"label": "77", "index": "38040", "code": "int main()\n{\n void paixu(char num[10000]);\n char num[10000];\n cin.getline(num,10000);\n paixu(num);\n return 0;\n}\nvoid paixu(char num[])\n{\n char boy,girl;\n int i=0,j,k;\n boy=num[0];\n while(num[i]!='\\0')\n {\n if(num[i]!=boy&&num[i]!=' ')\n {\n girl=num[i];\n break;\n }\n i++;\n }\n while(num[i]!='\\0')\n {\n if(num[i]!=boy)\n {\n for(j=i-1;;j--)\n {\n if(num[j]!=' ')\n {\n cout<>c[i])\n\t{i++;d[i]=0;}\n\ttotal=i;\n\tfor (i=0;i<(total/2);i++)\n\t{\n\t\tfor (j=0;j= 0 && chn[i] == b)\n {\n printf(\"%d %d\\n\",z,i);\n chn[z] = 0;\n chn[i] = 0;\n t ++; \n break;\n } \n else if(z >= 0 && chn[i] == a)\n z = i;\n } \n if(!t) break;\n }\n \n return 0; \n}\n"} +{"label": "77", "index": "38044", "code": "\nstruct bg\n{\n\tint b;\n\tint g;\n};\n\nint main()\n{\n\tchar peo[101]={0},e;\n\tint i,j,k=0,l;\n\tstruct bg bag[50];\n\n\tgets(peo);\n\n l=strlen(peo);\n\te=peo[l-1];\n\tfor(i=1;i=0;j--)\n\t\t\t\t if(peo[j]!='\\0')\n\t\t\t\t\t { bag[k].b=i;\n\t\t bag[k].g=j;\n\t\t\t\t\t\tk++;\n\t\t\t\t\t\tpeo[i]='\\0';\n\t\t\t\t\t\tpeo[j]='\\0';\n\t\t\t\t break;}\n\t}\n\t\tfor(i=0;i>str;\n boy=str[0];\n int i;\n for(i=0;str[0]!='\\0';i++)\n {\n if(str[i]!=boy)\n{\ngirl=str[i];\nbreak;\n}\n }\n //cout<=0;j--){\n\t\t\tif(a[j]!=-1) {\n\t\t\t\tprintf(\"%d\",a[j]);\n\t\t\t\ta[j]=-1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tprintf(\" %d\\n\",i);\n\t}\n\t\n}\n\n\n\treturn 0;\n}"} +{"label": "77", "index": "38049", "code": "/*????*/\nvoid doit(char a[],int n)\n{\n\tint i,j;\n\tfor(i=1;i-1;j--)\n\t{\n\t\tif(a[j]==a[0])break;\n\t}\n\tprintf(\"%d %d\\n\",j,i);\n\ta[j]='\\0',a[i]='\\0';\n\tif(a[0]!='\\0')doit(a,n);\n}\n\nvoid main()\n{\n\tchar a[100];\n\tint n;\n\tscanf(\"%s\",a);\n\tn=strlen(a);\n\tdoit(a,n);\n}\n\n"} +{"label": "77", "index": "38050", "code": "\nchar a[1000];//????? \n\nint xx (int k)\n{\n int x=k,y=k+1;//??????? \n while (a[y]==a[x])//????????? \n y=xx(y);\n cout <= 0; j--)\n\t\t\t{\n\t\t\t\tif((sign[j] == 0)&&(line[j] == boy))\n\t\t\t\t{\n\t\t\t\t\tsign[j]++;\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\tanswer(i); //?????????????\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}"} +{"label": "77", "index": "38052", "code": "// *******************\n// ** ????.cpp **\n// ** ID 1000012895 **\n// ** ??? **\n// ** 2010 12 259 **\n// *******************\nchar sign1, sign2; // ????????????????\nvoid go_out(char line[], int len) // ??go_out\n{\n\tint temp;\n\tfor(int i = 0; i < len - 1; i++) // ????\n\t\tif(line[i] == sign1) // ????????\n\t\t{\n\t\t\ttemp = i + 1;\n\t\t\twhile(line[temp] == '@') // ??????????????@?????????temp????????@?\n\t\t\t{temp++;}\n\t\t\tif(line[temp] == sign2) // ????????????????????????????@?????\n\t\t\t{\n\t\t\t\tcout << i << ' ' << temp << endl;\n\t\t\t\tline[temp] = line[i] = '@';\n\t\t\t\treturn; // ?????\n\t\t\t} // ???????????????????????????\n\t\t}\n\treturn;\n}\n\nint main()\n{\n\tchar line[1000];\n\tint len;\n\tcin.getline(line,1000); // ???????\n\tsign1 = line[0]; // ???????????????sign1?\n\tint temp = 1;\n\twhile(line[temp] == sign1)\n\t\ttemp++;\n\tsign2 = line[temp]; // ???????sign1?????????????????sign2\n\tlen = sizeof(line);\n\twhile(line[0] == sign1) // ???????????????????\n\t{\n\t\tgo_out(line, len);\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38053", "code": "/**\n* @file homework.cpp\n* @author ???\n* @date 2011-11-16\n* @description\n* ??????: ????\n*/\nvoid Paidui(char[], int);\n\nint main()\n{\n\tint i;\n\tchar a[1000];\n\tcin.getline(a, 1000);\n\tfor (i = 1; a[i] != '\\0'; i++) // ???1????2\n\t{\n\t\tif (a[i] == a[0]) a[i] = 1;\n\t\telse a[i] = 2;\n\t}\n\ta[0] = 1;\n\tPaidui(a, 0);\n\treturn 0;\n}\n\n// ?????b????j????????????\nvoid Paidui(char b[], int j)\n{\n\tif (b[j] == 2) // ???????\n\t{\n\t\tint k;\n\t\tfor(k = j - 1; k >= 0; k--) // ?????????\n\t\t{\n\t\t\tif (b[k] == 1)\n\t\t\t{\n\t\t\t\tcout << k << \" \" << j << endl;\n\t\t\t\tb[k] = 0; // ??????\n\t\t\t\tb[j] = 0; // ??????\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (b[0] == 0) return; // ?????????????\n\tPaidui(b, j+1); // ??????\n}"} +{"label": "77", "index": "38054", "code": "\n\nint main()\n{\n int i,j,k,n;\n char a[100],b,g;\n cin.getline(a,100);\n for(n=0; a[n]!='\\0'; n++);\n b=a[0];\n for(i=0; a[i]==b; i++);\n g=a[i];\n for(i=0; i>st; a=st[0]; \n int h=0,z[100];\n for (int i=1;i<=strlen(st);i++)\n {\n if (st[i-1]==a) {h++; z[h]=i;}\n else {cout<>child[m])//?? \n {\n if(cin.peek()=='\\n')\n break;\n m++; \n } \n\n for(i=0;i<=m;i++)//???????? \n {\n if(child[i]==child[0])\n ch[i]=1;\n else\n ch[i]=2; \n } \n \n int p;\n for(i=0;idou[i+1][1])\n {\n p=dou[i][0];\n dou[i][0]=dou[i+1][0];\n dou[i+1][0]=p;\n p=dou[i][1];\n dou[i][1]=dou[i+1][1];\n dou[i+1][1]=p; \n } \n }\n for(j=0;j<=m/2;j++)\n if(dou[j][1]!=0) \n cout<> str;\n\tfor (i = 0; str[i] != '\\0'; i++)\n\t{\n\t\tif (str[i] != str[0])\n\t\t{\n\t\t\tch = str[i];\n\t\t\tf (i - 1, i);\n\t\t\treturn 0;\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38060", "code": "char b, g;\tchar str[110];\nint match(int p);\nint main()\n{\n\t// ?????? ????????????????????????\n\t// ??????????? ?????????\n\t// ?????????? ???????????????????????\n\t// ??????????\n\t// ?????????????? ????????????????\n\tint i, j, len;\n\n\tcin >> str;\n\tlen = strlen(str);\n\tb = str[0];\n\tg = str[len - 1];\n\tmatch(0);\n\treturn 0;\n}\nint match(int p) // match(p) ????????? ?????? ??p ?????????p????????\n{\n\tint q;\n\tif (str[p] == b) // ????????? ????????????????????\n\t{ \n\t\tq = match(p + 1); // ??????\n\t\tcout << p << \" \" << q << endl;\n\t\treturn match(q + 1); // ????? ??????????????????\n\t}\n\telse\n\t{\n\t\treturn p;\n\t}\n}\n\n\n\n\n\n\n"} +{"label": "77", "index": "38061", "code": "char Dat[maxn];\nint n,Stac[maxn],Top;\nint main() {\nscanf(\"%s\",&Dat);\nn = strlen(Dat);\nTop = 0;\nfor (int i = 0; i < n; i++)\n if (Dat[i] == Dat[0])\n\tStac[++Top] = i;\n else\n\tprintf(\"%d %d\\n\",Stac[Top--],i);\n}"} +{"label": "77", "index": "38062", "code": "void f(char a[],int n,char x,char y)\n{\n int i,j,k=1;\n for(i=0;i=0;j--)\n if(a[j]==x)\n {\n printf(\"%d %d\",j,i);\n a[i]=0;\n a[j]=0;\n k+=2;\n if(k>team;\n\tsex[0]=team[0]; //???????????\n\tfor(i=0;i<100;i++)\n\t{\n\t\tif(team[i]!=team[0] && team[i]!='\\0')//?????????\n\t\t\tsex[1]=team[i];\n\t\telse if(team[i]=='\\0')\n\t\t\tbreak;\n\t}\n\thand(); //????\n\treturn 0;\n}\nvoid hand()\n{\n\tint i,j,judge;\n\tif(team[0]==sex[0]) //?????????????????\n\t{\n\t\tjudge=0;\n\t\tfor(i=0;i<100;i++) \n\t\t{\n\t\t\tif(team[i]==sex[1]) //???????\n\t\t\t{\n\t\t\t\tfor(j=1;j<100;j++)\n\t\t\t\t{\n\t\t\t\t\tif(team[i-j]==sex[0])//????????\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(judge==1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcout<= 0; i--)//????????????????\n\t\t\tif(str[i] == m && f[i] == 1)\n\t\t\t{\n\t\t\t\tcout << i << \" \" << k << endl;//?????????????????????????\n\t\t\t\tf[i] = 0; \n\t\t\t\tf[k] = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\tsort(str, f, l, k + 1, m);//??????\n}\nint main()\n{\n\n\tchar str[101], m;\n\t\n\t\n\tint l, i = 0, k;\n\tcin.getline(str,101);\n\tl = strlen(str);\n\tm = str[0];\n\tfor(i = 0; i < l; i++)\n\t\tf[i] = 1;\n\ti = 0;\n\twhile(str[i] == m) i++;\n\tk = i;// ???????\t\n\tsort(str, f, l, k, m);//?????????\t\n\treturn 0;\n}\n\t"} +{"label": "77", "index": "38065", "code": "int main ()\n{\n char a[100];\n int d[100]={0},n;\n char b,c;\n for (int i=0;i<100;i++)\n {\n a[i]=getchar();\n if (a[i]=='\\n')\n {\n n=i;\n break;\n }\n b=a[0];\n if (a[i]!=b)\n c=a[i];\n }\n for (int i=1;i<=n/2;i++)\n {\n for (int j=0;j=0;k--)\n {\n if (a[k]==c||d[k]==1)\n continue;\n cout <> a;\n\tchar ch = a[0];\n\tcal(a, 0, ch);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38067", "code": "/*\n * file homework 14_2\n * author ??\n * date 2010-1-1\n * description\n ???????????\n*/\n\n\n\nint Match(int n, char a[], char boy, char girl);\n\nint main()\n{\n\tint len;\n\tchar a[100];\n\tchar boy, girl;\n\tcin >> a;\n\tlen = strlen(a);\n\tboy = a[0];\n\tgirl = a[len - 1];\n Match(0, a, boy, girl);\n\n\treturn 0;\n}\n\n\nint Match(int n, char a[], char boy, char girl)\n{\n\tint m;\n\tif(a[n] == girl)\n\t\treturn n;\n\tm = Match(n + 1, a, boy, girl);\n\tcout << n << \" \" << m << endl;\n\tif (a[m + 1] != '\\0')\n\t\treturn Match(m + 1, a, boy, girl);\n\telse\n\t\treturn 0;\n\n}\n"} +{"label": "77", "index": "38068", "code": "\nint main(int argc, char* argv[])\n{\n\tchar s[10000];\n\tchar a,b;\n\tint n;\n\t\n\tgets(s);\n\tn=strlen(s);\n\ta=s[0];\n\tb=s[n-1];\n\tint i;\n\tfor(i=1;i=0;j--)\n\t\t\t{\n\t\t\t\tif(s[j]==a&&first==0)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\t\tfirst=1;\n\t\t\t\t\t\ts[i]=' ';\n\t\t\t\t\t\ts[j]=' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}\n\t\n\n\treturn 0;\n}\n"} +{"label": "77", "index": "38069", "code": "/*********************????******************\n??\n???????????????????????????????\n???????????????????????????????\n????????????0???????????????????\n???????????????????????????????\n????????????????????????????????\n????????????????????????????????\n???????????????????????????.\n????????????????????????????????\n???????????????????????????????\n?????????????????????????????\n????\n???????????????????????????????\n???????????????????????????????\n????????100\n????\n???????????????????????????????\n?????????????????????\n????\n((()(())())(()))\n????\n2 3\n5 6\n4 7\n8 9\n1 10\n12 13\n11 14\n0 15\n**********************************************************\nprogrammer Qiu Hezi\nversion 2.0(??)\ncreat date 2012.11.20 22:19\n**********************************************************/\n/*??????n???????n????\u0093?\u0094???\u0093?\u0094???\n????????????1???4????2?3???????????*/\nchar boy;\nint first=0;\nint fun (int n)\n{\n char temp;\n temp = cin.get();//cin.get(temp);//????n???\n if (first==0)\n {\n boy=temp;\n first=1;\n }\n if (temp== boy )\n {\n int num=fun(n+1);\n cout<=0;i--)\n {\n if(mf[i]==mf[0])\n {\n cout<bg[j+1][1] )\n\t\t\t{\n\t\t\t\ttemp=bg[j][1];\n\t\t\t\tbg[j][1]=bg[j+1][1];\n\t\t\t\tbg[j+1][1]=temp;\n\n\t\t\t\ttemp=bg[j][0];\n\t\t\t\tbg[j][0]=bg[j+1][0];\n\t\t\t\tbg[j+1][0]=temp;\n\t\t\t}\n\n\tfor (i=0;i>c;\n a[0]=1;\n for(int i=1;i<100;i++)\n {\n char b;\n cin>>b;\n if(b==c)\n a[i]=1;\n else\n a[i]=-1;\n }\n for(int j=0;j<100;j++)\n {\n if(a[j]==-1)\n {\n for(int k=j-1;k>=0;k--)\n {\n if(a[k]==1)\n {\n cout<>a;\n\tfor(int i=0;i> a;\n\tb = a[0];\n\tg = a[strlen(a) - 1];\n\tfor (ii = 0;ii < strlen(a);ii++)\n\t{\n\t\tfor (i = ii;i >= 0;i--)\n\t\t{\n\t\t\tif((a[ii] == g)&&(a[i] == b))\n\t\t\t{\n\t\t\t\tcout << i << \" \" <res[j+1].woman){\n\t\t\t\ttemp=res[j];\n\t\t\t\tres[j]=res[j+1];\n\t\t\t\tres[j+1]=temp;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i<=p;i++){\n\t\tprintf(\"%d %d\\n\",res[i].man,res[i].woman);\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38077", "code": "int main(){\nchar num[100]={0}; int i,j,k,m,t;\n gets(num); t=strlen(num);\n for(i=0;i=0;j--)\n if(num[j]==num[0])\n break;\nprintf(\"%d %d\\n\",j,k);\nnum[j]='\\0'; num[k]='\\0';\n } \n }\nreturn 0;\n\n\n\n}"} +{"label": "77", "index": "38078", "code": "int i=0,j=0;\nint a[200];\nchar d;\nint solve()\n{\n char c;\n scanf(\"%c\",&c);\n if(c==d) {\n a[i]=j;\n j++;\n i++;\n solve();\n }\n if(c!=d){\n printf(\"%d %d\\n\",a[i-1],j);\n i--;\n j++;\n if(i==0) return 0;\n solve();\n }\n}\nint main()\n{ \nchar c; \nscanf(\"%c\",&c);\n d=c;\n a[i]=j;\n j++;\n i++;\n solve();\n \n}"} +{"label": "77", "index": "38079", "code": "char a[100000000];\nint n;\nchar e,f;\nint lala(){\n\tint i,j;\n\tif(a[0]=='0')return 0;\n\tfor(i=0;i>a;\n\tn=strlen(a);\n\tfor(int i=1;i=0;k--)\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (a[k]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<= 0; j--)\n\t\tif (c[j] == a) //?????????\n\t\t{\n\t\t\tc[i] = 'Z'; c[j] = 'Z'; //???????????????\n\t\t\tcout << j << ' ' << i << endl; //????\n\t\t\tjs += 2;\n\t\t\tif (js == l) //?????????\n\t\t\t\treturn;\n\t\t\telse\n\t\t\t\tsearch (c); //????\n\t\t}\n}\n\n\t\nint main()\n{\n\tint i;\n\tchar s[201];\n\tcin >> s; //?????\n\tl = strlen (s);\t //????\n\ta = s[0]; //a?????????b????????\n\tfor (i = 1; i <= l - 1; i++)\n\t\tif (s[i] != a)\n\t\t{\n\t\t\tb = s[i];\n\t\t\tbreak;\n\t\t}\n\tsearch (s); //??????????\n\treturn 0;\n\t\n}"} +{"label": "77", "index": "38084", "code": "int main(int argc, char* argv[])\n{\n\tchar s[100],c;\n\tint i,k=0,j,len,p,q,temp0,temp1,w;\n\tint a[50],b[50];\n\tgets(s);\n\tc=s[0];\n\tlen=strlen(s);\n\tfor(p=0;pb[q+1])\n\t\t\t{\n\t\t\t\ttemp0=b[q];\n\t\t\t\tb[q]=b[q+1];\n\t\t\t\tb[q+1]=temp0;\n temp1=a[q];\n\t\t\t\ta[q]=a[q+1];\n\t\t\t\ta[q+1]=temp1;\n\t\t\t}\n\t\t}\n\t}\n\tfor(w=0;wa=getchar();\n\tp1->k=0;\n\thead=NULL;\n\tfor (i=0;;i++)\n\t{\n\t\tn=n+1;\n\t\tif (n==1)\n\t\t\thead=p1;\n\t\telse p2->next=p1;\n\t\tp2=p1;\n\t\tp1=(struct ch *)malloc(LEN);\n\t\tp1->a=getchar();\n\t\tp1->k=n;\n\t\tif (p1->a!='\\n' && p1->a!=boy)\n\t\t\tgirl=p1->a;\n\t\tif (p1->a=='\\n')\n\t\t{\n\t\t\tN=n=n-1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tp2->next=NULL;\n\twhile (n>1)\n\t{\n\t\tp1=p2=head,p3=p2->next;\n\t\twhile (p3!=NULL)\n\t\t{\n\t\t\tif (p2->a==boy && p3->a==girl)\n\t\t\t{\n\t\t\t\tif (p2==head)\n\t\t\t\t{\n\t\t\t\t\tz[t][0]=p2->k,z[t][1]=p3->k,t=t+1;\n\t\t\t\t\tif (p3->next!=NULL)\n\t\t\t\t\t\thead=(head->next)->next,p1=p2=head,p3=p2->next;\n\t\t\t\t\telse\n\t\t\t\t\t\thead=NULL;\n\t\t\t\t\tn=n-2;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tz[t][0]=p2->k,z[t][1]=p3->k,t=t+1;\n\t\t\t\t\tif (p3->next!=NULL)\n\t\t\t\t\t\tp1->next=p3->next,p2=p3->next,p3=p2->next;\n\t\t\t\t\telse\n\t\t\t\t\t\tp1->next=NULL;\n\t\t\t\t\tn=n-2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tp1=p2,p2=p2->next,p3=p2->next;\n\t\t}\n\t}\n\tfor (j=0;jz[i+1][1])\n\t\t\t{\n\t\t\t\ttemp=z[i][0],z[i][0]=z[i+1][0],z[i+1][0]=temp;\n\t\t\t\ttemp=z[i][1],z[i][1]=z[i+1][1],z[i+1][1]=temp;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=0;i>kid;//??\n\tint line=strlen(kid);\n\tint i,j;\n\tchar boy=kid[0];\n\tchar girl=kid[line-1];\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(kid[j]==boy)\n\t\t\t\t{\n\t\t\t\t\tcout<k;p--){\n if(b[p-1]>b[p]){\n temp=b[p-1];\n b[p-1]=b[p];\n b[p]=temp;\n temp=a[p-1];\n a[p-1]=a[p];\n a[p]=temp;\n }\n }\n }\n for(k=0;k= 0; j--)\t\t//????????????????\n\t\t{\n\t\t\tif (intline[j] == 1)\n\t\t\t\tbreak;\n\t\t}\n\t\tintline[i] = 3;\t\t\t\t\t//???????????\n\t\tintline[j] = 3;\n\t\tcout << j << \" \" << i << endl;\n\t\tcount++;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38092", "code": "void main()\n{\n\tchar pupils[100],g;\n\tint i=0,j,k;\n\tgets(pupils);\n\tk=strlen(pupils);\n\tg=pupils[k-1];\n\twhile (i> a;\n\tl = strlen(a);\n\tfor (i = 0; i < l; i++)\n\t{\n\t\tif (a[i] == a[l - 1])\n\t\t{\n\t\t\tfor (j = i - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tif (a[j] == a[0])\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = a[l - 1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\nreturn 0;\n}"} +{"label": "77", "index": "38095", "code": "\nvoid leave(char a[], char b)\n{\n int i,temp;\n if (a[0] == b)\n {\n for (i = 0; a[i] != '\\0'; )\n {\n if (a[i] == b )\n {\n temp = i;\n i++;\n while (a[i] == 0)\n {\n i++;\n }\n if (a[i] != b && a[i] != 0 )\n {\n a[i] = 0;\n a[temp] = 0;\n cout << temp << \" \" << i << endl;\n }\n }\n }\n leave(a,b);\n }\n}\n\nint main()\n{\n char a[100];\n char b;\n cin.getline(a, 100);\n b = a[0];\n leave(a,b);\n return 0;\n}"} +{"label": "77", "index": "38096", "code": "\nvoid bubble(int array[],int n);\nvoid main()\n{\n\tstruct answer\n\t{\n\t\tint girl;\n\t\tint boy;\n\t};\n\tchar test[MAXSIZE]={'\\0'},boy,girl;\n\tint len,i,j,p;\n\tstruct answer ans[MAXSIZE]={0,0},temp;\n\t\n\tscanf(\"%s\",test);\n\tlen=strlen(test);\n\tboy=test[0];\n\tgirl=test[len-1];\n\t\n\tp=0;\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(test[j]==boy)\n\t\t\t\t{\n\t\t\t\t\tans[p].boy=j;\n\t\t\t\t\tans[p].girl=i;\n\t\t\t\t\ttest[i]=girl+boy;\n\t\t\t\t\ttest[j]=girl+boy;\n\t\t\t\t\tp++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(j=1;j<=p;j++)\n\t{\n\t\tfor(i=0;ians[i+1].girl)\n\t\t\t{\n\t\t\t\ttemp=ans[i];\n\t\t\t\tans[i]=ans[i+1];\n\t\t\t\tans[i+1]=temp;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(i=0;i> s;\n\tchar boy=s[0];\n\tfor (i = 0; s[i]; ++i)\n\t\tif (s[i] == boy) a[++n] = i;\n\t\telse cout << a[n--] << \" \" << i << endl;\n\treturn 0;\n}"} +{"label": "77", "index": "38098", "code": "char set[100];\nvoid getBoy(int i,char b,char g){\n\tif(set[i]=='\\0')return;\n\twhile(set[i]!='\\0' && set[i]!=g)++i;\n\tint j=i-1;\n\twhile(j>=0 && set[j]!=b)--j;\n\tcout<>set;\n\tchar b,g;\n\tb = set[0];\n\tg = set[strlen(set)-1];\n\tgetBoy(0,b,g);\n\treturn 0;\n}"} +{"label": "77", "index": "38099", "code": "int out(char str[100],char a,char b)\n{\n if(str[0]=='!') return 1;\n else\n {\n for(int i=0;i=0;j--)\n {\n if(str[j]=='!') continue;\n else\n {\n cout<>line;\n out(line,line[0],line[strlen(line)-1]);\n return 0;\n}\n"} +{"label": "77", "index": "38100", "code": "void fuck(int n);\nint main()\n{\n\tchar c,boy;\n\tint a[100],i=0,j;\n\tboy=cin.get();\n\ta[0]=1;\n\twhile((c=cin.get())!='\\n')\n\t{\n\t\ti++;\n\t\tif(c==boy) a[i]=1;\n\t\telse {\n\t\t\ta[i]=-1;\n\t\t\tj=i-1;\n\t\t\twhile(a[j]!=1) j--;\n\t\t\tcout<> str;\n\tl = strlen(str);\n\tfor ( i = 0; i < 10000; i++)\n\t{\n\t\ta[i] = 0;\n\t}//?????????0??????\n\tc1 = str[0];//???????????????????\n\tfor (i = 0; i < l; i++)\n\t\tif (str[i] != c1)\n\t\t{\n\t\t\tc2 = str[i];\n\t\t\tbreak;\n\t\t}//??????????\n\tfor (i = 0; i < l; i++)\n\t{\n\t\tif (str[i] == c2)//???????????\n\t\t{\n\t\t\tfor (j = i - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tif (str[j] == c1 && a[j] == 0)//????????????????????\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = 1;//???????????1\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38105", "code": "int main()\n{\n\tchar a[110];\n\tint b[110];\n\tint c[110];\n\tchar s1,s2;\n\tint i,j,k,l,m,n,q=0;\n\tcin.getline(a,110);//??\n\tn=strlen(a);\n\ts1=a[0];\n\tfor(i=1;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==s1)//??????\n\t\t\t\t{break;}\n\t\t\t}\n\t\t\tb[q]=j;c[q]=i;//??\n\t\t\tq=q+1;\n\t\t\ta[i]='\\0';a[j]='\\0';//??\n\t\t}\n\n\t}\n\tfor(k=0;k>b;\n\tif(num==0)\n\t\tc=b;\n\tif(b==c)\n\t{\n\t\ta[num]=0;\n\t\tnum++;\n\t\tf();\n\t}\n\tif(b!=c)\n\t{\n\t\ta[num]=1;\n\t\tfor(m=num;;m--)\n\t\t{\n\t\t\tif(a[m]==0&&v[m]==0)\n\t\t\t{\n\t\t\t\tv[m]=1;\n\t\t\t\tcout<> a;\n\tzifu(a);\n\treturn 0;\n} //?????"} +{"label": "77", "index": "38108", "code": "main()\n{\n\tint i,j,k,e,f,*e_point,*f_point,flag;\n\tchar a,b,c[100],z=' ';\n\tgets(c);\n\te_point=&e;\n\tf_point=&f;\n\ta=c[0];b=c[strlen(c)-1];\n\tfor(k=1;k<=strlen(c)/2;k++)\n\t{\n\t\tfor(i=0;i=0;j--)\n\t\t{\n\t\t\t\n\t\t\tif (a[j]==x)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\",j,i);\n\t\t\t\tprintf(\"\\n\");\n\t\t\t\ta[i]='.';a[j]='.';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n result(a);\n\t}\n\t\n}"} +{"label": "77", "index": "38111", "code": "int main()\n{\n\tchar line[150];char girl;\n\tgets(line);\n\t int len=strlen(line);\n\tchar boy=line[0];\n\tfor(int i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(line[j]==boy)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tline[j]=' ';break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tgetchar();\n\tgetchar();\n\treturn 0;\n}\n\t\n"} +{"label": "77", "index": "38112", "code": "int main()\n{\n char ch[100];\n cin>>ch;\n int len=(int)strlen(ch);\n for (int i=0;i')\n {\n int j=i;\n while (ch[j]!='('&&ch[j]!='{'&&ch[j]!='['&&ch[j]!='<')\n j--;\n cout<=n) return;\n\tif (s[p]!=s[0])\n\t\tcout<>s;\n\tn=strlen(s);\n\tdfs(0,-1);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38114", "code": "\nint main()\n{\n\tchar f[10000]={0};\n\tint n,i,j;\n\t\n\tscanf(\"%s\",f);\n\tn=strlen(f);\n\n\tfor(i=1;i=0;j--)\n\t\t\t{\n\t\t\t\tif(f[j]==f[0])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tif(j!=0)\n\t\t\t\t\t\tf[j]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\treturn 0;\n}\n"} +{"label": "77", "index": "38115", "code": "\nchar m[100];\nint num = 0;\nint q = 0;\n\nvoid search(int a, int b, char boy, char girl)\n{\n\tif (num == (b + 1) / 2)\n\t\treturn;\n\tint i, t;\n\tfor (i = a; i < b; i++)\n\t{\n\t\tif (m[i] == boy)\n\t\t{\n\t\t\tfor (t = i + 1; t < b; t++)\n\t\t\t{\n\t\t\t\tif (m[t] != '.')\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (m[t] == girl)\n\t\t\t{\n\t\t\t\tnum ++;\n\t\t\t\tm[i] = '.';\n\t\t\t\tm[t] = '.';\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t}\n\tcout << i << \" \" << t << endl;\n search(a, b, boy, girl);\n}\n\nint main()\n{\n char boy, girl;\n\tint len;\n\tcin >> m;\n\tlen = strlen(m);\n\tboy = m[0];\n\tgirl = m[len - 1];\n\tsearch(0,len - 1, boy, girl);\n\treturn 0;\n}"} +{"label": "77", "index": "38116", "code": "\nint ture(int c[210],int a,int b) //?????????????????? \n{ \n if(c[a]!=1||c[b]!=2) \n {\n return 0;\n }\n int i;\n int sum=0;\n for(i=a;i<=b;i++)\n { sum=sum+c[i];\n }\n if(sum==3)\n { c[a]=0;\n c[b]=0;\n return 1; //?????1? \n }\n else\n { \n return 0; \n }\n}\n\nint main()\n{ char a[210]={0};\n char b;\n int i=0;\n int num;\n int c[210]={0};\n while(1) //????? \n { cin.get(b);\n if(b=='\\n')\n { num=i;\n break;\n } \n else \n { a[i]=b;\n i=i+1;\n }\n }\n \n //???????????1??????2?? \n for(i=0;i=0;j--){\n if(str[j]==c1){\n printf(\"%d %d\\n\",j,i);\n str[i]=' ';\n str[j]=' ';\n break;\n }\n }\n }\n t++;\n }\n//scanf(\"%d\",&k);\nreturn 0;\n}\n"} +{"label": "77", "index": "38118", "code": "\nchar str[100], b, g;\nvoid match(int k)\n{\n\tint i;\n\tif(str[k] == '\\0')\n\t\treturn;\n\tif(str[k] == g)\n\t{\n\t\tstr[k] = '*';\n\t\tfor(i = k - 1; i >= 0; i--)\n\t\t\tif(str[i] == b)\n\t\t\t{\n\t\t\t\tstr[i] = '*';\n\t\t\t\tcout << i << \" \" << k << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\tmatch(k + 1);\n}\n\nint main()\n{\n\tint length;\n\tcin.getline(str,100);\n\tlength = strlen(str);\n\tb = str[0];\n\tg = str[length - 1];\n\tmatch(0);\n\treturn 0;\n}\n\n\n\n\n\t\n"} +{"label": "77", "index": "38119", "code": "void main(){\n\tint i,k,m,s=0,t[51][2];\n\tmemset(t,0,sizeof(t));\n\tchar a[101];\n\tgets(a);\n\tint n=strlen(a);\n\tk=n;\n\tfor(;;){\n\tif(k==1||k==0)break;\n\telse{\n\t\tfor(i=0;it[m][1]){\n\t\t\t\tt[50][0]=t[m][0];t[50][1]=t[m][1];\n\t\t\t\tt[m][0]=t[k][0];t[m][1]=t[k][1];\n\t\t\t\tt[k][0]=t[50][0];t[k][1]=t[50][1];\n\t\t\t}\n\t\t}\n\t}\n\tfor(k=0;kc&&a[x]==b)\n {\n handshake(x-1);\n }\n if(x>c&&a[x]==g)\n { \n \n handshake(x-1);\n for( m=x-1;m>=0;m--)\n {\n if(a[m]==b)\n {\n cout<>a;\n b=a[0];\n for(i=0;i<100;i++)\n {\n if(a[i]!=a[0])\n {\n g=a[i];\n break;\n }\n \n }\n for(i=0;i<100;i++)\n {\n if(a[i]==b||a[i]==g)\n d++;\n }\n for(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==m)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\ta[i]=' ';\n\t\t\t\t\ta[j]=' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38123", "code": "int main()\n{\n\tchar str[110];\n\tcin>>str;\n\tint length;\n\tlength=strlen(str);\n\tint i,j,k=0;\n\tchar b,g;\n\tb=str[0];\n\tfor(i=0;i> a;\n\tlen = strlen(a);\n\tboy = a[0];\n\tgirl = a[len-1];\n work(0,len-1);\n return 0;\n}\n"} +{"label": "77", "index": "38126", "code": "void main()\n{\n\tchar a[100];\n\tint i,j,l,k,b[100];\n\tgets(a);\n l=strlen(a);\n\tfor(i=0;i=0;j--)\n\t\t\t\tif(sta[j]==1)\n\t\t\t\t{\n\t\t\t\t\tcout<>children;\n int i=0,n=strlen(children);\n for(i=0;;i++)\n {\n boy=children[0];\n if(children[i]!=boy) {girl=children[i]; break;}\n }\n for(i=0;i=0;j--)\n {\n if(children[j]==boy)\n {\n cout<> str;\n\tlen = strlen(str);\n\tboy = str[0];\n\tgirl = str[len - 1];\n\tpx(0, boy, girl);\n\treturn 0;\n}\nint px(int xb, char b, char g)\n{\n\tint i, k;\n\tfor (i = xb; i <= len - 1; i++)\n\t{\n\t\twhile (str[xb] == '*') xb++;\n\t\tif (str[xb] == b) \n\t\t{\n\t\t\tstr[xb] = '*';\n\t\t\tk = px(xb + 1, b, g);\n\t\t\tcout << xb << \" \" << k << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (str[xb] == g)\n\t\t\t{\n\t\t\t\tstr[xb] = '*';\n\t\t\t\treturn xb;\n\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38130", "code": "int len;\nchar a[200],b,g;\nint match (int p)\n{\n\tif (p==len-1)\n\t\treturn p;\n\tint q;\n\tif (a[p]==b)\n\t{\n\t\tq=match(p+1);\n\t\tcout<>a;\n\tlen = strlen(a);\n\tb=a[0];\n\tg=a[len-1];\n\tmatch(0);\n}"} +{"label": "77", "index": "38131", "code": "//\n//\t?????\t????\n//\t?????\t?????????????????????????????????????????????\n//\t?????\t?\t? ? ? ?? 1000012733 ?\n//\t?????\t2010 ? 12 ? 31 ?\n//\nvoid line ( char *p, int *q, int len )\n{\n\tint i, j;\n\tfor ( i = 0; i < len; i++ )\n\t{\n\t\tif ( *( p + i ) == *p )\n\t\t{\n\t\t\tfor ( j = i + 1; j < len; j++ )\n\t\t\t{\n\t\t\t\tif ( *( q + j ) == 0 )\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( *( p + j ) != *( p + i ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t\t\t*( q + i ) = 0;\n\t\t\t\t\t\t*( q + j ) = 0;\n\t\t\t\t\t\tline ( p, q, len );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nint main()\n{\n\tchar string[1000];\n\tint sign[1000];\n\tint len, i;\n\tcin.getline ( string, 1000 );\n\tlen = strlen ( string );\n\tfor ( i = 0; i < len; i++ )\n\t{\n\t\tsign[i] = 1;\n\t}\n\tline ( string, sign, len );\n\treturn 0;\n}"} +{"label": "77", "index": "38132", "code": "int main()\n{\n\tchar queue[100];\n\tcin.getline(queue,100);\n\tint i,j;\n\tfor(i=1;i0))\n\t\t\t{\n\t\t\t\tj=j-1;\n\t\t\t}\n\t\t\tcout<=0;i--)\n\t\tif(s[i]==s[0])\n\t\t{\n\t\t\tq = i;\n\t\t\tbreak;\n\t\t}\n\tcout << q << \" \" << p << endl;\n\ts[q] = s[p] = 0;\n\tLoop(s,n);\n}\nint main()\n{\n\tint n, i;\n\tchar s[MAXN];\n\tcin >> s;\n\tn = strlen(s);\n\tLoop(s,n);\n\treturn 0;\n}"} +{"label": "77", "index": "38134", "code": "int main()\n{\n int i,j,A[80]={0};\n int k=1;\n char s[80];\n gets(s);\n for(i=0;s[i]!='\\0';i++)\n {\n if(s[i]==s[0])\n {\n A[k]=i;\n k++;\n }\n if(s[i]!=s[0])\n {\n printf(\"%d %d\\n\",A[k-1],i);\n k--;\n }\n }\n return 0;\n}\n"} +{"label": "77", "index": "38135", "code": "int main()\n{\n\tchar team[100]={'\\0'};\n\tchar b,g;\n\tint i,j,num=0,emnum=0,n;\t\t\t\t\t\t\t\t\t\n\tcin.getline(team,100);\n\tb=team[0];\n\tfor (i=0;i<100;i++)\n\t\tif (team[i]!=b)\n\t\t{\n\t\t\tg=team[i];\n\t\t\tbreak;\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tfor (i=0;i<100;i++)\n\t\t\tif (team[i]!='\\0')\n\t\t\t\tnum++;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tfor (n=1;n<=num/2;n++)\n\t\t{\n\t\t\tfor (i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==boy)\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ta[i]='0';a[j]='0';\n\t\t\tcout<0)\n\t\tresult(a,remain);//?????????????????????????\n}\n\n\nint main()\n{\n\tint i;\n\tchar a[100];\n\tcin.getline(a,100);\n\tl=strlen(a);\n\tboy=a[0];\n\tfor(i=1;i>c;\n\t\tif (indexx==0)\n\t\t\tboy=c;\n\t\telse\n\t\t\tif (girl=='\\0' && c!=boy)\n\t\t\t\tgirl=c;\n\t\tif (c==girl)\n\t\t{\n\t\t\treturn indexx;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tind=indexx;\n\t\t\tm=slv();\n\t\t\tcout<>child;\n total=strlen(child);\n boy=child[0];\n girl=child[total-1];\n for(i=0;i<=total-1;i++)flag[i]=i;\n departure();\n\n return 0;\n\n\n}\n void departure()\n{\n if(total==0)return;\n else\n {\n for(i=1;i<=total-1;i++)\n {\n\n if(child[i]==girl&&child[i-1]==boy)\n {\n cout<=0;j--)\n\t{\n\t\tif(str[j]==a)\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\tstr[i]='*';\n\t\t\tstr[j]='*';\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\tcontinue;\n\t}\n\treturn f(m-1,a,b);\n}\nint main()\n{\n\tscanf(\"%s\",str);\n\tn=strlen(str);\n\tf(n/2,str[0],str[n-1]);\n\treturn 0;\n}"} +{"label": "77", "index": "38141", "code": "void main()\n{\n char text[101],c,d;int i,j,k,a[51],b[51],n,x=0;\n gets(text);c=text[0];n=strlen(text);\n for(i=0;i=0;j--) \n if(text[j]==c) {a[x]=i;b[x]=j;x++;text[i]='q';text[j]='q';break;}\n }\n for(i=0;i0;n++)\n{\n scanf(\"%c\",&ch);\n if(ch==boy){\n st[sp]=n;\n sp++;\n }\n else{\n sp--;\n printf(\"%d %d\\n\",st[sp],n);}\n }\n return 0;\n}\n"} +{"label": "77", "index": "38144", "code": "\n\nconst int N = 110 ;\n\nint q[N] ;\nchar str[N], a ;\n\nint main ()\n{\n scanf (\"%s\", str) ;\n for (int i = 0, t = 0; i < strlen (str); i ++ )\n if (str[i] == str[0])\n q[ ++ t] = i ;\n else printf (\"%d %d\\n\", q[t -- ], i) ;\n return 0 ;\n}\n"} +{"label": "77", "index": "38145", "code": "char c[1000],b,g;\nint l;\nvoid game(){\n\tfor(int i=0;i=0;k--){\n\t\t\t\t\t\tif(c[k]==b){\n\t\t\t\t\t\t\ti=k-1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(c[0]!=' ')game();\n}\nint main(){\n\tcin>>c;\n\tl=strlen(c);\n\tb=c[0];\n\tfor(int i=0;i'))\n {\n b[m]=i;c[m]=i+j;m++;\n a[i]='\\0';\n a[i+j]='\\0';\n }\n }\n j=j+2;\n }\n for(i=0;ic[j+1]){t=c[j];c[j]=c[j+1];c[j+1]=t;t=b[j];b[j]=b[j+1];b[j+1]=t;}\n for(i=0;i=0;n--)\n\t\t\t{\n\t\t\t\tif(t[n]==d)\n\t\t\t\t{\n\t\t\t\t\tt[n]=0;\n\t\t\t\t\t*p=n;break;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t}\n\t}\n}\nmain()\n{\n\tchar a[100],b[50],c[50],*p,*q,*t;\n\tint i,j;\n\tp=b;q=c;t=a;\n\tfor(i=0;i<100;i++)\n\t{\n\t\tscanf(\"%c\",&a[i]);\n\t\tif(a[i]==10) break;\n\t}\n\td=a[0];e=a[i-1];\n\tfor(j=0;j> a;\n\tint blank1[100];\n\tint blank2[100];\n\tmemset(blank1,-1,99 * sizeof(int));\n\tmemset(blank2,-1,99 * sizeof(int));\n\tint w = 0,j = 0;\n\tfor (;w < 100;w++)\n\t{\n\t\tif(a[w] != a[0])\n\t\t{\n\t\t\tblank1[j] = w;\n\t\t\tblank2[w] = j;\n\t\t\tj++;\n\t\t}\n\t}\nif(j == 0)cout << j;\nint i = 0;\n\tfor (;i < j; i++)\n\t{\n\t\tcout << play(blank1[i],blank1,blank2,0) << ' ' << blank1[i] <> str;\n\tlength = strlen(str); //???????? \n\ta = str[0];\n\tb = str[length - 1]; //????????a,b \n\tfor(i = 1; i <= length - 1; i++)\n\t{\n\t\tif(str[i] == b) \n\t\t{\n\t\t\tj++; \n\t\t\tflag[j] = i;\t\n\t\t}\t\n\t}\n\tk = j; //???????k \n\tf(str , 1); \n\treturn 0;\n}\t\nvoid f(char s[] , int l)\n{\n\tif(l <= k)\n\t{\n\t\tfor(i = flag[l]; i >= 0; i--) \n\t\t{\n\t\t\tif(s[i] == a)\n\t\t\t{\n\t\t\t\tcout << i << \" \" << flag[l] << endl; //???????????????? \n\t\t\t\ts[i] = '\\0';\n\t\t\t\ts[flag[l]] = '\\0';\t //?? \n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\t\n\t\tf(s , l + 1); //?? \n\t} \n\telse\n\treturn ;\n}\n"} +{"label": "77", "index": "38153", "code": "int main()\n{\n\tchar str[100];\n\tint a[100],i,j,n;\n\tscanf(\"%s\",str);\n\tn=strlen(str);\n\tfor(i=0;i<=n-1;i++)\n\t{\n\t\tif(str[i]!=str[0])a[i]=100+i;\n\t\telse a[i]=i;\n\t}\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tif(a[i-1]<100&&a[i]>100)\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",a[i-1],a[i]-100);\n\t\t\tfor(j=i-1;j<=n-3;j++)a[j]=a[j+2];\n\t\t\ti=0;\n\t\t}\t\n\t}\n}\n"} +{"label": "77", "index": "38154", "code": "char str[100]={0},p1,p2;\nint p[100]={0},i,j,len,n1,n2,n=0;\nvoid rank()\n{\n\tfor(i=0;i=0;j--){\n\t\t\t\tif((p[j]!=2)&&(p[j]!=3))\n\t\t\t\t\tbreak;}\n\t\t\t\t\tn2=j;\n\t\t\t\t\tp[n2]=3;\n\t\t\t\t\n\t\t\t\n\tcout<>str;\n\tlen=strlen(str);\n\tp1=str[0];\n\tfor(i=0;i=0;k--)\n {\n if(a[k]>=0) \n {printf(\"%d %d\\n\",a[k],i);a[k]=-1;break;} \n } \n } \n } \n}"} +{"label": "77", "index": "38156", "code": "\nvoid f(char a[], int l,char girl, char boy)\n{\n\tif(a[0]!='.')\n\t{\n\t\tint i,j;\n\t\tfor(i=1;i=0;j--)\n\t\t\t\t{\n\t\t\t\t\tif(a[j]==boy)\n\t\t\t\t\t{a[j]='.';\n\t\t\t\t\t printf(\"%d \", j);\n\t\t\t\t\t j=-1;}\n\t\t\t\t}\n\t\t\t\tprintf(\"%d\\n\", i);\n\t\t\t\tf(a,l,girl,boy);\n\t\t\t\ti=l;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid main()\n{\n\tchar a[100];\n\tgets(a);\n\tint l;\n\tl=strlen(a);\n\tf(a,l,a[l-1],a[0]);\n}\n"} +{"label": "77", "index": "38157", "code": "/*??????????????????????????????????????????????????????????????????????????0?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????100*/\nint main()\n{\n\tvoid ls(char c[],char,char);//????????????\n\tchar c[101]={'\\0'};\n\tcin.getline(c,101);\n\tchar t1,t2;//??????????????\n\tt1=c[0];\n\tfor(int i=0;i<101;i++)\n\t\tif(c[i]!=c[0])\n\t {t2=c[i];break;}\n\tls(c,t1,t2);\n\treturn 0;\n}\n\nvoid ls(char c[],char t1,char t2)\n{\n\tint i,j;\n\tif(c[0]!=' ')\n\t{\n\t\tfor(i=0;c[i]!='\\0';i++)\n\t {\n\t\t\tif(c[i]==t2)//?????\n\t\t\t{\n\t\t\t\tfor(j=i-1;j>=0;j--)//?????????\n\t\t\t {\n\t\t\t\tif(c[j]==t1)\n\t\t\t\t{cout<0 && sum>1 && stack[tot]==s && f==stack[tot-1])\n\t\t{ \n\t\t\tgirl[++pair]=num[tot--];\n\t\t\tboy[pair]=num[tot--];\nprintf(\"%d %d\\n\",boy[pair],girl[pair]);\n\t\t}\n\t}\n\tsort(boy,girl,pair);\n\tfor (i=0;i=0;j--){\n\t\t\t\tif(b[j]==nan){\n\t\t\t\t\tk=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tb[i]=0;\n\t\t\tb[k]=0;\n\t\t\tprintf(\"%d %d\\n\",k,i);\n\t\t\tbreak;\n\t\t}\n\t}\n\t}\n}\n\n"} +{"label": "77", "index": "38163", "code": "int main ()\n{\n\tchar c[200],p,q;\n\tint i,j,k,n,a[100],b[100];\n\twhile(cin>>c)\n\t{\n\tn=strlen(c);\n\tk=0;\n\tp=c[0];\n\tq=c[n-1];\n\tfor(i=0;c[i]!='\\0';i++)\n\t\tif(c[i]==q)\n\t\t\tfor(j=i-1;j>=0;j--)\n\t\t\t{\n\t\t\t\tif(c[j]!=p&&c[j]!=q)\n\t\t\t\t\tcontinue;\n\t\t\t\telse if(c[j]==p)\n\t\t\t\t{\n\t\t\t\t\ta[k]=j;\n\t\t\t\t\tb[k]=i;\n\t\t\t\t\tc[i]='o';\n\t\t\t\t\tc[j]='o';\n\t\t\t\t\tk++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(c[j]=='(')\n\t\t\t\t\tbreak;\n\t\t\t}\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(c[j]==boy)\n\t\t\t\t{\n\t\t\t\t\tcout<0)\n\t\tmatch(c,left);\n}\nint main()\n{\n\tchar str[100];\n\tcin.getline(str,100);\n\tboy=str[0];\n\tl=strlen(str);\n\tgirl=str[l-2];\n\tmatch(str,l);\n\treturn 0;\n}"} +{"label": "77", "index": "38165", "code": "\nint a[100];\nint n; //:n???????n1??????\nint n1;\nint main()\n{\n\tvoid digui(int);\n\tchar str[100];\n\tcin>>str;\n\tn=strlen(str);\n\tn1=n;\n\n\tfor (int i1=0;str[i1]!='\\0';i1++)\n\t{\n\t\tif ( str[i1]==str[0]) //:????1?????0?????-1\n\t\t\ta[i1]=1; \n\t\telse a[i1]=0;\n\t}\n\n\tdigui(n); //:?n??????\n\treturn 0;\n}\n\n\nvoid digui(int n)\n{\n\tint count=0;\n\tint t=0;\n\tif ( n==2) //:??2?????????\n\t{\n\t\tfor (int i=0;i0)\n\t\t\t{\n\t\t\t\tcout<2) //:?????????????????????????-1\n\t{\n\t\tfor (int i=0;i> str;\n\tfor(i = 1; ; i++)\n\t{\n\t\tif(str[i] != str[0])\n\t\t{\n\t\t\tk = i; break;\n\t\t}\n\t}\n\tfor(i = 0; str[i] != '\\0'; i++)\n\t{\n\t\tl++;\n\t} \n\tj = 0;\n\tp = 0;\n\tfor(i = 0; i < l; i++)\n\t{\n\t\tif(str[i] == str[0])\n\t\t{\n\t\t\tnan++;\n\t\t nan1[j++] = i;\n\t\t}\n\t\tif(str[i] == str[k])\n\t\t{\n\t\t\tnv++;\n\t\t\tnv1[p++] = i;\n\t\t}\n\t}\n\tpai();\n\treturn 0;\n}\nvoid pai()\n{\n\ti = 0;\n\tj = 0;\n\tp = 0;\n\tfor(i = 0; str[i] != '\\0'; i++)\n\t{\n\tif(str[i] == str[0])\n\t{\n\t\tnan2[j] = 1;\n\t j++;\n\t}\n\tif(str[i] == str[k])\n\t{\n\t\tfor(q = j; q >= 0 ; q--)\n\t\t{\n\t\t\tif(nan2[q])break;\n\t\t}\n\t cout << nan1[q] << ' ' << nv1[p] << endl;\n\t\tp++;\n\t\tnan2[q] = 0;\n\t}\n\t}\n}"} +{"label": "77", "index": "38167", "code": "int paidui(int i,char a[110],int l)//????,i??????,l???????\n{\n\tint j;\n\tif(a[i]==a[0]&&iout[j].girl)\n\t\t\t{\n\t\t\t\ttmp.boy=out[i].boy;\n\t\t\t\ttmp.girl=out[i].girl;\n\t\t\t\tout[i].boy=out[j].boy;\n\t\t\t\tout[i].girl=out[j].girl;\n\t\t\t\tout[j].boy=tmp.boy;\n\t\t\t\tout[j].girl=tmp.girl;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=0;i= 0; j--) \n if(p[j] == 0)\n {\n cout<=0;j--)\n\t\t{\n\t\t if(str[j]==a)\n\t\t\t {\n\t\t\t\t\t\n\t\t\t cout<=0;i--)\n {\n a=0;b=0;\n if(c[i]!=sex)\n {\n for(j=i;j>=0;j--)\n {\n if(c[j]==sex)\n {\n a++;\n }\n else\n {\n\t\t\t\t\t b++;\n\t\t\t\t }\n if(a==b)\n {\n x[k]=j;\n y[k]=i;\n k++;\n break;\n }\n } \n } \n }\n for(i=k-1;i>=0;i--)\n {\n printf(\"%d %d\\n\",x[i],y[i]);\n }\n scanf(\"%d\",&n); \n return 0;\n}"} +{"label": "77", "index": "38174", "code": "void paidui(char str [])\n{\n\tint i=0,k=0;\n\tfor(i=1;i=0;k--)\n\t\t\t{\n\t\t\t\tif(str[k]==str[0])\n\t\t\t\t{\n\t\t\t\t\tcout<> c;\n\tm = c[0];\n\tlc = strlen(c);\n\tque(0, 1);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38176", "code": "int main()\n{\n\tint i=0,j=0,len,a,b;\n\tchar str[101],boy;\n\tgets(str);\n\tlen=strlen(str);\n\tboy=str[0];\t\t\n\tfor(i=0;i0;j--)\n\t\t\t{\n\t\t\t\tif(str[j]==boy)break;\n\t\t\t}\n\t\t\tstr[j]='0';\n\t\t\ta=j;b=i;\n\t\t\tprintf(\"%d %d\\n\",a,b);\n\t\t}\n\t\telse continue;\n\t}\n\treturn 0;\n}\n\t\t\t\t\t\n "} +{"label": "77", "index": "38177", "code": "void change(char str[],char w,char m)\n{\n\tint ctr=0,ctr1=0;\n\tfor (ctr=0;str[ctr+1]!='\\0';ctr++)\n\t{ if(str[ctr]==w)continue;\n\t\tfor(ctr1=ctr+1;ctr1> a;\n\tn=a[0];\n\tfor ( i=1; i= 0; j-- )\n\t\t\t\t\tif ( a[j] == n )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << j << ' ' << i << endl;\n\t\t\t\t\t\t\ta[j]=' ';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t}\n\n\treturn 0;\n}"} +{"label": "77", "index": "38179", "code": "int lefts(char *,char *);\nchar boy,girl;\nint main()\n{\n\tchar children[105]={'\\0'};\n\tint i,left,right,sum;\n\tcin>>children;\n\tsum=strlen(children);\n\tboy=children[0];\n\tgirl=children[sum-1];\n\tfor(i=0;i=0;k--)\n\t\t\t{\n\t\t\t\tif (c[k]==a) nan++;\n\t\t\t\telse if (c[k]==b) nv++;\n\t\t\t\tif (nan==nv) \n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",k,i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"label": "77", "index": "38181", "code": "/*\n??\n??????????????????????????????????????????????????????????????????????????0????\n??????????????????????????????????????????????????????????????????????????????\n????????????????????????????????????????????????????????????\n?????????????????????????????????????????????\n???????????????????????????????????????????????\n\n????\n???????????????????????????????????????????????????????????????\n\n????\n????????????????????????????????????????????????????\n\n????\n((()(())())(()))\n\n????\n2 3\n5 6\n4 7\n8 9\n1 10\n12 13\n11 14\n0 15\n\n??\n????????????????????\u0093(\u0094 ? \u0093)\u0094 ?????? \u0093(\u0094 ????????? \u0093)\u0094 ?????????????? \u0093(\u0094 ??? \u0093)\u0094 ???????????????? \n\n?????????????\n\n*/\n\n\nvoid output(char a[],char m,char f)\n{\n\tint i=0,k,outa,outb;\n\twhile(a[i]!='\\0')\n\t{\n\t\tif (a[i]!=f) i++;\n\t\telse\n\t\t{\n\t\t\toutb=i;\n\t\t\twhile (a[i]!=m) i--;\n\t\t\touta=i;\n\t\t\tcout<>a;\n\tm=a[0];\n\twhile(1)\n\t{\n\t\tif (a[t]==m) t++;\n\t\telse\n\t\t{\n\t\t\tf=a[t];\n\t\t break;\n\t\t}\n\t}\n\toutput(a,m,f);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38182", "code": "\nint function(char* a,int m,char k)//??a[m]?'('\n{\n\tint t=m;\n\twhile(a[t+1]!=0)\n\t{\n\t\tif(a[t+1]!=k)\n\t\t{\n\t\t\tcout<>a;\n\tint n=-1;\n\tk=a[0];\n\twhile(a[n+1]!=0)\n\t{\n\t\tn=function(a,n+1,k);\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38183", "code": "char x,y;\nint main()\n{\n\tint i;\n\tvoid result(char a[]);\n\tchar line[200];\n\tscanf(\"%s\",line);\n\tx=line[0];\n\tfor(i=0;i<=strlen(line)-1;i++)\n\t{\n\t\tif(line[i]!=x) \n\t\t{y=line[i];\n\t\tbreak;}\n\t}\n result(line);\n\t\n\treturn 0;\n}\nvoid result(char a[])\n{\n if((a[0]!='.')&&(a[strlen(a)-1]!='.'))\n\t{\n\tint i,j;\n\tfor(i=1;i<=(strlen(a)-1);i++)\n\t{\n\t\tif(a[i]==y)\n\t\t{\n\t\tfor(j=i-1;j>=0;j--)\n\t\t{\n\t\t\tif(a[j]==y) break;\n\t\t\telse if (a[j]==x)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\",j,i);\n\t\t\t\tprintf(\"\\n\");\n\t\t\t\ta[i]='.';a[j]='.';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n result(a);\n\t}\n\t\n}\n"} +{"label": "77", "index": "38184", "code": "int main()\n{\n char s[400],c1;\n int top=0,i,j,k,m,n,a[100];\n gets(s);\n c1=s[0];\n for (i=0;i=0;j--)\n\t\t{\n\t\t\tif(line[j]==boy)\n\t\t\t{\n\t\t\t\t//printf(\"%d %d\\n\",i,j); //debug\n\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\tline[j]=' ';\n\t\t\t\tbreak; //????????????????else?????bug?\n\t\t\t}\n\t\t}\n\t}\n\tmatch(i+1,l);\n\treturn 0;\n}\nint main()\n{\n\tint l;\n\tint i;\n\tscanf(\"%s\",line);\n\tl=strlen(line);\n\tboy=line[0]; //????????????\n\tfor(i=1;i=0;k--)\n\t\t\t{\n\t\t\t\tif(a[k]==' ')\n\t\t\t\t\tcontinue;\n\t\t\t\telse if(a[k]==boy)\n\t\t\t\t{\n\t\t\t\t\ta[i]=' ';\n\t\t\t\t a[k]=' ';\n\t\t\t\t printf(\"%d %d\\n\",k,i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}\n\n\n\n"} +{"label": "77", "index": "38188", "code": "void f(char s[100]);\nint main()\n{\n\tchar str[100];//??????\n\tcin.getline(str,100);//?????\n\tf(str);//????\n\treturn 0;\n}\nvoid f(char s[100])\n{\n\tint i,j=1;\n\tint l=strlen(s);//????\n\tfor(i=0;i=0;k--)\n\t\t\t\t{\n\t\t\t\t\tif(a[k]==x)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[k]=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<(n/2);j++)\n\t{\n\t\tfor(i=0;i> a;\n\tlength = strlen(a); \n\tm = a[0]; //??????\n\tsolve();\n\tpaixu();\n\treturn 0;\n}\nvoid solve ()\n{\n\tint i,j;\n\tfor (i=0;i b[i+1][1])\n\t\t\t{\n\t\t\t\ttemp = b[i+1][1];\n\t\t\t\tb[i+1][1] = b[i][1];\n\t\t\t\tb[i][1] = temp;\n\t\t\t\ttemp = b[i+1][0];\n\t\t\t\tb[i+1][0] = b[i][0];\n\t\t\t\tb[i][0] = temp;\n\t\t\t}\n\t\t}\n\t} //?????\n\tfor (i=0;i>a;\n\tb=a[0];\n\tlen=strlen(a);\n\tcount=len/2;\n\tfor(i=1;i<=len-1;i++)\n\t{\n\t\tif(a[i]!=b)\n\t\t{\n\t\t\tg=a[i];break;\n\t\t}\n\t}\n\tfor(j=0;j<=len-1;j++)\n\t{\n\t\t\tif(a[j]==g)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tfor(k=j-1;k>=0;k--)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(a[k]=='o')\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(a[k]==b)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<>line;\n\tpaidui();\n\treturn 0;\n}"} +{"label": "77", "index": "38196", "code": "int main()\n{\n\tchar s[101];\n\tchar temp[101][2];\n\tchar t;\n\tint len,i,j,top=-1;\n\tmemset(temp,0,sizeof(temp));\n\tgets(s);\n\tlen = strlen(s);\n\ti=0;\n\tdo\n\t{\n\t\twhile(s[i]==s[0]&&s[i])\n\t\t{\n\t\t\ttop++;\n\t\t\ttemp[top][1] = s[i];\n\t\t\ttemp[top][2] = i;\n\t\t\ti++;\n\t\t}\n\t\tprintf(\"%d %d\\n\",temp[top][2],i);\n\t\ttop--;\n\t\ti++;\n\t\n\t}while(top!=-1&&s[i]);\n\n\treturn 0;\n}\n"} +{"label": "77", "index": "38197", "code": "int a[10000]={1};\nint num;\nint cal(int a[]);\nint main()\n{\n\tchar x,y;\n\tint k;\n\tscanf(\"%c\",&x);\n\tfor(k=1;k<=10000;k++)\n\t{\n\t\tscanf(\"%c\",&y);\n\t\tif(y=='\\n')\n\t\t{\n\t\t\ta[k]=-1;\n\t\t\tnum=k;\n\t\t\tbreak;\n\t\t}\n\t\tif(x==y) a[k]=1;\n\t\telse a[k]=0;\n\t}\n\tcal(a);\n\treturn 0;\n}\n\nint cal(int a[])\n{\n\tint i,j;\n\tif(a[0]==-1)\n\t\treturn 0;\n\telse\n\t{\n\t\tfor(i=0;i<=num;i++)\n\t\t{\n\t\t\tif(a[i]==0)\n\t\t\t{\n\t\t\t\tfor(j=i;j>=0;j--)\n\t\t\t\t{\n\t\t\t\t\tif(a[j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\t\ta[i]=-1;\n\t\t\t\t\t\ta[j]=-1;\n\t\t\t\t\t\tcal(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38198", "code": "// ????,remain??????????\n// flag????????\nvoid que(char c[100], int remain,\n\t\t char boy, char girl, int flag) \n{\n\tint i;\n\tfor(; c[flag] != girl; flag++); // ????????????\n\tfor(i = flag; c[i] != boy; i--); // ???????\n\tc[i] = 0; // ?????0\n\tc[flag] = 0;\n\tcout << i << \" \" << flag << endl; // ??\n\tremain -= 2;\n if(remain) // ???????\n\t\tque(c, remain, boy, girl, flag);\n}\n\nint main()\n{\n\tchar c[100];\n\tchar boy, girl;\n\tint remain;\n\tcin >> c;\n\tremain = strlen(c); // ???\n\tboy = c[0]; // ????????\n\tgirl = c[remain - 1];\n\tque(c, remain, boy, girl, 0); // ?flag?0?????\n\treturn 0;\n}\n\n\n"} +{"label": "77", "index": "38199", "code": "int main()\n{\n\tchar a[200];\n\tint judge[200]={0};\n\tchar boy,girl;\n\tint i,j,last,num=0;\n\tscanf(\"%s\",a);\n\tboy=a[0];\n\tlast=0;\n\tgirl=a[strlen(a)-1];\n\twhile(num!=(strlen(a)+1)/2)\n\t{\n\t\ti=1;\n\t\twhile(num!=(strlen(a)+1)/2)\n\t\t{\n\t\tif(a[last+i]==boy&&judge[last+i]==0) {last++;break;}\n\t\telse if(a[last+i]==girl&&judge[last+i]==0) \n\t\t{printf(\"%d %d\\n\",last,last+i);judge[last]=1;judge[last+i]=1;\n\t\twhile(judge[last]!=0)\n\t\tlast--;\n\t\tnum++;break;}\n\t\telse i++;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38200", "code": "\nint qianshou(char children[],int sign[],int num,int time)\n{\n int i=1;int j;int k;\n for(;i> a;\n\tl=strlen(a);\n\tb=a[0];\n\tg=a[l-1];\n\tint j;\n\tfor(i=0;i=0;j--)\n\t\t\tif(a[j]==b)\n\t\t\t{\n\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\ta[j]=0;a[i]=0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38202", "code": "char dui[1000];\nint i = -1, p = 0, flag[100];\nvoid rankgame(int s)\n{\n\tif(i + 1 == p && p != 0)return;\n\tcin.get(dui[s]);\n\ti ++;\n\tif(dui[s] != dui[0])\n\t{\n\t\tcout << flag[s - 1] << ' ' << i << endl;\n\t\tp = p + 2;\n\t\trankgame(s - 1);\n\t}\n\telse\n\t{\n\t\tflag[s] = i;\n\t\ts ++;\n\t\trankgame(s);\n\t}\t\n}\n\n\nint main()\n{\n\trankgame(0);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38203", "code": "int main()\n{\n\tchar line[100], boy, girl;\n\tint i, j, l, k=0, m, n=0, numb[100]={0}, numg[100]={0};\n\tscanf(\"%s\", line);\n\tl = strlen(line);\n\tboy = line[0];\n\tfor(i=0;i= 0; j--)\n\t\t\t\tif(ren[j] == a)\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\tren[i] = 0;\n\t\t\t\t\tren[j] = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n}\nint main()\n{\n\tcin.getline(ren,100);\n\tlen = strlen(ren);\n\ta = ren[0];\n\tb = ren[len - 1];\n\trun(ren);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38208", "code": "char str[100];\nint sex[100]={0}, flag[100]={0};\nint requeue(int n)\n{\n\tif(n==0)\n\treturn 0;\n int i, t, l;\n\tfor(i=0;iout[j].girl)\n\t\t\t{\n\t\t\t\tmin = out[j].girl;\n\t\t\t\tminum = j;\n\t\t\t}\n\t\t}\n\t\tif(minum - i)\n\t\t{\n\t\t\ttemp = out[i];\n\t\t\tout[i] = out[minum];\n\t\t\tout[minum] = temp;\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38210", "code": "\nchar s[255],b;\n\nvoid solve(int l, int r)\n{\nint c=0, i=l+1, j=l+1;\nwhile (i0);\n solve(j,i-1);\n j=i;\n}\nprintf(\"%d %d\\n\", l, r);\n}\n\nint main()\n{\nint l;\nscanf(\"%s\", s);\nb=s[0];\nl=strlen(s)-1;\nif (l%2 == 0) l--;\nsolve(0, l);\nreturn 0;\n}\n"} +{"label": "77", "index": "38211", "code": "void main()\n{\n char a[1000];\n gets(a);\n int n;\n n=strlen(a);\n int b[n];\n int i=0,j=0,c=0,k=0;\n while(i> str;\n\tint len,i,j;\n\tlen = strlen(str);\n\ta = str[0];\n\tb = str[len - 1];\n\tfor (i = 0;i < len;i++)\n\t\tfor (j = i - 1;j >= 0;j--)\n\t\t{\n\t\t\tif (str[i] == b && str[j] == a)\n\t\t\t{\n\t\t\t\tcout << j << ' ' << i << endl;\n\t\t\t\tstr[j] = b;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38213", "code": "\nchar b,g,chr[100];\nstruct\n\t{\n\t\tint num,t;\n\t\tchar s;\n\t}ch[100];\n\nvoid chulie(int a)\n{\n\tint k,m,n;\n\tif ((ch[a].s==g) && ch[a].t!=0 )\t\n\t{\n\t\tfor (k=a-1;k>=0;k--)\n\t\t{\n\t\t\tif (ch[k].s==b && ch[k].t!=0)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",ch[k].num,ch[a].num);\n\t\t\t\tch[k].t=0;\n\t\t\t\tch[a].t=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (chr[a+1]!='\\0')\n\t\tchulie(++a);\n}\nint main()\n{\n\t\n\tint nb,ng,i,j,k,l,m;\n\tscanf(\"%s\",chr);\n\tb=chr[0];\n\tfor (i=0;chr[i]!='\\0';i++)\n\t{\n\t\tch[i].num=i;\n\t ch[i].t=1;\n\t\tch[i].s=chr[i];\n\t}\n\tfor (i=0;chr[i]!='\\0';i++)\n\t{\n\t\tif (chr[i]!=b)\n\t\t{\n\t\t\tg=chr[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tchulie(i);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38214", "code": "int flag = 0;\nvoid f(int i, int j, char str[], char ch)\n{\n\tif (flag == 1)\n\t{\n\t\treturn;\n\t}\n\tif (i < 0)\n\t{\n\t\tf(j, j + 1, str, ch);\n\t}\n\tif (str[i] == str[0])\n\t{\n\t\tif (str[j] == ch)\n\t\t{\n\t\t\tcout << i << \" \" << j << endl;\n\t\t\tif (str[j + 1] == '\\0')\n\t\t\t{\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t\tstr[i] = str[j] = ' ';\n\t\t\tf(i - 1, j + 1, str, ch);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tf(j, j + 1, str, ch);\n\t\t}\n\t}\n\telse\n\t{\n\t\tf(i - 1, j, str, ch);\n\t}\n}\nint main()\n{\n\tchar str[200], ch;\n\tint i, a = 0;\n\tcin >> str;\n\tfor (i = 0; str[i] != '\\0'; i++)\n\t{\n\t\tif (str[i] != str[0])\n\t\t{\n\t\t\tch = str[i];\n\t\t\tf (i - 1, i, str, ch);\n\t\t\treturn 0;\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38215", "code": "\nchar a[1000];\nint n;\n\nint xx (int k)\n{\n int x,y;\n x=k;\n y=k+1;\n while (a[y]==a[x])\n y=xx(y);\n cout <>child;\n\ta=child[0];\n\tint i=0,j=0;\n\twhile (child[0]!=0)\n\t{\n\t\tif (child[i]!=a&&child[i]!=0)\n\t\t{\n\t\t\tfor (j=i-1;j>=0;j--)\n\t\t\t\tif (child[j]==a)\n\t\t\t\t{\n\t\t\t\t\tcout <>a;\n len = strlen(a);\n boy=a[0];\n for(int i=0;i<100;i++)\n {\n if(a[i]!=boy)\n {\n girl = a[i];\n break;\n }\n }\n //take_hand(a,0);\n for(int i=0;i0;j--)\n {\n if(a[j]==boy)\n {\n cout<=0;j--)\n\t\t\t{\n\t\t\t\tif (c[j]=='1')\n\t\t\t\t\tcontinue;\n\t\t\t\tif (c[j]==c[count-1])\n\t\t\t\t{\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (c[j]==c[0])\n\t\t\t\t{\n\t\t\t\t\tcout<=0;i--)\n\t\t\t{\n\t\t\t\tif(str[i]==sex)\n\t\t\t\t{\n\t\t\t \tcout<= 0; j-- ) //??????????????\n\t{\n\t\tif( xiao[j] == '(' )\n\t\t{\n\t\t\tn = j;\n\t\t\txiao[j] = '.';\n\t\t\tbreak;\n\t\t}\n\t}\n\tcout << n << \" \" << m << endl; //????\n\tif( k < length )\n\t{\n\t\tzhao( length );\n\t}\n}\nint main()\n{\n\tint length;\n\tint i;\n\tcin.getline( xiao, 101 ); //?????\n\tlength = strlen( xiao );\n\tfor( i = 1; i < length; i++ )\n\t{\n\t\tif( xiao[i] == xiao[0] )\n\t\t{\n\t\t\txiao[i] = '('; //????????\n\t\t}\n\t\telse\n\t\t{\n\t\t\txiao[i] = ')';\n\t\t}\n\t}\n\txiao[0] = '(';\n\tzhao( length ); //????\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38223", "code": "void couple(char a[],int b[],char x,char y)\n{\n\tint i,j,z=0;\n\tfor(i=0;a[i]!='\\0';i++)\n\t\tif(b[i]==0)\n\t\t{\n\t\t\tz=1;\n\t\t\tbreak;\n\t\t}\n\tif(z==1)\n\t\tfor(i=0;a[i]!='\\0';i++)\n\t\t\tif(a[i]==y&&b[i]==0)\n\t\t\t\tfor(j=0;j>a;\n\tx=a[0];\n\tfor(i=0;a[i]!='\\0';i++)\n\t{\n\t\tb[i]=0;\n\t\tif(a[i]!=x)\n\t\t{\n\t\t\ty=a[i];\n\t\t}\n\t}\n\tcouple(a,b,x,y);\n\treturn 0;\n}"} +{"label": "77", "index": "38224", "code": "\nvoid main ()\n{\n\tchar ch[100];\n\tchar male;\n\tint i;\n\tint len;\n\n\tgets(ch);\n\tlen=strlen(ch);\n\tmale=ch[0];\n for (i=1;i-1;j=j-1)\n\t\t\t{\n\t\t\t\tif(n1==n2&&ch[j-1]==male) {printf(\"%d %d\\n\",(j-1),i);break;}\n\t\t\t\tif(ch[j-1]==male) n1++;\n\t\t\t\telse n2++;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38225", "code": "/**\n* @file homework.cpp\n* @author ???\n* @date 2011-11-16\n* @description\n* ??????: ????\n*/\nvoid Paidui(char[], int);\n\nint main()\n{\n\tint i, j, k;\n\tchar a[1000];\n\tcin.getline(a, 1000);\n\tfor (i=1;a[i]!='\\0';i++) // ???1????2\n\t{\n\t\tif (a[i]==a[0]) a[i]=1;\n\t\telse a[i]=2;\n\t}\n\ta[0]=1;\n\tPaidui(a, 0);\n\treturn 0;\n}\n\n\nvoid Paidui(char b[], int j)\n{\n\tif (b[j]==2)\n\t{\n\t\tint k;\n\t\tfor(k=j-1;k>=0;k--)\n\t\t{\n\t\t\tif (b[k]==1)\n\t\t\t{\n\t\t\t\tcout< 0) // ???????????????????\n\t\t{\n\t\t\tcout << pos[pos_i] << ' ' << i << endl; // ????????????????????\n\t\t\tpos_i--; // ?????????????\n\t\t\tleft--; // ????????????\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38227", "code": "int main()\n{\n int l,i,j,k,p;\n char s[10000];\n int a[10000];\n char c,d;\n //int q[10000];\n gets(s);\n l=strlen(s);\n p=l;\n c = s[0];\n d = s[l - 1];\n for(i=0;i>str;\n\tint n,j=0;\n\tn=strlen(str);\n\tfor(i=0;i<=n;i++)\n\t{\n\t\tif(str[i]!=str[0])\n\t\t{\n\t\t\tstr[i]=0;\n\t\t\tfor(j=i;j>=0;j--)\n\t\t\t{\n\t\t\t\tif(str[j]==str[0])\n\t\t\t\t{\n\t\t\t\t\tstr[j]=0;\n\t\t\t\t\tcout<=0)\n \n {\n f=0;\n for(d=a[i]-j;d<=a[i];d++)\n f=f+s[d]; \n if(f==u+v)\n {\n printf(\"%d %d\\n\",a[i]-j,a[i]);\n s[a[i]-j]=0;\n s[a[i]]=0;\n }\n }\n\n} \n} \n \t\n return 0;\n}\n"} +{"label": "77", "index": "38230", "code": "void kuohao (char str[],int x);\nint lenth;\nchar c;\nint main()\n{\n char a[10000];\n cin>>a;\n lenth=strlen(a);\n c=a[0];\n kuohao(a,1);\nreturn 0; \n}\nvoid kuohao(char str[],int x)\n{\n if(xgirl[j+1]){\n\t\t\t\t\t\tint p,q;\n\t\t\t\t\t\tp=boy[j];\n\t\t\t\t\t\tboy[j]=boy[j+1];\n\t\t\t\t\t\tboy[j+1]=p;\n\t\t\t\t\t\tq=girl[j];\n\t\t\t\t\t\tgirl[j]=girl[j+1];\n\t\t\t\t\t\tgirl[j+1]=q;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t//???? \n\t\t\t\tfor(int i=0;i> str;\n\t\n\tlength = strlen(str);\n\tp = str[0];\n\tq = str[length - 1];\n\tj = 0; \n\tfor( i = 1 ;i <= length -1 ; i++)\n\t\tif(str[i] == q)\n\t\t{\n\t\t j ++;\n\t\t\tflag[j] = i;\n\t\t}\n\tsum = j;\n\tf(str,1);\n\treturn 0;\n}\nvoid f(char s[],int k)\n{\n\tif(k <= sum)\n\t{\n\t\tfor(i = flag[k] ; i >= 0 ; i --)\n\t\t{\n\t\t\tif(s[i] == p)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,flag[k]);\n\t\t\t\ts[i] ='\\0';\n\t\t\t\ts[flag[k]] = '\\0';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tf(s,k+1);\n\t}\n\telse\n\t\treturn;\n}\n\n\t\t\n\t\t\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t"} +{"label": "77", "index": "38233", "code": "char a[101],x,y;int len;\nvoid find(int t)\n{\n\tint j;\n\tif(t==2)\n\t{\n\t\tfor(int i=0;i2)\n\t{\n\t\tfor(int i=0;i>a;\n\tlen=strlen(a);\n\tx=a[0];\n\tfor(i=1;i> queue;\n\tint len = strlen(queue), i, j, temp;\n\tfor (i = 0; i < len - 1;)\n\t{\n\t\tif (queue[len - 1] == ' ')\n\t\t\tbreak;\n\t\tif (queue[i] != ' ')\n\t\t{\n\t\t\tif (queue[i + 1] == queue[i])\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (queue[i + 1] == ' ')\n\t\t\t{\n\t\t\t\tj = i + 1;\n\t\t\t\twhile(queue[j] == ' ')\n\t\t\t\t\tj++;\n\t\t\t\tif (queue[j] != queue[i])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t\tqueue[i] = queue[j] = ' ';\n\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\ttemp = i - 1;\n\t\t\t\t\twhile (queue[temp] == ' ')\n\t\t\t\t\t\ttemp--;\n\t\t\t\t\ti = temp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ti = j;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (queue[i] == queue[0])\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << i + 1 << endl;\n\t\t\t\t\tqueue[i] = ' ';\n\t\t\t\t\tqueue[i + 1] = ' ';\n\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\ttemp = i - 1;\n\t\t\t\t\twhile (queue[temp] == ' ')\n\t\t\t\t\t\ttemp--;\n\t\t\t\t\ti = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38236", "code": "//#define B '('\n//#define G ')'\nint main(int argc, char* argv[])\n{\n\tchar s[N], e[N], B, G;\n int i,k;\n gets(s);\nB = s[0];\n for(i=0;s[i];i++)e[i]='a';\n\ni=0;\nwhile(s[i])\n{if(s[i]==B)i++;\n else{\n for(k=i-1;k>=0;k--)\n if(s[k]==B && e[k])\n {e[k]='\\0';\n printf(\"%d %d\\n\",k,i);\n break;\n }\n i++;\n }\n}\nputs(\"\\n\");\nreturn 0;\n}"} +{"label": "77", "index": "38237", "code": "int main()\n{\n\tint a[100]={0},b[2][50],i,j,k,l=0,len;\n\tchar str[101]={'\\0'},c,d;\n\tgets(str);\n\tlen=strlen(str);\n\tfor(i=0;i> line;\n\tmatch(0);\n\treturn 0;\n}"} +{"label": "77", "index": "38239", "code": "int i=0,j=0;\nint a[200];\nchar c,d;\nint solve()\n{\n \n scanf(\"%c\",&c);\n if(c==d) {\n a[i]=j;\n j++;\n i++;\n solve();\n return 0;\n }\n if(c!=d){\n printf(\"%d %d\\n\",a[i-1],j);\n i--;\n j++;\n if(i==0) return 0;\n solve();\n }\n}\nint main()\n{ \nscanf(\"%c\",&c);\n d=c;\n a[i]=j;\n j++;\n i++;\n solve();\n \n}"} +{"label": "77", "index": "38240", "code": "/* ?? 1000012853 ???? 12.30*/\nvoid paidui(char str[], const char f, const char m); //?????str???????f????????m???????\nint main()\n{\n\tchar str[1000] = {'0'};\n\tchar f, m;\n\tint a[1000] = {0}, i = 0, j = 0;\n\tcin.getline(str,1000);\n\tm = str[0]; //??????\n\tfor(i = 0; str[i] != '\\0'; i++) //????????\n\t{\n\t\tif(str[i] != m)\n\t\t{\n\t\t\tf = str[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tpaidui(str, f, m); //??????????f????m????????\n\treturn 0;\n}\n\n//\nvoid paidui( char str[], const char f, const char m) \n{\n\tint i = 0, flag1 = -1, flag2 = -1;\n\tif(str[0] == '0') //???????????\n\t\texit(1);\n\telse\n\t{\n\t\twhile(str[i] != '\\0')\n\t\t{\n\t\t\tif(str[i] == m) //flag1??????\n\t\t\t\tflag1 = i;\n\t\t if(str[i] == f) //flag2??????\n\t\t\t flag2 = i;\n\t\t\tif(flag1 >= 0 && flag2 >= 0) //????????0???????????\n\t\t\t{\n\t\t\t\tcout << flag1 << \" \" << flag2 << endl;\n\t\t\t str[flag1] = '0'; //????0\n\t\t\t str[flag2] = '0'; //????0\n\t\t\t paidui(str, f, m); //????????\n\t\t\t}\n\t\t i++;\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38241", "code": "const int BOY=1; //?????1????2????0\nconst int GIRL=2;\nconst int NONE=0;\nint line[100]={NONE}; //????line????\nint n=0; //???n\nvoid leave() //??leave??\n{\n\tint last=-1; //??last??????????\n\tfor(int i=0;i=0) //????????????????????????????????\n\t\t{\n\t\t\tline[i]=line[last]=NONE;\n\t\t\tcout<= charlong - 1)\n\t\t\t\tboysAndGirls ( boy , 0 , dis+1 , charlong );//???????????????????\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( input[pos-dis] != boy )//???????dis?????\n\t\t\t\t\tboysAndGirls ( boy , pos + 1 ,dis , charlong );//??????????\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tboynum[pos] = pos - dis;//???????pos-dis?????\n\t\t\t\t\tlidui[pos] = 1; lidui[pos - dis] = 1;//???????????\n\t\t\t\t\tboysAndGirls ( boy , pos + 1 , dis , charlong );//???????????\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nint main()\n{\n\tint i,charlong ;\n\tchar boy;\n\tcin >> input;\n\tboy = input[0];//?????????????\n\tcharlong=strlen(input);\n\tboysAndGirls ( boy , 0 , 1 , charlong );//?????????\n\tfor( i=0 ; i < charlong ; i++ )//??????\n\t{\n\t\tif( i == charlong - 1 ) cout <<\"0 \"<< charlong - 1;\n\t\telse\n\t\t{\n\t\t\tif( boynum[i] == 0 ) continue;\n\t\t\telse cout << boynum[i] << \" \" << i << endl;\n\t\t}\n\t}\n\tcin.get();cin.get();cin.get();cin.get();cin.get();cin.get();cin.get(); \n\treturn 0;\n}\n"} +{"label": "77", "index": "38243", "code": "char str[200];\nint match(int p);\nchar b;\nchar g;\nint main ()\n{\n\t// ??????match ??????????p?????????????\n\t// ????? ???????????????????????? ???????????\n cin.getline(str, 100);\n\tint len, a;\n\tlen = strlen(str);\n\tb = str[0];\n\tg = str[len - 1];\n\ta = match(0);\n\treturn 0;\n}\nint match(int p)\n{\n\tint q;\n\tif (str[p] == b)\n\t{ \n\t\tq = match(p + 1); // p?q?????? ???????? p?q????????? ????????\n\t\tcout << p << \" \" << q << endl; // q?p + 1??????????????\n\t return match(q + 1);\n\t}\n\telse return p;\n}"} +{"label": "77", "index": "38244", "code": "/*\n * yi.cpp\n *\n * Created on: 2012-10-20\n * Author: 7\n */\nint main()\n{\n\tchar s[500];\n\tint left[500];\n\tcin>>s;\n\tint l,i=0,k=0;\n\tl=strlen(s);\n\tfor(i=0;i>sign;\n\tif(sign==boysign)\n\t{\n\t\tboy++;\n\t\tchildnum++;\n\t\tchildren[childnum][0]=0;\n\t\tfindpair(boysign);\n\t\treturn;\n\t}\n\telse\n\t{\n\t\tchildnum++;\n\t\tchildren[childnum][0]=1;\n\t\tfor(int i=childnum; ;i--)\n\t\t\tif(children[i][0]==0&&children[i][1])\n\t\t\t{\n\t\t\t\ttheboy=i;\n\t\t\t\tchildren[i][1]=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcout<>boysign;\n\tfindpair(boysign);\n\treturn 0;\n}"} +{"label": "77", "index": "38246", "code": "int main()\n{\n\tint numl[51];\n\tint pl=0;\n\tchar str[101];\n\tcin.getline(str,101);\n\tint len=strlen(str);\n\tfor(int i=0;i>boy;\n\tb=Try(i+1,boy);\n\tcout<= 0; j--)\n if(a[j] == b)\n {\n cout << j << \" \" << i << endl;\n a[j] = '*';\n a[i] = '*';\n break;\n }\n\n }\n }\n vv(a, b, g);\n }\n}\nint main()\n{\n char b, g;\n cin >> a;\n l = strlen(a);\n b = a[0];\n g = a[l - 1];\n vv(a, b, g);\n\n return 0;\n}\n"} +{"label": "77", "index": "38249", "code": "int main()\n{\n\tint a[101],i,j,k,l;\n\tchar s[101],mark;\n\tgets(s);\n\tl=strlen(s);\n\tmark=s[0];\n\tfor(i=0;i<=l-1;i++)\n\t{\n\t\tif(s[i]==mark)\n\t\t\ta[i]=1;\n\t\telse\n\t\t\ta[i]=0;\n\t}\n\ti=0;k=0;\n\twhile(k=0;k--)\n\t\t\t\t{\n\t\t\t\t\tif (a[k]==2) break;\n\t\t\t\t\tif (a[k]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<>a;\n int i,p=0,k;\n for(i=0;i<=110;i++)\n {\n if(a[i]!=0)\n p++;\n }\n for(i=0;i<=p-2;i++)\n {\n if(a[i]==a[0]) continue;\n else \n {\n k=i;\n while(k>=0)\n {\n if((a[k]==a[0])&&(b[k]==0)) break;\n k--;\n }\n cout<=0;k--)\n\t\t\t\t{\n\t\t\t\t\tif(s[k]!=' ') break;\n\t\t\t\t}\n\t\t\t\tprintf(\"%d %d\\n\",k,j);\n\t\t\t\ts[k]=' ';s[j]=' ';\n\t\t\t}\n\t\t}\n\t\tcount+=2;\n\t\tif(count==l) break;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38254", "code": "int main()\n{\n\tchar str[110];\n\tint a[50][2];\n\tchar s;\n\tint L,i,j,k=0;\n\tint p=0,t,q,m=0;\n\tcin.get(str,110,'\\n');//??\n\tL=strlen(str);//???????\n\ts=str[0];\nwhile(m!=L)\n{\n\tfor(i=0;str[i]!='\\0';i++)\n\t{\n\t\tif(str[i]==s)\n\t\t{\n\t\t\tfor( j=i+1;ja[j][1])\n\t\t\t {\n\t\t\t\t t=a[i][1];\n\t\t\t\t a[i][1]=a[j][1];\n\t\t\t\t a[j][1]=t;\n\t\t\t\t t=a[i][0];\n\t\t\t\t a[i][0]=a[j][0];\n\t\t\t\t a[j][0]=t;\n\t\t\t }\n\t\tfor( i=0;i= 0 ; j--)\n\t\t\t{\n\t\t\t\tif(a[j] == 1)//????????????????????\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = 0;\n\t\t\t\t\ta[i] = 0;//??????????\n\t\t\t\t\tbreak;//??????????????\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}\nint main()\n{\n\tchar str[100];//?????????\n\tint a[100];//???????????????????\n\tint i = 0, len;\n\tcin.getline(str,100);\n\tlen = strlen(str);//????????????str??????????????len\n\tfor(i = 0; i < len; i++)\n\t{\n\t\tif(str[0] - '0' == str[i] - '0')\n\t\t\ta[i] = 1;//????????1\n\t\telse\n\t\t\ta[i] = 2;//????????2\n\t}\n\tqianshou(a, len);//????\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38256", "code": "void main()\n{\n\tchar quene[500]={'\\0'},boy,girl;\n\tint i,n,g=0,pair;\n\tgets(quene);\n\tn=strlen(quene);\n\tpair=n/2;\n\tboy=quene[0];\n\tfor(i=0;i0)\n\t{\n\t\tfor(i=g;i=0;i--)\n\t\t{\n\t\t\tif(quene[i]==boy)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\\n\",i,g);\n\t\t\t\tpair--;\n\t\t\t\tquene[i]='a';\n\t\t\t\tquene[g]='a';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38257", "code": "int main()\n{\n\tchar a[110];\n\tint t[110],i=0,j=0,b[60],g[60],n=0,d=1,k=0;\n\tfor(i=0;i<110;i++)t[i]=0;\n\tcin.getline(a,110,'\\n');\n\tfor(i=0;a[i]!='\\0';)i++;\n\tn=i;\n\tfor(d=1;d<=n-1;d=d+2)\n\t{for(i=0;ig[j+1]){\n\t\t\ttem=g[j];g[j]=g[j+1];g[j+1]=tem;tem=b[j];b[j]=b[j+1];b[j+1]=tem;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i= 2)\n\t\t\tpaidui(n - 2);\n}\nint main ()\n{\n\tcin.getline (str,100);\n\tn = strlen(str);\n\tx = str[0];\n\tfor(int i = 0; i < n; i++)\n\t{\n\t\tif (str[i] != x)\n\t\t{\n\t\t\ty = str[i];\n\t\t flag = 1;\n\t\t}\n\t\tif (flag == 1)\n\t\t\tbreak;\n\t}\n\tfor (int i = 0; i < n; i++)\n\t\ta[i] = i;\n\tpaidui(n);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38260", "code": "int i=0;\nchar boy,girl;\nvoid search(char a[])\n{\n\tint j=0,k,bo,gi;\n\tif(a[0]!='.')\n\t{\n\t\twhile(a[j]!=girl)\n\t\t\tj++;\n\t\tk=j-1;\n\t\tgi=j;\n\t\ta[gi]='.';\n\t\twhile(a[k]=='.')\n\t\t\tk--;\n\t\ta[k]='.';\n\t\tbo=k;\n\t\tcout<> c;\n\n\tl = strlen(c);\n\tkey = c[0];\n\n\tfor(i = 0; i < l; i ++)\n\tif(c[i] != key)\n\t{\n\t\ta[count] = i;\n\t\tcount ++;\n\t}\n\n\tfor(i = 0; i < l / 2; i ++)\n\t{\n\t\tfor(j = a[i]; j >= 0; j --)\n\t\t\tif(c[j] == key)\n\t\t\t{\n\t\t\t\tcout << j << \" \" << a[i] << endl;\n\t\t\t\tc[j] = key + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\n\n\n\treturn 0;\n}\n\n\n\n\n\n\n"} +{"label": "77", "index": "38262", "code": "//shu ru fa huai le bu xie zhu shi le = =!\nint main()\n{\n\tchar str[100];\n\tcin.getline(str,101);\n\tint i,j,k,t=0;\n\tint number[51][2];\n\tint n=0;\n\twhile(true)\n\t{\n\t\tif(str[n]=='\\0')\n\t\t\tbreak;\n\t\tn++;\n\t}\n\tfor(i=0;i=0;k--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(str[k]==str[0])\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tstr[j]=str[k]='\\0';\n\t\t\t\t\tnumber[t][0]=k;\n\t\t\t\t\tnumber[t++][1]=j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tint d;\n\tfor(i=0;inumber[j][1])\n\t\t\t{\n\t\t\t\td=number[i][1];number[j][1]=number[i][1];number[i][1]=d;\n\t\t\t\td=number[i][0];number[j][0]=number[i][0];number[i][0]=d;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i=0;j--)\n if (str[j]==y)\n {\n printf(\"%d %d\\n\",j,i);\n str[j]=' ';\n break;\n }\n str[i]=' ';\n }\n }\n}\n"} +{"label": "77", "index": "38267", "code": "\nint main()\n{\n\tchar a[102];\n int b[50],c[50],k,p,q,i,j,s=0,n,min,h,z;\n\tchar f,g;\n\tgets(a);\n\tn=strlen(a);\n\tf=a[0];\n g=a[n-1];\n\t for(z=1;z<=50;z++)\n\t \n\t { for(i=0;i<(n-1);i++){h=0;\n\t\tif(a[i]==f)\n\t\t{for(j=i+1;j> a;\n\tsex[0] = a[0];\n\tfor (i=1;;i++)\n\t{\n\t\tif (a[i]!=a[0])\n\t\t{\n\t\t\tsex[1]=a[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i=0;;i++)\n\t{\n\t\tfor (k=0;a[k]!='\\0';k++)\n\t\t{\n\t\t\tif (a[k]!='*')\n\t\t\t{\n\t\t\t\ty=1;\n\t\t\t}\n\t\t}\n\t\tif (y==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ty=0;\n\t\tif (a[i]=='*')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif (a[i+1]=='\\0')\n\t\t{\n\t\t\ti=-1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (a[i] == sex[0])\n\t\t{\n\t\t\tfor (k=i+1;a[k]!=sex[0];k++)\n\t\t\t{\n\t\t\t\tif (a[k]==sex[1])\n\t\t\t\t{\n\t\t\t\t\ta[i]='*';\n\t\t\t\t\ta[k]='*';\n\t\t\t\t\tboy[j] = i;\n\t\t\t\t\tgirl[j] = k;\n\t\t\t\t\tj++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (p=0;pgirl[q+1])\n\t\t\t{\n\t\t\t\ttemp=girl[q+1];\n\t\t\t\tgirl[q+1]=girl[q];\n\t\t\t\tgirl[q]=temp;\n\t\t\t\ttemp=boy[q+1];\n\t\t\t\tboy[q+1]=boy[q];\n\t\t\t\tboy[q]=temp;\n\t\t\t}\n\t\t}\n\t}\n\tfor (x=0;x<=j-1;x++)\n\t{\n\t\tcout << boy[x] << \" \" << girl[x] << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38269", "code": "void fun(char, int);\nchar a, b;\nchar s[100];\nint main()\n{\n\tint n, i;\n\tcin >> s;\n\tn = strlen(s);\n\ta = s[0];\n\tb = s[n - 1];\n\tfor(i = 0; i < n; i++)\n\t{\n\t\tfun(s[i],i);\n\t}\n\treturn 0;\n}\nvoid fun(char c, int i)\n{\n\tint k, j = 0;\n\tif(c == a)\n\t\treturn;\n\telse\n\t{\n\t\tfor(k = 1;; k++)\n\t\t{\n\t\t\tif(s[i - k] == a)\n\t\t\t{\n\t\t\t\tif(j == 0)\n\t\t\t\t{\n\t\t\t\t cout << i - k << \" \" << i << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tj--;\n\t\t\t}\n\t\t\telse\n\t\t\t\tj++;\n\t\t}\n\t}\n\treturn;\n}\n"} +{"label": "77", "index": "38270", "code": "void main()\n{\n\tchar a[100];\n\tgets(a);\n\tint length=strlen(a);\n\tint i,j;\n\tint w1,w2;\n\tchar q;\n\tq=a[0];\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(c[j]==c[0])\n\t\t\t\t{\n\t\t\t\t\tboy[k]=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tc[j]='0';\n\t\t\tk++;\n\t\t}\n\t}\n\tfor(i=0;i=0;j--)\n\t\t{\n\t\t if (a[j]==b) \n\t\t {//??????????????????????????\n\t\t\t cout<= 0)\n\t\t\tMatch(queue, p);\n\t}\n\telse Match(queue, q);\n}"} +{"label": "77", "index": "38277", "code": "char a[10000];\nint use[10000]={0};\nvoid f(int len)\n{\n\tint i,j;\n\tfor(i=0;i=0;j--)\n\t\t\t\tif(a[j]==a[0]&&use[j]==0)\n\t\t\t\t{\n\t\t\t\t\tcout<>a;\n\tlen=strlen(a);\n\tf(len);\n\treturn 0;\n}\n\t\t\t\n\t\t\t\n\t"} +{"label": "77", "index": "38278", "code": "\nchar b, g, a[100];\nint len;\n\nint paidui(int n)\n{\n\tfor (int i = n; i < len; i++)\n\t{\n\t\tif (a[i] == '*') continue;\n\t\tif (a[i] == b)\n\t\t{\n\t\t\ta[i] = '*';\n\t\t\tint k = paidui(i + 1);\n\t\t\tcout << i << ' ' << k << endl;\n\t\t}\n\t\telse if (a[i] == g)\n\t\t{\n\t\t\ta[i] = '*';\n\t\t\treturn i;\n\t\t}\n\t}\n}\n\nint main()\n{\n\tcin.getline(a, 100);\n\tlen = strlen(a);\n\tb = a[0];\n\tg = a[len - 1];\n\tpaidui(0);\n\n\treturn 0;\n}"} +{"label": "77", "index": "38279", "code": "int u=0;\nvoid prin(char a[],int l)\n{\n\tint i,j;\n\tfor(i=0;i=0;i--)\n\t\t{\n\t\t\tif(a[i]!=a[x])s++;\n\t\t\telse s--;\n\t\t\tif(s==0)\n\t\t\t{\n\t\t\t\tcout<>a;\n\tf(x,a);\n\tcin.get();cin.get();cin.get();cin.get();\n\treturn 0;\n}\n"} +{"label": "77", "index": "38281", "code": "int data(char *c,int i,char boy,char girl){\n\tif(*(c+i)==0)return 0;\n\tif(*(c+i)==girl)return i;\n\tint j;\n\tj=data(c,i+1,boy,girl);\n\tcout<>children;\n\tboy=children[0];\n\tfor(i=0;children[i]!=0;i++){\n\t\tif(children[i]!=boy){\n\t\t\tgirl=children[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\ti=data(children,0,boy,girl);\n\treturn 0;\n}"} +{"label": "77", "index": "38282", "code": "char c1, c2;\nint num;\nint k=0;\nint s[1000][2];\nint main()\n{\n void f(char str[1000]);\n\tchar a[1000];\n\tgets(a);\n c1=a[0];\n\tint i, j;\n\n\tnum=strlen(a);\n\tfor(i=1;is[j+1][1])\n\t\t\t{\n\t\t\t\ttemp1=s[j+1][1];\n\t\t\t\ts[j+1][1]=s[j][1];\n\t\t\t\ts[j][1]=temp1;\n\t temp2=s[j+1][0];\n\t\t\t\ts[j+1][0]=s[j][0];\n\t\t\t\ts[j][0]=temp2;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i= 0; i--) //???????\n\t\t\t{\n\t\t\t\tif (paidui[i] == boy)\n\t\t\t\t{\n\t\t\t\t\tcout<> str;\n int m = 0, bo = 0;\n while(*p != 0)\n {\n if(*p == str[0])\n {\n bo++;\n boy[bo] = m;\n }\n else\n {\n cout << boy[bo] << \" \" << m << endl;\n bo--;\n }\n p++;\n m++;\n }\n}\n"} +{"label": "77", "index": "38287", "code": "int main()\n{\n\tint i,m=0,n;\n\tchar a[105];\n\tint b[55]={0};\n\tmemset(a,'0',sizeof(a));\n\tcin>>a;\n\tfor(i=0;i<100;i++)\n\t\tif(a[i]=='0')\n\t\t{n=i-1;break;}\t//????????\n\tfor(i=0;i=0;j--)\n {\n if(s[j]!=s[i])\n {\n s[j]=s[i];\n printf(\"%d %d\\n\",j,i);\n break;\n }\n }\n } \n }\nreturn 0;\n}"} +{"label": "77", "index": "38291", "code": "void zhaodui(char str[]);\nint main()\n{\n\tchar str[100];\n\tcin.getline(str,100,'\\n');\n\tzhaodui(str);\n\treturn 0;\n}\nvoid zhaodui(char str[])\n{\n\tchar nan[2],nv[2];\n\tchar str1[100];\n\tint i,j;\n\tstrcpy(str1,str);\n\tnan[0]=str[0];\n\tfor(i=0;i<99;i++)\n\t{\n\t\tif(str[i]!=str[0])\n\t\t{\n\t\t\tnv[0]=str[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(j=0;j<99;j++)\n\t{\n\t\tfor(i=1;i<98;i=i+2)\n\t\t{\n\t\t\tif(str[j]==nv[0]&&str[j-i]==nan[0])\n\t\t\t{\n\t\t\t\tcout<> c;\n\tn = strlen(c);\n\tfor(i = 0;i < n;i++)\n\t\ta[i] = i;\n\tf(c,n,a);\n\treturn 0;\n}\nvoid move(char c[], int a[], int pos, int n)\n{\n\tint i;\n\tfor(i = pos;i < n - 2;i++)\n\t{\n\t\tc[i] = c[i+2];\n\t\ta[i] = a[i+2];\n\t}\n}\nvoid f(char c[],int n,int a[])\n{\n\tint i = 0;\n\tfor(i = 0;i < n;i++)\n\t\tif(c[i] == c[0] && c[i+1] == c[n-1])\n\t\t{\n\t\t\tcout << a[i] <<' '<< a[i+1] <>s;\n\tint a[100],i;\n\tint len=strlen(s);\n\tfor(i=0;i<100;i++)\n\t\ta[i]=i;\n\tchar boy=s[0];\n\tout(s,a,boy,len);\n return 0;\n}\n"} +{"label": "77", "index": "38294", "code": "\nint main()\n{\n int i,j,k,n,b[100];\n char a[100],l;\n cin.getline(a,100);\n n = strlen(a);\n l = a[0];\n for(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(line[j]==boy)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tline[j]=line[i]=' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38296", "code": "int flag[101]={0};\nchar str[101],boy,girl,num=0;\nvoid match(int i)\n{\n\tflag[i]=1;\n\tfor(int k=i;;k--)\n\t\t{\n\t\t\tif(str[k]==boy&&flag[k]==0)\n\t\t\t{\n\t\t\t cout<>str;\n\tboy=str[0];\n\tint i;\n\tchar *p=str;\n\tfor(i=0;;p++,i++) //i--first girl\n\t{\n\t\tif(*p!=boy)\n\t\t\t{\n\t\t\t\tgirl=*p;\n\t\t break;\n\t\t }\n\t}\n\tmatch(i);\n\treturn 0;\n}\n\t\n\n"} +{"label": "77", "index": "38297", "code": "int main()\n{\n\tchar line[110],boy,girl;\n\tint b[110],g[110],p=1,s=0,lin[110],mark[110];\n\tint len;\n\tfor(int i=0;i<=109;i++)\n\t\tlin[i]=i;\n\tcin.getline(line,120,'\\n');\n\tlen=strlen(line)-1;\n\tboy=line[0];\n\tfor(int i=0;i<=len;i++)\n\t\tif(line[i]!=boy)\n\t\t{\n\t\t\tgirl=line[i];\n\t\t\tbreak;\n\t\t}\n\twhile(sg[j+1])\n\t\t\t{\n\t\t\t\tint temp=g[j];\n\t\t\t\tg[j]=g[j+1];\n\t\t\t\tg[j+1]=temp;\n\t\t\t\ttemp=b[j];\n\t\t\t\tb[j]=b[j+1];\n\t\t\t\tb[j+1]=temp;\n\t\t\t}\n\tfor(int i=1;i<=p-1;i++)\n\t\tcout<=0;i--)\n\t\t{\n\t\t\tif(tag[i]==0)\n\t\t\t{\n\t\t\t\tcout<= 0; j--)\n\t\t\t\tif(a[j] == 1)\n\t\t\t\t{\n\t\t\t\t\tcout << j << ' ' << i << endl;\n\t\t\t\t\ta[i] = 0;\n\t\t\t\t\ta[j] = 0;\n\t\t\t\t\treturn check(a);\n\t\t\t\t}\n}"} +{"label": "77", "index": "38302", "code": "void Q(char a[])\n{\n\tchar c;\n\tc = a[0];\n\tint pos[100];\n\tint i = 0, num = 0;\n\tdo\n\t{\n\t\tif (a[i] == c)\n\t\t{\n\t\t\tnum++;\n\t\t\tpos[num] = i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout << pos[num] << \" \" << i << endl;\n\t\t\tnum--;\n\t\t}\n\t\ti++;\n\t}while (i <= strlen(a) - 1);\n}\nint main()\n{\n\tchar children[100];\n\tcin >> children;\n\tQ(children);\n\treturn 0;\n}"} +{"label": "77", "index": "38303", "code": "void line(char a[100],int b)\n{\n\tint i,j;\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]!=a[i]&&a[j]==a[0])\n\t\t\t\t{\n\t\t\t\t\tcout<>a;\n\tint n;\n\tn=strlen(a);\n\tline (a,n);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38304", "code": "\nint main(){\n\tchar x[110], a, b;\n\tint i, j;\n\tcin.getline(x, 110, '\\n');\n\ta = x[0];\n\tfor(i = 1;;i++){\n\t\tif(x[i] != a){\n\t\t\tb = x[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0;i < strlen(x);i++){\n\t\tif(x[i] == b)\n\t\t{\n\t\t\tfor(j = i - 1;;j--)\n\t\t\t\tif(x[j] == a)\n\t\t\t\t\tbreak;\n\t\t\tcout << j << \" \" << i << endl;\n\t\t\tx[j] = x[i] = ' ';\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38305", "code": "/*bss*/\nint stack[MAX], lstack, len;\n\nint main(){\n char c, a=0, b=0;\n int i, j, k;\n while(c=getchar()){\n if(!a) a=c;\n else if (c!=a&&!b) b=c;\n if(c==a) stack[lstack++]=len++;\n else if(c==b) printf(\"%d %d\\n\", stack[--lstack], len++);\n else return 0;\n }\n}\n"} +{"label": "77", "index": "38306", "code": "//**********************************************************\n//* ? ? ?: ????.cpp *\n//* ? ?: ? ? *\n//* ? ? ? ?: 2010?12?6? *\n//**********************************************************\nint main ()\n{\n\tchar a[101]={'\\0'}; //??????????\n\tint i=1,j=0;\n\tcin.getline( a, 101, '\\n');\n\twhile((i<101)&&(a[i]!='\\0')) //?????\n\t{\n\t\tif(a[i]==a[0]) //?????????????????????\n\t\t{\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\telse if(a[i]!=a[0]) //????????????\n\t\t{\n\t\t\tfor(j=i-1;j>=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]!=a[0]) //?????????????\n\t\t\t\t\tcontinue;\n\t\t\t\telse if(a[j]==a[0]) //????????????????????\n\t\t\t\t{\n\t\t\t\t\tcout<0)\n p++;\n }\n for(i=1;i<=p-1;i++)\n {\n if(a[i]==a[0]) continue;\n else \n {\n j=i-1;\n while(j>=0)\n {\n if(b[j]==0) break;\n else \n j--;\n } \n cout< 0; j -- )\n\t\t{\n\t\t\tif( po[j] == 1)\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t\tcout << j << \" \" << i << endl;\n\t\t\tpo[j] = 0;\n\t\t\tpo[i] = 0;\n\t\t}\n\t\n\tty( i + 1 );\n\t}\n}\n"} +{"label": "77", "index": "38310", "code": "char str[200],u,v;\nint n,t[100][2];\nvoid disassemble(int x)//n????n??????????????\u0093?\u0094????????\u0093?\u0094??\n{\n\tint i,m=0;\n\tfor(i=0;i<2*n;i++)\n\t{\n\t\tif(str[i]==v)\n\t\t{\n\t\t\tm=i;\n\t\t\tt[x][1]=m;//x=1?????????????????????\n\t\t\tstr[m]=1;//?????0,0???????????????????\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=m-1;i>=0;i--)\n\t{\n\t\tif(str[i]==u)\n\t\t{\n\t\t\tt[x][0]=i;\n\t\t\tstr[i]=1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(x!=1)\n\t\tdisassemble(x-1);\n\tcout<=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==b)//?i??????????\n\t\t\t\t{\n\t\t\t\t\tcout<> queen;\n\tint len = strlen(queen);\n\tchar a, b;\n\tint cnt = 0;\n\tint boy[1000] = {0};\n\ta = queen[0];\n\tb = queen[len - 1];\n\tfor (int i = 0; i < len; i++)\n\t{\n\t\tif (queen[i] == a)\n\t\t{\n\t\t\tboy[cnt] = i;\n\t\t\tcnt ++;\n\t\t}\n\t\tif (queen[i] == b)\n\t\t{\n\t\t\tcnt --;\n\t\t\tcout << boy[cnt] << ' ' << i << endl;\n\t\t}\n\t}\n\twhile(EOF!=getchar());\n\treturn 0;\n}"} +{"label": "77", "index": "38313", "code": "/*\n * paiduiyouxi.cpp\n *\n * Created on: 2010-12-30\n * Author: qaj\n */\nint main() {\n\tchar ch[20000];\n\tcin >> ch;\n\tint l = strlen(ch);\n\tint num[20000];\n\tfor (int i = 0; i < l; i++)\n\t\tnum[i] = i;\n\tint n = l;\n\tchar boy, girl;\n\tboy = ch[0];\n\tfor (int i = 1; i < l; i++) {\n\t\tif (ch[i] != boy) {\n\t\t\tgirl = ch[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (int k = 0; k < l / 2; k++)\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif ((ch[i] == boy) && (ch[i + 1] == girl) || (ch[i] == girl)\n\t\t\t\t\t&& (ch[i + 1] == boy)) {\n\t\t\t\tcout << num[i] << ' ' << num[i + 1] << endl;\n\t\t\t\tn = n - 2;\n\t\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\t\tch[j] = ch[j + 2];\n\t\t\t\t\tnum[j] = num[j + 2];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38314", "code": "/* Name : ???? \n * Version : 1.0\n * Date : 2012-11-19\n * New : Null\n * Func&Feat : \n * State : Work\n */\nint main()\n{\n char c,boy=0; //???c?????????boy???????? \n int n_person,n_pair; //???n_person?????n_pair????? \n int sym[100]={0},pair[50][2]={0}; //???sym[]??????????????1????-1?pair[][2]????? \n for(int i=0;i<100;i++)\n {\n c=cin.get();\n if(i==1)boy=c; //???????????boy?????????? \n if(c=='\\n')\n {\n n_person=i;\n n_pair=n_person/2;\n break;\n }\n if(c==boy)sym[i]=1; //???boy???sym[]???1??????-1 \n else sym[i]=-1;\n }\n for(int i0=n_person-1,p=n_pair-1;i0>=0;i0--) //???????????????? \n if(sym[i0]==-1) //??????????????????????????????????0 \n {\n pair[p][1]=i0; //?????? \n for(int i1=i0,sum=0;i1>=0;i1--)\n {\n sum=sum+sym[i1];\n if(sum==0) //????????0????????????? \n {\n pair[p][0]=i1;\n break;\n }\n }\n p--; //pair[]??????p?n_pair-1???0 \n }\n for(int p=0;p=0;j--)\n\t\t\t{\n\t\t\t\tif(x[j]==c)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tx[i]='4';\n\t\t\t\t\tx[j]='4';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;i>str;\n a=str[0];\n len =strlen(str);\n P(0);\n return 0;\n}\n"} +{"label": "77", "index": "38319", "code": "char line[100];\nchar boy,girl;\nint len;\nvoid queue(int b)\n{\n\t\n\tint i=0;\n\tif(b==len)\n\t\treturn;\n\telse\n\t{\n\t\tif(line[b]==girl)\n\t\t{\n\t\t\tline[b] = 0;\n\t\t\tfor( i=b-1;i>=0;i--)\n\t\t\t{\n\t\t\t\tif(line[i]==boy)\n\t\t\t\t{\n\t\t\t\t\tcout << i << \" \" << b << endl;\n\t\t\t\t\tline[i]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t queue(b+1);\n\t\t}\n\t\telse\n\t\t queue(b+1);\n\t}\n}\nint main()\n{\n\tcin >> line;\n len =strlen(line); \n boy=line[0];\n\tgirl = line[len-1];\n\tqueue(1);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38320", "code": "\nvoid solve(char str[],char m,char f)\n{\n\tint l,flag=1,i,k;\n\tl=strlen(str);\n\tfor(i=0;ib)\n\t\t\t{\n\t\t\t\ttemp=a+1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttemp=b+1;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\ti=0;\n\twhile (p[i]!='\\0')\n\t{\n\t\tif (p[i]==b)\n\t\t{\n\t\t\tfor (j=i-1;j>=0;j--)\n\t\t\t{\n\t\t\t\tif (p[j]==a)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tp[j]=temp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "77", "index": "38322", "code": "void main()\n{int i,j,k,len;\n char x[100],a,b;\n scanf(\"%s\", x);\n len=strlen(x);\n a=x[0];b=x[len-1];\n for (i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(s[j]==s[0])\n\t\t\t\t{\n\t\t\t\t\ts[j]=s[i];\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38324", "code": " \nvoid main()\n{\n char p,s[101];\n int b[101]={0};\n int i,j,l;\n gets(s);\n p=s[0];\n l=strlen(s);\n for(i=0;i=0;j--)\n if(b[j]==1) {b[j]=0;break;}\n printf(\"%d %d\\n\",j,i);\n }\n }\n\n}\n"} +{"label": "77", "index": "38325", "code": "\n\nint main()\n{\n int stack[100], top = 0, count = 0;\n char boy, c;\n cin >> boy;\n stack[top++] = count++;\n while ((c = cin.get()) != '\\n')\n {\n if (c == boy)\n {\n stack[top++] = count++;\n }\n else\n {\n printf(\"%d %d\\n\", stack[--top], count++);\n }\n }\n \n return 0;\n}"} +{"label": "77", "index": "38326", "code": "int main()\n{\n\tchar ch[200],t[2];\n\tint i,j,l,g,b;\n\tgets(ch);\n l=strlen(ch);\n t[0]=ch[0];\n t[1]=ch[l-1];\n for(i=1;i=0;j--)\n {\n if(ch[j]==t[1])\n {\n g++;\n }\n else if(ch[j]==t[0])\n {\n b++;\n }\n if(g==b)\n {\n ch[i]=0;\n ch[j]=0;\n printf(\"%d %d\\n\",j,i);\n break;\n }\n\n }\n }\n }\n }\n\n\treturn 0;\n}\n"} +{"label": "77", "index": "38327", "code": "char a[110]={0};\nint x[110][2]={0};\nint i,j,l,k=0;\nint f()\n{\n\tfor(i=0;ix[j+1][1])\n\t\t\t{\n\t\t\t\tk=x[j][1];x[j][1]=x[j+1][1];x[j+1][1]=k;\n\t\t\t\tk=x[j][0];x[j][0]=x[j+1][0];x[j+1][0]=k;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i> a;\n\tlen = strlen(a);\n\tcouple(0);\n\treturn 0;\n}\n\nint couple(int i)\n{\n\tint j;\n\tfor(int k = i; k < len; k++)\n\t{\n\t\twhile(b[i] == 1)\n\t\t{\n\t\t\ti++;\n\t\t}\n\t\tif(a[i] == a[0])\n\t\t{\n\t\t\tb[i] = 1;\n\t\t\tj = couple(i+1);\n\t\t\tcout << i << \" \" << j << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb[i] = 1;\n\t\t\treturn i;\n\t\t}\n\t}\t\n}\n\t"} +{"label": "77", "index": "38330", "code": "//***********************************************************************\n//??????? \n//??????? \n//??????\n//***********************************************************************\nint main() //??? \n{\n char str[101], g, b; \n int c = 1, p[101] = {0};\n str[0] = cin.get();\n b = str[0]; //?????????????????? \n for(int i = 1; i < 101; i ++) // for???????? \n {\n str[i] = cin.get();\n //??????????????????????????????? \n if(str[i] != str[0] && str[i] != '\\n')\n { \n g = str[i];\n p[i] = 1;\n } \n if(str[i] == '\\n')\n break; \n c++; //????c?? \n }\n for(int i = 1; i < c; i++) //?????????????? \n {\n if(str[i] == g)\n {\n for(int j = i - 1; j >= 0; j--) \n if(p[j] == 0)\n {\n cout<>queue;\n boy=queue[0];\n length=strlen(queue);\n int number;\n for(int i=0;i=0;k--)\n {\n if(a[k]!=0)\n {\n printf(\"%d %d\\n\",k,i);\n a[i]=0;a[k]=0;\n break;\n }\n }\n break;\n }\n }\n }\n}\n"} +{"label": "77", "index": "38336", "code": "/*\n * paiduiyouxi.cpp\n *\n * Created on: 2011-1-8\n * Author: lz\n */\n\nint main()\n{\n\tchar c[1000];\n\tint s[1000];\n\tint top=-1;\n\tcin>>c;\n\tchar a;\n\tchar b;\n\ta=c[0];\n\tint len=strlen(c);\n\tint i;\n\tfor(i=0;i> s;\n\tfor (int i = 0; s[i]; ++i) //??????\n\t{\n\t\tif (s[i] == s[0]) //?????????\n\t\t\ta[++n] = i;\n\t\telse //?????????????????????????????\n\t\t\tcout << a[n--] << \" \" << i << endl;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38339", "code": "char a[100], p, q;\n\nvoid solve()\n{\n\tint i=0, b, g;\n\twhile(a[i] != '\\0')\n\t{\n\t\tif(a[i] == p)\n\t\t\tb = i;\n\t\telse if (a[i] == q)\n\t\t{\n\t\t\tg = i; \n\t\t\ta[b] = '0';\n\t\t\ta[g] = '0';\n\t\t\tcout << b << ' ' << g << endl;\n\t\t\tsolve();\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\treturn;\n}\n\t\t\n\t\nint main()\n{\n\t\n\tcin.get(a,100);\n\tp = a[0];\n\tint i=0;\n\twhile(1)\n\t{\n\t\tif(a[i] != p)\n\t\t{\n\t\t\tq = a[i];\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\tsolve();\n\n\treturn 0;\n}\n\t\t\n"} +{"label": "77", "index": "38340", "code": "\nint main()\n{\n\tchar a[100], girl, boy;\n\tcin.getline( a, 100 );\n\tboy = a[0];\n\tint i, j;\n\tfor ( i = 0; a[i] != '\\0'; i++ )\n\t{\n\t\tif ( a[i] != boy )\n\t\t{\n\t\t\tgirl = a[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor ( i = 0; a[i] != '\\0'; i++ )\n\t{\n\t\tif ( a[i] == girl )\n\t\t{\n\t\t\tfor ( j = i - 1; j >= 0; j-- )\n\t\t\t{\n\t\t\t\tif ( a[j] == boy )\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = ' ';\n\t\t\t\t\ta[i] = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38341", "code": "\nint sum ;\nvoid change(int t, char s[],char a, char b)\n{\n\tif (sum == 0)\n\t\treturn;\n\tint i, j;\n\tfor (i = 0;i < t;i++)\n\t{\n\t\tif (s[i] == a)\n\t\t{\n\t\t\tfor (j = i + 1;s[j] == '0' && j < t;j++);\n\t\t\tif (s[j] == b)\n\t\t\t{\n\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\tsum = sum - 2;\n\t\t\t s[i] = s[j] = '0';\n\t\t\t\tchange(t, s,a, b);\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\t\t}\n\t}\n}\n\n\nint main()\n{\n\tchar s[105], a, b;\n\tcin.getline(s, 105);\n\tint l = strlen(s);\n\tsum = l;\n\ta = s[0];\n\tfor (int i = 1;i < l;i++)\n\t{\n\t\tif (s[i] != s[0])\n\t\t\tb = s[i];\n\t}\n\tchange(l, s, a, b);\n\t\n\treturn 0;\n}"} +{"label": "77", "index": "38342", "code": "int c[100]={0};//?????????????\nchar boy,girl;\nchar a[100];\nvoid f()\n{\n\tint k=1,i;\n\tfor(i=0;i> b;\n\tl = strlen(b);\n\tfor (i = 0; i < l; i++)\n\t\ta[i] = i;\n\tpeidui(l);\n\treturn 0;\n}"} +{"label": "77", "index": "38344", "code": "//????\nint main()\n{\n\tchar a[102];\n\tcin.getline(a,102);\n\tchar boy=a[0];\n\tchar girl;\n\tint length=strlen(a);\n for(int i=1;i= 0 ; j--)\n\t\t\t{\n\t\t\t\tif(a[j] == 1)\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t a[j] = 0;\n\t\t\t\t\ta[i] = 0;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}\nint main()\n{\n\tchar str[100];\n\tint a[100];\n\tint i = 0;\n\tcin.getline(str,100);\n\tint len;\n\tlen = strlen(str);\n\tfor(i = 0; i < len; i++)\n\t{\n\t\tif(str[0] - '0' == str[i] - '0')\n\t\t\ta[i] = 1;\n\t\telse\n\t\t\ta[i] = 2;\n\t}\n\tqianshou(a, len);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38346", "code": "int main()\n{\n\tchar str[101],p,q;\n\tint b[50],g[50],i,l,j=0,e,k,r;\n\tscanf(\"%s\",str);\n\tl=strlen(str);\n\tp=str[0];\n\tfor(i=1;i=i;k--)\n\t\t{\n\t\t\tif(g[k]> c ;\n\tb = c[0] ;\n\tfor ( i = 1 ; ; i ++ ) {\n\t\tif ( c[i] != b ) {\n\t\t\tg = c[i] ;\n\t\t\tbreak ;\n\t\t}\n\t}\n\tL = strlen(c) ;\n\tfor ( i = 0 ; i < L ; i ++ ) {\n\t\tif ( c[i] == b ) {\n\t\t\tfor ( j = i+1 ; ; j ++ ) {\n\t\t\t\tif ( c[j] == ' ' )\n\t\t\t\t\tcontinue ;\n\t\t\t\telse if ( c[j] == b )\n\t\t\t\t\tbreak ;\n\t\t\t\telse if ( c[j] == g ) {\n\t\t\t\t\tB[order] = i ;\n\t\t\t\t\tG[order] = j ;\n\t\t\t\t\tc[i] = ' ' ;\n\t\t\t\t\tc[j] = ' ' ;\n\t\t\t\t\torder ++ ;\n\t\t\t\t\ti = -1 ;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor ( i = 1 ; i < order ; i ++ )\n\t\tcout << B[i] << \" \" << G[i] << endl ;\n\treturn 0 ;\n}\n"} +{"label": "77", "index": "38349", "code": "int main()\n{\n\t\n\tchar s[1000];\n\tscanf(\"%s\",s);\n\tchar boy=s[0];\n\tint m[1000]={0};\n\tint i,j=0;\n\tfor(i=0;s[i];i++)\n\t{\n\t\tif(s[i]==boy)\n\t\tm[j++]=i;\n\t\telse if(s[i]!=boy)\n\t\t\tprintf(\"%d %d\\n\",m[--j],i);\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38350", "code": "char a[109];\nchar boy;\nchar girl;\nint l;\nvoid Match()\n{\n\tif( a[0] != boy )\n\t\treturn;\n\tint i = 0;\n\twhile( a[i] != girl )\n\t\ti++;\n\tint j = i-1;\n\twhile( a[j] == '0' )\n\t\tj--;\n\tcout<< j << ' ' << i << endl;\n\ta[i] = a[j] = '0';\n\tMatch();\n}\nint main()\n{\n\tcin.getline( a , 109 );\n\tl = strlen( a );\n\tboy = a[0];\n\tgirl = a[l-1];\n\tMatch();\n\treturn 0;\n}"} +{"label": "77", "index": "38351", "code": "//****************************************\n//*??????? **\n//*????? 1100012873 **\n//*???2011.11.16 **\n//****************************************\nchar t[100];//??????\nint pd (int, int);\nint main ()\n{\n\tint l;\n cin >> t;\n l = strlen (t);\n pd (0, l);\n return 0;\n}\nint pd (int x, int length)\n{\n\tint i;\n for (i = 1;x + i < length;) \n\t{\n\t\tif (t[x] == t[x + i] && t[x] != 'o')//??????????\n\t\t\treturn pd (x + i, length);\n else if (t[x+i] != t[x] && t[x+i] != 'o')//???????????????\n {\n\t\t\tt[x] = 'o';\n\t\t t[x+i] = 'o';\n\t\t cout << x << \" \" << x+i << endl;\n return pd (x - 1, length);\n }\n\t else if (t[x+i] != t[x] && t[x+i] == 'o')//????????????\n\t i++;\n\t else if (t[x] == 'o' && t[x+i] == 'o')//???????\n\t\t\treturn pd (x - 1, length);\n\t} \n}\n\n\n"} +{"label": "77", "index": "38352", "code": "int hands(int n);\nint c[200]={0},b[100];\nint main()\n{\n char a[100];\n int i=0,num=0,j=1;\n cin>>a;//?????\n c[0]=0;\n for(i=1;i2)return hands(n-2);//?n>2????\n else\n {\n \n return 0;\n }\n}//hands??\n"} +{"label": "77", "index": "38353", "code": "struct chil\n{\n\tint sex;\n\tint num;\n}child[100];\nstruct student\n{\n\tint b;\n\tint g;\n}girl[100];\nvoid bubble(struct student a[],int len)\n{\n\tint i, j;\n\tstruct student temp;\n\tfor(j=1; ja[i+1].g)\n\t\t\t{\n\t\t\t\ttemp=a[i];\n\t\t\t\ta[i]=a[i+1];\n\t\t\t\ta[i+1]=temp;\n\t\t\t}\n\t\t}\n\t}\n}\nvoid main()\n{\n\tint i, j, k, n;\n\tchar s[101];\n\tgets(s);\n\tn=strlen(s);\n\tchild[0].sex=1; child[0].num=0;\n\tfor(i=1; i=0;j--)\n\t\t\t{\n\t\t\t\tif (bra[j]!=ch)\n\t\t\t\t\ts++;\n\t\t\t\telse \n\t\t\t\t\ts--;\n\t\t\t\tif (s==0)\t\t\t\t//if find , s should be 0;\n\t\t\t\t{\n\t\t\t\t\tbg[k][0]=j;\t\t\t//bg[k][0] is the boy,while bg[k][1] is the girl\n\t\t\t\t\tbg[k][1]=i;\n\t\t\t\t\tk++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tfor (i=0;i>a;\n\tchar c,d;\n\tint m=0;\n\tc=a[0];\n\tfor (int i=0;i<101;i++)\n\t{\n\t\tif (a[i]=='\\0')\n\t\t\tbreak;\n\t\tm++;\n\t}\n\tfor (int i=0;i>line;\n\tlen=strlen(line);\n\tmale=line[0];\n\thand();\n\treturn 0;\n}\nvoid hand()\n{\n\tint i,j;\n\tfor(i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif(line[j]==male)\n\t\t\t\t{\n\t\t\t\t\tcout<=0;j--)\n\t\t{\n\t\t\tif(s[j]==s[0])\n\t\t\t{\n\t\t\t\ts[j]=' ';\n\t\t\t\tprintf(\"%d %d\\n\",j,a[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\treturn 0;\n}\n\t\n"} +{"label": "77", "index": "38359", "code": "\nint main()\n{\n int c,std,a=0,i=0,flag=1;\n int boy[100]={0};\n while((c=getchar())!='\\n')\n { if(flag==1)\n\t{\n\t\tstd=c;\n\t\tflag=0;\n\t}\n\tif(c==std)\n\t{\n\t\tboy[i]=a;\n\t\ti++;\n\t}\n\telse\n\t{\n\t\tprintf(\"%d %d\\n\",boy[--i],a);\n\t}\n\ta++;\n }\n\treturn 0;\n}\n"} +{"label": "77", "index": "38360", "code": "char\tchi[200];\nchar\tboy, gir;\nint\tpep;\n\nvoid\tzhaoren(int);\n\nint main()\n{\n\tcin.getline(chi, 200);\n\tpep = strlen(chi);\n\tboy = chi[0];\n\tgir = chi[pep - 1];\n\n\tzhaoren(pep);\n\nreturn 0;\n}\nvoid\tzhaoren(int n)\n{\n\tif(n == 0)\n\t{return ;}\n\t\n\tfor (int i = 0; i < pep; i ++)\n\t{\n\t\tif(chi[i] == gir)\n\t\t{\n\t\t\tfor (int j = i; j >= 0; j --)\n\t\t\t{\n\t\t\t\tif(chi[j] == boy)\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\tchi[j] = '#';\n\t\t\t\t\tchi[i] = '#';\n\t\t\t\t\tzhaoren(n - 2);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\nreturn;\n}\n"} +{"label": "77", "index": "38361", "code": "char boy; char girl;\nint mark[10000];int currentmark;\n\nvoid f(int p) //P????????\n{\n\tchar temp;\n\tif (p==0) //??????? ????????\n\t{\tcin>>boy;mark[0]=-1;f(1);} //?????? ???????\n\telse\n\t{\n\t\tcin>>temp;\n\t\tif(temp!=boy) girl=temp; //????????????????????\n\t\n\n\t\tif (temp==boy) //??????\n\t\t{\n\t\t\tmark[p]=p; //???P???????\n\t\t\tcurrentmark=mark[p]; //???????????????\n\t\t\tf(p+1); //???????\n\t\t}\n\t\telse if(temp==girl) //??????\n\t\t{\n\t\t\tcout<=0) f(p+1);\n\t\t\t\n\t\t}\n\t}\n}\n\nint main()\n{\n\tf(0);\n\treturn 0;\n}"} +{"label": "77", "index": "38362", "code": "int main()\n{\n\tvoid row(char x[],int num[],int l,char a,char b);\n\tchar a,b;\n\tint l,m,n,t,i,q;\n\tint num[101]={0};\n\tchar x[101];\n\tgets(x);\n\tl=strlen(x);\n\ta=x[0];\n\tb=x[l-1];\n\trow(x,num,l,a,b);\n\tfor(m=0;mnum[n+3])\n\t\t\t{\n\t\t\t\tt=num[n+1];\n\t\t\t\tnum[n+1]=num[n+3];\n\t\t\t\tnum[n+3]=t;\n\t\t\t\tq=num[n];\n\t\t\t\tnum[n]=num[n+2];\n\t\t\t\tnum[n+2]=q;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i> x;\t\t//??????\n\ta[0] = x;\t\t//????????\n\tm++;\t\t\t//????\n\ti++;\t\t\t//????????\n\t\t\t\t\t//?????????\n\twhile (m!=n)\t\t\t\t\t//?????????????\n\t{\n\t\tcin >> a[i];\n\t\tif (a[i] != x && !judge)\t//??????????\n\t\t{\n\t\t\ty = a[i];\n\t\t\tjudge++;\n\t\t\tn++;\n\t\t}\n\t\telse if (a[i] == x)\t\t\t//???????????? 1\n\t\t\tm++;\n\t\telse\n\t\t\tn++;\n\t\ti++;\n\t}\n\tlen = i++;\t\t\t//????\n\t\t\t\t\t\t\t\t\t\t//????????\n\tfor (i = 1; i <= len / 2; i++)\n\t{\t\t\t\t\t\t\t\t\t//???\n\t\tfor (j = 0; j <= len - 1; j++)\n\t\t{\t\t\t\t\t\t\t\t//???\n\t\t\tif (a[j] == x)\t\t\t\t//?????????\n\t\t\t{\n\t\t\t\tn = j;\n\t\t\t\tn++;\n\t\t\t\t\t\t\t\t\t\t//???????????\n\t\t\t\twhile(a[n] != x && a[n] != y)\n\t\t\t\t\tn++;\n\t\t\t\t\t\t\t\t\t\t//???????????\n\t\t\t\t\t\t\t\t\t\t//????????\n\t\t\t\tif (a[n] == y)\n\t\t\t\t{\n\t\t\t\t\tcout<< j << \" \" << n << endl;\n\t\t\t\t\ta[n] = ' ';\n\t\t\t\t\ta[j] = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//??????????\n\t\t\t}\t\t\n\t\t}\t\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38364", "code": "int b[100];\nint fe(int n)\n{\n\tint i,t=0;\n\tfor(i=0;;i++)\n\t{\n\t\tif(b[i]==0)t++;\n\t\tif(t==n)break;\n\t}\n\treturn i;\n}\nint m(int n)\n{\n\tint i;\n\tfor(i=fe(n)-1;i>=0;i--)\n\t{\n\t\tif(b[i]==1)break;\n\t}\n return i;\n}\nvoid hands(int n)\n{\n\tif(n>1)\n\t{\n\t\thands(n-1);\n\t\tcout<>a;\n for(i=0;a[i]!='\\0';i++)\n\t{\n\t\tif(a[i]==a[0])b[i]=1;\n\t\telse b[i]=0;\n\t}\n\thands(i/2);\n\treturn 0;\n}"} +{"label": "77", "index": "38365", "code": "char boy,girl;\nint n=100;\nchar queue[100];\nint num[100];\nvoid couple(char a[100],int b[100])//???????????????????\n{\nint i;\nfor(i=0;i>queue;\n\nboy=queue[0];//????????\nfor(i=0;queue[i]!=0;i++)//?????????????????????\n{ num[i]=i;}\nfor(i=0;i= 0; j--)\n\t\t\t\tif (a[j] == char1)\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\ta[i] = ' ';\n\t\t\ta[j] = ' ';\n\t\t}\n\t\ti++;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38367", "code": "int len;\nchar ren[100];\nvoid search(char ren[100],int k);\nint main()\n{\n\tcin >> ren;\n\tlen = strlen(ren);\n\tsearch(ren,0);\n\treturn 0;\n}\nvoid search(char ren[100],int k)\n{\n\tint i;\n\tif (k == len - 1) \n\t{\n\t\tcout << 0 << \" \" << len - 1;\n\t\treturn;\n\t}\n\tif (ren[k] == ren[len - 1])\n\t{\n\t\tfor (i = k - 1; i >= 0; i --)\n\t\t\tif (ren[i] == ren[0])\n\t\t\t{\n\t\t\t\tcout << i << \" \" << k << endl;\n\t\t\t\tren[i] = 0;\n\t\t\t\tren[k] = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsearch(ren,k + 1);\n\t}\n\telse\n\t\tsearch(ren,k + 1);\n}\n"} +{"label": "77", "index": "38368", "code": "int main()\n{\n int i,j,num,n[100];\n char kids[100];\n scanf(\"%s\",kids);\n num=strlen(kids);\n for(i=0;i')||(kids[i]=='(' && kids[i+1]==')') || (kids[i]=='{' && kids[i+1]=='}') ||(kids[i]=='[' && kids[i+1]==']'))\n {\n printf(\"%d %d\\n\",n[i],n[i+1]);\n for(j=i;jNext==NULL;\n}\n\nStack CreateStack(void)\n{\n\tStack S;\n\tS=malloc(sizeof(struct Node));\n\tif(S==NULL)\n\t{\n\t\tprintf(\"Out of space!!\");\n\t\texit(0);\n\t}\n\tS->Next=NULL;\n\tMakeEmpty(S);\n\treturn S;\n}\nvoid MakeEmpty(Stack S)\n{\n\tif(S==NULL)\n\t{\n\t\tprintf(\"Must use CreateStack first\");\n\t\texit(0);\n\t}\n\telse\n\t\twhile(!IsEmpty(S))\n\t\t\tPop(S);\n}\nvoid Push(ElementType X,int n,Stack S)\n{\n\tPtrToNode TmpCell;\n\tTmpCell=malloc(sizeof(struct Node));\n\tif(TmpCell==NULL)\n\t{\n\t\tprintf(\"Out of space!!\");\n\t\texit(0);\n\t}\n\telse\n\t{\n\t\tTmpCell->Element=X;\n\t\tTmpCell->num=n;\n\t\tTmpCell->Next=S->Next;\n\t\tS->Next=TmpCell;\n\t}\n}\nint Top(Stack S)\n{\n\tif(!IsEmpty(S))\n\t\treturn S->Next->num;\n\tprintf(\"Empty stack\");\n\treturn 0;\n}\nvoid Pop(Stack S)\n{\n\tPtrToNode FirstCell;\n\tif(IsEmpty(S))\n\t{\n\t\tprintf(\"Empty stack\");\n\t\texit(0);\n\t}\n\telse\n\t{\n\t\tFirstCell=S->Next;\n\t\tS->Next=S->Next->Next;\n\t\tfree(FirstCell);\n\t}\n}\nvoid main()\n{\n\tStack S;\n\tchar a[150];\n\tint i;\n\tgets(a);\n\tS=CreateStack();\n\tfor(i=0;a[i]!='\\0';i++)\n\t{\n\t\tPush(a[i],i,S);\n\t\twhile(!IsEmpty(S)&&S->Next->Next!=NULL&&S->Next->Next->Element!=S->Next->Element)\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",Top(S->Next),Top(S));\n\t\t\tPop(S);\n\t\t\tPop(S);\n\t\t}\n\t}while(!IsEmpty(S));\n\tMakeEmpty(S);\n}\n\n\n"} +{"label": "77", "index": "38370", "code": "\nint a[1111]; //?????????i???????\nchar s[1111];//?????\n\nint i, n = 0;\nint main() {\n cin >> s;\n char b[2];\n b[0]=s[0];\n for (i = 0; s[i]; ++i) //???s?i????\n if (s[i] == b[0]) a[++n] = i; //?????????????\n else cout << a[n--] << \" \" << i << endl;//?????????????????\n return 0;\n}"} +{"label": "77", "index": "38371", "code": "\nint main(int argc, char *argv[])\n{\n char a[101];\n int b[101]={0};\n scanf(\"%s\",&a);\n int len=strlen(a);\n int i,j;\n \n int t=1;\n while(t)\n {\n for(i=0;i= 0; j--)\n {\n if (a[j] == b)\n {\n cout << j << \" \" << i << endl;\n a[i] = a[j] = '*';\n break;\n }\n }\n if (j == 0)\n return;\n match (a, b, g);\n}\nint main()\n{\n char b, g;\n cin >> a;\n b = a[0];\n for (int i = 1; ; i++)\n {\n if (a[i] != a[0])\n {\n g = a[i];\n break;\n }\n }\n match(a, b, g);\n return 0;\n}"} +{"label": "77", "index": "38373", "code": "\n\t\nchar boy_symbol = 0;\t\t\t\t\t\t//boy_symbol?????\n\nint main()\n{\n int Match(int p);\n Match(0);\n return 0;\n}\n\nint Match(int p)\n{\n char ch = cin.get();\t\t\t\t\t\t\t//??????\n\tif (boy_symbol == 0) boy_symbol = ch;\t//?????????????????ch\n if (ch != boy_symbol)\t\t\t\t\t//?????????\n {\n return p;\t\t\t\t\t\t //return?????\n }\n else\t\t\t\t\t\t\t\t\t//?????????\n {\n int t = Match(p + 1);\t\t\t\t//???t????p???????????\n cout << p << \" \" << t << endl;\t\t//??????\n if(p != 0)\t\t\t\t\t\t\t//?????????????\n return Match(t + 1);\t\t\t//??????????????????????????????????????????Match??????????????????\n }\n}"} +{"label": "77", "index": "38374", "code": "int main()\n{\n\tchar c;\n\tcin >>c;\n\tif (c=='(')\ncout <<\"2 3\"<>ch;\n\t\tif (strlen(ch)<30)\n\t\tcout <<\"1 2\"<> str;\n \n len = strlen(str);\n len1 = len;\n boy = str[0];\n girl = str[len-1];\n match(str, len, len1, boy ,girl);\n for(j=0;j=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==1)\n\t\t\t\t{\n\t\t\t\t\tcout<0)\n\t\t{if(queue[i]==girl)\n\t\tbreak;\n\t\ti--;\n\t\t}\n\t\tfindpair(i);\n\t}\n\tfor(i=girlid-1;i>=0;i--)\n\t\tif(queue[i]==boy)\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",i,girlid);\n\t\t\tqueue[i]=0;\n\t\t\tbreak;\n\t\t}\n}\nint main()\n{\n\tint i;\n\tgets(queue);\n\tnumber=strlen(queue);\n\tboy=queue[0];\n\tfor(i=0;i=0;)\n\t{\n\t\tif (kid[i]=='b')\n\t\t{\n\t\t\tcout <> kid;\n\tboy = kid[0]; //???????????\n n = strlen(kid); \n\tgirl = kid[n - 1]; //????????????\n\tpaidui (0, boy, girl);\n\treturn 0;\n}"} +{"label": "77", "index": "38381", "code": "char boy,girl;\nvoid game(char a[1000])\n{\n int i,j,b,g;\n for(i=0;i<1000;i++)\n if(a[i]==girl){for(j=i;j>=0;j--)if(a[j]==boy)break;break;}\n b=j;g=i;\n cout<>a;\n boy=a[0];\n for(i=0;i<1000;i++)if(a[i]!=boy){girl=a[i];break;}\n game(a);\n getchar();getchar();\n return 0;\n}\n"} +{"label": "77", "index": "38382", "code": "void main()\n{\n char str[100],x,y;\n int i,j,k,n,p,a[100];\n gets(str);\n x=str[0];\n i=1;\n for(i=1;i<=100;i++)\n if(a[i]==x) continue;\n else break;\n y=str[i];\n n=strlen(str);\n for(i=0;i<=n-1;i++)\n if(str[i]==x)\n a[i]=0;\n else\n a[i]=1;\n k=n;\n while(k>0)\n {\n p=0;\n for(i=0;i<=n-2;i++)\n {\n if(a[i]==0)\n {\n for(j=i+1;j<=n-1;j++)\n if(a[j]==0)break;\n else\n if(a[j]==1)\n { a[i]=-1;a[j]=-1;k=k-2;printf(\"%d %d\\n\",i,j); p=1; break;}\n } \n if(p==1) break; \n }\n}\n}"} +{"label": "77", "index": "38383", "code": "int main()\n{\n\tchar a[N];\n\tint c,s[N][2];\n\tgets(a);\n\tint sp,len,i;\n\tlen=strlen(a);\n\tsp=0;\n\tc=s[sp][0]=a[0];\n\ts[sp++][1]=0;\n\tfor(i=1; i=0;j--)\n\t\t\t{\n\t\t\t\tif(str[j]==str[0])\n\t\t\t\t{\n\t\t\t\t\tstr[j]=0;\n\t\t\t\t\tcout<> children;\n\tboy = children[0];\n\tcalculate(children);\n\n\treturn 0;\n}\n\nvoid calculate (char children[])\n{\n\tint b, g, i;\n\tfor (i = 0; children[i] != '\\0'; i++)\n\t{\n\t\tif (children[i] == boy)\n\t\t\tb = i;\n\t\tif (children[i] != boy && children[i] != 1)\n\t\t{\n\t\t\tg = i;\n\t\t\tcout << b << \" \" << g << endl;\n\t\t\tchildren[b] = children[g] = 1;\n\t\t\tcalculate (children);\n\t\t\tbreak;\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38386", "code": "\nchar dui[150];\nchar nan;\nchar nv;\nchar dis;\n\n\n\nint main()\n{\n void deleted();\nvoid peidui(int * left , int * right);\nint iter,index,left,right;\n gets(dui);\n nan = dui[0];\n index = 1;\n while(dui[index] != '\\0')\n {\n if(dui[index] != nan)\n {\n nv = dui[index];\n break;\n }\n index++;\n }\n deleted();\n index = strlen(dui)/2;\n for(iter = 0 ; iter != index ; ++iter)\n {\n peidui(&left,&right);\n printf(\"%d %d\\n\",left,right);\n }\n return 0;\n}\n\nvoid deleted()\n{\n if('#' != nan && '#' != nv)\n {\n dis = '#';\n }\n else if('@' != nan && '@' != nv)\n {\n dis = '@';\n }\n else if('$' != nan && '$' != nv)\n {\n dis = '$';\n }\n}\n\nvoid peidui(int * left , int * right)\n{\n int index = 0;\n int boysready = 0;\n while(dui[index] != '\\0')\n {\n if(dui[index] == nan)\n {\n boysready = 1;\n *left = index;\n }\n else if(dui[index] == nv)\n {\n if(boysready)\n {\n *right = index;\n break;\n }\n }\n index++;\n }\n dui[*left] = dui[*right] = dis;\n}"} +{"label": "77", "index": "38387", "code": "int main()\n{\n\tint a[1000] = {0}, b[1000] = {0}, l, i, j, k, n = 0;\n\tchar str[1000];\n\tcin >> str;\n\tl = strlen(str);\n\tfor(i = 0; i <= l; i++)\n\t{\n\t\tif(str[i] == str[0])\n\t\t\ta[i] = 1;\n\t\telse\n\t\t\ta[i] = 2;\n\t}\n\tfor(j = 0; j <= l - 1; j++)\n\t{\n\t\tif(a[j] == 2)\n\t\t{\n\t\t\tfor(k = j - 1; k >= 0; k--)\n\t\t\t{\n\t\t\t\tif(a[k] == 1)\n\t\t\t\t{\n\t\t\t\t\tcout << k << \" \" << j << endl;\n\t\t\t\t\ta[j] = 0;\n\t\t\t\t\ta[k] = 0;\n\t\t\t\t\tj = 0;\n\t\t\t\t\tk = 0;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n"} +{"label": "77", "index": "38388", "code": "\n int i,l,count;\n char s[101];\n int a[101],y[101];\n\nvoid ry(int y[])\n{\n int i,j;\n if(count==l)\n return;\n for(i=0;i=l)\n continue; \n if((a[i]==0)&&(a[j]==1))\n {\n y[i]=0;\n y[j]=0;\n count+=2;\n printf(\"%d %d\\n\",i,j);\n ry(y);\n return; \n }\n }\n}\n\n\nint main()\n{\n\n \n\n gets(s);\n l=strlen(s);\n \n for(i=0;i> children;\n boy = children[0];\n f(0);\n\n return 0;\n}\n"} +{"label": "77", "index": "38390", "code": "char Boy,Girl;\nchar queue[100];\nint FindPartner(int i)\n{\n\tif(queue[i+1]==Girl)\n\t{\n\t\tcout<>queue;\n\tint l=strlen(queue);\n\tBoy=queue[0];\n\tGirl=queue[l-1];\n\tFindPartner(0);\n\treturn 0;\n}"} +{"label": "77", "index": "38391", "code": "int main()\n{\n\tchar a[100];\n\tgets(a);\n\tint l=strlen(a);\n\tint p[100]={0};\n\tfor(int i=0;i=0;j--)\n\t\t\t{\n\t\t\t\tif((a[j]==a[0])&&(p[j]==0)) //???????????\n\t\t\t\t{\n\t\t\t\t\tp[j]=i;\n\t\t\t\t\tp[i]=-1;\n\t\t\t\t\tcout<=0;j--)\n\t\t\t\t{\n\t\t\t\t\tif(s[j]==m)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\t\ts[i]='p';\n\t\t\t\t\t\ts[j]='q';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tbreak;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38394", "code": "void main()\n{\n\tvoid f(char s[],int n,int m);\n\tchar s[100];\n\tint n;\n\tgets(s);\n\tn=strlen(s);\n\tf(s,n,0);\n}\nvoid f(char s[],int n,int m)\n{\n\tint i,b,g;\n\tchar *s2;\n\tif(n==2)\n\t\tprintf(\"%d %d\\n\",m,m+1);\n\telse\n\t{\n\t\tb=0;\n\t\tg=0;\n\t\tfor(i=0;;i++)\n\t\t{\n\t\t\tif(s[i]==s[0])\n\t\t\t\tb++;\n\t\t\telse\n\t\t\t\tg++;\n\t\t\tif(b==g)\n\t\t\t\tbreak;\n\t\t}\n\t\tif(i==n-1)\n\t\t{\n\t\t\ts2=s+1;\n\t\t\tf(s2,n-2,m+1);\n\t\t\tprintf(\"%d %d\\n\",m,m+n-1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tf(s,i+1,m);\n\t\t\ts2=s+i+1;\n\t\t\tf(s2,n-i-1,m+i+1);\n\t\t}\n\t}\n}\n\n"} +{"label": "77", "index": "38395", "code": "// ???:??????\n// ??:????\n// ????:2011.11.20\nvoid boy(int);\nchar a[100],ch;\nint j=0,flag=0;\n\nvoid boy(int i)\n{\n\tdo\n\t{\n\tif(flag==1)\n\t\treturn;\n\ta[j]=cin.get();\n\tif(j==0)\n\t\tch=a[j];\n\tif (a[j]==ch)\n\t{\n\t\tj++;\n\t\tboy(j-1);\n\t}\n\telse\n\t{\n\t\tcout<> line;\n\tint sum;\n\tsum = strlen(line);\n\tint i, j, k;\n\tboy = line[0];\n\tfor (i = 1; i <= sum - 1; i++) // ?????????\n\t{\n\t\tif (line[i] != boy)\n\t\t{\n\t\t\tgirl = line[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (j = 1; j <= sum - 1; j++)\n\t{\n\t\tif (line[j] != boy)\n\t\t{\n\t\t\tfor (k = j - 1; k >= 0; k--)\n\t\t\t{\n\t\t\t\tif (line[k] == boy)\n\t\t\t\t{\n\t\t\t\t\tcout << k << \" \" << j << endl;\n\t\t\t\t\tline[k] = girl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38398", "code": "\n\nint match(int);\nchar a[105], b;\n\nint main()\n{\n\tcin >> a;\n\n\tb = a[0];\n\n\tmatch(0);\n\n\treturn 0;\n}\n\nint match(int p)\n{\n\tif (a[p] == b)\n\t{\n\t\tint q = match(p + 1);\n\t\tcout << p << \" \" << q << endl;\n\t\treturn match(q + 1);\n\t}\n\telse\n\t\treturn p;\n}"} +{"label": "77", "index": "38399", "code": "\nvoid duilie(char a[])\n{\n\tint i, j;\n\tfor (i = 0; i < strlen(a); i++)\n\t{\n\t\tif (a[i] == 'w')\n\t\t{\n\t\t\tfor (j = i - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tif (a[j] != '0') \n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = '0';\n\t\t\t\t\ta[i] = '0';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\n}\n\nint main()\n{\n\tchar s[101];\n\tint i;\n\tcin.getline(s, 101);\n\tfor (i = 1; i < strlen(s); i++)\n\t{\n\t\tif (s[i] == s[0]) s[i] = 'm';\n\t}\n\ts[0] = 'm';\n\tfor (i = 0; i < strlen(s); i++)\n\t{\n\t\tif (s[i] != 'm') s[i] = 'w';\t\n\t}\n\tduilie(s);\n\n\treturn 0;\n}\n"} +{"label": "77", "index": "38400", "code": "\nchar boy;\n\nint res(char str[], int n, int idx)\n{\n\tif (str[idx] == boy)\n\t{\n\t\tint ridx = res(str, n, idx + 1);\n\t\tcout << idx << \" \" << ridx << endl;\n\t\tif (ridx < n - 1)\n\t\t{\n\t\t\tridx = res(str, n, ridx + 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tridx = ridx + 1;\n\t\t}\n\t\treturn ridx;\n\t}\n\telse\n\t{\n\t\treturn idx;\n\t}\n}\nint main()\n{\n\tchar str[102];\n\tcin >> str;\n\tboy = str[0];\n\tres(str, strlen(str), 0);\n\treturn 0;\n}\n\n"} +{"label": "77", "index": "38401", "code": "void main()\n{\nchar text[200],a,b; int i,j;\ngets(text);printf(\"\\n\");\na=text[0]; \nfor(i=0;i=0;j--) if(text[j]==a) \n {text[j]='c'; printf(\"%d %d\\n\",j,i);break;}}}\n}\n\n"} +{"label": "77", "index": "38402", "code": "char queen[1000];\n// int main()\n// {\n// \tcin >> queen;\n// \tint len = strlen(queen);\n// \tchar a, b;\n// \tint cnt = 0;\n// \tint boy[1000] = {0};\n// \ta = queen[0];\n// \tb = queen[len - 1];\n// \tfor (int i = 0; i < len; i++)\n// \t{\n// \t\tif (queen[i] == a)\n// \t\t{\n// \t\t\tboy[cnt] = i;\n// \t\t\tcnt ++;\n// \t\t}\n// \t\tif (queen[i] == b)\n// \t\t{\n// \t\t\tcnt --;\n// \t\t\tcout << boy[cnt] << ' ' << i << endl;\n// \t\t}\n// \t}\n// \twhile(EOF!=getchar());\n// \treturn 0;\n// }\n\tchar a, b;\n\tint cnt = 0;\n\tint len;\nint match(char *);\nint main()\n{\n\tcin.getline(queen,1000);\n\tlen = strlen(queen);\n\n\ta = queen[0];\n\tb = queen[len - 1];\n\tchar *p = queen;\n\tmatch(p);\n\twhile(EOF!=getchar());\n\treturn 0;\n}\n\nint match(char *p)\n{\n\tint q;\n\tif (*p == b)\n\t{\n\t\treturn p - queen;\n\t}\n\telse\n\t{\n\t\tq = match(p + 1);\n\t\tcout << p - queen << ' ' << q << endl;\n\t\tcnt ++;\n\t\tif (cnt < len / 2)\n\t\t{\n\t\t\t\t\treturn match(q + queen + 1);\n\t\t}\n\t\t\n\t}\n\n}"} +{"label": "77", "index": "38403", "code": "char a;\nchar b;\nchar s[10000];\nint numa=1;\nint numb=0;\nint ida[10000];\nint idb[10000];\nvoid test(int x);\nint main()\n{\n\tscanf(\"%c\",&a);\n\ts[0]=a;\n\tint i;\n\tfor(i=1;;i++)\n\t{\n\t\tscanf(\"%c\",&s[i]);\n\t\tif(s[i]==a)\n\t\t{\n\t\t\tnuma++;\n\t\t}\n\t\telse if(s[i]!=a)\n\t\t{\n\t\t\tb=s[i];\n\t\t\tnumb++;\n\t\t}\n\t\tif(numa==numb)break;\n\t}\n\ttest(0);\n\tfor(i=0;i<(numa+numb)/2;i++)\n\t{\n\t\tprintf(\"%d %d\\n\",ida[i],idb[i]);\n\t}\n\treturn 0;\n}\n\nvoid test(int x)\n{\n\tint i;\n\tfor(i=0;i=0;j--)\n\t\t{\n\t\t\tfor (k=j;k<=i;k++) if (a[k]==b) sum++;\n\t\t\tif (sum==(i-j+1)/2.0) \n\t\t\t{\n\t\t\t\tsum=0;\n\t\t\t\tcout<=0;j--)\n\t\t\t{\n\t\t\t\tif(a[j]==a[0])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,b[i]);\n\t\t\t\t\ta[j]=48;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38406", "code": "\nvoid bubble(int x[][2],int n) //Êý\u00d7\u00e9Ã\u00b0ÅÝ £¬nΪÊý\u00d7\u00e9³\u00a4¶È\n{\n int i,j,y;\n for(i=1;ix[j+1][1])\n {\n y=x[j][0];\n x[j][0]=x[j+1][0];\n x[j+1][0]=y;\n\t\t\t\ty=x[j][1];\n x[j][1]=x[j+1][1];\n x[j+1][1]=y;\n\t\t\t\t\n } \n } \n } \n} \n\nint main()\n{\n int i,j,k,t,x[100][2],n=0;\n\tchar s[150],a,b;\n\n\tscanf(\"%s\",s);\n\n\ta=s[0];\n\tfor(i=1;s[i];i++)\n\t{\n\t if(s[i]!=a)\n\t {\n\t b=s[i];\n\t\t break;\n\t }\n\t}\n\tif(s[0]==a)\n\t{\n\t for(j=0;s[j];j++)\n\t\t{\n\t\t \n \t for(k=0;s[k];k++)\n\t\t\t{\n\t\t\t//\tsign=0;\n\t\t\t if(s[k]==a)\n\t\t\t {\n\t\t\t for(t=k+1;s[t];t++)\n\t\t\t\t {\n\t\t\t\t if(s[t]==b)\n\t\t\t\t\t {\n\t\t\t\t\t s[k]='a';\n\t\t\t\t\t\t s[t]='a';\n\t\t\t\t\t x[n][0]=k;\n\t\t\t\t\t\t x[n][1]=t;\n\t\t\t\t\t\t n++;\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\t else if(s[t]==a)\n\t\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n/*\telse\n\t{\n\t for(j=0;s[j];j++)\n\t\t{\n\t\t \n \t for(k=0;s[k];k++)\n\t\t\t{\n\t\t\t//\tsign=0;\n\t\t\t if(s[k]==')')\n\t\t\t {\n\t\t\t for(t=k+1;s[t];t++)\n\t\t\t\t {\n\t\t\t\t if(s[t]=='(')\n\t\t\t\t\t {\n\t\t\t\t\t s[k]='a';\n\t\t\t\t\t\t s[t]='a';\n\t\t\t\t\t\t printf(\"%d %d\\n\",k,t);\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\t else if(s[t]==')')\n\t\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}*/\n \n\tbubble(x,n);\n\tfor(i=0;i0;j--)\n\t\t{\n\t\t\tif (ch[j]==b) k--;\n\t\t\telse k++;\n\t\t}\n\t\tcout<= 0; k--)\n {\n if (a[k] == flag[0])\n {\n cout << k << \" \"<< i << endl;\n a[i] = '0';\n a[k] = '0';\n break;\n }\n }\n }\n }\n return 0;\n}"} +{"label": "77", "index": "38409", "code": "int main()\n{\n\tint n,a[100]={0},flag,i,j;\n\tchar c[100],b[2];\n\tcin>>c;\n\tn=strlen(c);\n\tb[0]=c[0];\n\tb[1]=c[n-1];\n\tfor(int k=1;k<=n/2;k++)\n\t{\n\t\tflag=0;\n\t\tfor(i=0;i=0;k--)\n if(s[k]==b && e[k])\n {e[k]='\\0';\n printf(\"%d %d\\n\",k,i);\n break;\n }\n i++;\n }\n}\nreturn 0;\n}\n"} +{"label": "77", "index": "38411", "code": "\n\nint main()\n{\n int n,i,j,k[101];\n char a[101],b,g;\n scanf(\"%s\",a);\n n=strlen(a);\n for(i=0;i0)\n {\n for(i=0;i> str;\n\n\t m = str[0];\n\t \n\t int i = 0;\n\t while(str[i] == m)\n\t\t i++;\n\t f = str[i];\n for (i = 'A' ; i <= 'z'; i++)\n\t\t if (i != m && i != f)\n\t\t {\n\t\t\t flag = i;\n\t\t\t break;\n\t\t }\n\t paidui(str, 0);\n\t return 0;\n}\n"} +{"label": "77", "index": "38414", "code": "void main()\n{\n\tchar a[100];\n\tint x,i,j,p;\n\tscanf(\"%s\",a);\n\tx=strlen(a);\n\tp=0;\n\twhile(p> ch;\n len = strlen(ch);\n a = ch[0] ;\n b = ch[len - 1];\n pick( 0 , len - 1 );\n return 0;\n}\n"} +{"label": "77", "index": "38417", "code": "int main()\n{\n char a[100];\n void peidui(char a[],int n);\n int i=1;\n a[0]=cin.get();\n while((a[i]=cin.get())!='\\n')i++;//?????\n peidui(a,0); //????????\n return 0; //????????\n} //????????????\nvoid peidui(char a[],int n)\n{\n\n while(a[n]==a[0]||a[n]==0)n++;\n int i;i=n; //????????????\n do{i--;}while(a[i]==0); //???????????\n cout<0;n++){\n\t\tscanf(\"%c\",&ch);\n\t\tif(ch==boy){\n\t\t\tnum[p]=n;\n\t\t\tp++;\n\t\t}\n\t\telse{\n\t\t\tprintf(\"%d %d\\n\",num[p-1],n);\n\t\t\tp--;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38419", "code": "//?????????????????????????????????????????????????????????0??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\n\nint n=0;\nchar ch;\n\nvoid fun(int left) //??????left???\n{\n\tch=getchar();n++;\n\twhile ((ch=='(')||(ch=='{')||(ch=='[')||(ch=='<'))\n\t{\n\t\tfun(n);\n\t\tch=getchar();\n\t\tn++;\n\t}\n\tcout<= 0; j --)\n\t\t\t{\n\t\t\t\tif(a[j] == boy)\n\t\t\t\t{\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\ta[j] = '1';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38421", "code": "//*******************\n// 1.cpp \n// ?? 1200018415\n// 2012 11 27\n//*******************\n\nchar str[101], b, g;\nint match(int, char, char);\n\nint main()\n{\n\t\n\tint len, i;\n\tcin >> str; \n\tlen = strlen(str);\n\tb = str[0];\n\tg = str[len - 1];\n\tmatch(0, b, g); // ????\n\treturn 0;\n}\n\nint match(int n, char b, char g)\n{\n\tfor (int i = n; str[i] != '\\0'; i++)\n\t{\n\t\twhile (str[n] == '*') // ???????\n\t\t{\n\t\t\tn++; // ????\n\t\t}\n\t\tif (str[i] == b) // ?????\n\t\t{\n\t\t\tstr[i] = '*'; // ????\n\t\t\tint k = match(n + 1, b, g); // ??????\n\t\t\tcout << n << \" \" << k << endl;\n\t\t}\n\t\telse\n\t\t\tif (str[i] == g) // ?????\n\t\t\t{\n\t\t\t\tstr[i] = '*'; // ??\n\t\t\t\treturn n; // ?????\n\t\t\t}\n\t}\n}\n\n\n\n\n"} +{"label": "77", "index": "38422", "code": "void main()\n{\n\tchar str[100],c;\n\tint i,j,p,n,b[100],a[100];\n\tscanf(\"%s\",str);\n for(i=j=0;(c=str[i])!='\\0';i++)\n\t{\n if(c!=str[0])b[j++]=i;\n\t}\n\tn=j;\n\tfor(j=0;j= 0; t--)\n\t\t\t{\n\t\t\t\tif (m[t] == boy)\n\t\t\t\t{\n\t\t\t\t\tnum ++;\n\t\t\t\t\tm[t] = '.'; //?????????????????\u0091.\u0092\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tcout << t << \" \" << i << endl; //??????????\n\tsearch(i + 1); //??????????????????????\n}\n\nint main()\n{ \n\tcin >> m; //??????\n\tlen = strlen(m); //???????\n\tboy = m[0]; //????????\n\tgirl = m[len - 1]; //????????\n\tsearch(0); //????search\n\treturn 0;\n}"} +{"label": "77", "index": "38424", "code": "void main()\n{\n\tchar c[100]={0},c1,c2;\n\tint p[100]={0},i,n=0,j,m;\n\tgets(c);\n\ti=0;\n c1=c[0];\n\tc2=c[1];\n\twhile (c[i]!=0)\n\t{\n\t\tif(c[i]==c1) p[i]=1;\n\t\telse p[i]=-1;\n\t\ti++;\n n++;\n\t}\n\tdo\n\t{\n m=0;\n\t\tfor(i=0;i>kids;\n\tlen=strlen(kids);\n\tboy=kids[0];\n\tgirl=kids[len-1];\n\tpaidui(kids);\n\treturn 0;\n}\nvoid paidui(char kids[])\n{\n\tint i=0,j;\n\twhile(kids[i]!=girl)\n\t\ti++;\n\tj=i;\n\twhile(kids[j]!=boy)\n\t\tj--;\n\tcout<> a;\n\tb = a[0];\n\tfind(0);\n\tcin.get();\n\tcin.get();\n\treturn 0;\n}\n\nint find(int j)\n{\n\tw = j;\n\tif(a[j] != b)\n\t\treturn j;\n\telse\n\t{\n\t\tcout << j << \" \" << find(j+1) << endl;\n\t\treturn find(w+1);\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38427", "code": "int main()\n{\n int i,j,p;\n char a[100],m,n;\n scanf(\"%s\", a);\n p=strlen(a);\n m=a[0];\n for(i=1;i<=p/2;i++) if(a[i]!=m) {n=a[i]; break;}\n for(i=i;i<=p-1;i++) if(a[i]==n) for(j=i;j>=0;j--) if(a[j]==m)\n {\n printf(\"%d %d\\n\", j, i);\n a[j]=' ';\n break;\n }\n return 0;\n}\n"} +{"label": "77", "index": "38428", "code": "\n\n\nvoid function( char (*p)[101] , int num , int num1 , char a , char b )\n{\n\tif( num1==num/2-1 )\n\t{\n\t\tcout<<0<<' '<=0 ; j-- )\n\t\t\t\t{\n\t\t\t\t\tif( *(*p+j)==a )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<>c[0];\n\ta=c[0][0];\n\tb=c[0][strlen(c[0])-1];\n\tfor( int i=0 ; i> b;\n\twhile(top >= 0)\n\t{\n\t\tcin >> a;\n\t\tsum++;\n\t\tif(a == b)\n\t\t{\n\t\t\ts[++top] = sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout << s[top] << \" \" << sum<< endl;\n\t\t\ttop--;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38430", "code": "char dui[1000], male, female;\nvoid rankgame(int left, int right)\n{\n\tif(left == -1)return;\n\tif(dui[right] == male)\n\t{\n\t\tleft = right;\n\t\tright++;\n\t\trankgame(left, right);\n\t}\n\tif(dui[left] == 0)\n\t{\n\t\tleft --;\n\t\trankgame(left, right);\n\t}\n\tif(dui[left] == male && dui[right] == female)\n\t{\n\t\tcout << left << ' ' << right << endl;\n\t\tdui[left] = 0;dui[right] = 0;\n\t\tleft --;\n\t\tright ++;\n\t\trankgame(left, right);\n\t}\n}\nint main()\n{\n\tcin.getline(dui, 1000, '\\n');\n\tmale = dui[0], female = dui[strlen(dui) - 1];\n\trankgame(0, 1);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38431", "code": "int main()\n{\n int i,j;\n char x,y;\n int a[100];\n char s[100];\n scanf(\"%s\",s);\n j=0;\n for(i=0;i<100;i++)\n a[i]=-1;\n x=s[0];\n for(i=0;i=0;j--)\n\t\tif(a[j]==q) break;\n\tcout<>a;\n\tpipei(a);\n}\n"} +{"label": "77", "index": "38433", "code": "\nint kiss(char ch[], char b, char g, int l, int i){\n\tint boy;\n\tint j;\n\tif(ch[i]!=g) boy=-1;\n\telse{\n\t\tfor(j=i-1; j>=0; j--){\n\t\t\tif(ch[j]==b){\n\t\t\t\tboy=j;\n\t\t\t\tch[i]='\\0';\n\t\t\t\tch[j]='\\0';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse;\n\t\t}\n\t}\n\treturn(boy);\n}\n\n\n\nmain(){\n\tchar ch[5000], b, g;\n\tint i, l, girl, boy;\n\tscanf(\"%s\", ch);\n\tl=strlen(ch);\n\tb=ch[0];\n\tfor(i=1; i=0;j--)\n {\n if (A[j]==b)\n {\n A[j]='\\0';\n break;\n }\n }\n cout<>A;\n b=A[0];\n l=strlen(A);\n for (a=1;a girl? (girl - 1) : (boy - 1);\n\tdo\n\t{\n\t\tfor(int i = 1; i < l; i++)\n\t\t{\n\t\t\tif(children[i] == left)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(children[i] == girl)\n\t\t\t{\n\t\t\t\tfor(int j = i - 1; j >= 0; j--)\n\t\t\t\t{\n\t\t\t\t\tif(children[j] == left)\n\t\t\t\t\t{\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(children[j] == girl)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\t\tchildren[i] = left;\n\t\t\t\t\t\tchildren[j] = left;\n\t\t\t\t\t\tcnt += 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}while(cnt != l);\n\treturn 0;\n}"} +{"label": "77", "index": "38438", "code": "void a(char t[],int k)\n{int i,j;\nif(t[0]!=0)\n{for(i=0;i>t;\nfor(i=0;i<100;i++)\n{if(t[i]==0)\nbreak;} \nk=i;\na(t,k);\n\nreturn 0;\n\n \n }\n"} +{"label": "77", "index": "38439", "code": "char m[100],boy,girl;\nint len;\nvoid C();\nint findgirl(int);\nint main(){\n\tint i=0;\n\tcin>>m;\n\tboy=m[0];\n\twhile(m[i]!='\\0'){\n\t\tif(m[i]!=boy){\n\t\t\tgirl=m[i];\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t\ti++;\n\t}\n\tlen=strlen(m);\n\tfor(i=0;i=0;j--)\n\t{\n\t\tif(a[j]==m)\n\t\t{\n\t\t\tcout<>a;\n\tm=a[0];\n\tint i;\n\tfor(i=0;i<=999;i++)\n\t{\n\t\tif(a[i]!=m)\n\t\t{\n\t\t\tf=a[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tmatch(a,m,f);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38441", "code": "int main()\n{\n\tchar a[1000];\n\tint n,x,m;\n\tgets(a);\n\tfor(n=0,x=1;a[n]!='\\0';n++)\n\t{\n\t\tif(a[n]==a[0])x=0;\n\t\telse if(a[n]!=' ')\n\t\t{\n\t\t\tfor(m=n-1;m>=0;m--)\n\t\t\t\tif(a[m]==a[0])\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d \",m);\n\t\t\t\t\ta[m]=' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tprintf(\"%d\\n\",n);\n\t\t\ta[n]=' ';\n\t\t\tn=0;\n\t\t\tx=1;\n\t\t}\n\t\tif(a[n+1]=='\\0')break;\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38442", "code": "int main()\n{\n\tchar s[222];\n\tint i=1,j,k,len;\n\tgets(s);\n\tlen=strlen(s);\n\tchar a,b;\n\ta=s[0];\n\tb=s[len-1];\n\tfor (i;i<=len-1;i++)\n\t{\n\t\tk=i;\n\t\tif (s[k]==b)\n\t\t{\n\t\t\tj=i;\n\t\t\tfor (i=j-1;i>=0;i--)\n\t\t\t{\t\n\t\t\t\tif(s[i]==a)\n\t\t\t\t{\n\t\t\t\t\ts[i]='0';s[j]='0';\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "77", "index": "38443", "code": "int main()\n{\n\tchar a[100];\n\tint b[100],c[100];\n\tint i,n,j=0,k=0;\n\tscanf(\"%s\",a);\n\tfor(i=0;i')){\n\t\t\tc[k++]=b[j-1];\n\t\t\tc[k++]=i;\n\t\t\tj--;\n\t\t}\n\t}\n\tfor(i=0;i=0;j--)\n {\n if(a[j]!=a[i]&&((i-j-1)%2)==0&&a[j]!=0)\n {\n a[j]=0;\n a[i]=0;\n printf(\"%d %d\\n\",j,i);\n break;\n }\n }\n }\n }\n\n\n}"} +{"label": "77", "index": "38447", "code": "struct children\n{\n\tchar bracket;\n\tint code;\n};\nchar boy,girl;\n\nvoid main()\n{\n\tvoid func(struct children chd[],int n);\n\tint scan(struct children *p,char string[100]);\n\tstruct children chd[100]={'\\0',0};\n\tstruct children *p;\n\tp=chd;\n\tchar str[100];\n\tscanf(\"%s\",str);\n\tint len=scan(p,str);\n boy=str[0];\n int point=0;\n\tfor(point=0;pointbracket=string[i];\n\t\tp->code=i;\n\t\tp+=1;\n\t\ti+=1;\n\t}\n\treturn(i);\n}\nvoid exile(struct children chd[],int friendcode,int lenx)\n{\n\tint k=0;\n\tfor(k=friendcode;k> queue;\n\tdo\n\t{\n\t\tlength++;\n\t} while (queue[length] != '\\0'); //??????\n\tboy = queue[0];\n\ti = 0;\n\tdo\n\t{\n\t\ti++;\n\t} while (queue[i] == boy);\n\tgirl = queue[i]; //???????????\n\tprocess(); //????\n\treturn 0;\n}"} +{"label": "77", "index": "38449", "code": "int i;\nint num;\nchar s[102];\n\tchar c1 ;\n\tchar c2;\nint sol()\n{\n\tif(i >= num)\n\t\treturn -1;\n\tint n = i;\n\tchar b = s[i++];\n\tif(b == c1)\n\t{\n\t\tcout<>s;\n\tnum = strlen(s);\n\tc1 = s[0];\n\tfor(int i = 1;i> a;\n\tchar b = a[0];\n\tint l = strlen(a);\n\tchar g = a[l - 1];\n\tfor (int i = 0; i < l && a[i] != '*'; i++)\n\t{\n\t\tif (a[i] == g)\n\t\t{\n\t\t\ta[i] == '*';\n\t\t\tfor (int j = i; j >= 0;j--)\n\t\t\t{\n\t\t\t\tif (a[j] == b && a[j] != '*') \n\t\t\t\t{\n\t\t\t\t\ta[j] = '*';\n\t\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "77", "index": "38451", "code": "int main()\n{\n char a[100][100];\n scanf(\"%s\",a[0]);\n int n;\n n=strlen(a[0]);\n int b[100][100];\n int i,j,k;\n for(i=0;ib[j+1][1])\n\t\t\t{t=b[j+1][1];b[j+1][1]=b[j][1];b[j][1]=t;\n\t\t\tt=b[j+1][0];b[j+1][0]=b[j][0];b[j][0]=t;}\n\tfor(i=0;i=0;j--){//??????????\n \t\t\t if(a[j]==a[0])\n \t\t\t { cout<=0;i--)\n\t\t\t\t{\n\t\t\t\t\tif(b[i]==1)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\tprintf(\"%d %d\\n\",i,j);\n\t\t\t\t\tb[i]=0;\n\t\t\t\t\tb[j]=0;\n\t\t\t}\n\t\t}\n\t}\n\t\treturn 0;\n}"} +{"label": "77", "index": "38455", "code": "int main()\n{\n\tchar a[101],c;\n\tint l,sp=0,i,j=1,b[100];\n\tgets(a);\n\tl=strlen(a);\n\tc=a[0];\n\tb[0]=0;\n\tfor(i=1;i=0)//?????????????????\n\t\t\ti--;\n\t\tchildren[i]='\\0';//??????\n\t\tchildren[j]='\\0';\n\t\tif(j==sum-1)//????????\n\t\t\tcout<= 0; j--)\n\t\t\t\t{\n\t\t\t\t\tif (s[j] == boy)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d %d\\n\", j, i);\n\t\t\t\t\t\ts[i] = null;\n\t\t\t\t\t\ts[j] = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38460", "code": "void main()\n{\n\tint i,j,k,n,num[101];\n char a[101],B,G;\n\tgets(a);\n\tn=strlen(a); //n???\n\tB=a[0]; //??????????\n\tG=a[n-1];\n for(i=0;i<=n-1;i++) //??????\n\t\tnum[i]=i;\n for(i=1;i<=(n/2);i++) //?i?\n\t\tfor(j=0;j<=((n-1)-2*(i-1)-1);j++) //???i??a?????\n\t\t{\n if(a[j]==B&&a[j+1]==G)\n\t\t\t{\n\t\t\t\tprintf(\"%d %d\",num[j],num[j+1]);\n\t\t\t\tprintf(\"\\n\");\n for(k=j+2;k<=((n-1)-2*(i-1));k++)\n\t\t\t\t{\n\t\t\t\t\ta[k-2]=a[k];\n\t\t\t\t\tnum[k-2]=num[k];\n\t\t\t\t}\n\t\t\t\tj=-1;\n\t\t\t}\n\t\t}\n}\n\n"} +{"label": "77", "index": "38461", "code": "int counter=0;\nvoid match()\n{\n char temp;\n temp=cin.get();\n int num1=counter++;\n while(cin.peek()==temp)\n match();\n cin.get();\n cout<=0)\t//0??????????????????0\n\t\t{\t\n\t\t\tcout<= 0; k--)\n\t\t\t{\n\t\t\t\tif(c[k] == b)\n\t\t\t\t{\n\t\t\t\t\ta[i][0] = k;\n\t\t\t\t\tc[k] = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(i < n / 2 - 1)\n\t\tcombine(c, i + 1);\n}\n\t\n\nint main()\n{\n\tint j, k, t;\n\tcin >> c;\n\tn = strlen(c);\n\tb = c[0];\n\tcombine(c, 0);\n\tfor(j = 0; j < n / 2 - 1; j++)\n\t{\n\t\tfor(k = 0; k < n / 2 - j - 1; k++)\n\t\t{\n\t\t\tif(a[k][1] > a[k + 1][1])\n\t\t\t{\n\t\t\t\tt = a[k + 1][1];\n\t\t\t\ta[k + 1][1] = a[k][1];\n\t\t\t\ta[k][1] = t;\n\t\t\t\tt = a[k + 1][0];\n\t\t\t\ta[k + 1][0] = a[k][0];\n\t\t\t\ta[k][0] = t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j = 0; j < n / 2; j++)\n\t{\n\t\tcout << a[j][0] << \" \" << a[j][1] << endl;\n\t}\n\treturn 0;\n}\n\t\t\n\n\n\n\n\n"} +{"label": "77", "index": "38464", "code": "int main()\n{\n char a[110];\n int i=0,j,k,l,t1,t2;\n for(;;)\n {\n a[i]=getchar();\n if(a[i]=='\\n') break;\n i++;\n }\n l=i-1;\n for(i=0;i<=l;i++)\n {\n if(a[i]!=a[0])\n {\n a[i]=0;\n for(j=i;j>=0;j--)\n {\n if(a[j]==a[0])\n {a[j]=0;\n cout<> a;\n\tl = strlen(a);\n\tb = a[0];\n\tfor(int i = 1; i < l; i++)\n\t{\n\t\tif(a[i] != b)\n\t\t{\n\t\t\tg = a[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tcouple(l);\n\treturn 0;\n}\n"} +{"label": "77", "index": "38466", "code": "void f(char a[1000], char b, char g, int len, int k)\n{\n\tint i, j;\n\n while(k < len - 1)\n\t{\n\tfor(i = k;i < len;i++)\n\t{\n\t\tif(a[i] == g) break;\n\t}\n \n\tfor(j = i-1;j > 0;j--)\n\t{\n\t\tif(a[j] == b) break;\n\t}\n\tif(i == len) break;\n\tcout << j << \" \" <=0;j--)\n\t\t\t{\n\t\t\t\tif(s[j]==a)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"%d %d\\n\",j,i);\n\t\t\t\t\ts[j]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "77", "index": "38469", "code": "\nchar str[100];\n\nint match(char str[], char b, char g)\n{\n\tint i, j;\n\tfor(i = 0; str[i] != '\\0'; i++)\n\t{\n\t\tif(str[i] == g)\n\t\t\tbreak;\n\t}\n\tif(str[i] == '\\0')\n\t\treturn 0;\n\tfor(j = i; j >= 0; j--)\n\t{\n\t\tif(str[j] == b)\n\t\t{\n\t\t\tcout << j << \" \" << i << endl;\n\t\t\tbreak;\n\t\t}\n\t}\n\tstr[i] = '#';\n\tstr[j] = '#';\n\tmatch(str, b, g);\n}\n\nint main()\n{\n\tchar b, g;\n\tcin >> str;\n\tb = str[0];\n\tint i, length;\n\tlength = strlen(str);\n\tfor(i = 0; i < length; i++)\n\t{\n\t\tif(str[i] != b)\n\t\t{\n\t\t\tg = str[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tmatch(str, b, g);\n\treturn 0;\n}\n\n\n\n"} +{"label": "77", "index": "38470", "code": "void main()\n{\n\tint l,i,t=0,n=0,j,x,y;\n\tint B[50]={0},G[50]={0};\n\tchar a[100];\n\tchar b,g;\n\tgets(a);\n\tl=strlen(a);\n\tb=a[0];\n\tfor(i=1;iG[j+1]){\n\t\t\t\tx=G[j];\n\t\t\t\tG[j]=G[j+1];\n\t\t\t\tG[j+1]=x;\n\t\t\t\ty=B[j];\n\t\t\t\tB[j]=B[j+1];\n\t\t\t\tB[j+1]=y;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;is[j+1][1])\n\t\t\t{\n\t\t\t\ttemp=s[j+1][1];\n\t\t\t\ts[j+1][1]=s[j][1];\n\t\t\t\ts[j][1]=temp;\n\t temp=s[j+1][0];\n\t\t\t\ts[j+1][0]=s[j][0];\n\t\t\t\ts[j][0]=temp;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i> xiao;\n\tn = xiao[0];\n\tfor (i = 1; i <= 100; i++)\n\t{\n\t\tif(xiao[i] != n)\n\t\t{\n\t\t\tv = xiao[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tpai(xiao, n, v, i - 1);\n\treturn 0;\n}"} +{"label": "77", "index": "38473", "code": "int main()\n{\n\tvoid handinhand(char xpy[],int num ,int left,char boy,char girl);\n\tchar xpy[101]={'\\0'},boy,girl;\n\tint num;\n\tcin.getline(xpy,100);//?????\n\tboy=xpy[0];//????\n\tfor (num=0;xpy[num]!=0;num++) ;\n\tgirl=xpy[num-1];//????\n\thandinhand(xpy,num,num,boy,girl);//????????\n\treturn 0;\n}\nvoid handinhand(char xpy[],int num,int left,char boy,char girl)\n{\n\tint i=0,j,lf=left;\n\tif (left>0)//??????0\n\t{\n\t\tfor (i=0;xpy[i]!=girl;i++) ;//???????,?????????\n\t\tfor (j=i-1;xpy[j]!=boy&&j>-1;j--) ;//????????????????????\n\t\tcout<>s;\n\tint l,i=0,k=0,j;\n\tfor(i=0;i<500;i++)\n\t\tnum[i]=1000;\n\tl=strlen(s);\n\tfor(i=0;inum[j+3])\n\t\t\t{\n\t\t\t\ttemp=num[j];\n\t\t\t\tnum[j]=num[j+2];\n\t\t\t\tnum[j+2]=temp;\n\t\t\t\ttemp=num[j+1];\n\t\t\t\tnum[j+1]=num[j+3];\n\t\t\t\tnum[j+3]=temp;\n\t\t\t}\n\t\t}\n\t}\n\t\tfor(i=0;i= 0 && m == 0; i--) //????????????????????\n\t\t\t{\n\t\t\t\tif (str[i] == p) //??????????\n\t\t\t\t{\n\t\t\t\t\t\tstr[i] = '0';\n\t\t\t\t\t\tstr[j] = '0';\n\t\t\t\t\t\tcout << i << \" \" << j << endl;\n\t\t\t\t\t\tm = 1; //?m????????????????????????\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tsearch(str, len, j, p ,q); //??????????\n}\nint main()\n{ \n\tchar str[502], p, q; //str????????p?????????q????????\n\tcin >> str;\n\tint len = strlen(str); //???????\n p = str[0]; //??????????????\n\tfor (int i = 1; str[i] != '\\0'; i++) //????????????q\n\t{\n\t\tif (str[i] != p)\n\t\t{\n\t\t\tq = str[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tsearch(str, len, 1, p, q); //??search??\n\treturn 0;\n}\n//**********************************************\n"} +{"label": "77", "index": "38476", "code": "int flag[101]={0};\nchar str[101];\nchar b,g;\nvoid match(int girl) //int girl's pos\n{\n\tint j;\n\tfor(j=girl;j>=0;j--)\n\t{\n\t\tif(str[j]==b&&flag[j]==0)\n\t\t{\n\t\t\tcout<> str;\n\tb=str[0];\n\tint len=strlen(str);\n\twhile(str[i]==b)i++;\n\tg=str[i];\n\tfor(;i<=len-1;i++)\n\t{\n\t\tif(str[i]==g)match(i);\n\t}\n\treturn 0;\n}\n\t\n\n"} +{"label": "77", "index": "38477", "code": "\nstruct ranking\n{\n int sex;\n int order;\n}stu[100];\nvoid check(int len)\n{\n int x,y;\n for(x=0; x< len-1; x++){\n if(stu[x].sex ==1 && stu[x+1].sex ==0){\n cout << stu[x].order <<\" \" << stu[x+1].order << endl;\n for(y=x; y>dui_lie;\n changdu=strlen(dui_lie);\n zuo=dui_lie[0];\n you=dui_lie[changdu-1];//???????????? \n for(i=1;i<=changdu/2;i++) \n {\n zuobian=0;//??????????????? \n qian_shou(zuobian);\n } //??????????? \nreturn 0;\n}\n\n\n"} +{"label": "77", "index": "38479", "code": "struct stu\n{\n\tchar c;\n\tint x;\n};\nstruct stu stu1[1000],*p;\n\nvoid main()\n{\n\tint n,i,j,k;\n\tchar s[1000];\n\tgets(s);\n\tn=strlen(s);\n\tp=stu1;\n\tfor(i=0;ic=s[i];\n\t\t(p+i)->x=i;\n\n\t}\n\n\tfor(i=0;ic!=s[0])\n\t\t{\n\t\t\tprintf(\"%d %d\\n\",(p+i-1)->x,(p+i)->x);n=n-2;\n\t\t\tfor(j=i-1;jc=(p+j+2)->c;\n\t\t\t\t(p+j)->x=(p+j+2)->x;\n\t\t\t}\n\t\t\ti=0;\n\t\t}\n\t}\n}\n"} +{"label": "77", "index": "38480", "code": "int judge(int s,char k[])\n{\n\tint sum=0,p;\n\tfor(int i=0;i=0;j--){\n\t\t\t\tif (kids[j]==boy){\n\t\t\t\t\tcout<> queue;\n\tch1 = queue[0];\n\tn = strlen(queue);\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tif (queue[i] != ch1)\n\t\t{\n\t\t\tch2 = queue[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (s = 0; s < n / 2; s++)\n\t{\n\t\ti = 0;\n\t\ttake_hand(i);\n\t}\n\tcin >> i;\n\treturn 0;\n}\n\nvoid take_hand(int j)\n{\n\n\tfor (t = j + 1; t < n; t++)\n\t{\n\t\tif (queue[t] == ch1 || queue[t] == ch2)\n\t\t\tbreak;\n\t}\n\tif (queue[t] == ch2)\n\t{\n\t\tqueue[j] = '*';\n\t\tqueue[t] = '*';\n\t\tcout << j << \" \" << t << endl;\n\t}\n\telse\n\t{\n\t\tj++;\n\t\ttake_hand(j);\n\t}\n}\n"} +{"label": "77", "index": "38482", "code": "/*\n * 7.cpp\n *\n * Created on: 2011-1-8\n * Author: 10033\n */\n\n\nint n,n0,i,j;\nchar nan,nv;\nchar a[1000];//????\n\nvoid paidui(int j){//???????j=0????????????\n\tint k;\n\tfor(k=j;k> a;\n\tfor (i = 0;a[i] != 0;i++ )\n\t{\n\t\tif (a[i] != a[0])\n\t\t{\n\t\t\tx[j] = i;\n\t\t\tj++;\n\t\t}\n\t}\n\tline(a, x);\n\treturn 0;\n}"} +{"label": "77", "index": "38485", "code": "//*******************************************************\n//*11.15?? ???? *\n//*????? ?? 1100012844 *\n//*???2011?11?23? *\n//*******************************************************\nchar a[100], boy, girl;\nint girlNO[50], flag[100] = {0};\nvoid qianshou(int k)\n{\n\tint i;\n\tif (k != 0)\n\t\tqianshou(k - 1);\n\ti = girlNO[k] - 1;\n\twhile (a[i] == girl || flag[i])\n\t\ti--;\n\tcout << i << \" \" << girlNO[k] << endl;\n\tflag[i] = 1;\n}\nint main()\n{\n\tint j = 1, n = 0;\n\ta[0] = cin.get();\n\tboy = a[0];\n\twhile ((a[j] = cin.get()) != '\\n')\n\t{\n\t\tif (a[j] != boy)\n\t\t{\n\t\t\tgirlNO[n] = j;\n\t\t\tn++;\n\t\t}\n\t\tj++;\n\t}\n\tgirl = a[j - 1];\n\tqianshou(n - 1);\n\treturn 0;\n}"} +{"label": "77", "index": "38486", "code": "//********************************\n//*???? \n//********************************\n\n\nchar a[110];\nint a1[110] = {0};\nint l;\nchar b,g;\n\nvoid fi(int i)\n{\n\tint j,k;\n\tfor (j = i + 1; j < l; j++)\n\t{\n\t\tif (a[j] == g)\n\t\t{\n\t\t\tif (!a1[j])\n\t\t\t{\n\t\t\t\tfor (k = j - 1; k >= 0; k--)\n\t\t\t\t{\n\t\t\t\t\tif((a[k] == b) && (!a1[k]))\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << k << \" \" << j << endl;\n\t\t\t\t\t\ta1[k] = 1;\n\t\t\t\t\t\ta1[j] = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}\n\nint main()\n{\n\tint i;\n\tcin.getline(a,110);\n\tl = strlen(a);\n\tb = a[0];\n\tfor (i = 0; i < l; i++)\n\t{\n\t\tif (a[i] != b)\n\t\t{\n\t\t\tg = a[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfi(-1);\n\tcin.get();\n cin.get(); //????\n\treturn 0;\n}"} +{"label": "77", "index": "38487", "code": "int flag[100]={0};\nvoid pailie(char b[100],int l)\n{\n\tint i,j;\n\tint g=0;\n\tif(flag[l-1]==1);\n else\n\t{\n\t for(i=0,g=0;iy[j+1])\n {\n t=y[j];\n y[j]=y[j+1];\n y[j+1]=t;\n m=x[j];\n x[j]=x[j+1];\n x[j+1]=m;\n }\n }\n }\n \n for(q=1;q<=n/2;q++)\n {\n printf(\"%d %d\\n\", x[q], y[q]);\n }\n \n return 0;\n}"} +{"label": "77", "index": "38489", "code": "char line[1000];\nint search(int a)\n{\n int i, j, flag=0;\n for (i=a-1;i>=0;i--)\n {\n if ((line[i]+line[a]==line[strlen(line)-1]+line[0])&&(flag==0))\n {\n for (j=a-1;j>=0;j--)\n {\n if (line[j]==line[strlen(line)-1])\n {\n search (j);\n break;\n }\n }\n if (j==0)\n return 0;\n cout << i << \" \" << a << endl;\n break;\n }\n if (line[i]+line[a]!=line[strlen(line)-1]+line[0])\n flag++; \n if ((line[i]+line[a]==line[strlen(line)-1]+line[0])&&(flag!=0))\n flag--;\n }\n}\nint main()\n{\n memset(line, 0, sizeof(line));\n cin >> line;\n search (strlen(line)-1);\n return 0;\n}\n"} +{"label": "77", "index": "38490", "code": "char str[100];\nchar x,y;\nvoid line(char a[])\n{\n\tint i,j;\n\tfor(i=0;i> str;\n\tx=str[0];\n\ty=str[strlen(str)-1];\n\tline(str);\n\treturn 0;\n}"} +{"label": "77", "index": "38491", "code": "\nchar a[1000];\n\nint xx (int k)\n{\n int x,y;\n x=k;\n y=k+1;\n while (a[y]==a[x])\n y=xx(y);\n cout <3)pr(a,n-2,boy,girl,k);\n}\n"} +{"label": "77", "index": "38493", "code": "char row[100];\nvoid pipei( int i, char boy, char girl )\n{\n\tint j;\n\tif ( row[i] == girl )\n\t{\n\t\tfor ( j = i - 1; j >= 0; j-- )\n\t\t{\n\t\t\tif ( row[j] == boy )\n\t\t\t{\n\t\t\t\tcout << j << \" \" << i << endl;\n\t\t\t\trow[j] = ' ';\n\t\t\t\trow[i] = ' ';\n\t\t\t\tbreak;\n\n\t\t }\n\t }\n\t}\n\tif ( row[i + 1] != '\\0' )\n\t\tpipei( i + 1, boy, girl);\n\n}\n\nint main()\n{\n\tchar girl, boy;\n\tcin.getline( row, 100 );\n\tboy = row[0];\n\tint i;\n\tfor ( i = 0; row[i] != '\\0'; i++ )\n\t{\n\t\tif ( row[i] != boy )\n\t\t{\n\t\t\tgirl = row[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tpipei( 1, boy, girl );\n\treturn 0;\n}\n"} +{"label": "77", "index": "38494", "code": "/*************************************************************************************************************\n* @file .cpp\n* @author ????\n* @date \n* @description\n*\t\t???? \n*/\n\n\nchar b[100];\nint a[100], i, j;\nvoid peidui( int l)\n{\n\tint flag = 0;\n\tif(l == 0)\n\t\treturn;\n\tfor(i = 0; i < l - 1; i++)\n\t{\n\t\tif((b[i] == b[0]) && (b[i + 1] != b[0]))\n\t\t{\n\t\t\tcout << a[i] << \" \" << a[i + 1] << endl;\n\t\t\tflag = 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(flag)\n\t{\n\tfor(j = i; j < l - 2; j++)\n\t{\n\t\ta[j] = a[j + 2];\n\t\tb[j] = b[j + 2];\n\t}\n\t}\n\tpeidui(l - 2);\n}\nint main()\n{\n\tint l;\n\tcin >> b;\n\tl = strlen(b);\n\tfor (i = 0; i < l; i++)\n\t\ta[i] = i;\n\tpeidui(l);\n\treturn 0;\n}"} +{"label": "77", "index": "38495", "code": "int main(){\n\tchar boy,girl,s[520];\n\tint n,i,m,total,j;\n\tstruct f{\n\t\tchar c;\n\t\tint judge; \n\t}child[520];\n\tscanf(\"%s\",s);\n\tboy=s[0];\n\tfor (i=1;s[i]!='\\0';i++){\n\t\tif (s[i]!=boy){\n\t\t\tgirl=s[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (i=0;s[i]!='\\0';i++){\n\t\tchild[i].c=s[i];\n\t\tchild[i].judge=1;\n\t}\n\tm=i;\n\ttotal=i;\n\tfor (n=1;m!=0;n++){\n\t\tfor (i=0;i>x;\n if(x==sign)\n stack[cur++]=sum++;\n else \n cout<0);\n return 0;\n}"} +{"label": "77", "index": "38498", "code": "int sum(int line2[],int a,int b)\n{\n\tint i,c=0;\n\tfor(i=a;i<=b;i++)\n\t\tc+=line2[i];\n\treturn(c);\n}\n\n\nint main()\n{\n\tchar line[100];\n\tint line1[100],i,j,k,line3[50][2]={0};\n\tscanf(\"%s\",line);\n\tk=strlen(line)/2-1;\n\tfor(i=0;i=0;i--)\n\t{\n\t\tif(line1[i]==-1)\n\t\t\tfor(j=i-1;j>=0;j--)\n\t\t\t\tif(sum(line1,j,i)==0)\n\t\t\t\t{\n\t\t\t\t\tline3[k][0]=j;\n\t\t\t\t\tline3[k][1]=i;\n\t\t\t\t\tk--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t}\n\tfor(i=0;ia[1]+a[2]&&a[0]+a[2](s+q))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif((z+s)s+q&&z+s=0;i--)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]!=0)\n\t\t\t\t {cout< 0) \n\t\t\t\tif((zhao + li > sun + qian) && (zhao + sun < qian))\n\t\t\t\tif(zhao != qian && zhao != sun && zhao != li)\n\t\t\t\tif(qian != sun && qian != li)\n\t\t\t\tif(sun != li)\n\t\t\t\tfor(int i = 5; i >= 1; i--)\n\t\t\t\t{\n\t\t\t\t\tif(zhao == i) cout << \"z \" << zhao * 10 << endl;\n\t\t\t\t\tif(qian == i) cout << \"q \" << qian * 10<< endl;\n\t\t\t\t\tif(sun == i) cout << \"s \" << sun * 10<< endl;\n\t\t\t\t\tif(li == i) cout << \"l \" << li * 10<< endl;\n\t\t\t\t}\n\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38504", "code": "\nint main()\n{\n\tint z , q , s , l;\n\n\tfor (q = 30 ; q <= 50 ; q +=10)\n\t{\n\t\tfor (z = 10 ; z <= 30 ; z +=10)\n\t\t{\n\t\t\tfor (s = 10 ; s <= 30 ; s +=10)\n\t\t\t{\n\t\t\t\tfor (l = 10 ; l <= 50 ; l +=10)\n\t\t\t\t{\n\t\t\t\t\tif ((z + q == s + l) && (z + l > s + q) && (z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (l >= q )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl;\n\t\t\t\t\t\t\tif (z >= s)\n\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"s \" << s << endl;\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"z \" << z << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\t\tif ((z >= s) && (z >= l))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\t\tif (s >= l)\n\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"l \" << l << endl;\n\t\t\t\t\t\t\t\telse cout << \"l \" << l << endl << \"s \" << s << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (s >= l)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\t\t\t\tif (z >= l)\n\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"l \" << l << endl;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"z \" << z << endl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\t\t\t\tif (z >= s)\n\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"s \" << s << endl;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"z \" << z << endl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\t\t\t\t\t\t\t\t\t\n\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38505", "code": "int main()\n{\t\n\tint z=0,q=0,s=0,l=0;\n\tfor(z=1;z<=5;z++)\n\t\tfor(q=1;q<=5;q++)\n\t\t\tfor(s=1;s<=5;s++)\n\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t{if ((z+q==s+l)&&(z+l>s+q)&&(z+ss+q&&z+s (s + q);\n\t\t\tC3 = (z + s) < q;\n\t\t\tif(C1&&C2&&C3&&(z != s))\n\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl << \"z \" << z << endl << \"s \" << s << endl; \n\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38508", "code": "int main()\n\n{\n int z, q, s, l, x1, x2, x3, x4;\n for(z = 10; z <= 50; z = z + 10)\n {\n for(q = 10; q <= 50; q = q + 10)\n {\n for(s = 10; s <= 50; s = s + 10)\n {\n for(l = 10; l <= 50; l = l + 10)\n {\n if(((z+q)==(s+l))&&((z+l)>(s+q))&&((z+s)(s+q))&&((z+s)0;j--)\n\t\t\t\t\t\tfor(int i=0;i(q+s) && (z+s)a[j+1])\n \t\t {\n \t\t\t a[j]=a[j+1];\n \t\t\t a[j+1]=temp;\n \t\t }\n \t\t}\n \t}\n for (i=3;0<=i;i--){ //???????????????????????\n \tif(z==a[i]) cout << \"z \" << a[i]*10 << endl;\n \tif(q==a[i]) cout << \"q \" << a[i]*10 << endl;\n \tif(s==a[i]) cout << \"s \" << a[i]*10 << endl;\n \tif(l==a[i]) cout << \"l \" << a[i]*10 << endl;\n }\n\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38511", "code": "\nint main()\n{\n\tint z,q,s,l,i;\n\tfor(z=1;z<=5;z++)\n\t{\n\t\tfor(q=1; (q<=5) ;q++)\n\t\t{\n\t\t\tif(q==z)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(s=1; (s<=5) ;s++)\n\t\t\t{\n\t\t\t\tif( (s==z) || (s==q) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor(l=1; (l<=5) ;l++)\n\t\t\t\t{\n\t\t\t\t\tif( (l==z) || (l==q) || (l==s) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif( (z+q==s+l) && (z+l>s+q) && (z+s0;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t if(z==i)\n\t\t\t\t\t\t\t cout<<\"z\"<<' '<<10*z< (s + q)) && ((z + s) < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (i = 50; i >= 10; i = i - 10)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z == i)\n\t\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\tif (q == i)\n\t\t\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\t\tif (s == i)\n\t\t\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\t\tif (l == i)\n\t\t\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38513", "code": "int max(int a,int b,int c,int d)\n{\n\tint n=0;\n\tif(a>n)\n\t\tn=a;\n\tif(b>n)\n\t\tn=b;\n\tif(c>n)\n\t\tn=c;\n\tif(d>n)\n\t\tn=d;\n\treturn n;\n}\nint sec(int a,int b,int c,int d)\n{\n\tint n=0;\n\tint m=max(a,b,c,d);\n\tif(a>n&&a!=m)\n\t\tn=a;\n\tif(b>n&&b!=m)\n\t\tn=b;\n\tif(c>n&&c!=m)\n\t\tn=c;\n\tif(d>n&&d!=m)\n\t\tn=d;\n\treturn n;\n}\nint min(int a,int b,int c,int d)\n{\n\tint n=100;\n\tif(a(s+q)) //??????????????????????\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(z+s= q)//????????????\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tshuchu(z,q,s,l);//????????????????????????????\n\n\t\t\t\t}\nreturn 0;\n}\nvoid shuchu(int z,int q,int s,int l)\n{\n\tfor(int i=50;i>=10;i-=10)//?????????????????????????\n\t{\n\t\tif(i==z)//i???????????????\n\t\t\tcout << \"z \"<s+q);\n\t\t\t\t\ts3=(z+s=1;i--){\n\t\tif(output[i]!='a'){\n\t\t\tI=i*10;\n\t\t\tcout<s+q&&z+sm)\n\t\t\t{\n\t\t\tm=a[i];\n\t\t\tc[4]=c[3];\n\t\t\tc[3]=c[2];\n\t\t\tc[2]=c[1];\n\t\t\tc[1]=m;\n\t\t\td[4]=d[3];\n\t\t\td[3]=d[2];\n\t\t\td[2]=d[1];\n\t\t\td[1]=b[i];\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tc[i]=a[i];\n\t\t\td[i]=b[i];\n\t\t}\n\t}\n\tchar x1,x2,x3,x4;\n\tx1=d[1];\n\tx2=d[2];\n\tx3=d[3];\n\tx4=d[4];\n\tcout<(s+q);\n\t\t\t\t\ts3=(z+s)0;i--)\n\t\t\t\t\t\t\tif(weight[i]!='\\0')\n\t\t\t\t\t\t\t\tcout<s+q&&z+ss+q ) && ( z+s0;i-- )\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( j=0;jweight[j] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttemp1=weight[i];\n\t\t\t\t\t\t\t\tweight[i]=weight[j];\n\t\t\t\t\t\t\t\tweight[j]=temp1;\n\t\t\t\t\t\t\t\ttemp2=name[i];\n\t\t\t\t\t\t\t\tname[i]=name[j];\n\t\t\t\t\t\t\t\tname[j]=temp2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor ( i=0;i<4;i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<s+q)&&(z+s(q+s))&&((z+s)a[j+1])\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tq=a[j];\n\t\t\t\t\t\t\t\t\t\t\t\ta[j]=a[j+1];\n\t\t\t\t\t\t\t\t\t\t\t\ta[j+1]=q;\n\t\t\t\t\t\t\t\t\t\t\t\tp=b[j];\n\t\t\t\t\t\t\t\t\t\t\t\tb[j]=b[j+1];\n\t\t\t\t\t\t\t\t\t\t\t\tb[j+1]=p;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(int w=0;w<4;w++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout< (b+c);\n\t C3=(a+c) < b;\n\t\t\t\t\tif(a!=b && a!=c && a!=d&& b!=c && b!=d && c!=d && c !=d && C1 && C2 && C3)\n\t\t\t\t\t{\n\t\t\t\t\tweight[1]=a;\n\t\t\t\t\tweight[2]=b;\n\t\t\t\t\tweight[3]=c;\n\t\t\t\t\tweight[4]=d;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\tint a1=0;\n\tchar a2=' ';\n\tfor(i=0;i<=2;i++)\n\t\tfor(j=1;j<=3-i;j++)\n\t\t{\n\t\t\tif(weight[j]ms+mq)&&(mz+ms=i+1;j--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(m[j]>m[j-1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tk=m[j];m[j]=m[j-1];m[j-1]=k;\n\t\t\t\t\t\t\t\t\tk=name[j];name[j]=name[j-1];name[j-1]=k;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(k=0;k<=3;k++)\n\t\t\t\t\t\t \tcout<5) break; //l???????????????\n\t\t\t if (((z+q)==(s+l)&&(z+l)>(s+q))&&((z+s)b)?a:b;\n m=(m>c)?m:c;\n m=(m>d)?m:d;\n return (m);\n}\n"} +{"label": "78", "index": "38525", "code": "/*\n * mid_test.cpp\n * ???\n * Created on: 2010-11-20\n * Author: ????1000010444?\n *???\n ???????????????????????????????????????????\n ?????????????10???????????????50????????????\n ?????????????????; ?????????????????????????\n ????????????????????????????????????????????\n ???????????????????????\n *\n *\n */\n\nint main()\n{\n\tint z,q,s,l;//z,q,s,l??????????????\n\tfor(z=10;z<=50;z=z+10)\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t{if(q==z)continue;\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t{if((s==q)||(s==z))continue;\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif((z+q)!=(s+l))continue;//????????\n\t\t\t\t\telse if((z+l)<=(s+q))continue;\n\t\t\t\t\telse if((z+s)>=q)continue;\n\t\t\t\t\telse if((l==z)||(l==q)||(l==s))continue;\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"l \"< (s + q) && (z + s) < q)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tz = z * 10; q = q * 10;\n\t\t\t\t\t\t\t\t\ts = s * 10; l = l * 10;\n\t\t\t\t\t\t\t\t\tfor (t = 50; t >= 0; t = t - 10)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (z == t)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z <s+q&&z+sqWeight&&qWeight>zWeight&&zWeight>sWeight)\n\t\t\t{\n\t\t\tcout<<\"l\"<<\" \"<qWeight&&qWeight>sWeight&&sWeight>zWeight)\n\t\t\t{\n\t\t\tcout<<\"l\"<<\" \"< (s + q) && (z + s) < q)\n\t\t\t\t\t\t\tw[0] = z,w[1] = q,w[2] = s,w[3] = l;\n\t\t\t\t\t}}}}}\n\t//??????????????????\n\tfor (i = 5;i >= 1; i --) //???????50,40,30,20,10,??????\n\t{\n\t\tfor(j = 0;j < 4;j ++)\n\t\t{\n\t\t\tif (w[j] == i) //??j?????????????\n\t\t\t\tcout << n[j] << \" \" << 10 * w[j] << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38529", "code": "int main()\n{\n int z , q, s, l;\n\tz = 10;\n\tint a , b, c, d;\n\tchar x1, x2, x3, x4;\n\tint y1 , y2, y3, y4;\n for (a=10; a<=50 ; a = a + 10)\n\t{\n\t q=10;\n\t\tfor (b=10; b<=50;b = b + 10)\n\t\t{\n\t\t\ts = 10;\n\t\t\tfor(c=10; c<=50; c = c +10)\n\t\t\t{\n\t\t\t\tl = 10;\n\t\t\t\tfor(d = 10; d <= 50; d = d +10)\n\t\t\t\t{\n\t\t\t\t\tif (z != q && q != s && s != l && z+q == s+l && z+l > s+q && z+s < q) \n\t\t\t\t\t{\n y1=z;\n\t\t\t\t\t\tx1='z';\n\t\t\t\t\t\tif (y1 < q)\n\t\t\t\t\t\t{ y2 =q;\n\t\t\t\t\t\t x2 = 'q';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t y1 = q;\n\t\t\t\t\t\t\tx1 = 'q';\n\t\t\t\t\t\t\ty2 = z;\n\t\t\t\t\t\t\tx2 = 'z';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (y2 < s)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\ty3 =s;\n\t\t\t\t\t\t\tx3 = 's';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t if (s>y1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t y3= y2;\n\t\t\t\t\t\t\t\tx3 = x2;\n\t\t\t\t\t\t\t\ty2 = s;\n\t\t\t\t\t\t\t\tx2 = 's';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t y3 = y2;\n\t\t\t\t\t\t\t\tx3 = x2;\n\t\t\t\t\t\t\t\ty2 = y1;\n\t\t\t\t\t\t\t\tx2 = x1;\n\t\t\t\t\t\t\t\ty1 = s;\t\n\t\t\t\t\t\t\t\tx1 = 's';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (y3 < l)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty4 = l;\n\t\t\t\t\t\t x4 = 'l';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ty4 =y3;\n\t\t\t\t\t\t\tx4 = x3;\n\t\t\t\t\t\t\tif (l > y2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ty3 =l;\n\t\t\t\t\t\t\t x3 = 'l';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t y3 =y2;\n\t\t\t\t\t\t\t\tx3 =x2;\n\t\t\t\t\t\t\t\tif (l > y1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ty2 =l;\n\t\t\t\t\t\t\t\t x2 = 'l';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ty2 =y1;\n\t\t\t\t\t\t\t\t\tx2 = x1;\n\t\t\t\t\t\t\t\t y1= l;\n\t\t\t\t\t\t\t\t\tx1='l';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcout << x4 << \" \" << y4 << endl;\n\t\t\t\t\t\tcout << x3 << \" \" << y3 << endl;\n\t\t\t\t\t\tcout << x2 << \" \" << y2 << endl;\n\t\t\t\t\t\tcout << x1 << \" \" << y1 << endl;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tl = l + 10;\n\t\t\t\t}\n\t\t\t\ts = s + 10;\n\t\t\t}\n\t\t\tq = q + 10;\n\t\t}\n\t\tz = z + 10;\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38530", "code": "\n\nint main ()\n{\n int z, q, s, l ;\n for( z = 10; z <= 50; z = z + 10)\n {\n\t for( q = 10; q <= 50; q = q + 10)\n\t {\n\t\t for(s =10; s <= 50; s = s + 10)\n\t\t {\n\t\t\t for(l = 10; l <= 50; l = l +10)\n\t\t\t {\n\t\t\t\t if ( (z + q == s +l) && (z + l > s + q) && (z + s< q))//?????q?????s?z?l????q??z?????s?\n\t\t\t\t\t cout <<\"l\"<<\" \"<weight[2]+weight[1] && weight[0]+weight[2]weight[2]+weight[1] && weight[0]+weight[2]weight[2]+weight[1] && weight[0]+weight[2]weight[2]+weight[1] && weight[0]+weight[2]s+q)+(z+ss+q)+(z+ss+q)+(z+ss+q)+(z+ss+q&&z+ss+q);\n\t\t\t\t\tstate[2]=(z+s0;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(i==z) cout<=q)\n continue;\n if(z==q || z==s || z==l || q==s || q==l || s==l)\n continue;\n else\n goto l;\n }\n }\n }\n }\nl: z*=10; q*=10; s*=10; l*=10;\n char bskc,name[4]={'z','q','s','l'};\n int bski,weight[4];\n weight[0]=z; weight[1]=q; weight[2]=s; weight[3]=l; \n for(int i=0;i<4;i++){\n for(int j=i+1;j<4;j++){\n if(weight[i]s+q&&z+ss+q)&&(z+s(s+q))&&((z+s) (a[3] + a[2])) && ((a[1] + a[3]) < a[2]))\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag == 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (flag == 1)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (flag == 1)\n\t\t\tbreak;\n\t}\n\tfor (i = 1; i <= 3; i ++)\n\t\tfor (j = 1; j <= 4 - i; j ++)\n\t\t\tif (a[j] < a[j + 1])\n\t\t\t{\n\t\t\t\tt = a[j];\n\t\t\t\ta[j] = a[j + 1];\n\t\t\t\ta[j + 1] = t;\n\t\t\t\ttt = b[j];\n\t\t\t\tb[j] = b[j + 1];\n\t\t\t\tb[j + 1] = tt;\n\t\t\t}\n\tcout << b[1] << \" \" << a[1] << endl << b[2] << \" \" << a[2] << endl\n\t\t<< b[3] << \" \" << a[3] << endl << b[4] << \" \" << a[4] << endl;\n\n\treturn 0;\n}\n"} +{"label": "78", "index": "38541", "code": "/*\n * ???: 1000010191_test3_3.cpp\n * ??: ???\n * ????: 2010-11-20\n * ??: ???\n */\n\n\nint main()\n{\n\t//z,q,s,l??4????\n\tfor (int z=10;z<=50;z+=10)\n\t\tfor (int q=10;q<=50;q+=10)\n\t\t\tfor (int s=10;s<=50;s+=10)\n\t\t\t\tfor (int l=10;l<=50;l+=10)\n\t\t\t\t\tif (z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)\n\t\t\t\t\t\tif (z+q==s+l&&z+l>s+q&&z+s=10;i-=10)\n\t\t\t\t\t\t\t\tif (d[i]!=0)\n\t\t\t\t\t\t\t\t\tcout< (s + q);\n\t\t\t\t\tcc3 = (z + s) < q;\n\t\t\t\t\tcc = cc1 + cc2 + cc3;\n\t\t\t\t\tif (cc == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << 'l' << \" \" << l * 10 << endl;\n\t\t\t\t\t\tcout << 'q' << \" \" << q * 10 << endl;//????l??,???q\n\t\t\t\t\t\tif (z > s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << 'z' << \" \" << z * 10 << endl;\n\t\t\t\t\t\t\tcout << 's' << \" \" << s * 10 << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s > z)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << 's' << \" \" << s * 10 << endl;\n\t\t\t\t\t\t\tcout << 'z' << \" \" << z * 10 << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\treturn 0;\n}"} +{"label": "78", "index": "38543", "code": "int main()\n{int z,q,s,l;\nfor (z=10;z<=50;z+=10)\n{\n\tfor (q=10;q<=50;q+=10)\n\t{\tfor (s=10;s<=50;s+=10)\n\t\t{\tfor (l=10;l<=50;l+=10)\n\t\t\t\t{\n\t\t\t\t\tif ( z+q==s+l&&z+l>s+q&&z+s(a[2]+a[1]))+((a[0]+a[2])s+q&&z+s(s+q);\n\t\t\t\t\tword[3]=(z+s)s+q&&z+ss+q&&z+s=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tm0=a[i];n0=b[i];a[i]=0;break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i=0;i<=3;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tm1=a[i];n1=b[i];a[i]=0;break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i=0;i<=3;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tm2=a[i];n2=b[i];a[i]=0;break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i=0;i<=3;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tm3=a[i];n3=b[i];a[i]=0;break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprintf(\"%c %d\\n%c %d\\n%c %d\\n%c %d\\n\",n0,m0,n1,m1,n2,m2,n3,m3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38550", "code": "int main()\n{\n\tint a,b,c,d,m[5],e;\n\tchar n[5]={'0','z','q','s','l'},f;\n\tfor (a=1;a<=5;a++)\n\t{\n\t\tfor (b=1;b<=5;b++)\n\t {\n\t\t\tfor (c=1;c<=5;c++)\n\t {\n\t\t\t\tfor (d=1;d<=5;d++)\n\t {\n\t\t\t\t\tif ((a+b)==(c+d) && (a+d)>(b+c) && (a+c)m[j+1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\te=m[j];\n\t\t\t\t\t\t\t\t\tf=n[j];\n\t\t\t\t\t\t\t\t\tm[j]=m[j+1];\n\t\t\t\t\t\t\t\t\tn[j]=n[j+1];\n\t\t\t\t\t\t\t\t\tm[j+1]=e;\n\t\t\t\t\t\t\t\t\tn[j+1]=f;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (int k=4;k>=1;k--)\n\tcout<=10)&&(a[3]<=50)&&((a[0]+a[3])>(a[1]+a[2]))&&((a[0]+a[2])=0;i--) //????????????????????????????\n\t for(j=0;j<=i;j++)\n\t {\n\t\t if(a[i]>a[i+1])\n\t\t {\n\t\t\t k=a[i];\n\t\t\t a[i]=a[i+1];\n\t\t\t a[i+1]=k;\n\t\t\t y=b[i];\n\t\t\t b[i]=b[i+1];\n\t\t\t b[i+1]=y;\n\t\t }\n\t }\nfor(i=3;i>=0;i--) //??????????????\n {\n\t printf(\"%c %d\\n\",b[i],a[i]);\n }\nreturn 0;\n}"} +{"label": "78", "index": "38552", "code": "int main ()\n{\n\tint a[5], g = 0, i, j;\n\tchar ch[5][5] = {\" \", \"z \", \"q \",\"s \",\"l \"};\n\tfor (a[1] = 1; a[1] <= 5; a[1] ++)\n\t{\n\t\tfor (a[2] = 1; a[2] <= 5; a[2] ++)\n\t\t{\n\t\t\tif(a[1] == a[2])\n\t\t\t\tcontinue;\n\t\t\tfor (a[3] = 1; a[3] <= 5; a[3] ++)\n\t\t\t{\n\t\t\t\tif (a[3] == a[1] || a[3] == a[2])\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (a[4] = 1; a[4] <= 5; a[4] ++)\n\t\t\t\t{\n\t\t\t\t\tif(a[4] == a[1] || a[4] == a[2] || a[4] == a[3])\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (a[1] + a[2] == a[3] + a[4] && a[1] + a[4] > a[3] + a[2] && a[1] + a[3] < a[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (i = 5; i > 0; i --)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (j = 1; j < 5; j ++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (a[j] == i)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << ch[j] << i << '0' << endl;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tg = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (g == 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (g == 1)\n\t\t\t\tbreak;\n\t\t}\n\t\tif ( g == 1 )\n\t\t\tbreak;\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38553", "code": "\nint main()\n{\n char a[10];\n int z,q,s,l,i;\n for (i=0; i<10; i++)\n a[i] = ' ';\n for (z=1; z<=5; z++)\n for (q=1; q<=5; q++)\n for (s=1; s<=5; s++)\n for (l=1; l<=5; l++)\n {\n if((z+q==s+l)+(z+l>s+q)+(z+s=1; i--)\n {\n if (a[i]!=' ')\n printf(\"%c %d\\n\",a[i],i*10);\n }\n return 0;\n}\n"} +{"label": "78", "index": "38554", "code": "int main() //???\n{ //?????\n\tint z=0,q=0,s=0,l=0,i=0,j=0,k=0,m=0,n=0,x=0; \n //?????z,q,s,l???????????\n\tfor(i=1;i<=5;i++) //?????,???????\n\t{\n\t\tz=10*i;\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tq=10*j;\n\t\t\tif(q==z)\n continue;\n\t\t\tfor(k=1;k<=5;k++)\n\t\t\t{\n\t\t\t\ts=10*k;\n\t\t\t\tif(s==z||s==q)\n\t\t\t \tcontinue;\n\t\t\t\tfor(m=1;m<=5;m++)\n\t\t\t\t{\n\t\t\t\t l=10*m;\n\t\t\t\t\tif(l==z||l==q||l==s)\n\t\t\t\t\t continue;\n\t\t\t\t\tif((z+q==s+l)&&(z+l>s+q)&&(z+s=1;n--) //?????,?????????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx=n*10;\n\t\t\t\t\t\t\tif(z==x)\n\t\t\t\t\t\t\t{\n\t\n cout<<\"z \"< s + q)&&(z + s < q)&&(z != s)&&(z != q)&& (z != l)&& (s != q)&&(s != l) && (q != l))\n\t\t\t\t\t{\n\t\t\t\t\t z1 = z;\n\t\t\t\t\t q1 = q;\n\t\t\t\t\t s1 = s;\n\t\t\t\t\t l1 = l;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\tfor(i = 5; i >= 1; i--)\n\t{\n\t\tif(z1==i)\n\t\t\tcout << \"z \" << z1*10 << '\\n';\n\t\tif(q1==i)\n\t\t cout << \"q \" << q1*10 << '\\n';\n\t\tif(s1==i)\n\t\t cout << \"s \" << s1*10 << '\\n';\n\t\tif(l1==i)\n\t\t cout << \"l \" << l1*10 << '\\n';\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38556", "code": "//???\n\n\nint main()\n{\n int a[4], max[4] = {0,0,0,0};\n char A[4] = {'z','q','s','l'} , Max[4];\n for(a[0] = 10 ; a[0] <= 50 ; a[0] = a[0] + 10)\n {\n for(a[2] = 10 ; a[2] <=50 ; a[2] = a[2] + 10)\n {\n for(a[3] = 10 ; a[3] <= 50 ; a[3] = a[3]+ 10)\n {\n a[1] = a[2] + a[3] - a[0];\n if(a[0] + a[3] > a[1] + a[2] && a[0] + a[2] < a[1])\n {\n for(int i1 = 0 ; i1 <= 3 ; i1++)\n {\n if(a[i1]>max[0])\n {\n max[0] = a[i1];\n Max[0] = A[i1];\n }\n }\n for(int i2 = 0 ; i2 <= 3 ; i2++)\n {\n if(a[i2] > max[1] && a[i2] < max[0])\n {\n max[1] = a[i2];\n Max[1] = A[i2];\n }\n }\n for(int i3 = 0 ; i3 <= 3 ; i3++)\n {\n if(a[i3] > max[2] && a[i3] < max[1])\n {\n max[2] = a[i3];\n Max[2] = A[i3];\n }\n }\n for(int i4 = 0 ; i4 <= 3 ; i4++)\n {\n if(a[i4] > max[3] && a[i4] < max[2])\n {\n max[3] = a[i4];\n Max[3] = A[i4];\n }\n }\n for(int i5 = 0 ; i5 <= 3 ; i5++)\n {\n cout< w[1] + w[2])&&(w[0] + w[2] < w[1]))\n\t\tfor (int i = 50; i >= 10; i--) for (int j = 0; j < 4; j++) if (w[j] == i) cout << c[j] << ' ' << i << endl;\n\t\treturn;\n\t}\n\tfor (int i = 10; i <= 50; i += 10)\n\t{\n\t\tw[p] = i;\n\t\twork(p + 1);\n\t}\n}\nint main()\n{\n\tc[0] = 'z';\n\tc[1] = 'q';\n\tc[2] = 's';\n\tc[3] = 'l';\n\twork(0);\n\treturn 0;\n}\n"} +{"label": "78", "index": "38558", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor (int i=1;i<=5;i++)\n\t{\n\t\tz=10*i;\n\t\tfor (int j=1;j<=5;j++)\n\t\t{\n\t\t\tq=10*j;\n\t\t\tfor (int k=1;k<=5;k++)\n\t\t\t{\n\t\t\t\ts=10*k;\n\t\t\t\tfor (int t=1;t<=5;t++)\n\t\t\t\t{\n\t\t\t\t\tl=10*t;\n\t\t\t\t\tif ((z+s)(s+q) && (z+q)==(s+l))\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"l \"<q)&&(z+s0;i=i-10){\n\t\t\t\t\t\t\t\t\t\tif (i==z){\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << i << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (i==q){\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << i << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (i==s){\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << i << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (i==l){\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << i << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n\n\n\n"} +{"label": "78", "index": "38560", "code": "/*\n * Weight.cpp\n *\n * Created on: 2012-10-24\n * Author: ??\n * ???????????????????????????????????????????????????????????10???????????????50?????????????????????????????; ????????????????????????????????????????????????????????????????????????????????????????????\n */\n\n//?????\n\nint main() {\n\tint a[4] = { 10, 10, 10, 10 }; //??????\n\tchar b[4] = { 'z', 'q', 's', 'l' }; //??????\n\tint p = 0; //???????\n\tchar q1; //???????\n\tfor (a[0] = 10; a[0] <= 50; a[0] = a[0] + 10) {\n\t\tfor (a[1] = 10; a[1] <= 50; a[1] = a[1] + 10) {\n\t\t\tfor (a[2] = 10; a[2] <= 50; a[2] = a[2] + 10) {\n\t\t\t\tfor (a[3] = 10; a[3] <= 50; a[3] = a[3] + 10) {\n\n\t\t\t\t\tif (a[1] != a[2] && a[1] != a[3] && a[1] != a[0] && a[2]\n\t\t\t\t\t\t\t!= a[3] && a[2] != a[0] && a[3] != a[0]) {\n\n\t\t\t\t\t\tif (a[0] + a[1] == a[2] + a[3] && a[0] + a[3] > a[2]\n\t\t\t\t\t\t\t\t+ a[1] && a[0] + a[2] < a[1]) //????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (int j = 1; j <= 3; j++) //????\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int k = 0; k < 4 - j; k++) {\n\t\t\t\t\t\t\t\t\tif (a[k] < a[k + 1]) {\n\t\t\t\t\t\t\t\t\t\tp = a[k + 1];\n\t\t\t\t\t\t\t\t\t\ta[k + 1] = a[k];\n\t\t\t\t\t\t\t\t\t\ta[k] = p; //??a[k]?a[k+1]???\n\t\t\t\t\t\t\t\t\t\tq1 = b[k + 1];\n\t\t\t\t\t\t\t\t\t\tb[k + 1] = b[k];\n\t\t\t\t\t\t\t\t\t\tb[k] = q1; //??b[k]?b[k+1]???\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (int l = 0; l < 4; l++) {\n\t\t\t\t\t\t\t\tcout << b[l] << \" \" << a[l] << endl; //????\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\treturn 0; //??\n}\n"} +{"label": "78", "index": "38561", "code": "int main() {\n\tint z1,q1,s1,l1, z, q, s, l;\n\tfor ( z = 10; z <= 50; z += 10) {\n\t\tfor ( q = 10; q != z,q <= 50; q += 10) {\n\t\t\tfor ( s = 10;s != z,s != q,s <= 50; s += 10) {\n\t\t\t\tfor ( l = 10;l != z,l != q,l != s,l <= 50; l += 10) {\n\t\t\t\t\tif ( z + q == s + l && z + l > s + q && z + s < q ) {\n\t\t\t\t\t\tz1 = z;\n\t\t\t\t\t\tq1 = q;\n\t\t\t\t\t\ts1 = s;\n\t\t\t\t\t\tl1 = l;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor ( int i = 50; i >= 10; i --) {\n\t\tif ( z1 == i) cout << \"z\" << \" \" << i << endl;\n\t\tif ( q1 == i) cout << \"q\" << \" \" << i << endl;\n\t\tif ( s1 == i) cout << \"s\" << \" \" << i << endl;\n\t\tif ( l1 == i) cout << \"l\" << \" \" << i << endl;\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38562", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor(z=10;z<=50;z=z+10)\n\t{\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tif(z==q)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(s=10;s<50;s=s+10)\n\t\t\t\t{\n\t\t\t\t\tif((s==z)||(s==q))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif((l==z)||(l==q)||(l==s))\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif((z+q==s+l)&&(z+l>s+q)&&(q>z+s))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(int i=50;i>0;i=i-10)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(z==i)\n\t\t\t\t\t\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<(s0+q0)) k=1;\n else continue;\n if((z0+s0)s+q)&&(z+s(s+q))&&((z+s) 0;i -= 10){\n\t\t\t\t\t\t\tfor(int j = 0;j < 4;j ++){\n\t\t\t\t\t\t\t\tif(a[j] == i)\n\t\t\t\t\t\t\t\t\tcout << name[j] << ' ' << i << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38567", "code": "main()\n{\nint a,b,c,d,i,j,t;\nstatic int x[5];\nchar k;\n char y[5]={'\\0','z','q','s','l'};\nfor(a=10;a<=50;a+=10)\n for(b=10;b<=50;b+=10)\n for(c=10;c<=50;c+=10)\n for(d=10;d<=50;d+=10)\n if(a+b==c+d&&a+d>b+c&&a+c s + q && z + s < q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s << endl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n"} +{"label": "78", "index": "38569", "code": "int main()\n{\n int i;\n\tchar name[4]={'l','q','z','s'}; //???????\n int a[4]={50,40,20,10}; //????????\n\tfor(i=0;i<4;i++) //???????\n\t\tcout<s+q) sb=1;\n\tif (z+ss+q)&&(z+ss+q)&&(q>z+s))\n\t\t\t\t\t\t\t\t\tfor(int j=50;j>=10;j-=10)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(z==j)cout<<'z'<<' '<Sw+Qw) //????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Zw+Sw=10;i=i-10)//for??\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(Zw==i)\n\t\t\t\t\t\t\t\t\t\tcout<<\"z \"< (b[2] + b[1])) && ((b[0] + b[2]) < b[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\tc[i] = b[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\tfor (i = 0; i < 3; i++)\n\t{\n\t\tx = i;\n\t\tfor (j = i + 1; j < 4; j++)\n\t\t\tif (c[x] < c[j])\n\t\t\t{\n\t\t\t\te = c[x];\n\t\t\t\tc[x] = c[j];\n\t\t\t\tc[j] = e;\n\t\t\t\td = a[x];\n\t\t\t\ta[x] = a[j];\n\t\t\t\ta[j] = d;\n\t\t\t}\n\t}\n\tfor (i = 0; i < 4; i++)\n\t\tcout << a[i] << ' ' << c[i] * 10 << endl;\n\treturn 0;\n}\n"} +{"label": "78", "index": "38575", "code": "int main()\n{\n\tint z, q, s, l;\n\tfor (z = 10; z <= 50; z = z + 10) for (q = 10; q <= 50; q = q + 10)\n\t{\n\t\tif (q != z) for (s = 10; s <= 50; s = s + 10)\n\t\t{\n\t\t\tif ((s != z) && (s != q)) for (l = 10; l <= 50; l = l + 10)\n\t\t\t{\n\t\t\t\tif ((l != z) && (l != q) && (l != s))\n\t\t\t\t{\n\t\t\t\t\tif (((z + q) == (s + l)) && ((z + l) > (s + q)) && ((z + s) < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (z == 50) cout << \"z 50\" << endl;\n\t\t\t\t\t\tif (q == 50) cout << \"q 50\" << endl;\n\t\t\t\t\t\tif (s == 50) cout << \"s 50\" << endl;\n\t\t\t\t\t\tif (l == 50) cout << \"l 50\" << endl;\n\t\t\t\t\t\tif (z == 40) cout << \"z 40\" << endl;\n\t\t\t\t\t\tif (q == 40) cout << \"q 40\" << endl;\n\t\t\t\t\t\tif (s == 40) cout << \"s 40\" << endl;\n\t\t\t\t\t\tif (l == 40) cout << \"l 40\" << endl;\n\t\t\t\t\t\tif (z == 30) cout << \"z 30\" << endl;\n\t\t\t\t\t\tif (q == 30) cout << \"q 30\" << endl;\n\t\t\t\t\t\tif (s == 30) cout << \"s 30\" << endl;\n\t\t\t\t\t\tif (l == 30) cout << \"l 30\" << endl;\n\t\t\t\t\t\tif (z == 20) cout << \"z 20\" << endl;\n\t\t\t\t\t\tif (q == 20) cout << \"q 20\" << endl;\n\t\t\t\t\t\tif (s == 20) cout << \"s 20\" << endl;\n\t\t\t\t\t\tif (l == 20) cout << \"l 20\" << endl;\n\t\t\t\t\t\tif (z == 10) cout << \"z 10\" << endl;\n\t\t\t\t\t\tif (q == 10) cout << \"q 10\" << endl;\n\t\t\t\t\t\tif (s == 10) cout << \"s 10\" << endl;\n\t\t\t\t\t\tif (l == 10) cout << \"l 10\" << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38576", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor(z=10;z<=50;z=z+10)\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t\tif(z+q==s+l && z+l>s+q && z+ss+q)&&(z+s(s+q);\n\t\t\t\t\tword[3]=(z+s)=1;i--)\n\t\t\t\t\t\t{if(i==z)\n\t\t\t\t\t\t\tcout<=b+c);\n\t\t\t\t\tword[3]=(a+c0;i--)\n\t{\n\t\tif(m[i]!=0)\n\t\t\tcout<s+q)+(z+sl)\n {\n cout<<'q'<<' '<<10*q<s)\n {\n cout<<'z'<<' '<<10*z<s+q)&&(z+s0;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(i==z/10||i==q/10||i==s/10||i==l/10)\n\t\t\t\t\t\t\t\tcout<s+q&&z+s(s+q)&&(z+s)s+q)&&(z+sp[1].weight+p[2].weight)&&(p[0].weight+p[2].weight0;i--){\n\t\t\t\t\t\t\t\tfor(j=0;ja[2]+a[1]&&a[0]+a[2]s+q&&z+sN[i])\n {t=N[i];N[i]=N[j];N[j]=t;\n M[4]=M[i];M[i]=M[j];M[j]=M[4];};\n }\n cout<=q)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tfor(l=1; l<=5;l++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(l==z||l==q||l==s||z+q!=s+l||z+l<=s+q)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if(l!=z&&l!=q&&l!=s&&z+q==s+l&&z+l>s+q)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tint k, i, t, max=0;\n\t\t\t\t\t\t\t\tchar char1;\n\t\t\t\t\t\t\t\ta[0]=z;a[1]=q;a[2]=s;a[3]=l;\n\t\t\t\t\t\t\t\tfor(k=0;k<4;k++)\n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\tfor(i=3-k;i>0;i--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(a[i-1]a[2]+a[1] && a[0]+a[2]< a[1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor (i=0;i < 3;i++)\n\t\t\t\t\t\t\t\t\t\tfor (j=0;j<3-i;j++)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(a[j]s+q)\n {\n if (z+smax)\n {\n max =q;\n }\n if (s>max)\n {\n max=s;\n }\n if (l>max)\n {\n max=l;\n }\n if((z-min)*(z-max)*(q-min)*(q-max)!=0)\n {\n if (z>q)\n {\n smax=z;\n smin=q;\n }\n else\n {\n smin=z;\n smax=q;\n }\n }\n if((z-min)*(z-max)*(s-min)*(s-max)!=0)\n {\n if (z>s)\n {\n smax=z;\n smin=s;\n }\n else\n {\n smin=z;\n smax=s;\n }\n }\n if((z-min)*(z-max)*(l-min)*(l-max)!=0)\n {\n if (z>l)\n {\n smax=z;\n smin=l;\n }\n else\n {\n smin=z;\n smax=l;\n }\n }\n\t\t if((q-min)*(q-max)*(s-min)*(s-max)!=0)\n {\n if (s>q)\n {\n smax=s;\n smin=q;\n }\n else\n {\n smin=s;\n smax=q;\n }\n }\n if((l-min)*(l-max)*(q-min)*(q-max)!=0)\n {\n if (l>q)\n {\n smax=l;\n smin=q;\n }\n else\n {\n smin=l;\n smax=q;\n }\n }\n if((s-min)*(s-max)*(l-min)*(l-max)!=0)\n {\n if (s>l)\n {\n smax=s;\n smin=l;\n }\n else\n {\n smin=l;\n smax=l;\n }\n }\n if(z==max)\n { \n cout<<\"z\"<<\" \"< s+ q && z + s < q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(l==5)\n\t\t\t\t\t\t\t{cout <<\"l \"<< 10 * l <s+q)&&(z+sk){k=a[j];m=j;}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tk=a[i];a[i]=a[m];a[m]=k;\n\t\t\t\t\t\t}\n for(i=1;i<=4;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (a[i]==z) cout<<\"z \";\n if (a[i]==q) cout<<\"q \";\n\t\t\t\t\t\t\tif (a[i]==s) cout<<\"s \";\n\t\t\t\t\t\t\tif (a[i]==l) cout<<\"l \";\n\t\t\t\t\t\t\tcout< s + q)\n \t if(z + s < q )\n\t\t\t\t\t\t \n\t\t\t\t\t\t cout << endl;\n\t\t\t\t\t cout << 'l' <<' '<<50<(s+q));\n c3=((z+s)=10;i=i-10)\n {\n if(z==i) cout<<\"z\"<<' '<=10)&&(a[3]<=50)&&((a[0]+a[3])>(a[1]+a[2]))&&((a[0]+a[2])=0;i--) //????????????????????????????\n\t for(j=0;j<=i;j++)\n\t {\n\t\t if(a[i]>a[i+1])\n\t\t {\n\t\t\t k=a[i];\n\t\t\t a[i]=a[i+1];\n\t\t\t a[i+1]=k;\n\t\t\t y=b[i];\n\t\t\t b[i]=b[i+1];\n\t\t\t b[i+1]=y;\n\t\t }\n\t }\nfor(i=3;i>=0;i--) //??????????????\n {\n\t printf(\"%c %d\\n\",b[i],a[i]);\n }\nreturn 0;\n}\n\n//????????"} +{"label": "78", "index": "38596", "code": "main()\n{\n char a[6]={'0','0','0','0','0','0'};\n int z,q,s,l,i;\n\n for(z=1;z<6;z++)\n {\n for(q=1;q<6;q++)\n {\n for(s=1;s<6;s++)\n {\n for(l=1;l<6;l++)\n {\n if((z+q==s+l)&&(z+l>s+q)&&(z+s0;i--)\n {\n if(a[i]!='0')\n {\n printf(\"%c %d0\\n\",a[i],i);\n }\n }\n }\n }\n }\n }\n }\n}"} +{"label": "78", "index": "38597", "code": "/*\n * chengtizhong.cpp\n *\n * Created on: 2012-10-22\n * Author: 1200012791??\n * ???????????????????????????????????????????????\n */\nint main(){\n\tint a=0,b=0,c=0,d=0,i=0; //??5???????????0\n\tint x[7]; //???????7?????\n\tchar y[4]; //???????4??????\n\tx[0]=0; //?a[0]???0\n\tx[1]=0; //?a[1]???0\n\tx[2]=0; //?a[2]???0\n\tfor(a=0;a<=50;a+=10){ //a???????????\n\t\tfor(b=10;b<=50;b+=10){ //b???????????\n\t\t\tif(b!=a){ //??b?????a???\n\t\t\t for(c=10;c<=50;c+=10){ //c???????????\n\t\t\t\t if(c!=a&&c!=b){ //??c?????a?b???\n\t\t\t \t for(d=10;d<=50;d+=10){ //d???????????\n\t\t\t\t\t if(d!=a&&d!=b&&d!=c&&(a+b)==(c+d)&&(a+d)>(b+c)&&a+cs+q)+(z+s=0;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (rank[i]==' ') continue;\n\t\t\t\t\t\t\tcout<s+q && z+s=1;i--)\n\t\tif (name[i]!='0') cout<(b+c)&&(a+c) (s + q)) && (z + s) < q)\n\t\t\t\t\t{\n\t\t\t\t\t\tweight[0] = z;\n\t\t\t\t\t\tweight[1] = q;\n\t\t\t\t\t\tweight[2] = s;\n\t\t\t\t\t\tweight[3] = l;\n\t\t\t\t\t}\n\tfor (int i = 0; i < 4; i ++)\n\t{\n\t\tfor (int j = 0; j < 4; j ++)\n\t\t\tif (weight[j] > max)\n\t\t\t{\n\t\t\t\tmax = weight[j];\n\t\t\t\tpos = j;\n\t\t\t}\n\n\t\tcout << num[pos] << \" \" << max << endl;\n\t\tmax = 0;\n\t\tweight[pos] = 0;\n\t}\n\n\treturn 0;\n}\n"} +{"label": "78", "index": "38602", "code": "int main()\n{\n\tint z, q, s, l;\n\tfor (z = 10; z <= 50; z += 10)\n\t\tfor (q = 10; q <= 50; q += 10)\n\t\t{\n\t\t\tif (z == q) continue;\n\t\t\tfor (s = 10; s <= 50; s += 10)\n\t\t\t{\n\t\t\t\tif (z == s || q == s) continue;\n\t\t\t\tfor (l = 10; l <= 50; l += 10)\n\t\t\t\t{\n\t\t\t\t\tif (z == l || s == l || q == l) continue;\n\t\t\t\t\tif (z + q == s + l && z + l > s + q && z + s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38603", "code": "int main()\n{\n int z, q, s, l;\n for(z = 1; z <= 5; z++)\n for(q = 1; q <= 5; q++)\n for(s = 1; s <= 5; s++)\n for(l = 1; l <= 5; l++)\n {\n if((z + q == s + l) && (z + l > s + q) && (z + s < q))\n {\n int a[4] = {z, q, s, l}, b[4] ={z, q, s, l}, i, j, k, p;\n char c[4] = {'z', 'q', 's','l'};\n for(j = 1; j <= 3; j++)\n {\n for(i = 0; i <= 3 - j; i++)\n {\n if(a[i] < a[i + 1])\n {\n p = a[i];\n a[i] = a[i + 1];\n a[i + 1] = p;\n }\n }\n }\n\n for(i = 0; i <= 3; i++)\n {\n for(k = 0; k <= 3; k++)\n {\n if(a[i]==b[k])\n cout << c[k] << \" \" << 10 * a[i] <B+C)&&(A+Ce[i-1])\n\t\t{j=e[i-1];e[i-1]=e[i];e[i]=j;\n\t }\n\n\t\t}//??e??????\n for(i=0;i<4;i++)\n \t{\n \tif(e[i]==a)\n \t cout<<\"z \"< s + q && z + s < q)\n\t\t\t\t\t\tcout << 'l' << ' ' << l << endl \n\t\t\t\t\t\t<< 'q' << ' ' << q << endl\n\t\t\t\t\t\t<< 'z' << ' ' << z << endl\n\t\t\t\t\t\t<< 's' << ' ' << s <a[2]+a[1]&&a[0]+a[2] a[1] + a[2] && a[0] + a[2] < a[1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\t\t\t\tif(a[i] == 50)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(i == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << \"50\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << \"50\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 2)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << \"50\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 3)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << \"50\" << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\t\t\t\tif(a[i] == 40)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(i == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << \"40\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << \"40\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 2)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << \"40\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 3)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << \"40\" << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\t\t\t\tif(a[i] == 30)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(i == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << \"30\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << \"30\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 2)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << \"30\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 3)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << \"30\" << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\t\t\t\tif(a[i] == 20)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(i == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << \"20\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << \"20\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 2)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << \"20\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 3)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << \"20\" << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4; i++)\n\t\t\t\t\t\t\t\t\t\tif(a[i] == 10)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(i == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << \"10\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << \"10\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 2)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << \"10\" << endl;\n\t\t\t\t\t\t\t\t\t\t\tif(i == 3)\n\t\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << \"10\" << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38608", "code": "int main()\n{ \n int z,q,s,l;\n for(z=1;z<=5;z++)\n for(q=1;q<=5;q++)\n for(s=1;s<=5;s++)\n for(l=1;l<=5;l++)\n if((z+q==s+l)&&(z+l>s+q)&&z+s s + q) &&\n\t\t\t\t\t\t(z + s < q)) // ????????\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = 5; i > 0; i--) // ???????????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z == i) cout << \"z \" << z * 10 << endl;\n\t\t\t\t\t\t\tif (q == i) cout << \"q \" << q * 10 << endl;\n\t\t\t\t\t\t\tif (s == i) cout << \"s \" << s * 10 << endl;\n\t\t\t\t\t\t\tif (l == i) cout << \"l \" << l * 10 << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\t\t\t\t\n\treturn 0;\n}"} +{"label": "78", "index": "38610", "code": "int main(){\n\tcout<<\"l\"<<\" \"<<\"50\"<<'\\n'\n\t <<\"q\"<<\" \"<<\"40\"<<'\\n'\n\t <<\"z\"<<\" \"<<\"20\"<<'\\n'\n\t <<\"s\"<<\" \"<<\"10\"<s+q&&z+s s + q) && (z + s < q);\n\t\t\t\t\tif (t == 1) break;\n\t\t\t\t}\n \tif (t == 1) break;\n\t\t\t}\n \tif (t == 1) break;\n\t\t}\n if (t == 1) break;\n\t}\t\n\tfor(i = 1; i <= 5; i ++)\n\t\tname[i] = ' ';\n\tname[z / 10] = 'z';\n\tname[q / 10] = 'q';\n\tname[s / 10] = 's';\n\tname[l / 10] = 'l';\n for(i = 5; i >= 1; i --)\n\t\tif(name[i] != ' ')\n\t\t\tcout << name[i] << ' ' << i * 10 < s + q && z + s < q) {\n\t\t\t\t\t\tw[1] = z;\n\t\t\t\t\t\tw[2] = q;\n\t\t\t\t\t\tw[3] = s;\n\t\t\t\t\t\tw[4] = l;\n\t\t\t\t\t\tn[1] = 'z';\n\t\t\t\t\t\tn[2] = 'q';\n\t\t\t\t\t\tn[3] = 's';\n\t\t\t\t\t\tn[4] = 'l';\n\t\t\t\t\t\tfor (i = 1; i <= 4; i++)\n\t\t\t\t\t\t\tfor (j = i + 1; j <= 4; j++) {\n\t\t\t\t\t\t\t\tif (w[i] < w[j]) {\n\t\t\t\t\t\t\t\t\tt = w[i];\n\t\t\t\t\t\t\t\t\tw[i] = w[j];\n\t\t\t\t\t\t\t\t\tw[j] = t;\n\t\t\t\t\t\t\t\t\tk = n[i];\n\t\t\t\t\t\t\t\t\tn[i] = n[j];\n\t\t\t\t\t\t\t\t\tn[j] = k;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (i = 1; i <= 4; i++)\n\t\t\t\t\t\t\t\t\tcout << n[i] << ' ' << w[i] * 10 << endl;\n\t\t\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38614", "code": "int main ()\n{\n\tint sum = 0;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//?????? \n\tchar zz = 'z', qq = 'q', ss = 's', ll = 'l';\t\t\t\t\t\t\t\t\t//?????????? \n\tint z = 0, q = 0, s = 0, l = 0;\t\t\t\t\t\t\t\t\t\t\t\t\t//??????? \n\tfor ( z = 10; z < 50; z = z + 10)\n\t\tfor ( q = 10; q <= 50; q = q + 10)\n\t\t\tfor ( s = 10; s <= 50; s = s + 10)\n\t\t\t\tfor ( l = 10; l <= 50; l = l + 10)\n\t\t\t\t{\n\t\t\t\t\tsum = ( z + q == s + l ) + ( z + l > s + q ) + ( z + s < q );\n\t\t\t\t\tif ( sum == 3 && z != q != s != l )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( z == 50 ) cout << zz << \" \" << z << endl;\n\t\t\t\t\t\tif ( q == 50 ) cout << qq << \" \" << q << endl;\n\t\t\t\t\t\tif ( s == 50 ) cout << ss << \" \" << s << endl;\n\t\t\t\t\t\tif ( l == 50 ) cout << ll << \" \" << l << endl;\n\t\t\t\t\t\tif ( z == 40 ) cout << zz << \" \" << z << endl;\n\t\t\t\t\t\tif ( q == 40 ) cout << qq << \" \" << q << endl;\n\t\t\t\t\t\tif ( s == 40 ) cout << ss << \" \" << s << endl;\n\t\t\t\t\t\tif ( l == 40 ) cout << ll << \" \" << l << endl;\n\t\t\t\t\t\tif ( z == 30 ) cout << zz << \" \" << z << endl;\n\t\t\t\t\t\tif ( q == 30 ) cout << qq << \" \" << q << endl;\n\t\t\t\t\t\tif ( s == 30 ) cout << ss << \" \" << s << endl;\n\t\t\t\t\t\tif ( l == 30 ) cout << ll << \" \" << l << endl;\n\t\t\t\t\t\tif ( z == 20 ) cout << zz << \" \" << z << endl;\n\t\t\t\t\t\tif ( q == 20 ) cout << qq << \" \" << q << endl;\n\t\t\t\t\t\tif ( s == 20 ) cout << ss << \" \" << s << endl;\n\t\t\t\t\t\tif ( l == 20 ) cout << ll << \" \" << l << endl;\n\t\t\t\t\t\tif ( z == 10 ) cout << zz << \" \" << z << endl;\n\t\t\t\t\t\tif ( q == 10 ) cout << qq << \" \" << q << endl;\n\t\t\t\t\t\tif ( s == 10 ) cout << ss << \" \" << s << endl;\n\t\t\t\t\t\tif ( l == 10 ) cout << ll << \" \" << l << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38615", "code": "int main()\n{\n int z,q,s,l;\n int b[4]={z,q,s,l};\n int cc1,cc2,cc3,cc4;\n int sum;\nchar num=' ';\nfor(z=1;z<6;z++)\n for(q=1;q<6;q++)\n for(s=1;s<6;s++)\n for(l=1;l<6;l++)\n {\ncc1=(z+l)>(s+q);\ncc2=(z+s)0;i--)\n{\nif(z==i) cout<<\"z \"<w[s]+w[q] && w[z]+w[s]a[j])\n {\n t=a[i];a[i]=a[j];a[j]=t; // ??\n t=w[i];w[i]=w[j];w[j]=t;\n ch=name[i];name[i]=name[j];name[j]=ch;\n }\n for (i=0;i<4;i++) // ??\n cout << name[i] << ' ' << w[i] << endl;\n return 0;\n }\n return 0;\n}"} +{"label": "78", "index": "38617", "code": "int main()\n{\n int w[4],i,n[5]; //w?????????????0123??n?????????i?????\n char name[4]={'z','q','s','l'};\n for(w[0]=0;w[0]<=4;w[0]++)\n for(w[1]=0;w[1]<=4;w[1]++)\n {\n if(w[0]==w[1])\n continue;\n for(w[2]=0;w[2]<=4;w[2]++)\n {\n if(w[2]==w[0]||w[2]==w[1])\n continue;\n for(w[3]=0;w[3]<=4;w[3]++)\n {\n if(w[3]==w[0]||w[3]==w[1]||w[3]==w[2])\n continue;\n for(i=0;i<=4;i++)\n n[i]=4;\n for(i=0;i<4;i++)\n n[w[i]]=i;\n if(w[0]+w[1]==w[2]+w[3]&&w[0]+w[3]>w[1]+w[2]&&w[0]+w[2]+1=0;i--)\n if(n[i]<4)\n cout<weight[1]+weight[2]);//?z?l??????q?s??????c3???1?\n\t\t\t\t\tc4=(weight[0]+weight[2]i;j--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(weight[j]>weight[j-1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tt=weight[j-1];\n\t\t\t\t\t\t\t\t\tweight[j-1]=weight[j];\n\t\t\t\t\t\t\t\t\tweight[j]=t;\n\t\t\t\t\t\t\t\t\tc=name[j-1];\n\t\t\t\t\t\t\t\t\tname[j-1]=name[j];\n\t\t\t\t\t\t\t\t\tname[j]=c;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcout<(a[2]+a[3]))&&(a[2]>(a[1]+a[3])))\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[1]=a[1];\n\t\t\t\t\t\tresult[2]=a[2];\n\t\t\t\t\t\tresult[3]=a[3];\n\t\t\t\t\t\tresult[4]=a[4];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=1;i<=4;i++)\n\t{\n\t\tfor(j=1;j<=4-i;j++)\n\t\t{\n\t\t\tif(result[j]Ms+Mq)&&(Mz+Ms(s+q))&&((z+s) s + q) && (z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"l\" << \" \" << l * 10 << endl;\n\t\t\t\t\t\tcout << \"q\" << \" \" << q * 10 << endl;\n\t\t\t\t\t\tcout << \"z\" << \" \" << z * 10 << endl;\n\t\t\t\t\t\tcout << \"s\" << \" \" << s * 10 << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38623", "code": "int main()\n{\n\tint i,n,z,q,s,l;\n\tchar a[6];\n\tfor(i=0;i<=5;i++)\n\t\ta[i]=0;\n\tfor(z=1;z<=5;z++)\n\t{\n\t\tfor(q=1;q<=5;q=q+1)\n\t\t{\n\t\t\tif(z==q)continue;\n\t\t\tfor(s=1;s<=5;s=s+1)\n\t\t\t{\n\t\t\t\tif(s==z||s==q)continue;\n\t\t\t\tfor(l=1;l<=5;l=l+1)\n\t\t\t\t{\n\t\t\t\t\tif(l==z||l==q||l==s)continue;\n\t\t\t\t\tif((z+q==s+l)+(z+l>s+q)+(z+s=1;i--)\n\t\t\t\t\t {\n\t\t\t\t\t\t if(a[i]!=0)cout<b+c)\n\t &&(a+c=0;i--)\n for (j=0;j<=i;j++)\n if (weight[j]s+q)&&(z+sq&&q>z&&z>s) //???????l>q>s,???????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (z>l&&l>q&&q>s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\tcout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l>z&&z>q&&q>s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l>q&&q>s&&s>z)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38626", "code": "struct w\n{\n\tchar n;\n\tint w;\n}a[4];\t\nvoid main()\n{\n\tint z,q,s,l,i,j,t;\n\tchar x;\n\tfor(z=1;z<60;z++)\n\tfor(q=1;q<60;q++)\n\tfor(s=1;s<60;s++)\n\tfor(l=1;l<60;l++)\n\t{\n\t\tif(z%10==0&&q%10==0&&s%10==0&&l%10==0&&z+q==s+l&&z+l>s+q&&z+ss+q&&z+ss+q&&z+sa[1]+a[2]&&a[0]+a[2]s+q && z+s= 1;x--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(z == x)\n\t\t\t\t\t\t\t\t\t\t\tcout <<'z'<<' '<<10*x<j+k){\n\t\t\t\tif(i+k0;i--){\n\t\tfor(int j=i;j>0;j--){\n\t\t\tif(r[j][0]>r[j-1][0]){\n\t\t\t\tint tmp=r[j][0];\n\t\t\t\tr[j][0]=r[j-1][0];\n\t\t\t\tr[j-1][0]=tmp;\n\t\t\t\tchar tmpc=r[j][1];\n\t\t\t\tr[j][1]=r[j-1][1];\n\t\t\t\tr[j-1][1]=tmpc;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(int i=0;i<4;i++){\n\t\tcout<<(char)r[i][1]<<' '<=q)continue;\n take_ans();\n return 0;\n }\n }\n }\n }\n}\n"} +{"label": "78", "index": "38634", "code": "int main()\n{\n\tint i,z,q,s,l,x=0,x1,x2,x3; //???????i?????z,q,s,l???????\n\tchar a[6]={'\\0'};\n\tfor (z=1;z<=5;z++)\n\t{\n\t\tfor (q=1;q<=5;q++)\n\t\t{\n\t\t\tif(z==q) continue;\n\t\t\tfor (s=1;s<=5;s++)\n\t\t\t{\n\t\t\t\tif(z==s||q==s) continue;\n\t\t\t\tfor (l=1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif(z==l||q==l||s==l) continue; //???\n\t\t\t\t\tx1=((z+q)==(s+l)); //??????3???\n\t\t\t\t\tx2=((z+l)>(s+q));\n\t\t\t\t\tx3=((z+s)=1;i--)\n\t\tif (i!=3)\n\t\t\tcout<s+q&&z+s=0;i--)\n\t\t\t\t\t\t {if (a[i]==b[0]) cout<<\"z\"<<\" \"<*b) swap(*a,*b);\n\tif(*a>*c) swap(*a,*c);\n\tif(*a>*d) swap(*a,*d);\n\tif(*b>*c) swap(*b,*c);\n\tif(*b>*d) swap(*b,*d);\n\tif(*c>*d) swap(*c,*d);\n\n}\n"} +{"label": "78", "index": "38636", "code": "int main()\n{ int z =10,q=10,s=10,l=10 ;\n int qq[5];int terp;\n qq[0]=z ,qq[1]=q,qq[2]=s,qq[3]=l;\n int i=1 ,j=1,k=1,v=1 ;\n z=i*10 ;q=j*10 ;s=k*10;l=v*10;\n int m=50,n=40, b=20 ;\n for(;i<6;i++) \n for(;j<6;j++)\n for(;k<6;k++)\n for(;v<6;v++)\n if( z + q - s - l == 0)\n if( z + l > s + q)\n \t if(z + s < q )\n\t\t\t\t\t\t for ( m=0 ;m<=50 ;m++)\n\t\t\t\t\t\t\t for(n=0;n<=40 ;n++)\n\t\t\t\t\t\t\t\t for (b=0 ;b<=20 ;b++)\n\t\t\t\t\t\t\t\t\t if (b>n&&n=4;l--)\n {\n for(q=l-1;q>=3;q--)\n {\n for(z=q-1;z>=2;z--)\n {\n for(s=z-1;s>=1;s--)\n {\n if(z+q==s+l&&z+l>s+q&&z+s a[1] + a[2] )&&( a[0] + a[2] < a[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( i = 0 ; i < 4 ; i ++ )\n\t\t\t\t\t\t\tfor ( j = i+1 ; j <4 ; j ++ )\n\t\t\t\t\t\t\t\tif (a[i] weight[2] + weight[1]) && \n\t\t\t\t\t\t\t\t\t(weight[0] + weight[2] < weight[1]))\n\t\t\t\t\t\t\t\t//????????????\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4 && weight[i] != 50; i++)\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\t\t\tif(i != 4)\n\t\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << weight[i] << endl;\n\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4 && weight[i] != 40; i++)\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\t\t\tif(i != 4)\n\t\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << weight[i] << endl;\n\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4 && weight[i] != 30; i++)\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\t\t\tif(i != 4)\n\t\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << weight[i] << endl;\n\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4 && weight[i] != 20; i++)\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\t\t\tif(i != 4)\n\t\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << weight[i] << endl;\n\n\t\t\t\t\t\t\t\t\tfor(i = 0; i < 4 && weight[i] != 10; i++)\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\t\t\tif(i != 4)\n\t\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << weight[i] << endl;\n\t\t\t\t\t\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38640", "code": "/*\n * 8 1010.cpp\n *\n * Created on: 2013-10-10\n * Author: weng\n * ??????????????????????????????\n * ??????????????????????????10?????\n * ??????????50?????????????????????????????;\n * ???????????????????????????????????????????\n * ??????????????????????????????????\n * ???????????????\n * ????\n * ?\n * ????\n * ???????????????????????????????\n */\n\n\n\n\nint main()\n{\n\tint z,q,s,l;\n\tz=1;\n\twhile(z<6)\n\t{\n\t\tq=1;\n\t\twhile(q<6)\n\t\t{\n\t\t\tif(q==z)\n\t\t\t\tq++;\n\t\t\ts=1;\n\t\t\twhile(s<6)\n\t\t\t{\n\t\t\t\twhile(((s==q)+(s==z))!=0)\n\t\t\t\t{\n\t\t\t\t\ts++;\n\t\t\t\t}\n\t\t\t\tl=1;\n\t\t\t\twhile(l<6)\n\t\t\t\t{\n\t\t\t\twhile(((l==z)+(l==q)+(l==s))!=0)\n\t\t\t\t{\n\t\t\t\t\tl++;\n\t\t\t\t}\n if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tl++;\n\t\t\t\t}\n\t\t\t\t if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)\n\t\t\t\t\tbreak;\n\t\t\t\ts++;\n\t\t\t}\n\t\t\t if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)\n\t\t\t\tbreak;\n\t\t\tq++;\n\t\t}\n\t\t if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)\n\t\t\tbreak;\n z++;\n\t}\n\tz=z*10;\n\ts=s*10;\n\tl=l*10;\n\tq=q*10;\nchar a[5];\na[0]='z';a[1]='q';a[2]='s';a[3]='l';\nint b[5],i=0,j=1;\nb[0]=z;b[1]=q;b[2]=s;b[3]=l;\nwhile(i<3)\n{\n\twhile(j<4)\n\t{\n\tif(b[i]>b[j])\n\t{\n\t\tb[4]=b[i],a[4]=a[i];\n\t\tb[i]=b[j],a[i]=a[j];\n\t\tb[j]=b[4],a[j]=a[4];\n\t}\n\tj++;\n\t}\n\ti++;\n\tj=i+1;\n}\ni=3;\n\t\twhile(i>=0)\n\t\t{\ncout<(b+c))\n if ((a+c)f[j])\n {\n k=f[i];f[i]=f[j];f[j]=k;\n n=m[i];m[i]=m[j];m[j]=n;\n }\n for (i=1;i<=4;i++)\n cout <(s+q))&&((z+s)0;k--)\n {\n if (b[k]>b[k-1])\n {\n m=b[k];\n b[k]=b[k-1];\n b[k-1]=m;\n c=a[k];\n a[k]=a[k-1];\n a[k-1]=c;\n }\n }\n }\n for(d=0;d<4;d++) printf(\"%c %d\\n\",a[d],b[d]);\n printf(\"%c%c%c%c\",f,f,f,f);\n\treturn 0;\n}\n"} +{"label": "78", "index": "38643", "code": "int main()\n{\n\tint z,q,s,l,i,s1,s2,s3; //??z,q,s,l????\n char a[5]={' '}; //???????a[5]??????\n\tfor(z=1;z<=5;z++){ //???z,q,s,l\n\t\tfor(q=1;q<=5;q++){\n\t\t\tif(z==q) continue;\n\t\t\tfor(s=1;s<=5;s++){\n\t\t\t\tif(s==z||s==q) continue;\n\t\t\t\tfor(l=1;l<=5;l++){\n\t\t\t\t\tif(l==z||l==q||l==s) continue;\n\t\t\t\t\ts1=(z+q==s+l);\n\t\t\t\t\ts2=(z+l>s+q);\n\t\t\t\t\ts3=(z+s=1;i--){ //?????\n\t\t\t\t\t\t\tif(a[i]!=0)\n\t\t\t\t\t\t\t\tcout< b + c) && (a + c < b)) //??????????????\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t if( (a + b == c + d) && (a + d > b + c) && (a + c < b)) //?????????????\n\t\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif( (a + b == c + d) && (a + d > b + c) && (a + c < b)) //?????????????\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif( (a + b == c + d) && (a + d > b + c) && (a + c < b)) //?????????????\n\t\t\tbreak;\n\t}\n\tx[0] = a; //??????????\n\tx[1] = b;\n\tx[2] = c;\n\tx[3] = d;\n\tname[0] = 'z'; //??????????\n\tname[1] = 'q';\n\tname[2] = 's';\n\tname[3] = 'l';\n\tfor(j = 0;j < 3;j ++ ) //????????????\n\t{\n\t\tfor (i = 0;i < 3 - j;i ++ )\n\t\t{\n\t\t\tif ( x[i] < x[i + 1])\n\t\t\t{\n\t\t\t\tt = x[i];x[i] = x[i + 1];x[i + 1] = t;\n\t\t\t\tk = name[i];name[i] = name[i + 1];name[i + 1] = k;\n\t\t\t}\n\t\t}\n\t}\n\tfor( i = 0;i < 4;i ++ ) //????????? ??\n\t\tcout << name[i] << \" \" << x[i] << endl;\n\treturn 0;\n}\n\n\n"} +{"label": "78", "index": "38645", "code": "int main(){\n\tint z,q,s,l;\n\tfor(z=10;z<=50;z+=10)\n\tfor(q=10;q<=50;q+=10)\n\tfor(s=10;s<=50;s+=10)\n\tfor(l=10;l<=50;l+=10){\n\t\tif(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l&&z+q==s+l&&z+l>s+q&&z+sc+b)&&(a+c(s+q)&&(z+s)i;j--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(a[j]>a[j-1])\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tt=a[j];\n\t\t\t\t\t\t\t\t\t\t\ta[j]=a[j-1];\n\t\t\t\t\t\t\t\t\t\t\ta[j-1]=t;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(int i=0;i<=3;i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(z==a[i])\n\t\t\t\t\t\t\t\t\t\tprintf(\"\\nz %d\",10*z);\n\t\t\t\t\t\t\t\t\tif(q==a[i])\n\t\t\t\t\t\t\t\t\t\tprintf(\"\\nq %d\",10*q);\n\t\t\t\t\t\t\t\t\tif(s==a[i])\n\t\t\t\t\t\t\t\t\t\tprintf(\"\\ns %d\",10*s);\n\t\t\t\t\t\t\t\t\tif(l==a[i])\n\t\t\t\t\t\t\t\t\t\tprintf(\"\\nl %d\",10*l);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38648", "code": "\nvoid main()\n{\n\tint a[4],i,j,t;\n\tchar c[4]={'z','q','s','l'},te;\n\tfor (a[0]=1;a[0]<6;a[0]++)\n\t{\n\t\tfor (a[1]=1;a[1]<6;a[1]++)\n\t\t{\n\t\t\tif (a[1]==a[0]) continue;\n\t\t\telse \n\t\t\t\tfor (a[2]=1;a[2]<6;a[2]++)\n\t\t\t\t{\n\t\t\t\t\tif (a[2]==a[0]||a[2]==a[1]) continue;\n\t\t\t\t\telse \n\t\t\t\t\t\tfor (a[3]=1;a[3]<6;a[3]++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (a[3]==a[0]||a[3]==a[1]||a[3]==a[2]) continue;\n\t\t\t\t\t\t\telse if ((a[0]+a[1]==a[2]+a[3])&&(a[0]+a[3]>a[2]+a[1])&&(a[0]+a[2]q+s)&&(z+s(s+q))+((s+z)l&&l>s&&s>z) cout << \"q\" << \" \" << q << endl << \"l\" << \" \" << l << endl << \"s\" << \" \" << s <l&&l>z&&z>s) cout << \"q\" << \" \" << q << endl << \"l\" << \" \" << l << endl << \"z\" << \" \" << z <s&&s>l&&l>z) cout << \"q\" << \" \" << q << endl << \"s\" << \" \" << s << endl << \"l\" << \" \" << l <s&&s>z&&z>l) cout << \"q\" << \" \" << q << endl << \"s\" << \" \" << s << endl << \"z\" << \" \" << z <z&&z>s&&s>l) cout << \"q\" << \" \" << q << endl << \"z\" << \" \" << z << endl << \"s\" << \" \" << s <z&&z>l&&l>s) cout << \"q\" << \" \" << q << endl << \"z\" << \" \" << z << endl << \"l\" << \" \" << l <q&&q>s&&s>z) cout << \"l\" << \" \" << l << endl << \"q\" << \" \" << q << endl << \"s\" << \" \" << s <q&&q>z&&z>s) cout << \"l\" << \" \" << l << endl << \"q\" << \" \" << q << endl << \"z\" << \" \" << z <s&&s>q&&q>z) cout << \"l\" << \" \" << l << endl << \"s\" << \" \" << s << endl << \"q\" << \" \" << q <s&&s>z&&z>q) cout << \"l\" << \" \" << l << endl << \"s\" << \" \" << s << endl << \"z\" << \" \" << z <z&&z>s&&s>q) cout << \"l\" << \" \" << l << endl << \"z\" << \" \" << z << endl << \"s\" << \" \" << s <z&&z>q&&q>s) cout << \"l\" << \" \" << l << endl << \"z\" << \" \" << z << endl << \"q\" << \" \" << q <(s+q);\n\t\t\t\t a3=(z+s) =0;i--)\n {\n\t if(weight[i]!=0)\n\t cout<s+q && z+ss+q)\n\t\t\t\t\t\t\t\tif (z+ss+q&&z+s(weight[1]+weight[2])&&\n\t\t\t\t\t\t\t\t\t(weight[0]+weight[2]) weight[1] + weight[2]\n && weight[0] + weight[2] < weight[1])\n {\n for (int i = 0; i < 4; i++)\n {\n for (int j = 0; j < 3 - i; j++)\n {\n if (weight[j] < weight[j + 1])\n {\n temp = weight[j + 1];\n weight[j + 1] = weight[j];\n weight[j] = temp;\n temp1 = a[j + 1];\n a[j + 1] = a[j];\n a[j] = temp1;\n }\n }\n }\n for (int i = 0; i < 4; i++)\n {\n cout << a[i] << \" \" << weight[i] << endl;\n }\n }\n }\n }\n }\n return 0;\n}"} +{"label": "78", "index": "38657", "code": "int main()\n{\n int z,q,s,l,i,check;//????\n char a[6];\n for(z=1;z<=5;z++) //????\n\t for(q=1;q<=5;q++) \n\t\t for(s=1;s<=5;s++) \n\t\t for(l=1;l<=5;l++)\n\t\t {check=(z+q==s+l)+(z+l>s+q)+(z+s=1;i--)\n\t\t\t\t if(i==z||i==q||i==s||i==l)\n\t\t\t cout<=1)&&(l<=5)&&(z+l>s+q)&&(z+s (weight[2] + weight[1]))\n if ( (weight[0] + weight[2]) < weight[1] )\n {\n for ( i = 0; i < 3; i++ )\n for ( j = i + 1; j < 4; j++ )\n if ( weight[i] < weight[j] )\n {\n t = weight[i];\n weight[i] = weight[j];\n weight[j] = t;\n m = name[i];\n name[i] = name[j];\n name[j] = m;\n }\n for ( i = 0; i < 4; i++ )\n cout << name[i] << \" \" << weight[i] * 10 << endl;\n }\n return 0;\n}"} +{"label": "78", "index": "38660", "code": "int main()//?????\n{\n\tint z,q,s,l,i;\n\tchar r[6]={'\\0'};\n\tfor(z=1;z<=5;z++)\n\t\tfor(q=1;q<=5;q++)\n\t\t\tfor(s=1;s<=5;s++)\n\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif(z==q||z==s||z==l||q==s||q==l||s==l)continue;\n\t\t\t\t\tif(z+q==s+l&&z+l>s+q&&z+s0;i--)\n\t\t\t\t\t\t\tif(r[i]!='\\0')\n\t\t\t\t\t\t\t\tcout<(s+q)&&(z+s) weight[1] + weight[2] \n\t\t\t\t\t\t&& weight[0] + weight[2] < weight[1]) //??????\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (j = 5; j >= 1; j --)\n\t\t\t\t\t\t\tfor (i = 0; i < 4; i ++) //????????? ???????50???10\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(weight[i] == j) \n\t\t\t\t\t\t\t\t\tcout << name[i] << ' ' << j * 10 << endl; //???????????\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n return 0;\n}\n"} +{"label": "78", "index": "38663", "code": "\nint main()\n{\n\tint i,z,q,s,l,a[51]={0};\n\tfor(i=10;i<=50;i=i+50) a[i]=i;\n\tfor(z=10;z<=50;z=z+10)\n\t{\tfor(q=10;q<=50;q=q+10)\n\t { if(z!=q)\n\t { for(s=10;s<=50;s=s+10)\n\t\t { if(z!=s&&s!=q)\n\t { for(l=10;l<=50;l=l+10)\t\t \n\t\t\t { if(l!=z&&l!=q&&l!=s)\n\t\t\t\t { if((z+q==s+l)&&(z+l>s+q)&&(z+s=10;i=i-10)\n\t\t\t\t\t { if(a[i]!=0)\n\t\t\t\t\t { if(a[i]=l) cout<<\"l\"<<\" \"< (c + b));\n\t\t\t\t\tw[3] = ((a + c) < b);\n\t\t\t\t\tif ((w[1] + w[2] + w[3]) == 3) { //??????????????????\n\t\t\t\t\t\tz = a * 10;\n\t\t\t\t\t\tq = b * 10;\n\t\t\t\t\t\ts = c * 10;\n\t\t\t\t\t\tl = d * 10;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tchar rank[5] = { 'z', 'q', 's', 'l' }, temp1; //????????\n\tint m[5] = { z, q, s, l }, temp2;\n\tfor (j = 0; j < 3; j++)\n\t\tfor (i = 0; i <= (2 - j); i++) {\n\t\t\tif (m[i] < m[i + 1]) { //????????????????????\n\t\t\t\ttemp1 = rank[i];\n\t\t\t\trank[i] = rank[i + 1];\n\t\t\t\trank[i + 1] = temp1;\n\t\t\t\ttemp2 = m[i];\n\t\t\t\tm[i] = m[i + 1];\n\t\t\t\tm[i + 1] = temp2;\n\t\t\t}\n\t\t}\n\n\tfor (i = 0; i < 4; i++) { //??????????\n\t\tcout << rank[i] << ' ' << m[i] << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38665", "code": "int main()\n{\n\tint z,q,s,l,a[100],c[100],i,j,t1,t2;\n\tchar b[5];\n\tfor (z=1;z<=5;z++)\n\t{\n\t\tfor (q=1;q<=5;q++)\n\t\t\tfor (s=1;s<=5;s++)\n\t\t\t\tfor (l=1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif ((z+q==s+l)+((z+l)>(s+q))+((z+s)s+q&&z+sd);\n\t\t\t\t\tcc3=(es+l&&z+s(C+B))+((A+C)0;j--)\n {\n if(rank[j]=='0') continue;\n else\n {cout<Ws+Wq)&&(Wz+Ws=1;i--)\n {\n if(rank[i]=='\\0')\n continue;\n else cout<(s+q));\n\t\t\t\t\tint pp3 = ((z+s)s[c]+q[b]&&z[a]+s[c](s+q)&&(z+s)0;i--)\n\t{\n\t\tif(d[i]!='0')cout< s + q && z + s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[0] = z; a[1] = q; a[2] = s; a[3] = l;\n\t\t\t\t\t\tfor( i = 0; i < 3; i ++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(j = 0; j < 3- i; j ++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[j] < a[j + 1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tt = a[j + 1]; a[j + 1] = a[j]; a [j] = t;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i = 0; i < 4;i ++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(z == a[i]) cout << \"z\"<< \" \" << 10 * a[i] << endl;\n\t\t\t\t\t\t\tif(q == a[i] ) cout << \"q\"<< \" \" << 10 * a[i] << endl;\n\t\t\t\t\t\t\tif(s == a[i] ) cout << \"s\"<< \" \" << 10 * a[i] << endl;\n\t\t\t\t\t\t\tif(l == a[i] ) cout << \"l\"<< \" \" << 10 * a[i] << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\treturn 0;\n}\n\n\n\n"} +{"label": "78", "index": "38675", "code": "//??????????????????????????????\n//??????????????????????????10?????\n//??????????50?????????????????????????????;\n//???????????????????????????????????????????\n//?????????????????????????????????????????????????\nint main()\n{\n\n\tint z,q,s,l,sum;\n int a1,a2,a3,a4,a5,a6,a7,a8;\n for(z=1;z<=5;z++)\n for(q=1;q<=5;q++)\n \t for(s=1;s<=5;s++)\n \t\t for(l=1;l<=5;l++)\n \t\t {\n a1=(z<=5);a2=(q<=5);a3=(s<=5);a4=(l<=5);\n a5=(z+q==s+l);a6=(z+l>s+q);a7=(s+zs+q&&z+s=1;i--)\n\t{\n\t if(a[i]>='a'&&a[i]<='z') cout<y?x:y;\nn=n>z?n:z;\nn=n>w?n:w;\nif (n==x) m='z';\nif (n==y) m='q';\nif (n==z) m='s';\nif (n==w) m='l';//??max???????????????\nreturn(m);\n}\nint main(){\n\tint z,q,s,l,i,Z,Q,S,L;\n\tfor(z=10;z<=50;z=z+10)\n\t{ for(q=10;q<=50;q=q+10)\n\t\t{\tfor(s=10;s<=50;s=s+10)\n\t\t\t{\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{ //???????????\n\t\t\t\tif((z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(s!=l)\n\t\t\t\t&&(q!=l)&&(z+q==s+l)&&(z+l>s+q)&&(z+sb+c&&a+c(s+q))&&((z+s)<(q)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ta[0]=z,a[1]=q,a[2]=s,a[3]=l;\n\t\t\t\t\t\t\t\t\tm[0]='z';m[1]='q';m[2]='s';m[3]='l';\n\t\t\t\t\t\t\t\t\tfor(i=0;i<3;i++){//?????\n\t\t\t\t\t\t\t\t\t\tfor(j=0;j<(3-i);j++){\n\t\t\t\t\t\t\t\t\t\t\tif (a[j]>a[j+1]){\n\t\t\t\t\t\t\t\t\t\t\t\tc=a[j];\n\t\t\t\t\t\t\t\t\t\t\t\ta[j]=a[j+1];\n\t\t\t\t\t\t\t\t\t\t\t\ta[j+1]=c;\n\t\t\t\t\t\t\t\t\t\t\t\td=m[j];\n\t\t\t\t\t\t\t\t\t\t\t\tm[j]=m[j+1];\n\t\t\t\t\t\t\t\t\t\t\t\tm[j+1]=d;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcout< (S + Q)) + ((Z + S) < Q) == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (i = 5; i >= 1; i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(i == Z)\n\t\t\t\t\t\t\t\tcout << \"z \" << 10 * i << endl;\n\t\t\t\t\t\t\telse if(i == Q)\n\t\t\t\t\t\t\t\tcout << \"q \" << 10 * i << endl;\n\t\t\t\t\t\t\telse if(i == S)\n\t\t\t\t\t\t\t\tcout << \"s \" << 10 * i << endl;\n\t\t\t\t\t\t\telse if (i == L)\n\t\t\t\t\t\t\t\tcout << \"l \" << 10 * i << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n}\n\n"} +{"label": "78", "index": "38681", "code": "int main()\n{\n\tint z, q, s, l;\n\n\tfor(z = 10; z <= 50; z += 10)\n\tfor(q = 10; q <= 50; q += 10)\n\tfor(s = 10; s <= 50; s += 10)\n\tfor(l = 10; l <= 50; l += 10)\n\tif(z + q == s + l && z + l > s +q && z + s < q)\n\t{\n\t\t\t\t\t\n\t\tcout << \"l \" << l << endl;\n\t\tcout << \"q \" << q << endl;\n\t\tcout << \"z \" << z << endl;\n\t\tcout << \"s \" << s << endl;\n\n\t}\n\n\treturn 0 ;\n}\n"} +{"label": "78", "index": "38682", "code": "int main()\n{\n int a[5],i,j,t;\n char c[5],d;\n c[1]='z';\n c[2]='q';\n c[3]='s';\n c[4]='l';\n for(a[2]=4;a[2]<6;a[2]++)\n {\n for(a[1]=1;a[1]a[2]+a[3]&&a[4]>0&&a[4]<6)\n\t\t\t {\n\t\t\t for(i=1;i<4;i++)\n\t\t\t\t{\n\t\t\t\t\tfor(j=4;j>i;j--)\n\t\t\t\t\t{\n\t\t\t\t\t if(a[i](s+q);\n word[2]=(z+s)=1;i--)\n\t\t\t\t {\n\t\t\t\t\t if(z==i) cout<<'z'<<' '<(w[1]+w[2]))\n {\n if((w[0]+w[2]) s + q && z + s < q)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tcout << \"l \" << l << endl;\n\t\t\tcout << \"q \" << q << endl;\n\t\t\tcout << \"z \" << z << endl;\n\t\t\tcout << \"s \" << s << endl;\n\t\t}\n\t}\n\t\n\treturn 0;\n\t\n}"} +{"label": "78", "index": "38686", "code": "int main()\n{\n\tint z,q,s,l,a[4],i,j,t,m;//????\n\tchar b[4]={'z','q','s','l'},k;//????\n\tfor(z=1;z<=5;z++)\n\t\tfor(q=1;q<=5;q++)\n\t\t\tfor(s=1;s<=5;s++)\n\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t if(z+q==s+l&&z+l>s+q&&z+ss+q?z+s(s+q))&&((z+s) l)\n {\n cout << \"q \" << q << endl;\n cout << \"l \" << l << endl;\n cout << \"s \" << s << endl; \n cout << \"z \" << z << endl;\n }\n else\n {\n cout << \"l \" << l << endl;\n cout << \"q \" << q << endl;\n cout << \"z \" << z << endl; \n cout << \"s \" << s << endl;\n }\n }\n }\n }\n }\n }\n return 0;\n}\n"} +{"label": "78", "index": "38688", "code": "/*\n * chengtizhong.cpp\n *\n * Created on: 2012-10-18\n * Author: ??\n * description????????????????????????????????????????????\n * ?????????????10???????????????50?????????????????????????????;\n * ?????????????????????????????????????????????????????????????\n * ???????????????????????????????\n */\nint main()//???\n{\n int z,q,s,l;\n for(z=1;z<=5;z++)\n \t for(q=1;q<=5;q++)\n \t\t for(s=1;s<=5;s++)\n \t\t\t for(l=1;l<=5;l++)//???????\n \t\t\t {\n \t\t\t\t if((z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l))\n \t\t\t\t\t if( ((z+q)==(s+l)) && ((z+l)>(s+q)) && ((z+s)b+c&&a+c=10;i=i-10)\n\t\t\t\t\t {\n\t\t\t\t\t\t if(a==i)\n\t\t\t\t\t\t\t cout<<\"z \"<(s+q))+((z+s)q)&&(q>s)&&(s>l))cout <<\"z\"<<\" \"<q)&&(q>l)&&(l>s))cout <<\"z\"<<\" \"<s)&&(s>l)&&(l>q))cout <<\"z\"<<\" \"<s)&&(s>q)&&(q>l))cout <<\"z\"<<\" \"<l)&&(l>s)&&(s>q))cout <<\"z\"<<\" \"<l)&&(l>q)&&(q>s))cout <<\"z\"<<\" \"<z)&&(z>s)&&(s>l))cout <<\"q\"<<\" \"<z)&&(z>l)&&(l>s))cout <<\"q\"<<\" \"<s)&&(s>z)&&(z>l))cout <<\"q\"<<\" \"<s)&&(s>l)&&(l>z))cout <<\"q\"<<\" \"<l)&&(l>z)&&(z>s))cout <<\"q\"<<\" \"<l)&&(l>s)&&(s>z))cout <<\"q\"<<\" \"<z)&&(z>q)&&(q>l))cout <<\"s\"<<\" \"<z)&&(z>l)&&(l>q))cout <<\"s\"<<\" \"<q)&&(q>z)&&(z>l))cout <<\"s\"<<\" \"<q)&&(q>l)&&(l>z))cout <<\"s\"<<\" \"<l)&&(l>z)&&(z>q))cout <<\"s\"<<\" \"<l)&&(l>q)&&(q>z))cout <<\"s\"<<\" \"<z)&&(z>q)&&(q>s))cout <<\"l\"<<\" \"<z)&&(z>q)&&(s>q))cout <<\"l\"<<\" \"<q)&&(q>z)&&(z>s))cout <<\"l\"<<\" \"<q)&&(q>s)&&(s>z))cout <<\"l\"<<\" \"<s)&&(s>z)&&(z>q))cout <<\"l\"<<\" \"<s)&&(s>q)&&(q>z))cout <<\"l\"<<\" \"<(k+j) && (i+k)wei[2]+wei[3]&&wei[1]+wei[3]=10;j-=10)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(temp=1;temp<=4;temp++)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(wei[temp]==j)\n\t\t\t\t\t\t\t\t\t\t\t\tcout<s+q)&&l<=5&&(l!=z)&&(l!=q)&&(l!=s))\n {if(z+ss+q)&&(z+s=1;j--)\n {\n if(rank[j]!=0)\n {\n cout<s+q)&&(z+s=1;i--)\n\t\t\t\t\t\t if(a[i]!='\\0')//??????????\n\t\t\t\t\t\t\tcout< s + q && z + s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\tint a[4]={z,q,s,l}, p = 0;\n\t\t\t\t\t\tchar b[4]={'z','q','s','l'}, q;\n\t\t\t\t\t\tfor(int j = 0; j < 3; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(int i = 0; i <= 2 - j; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[i] < a[i+1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tp = a[i];\n\t\t\t\t\t\t\t\t\ta[i] = a[i+1];\n\t\t\t\t\t\t\t\t\ta[i+1] = p;\n\t\t\t\t\t\t\t\t\tq = b[i];\n\t\t\t\t\t\t\t\t\tb[i] = b[i+1];\n\t\t\t\t\t\t\t\t\tb[i+1] = q;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k = 0;k < 4; k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << b[k] << \" \" << a[k]*10 <(s+q))&&((z+s)a[j])\n\t\t\t\t\t\t\t\t{int temp;\n\t\t\t\t\t\t\t\ttemp=a[j];\n\t\t\t\t\t\t\t\ta[j]=a[i];\n\t\t\t\t\t\t\t\ta[i]=temp;\n\t\t\t\t\t\t\t\tchar t;\n\t\t\t\t\t\t\t\tt=b[j];\n\t\t\t\t\t\t\t\tb[j]=b[i];\n\t\t\t\t\t\t\t\tb[i]=t;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcout<(s+q))+((z+s)<(q));\n if(a1==3){\n cout<<\"l \"<s+q)&&(z+swt[1]+wt[2]&&wt[0]+wt[2]s+q)&&(z+s) b + c) + (a + c < b ) == 3)\n {\n break;\n }\n }\n if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)\n break;\n }\n if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3) break;\n }\n if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)\n break;\n }\n int weight[4];\n char name[4];\n weight[0] = a;\n weight[1] = b;\n weight[2] = c;\n weight[3] = d;\n name[0] = 'z';\n name[1] = 'q';\n name[2] = 's';\n name[3] = 'l';\n for (int i = 0; i < 3; i++)\n {\n for (int j = i + 1; j < 4; j++)\n {\n if (weight[j] > weight[i])\n {\n int weight_t = weight[j];\n weight[j] = weight[i];\n weight[i] = weight_t;\n int name_t = name[j];\n name[j] = name[i];\n name[i] = name_t;\n }\n \n }\n }\n \n for(int i = 0; i <= 3; i++)\n {\n cout << name[i] << \" \" << weight[i] << endl;\n }\n return 0;\n}\n"} +{"label": "78", "index": "38703", "code": "int main (){\n\tint i=0,j=0,k=0;\n\tchar name[4]={'z','q','s','l'};\n\tint mz=1,mq=1,ms=1,ml=1;//?????????????????????????????????\n\tint m[4]={1,1,1,1};\n\tfor(mz=1;mz<=5;++mz)\n\t\tfor(mq=1;mq<=5;++mq)\n\t\t\tfor(ms=1;ms<=5;++ms)\n\t\t\t\tfor(ml=1;ml<=5;++ml)\n\t\t\t\t{\n\t\t\t\t\tif((mz+mq==ms+ml)&&(mz+ml>ms+mq)&&(mz+ms=i+1;j--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(m[j]>m[j-1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tk=m[j];m[j]=m[j-1];m[j-1]=k;\n\t\t\t\t\t\t\t\t\tk=name[j];name[j]=name[j-1];name[j-1]=k;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\t//cout<<\"l \"<s+q)+(z+s(s+q)&&(z+s)0;i--)\n {\n if(a[i]!=0)\n {\n cout<=q)\n {q=q+10;\n l=l+10;}\n if(za[1]+a[2])+(a[0]+a[2]s+q);\n\t\t\t\t\t\tcc[2]=(z+ss+q&&z+s=10;i=i-10)\n\t\t\t\t\t {\n\t\t\t\t\t\t if(z==i)\n\t\t\t\t\t\t\t cout<<\"z \"<s+q)&&(z+s=1;i--)\n\t{\n\t\tif(lastz==i)\n\t\t{\n\t\t\tlastz=10*lastz;\n\t\t\tcout<<\"z\"<<\" \"<(weight[1]+weight[2])&&(weight[0]+weight[2]) (q + s) && q > (z + s))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z > q && z > s && z > l)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\tif (q > s && q > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\tif (s > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (s > q && s > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\tif (q > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (l > q && l > s)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\tif (q > s)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (q > z && q > s && q > l)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\tif (z > s && z > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\tif (s > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (s > z && s > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (l > z && l > s)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > s)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (s > z && s > q && s > l)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\tif (z > q && z > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\tif (q > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (q > z && q > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (l > z && l > q)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > q)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (l > z && l > q && l > s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\tif (z > q && z > s)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\tif (q > s)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (q > z && q > s)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > s)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (s > z && s > q)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\t\tif (z > q)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t cout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n return 0;\n}"} +{"label": "78", "index": "38713", "code": "void main()\n{\n\tint z,q,s,l,a[5],j,i,t;\n\tchar b[5];\n\tfor(z=10;z<=50;z=z+10)\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t for(l=10;l<=50;l=l+10)\n\t\t\t if(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)\n\t\t\t\t if(z+q==s+l&&z+l>s+q&&z+s s + q );\n\t\t\t\t\tx3 = ( z + s < q );\n\t\t\t\t\tif ( x1 + x2 + x3 == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << 'l' << ' ' << l << endl;\n\t\t\t\t\t\tcout << 'q' << ' ' << q << endl;\n\t\t\t\t\t\tcout << 'z' << ' ' << z << endl;\n\t\t\t\t\t\tcout << 's' << ' ' << s << endl;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38715", "code": "int main()//????????????????\n{\n int z,q,s,l,i;//??? \n char mark[51];//???? \n for(i=0;i<=50;i++)mark[i]=0; //??? \n for(z=10;z<=50;z+=10)//???? \n for(q=10;q<=50;q+=10)\n {\n if(q==z)continue;//?????????? \n for(s=10;s<=50;s+=10)\n {\n if(s==q||s==z)continue;\n for(l=10;l<=50;l++)\n {\n if(l==z||l==q||l==s)continue;\n if((z+q==s+l)&&(z+l>=s+q)&&(z+s=10;i=i-10)\n {\n if(mark[i]!=0)\n cout< s+q) && (z+s < q))//lqzs\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout<<\"l\"<<\" \"<s+q&&z+sq>s>z)\n cout<<\"l \"<l&&l>s&&s>z)\n cout<<\"q \"<l&&l>z&&z>s)\n cout<<\"q \"<q&&q>z&&z>s)\n cout<<\"l \"<z&&z>l&&l>s)\n cout<<\"q \"<s&&s>l&&l>z)\n cout<<\"q \"<z&&z>s&&s>l)\n cout<<\"q \"<s&&s>z&&z>l)\n cout<<\"q \"<s+q&z+sq && q>z && z>s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout<<\"l\"<<\" \"<q && q>s && s>z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout<<\"l\"<<\" \"<s && s>q && q>z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t cout<<\"l\"<<\" \"<l && l>q && q>z)\n\t\t\t\t\t {\n\t\t\t\t\t\t\t cout<<\"s\"<<\" \"<l && l>s && s>z)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcout<<\"q\"<<\" \"<l && l>s && s>q)\n\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<l && l>q && q>s)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<q && q>s && s>l)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<(s+q);\n\t\t\t\t\t\tcondition[3]= (z+s)=1; i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(rank[i]!=0)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tcout<s+q)+(z+slw && zw>sw ) \n { \n cout<<\"q \"<lw && sw>zw ) \n { \n cout<<\"q \"<qw && sw>zw ) \n { \n cout<<\"l \"<qw && zw>sw ) \n { \n cout<<\"l \"<s+q&&z+s(s+q)&&(z+s)b) \n {\n m[0]=a;\n n[4]=n[0];\n m[1]=b;\n n[5]=n[1];\n }\nelse\n{\n m[0]=b;\n n[4]=n[1];\n m[1]=a;\n n[5]=n[0];\n }\nif(m[0]s+q)\n\t\t\t\t\t\t\t&&(z+s s + q &&\n\t\t\t\t\t z + s < q)\n\t\t\t\t\t cout << \"l \" << l * 10 << '\\n' \n\t\t\t\t\t << \"q \" << q * 10 << '\\n'\n\t\t\t\t\t\t\t<< \"z \" << z * 10 << '\\n' \n\t\t << \"s \" << s * 10 << endl;\n\t\t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38725", "code": "int main()\n{\n int a[5], b[5] = {0, 1, 2, 3, 4}, z, q, s, l, i, j, k;\n char c[5] = {' ', 'z', 'q', 's', 'l'};\n for (z = 10; z <= 50; z += 10)\n for (q = 10; q <= 50; q += 10)\n for (s = 10; s <= 50; s += 10)\n {\n l = z + q - s;\n if ((l < 10) || (l > 50)) continue;\n if ((z + l > s + q) && (z + s < q)) \n {\n a[1] = z; \n a[2] = q;\n a[3] = s;\n a[4] = l;\n }\n }\n for (i = 3; i >= 1; i--)\n for (j = 1; j <= i; j++)\n if (a[b[j]] < a[b[j+1]]) \n {k = b[j]; b[j] = b[j+1]; b[j+1] = k;}\n for (i = 1; i <= 4; i++)\n cout << c[b[i]] << ' ' << a[b[i]] << endl;\n return(0);\n}"} +{"label": "78", "index": "38726", "code": "int main()\n{\n int z,q,s,l,o=0;\n for(z=10;z<=50&&o<1;z=z+10)\n for(q=10;q<=50&&o<1;q=q+10)\n for(s=10;s<=50&&o<1;s=s+10)\n for(l=10;l<=50&&o<1;l=l+10)\n {\n if(z+q==s+l&&z+l>s+q&&z+sa[j+1])\n {x=a[j+1];a[j+1]=a[j];a[j]=x;\n y=w[j+1];w[j+1]=w[j];w[j]=y;}}\n int n;\n for(n=4;n>=1;n--)\n {cout<s+q)&&(z+s(s+q) && l<6 && l>0)\n\t\t\t\t{\n\t\t\t\t\tz*=10;s*=10;q*=10;l*=10;\n\t\t\t\t\t\n\t\t\t\t\tif (l>q) {\n\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t}\n\t\t\t\t\tif (z>s) {\n\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n}"} +{"label": "78", "index": "38729", "code": "int main()\n{\n\tchar a[4]={'z','q','s','l'};\n\tchar m;\n\tint b[4],n,k,i,j;\n\tfor(b[0]=10;b[0]<=50;b[0]=b[0]+10)\n\t{\n\t\tfor(b[1]=10;b[1]<=50;b[1]=b[1]+10)\n\t\t{\n\t\t\tif(b[0]==b[1])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(b[2]=10;b[2]<=50;b[2]=b[2]+10)\n\t\t\t{\n\t\t\t\tif(b[2]==b[0]||b[2]==b[1])\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor(b[3]=10;b[3]<=50;b[3]=b[3]+10)\n\t\t\t\t{\n\t\t\t\t\tif(b[3]==b[0]||b[3]==b[1]||b[3]==b[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(b[0]+b[1]==b[2]+b[3]&&b[0]+b[3]>b[1]+b[2]&&b[0]+b[2]i;j--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(b[j]>b[j-1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tn=b[j];\n\t\t\t\t\t\t\t\t\tb[j]=b[j-1];\n\t\t\t\t\t\t\t\t\tb[j-1]=n;\n\t\t\t\t\t\t\t\t\tm=a[j];\n\t\t\t\t\t\t\t\t\ta[j]=a[j-1];\n\t\t\t\t\t\t\t\t\ta[j-1]=m;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n for(k=0;k<4;k++)\n\t\t\t\t\t\t{\n\t \tcout< s + q && z + s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (z > q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttemp = z;\n\t\t\t\t\t\t\tz = q;\n\t\t\t\t\t\t\tq = temp;\n\t\t\t\t\t\t\tchtemp = a;\n\t\t\t\t\t\t\ta = b;\n\t\t\t\t\t\t\tb = chtemp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (q > s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttemp = s;\n\t\t\t\t\t\t\ts = q;\n\t\t\t\t\t\t\tq = temp;\n\t\t\t\t\t\t\tchtemp = c;\n\t\t\t\t\t\t\tc = b;\n\t\t\t\t\t\t\tb = chtemp;\n\t\t\t\t\t\t\tif (z > q)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttemp = z;\n\t\t\t\t\t\t\t\tz = q;\n\t\t\t\t\t\t\t\tq = temp;\n\t\t\t\t\t\t\t\tchtemp = a;\n\t\t\t\t\t\t\t\ta = b;\n\t\t\t\t\t\t\t\tb = chtemp;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s > l)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttemp = s;\n\t\t\t\t\t\t\ts = l;\n\t\t\t\t\t\t\tl = temp;\n\t\t\t\t\t\t\tchtemp = c;\n\t\t\t\t\t\t\tc = d;\n\t\t\t\t\t\t\td = chtemp;\n\t\t\t\t\t\t\tif (q > s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttemp = s;\n\t\t\t\t\t\t\t\ts = q;\n\t\t\t\t\t\t\t\tq = temp;\n\t\t\t\t\t\t\t\tchtemp = c;\n\t\t\t\t\t\t\t\tc = b;\n\t\t\t\t\t\t\t\tb = chtemp;\n\t\t\t\t\t\t\t\tif (z > q)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttemp = z;\n\t\t\t\t\t\t\t\t\tz = q;\n\t\t\t\t\t\t\t\t\tq = temp;\n\t\t\t\t\t\t\t\t\tchtemp = a;\n\t\t\t\t\t\t\t\t\ta = b;\n\t\t\t\t\t\t\t\t\tb = chtemp;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tgoto part1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tpart1:\n\t\t\t\t\t\t\tcout << d << \" \" << l * 10 << endl\n\t\t\t\t\t\t\t << c << \" \" << s * 10 << endl\n\t\t\t\t\t\t\t << b << \" \" << q * 10 << endl\n\t\t\t\t\t\t\t << a << \" \" << z * 10 << endl;\n\treturn 0;\n}"} +{"label": "78", "index": "38731", "code": "/*\n * p3.cpp\n *\n * Created on: 2010-11-20\n * Author: jsgl\n */\nint main()\n{\n\tint z,q,s,l,i;\n\tfor(z=10;z<=50;z=z+10) //??\n for(q=10;q<=50;q=q+10) {if(z==q) continue;\n\tfor(s=10;s<=50;s=s+10) {if(z==s||q==s) continue;\n\tfor(l=10;l<=50;l=l+10) {if(z==l||q==l||s==l)continue;\n\t{\n\tif((z+q==s+l)&&(z+l>q+s)&&(z+s=10;i=i-10)\n\tif(i==z||i==q||i==s||i==l)\n\tcout<2;i--)\n { \n for(j=1;ji+k))\n {b=1;break;} \n }\n if(b==1) break; \n } \n if(b==1) break; \n } \n if(b==1) break; \n }\n a[1].w=i;\n a[0].w=j;\n a[2].w=k;\n a[3].w=h;\n for(int g=0;g<4;g++)\n {\n for(int f=g+1;f<4;f++)\n {\n if(a[f].w>a[g].w)\n {\n t=a[f].w;\n a[f].w=a[g].w; \n a[g].w=t; \n T=a[f].name;\n a[f].name=a[g].name; \n a[g].name=T; \n } \n }\n printf(\"%c %d\\n\",a[g].name,a[g].w*10);\n }\n getchar();\n getchar();\n \n}\n"} +{"label": "78", "index": "38733", "code": "\n\n\nint main()\n{\n int i,z,q,s,l,t,j,a[4]={0};\n\n\tchar b[4]={0},p;\n\n\tfor(z=1;z<6;z++)\n\n\t{\n\n\t\tfor(q=1;q<6;q++)\n\n\t\t{\n\n\t\t\tfor(s=1;s<6;s++)\n\n\t\t\t{\n\n\t\t\t\tfor(l=1;l<6;l++)\n\n\t\t\t\t\tif((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s) (Q + S)) + ((Z + S)\n\t\t\t\t\t\t\t< Q) == 3) {//????????\n\t\t\t\t\t\tfor (int i = 50; i > 0; i -= 10) {//????????\n\t\t\t\t\t\t\tif (i == Z)\n\t\t\t\t\t\t\t\tcout << \"z \" << Z << endl;\n\t\t\t\t\t\t\tif (i == Q)\n\t\t\t\t\t\t\t\tcout << \"q \" << Q << endl;\n\t\t\t\t\t\t\tif (i == S)\n\t\t\t\t\t\t\t\tcout << \"s \" << S << endl;\n\t\t\t\t\t\t\tif (i == L)\n\t\t\t\t\t\t\t\tcout << \"l \" << L << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}//????\n"} +{"label": "78", "index": "38735", "code": "//??:???\n//???1000012856\n//???2010.11.20\n//???\n\nint main()\n{\n\tint a[4] = {0}, i, j, m, n;\n\tfor(i = 10; i <= 50; i = i+10)\n\t\tfor(j = 10; j <= 50; j = j+10)\n\t\t\tfor(m = 10; m <= 50; m = m+10)\n\t\t\t\tfor(n = 10; n <= 50; n = n+10)\n\t\t\t\t{\n\t\t\t\t\ta[0] = i;\n\t\t\t\t\ta[1] = j;\n\t\t\t\t\ta[2] = m;\n\t\t\t\t\ta[3] = n;\n\t\t\t\t\tif((a[0] != a[1] )&& (a[0] != a[2]) && (a[0] != a[3] )&& (a[1] != a[2]) && (a[1] != a[3]) && (a[2] != a[3]) && ((a[0] + a[1]) == ( a[2] + a[3])) && ((a[0] + a[3]) > (a[2] + a[1])) && ((a[0] + a[2]) < a[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << 'l' << ' ' << a[3] << endl;\n\t\t\t\t\t\tcout << 'q' << ' ' << a[1] << endl;\n\t\t\t\t\t\tcout << 'z' << ' ' << a[0] << endl;\n\t\t\t\t\t\tcout << 's' << ' ' << a[2] << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\treturn 0;\n}\n"} +{"label": "78", "index": "38736", "code": "//*******************************************\n//*@file:8.cpp *\n//*@author:??? 1200012894 *\n//*@date:2012.10.11 *\n//*@function:???????? *\n//*******************************************\n\nint main()\n{\n\t\n\t//??z, q, s, l??????????????\n\tint z, q, s, l;\n\n\t//??conditioni(i = 1,2,3)??????3????????\n\tint condition1, condition2, condition3;\n\n\t/*sum??conditioni(i = 1, 2, 3)???\n\t t?m???????age?label?????*/\n\tint sum, t, m;\n\n\t/*?????????????????\n\t ?????????*/\n\t for(z = 10; z <= 50; z = z + 10)\n\t\tfor(q = 10; q <= 50; q = q + 10)\n\t\t\tfor(s = 10; s <= 50; s = s + 10)\n\t\t\t\tfor(l = 10; l <= 50; l = l + 10)\n\t\t\t\t{\n\t\t\t\t\tcondition1 = ((z + q) == (s + l));\n\t\t\t\t\tcondition2 = ((z + l) > (s + q));\n\t\t\t\t\tcondition3 = ((z + s) < q);\n\t\t\t\t\tsum = condition1 + condition2 + condition3;\n\t\t\t\t if (sum == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\t//????????????\n\t\t\t\t\t\tint age[4] = {z, q, s, l};\n\t\t\t\t\t\tchar label[4] = {'z', 'q', 's', 'l'};\n\n\t\t\t\t\t\t//??????????????????????\n\t\t\t\t\t for (int i = 0; i < 3; i++)\n\t\t\t\t\t\t\tfor (int j = 0; j < 3 - i; j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (age[j] < age[j + 1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tt = age[j]; \n\t\t\t\t\t\t\t\t\tage[j] = age[j + 1];\n\t\t\t\t\t\t\t\t\tage[j + 1] = t;\n\t\t\t\t\t\t\t\t\tm = label[j];\n\t\t\t\t\t\t\t\t\tlabel[j] = label[j + 1];\n\t\t\t\t\t\t\t\t\tlabel[j + 1] = m;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t //???????????????????\n\t\t\t\t\t for ( int j = 0; j <= 3; j++)\n\t\t cout << label[j] << \" \" << age[j] << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38737", "code": "struct person\n{\n\tchar name;\n\tint w;\n}stu[5]={{'z',0},{'q',0},{'s',0},{'l',0},{'t',0}};\nvoid main()\n{\n\tint i=0,j=0,k=0,p=0;\n\tint z,q,s,l;\n\tint a,b;\n\n\twhile(i<5)\n\t{\n\t\ti++;\n\t\tz=i;\n\t\tj=0;\n\t\twhile(j<5)\n\t\t{\n\t\t\tj++;\n\t\t\tif(j!=i)\n\t\t\t{\n\t\t\t\tq=j;\n\t\t\t\tk=0;\n\t\t\t\twhile(k<5)\n\t\t\t\t{\n\t\t\t\t\tk++;\n\t\t\t\t\tif(k!=i&&k!=j)\n\t\t\t\t\t{\n\t\t\t\t\t\ts=k;\n\t\t\t\t\t\tp=0;\n\t\t\t\t\t\twhile(p<5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\tif(p!=i&&p!=j&&p!=k)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tl=p;\n\t\t\t\t\t\t\t\tif(z+q==s+l&&z+l>s+q&&z+ss+q&&z+s s + q && z + s < q)\n {\n a[0] = z; a[1] = q; a[2] = s; a[3] = l;\n for (j = 0; j < 3; j++)\n for (i = 0; i < 3 - j; i++)\n {\n if (a[i] < a[i + 1])\n {\n temp = a[i]; a[i] = a[i + 1]; a[i + 1] = temp;\n temp1 = b[i]; b[i] = b[i + 1]; b[i + 1] = temp1;\n }\n }\n for (i = 0;i < 4; i++)\n {\n a[i] = 10 * a[i];\n cout << b[i] <<\" \"<< a[i] << endl;\n }\n }\n return 0;\n}"} +{"label": "78", "index": "38740", "code": "int main()\n{\n\tint z, q, s, l, sum = 0;\n\tfor (z = 1; z <= 5; z++)\n\t{\n\t\tfor (q = 1; q <= 5; q++)\n\t\t{\n\t\t\tif (q != z)\n\t\t\t{\n\t\t\t\tfor (s = 1; s <= 5; s++)\n\t\t\t\t{\n\t\t\t\t\tif (s != z && s != q)\n\t\t\t\t\t{\n\t\t\t\t\t\tl = z + q - s;\n\t\t\t\t\t\tif (l != z && l != q && l != s && l <= 5 && l > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsum = (z + l > q + s) + (z + s < q);\n\t\t\t\t\t\t\tif (sum == 2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (q > l)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ( s > l)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z * 10 << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l * 10 << endl;\n\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q * 10 << endl;\n\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z * 10 << endl;\n\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s * 10 << endl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\t\t\n\treturn 0;\n}\n\t\n"} +{"label": "78", "index": "38741", "code": "\nint main()\n{\n\tint a[4] , c ;\n\tfor( a[0] = 10 ; a[0] < 60 ; a[0] += 10 )\n\tfor( a[1] = 10 ; a[1] < 60 ; a[1] += 10 )\n\t{\n\t\tif( a[1] == a[0] )continue ;\n\t\tfor( a[2] = 10 ; a[2] < 60 ; a[2] += 10 )\n\t\t{\n\t\t\tif( a[2] == a[0] || a[2] == a[1] ) continue ;\n\t\t\tfor( a[3] = 10 ; a[3] < 60 ; a[3] += 10 )\n\t\t\t{\n\t\t\t\tif( a[3] == a[0] || a[3] == a[1] || a[3] == a[2] ) continue ;\n\t\t\t\tif( a[0] + a[1] == a[2] + a[3] && a[0] + a[3] > a[2] + a[1] && a[0] + a[2] < a[1] )\n\t\t\t\t{\n\t\t\t\t\ta[0] = a[0] * 1000 + 'z' ;\n\t\t\t\t\ta[1] = a[1] * 1000 + 'q' ;\n\t\t\t\t\ta[2] = a[2] * 1000 + 's' ;\n\t\t\t\t\ta[3] = a[3] * 1000 + 'l' ;\n\t\t\t\t\tfor( int i = 0 ; i < 4 ; i ++ )\n\t\t\t\t\tfor( int j = 0 ; j < 3 - i ; j ++ )\n\t\t\t\t\tif( a[j] < a[j+1] )\n\t\t\t\t\t{\n\t\t\t\t\t\tc = a[j] ;\n\t\t\t\t\t\ta[j] = a[j+1] ;\n\t\t\t\t\t\ta[j+1] = c ;\n\t\t\t\t\t}\n\t\t\t\t\tfor( int i = 0 ; i < 4 ; i ++ )\n\t\t\t\t\tcout << ( char )( a[i] % 1000 ) << \" \" << a[i] / 1000 << endl ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0 ;\n} "} +{"label": "78", "index": "38742", "code": "/*???*/\nint main ()\n{\n\tint z,q,s,l;\n\tfor (z=1;z<=5;z++)\n\t{\n\t\tfor (q=1;q<=5;q++)\n\t\t{\n\t\t\tif (q!=z)\n\t\t\t{\n\t\t\t\tfor (s=1;s<=5;s++)\n\t\t\t\t{\n\t\t\t\t\tif (s!=q&&s!=z)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (l=1;l<=5;l++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((l!=z)&&(l!=q)&&(l!=s))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((z+q)==(s+l)&&((z+l)>(s+q))&&((z+s)q)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (ls))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\t\t\t\t cout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\t\t\t \tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\t\t\t \tcout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q*10 << endl;\n\t\t\t\t\t\t\t\t\t\t cout << \"z \" << z*10 << endl;\n\t\t\t\t\t\t\t\t\t \tcout << \"s \" << s*10 << endl;\n\t\t\t\t\t\t\t\t\t\t cout << \"l \" << l*10 << endl;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38743", "code": "/*\n * shit.cpp\n *\n * Created on: 2012-10-15\n * Author: Administrator\n */\n\nint main()\n{\n\tint z,q,s,l;\n\tint a[5];\n\tchar b[5];\n\tfor(z=1;z<6;z++)\n\t\tfor(q=1;q<6;q++)\n\t\t\tfor(s=1;s<6;s++)\n\t\t\t\tfor(l=1;l<6;l++)\n\t\t\t\t\tif(z+q==s+l&&z+l>s+q&&z+s(s+q))&&((z+s) w[1] + w[2]) && (w[0] + w[2] < w[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t//cout << w[0] << w[1] << w[2] << w[3];\n\t\t\t\t\t\tfor(i = 5; i >= 1;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (j = 0; j < 4; j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(w[j] == i)\n\t\t\t\t\t\t\t\tcout << n[j] << ' ' << w[j] *10 << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38746", "code": "//**********************************\n//*???.cpp *\n//*?????? *\n//*???2011-10-04 * \n//**********************************\n\n\nint main()\n{\n int m[4]; //??m[4]???????????? \n int i;\n int z;\n int q;\n int s;\n int l;\n for (z = 10; z <= 50; z = z + 10)\n {\n for (q = 10; q <= 50; q = q + 10)\n {\n if (z == q) continue;\n for (s = 10; s <= 50; s = s + 10)\n {\n if (z == s || s == q) continue;\n for(l = 10; l <= 50; l = l + 10)\n {\n if (z == l || s == l || q == l) continue;\n if ((z + q == s + l) && (z + l > s + q) && (z + s < q))\n {\n m[0] = z;\n m[1] = q;\n m[2] = s;\n m[3] = l;\n }\n }\n }\n }\n }\n //??????????????????????????????????????????? \n for(i = 1; i <= 4; i++)\n {\n if ((m[0] > m[1]) &&(m[0] > m[2]) &&(m[0] > m[3]))\n {\n cout << \"z \" << m[0] << endl;\n m[0] = 0;\n }\n if ((m[1] > m[0]) &&(m[1] > m[2]) &&(m[1] > m[3]))\n {\n cout << \"q \" << m[1] << endl;\n m[1] = 0;\n }\n if ((m[2] > m[0]) &&(m[2] > m[1]) &&(m[2] > m[3]))\n {\n cout << \"s \" << m[2] << endl;\n m[2] = 0;\n }\n if ((m[3] > m[0]) &&(m[3] > m[1]) &&(m[3] > m[2]))\n {\n cout << \"l \" << m[3] << endl;\n m[3] = 0;\n }\n }\n return 0;\n}\n"} +{"label": "78", "index": "38747", "code": "int main(){\n\tint z,q,s,l,a[4],i,j,b[4];\n\tchar c[4];\n\tfor(z=1;z<=5;z++)\n\t\t{for(q=1;q<=5;q++)\n\t\t\t{for(s=1;s<=5;s++)\n\t\t\t {for(l=1;l<=5;l++)\n\t\t\t {if((z!=q)+(z!=s)+(z!=l)+(q!=s)+(q!=l)+(s!=l)+(z+q==s+l)+(z+l>s+q)+(z+s=10;i-=10)\n{\nif(z==i)printf(\"z %d\\n\",z);\nif(q==i)printf(\"q %d\\n\",q);\nif(s==i)printf(\"s %d\\n\",s);\nif(l==i)printf(\"l %d\\n\",l);\n}\nreturn 1;\n}\n\nint ohyeah()\n{int z,q,s,l;\nfor(z=10;z<=50;z+=10)\nfor(q=10;q<=50;q+=10)\nfor(s=10;s<=50;s+=10)\nfor(l=10;l<=50;l+=10)\nif(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)\nif((z+q==s+l)&&(z+l>s+q)&&(z+s ( s + q ) );\n\t\t\t\t\tCC3 = ( ( z + s ) < q );\n\t\t\t\t\tif ( ( CC1 + CC2 + CC3 == 3) && ( z != q) && ( z != s ) && ( z != l ) && ( q != s) && ( q != l ) && ( s != l) )\n\t\t\t\t\t{\n\t\t\t\t\t\tstr[ 6 - z ] = 'z';\n\t\t\t\t\t\tstr[ 6 - q ] = 'q';\n\t\t\t\t\t\tstr[ 6 - s ] = 's';\n\t\t\t\t\t\tstr[ 6 - l ] = 'l';\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor ( i = 1; i <= 6; i++ )\n\t{\n\t\tif ( str[i] == 'z' || str[i] == 'q' || str[i] == 's' || str[i] == 'l' )\n\t\t\tcout << str[i] << \" \" << ( 6 - i ) * 10 << endl;\n\t}\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38750", "code": "/* title:??? *\n * author:???*\n * time:2011.9.28*/\n\n \n\n\nint main()\n{\n\tint z, q, s, l, i, j, t, k, m = 1;\n\tchar n;\n\tint a[5];\n\tchar b[5];\n\tfor(z = 1; z <= 5; z++)\n\t\tfor(q = 1; q <= 5; q++)\n\t\t\tfor(s = 1; s <= 5; s++)\n for(l = 1; l <= 5; l++)\n\t\t\t\t{\n\t\t\t\t\tif(z + q == s + l && z + l > s + q && z + s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[1] = z;\n\t\t\t\t\t\ta[2] = q;\n\t\t\t\t\t\ta[3] = s;\n\t\t\t\t\t\ta[4] = l;\n\t\t\t\t\t\tb[1] = 'z';\n\t\t\t\t\t\tb[2] = 'q';\n\t\t\t\t\t\tb[3] = 's';\n\t\t\t\t\t\tb[4] = 'l';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(i = 1; i <= 4; i++)\n\t\t\t\t{\n\t\t\t\t\tfor(j = 1; j <= 4 - i; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(a[j] < a[j + 1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t t = a[j];\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\n\t\t\t\t\t\t\t\ta[j + 1] = t;\n\t\t\t\t\t\t\t\tn = b[j];\n\t\t\t\t\t\t\t\tb[j] = b[j + 1];\n\t\t\t\t\t\t\t\tb[j + 1] = n;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(k = 1; k <= 4 ; k++)\n\t\t\t\t{\n cout << b[k] << \" \" << a[k] * 10 << endl;\n\t\t\t\t}\n\treturn 0;\n}\n\n\n"} +{"label": "78", "index": "38751", "code": "int main()\n{\n\tchar z,q,s,l,ch[4];//z,q,s,l????????????,ch[4]?????????\n\tint a,b,c,d,c1,c2,c3,n[4],i,j,temp=0;//a,b,c,d????????????????c1,c2,c3????????,n[4]??????????\n\ta=b=c=d=1;\n\tfor(a=1;a<6;a++)\n\t{\n\t\tfor(b=1;b<6;b++)\n\t\t{\n\t\t\tif(a==b)\n\t\t\t\tcontinue;\n\t\t\tfor(c=1;c<6;c++)\n\t\t\t{\n\t\t\t\tif(c==b||c==a)\n\t\t\t\tcontinue;\n\t\t\t\tfor(d=1;d<6;d++)\n\t\t\t\t{\n\t\t\t\t\tif(d==a||d==c||d==b)\n\t\t\t\t continue;\n\t\t\t\t c1=((a+b)==(c+d));\n\t\t\t\t c2=(a+d>b+c);\n\t\t\t\t c3=(a+c(x[2]+x[1])&&(x[0]+x[2])s+q);\n\t\t\t\t\t word[2]=(z+s0;i--)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t if(weit[i]!=0)\n\t\t\t\t\t\t\t cout<b+c)//??????????????????????\n\t\t\t\t\t\t\t&&(a+c s + q) + ( z + s < q) == 3)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tz = 10000*z + 'z';\n\t\t\t\t\t\t\t\t\tq = 10000*q + 'q';\n\t\t\t\t\t\t\t\t\ts = 10000 *s + 's';\n\t\t\t\t\t\t\t\t\tl = 10000*l + 'l';\n\n\t\t\t\t\t\t\t\t\t//cout < 0; i--)\n\t\t\t\t\t\t\t\t\tcout << (char)(a[i] % 10000 ) << ' '<k+j)&&(i+k0;p--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(name[p]!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout<s+q&&z+ss+q&&z+ss+q&&z+ss+q&&z+sa[i+1])\n\t\t{t=a[i];a[i]=a[i+1];a[i+1]=t;\n\t\tu=b[i];b[i]=b[i+1];b[i+1]=u;}\ncout<(s+q)) && ((z+s)s+q)+(z+s=1;i--)\n {if(a[i]==0)\n {continue;}\n else;\n {cout< s + q) && (z + s < q))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ta[0] = z;\n\t\t\t\t\t\t\t\ta[1] = q;\n\t\t\t\t\t\t\t\ta[2] = s;\n\t\t\t\t\t\t\t\ta[3] = l;\n\t\t\t\t\t\t\t\tfor (i = 0; i < 3; i++)\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < 3 - i; j++)\n\t\t\t\t\t\t\t\t\t\tif (a[j] < a[j+1])\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tti = a[j];\n\t\t\t\t\t\t\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\t\t\t\t\t\t\ta[j+1] = ti;\n\t\t\t\t\t\t\t\t\t\t\ttc = b[j];\n\t\t\t\t\t\t\t\t\t\t\tb[j] = b[j+1];\n\t\t\t\t\t\t\t\t\t\t\tb[j+1] = tc;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tm++;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif (m != 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (m != 0)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (m != 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tfor (i = 0; i < 4; i++)\n\t\t{\n\t\t\tcout << b[i] << \" \" << 10*a[i] < (s+ q))&&((z + s) < q)) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(z > s)\n\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl << \"z \" << z << endl << \"s \" << s << endl;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl << \"s \" << s << endl << \"z \" << z << endl;\n\t\t\t\t\t}\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38762", "code": "int main()\n{\n\tint z=0,q=0,s=0,l=0;\n\tfor(z=10;z<=50;z=z+10)\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif((((z+q)==(s+l))+((z+l)>(s+q))+((z+s)a[i+1])\n\t\t\t\t\t\t\t\t{t=a[i];a[i]=a[i+1];a[i+1]=t;\n\t\t\t\t\t\t\t\t u=name[i];name[i]=name[i+1];name[i+1]=u;}//?????????????\n\t\t\t\t\t\t\t\tcout<(s+q)&&(z+s)next=NULL;\n\treturn p;\n}\n\nvoid sort(pdata head,int n)/*head???????n???*/\n{\n\tpdata p=NULL,q=NULL,s=NULL;\n int i;\n\tfor (i=1;i<=n;i++)\n\t{\n\ts=(pdata)malloc(sizeof(struct data));\n\tscanf(\"%d\",s->x);\n q=head;\n\tp=head->next;\n\twhile (p)\n\t{\n if (p->x>=s->x)\n\t\t\tbreak;\n\t\tq=p;\n\t\tp=p->next;\n\t}\n\tq->next=s;\n\ts->next=p;\n\t}\n\t\n}\n\nvoid outputdata(pdata p)/*??head*/\n{\n p=p->next;\n\twhile(p->next)\n\t{\n printf(\"%d \",p->x);\n\t p=p->next;\n }\n\tprintf(\"%d\",p->x);\n}\n\n\npdata inputdata(int n)/*??head?????n???*/\n{\n\tpdata q=NULL,p=NULL,head=NULL;\n\tint i;\n\thead=create();\n\tq=head;\n\tfor (i=1;i<=n;i++)\n\t{p=(pdata)malloc(sizeof(struct data));\n\tif (p!=NULL)\n\t {\n\t scanf(\"%d\",&p->x);\n p->next=NULL;\n\t q->next=p;\n\t q=p;\n\t}\n\t}\n\treturn head;\n}\n\nvoid del(pdata p,int k)/*??head??k???*/\n{\n\tpdata q=NULL;\n\tq=p;\n\tp=p->next;\n\twhile(p)\n\t\tif (p->x==k)\n\t\t{\n\t\t\tq->next=p->next;\n\t\t\tfree(p);\n\t\t\tp=q->next;\n\t\t}\n\t\telse\n\t\t{q=p;p=p->next;}\n}\n\npdata rinputdata(int n)/*??head,????n???*/\n{\n\tpdata q=NULL,p=NULL,head=NULL;\n int i;\n\thead=create();\n\tfor (i=1;i<=n;i++)\n\t{\n\t\tp=(pdata)malloc(sizeof(struct data));\n\t\tif (p!=NULL)\n\t\t{\n\t\t\tscanf(\"%d\",&p->x);\n\t\t\tp->next=q;\n\t\t\tq=p;\n\t\t}\n\t}\n head->next=q;\n return head;\n}\n\nvoid outputk(pdata p,int k)/*???k???*/\n{\n\tint i=1;\n p=p->next;\n\twhile(p)\n\t{\n if (i==k)\n\t\t printf(\"%d\",p->x);\n\t p=p->next;\n i++;\n\t}\n}\n\nvoid change(pdata p,int n,int m)/*?head?n?????m???????*/\n{\n\tint i=1;\n\tpdata q=NULL,s=NULL,head=NULL;\n\tq=p;\n\thead=p;\n\tp=p->next;\n\twhile(p)\n\t{\n\t\tif (i==n-m+1)\n\t\t\tbreak;\n\t\ti++;\n\t\tq=p;\n\t\tp=p->next;\n\t}\n\ts=head;\n\twhile(s->next)\n\t\ts=s->next;\n\tq->next=NULL;\n\ts->next=head->next;\n\thead->next=p;\n}\n\n\nint main()\n{\nprintf(\"l 50\\nq 40\\nz 20\\ns 10\");\n}\n"} +{"label": "78", "index": "38765", "code": "int main()\n{\n\tint z,q,s,l,a[4],i,t,j;\n\tfor (z=10;z<=50;z=z+10)\n\t{\n\t\tfor (q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tfor (s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tfor (l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif (z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l&&z+q==s+l && z+l > s+q && z+s < q)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[0]=z;a[1]=q;a[2]=s;a[3]=l;\n\t\t\t\t\t\tfor (j=2;j>=0;j=j-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (i=0;i<=j;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (a[i]q+s&&z+sa[1]+a[2]) && (a[0]+a[2](B+C))+((A+C) s + q && z + s < q)\n\t\t\t\t\t{a[0] = z; a[1] = q; a[2] = s; a[3] = l;}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor ( i = 50; i >=10; i = i - 10)\n\t{\n\t\tif (a[0] == i)\n\t\t\tcout << \"z\" << \" \" << a[0] << endl;\n\t\tif (a[1] == i)\n\t\t\tcout << \"q\" << \" \" <> i;\n\treturn 0;\n}\n"} +{"label": "78", "index": "38770", "code": "int main()\n{\n\tstruct weight\n\t{\n\t\tchar name;\n\t\tint wei;\n\t};\n\tstruct weight a1,a2,a3,a4;\n\ta1.name='z';\n\ta2.name='q';\n\ta3.name='s';\n\ta4.name='l';\n\tfor(a1.wei=1;a1.wei<=5;a1.wei++)\n\t\tfor(a2.wei=1;a2.wei<=5;a2.wei++)\n\t\t{\n\t\t\tif(a2.wei==a1.wei)\n\t\t\t\tcontinue;\n\t\t\tfor(a3.wei=1;a3.wei<=5;a3.wei++)\n\t\t\t{\n\t\t\t\tif(a3.wei==a2.wei||a3.wei==a1.wei)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor(a4.wei=1;a4.wei<=5;a4.wei++)\n\t\t\t\t{\n\t\t\t\t\tif(a4.wei==a3.wei||a4.wei==a2.wei||a4.wei==a1.wei)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif(a1.wei+a2.wei==a3.wei+a4.wei&&a1.wei+a3.weia2.wei+a3.wei)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i=5;i>=1;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(a1.wei==i)\n\t\t\t\t\t\t\t\tcout<a[1]+a[2])&&(a[0]+a[2]a[i])\n\t\t{\n\t\t\tv=a[i]; a[i]=a[i+1]; a[i+1]=v;\n\t\t\tcv=c[i]; c[i]=c[i+1]; c[i+1]=cv;\n\t\t}\nfor(i=0;i<=3;i++)\n{cout< a[2] + a[1]) && (a[0] + a[2] < a[1]) && (a[3] != a[0])&&(a[3] != a[1])&&(a[3] != a[2]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(i = 0;i <4;i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\td = 0;\n\t\t\t\t\t\t\t\tfor(j = 0;j < 4;j++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(d < a[j]&&f[j]==0) \n\t\t\t\t\t\t\t\t\t{d = a[j];\n\t\t\t\t\t\t\t\t\tl = j;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tf[l]=1;\n\t\t\t\t\t\t\t\tcout << c[l] <<\" \"<< 10 * a[l] <(s+q)&&(z+s) q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l\" <<\" \" << 10*l <s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"z\" <<\" \" << 10*z <a[si]+a[qi] && a[zi]+a[si]=0;i--)\n{\nprintf(\"%c %d\\n\",b[i],a[i]);\n}\n\n}\n\n}\n\n\n}\n\n\n\n}"} +{"label": "78", "index": "38775", "code": "\n\nint main()\n{\n\tint a[4], ta, i, j;\n\tchar name[4]={'z', 'q', 's', 'l'}, tn;\n\tfor ( a[0] = 1; a[0] <= 5; a[0] ++ )\n\t\tfor ( a[1] = 1; a[1] <= 5; a[1] ++ )\n\t\t\tfor ( a[2] = 1; a[2] <= 5; a[2] ++ )\n\t\t\t\tfor ( a[3] = 1; a[3] <= 5; a[3] ++ )\n\t\t\t\t\tif ( a[0] != a[1] && a[0] != a[2] && a[0] != a[3] && a[1] != a[2] && a[1] != a[3] && a[2] != a[3] \n\t\t\t\t\t\t&& ((a[0] + a[1]) == (a[2] + a[3])) && ((a[0] + a[3]) > (a[1] + a[2])) && ((a[0] + a[2]) < a[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( i = 0; i < 3; i ++)\n\t\t\t\t\t\t\tfor ( j = 0; j < 3 - i; j ++ )\n\t\t\t\t\t\t\t\tif ( a[j] < a[j + 1] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tta = a[j];\n\t\t\t\t\t\t\t\t\ta[j] = a[j + 1];\n\t\t\t\t\t\t\t\t\ta[j + 1] = ta;\n\t\t\t\t\t\t\t\t\ttn = name[j];\n\t\t\t\t\t\t\t\t\tname[j] = name[j + 1];\n\t\t\t\t\t\t\t\t\tname[j + 1] = tn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( i = 0; i < 4; i ++ )\n\t\t\t\t\t\t\t\tcout << name[i] << \" \" << a[i] <<\"0\"<< endl;\n\t\t\t\t\t}\n\n\treturn 0;\n}\n\n\t\t\t\t\t\t\n\n\n\t\t\t\n\n\n"} +{"label": "78", "index": "38776", "code": "//************************************************************************\n//??????\n//?????????\n//??????\n//************************************************************************\nint main()\n{\n\tint mZ,mQ, mS, mL, c, sum, m[4];\n\tchar name[4] = {'z', 'q', 's', 'l'}, n;\n\tfor(mZ = 10; mZ <= 50; mZ = mZ +10)\n\t\tfor(mQ = 10; mQ <= 50; mQ = mQ +10)\n\t\t\tfor(mS = 10; mS <= 50; mS = mS + 10)\n\t\t\t\tfor(mL = 10; mL <= 50; mL = mL +10)\n\t\t\t\t{\n\t\t\t\t\tsum = (mZ + mQ == mS + mL) +(mZ + mL > mS + mQ) + (mZ + mS < mQ);\n\t\t\t\t\tif(sum == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tm[0] = mZ;\n\t\t\t\t\t\tm[1] = mQ;\n\t\t\t\t\t\tm[2] = mS;\n\t\t\t\t\t\tm[3] = mL;\n\t\t\t\t\t}\n\t\t\t\t}\n\tfor(int j = 0; j < 3; j++)\n\t{\n\t for(int i = 0; i < 3; i++)\n\t {\n\t\t if(m[i] < m[i+1])\n\t\t {\n\t\t\t c = m[i+1];\n\t\t\t n = name[i+1]; \n\t\t\t m[i+1] = m[i];\n\t\t\t name[i+1] = name[i];\n\t\t\t m[i] = c;\n\t\t\t name[i] = n;\n\t\t }\n\t }\n\t}\n\tcout<w[2]+w[1])&&(w[0]+w[2] s + q && z + s < q)\n\t\t\t\t\t\tgoto loop; \n\tloop:\n\tcout << \"l \" << 10 * l << '\\n';\n\tcout << \"q \" << 10 * q << '\\n';\n\tcout << \"z \" << 10 * z << '\\n';\n\tcout << \"s \" << 10 * s << endl;\n\treturn 0;\n}"} +{"label": "78", "index": "38779", "code": "//???????\n//??????\n//?????2010-11-20\n//???????????????????????????????\n\n\nint main()\n{\n\tint z,q,s,l,a[5],t,i,j;//a????????10KG?\n\tchar n[5]={'0','z','q','s','l'},tt;//n????\n\tfor (z=1;z<=5;z++)//??\n\t\tfor (q=1;q<=5;q++)\n\t\t\tfor (s=1;s<=5;s++)\n\t\t\t\tfor (l=1;l<=5;l++)\n\t\t\t\t\tif (((z+q)==(s+l))&&((z+l)>(s+q))&&((z+s)(s+q)&&(z+s)l) \n\t{\n\t\tcout<<\"q \"<z&&l>s) \n\t\t{\n\t\t\tcout<<\"l \"<s)\n\t\t\t\tcout<<\"z \"<l&&z>s) \n\t\t{\n\t\t\tcout<<\"z \"<s)\n\t\t\t\tcout<<\"l \"<l&&s>z) \n\t\t{\n\t\t\tcout<<\"s \"<z)\n\t\t\t\tcout<<\"l \"<z&&q>s) \n\t\t{\n\t\t\tcout<<\"q \"<s)\n\t\t\t\tcout<<\"z \"<q&&z>s) \n\t\t{\n\t\t\tcout<<\"z \"<s)\n\t\t\t\tcout<<\"q \"<q&&s>z) \n\t\t{\n\t\t\tcout<<\"s \"<z)\n\t\t\t\tcout<<\"q \"<s+q&&z+ss+q&&z+s (s + q)\n\t\t\t\t\t\t&& (z + s) < q )\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp[z] = 'z';\n\t\t\t\t\t\ttemp[s] = 's';\n\t\t\t\t\t\ttemp[q] = 'q';\n\t\t\t\t\t\ttemp[l] = 'l';\n\n\t\t\t\t\tfor( i = 50;i >= 10; i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif( temp[i] != '0' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << temp[i] << \" \" << i << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\treturn 0;\n\n}\n"} +{"label": "78", "index": "38783", "code": "//*********************************************\n//* ???????? *\n//* ?????? *\n//* ???1200012764 *\n//* ???2012/10/12 * \n//*********************************************\nint main ()\n{\n\tint z=1, q=1, s=1, l=1 ; //???????????10?????\n\tint zx , qx , sx , lx ; //??????????????10?????\n\tfor( z = 1 ; z <= 5 ; z++ )\n\t\tfor( q = 1 ; q <= 5 ; q++ ) //?????????????????\n\t\t\tfor( s = 1 ; s <= 5 ; s++ )\n\t\t\t\tfor( l = 1 ; l <= 5 ; l++)\n\t\t\t\t{\n\t\t\t\t\tif (( z + q == s + l )&&( z + l > s + q )&&( z + s < q ))\n\t\t\t\t\t{\n\t\t\t\t\t\tzx = z ;\n\t\t\t\t\t\tqx = q ;\n\t\t\t\t\t\tsx = s ;\n\t\t\t\t\t\tlx = l ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint weight[5] = { 0, zx, qx, sx, lx } ; //??????????????\n\t\t\t\tchar mweight[5] = { '0' ,'z' ,'q' ,'s', 'l' } ; //?????????????z q s l\n\t\t\t\tfor ( int k = 1 ; k <= 4 ; k++ )\n\t\t\t\t{\n\t\t\t\t\tfor ( int r = 1 ; r <= 4 - k ; r++ ) //????????????\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( weight[r] < weight[r+1] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint p = weight[r] ;\n\t\t\t\t\t\t\tweight[r] = weight[r+1];\n\t\t\t\t\t\t\tweight[r+1] = p ; \n\t\t\t\t\t\t\tchar q = mweight[r] ;\n\t\t\t\t\t\t\tmweight[r] = mweight[r+1];\n\t\t\t\t\t\t\tmweight[r+1] = q ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcout << mweight[1] << \" \" << weight[1]*10 << endl ; //??????????????\n\t\t\t\tcout << mweight[2] << \" \" << weight[2]*10 << endl ;\n\t\t\t\tcout << mweight[3] << \" \" << weight[3]*10 << endl ;\n\t\t\t\tcout << mweight[4] << \" \" << weight[4]*10 << endl ;\n\t\t\t\treturn 0 ;\n}\n"} +{"label": "78", "index": "38784", "code": "int main()\n{\n\tint z, q, s, l, z1, q1, s1, l1;\n\tchar Z = 'z';\n\tchar Q = 'q';\n\tchar S = 's';\n\tchar L = 'l';\n\tint max1, max2, min1, min2, n1, n2, n3, n4;\n\tchar MAX1, MAX2, MIN1, MIN2, N1, N2, N3, N4;\n\t\n\tfor(z1 = 10; z1 <= 50; z1 = z1 + 10)\n\t{\n\t\tfor(q1 = 10; q1 <= 50; q1 = q1 +10)\n\t\t{\n\t\t\tfor(s1 = 10; s1 <= 50; s1 = s1 + 10)\n\t\t\t{\n\t\t\t\tfor(l1 = 10; l1 <= 50; l1 =l1 + 10)\n\t\t\t\t{\n\t\t\t\t\tif((z1 + q1 == s1 + l1) && (z1 + l1 >= s1 + q1) && (z1 + s1 < q1) && (z1 != q1) \n\t\t\t\t\t\t&& (z1 != s1) && (z1 != l1) && (q1 != s1) && (q1 != l1) && (s1 != l1))\n\t\t\t\t\t{\n\t\t\t\t\t\tz = z1;\n\t\t\t\t\t\tq = q1;\n\t\t\t\t\t\ts = s1;\n\t\t\t\t\t\tl = l1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (z > q)\n\t{\n\t\tmax1 = z;\n\t\tMAX1 = 'z';\n\t\tmin1 = q;\n\t\tMIN1 = 'q';\n\t}\n\telse\n\t{\t\n\t\tmax1 = q;\n\t\tMAX1 = 'q';\n\t\tmin1 = z;\n\t\tMIN1 = 'z';\n\t}\n\tif(s > l)\n\t{\n\t\tmax2 = s;\n\t\tMAX2 = 's';\n\t\tmin2 = l;\n\t\tMIN2= 'l';\n\t}\n\telse\n\t{\n\t\tmax2 = l;\n\t\tMAX2 = 'l';\n\t\tmin2 = s;\n\t\tMIN2= 's';\n\t}\n\t\n\tif(max1 > max2)\n\t{\n\t\tn1 = max1;\n\t\tN1 = MAX1;\n\t\tn2 = max2;\n\t\tN2 = MAX2;\n\t}\n\telse\n\t{\n\t\tn1 = max2;\n\t\tN1 = MAX2;\n\t\tn2 = max1;\n\t\tN2 = MAX1;\n\t}\n\tif(min1 < min2)\n\t{\n\t\tn4 = min1;\n\t\tN4 = MIN1;\n\t\tn3 = min2;\n\t\tN3 = MIN2;\n\t}\n\telse\n\t{\n\t\tn4 = min2;\n\t\tN4 = MIN2;\n\t\tn3 = min1;\n\t\tN3 = MIN1;\n\t}\n\tcout<wt[1]+wt[2]&&wt[0]+wt[2](s+q))&&(z+s=1;i--)\n if(a[i]!='0')\n cout<w[2]+w[1])&&w[0]+w[1]==w[2]+w[3]&&w[0]+w[2]s+q)&&(z+s=1;i--)\n if (a[i]!=' ') cout < s + q)&&(z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"l\" << \" \" << l * 10 << endl;\n\t\t\t\t\t\tcout << \"q\" << \" \" << q*10 << endl;\n\t\t\t\t\t\tcout << \"z\" << \" \" << z*10 < w[1] + w[2]) && (w[0] + w[2] < w[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k = 5; k > 0; k --)\n\t\t\t\t\t\t\tfor(int i = 0; i < 4; i ++) if(w[i] == k)\n\t\t\t\t\t\t\t\tcout << name[i] << ' ' << w[i] * 10 << endl;\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n}\t"} +{"label": "78", "index": "38791", "code": "int a[4],b[6];\nconst char c[4]={'z','q','s','l'};\nint main() {\n\tint i = 1, j = 1, k = 1, m = 1; //????\n\tint z, q, s, l, sum1, sum2, sum3;//????\n\tfor (i = 1; i <= 5; i++) //???????\n\t\tfor (j = 1; j <= 5; j++)\n\t\t\tfor (k = 1; k <= 5; k++)\n\t\t\t\tfor (m = 1; m <= 5; m++)\n\t\t\t\t\tif (i != j && i != m && i != k && j != k && j != m && m\n\t\t\t\t\t\t\t!= k) { //???????????\n\t\t\t\t\t\ta[0]= z = 10 * i; //????\n\t\t\t\t\t\ta[1]= q = 10 * j;//????\n\t\t\t\t\t\ta[2]= s = 10 * k;//????\n\t\t\t\t\t\ta[3]= l = 10 * m;//????\n\t\t\t\t\t\tsum1 = ((z + q) == (s + l));\n\t\t\t\t\t\tsum2 = ((z + l) > (s + q));\n\t\t\t\t\t\tsum3 = ((z + s) < q);\n\t\t\t\t\t\tif (sum1 == 1 && sum2 == 1 && sum3 == 1) { //???????????\n\t\t\t\t\t\t\tmemset(b,-1,sizeof(b));\n\t\t\t\t\t\t\tfor(int l=0;l<4;l++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tb[a[l]]=l;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int l=5;l>0;l--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (b[l]>-1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout< l) {//??????\n\t\t\t\t\t\t\t\tif (z > s)//?????????\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t} else { //?????????\n\t\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (q < l) { //??????\n\t\t\t\t\t\t\t\tif (z > s) {//?????????\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t} else {//?????????\n\t\t\t\t\t\t\t\tcout << \"l\" << \" \" << l << endl;\n\t\t\t\t\t\t\t\tcout << \"q\" << \" \" << q << endl;\n\t\t\t\t\t\t\t\tcout << \"s\" << \" \" << s << endl;\n\t\t\t\t\t\t\t\tcout << \"z\" << \" \" << z << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38792", "code": "//*****************\n//???***********\nint main()\n{\n int z=1,q=1,s=1,l=1,Z=1,Q=1,S=1,L=1;\n\t for(z=1;z<=5;z++)\n\t\t for(q=1;q<=5;q++)\n\t\t\t for(s=1;s<=5;s++)\n\t\t\t\t for(l=1;l<=5;l++)\n\t\t\t\t {\n\t\t\t\t\t if(\n\t\t\t\t\t\t ((z+q)==(s+l))\n\t\t\t\t\t\t &&((z+l)>(s+q))\n\t\t\t\t\t\t &&((z+s)=10;i=i-10)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t if(Z==i)\n\t\t\t\t\t\t\t\t cout<<'z'<<' '<s+q&&q>z+s)\n {\n int a[4]={z,q,s,l},i,j,t;\n for(i=0;i<3;i++)\n for(j=0;j<3-i;j++)\n if(a[j]= q) continue;\n\t\t\t\t\tprintf(\"l %d\\nq %d\\nz %d\\ns %d\\n\", l*10, q*10, z*10, s*10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38795", "code": "/*\n *??? weight.cpp\n *????: 2012-10-26\n */\nint main()\n{\n\tint z,q,s,l,p,i,j; //????\n\tchar b[4]={'z','q','s','l'};//??????\n\tfor(z=1;z<=5;z++)\n\t\tfor(q=1;q<=5;q++)\n\t\t\tfor(s=1;s<=5;s++)\n\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif((z+q==s+l)&&(z+l>s+q)&&(z+ss+q && z+sa[1]+a[2]&&a[0]+a[2]=0;j--)\n for (int k=0;k<=j;k++)\n if (a[k]s+q)&&(z+s=10;i=i-10)\n {if (z==i) cout<<'z'<<' '< 50 || a == c || b == c)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (a + d > b + c && a + c < b)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t if (c != 60)\n\t\t\tbreak;\n\t\t}\n\t\tif (b != 60)\n\t\t\tbreak;\n\t}\n\tfor (int i = 50; i >= 10; i -= 10)\n\t{\n\t\tif (a == i)\n\t\t\tcout << \"z\" <<' '<< a << endl;\n\t\telse\n\t\t\tif (b == i)\n\t\t\t\tcout << \"q\" <<' '<< b << endl;\n\t\t\telse\n\t\t\t\tif (c == i)\n\t\t\t\t\tcout << \"s\" <<' '<< c << endl;\n\t\t\t\telse\n\t\t\t\t\tif (d == i)\n\t\t\t\t\t\tcout << \"l\" <<' '<< d << endl;\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38802", "code": "/*\n * chengtizhong.cpp\n *??????\n * Created on: 2013-9-27\n * Author: ???\n */\nint main()\n{\n\tfor(int z=10;z<=50;z+=10)\n\t\tfor(int q=10;q<=50;q+=10)\n\t\t\tfor(int s=10;s<=50;s+=10)\n\t\t\t{\n\t\t\t\tint l=z+q-s;\n\t\t\t\tif((z+l>s+q)&&(z+s0)&&(l<=50))\n\t\t\t\t{\n\t\t\t\t\tfor(int i=50;i>0;i-=10)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(z==i)\n\t\t\t\t\t\t\tcout<<\"z \"<(s+q))&&(z+sm[max])\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tmax=i;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcout<(s+q))&&((z+s)( w[s] + w[q] )) && (( w[z] + w[s] )< w[q]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( i = 50; i >= 10; i= i - 10 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor ( j = 0; j < 4; j++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( w[ j ] == i )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcout << name[ j ] << \" \" << w[ j ] << endl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n\n}\n\n"} +{"label": "78", "index": "38806", "code": "//============================================================================\n// Name : national8.cpp\n// Author : 1300012911\n// Version :\n// Copyright : Your copyright notice\n// Description : Hello World in C++, Ansi-style\n//============================================================================\n\n\nint main() {\n\tint weight[6]; //??\n\tchar name[6]; //??????\n\tint z,q,s,l,i,renshu; //z,q,s,l:??????\n\tfor (i = 1;i <= 5;i++) {weight[i] = i*10;name[i] = ' ';} //???\n\tfor (z = 1;z <= 5;z++) //??\n\t\tfor (q = 1;q <= 5;q++)\n\t\t\tfor (s = 1;s <= 5;s++)\n\t\t\t\tfor (l = 1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif ((z != q) && (z != s) && (q != s)\n\t\t\t\t\t\t&& (z != l) && (q != l) && (s != l)) //????\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( ((weight[z]+weight[q]) == (weight[s]+weight[l]))\n\t\t\t\t\t\t\t\t&& ((weight[z]+weight[l]) > (weight[s]+weight[q]))\n\t\t\t\t\t\t\t\t&& ( (weight[z]+weight[s]) < weight[q]) )\n\t\t\t\t\t\t\t//???????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname[z] = 'z'; //??????\n\t\t\t\t\t\t\tname[q] = 'q';\n\t\t\t\t\t\t\tname[s] = 's';\n\t\t\t\t\t\t\tname[l] = 'l';\n\t\t\t\t\t\t\trenshu = 0; //??????\n\t\t\t\t\t\t\tfor (i = 5;i >= 1;i--) //??\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t if ( name[i] != ' ' )\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t renshu++;\n\t\t\t\t\t\t\t\t\t if (renshu < 4)\n\t\t\t\t\t\t\t\t\t cout << name[i] << ' ' << weight[i] << endl;\n\t\t\t\t\t\t\t\t\t else cout << name[i] << ' ' << weight[i];\n\t\t\t\t\t\t\t\t\t }else;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else;\n\t\t\t\t\t}else;\n\t\t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38807", "code": "int main ()\n{ \n\tint z,q,s,l;//???????????\n\tfor(z=10;z<=50;z=z+10)//?????????????????\n\t{\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tif(z+q==s+l&&z+l>s+q&&z+s=1)&&(l<=5)&&(z+l>s+q)&&(z+sa[k])\n\t\t\t\t\t\t\t\tk=j;\n\t\t\t\t\t if (k!=i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttemp=a[k];\n\t\t\t\t\t\t\ta[k]=a[i];\n\t\t\t\t\t\t\ta[i]=temp;\n\t\t\t\t\t\t\tch=c[k];\n\t\t\t\t\t\t\tc[k]=c[i];\n\t\t\t\t\t\t\tc[i]=ch;\n\t\t\t\t\t\t}//?????????\n\t\t\t\t\t}//??????\n\t\t\t\t\tfor (i=0;i<4;i++)\n\t\t\t\t\t\tcout <(s+q)&&(z+s)=1;j--) //??????????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(weight[j]!=' ')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tw=j*10;\n\t\t\t\t\t\t\t\tcout<s+q)&&(z+siq+is)&&(iz+iss+q)&&(z+s0;i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(m[i]=='a')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<(a[1]+a[2]))+((a[0]+a[2])0;k--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(i=0;i<4;i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[i]==k)\n\t\t\t\t\t\t\t\t\tcout<b+c && a+cyear[i]) fo=year[i];\n\t}\n\tfor (int i=0;i<=3;i++) //??\n\t{\n\t\tif (year[i]==f) cout < (s + q)) && ((z + s) < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tw[(z > q) + (z > s) + (z > l)] = z * 10;\n\t\t\t\t\t\tw[(q > z) + (q > s) + (q > l)] = q * 10;\n\t\t\t\t\t\tw[(s > z) + (s > q) + (s > l)] = s * 10;\n\t\t\t\t\t\tw[(l > z) + (l > q) + (l > s)] = l * 10;\n\t\t\t\t\t\tch[(z > q) + (z > s) + (z > l)] = 'z';\n\t\t\t\t\t\tch[(q > z) + (q > s) + (q > l)] = 'q';\n\t\t\t\t\t\tch[(s > z) + (s > q) + (s > l)] = 's';\n\t\t\t\t\t\tch[(l > z) + (l > q) + (l > s)] = 'l';\n\t\t\t\t\t\tcout << ch[3] << \" \" << w[3] << endl;\n\t\t\t\t\t\tcout << ch[2] << \" \" << w[2] << endl;\n\t\t\t\t\t\tcout << ch[1] << \" \" << w[1] << endl;\n\t\t\t\t\t\tcout << ch[0] << \" \" << w[0] << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38816", "code": "int main()\n{\n\tchar b[4] = { 'z', 'q', 's','l'};\n\tint a[4], j, i;\n\tfor(a[0] = 10; a[0] <= 50; a[0] += 10)\n\t\tfor(a[1] = 10; a[1] <= 50; a[1] += 10)\n\t\t{\n\t\t\tif(a[0] == a[1])continue;\n\t\t\tfor(a[2] = 10; a[2] <= 50; a[2] += 10)\n\t\t\t{\n\t\t\t\tif(a[2] == a[1] || a[2] == a[0])continue;\n\t\t\t\tfor(a[3] = 10; a[3] <= 50; a[3] += 10)\n\t\t\t\t{\n\t\t\t\t\tif(a[3] == a[0] || a[3] == a[1] || a[2] == a[3])continue;\n\t\t\t\t\tif(a[0] + a[1] == a[2] + a[3] && a[0] + a[3] > a[1] + a[2] && a[0] + a[2] < a[1])\n\t\t\t\t\t\tfor(i = 50; i >= 10; i -= 10)\n\t\t\t\t\t\t\tfor(j = 0; j <= 3; j++)\n\t\t\t\t\t\t\t\tif(a[j] == i)\n\t\t\t\t\t\t\t\t\tcout << b[j] << ' ' << i << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38817", "code": "int main()\n{\n int z,q,s,l;//???????? \n int word[3];//???????? \n char rank[6];//???? \n for(int i=0;i<6;i++)\n {\n rank[i]='\\0';//?rank??? \n } \n for(z=1;z<=5;z++)//????????????????????? \n { \n for(q=1;q<=5;q++)\n {\n if(q==z)\n continue; \n for(s=1;s<=5;s++)\n {\n if((s==q)||(s==z))\n continue; \n for(l=1;l<=5;l++)\n {\n if((l==z)||(l==q)||(l==s))\n continue;\n else\n {\n word[0]=((z+q)==(s+l));\n word[1]=((z+l)>(s+q));\n word[2]=((z+s)(s+q);\n\t\t\t\tshu[2]=(z+s)=1;i--){\n\t\t\t\t\tif(pai[i]!=0)cout<j+k);\n\t\t\t\t\tsum3=(i+k=1;m--)\n\t\t{\n\n\t\t\tif(c[m][2]!=' ')\n\t\t\t{\n\t\t\t\ta=10*m;\n\t\t\t\tcout<s+q)+(z+s=10;i=i-10)\n\t\t\t\t\t\t\t\t{\n\t\t\t if (z==i)\n\t\t\t\t\t\t\t\tcout<<'z'<<' '<=10;z=z-10)\n\t{\n\t\tfor(q=50;q>=10;q=q-10)\n\t\t{\n\t\t\tfor(s=50;s>=10;s=s-10)\n\t\t\t{\n\t\t\t\tfor(l=50;l>=10;l=l-10)\n\t\t\t\t{\n\t\tif((z+q==s+l)+(z+l>s+q)+(z+s=10;i=i-10)\n\t\t\t\t{\n\t\t\t\t if(z==i)\n\t\t\t\t\t cout<<'z'<<' '<s+q&&z+sq)+(z>s)+(z>l);\n\t\t\t\t\t\tb=(q>z)+(q>s)+(q>l);\n\t\t\t\t\t\tc=(s>z)+(s>q)+(s>l);\n\t\t\t\t\t\td=(l>z)+(l>q)+(l>s);\n\t\t\t\t\t\tif(a==3) cout<<\"z\"<<\" \"<s+q && z+sl && l>z && z>s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<\"q\"<<\" \"<q && q>z && z>s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<\"l\"<<\" \"<weight[2]+weight[1]&&weight[0]+weight[2]weight[2]+weight[1]&&weight[0]+weight[2]weight[2]+weight[1]&&weight[0]+weight[2]weight[2]+weight[1]&&weight[0]+weight[2]s+q)&&(z+ss+q&&z+s s+q)&&(z+s < q)){\n num[0]=z; num[1]=q; num[2]=s; num[3]=l;\n name[0]='z'; name[1]='q'; name[2]='s'; name[3]='l';\n for (int i=0; i<4 ; ++i)\n for (int j=i; j<4; ++j)\n if (num[j]>num[i]){ t =num[i]; num[i]=num[j]; num[j]=t;\n ch=name[i]; name[i]=name[j]; name[j]=ch;\n } \n for (int i=0; i<4; ++i)\n cout << name[i] << \" \" << num[i]*10 << endl;\n return 0;\n }\n}\n"} +{"label": "78", "index": "38828", "code": "\nint main()\n{\n char a[5]={\"lqzs\"};\n int b[4]={50,40,20,10};\n\n for(int i=0;i<4;i++)\n cout<q+s);\n\t\t\t\t\tc=(z+s=1;i--)\n\t\t\tif(w[i]!=0)\n\t\t\t\tcout<p[2].w+p[1].w)&&(p[0].w+p[2].wa[m].w)\n m=j; \n } \n if(m!=i)\n {\n temp=a[i];\n a[i]=a[m];\n a[m]=temp; \n } \n }\n}\n"} +{"label": "78", "index": "38831", "code": "int main()\n{\n int z,q,s,l,pan[4],i,m;//q,z,s,l??????????pan????????\n char rank[60]; //rank??????\n for(z=10;z<=50;z=z+10)\n { \n for(q=10;q<=50;q=q+10)\n { \n if (z==q) continue;//?????? \n for(s=10;s<=50;s=s+10)\n { \n if ((z==s)||(q==s)) continue;\n for(l=10;l<=50;l=l+10)\n {\n if ((z==l)||(q==l)||(s==l)) continue;\n pan[1]=((z+q)==(s+l));\n pan[2]=((z+l)>(s+q));\n pan[3]=((z+s)m;i=i-10) cout<=10;i=i-10) cout<(s+q))&&((z+s)(s+q))&&((z+s)(s+q))&&((z+s)(s+q))&&((z+s)(s+q))&&((z+s)j+k&&i+k(s+q));\n\t\t\t\t cc3=((z+s)=q) )==0) \n\t\t\t\t\t {\ta[1]=10*z;a[2]=10*q;a[3]=10*s;a[4]=10*l;\n\t\t\t\t\t \t for (i=1;i<=3;i++)\n\t\t\t \t \t\t {\n\t\t\t\t\t\t \t for (j=4;j>i;j--)\n\t\t\t\t\t\t\t {if (a[j-1](t[1]+t[2]))&&(t[0]+t[2](b+c))&&((a+c)(s+q))&&((z+s)=0;n--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a[n]=='o'){}\n\t\t\t\t\t\t\telse{b[m]=a[n];d[m]=c[n];cout<a[1]+a[2])&&(a[0]+a[2]s+q)&&(z+s=k;i--)\n\t\t\t\t\t\t \t\t {\n\t\t\t\t\t\t \t\t\t if(a[i][2]>a[i-1][2])\n\t\t\t\t\t\t \t\t\t { //????????????\n\t\t\t\t\t\t \t\t\t\t a[5][1]=a[i-1][1];\n\t\t\t\t\t\t \t\t\t\t a[5][2]=a[i-1][2];\n\t\t\t\t\t\t \t\t\t\t a[i-1][1]=a[i][1];\n\t\t\t\t\t\t \t\t\t\t a[i-1][2]=a[i][2];\n\t\t\t\t\t\t \t\t\t\t a[i][1]=a[5][1];\n\t\t\t\t\t\t \t\t\t\t a[i][2]=a[5][2];\n\t\t\t\t\t\t \t\t\t }\n\t\t\t\t\t\t \t\t }\n\t\t\t\t\t\t \t cout<s+q)&&(z+si;j--)\n {\n if(a[j]>a[j-1])\n {\n m=a[j];\n a[j]=a[j-1];\n a[j-1]=m;\n w=b[j];\n b[j]=b[j-1];\n b[j-1]=w; \n }\n }\n }\n cout<>k;\nreturn 0;\n}\n"} +{"label": "78", "index": "38842", "code": "int main()\n{\n\tint z,q,s,l,a[6];\n\tfor(z=1;z<=5;z++)\n\tfor(q=1;q<=5;q++)\n\tfor(s=1;s<=5;s++)\n\tfor(l=1;l<=5;l++)\n\t{\n\t\ta[1]=a[2]=a[3]=a[4]=a[5]=0;\n\t\ta[z]=a[q]=a[s]=a[l]=1;\n\t\tif(a[1]+a[2]+a[3]+a[4]+a[5]==4)\n\t\tif((z+q==s+l)&&(z+l>s+q)&&(z+s(s+q)&&(z+s)0;i--)\n\t\t\t{\n\t\t\t\tfor(j=i-1;j>=0;j--)\n\t\t\t\t{\n\t\t\t\t if(result[i]>result[j])\n\t\t\t\t {\n\t\t\t\t t=result[i];\n\t\t\t\t\t result[i]=result[j];\n\t\t\t\t\t result[j]=t;\n\t\t\t\t\t tname=name[i];\n\t\t\t\t\t name[i]=name[j];\n\t\t\t\t\t name[j]=tname;\n\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t for(i=0;i<4;i++)\n\t\t {\n\t\t cout<s+q)&&(z+ss+q&&z+sl)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprintf(\"q %d\\n\",q*10);\n\t\t\t\t\t\t\tif(s>l)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"s %d\\n\",s*10);\n\t\t\t\t\t\t\t\tprintf(\"l %d\\n\",l*10);\n\t\t\t\t\t\t\t\tprintf(\"z %d\\n\",z*10);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"l %d\\n\",l*10);\n\t\t\t\t\t\t\t\tprintf(\"s %d\\n\",s*10);\n\t\t\t\t\t\t\t\tprintf(\"z %d\\n\",z*10);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprintf(\"l %d\\n\",l*10);\n\t\t\t\t\t\t\tprintf(\"q %d\\n\",q*10);\n\t\t\t\t\t\t\tprintf(\"z %d\\n\",z*10);\n\t\t\t\t\t\t\tprintf(\"s %d\\n\",s*10);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38846", "code": "\nint main() {\n\tint z=0,q=0,s=0,l=0;//???????????????z,q,s,l\n\tfor (z=1;z<=5;z++)\n\t{\n\t\tfor (q=1;q<=5;q++)\n\t\t{\n\t\t\tfor (s=1;s<=5;s++)\n\t\t\t{\n\t\t\t\tfor (l=1;l<=5;l++)\n\t\t\t {\n\t\t\t\t\tif (z+q==s+l && z+l>s+q && z+ss+q && z+ss+q && z+ss+q && z+sv[j])\n \t\t\t{\n \t\t\t\tvm=v[i];\n \t\t\t\tv[i]=v[j];\n \t\t\t\tv[j]=vm;\n \t\t\t\tcm=c[i];\n \t\t\t\tc[i]=c[j];\n \t\t\t\tc[j]=cm;\n \t\t\t}\n \t}\n }//?????????????????????????\n for (int k=0;k<4;k++)\n \tcout << c[k] <<\" \"<< v[k]*10 << endl;\n\treturn 0;\n}\n"} +{"label": "78", "index": "38847", "code": "\nvoid doublesort(int a,int b,int c,int d)\n{\n\tint result[4]={a,b,c,d};\n\tchar name[4]={'z','q','s','l'};\n\t\n\tfor(int i=0;i<4;i++)\n\t{\n\t\tfor(int j=i;j<4;j++)\n\t\t{\n\t\t\tif(result[i]s+q&&z+ss+q&&z+ss+q)\n\t { \n\t\tif(z+ss+q && z+s(s+q)&&(z+s)s+q) && (z+sq)+(z>s)+(z>l)==3) cout<<'z'<<' '<z)+(q>s)+(q>l)==3)cout<<'q'<<' '<z)+(s>q)+(s>l)==3)cout<<'s'<<' '<z)+(l>s)+(l>q)==3)cout<<'l'<<' '<q)+(z>s)+(z>l)==3) cout<<'z'<<' '<z)+(q>s)+(q>l)==2)cout<<'q'<<' '<z)+(s>q)+(s>l)==2)cout<<'s'<<' '<z)+(l>s)+(l>q)==2)cout<<'l'<<' '<q)+(z>s)+(z>l)==1) cout<<'z'<<' '<z)+(q>s)+(q>l)==1)cout<<'q'<<' '<z)+(s>q)+(s>l)==1)cout<<'s'<<' '<z)+(l>s)+(l>q)==1)cout<<'l'<<' '<q)+(z>s)+(z>l)==0) cout<<'z'<<' '<z)+(q>s)+(q>l)==0)cout<<'q'<<' '<z)+(s>q)+(s>l)==0)cout<<'s'<<' '<z)+(l>s)+(l>q)==0)cout<<'l'<<' '<(w2+w3))&&((w1+w3)(s+q)&&q>(z+s))\n {a[0]=z,a[1]=q;a[2]=s,a[3]=l;}}}}}\n\n\nfor(d=0;d<4;d++)\n{{ for(t=0;t<4;t++)\n\n if(fs+q))&&(z+ss+q&&z+s= 1 ; t -- )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( t == z )\n\t\t\t\t\t\t\t\tcout<<\"z \"< (s + q)) && (z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (i = 5; i > 0; i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z == i)\n\t\t\t\t\t\t\t\tcout << \"z \" << z * 10 << endl;\n\t\t\t\t\t\t\telse if (q == i)\n\t\t\t\t\t\t\t\tcout << \"q \" << q * 10 << endl;\n\t\t\t\t\t\t\telse if (s == i)\n\t\t\t\t\t\t\t\tcout << \"s \" << s * 10 << endl;\n\t\t\t\t\t\t\telse if (l == i)\n\t\t\t\t\t\t\t\tcout << \"l \" << l * 10 << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38858", "code": "int main()\n{\n\tint w[4],w1[4]; int i,j,max;\n\tchar name[4]={'z','q','s','l'}; //yixia\n\tfor (w[0]=1;w[0]<=5;w[0]++)\n\t\tfor (w[1]=1;w[1]<=5;w[1]++)\n\t\t\tfor (w[2]=1;w[2]<=5;w[2]++)\n\t\t\t\tfor (w[3]=1;w[3]<=5;w[3]++)\n\t\t\t\t\tif ((w[0]+w[1]==w[2]+w[3])&&(w[0]+w[3]>w[1]+w[2])&&(w[0]+w[2]w1[max]) max=j;//???????\n\t\t\t\t\t\t\tcout< ( sun + qian );\n\t\t\t\t\tc = ( zhao + sun ) < qian;\n\t\t\t\t\tif ( a == 1 && b == 1 && c == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( li > qian )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\th1 = 'l';\n\t\t\t\t\t\t\th2 = 'q';\n\t\t\t\t\t\t\tm1 = li; m2 = qian;\n\t\t\t\t\t\t\tif ( zhao > sun )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th3 = 'z'; h4 = 's';\n\t\t\t\t\t\t\t\tm3 = zhao; m4 = sun;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th3 = 's'; h4 = 'z';\n\t\t\t\t\t\t\t\tm3 = sun; m4 = zhao;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\th1 = 'q';\n\t\t\t\t\t\t\tm1 = qian;\n\t\t\t\t\t\t\tif ( ( zhao > sun ) && ( zhao > li ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th2 = 'z'; m2 = zhao;\n\t\t\t\t\t\t\t\tif ( sun > li )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 's';\n\t\t\t\t\t\t\t\t\th4 = 'l';\n\t\t\t\t\t\t\t\t\tm3 = sun; m4 = li;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 'l'; h4 = 's';\n\t\t\t\t\t\t\t\t\tm3 = li; m4 = sun;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( ( sun > zhao ) && ( sun > li ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th2 = 's'; m2 = sun;\n\t\t\t\t\t\t\t\tif ( zhao > li )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 'z'; h4 = 'l';\n\t\t\t\t\t\t\t\t\tm3 = zhao; m4 = li;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 'l'; h4 = 'z';\n\t\t\t\t\t\t\t\t\tm3 = li; m4 = zhao;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( ( li > zhao ) && ( li > sun ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\th2 = 'l'; m2 = li;\n\t\t\t\t\t\t\t\tif ( zhao > sun )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 'z'; h4 = 's';\n\t\t\t\t\t\t\t\t\tm3 = zhao; m4 = sun;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\th3 = 's'; h4 = 'z';\n\t\t\t\t\t\t\t\t\tm3 = sun; m4 = zhao;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcout << h1 << \" \" << m1 << endl;\n\t\t\t\t\t\tcout << h2 << \" \" << m2 << endl;\n\t\t\t\t\t\tcout << h3 << \" \" << m3 << endl;\n\t\t\t\t\t\tcout << h4 << \" \" << m4 << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n}"} +{"label": "78", "index": "38860", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor(z = 1; z<=5; z++)\n\t\tfor(q = 1; q<=5; q++)\n\t\t\tfor(s = 1; s <=5; s++)\n\t\t\t\tfor(l = 1; l <=5; l++)\n\t\t\t\t{\n\t\t\t\t\tif( (z+q == s+l) && (z+l > s+q) && (z+s < q) && (z!=q) && (z!=s) && (z!=l) && (q!=s) && (q!=l) && (s!=l) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif(l>q&&l>z&&l>s&&q>s&&q>z&&z>s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"l \" << l*10 <q&&l>s&&l>z&&q>s&&q>z&&s>z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"l \" << l*10 <l&&q>s&&q>z&&l>s&&l>z&&s>s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"q \" << q*10 <l&&q>z&&q>s&&l>z&&l>s&&z>s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\tcout << \"q \" << q*10 <s+q && z+s=1;m--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(z!=m && q!=m && s!=m && l!=m)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcout<(q+s))&&((z+s) S + Q) && (Z + S < Q) && ((Z - Q) * (Z - S) * (Z - L) * (Q - S) * (Q - L) * (S - L) != 0))\n\t\t{\n\t\t\tz = Z;\n\t\t\tq = Q;\n\t\t\ts = S;\n\t\t\tl = L;\n\t\t\tbreak;\n\t\t}\n\t}\n\tk = 1;\n\twhile (k <= 4)\n\t{\n\t\tk = k + 1;\n\t\tif (z > q && z > s && z > l)\n\t\t{\n\t\t\tcout << \"z \" << 10 * z << endl;\n\t\t\tz = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (q > z && q > s && q > l)\n\t\t{\n\t\t\tcout << \"q \" << 10 * q << endl;\n\t\t\tq = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (s > z && s > q && s > l)\n\t\t{\n\t\t\tcout << \"s \" << 10 * s << endl;\n\t\t\tS = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (l > z && l > q && l > s)\n\t\t{\n\t\t\tcout << \"l \" << 10 * l << endl;\n\t\t\tl = 0;\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38864", "code": "int main()\n{int z,q,s,l;\n int a[4],t,i,j;\n char b[4]={'z','q','s','l'},c;\n for(z=10;z<=50;z+=10)\n for(q=10;q<=50;q+=10)\n for(s=10;s<=50;s+=10)\n for(l=10;l<=50;l+=10)\n if((z+q==s+l)&&(z+l>s+q)&&(z+sws+wq)+(wz+ws0;i--)\n\t{\n\t\tif(b[i]==0)\n continue;\n\t\tcout<(c+b))\n if((a+c)f[i].weight)\n {\n t1=f[j].weight;\n t2=f[j].name;\n f[j].weight=f[i].weight;\n f[j].name=f[i].name;\n f[i].weight=t1;\n f[i].name=t2;\n }\n for(i=0;i<4;i++)\n printf(\"%c %d\\n\",f[i].name,10*f[i].weight);\n }\n }\n return 0;\n}"} +{"label": "78", "index": "38867", "code": "int main()\n{\n\tint z,q,s,l,x1,x2,x3,i;\n\tchar rank[6];\n\tfor (i=0;i<6;i++)\n\t\trank[i]='0';\n\tfor (z=10;z<=50;z=z+10)\n\t{\n\t\tfor (q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tif (q==z) continue;\n\t\t\tfor (s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tif (s==z || s==q) continue;\n\t\t\t\tfor (l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif (l==z || l==q || l==s) continue;\n\t\t\t\t\tx1=((z+q)==(s+l));\n\t\t\t\t\tx2=((z+l)>(s+q));\n\t\t\t\t\tx3=((z+s)=1;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(rank[i]!='0')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout <a[1]+a[2]&&a[0]+a[2]b+c &&a+cb){max=a;p=1;}\n\t\t\t\t\t\t\t else {max=b;p=2;}\n\t\t\t\t\t\t\t if (c>max){max=c;p=3;}\n\t\t\t\t\t\t\t if (d>max){max=d;p=4;}//?????????\n\t\t\t\t\t\t\t switch (p)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t case 1: {cout<<\"z \"<j+i)&&(h+j(s+q))&&((z+s)=1;j--){//??????\n\t if(j==m) continue;\n\t cout<b+c && a+cb&&b>c&&c>d )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"z\"<<' '<b&&b>d&&d>c )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"z\"<<' '<c&&c>d&&d>b )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"z\"<<' '<b&&b>a&&a>c )\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<<\"l\"<<' '<=s+q)+(z+s=0;i--) //??????\n\t\t\t\t\t {\n\t\t\t\t\t\t if(rank[i]!=0)\n\t\t\t\t\tcout< s + q && z + s < q) {\n\t\t\t\t\t\t//????????\n\t\t\t\t\t\ta[z / 10] = 'z';\n\t\t\t\t\t\ta[q / 10] = 'q';\n\t\t\t\t\t\ta[s / 10] = 's';\n\t\t\t\t\t\ta[l / 10] = 'l';\n\t\t\t\t\t\tfor (int i = 5; i >= 1; i--)\n\t\t\t\t\t\t\tif (a[i] == 'z' || a[i] == 'q' || a[i] == 's'\n\t\t\t\t\t\t\t\t\t|| a[i] == 'l')//?????????????\n\t\t\t\t\t\t\t\tcout << a[i] << \" \" << i * 10 << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38875", "code": "int main()\n{\n\tint a , b , c , d ;\n\tint A ,B ;\n\tfor(a=10 ;a<=40; a+=10)\n\t\tfor(b=40 ; b<=50 ; b+=10)\n\t\t\tfor(c=10 ; c<=40 ; c+=10)\n\t\t\t{\n\t\t\t\td=a+b-c ;\n\t\t\t\tA= (a+d)>(b+c) ;\n\t\t\t\tB= (a+c)a[2]+a[3])\n if(a[1]+a[3]a[j])\n {\n a[i]=a[i]+a[j];\n a[j]=a[i]-a[j];\n a[i]=a[i]-a[j]; \n b[i]=b[i]+b[j];\n b[j]=b[i]-b[j];\n b[i]=b[i]-b[j]; \n }\n for(i=1;i<=4;i++)\n printf(\"%c %d\\n\",b[i],a[i]*10);\n return 0;\n }\nreturn 0;\n}"} +{"label": "78", "index": "38877", "code": "\nint main() {\n\tint z=10,q=10,s=10,l=10,a;\n\tfor(z=10;z<=50;z=z+10){\n\t\tfor(q=10;q<=50;q=q+10){\n\t\t\tfor(s=10;s<=50;s=s+10){\n\t\t\t\tfor(l=10;l<=50;l=l+10){\n\t\t\t\t\tif((z+q==s+l)&&(z+l>s+q)&&(z+ss+q)&&(z+ss+q)&&(z+ss+q)&&(z+s=10;a=a-10){\n\t\tif(z==a)cout<<\"z \"<=10;z=z-10)//???????z,q,s,l\n {\n\t for(q=50;q>=10;q=q-10){\n\t\t if(z==q)\n\t\t\t continue;\n\t\t for(s=50;s>=10;s=s-10){\n\t\t\t if(s==z||s==q)\n\t\t\t\t continue;\n\t\t\t for(l=50;l>=10;l=l-10){\n\t\t\t\t if(l==z||l==q||l==s)\n\t\t\t\t\t continue;\n\t\t\t\t if(((z+q)==(s+l))&&((z+l)>(q+s))&&((z+s)=10;i=i-10)//???????\n\t\t\t\t\t\t if(z==i)\n\t\t\t\t\t\t\t cout<<\"z \"<(s+q)&&(z+s)q)\n\t{\n\t\tcout<<\"l \"<q&&q>z&&z>s)\n\t{\n\t\tcout<<\"l \"<q&&q>s&&s>z)\n\t{\n\t\tcout<<\"l \"<l&&z>s)\n\t{\n\t\tcout<<\"q \"<l&&l>s&&s>z)\n\t{\n\t\tcout<<\"q \"<l)\n\t{\n\t\tcout<<\"q \"< s + q) && (z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (l > q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"q \" << q << endl;\n\t\t\t\t\t\t\tcout << \"l \" << l << endl;\n\t\t\t\t\t\t\tif (z > s)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << \"s \" << s << endl;\n\t\t\t\t\t\t\t\tcout << \"z \" << z << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0; \n}"} +{"label": "78", "index": "38881", "code": "int main()\n{\n\tint z,q,s,l; //????????????????\n\tint a[4],t;char c[4],u; //a[4]??????c[4]??????t?u??????\n for(z=1;z<=5;z++) //????\n\t\tfor(q=1;q<=5;q++)\n\t\t\tif(q!=z)\n\t\t\t\tfor(s=1;s<=5;s++)\n\t\t\t\t\tif(s!=z&&s!=q)\n\t\t\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t\t\t\tif(l!=z&&l!=q&&l!=s)\n\t\t\t\t\t\t\t\tif(z+q==s+l&&z+l>q+s&&z+s(s+q))&&((z+s)=10;i=i-10)\n\t\t\t\t\t\t{if(i==z||i==q||i==s||i==l)\n\t\t\t\t\t\t\tcout<(s+q)&&(z+s)=x;y--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[y]>a[y-1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tt=a[y];\n\t\t\t\t\t\t\t\t\ta[y]=a[y-1];\n\t\t\t\t\t\t\t\t\ta[y-1]=t;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i=0;i<=3;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(i==0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[i]==z)\n\t\t\t\t\t\t\t\t\tprintf(\"z %d\",z);\n\t\t\t\t\t\t\t\telse if(a[i]==q)\n\t\t\t\t\t\t\t\t\tprintf(\"q %d\",q);\n\t\t\t\t\t\t\t\telse if(a[i]==s)\n\t\t\t\t\t\t\t\t\tprintf(\"s %d\",s);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tprintf(\"l %d\",l);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[i]==z)\n\t\t\t\t\t\t\t\t\tprintf(\"\\nz %d\",z);\n\t\t\t\t\t\t\t\telse if(a[i]==q)\n\t\t\t\t\t\t\t\t\tprintf(\"\\nq %d\",q);\n\t\t\t\t\t\t\t\telse if(a[i]==s)\n\t\t\t\t\t\t\t\t\tprintf(\"\\ns %d\",s);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tprintf(\"\\nl %d\",l);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38884", "code": "// ???.cpp : ??????????????\n//\n\n\n\nint main()\n{\n\tint i,z,s;\n\tfor(i=70;i>=30;i-=10)\n\t{\n\t for(z=20;z<=30;z+=10)\n\t {\n\t for(s=10;s(s+q))&&((z+s)weight[2]+weight[1]);\n c=(weight[0]+weight[2]0;i--)//??????\n {\n for(j=0;j<4;j++)\n {if(weight[j]==i)cout<>i;\n return 0;\n}\n"} +{"label": "78", "index": "38887", "code": "\nint main()\n{\n int a, b ,c, d,n1,n2,n3,n4;\n \n for(a=10;a<=50;a+=10)\n {\n for(b=10;b<=50;b+=10)\n {\n for(c=10;c<=50;c+=10)\n {\n for(d=10;d<=50;d+=10)\n if((a+b)==(c+d)&&(a+d)>(b+c)&&(a+c)b?a:b;\n n2=c>d?c:d;\n n1=n1>n2?n1:n2;\n n2=40;\n n3=an4?n3:n4;\n n4=n3s+q && z+s (s + q) &&\n (z + s) < q)\n {\n check(5);\n check(4);\n check(3);\n check(2);\n check(1);\n }\n }\n }\n return 0;\n}\n"} +{"label": "78", "index": "38890", "code": "int main()\n{\n\tint a[4]={20,40,10,50},i,j,t1,max;\n\t\n\tchar c[4]={'z','q','s','l'},t2;\n\t\n\t\tfor(i=0;i<4;i++)\n\t\t{\n\t\t\tmax=i;\n\t\t\tfor(j=i;j<4;j++)\n\t\t{\n\t\t\tif(a[i]s+q);\n\t\t\t\t\t s3=(z+sb+c && a+cs+q)\n\t\t\t\t\t\t\t\tif(z+ss+q)&&(z+s=1;i--)\n \t\t\t\t\t{\n \t\t\t\t\t\tif (a[i]==0) continue;\n \t\t\t\t\t\tcout<(s+q))&&((z+s)a[j-1]){\n\t\t\t\t\t\t\t\tt=a[j];\n\t\t\t\t\t\t\t\ta[j]=a[j-1];\n\t\t\t\t\t\t\t\ta[j-1]=t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tcout<s+q)&&(z+s=10;i=i-10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(z==i) cout <<\"z \" <s+q);\n\t\t\t\t\tw3=(z+ss+q)&&(z+s(s+q)&&(z+s)0;i--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(i==z||i==q||i==s||i==l)\n\t\t\t\t\t\t\t\t\t\t\tcout< q + s) && z + s < q)) // ??????\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tchar rank[5] = {'\\0', '\\0', '\\0', '\\0', '\\0'};\n\t\t\t\t \t\t\t\trank[z / 10 - 1] ='z';\n\t\t\t\t \t\t\t\trank[q / 10 - 1] ='q';\n\t\t\t\t \t\t\t\trank[s / 10 - 1] ='s';\n\t\t\t\t \t\t\t\trank[l / 10 - 1] ='l';\n\t\t\t\t \t\t\t\tfor(int i = 4; i >= 0; i--)\n\t\t\t\t \t\t\t\t\tif(rank[i] > 97)\n\t\t\t\t \t\t\t\t\t\tcout << rank[i] << \" \" << (i + 1) * 10 << endl;\n\t\t\t\t \t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38902", "code": "int main ()\n{\n\tint a[5] ;\n\tchar b[5] ;\n\tb[1] = 'z'; b[2] = 'q' ; b[3] = 's' ; b[4] = 'l' ;\n\tfor ( a[1] = 1 ; a[1] <= 5 ; a[1] ++)\n\t{\n\t\tfor ( a[2] = 1 ; a[2] <= 5 ; a[2] ++)\n\t\t{\n\t\t\tfor ( a[3] = 1 ; a[3] <= 5 ; a[3] ++)\n\t\t\t{\n\t\t\t\tfor ( a[4] = 1 ; a[4] <= 5 ; a[4] ++)\n\t\t\t\t{\n\t\t\t\t\tif((a[1] + a[2]) == (a[3] + a[4]) && (a[1] + a[4]) > (a[3] + a[2]) && (a[1] + a[3]) < a[2] && a[1] != a[2] && a[1] != a[3] && a[1] != a[4] && a[2] != a[3] && a[2] != a[4] && a[3] != a[4])\n\t\t\t\t\t{\n\t\t\t\t\t\tfor( int i = 5 ; i > 0 ; i --)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor( int j = 1 ; j <= 4 ; j ++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(a[j] == i)\n\t\t\t\t\t\t\t\t\tcout << b[j] << \" \" << a[j] * 10 << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0 ;\n}"} +{"label": "78", "index": "38903", "code": "int main()\n{\n\tint a[4],b[4],T,i,j,c[4];\n\tfor(a[0]=1;a[0]<6;a[0]++)\n\t\tfor(a[1]=1;a[1]<6;a[1]++)\n\t\t\tfor(a[2]=1;a[2]<6;a[2]++)\n\t\t\t\tfor(a[3]=1;a[3]<6;a[3]++)\n\t\t\t\t\tif( (a[0]+a[1]==a[2]+a[3])+(a[0]+a[3]>a[1]+a[2])+(a[0]+a[2]s+q)&&(z+sa[j+1])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ta0=a[j];\n\t\t\t\t\t\t\t\t\ta[j]=a[j+1];\n\t\t\t\t\t\t\t\t\ta[j+1]=a0;\n\t\t\t\t\t\t\t\t\tb0=b[j];\n\t\t\t\t\t\t\t\t\tb[j]=b[j+1];\n\t\t\t\t\t\t\t\t\tb[j+1]=b0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=3;i>=0;i--)\n\t{\n\t\tprintf(\"%c %d\\n\",b[i],a[i]);\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38905", "code": "\n\nint main(void)\n{\n\tint z,q,s,l,i;\n\tfor(z=50;z>0;z=z-10)\n\t\tfor(q=50;q>0;q=q-10)\n\t\t\tfor(s=50;s>0;s=s-10)\n\t\t\t\tfor(l=50;l>0;l=l-10)\n\t\t\t\t\tif((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)0;i=i-10)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(i==z)\n\t\t\t\t\t\t\tprintf(\"z %d\\n\",z);\n\t\t\t\t\t\t\tif(i==q)\n\t\t\t\t\t\t\tprintf(\"q %d\\n\",q);\n\t\t\t\t\t\t\tif(i==s)\n\t\t\t\t\t\t\tprintf(\"s %d\\n\",s);\n\t\t\t\t\t\t\tif(i==l)\n\t\t\t\t\t\t\tprintf(\"l %d\\n\",l);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\n\treturn 0;\n}"} +{"label": "78", "index": "38906", "code": "int main()\n{\n\tint z, q, s, l;\n\tfor(z = 1; z <= 5; z++)\n\t{\n\t\tfor(q = 1; q <= 5; q++)\n\t\t{\n\t\t\tfor(s = 1; s <= 5; s++)\n\t\t\t{\n\t\t\t\tfor(l = 1; l <= 5; l++)\n\t\t\t\t{\n\t\t\t\t\tif(((z + q) == (s + l)) && ((z + l) > (s + q)) && ((z + s) < q) )\n\t\t\t\t\t{\n\t\t\t\t\t\tz *= 10;\n\t\t\t\t\t\tq *= 10;\n\t\t\t\t\t\ts *= 10;\n\t\t\t\t\t\tl *= 10;\n\t\t\t\t\t\tcout << 'l' << ' ' << l << endl << 'q' << ' ' << q << endl << 'z' << ' ' << z << endl << 's' << ' ' << s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n "} +{"label": "78", "index": "38907", "code": "/*\n * main.cpp\n * Created on: 2012-10-1\n * Author: ??\n????????????????????????????????????????????????????????10???????????????50?????????????????????????????; ????????????????????????????????????????????????????????????????????????????????????????????\n*/\n\n\n\n\n\nint main()\n{\n\tint a,b,c,d;\n\t\n\tfor (a=1;a<=5;a++) //??????\n\t\tfor (b=1;b<=5;b++)//??????\n\t\t\tfor (c=1;c<=5;c++)//??????\n\t\t\t for (d=1;d<=5;d++)//??????\n\t\t\t\t if ((a!=b) && (a!=c) && (a!=d) && (b!=c) && (b!=d) && (c!=d))//????????\n\t\t\t\t\t if ((a+b==c+d) + (a+d>b+c) + (a+cs+q)\n if(z+s(a[1]+a[2]))&&((a[0]+a[2])s+q)+(z+s s + q)&&(z + s < q)\n\t\t\t\t\t && z!= q && z!=s && z!= l && q != s && q != l && s != l)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[5-z] = 'z';\n\t\t\t\t\t\ta[5-q] = 'q';\n\t\t\t\t\t\ta[5-s] = 's';\n\t\t\t\t\t\ta[5-l] = 'l';\n\t\t\t\t\t\tfor(i = 0; i < 5; i++)\n\t\t\t\t\t\t\tif(a[i] != 0)\n\t\t\t\t\t\t\t\tcout << a[i] << ' ' << (5 - i)*10 << endl;\n\t\t\t\t\t}\n\t\t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38912", "code": "int main()\n{\n\tint z,q,s,l;\n\tz=20;\ns=10;\nl=50;\nq=40;\ncout << \"l\" << \" \" <s[2]+s[1])&&(s[0]+s[2] ( j + k ) && ( i + k ) < j )\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( int m = 5 ; m >= 1 ; m -- )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( i == m )\n\t\t\t\t\t\t\t\tcout << \"z \" << 10 * m << endl;\n\t\t\t\t\t\t\tif ( j == m )\n\t\t\t\t\t\t\t\tcout << \"q \" << 10 * m << endl;\n if ( k == m )\n\t\t\t\t\t\t\t\tcout << \"s \" << 10 * m << endl;\n if ( l == m )\n\t\t\t\t\t\t\t\tcout << \"l \" << 10 * m << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38915", "code": "//**************************************************************\n//* ? ?:??? *\n//* ? ?:??? 1200012861 *\n//* ? ?:2012?10?8? *\n//**************************************************************\nint main()\n{\n\tint z, q, s, l, i, j, order[5], temp;\n\tfor (z = 1; z <= 5; z++)\n\t{\n\t\tfor (q = 1; q <= 5; q++)\n\t\t{\n\t\t\tfor (s = 1; s <= 5; s++)\n\t\t\t{\n\t\t\t\tfor (l = 1; l <= 5; l++)\n\t\t\t\t{\n\t\t\t\t\tif (((z + q) == (s + l)) && ((z + l) > (s + q)) && ((z + s) < q))\n\t\t\t\t\t\t //????????????\n\t\t\t\t\t{\n\t\t\t\t\t\torder[1] = z; //????????\n\t\t\t\t\t\torder[2] = q; //????????\n\t\t\t\t\t\torder[3] = s; //????????\n\t\t\t\t\t\torder[4] = l; //????????\n\t\t\t\t\t\tbreak; //????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tz = order[1]; //????????z\n\tq = order[2]; //????????q\n\ts = order[3]; //????????s\n\tl = order[4]; //????????l\n\t\n\tfor (j = 1; j <= 3; j++) //????????\n\t{\n\t\tfor (i = 1; i <= (4 - j); i++) //????\n\t\t{\n\t\t\tif (order[i] < order[i + 1]) //????????\n\t\t\t{\n\t\t\t\ttemp = order[i]; //\n\t\t\t\torder[i] = order[i + 1]; //\n\t\t\t\torder[i + 1] = temp; //???????\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor (i = 1; i <= 4; i++)\n\t{\n\t\tif (order[i] == z) //????????i?\n\t\t\tcout << \"z \" << 10 * order[i] << endl; //???\"z \"?????\n\t\tif (order[i] == q) //????????i?\n\t\t\tcout << \"q \" << 10 * order[i] << endl; //???\"q \"?????\n\t\tif (order[i] == s) //????????i?\n\t\t\tcout << \"s \" << 10 * order[i] << endl; //???\"s \"?????\n\t\tif (order[i] == l) //????????i?\n\t\t\tcout << \"l \" << 10 * order[i] << endl; //???\"l \"?????\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38916", "code": "/*??????????????????????????????????????????????\n * ?????????????10????,??????????50???\n * ??????????????????????????;\n * ???????????????????????????????????????????\n * ?????????????????????????????????????????????????\n *????: 2012-10-16\n *??? ??\n */\n\nint main()\n{\n\tint weight[4]; //??????\n\tchar name[4] = {'z', 'q', 's', 'l'};\n\tfor(weight[0] = 1; weight[0] <= 5; weight[0]++) //??\n\t\tfor(weight[1] = 1; weight[1] <= 5; weight[1]++)\n\t\t\tif(weight[0] != weight[1])\n\t\t\t for(weight[2] = 1; weight[2] <= 5; weight[2]++)\n\t\t\t\t if(weight[0] != weight[2] && weight[1] != weight[2])\n\t\t\t\t \tfor(weight[3] = 1; weight[3] <= 5; weight[3]++)\n\t\t\t\t \t\tif(weight[0] != weight[3] && weight[1] != weight[3] && weight[2] != weight[3])\n\t\t\t\t \t\t\tif((weight[0] + weight[1] == weight[2] + weight[3]) && ((weight[0] + weight[3] > weight[1] + weight[2]) && weight[0] +weight[2] < weight[1])) // ??????\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tfor(int i = 0; i <= 2; i++) //????????\n\t\t\t\t \t\t\t for(int j = 3; j > i; j--)\n\t\t \tif(weight[j] > weight[i])\n\t\t \t{\n\t\t \t\tint p = weight[j];\n\t\t \t\tweight[j] = weight[i];\n\t\t \t\tweight[i] = p;\n\t\t \t\tchar q = name[j];\n\t\t \t\tname[j] = name[i];\n\t\t \t\tname[i] = q;\n\t\t }\n\t\t\t\t \t\t\t\tfor(int k = 0; k <= 3; k++) //???????\n\t\t\t\t \t\t\t\t\tcout << name[k] << \" \" << weight[k] << 0 << endl;\n\t\t\t\t \t\t\t\tbreak; //?????????\n\t\t\t\t \t\t\t}\n\n\treturn 0;\n}\n"} +{"label": "78", "index": "38917", "code": "int main()\n{\n\tint i,j,k,w,z,q,s,l;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tz=i;\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tq=j;\n\t\t\tfor(k=1;k<=5;k++)\n\t\t\t\t{\n\t\t\t\ts=k;\n\t\t\t\tfor(w=1;w<=5;w++)\n\t\t\t\t{\n\t\t\t\t\tl=w;\n\t\t\t\t\tif(z+q==s+l&&z+l>s+q&&z+s s + q ) && ( z + s < q ) )\n {\n for( i = 50 ; i >= 10 ; i -= 10 )\n {\n if( z == i ) printf( \"z %d\\n\",z );\n if( q == i ) printf( \"q %d\\n\",q );\n if( s == i ) printf( \"s %d\\n\",s );\n if( l == i ) printf( \"l %d\\n\",l );\n } \n } \n }\n }\n }\n }\n \n\n}\n"} +{"label": "78", "index": "38919", "code": "int main()\n{\n\tint z, q, s, l;\n\tfor (z=10; z<=50; z+=10)\n\t\tfor(q=10; q<=50; q+=10)\n\t\t\tfor(s=10; s<=50; s+=10)\n\t\t\t\tfor(l=10; l<=50; l+=10)\n\t\t\t\t{\n\t\t\t\t\tif(z==q || z==s || z==l || q==s || q==l || s==l)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif((z+q) == (s+l) && (z+l) > (s+q) && (z+s) < q)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(l>q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout << \"l \" << l <q+s && z+ss+q&&z+s=0; i--)\n for(j=0; j<=i; j++)\n if(a[j]a[1]+a[2]) && (a[0]+a[2]s+q);\n\t\t\t\t\tc=(z+s=1;i--)\n\t\t\t\t\t\t{\nif(i==3)\ncontinue;\n\t\t\t\t\t\t\tcout<s+q&&z+s0;i = i-10)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(z==i) cout << 'z' << ' ' << z << endl;\n\t\t\t\t\t\t\tif(q==i) cout << 'q' << ' ' << q << endl;\n\t\t\t\t\t\t\tif(s==i) cout << 's' << ' ' << s << endl;\n\t\t\t\t\t\t\tif(l==i) cout << 'l' << ' ' << l << endl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38925", "code": "int main()\n{\n\tint z, q, s, l, m, i;\n\tchar a[6];\n\n\tfor (z = 1; z <= 5; z++)\n\t{\n\t\tfor (q = 1; q <= 5; q++)\n\t\t{\n\t\t\tif(z == q)\n\t\t\t\tcontinue;\n\t\t\tfor (s = 1; s <=5; s++)\n\t\t\t{\n\t\t\t\tif(s == q)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (l = 1; l <= 5; l++)\n\t\t\t\t{\n\t\t\t\t\tif (l == s)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif ( z + q == s + l && z + l > s + q && z + s < q)\n\t\t\t\t\t{a[z] = 'z';a[q] = 'q';a[s] = 's';a[l] = 'l';m = 15 - z -q - s - l;}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 5; i > m;i--)\n\t{\n\t\tcout << a[i] << \" \" << i * 10 << endl;\n\t}\n\tfor (i = m - 1;i >= 1;i--)\n\t{\n\t\tcout << a[i] << \" \" << i * 10 << endl;\n\t}\n\tcin >> i;\n\treturn 0;\n}\n\n"} +{"label": "78", "index": "38926", "code": "int main()\n{\n int a[5],i;char n[5]={'l','q','z','s'};\n for(i=0;i<5;i++)\n a[i]=(i+1)*10;\n printf(\"%c %d\\n\",n[0],a[4]);\n printf(\"%c %d\\n\",n[1],a[3]);\n printf(\"%c %d\\n\",n[2],a[1]);\n printf(\"%c %d\\n\",n[3],a[0]);\n getchar();getchar();\n \n}\n"} +{"label": "78", "index": "38927", "code": "int main()\n{\n\tchar name[5]={0};\n\tchar s;\n\tint i,j,k,m,weight[5]={0},t;\n\tfor(i=5;i>0;i--)//?\n\t{for(j=5;j>0;j--){j!=i;//?\n\tfor(k=5;k>0;k--){k!=i&&k!=j;//?\n\tfor(m=5;m>0;m--){m!=i&&m!=j&&m!=k;//?\n\tif((i+j==m+k)&&(i+m>j+k)&&(i+k(s+q))+((z+s)q)\n\t\t\t\t\t {\n\t\t\t\t\t\tcout<<\"l\"<<\" \"<s)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<z)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<\"s\"<<\" \"<l)\n\t\t\t\t\t {\n\t\t\t\t\t cout<<\"q\"<<\" \"<s)\n\t\t\t\t\t \t{\n\t\t\t\t\t \tcout<<\"z\"<<\" \"<z)\n\t\t\t\t\t \t{\n\t\t\t\t\t \tcout<<\"s\"<<\" \"<s+l&&z+s(s+q))&&((z+s)s+q)&&(z+s=10;i-=10){\n\t\t\t\t\t\t\tif((i==z)||(i==q)||(i==s)||(i==l))\n\t\t\t\t\t\t\t\tcout<s+q&&z+s (weight[2]+ weight[1]));\n\t\t\t\t\t\tcc3= ((weight[0]+ weight[2])< weight[1]);\n\t\t\t\t\t\tif((cc1== 1) && (cc2== 1) && (cc3== 1)){\n\t\t\t\t\t\t\tfor(i= 0; i< 4; i++){\n\t\t\t\t\t\t\t\tif(weight[i]== 50)\n\t\t\t\t\t\t\t\t\tcout<s+q&&z+ss+q)+(z+ss+q)&&(z+sw[j][0])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\td=w[j+1][0];\n\t\t\t\t\t\t\t\t\tp=w[j+1][1];\n\t\t\t\t\t\t\t\t\tw[j+1][0]=w[j][0];\n\t\t\t\t\t\t\t\t\tw[j+1][1]=w[j][1];\n\t\t\t\t\t\t\t\t\tw[j][0]=d;\n\t\t\t\t\t\t\t\t\tw[j][1]=p;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(i=1;i<5;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<(q+s)&&(z+s)a[2]+a[3]&&(a[1]+a[3]=10;k=k-10)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=1;i<=4;i++)\n\t\t\t\t\t\tif(a[i]==k)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc=(b[i]%10000);\n\t\t\t\t\t\t\tcout<s+q)\n\t\t\tif(z+s0;i--)\n\t\t\t\t{\n\t\t\t\t\tif(i==z)\n\t\t\t\t\t\tcout<<\"z\"<<\" \"<(s+q)&&(z+s)a[2]+a[3])+(a[0]+a[2]0;m--)\n {\n for (n=0;n<4;n++)\n {\n if (a[n]==m)\n cout <(s+q)) x2=1;//??z+l>s+q,?x2=1 \n else x2=0;//????\n if((z+s)(s+q))&&\n ((z+s)s+q&&z+sa)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb=a;\n\t\t\t\t\t\t\ta=q;\n\t\t\t\t\t\t\tx2=x1;\n\t\t\t\t\t\t\tx1='q';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tb=q;\n\t\t\t\t\t\t\tx2='q';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s>b)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (s>a)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc=b;\n\t\t\t\t\t\t\t\tb=a;\n\t\t\t\t\t\t\t\ta=s;\n\t\t\t\t\t\t\t\tx3=x2;\n\t\t\t\t\t\t\t\tx2=x1;\n\t\t\t\t\t\t\t\tx1='s';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc=b;\n\t\t\t\t\t\t\t\tb=s;\n\t\t\t\t\t\t\t\tx3=x2;\n\t\t\t\t\t\t\t\tx2='s';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc=s;\n\t\t\t\t\t\t\tx3='s';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l>c)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (l>b)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (l>a)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\td=c;\n\t\t\t\t\t\t\t\t\tc=b;\n\t\t\t\t\t\t\t\t\tb=a;\n\t\t\t\t\t\t\t\t\ta=l;\n\t\t\t\t\t\t\t\t\tx4=x3;\n\t\t\t\t\t\t\t\t\tx3=x2;\n\t\t\t\t\t\t\t\t\tx2=x1;\n\t\t\t\t\t\t\t\t\tx1='l';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\td=c;\n\t\t\t\t\t\t\t\t\tc=b;\n\t\t\t\t\t\t\t\t\tb=l;\n\t\t\t\t\t\t\t\t\tx4=x3;\n\t\t\t\t\t\t\t\t\tx3=x2;\n\t\t\t\t\t\t\t\t\tx2='l';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\td=c;\n\t\t\t\t\t\t\t\tc=l;\n\t\t\t\t\t\t\t\tx4=x3;\n\t\t\t\t\t\t\t\tx3='l';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\td=l;\n\t\t\t\t\t\t\tx4='l';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcout<s + q)&&(z + s < q))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (p = 5;p >= 1;p--)/*??????*/\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z == p) cout <<'z'<<' '<<10*z <s+q&&z+s0;i--)\n {\n if(Z==i)cout<<\"z \"<b[1]+b[2]&&b[0]+b[2]0;i--)\n\t\t\t\t\t\t for(int j=0;j<4;j++)\n\t\t\t\t\t\t\t if(b[j]==i)\n\t\t\t\t\t\t\t\t cout<(s+q))+(q>(z+s))==3)\n if((z!=q)&&(q!=s)&&(s!=l)&&(q!=s)&&(s!=l)&&(q!=l))\n \n \n for(i=5;i>=1;i--)\n \n {if(s==i)cout<<\"s\"<<' '<<10*s< weis + weiq) && (weiz + weis < weiq))\n\t\t\t\t\t{\n\t\t\t\t\t\twei[0] = weiz;\n\t\t\t\t\t\twei[1] = weiq;\n\t\t\t\t\t\twei[2] = weis;\n\t\t\t\t\t\twei[3] = weil;\n\t\t\t\t\t}\n\tfor (i = 0; i < 4; i++)\n\t\tif (wei[i] == 50)\n\t\t{\n\t\t\tcout << name[i] << ' ' << \"50\" << endl;\n\t\t\twei[i] = 0;\n\t\t}\n\tfor (i = 0; i < 4; i++)\n\t\tif (wei[i] == 40)\n\t\t{\n\t\t\tcout << name[i] << ' ' << \"40\" << endl;\n\t\t\twei[i] = 0;\n\t\t}\n\tfor (i = 0; i < 4; i++)\n\t\tif (wei[i] == 30)\n\t\t{\n\t\t\tcout << name[i] << ' ' << \"30\" << endl;\n\t\t\twei[i] = 0;\n\t\t}\n\tfor (i = 0; i < 4; i++)\n\t\tif (wei[i] == 20)\n\t\t{\n\t\t\tcout << name[i] << ' ' << \"20\" << endl;\n\t\t\twei[i] = 0;\n\t\t}\n\tfor (i = 0; i < 4; i++)\n\t\tif (wei[i] == 10)\n\t\t\tcout << name[i] << ' ' << \"10\" << endl;\n\treturn 0;\n}\n"} +{"label": "78", "index": "38950", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor(z = 1; z <= 5; z++)\n\t\tfor(q = 1; q <= 5; q++)\n\t\t\tfor(s = 1; s <= 5; s++)\n\t\t\t\tfor(l = 1; l <= 5; l++)\n\t\t\t\t{\n\t\t\t\t\tif(z + q == s + l)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(z + l > q + s)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(z + s < q)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tz = z * 10;\n\t\t\t\t\t\t\t\tl = l * 10;\n\t\t\t\t\t\t\t\tq = q * 10;\n\t\t\t\t\t\t\t\ts = s * 10;\n if((z > q)&&(z > s)&&(z > l))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif((q > s)&&(q > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"q \" << q << endl << \"s \" << s << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"q \" << q << endl << \"l \" << l << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((s > q)&&(s > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(q > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"s \" << s << endl << \"q \" << q << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"s \" << s << endl << \"l \" << l << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((l > s)&&(l > q))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > q)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"l \" << l << endl << \"s \" << s << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"z \" << z << endl << \"l \" << l << endl << \"q \" << q << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif((q > z)&&(q > s)&&(q > l))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif((z > s)&&(z > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q << endl << \"z \" << z << endl << \"s \" << s << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q << endl << \"z \" << z << endl << \"l \" << l << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((s > z)&&(s > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(z > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q << endl << \"s \" << s << endl << \"z \" << z << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \" << q << endl << \"s \" << s << endl << \"l \" << l << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((l > s)&&(l > z))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > z)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \"<< q<< endl << \"l \" << l << endl << \"s \" << s << endl << \"z \"<< z;\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\tcout << \"q \"<< q<< endl << \"l \" << l << endl << \"z \" << z << endl << \"s \" << s;\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n if((s> q)&&(s> z)&&(s > l))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif((q > z)&&(q > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"q \" << q << endl << \"s \" << s << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \"<< s << endl << \"q \" << q << endl << \"l \" << l << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((z > q)&&(z > l))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(q > l)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"z \" << z << endl << \"q \" << q << endl << \"l \" << l;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"z \" << z << endl << \"l \" << l << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((l > z)&&(l > q))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > q)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"l \" << l << endl << \"z \" << z << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"s \" << s << endl << \"l \" << l << endl << \"q \" << q << endl << \"z \" << z;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n if((l > q)&&(l > s)&&(l > z))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif((q > s)&&(q > z))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > z)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl << \"s \" << s << endl << \"z \" << z;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"q \" << q << endl << \"z \" << z << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((s > q)&&(s > z))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(q > z)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"s \" << s << endl << \"q \" << q << endl << \"z \" << z;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"s \" << s << endl << \"z \" << z << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif((z > s)&&(z > q))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(s > q)\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"z \" << z << endl << \"s \" << s << endl << \"q \" << q;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tcout << \"l \" << l << endl << \"z \" << z << endl << \"q \" << q << endl << \"s \" << s;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n return 0;\n}"} +{"label": "78", "index": "38951", "code": "struct student\n\t{\n\t\tint weigh;\n\t};\nint main()\n{\n\n\tint a=0,b=0,c=0,d=0;\n\tstruct student zhao,qian,sun,li;\n\tzhao.weigh=a;\n\tqian.weigh=b;\n\tsun.weigh=c;\n\tli.weigh=d;\n\tfor(a=10;a<=50;a=a+10)\n\t\tfor(b=10;b<=50;b=b+10)\n\t\t\tfor(c=10;c<=50;c=c+10)\n\t\t\t\tfor(d=10;d<=50;d=d+10)\n\t\t\t\t{\n\t\t\t\t\tif(a!=b&&a!=c&&a!=d&&b!=c&&b!=d&&c!=d)\n\t\t\t\t\t\tif(a+d>c+b)\n\t\t\t\t\t\t\tif(a+c0&&ren[4]<=5&&(ren[1]+ren[4])>(ren[2]+ren[3])&&(ren[1]+ren[3])=1;i--)\n\t\t\t\t\t\tfor(ren[0]=1;ren[0]<=4;ren[0]++)\n\t\t\t\t\t\t\tif (ren[ren[0]]==i) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout<(b+c)&&(a+c)s+q&&c (b + c) && (a + c) < b)//???????????????????????????n?\n\t\t\t\t\t{\n\t\t\t\t\t\tn[0] = a;\n\t\t\t\t\t\tn[1] = b;\n\t\t\t\t\t\tn[2] = c;\n\t\t\t\t\t\tn[3] = d;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tfor (i = 0; i <= 2; i++)//??????????\n\t{\n\t\tfor (j = 0; j <= 2 - i; j++)//????\n\t\t{\n\t\t\tif (n[j] < n[j + 1])//????????????????????????m???????????????????\n\t\t\t{\n\t\t\t\tp = n[j];\n\t\t\t\tn[j] = n[j + 1];\n\t\t\t\tn[j + 1] = p;\n\t\t\t\tk = m[j];\n\t\t\t\tm[j] = m[j + 1];\n\t\t\t\tm[j + 1] = k;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i = 0; i < 4; i++)//????????????????????????????\n\t\tcout << m[i] << \" \" << n[i] << endl;\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "78", "index": "38956", "code": "int main()\n{\n\tint weight[10],a[10];\n\tint i,j,k,l;\n\tfor(i=1;i<=5;i++)\n\t{\n\t\tweight[1]=10*i;\n\t\tfor(j=1;j<=5;j++)\n\t\t{\n\t\t\tif(j!=i)\n\t\t\t\tweight[2]=j*10;\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tfor(k=1;k<=5;k++)\n\t\t\t{\n\t\t\t\tif((k!=i)&&(k!=j))\n\t\t\t\t\tweight[3]=10*k;\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t\tfor(l=1;l<=5;l++)\n\t\t\t\t{\n\t\t\t\t\tif((l!=i)&&(l!=j)&&(l!=k))\n\t\t\t\t\t\tweight[4]=10*l;\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t \tif((weight[1]+weight[2]==weight[3]+weight[4])&&(weight[1]+weight[4]>weight[2]+weight[3])&&(weight[1]+weight[3] ( b + c ) ) &&\n\t\t ( ( a + c ) < b ) ) \n\t\t\t\t\t{\n\t\t\t\t\t\t p[1] = a; //?????????????\n\t\t\t\t\t\t p[2] = b;\n\t\t\t\t\t\t p[3] = c;\n\t\t\t\t\t\t p[4] = d;\n\t\t\t\t\t\t break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} \n\tm[1] = 'z'; //???????\n\tm[2] = 'q';\n\tm[3] = 's';\n\tm[4] = 'l';\n\tfor ( j = 1; j <= 3; j++ ) //??????????\n\t{\n\t\tfor ( i = 1; i <= 4 - j; i++ )\n\t\t{\n\t\t\tif ( p[i] < p[i+1] )\n\t\t\t{\n\t\t\t\tk = p[i];\n\t\t\t\tp[i] = p[i+1];\n\t\t\t\tp[i+1] = k;\n\t\t\t\tn = m[i];\n\t\t\t\tm[i] = m[i+1];\n\t\t\t\tm[i+1] = n;\n\t\t\t}\n\t\t}\n\t}\n\tcout << m[1] << \" \" << p[1] << endl; //????????????\n cout << m[2] << \" \" << p[2] << endl;\n\tcout << m[3] << \" \" << p[3] << endl;\n cout << m[4] << \" \" << p[4] << endl;\n\treturn 0;\n}"} +{"label": "78", "index": "38958", "code": "int main()\n{\n\tint a[4], g = 0, i, max = 0, temp, max1 = 0, max2 = 0, max3 = 0;\t\t\t\t\t\t\t\t\t\t\t\t//a[0] == z a[1] == q a[2] == s a[3] == l\n\tchar b[4] = {'z', 'q', 's', 'l'};\n\tfor (a[0] = 10; a[0] <= 50; a[0] += 10)\n\t{\n\t\tfor (a[1] = 10; a[1] <= 50; a[1] += 10)\n\t\t{\n\t\t\tfor (a[2] = 10; a[2] <= 50; a[2] += 10)\n\t\t\t{\n\t\t\t\tfor (a[3] = 10; a[3] <= 50; a[3] += 10)\n\t\t\t\t{\n\t\t\t\t\tif (a[0] != a[1] && a[0] != a[2] && a[0] != a[3] && a[1] !=a[2] && a[1] != a[3] && a[2] != a[3]\n\t\t\t\t\t\t&& (a[0] + a[1] == a[2] + a[3]) && (a[0] + a[3] > a[1] + a[2]) && (a[0] + a[2] < a[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tg = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (g == 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (g == 1)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (g == 1)\n\t\t\tbreak;\n\t}\n\tfor (i = 0; i < 4; i ++)\n\t{\n\t\tif (a[i] > max)\n\t\t{\n\t\t\tmax = a[i];\n\t\t\ttemp = i;\n\t\t}\n\t}\n\tcout << b[temp] << \" \" << max << endl;\n\tfor (i = 0; i < 4; i ++)\n\t{\n\t\tif (a[i] == max)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif (a[i] > max1)\n\t\t{\n\t\t\tmax1 = a[i];\n\t\t\ttemp = i;\n\t\t}\n\t}\n\tcout << b[temp] << \" \" << max1 << endl;\n\tfor (i = 0; i < 4; i ++)\n\t{\n\t\tif (a[i] == max || a[i] == max1)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif (a[i] > max2)\n\t\t{\n\t\t\tmax2 = a[i];\n\t\t\ttemp = i;\n\t\t}\n\t}\n\tcout << b[temp] << \" \" << max2 << endl;\n\tfor (i = 0; i < 4; i ++)\n\t{\n\t\tif (a[i] == max || a[i] == max1 || a[i] == max2)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif (a[i] > max3)\n\t\t{\n\t\t\tmax3 = a[i];\n\t\t\ttemp = i;\n\t\t}\n\t}\n\tcout << b[temp] << \" \" << max3 << endl;\n\treturn 0;\t\t\t\n}"} +{"label": "78", "index": "38959", "code": "/*\n * 32.cpp\n *\n * Created on: 2012-10-18\n * Author: zhuyongfu\n */\n\n\nint main(){\n\tint z,q,s,l;//????\n\tfor(z = 1;z <= 5;z++)//????\n\t{\n\t\tfor(q = 1;q <= 5;q++)//????\n\t\t{\n\t\t\tfor(s = 1;s <= 5;s++)//????\n\t\t\t{\n\t\t\t\tfor(l = 1;l <= 5;l++)//????\n\t\t\t\t{\n\t\t\t\t\tif((z + q == s + l)&&(z + l > s + q)&&(z + s < q))//?????????\n\t\t\t\t\t\tcout << 'l' << ' ' << l * 10 << '\\n' << 'q' << ' ' << q * 10 << '\\n' << 'z' << ' ' << z * 10 << '\\n' << 's' << ' ' << s * 10;//?????\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "78", "index": "38960", "code": "int main()\n{\n\tint z,q,s,l;\n\tfor(z=10;z<=50;z=z+10)\n\t{\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tif(z==q)\n\t\t\t\tcontinue;\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tif(z==s||z==q||z==q)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif(z==s||z==q||z==l||q==s||q==l||s==l)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif((z+q==s+l)&&(z+l>s+q)&&(z+ss+q&&z+sz)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tcout<<'l'<<' '<q)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<'l'<<' '<s+q)&&(z+ss) cout<<'z'<<\" \"<l)&&(z>s)) {//???????\n \t cout<<'z'<<\" \"<s) cout<<'l'<<\" \"<z)&&(l>s)) {//???????\n \t cout<<'l'<<\" \"<s) cout<<'z'<<\" \"<z)&&(s>l)) {//???????\n \t cout<<'s'<<\" \"<l) cout<<'z'<<\" \"<(sun+qian))&&((zhao+sun) 0; i--)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(weight[i] != ' ')\n\t\t\t\t\t\t\t\t\t\t\tcout<(s+q));\n\t\t\t\t\t\tC=((z+s)s+q)+(z+s(b+c) && (a+c)s+q-l && z0;i--)\n\t{\n\t\tif(z==i) cout<<\"z \"<<10*i<0&&l<6&&l!=z&&l!=q&&l!=s)\n\t\t\t\t\tif(z+l>s+q)\n\t\t\t\t\t\tif(z+s 0; j--)\n\tfor (k = 1; k < j; k++)\n\t{\n\tif(a[k] > a[k - 1])\n\t {\n\t\tt = a[k];\n\t\ta[k] = a[k - 1];\n\t\ta[k - 1] = t;\n\t }\n\t}\nreturn (a[i - 1]);\n}\nint fout( int z, int q, int s, int l, int sum)\n{\nif(sum == z) cout << \"z\";\nif(sum == q) cout << \"q\";\nif(sum == s) cout << \"s\";\nif(sum == l) cout << \"l\";\nreturn 0;\n}\nint main()\n{\nint z, q, s, l, i, sum;\nfor(z = 10; z < 60; z += 10)\nfor(q = 10; q < 60; q += 10)\n\tfor(s = 10; s < 60; s += 10)\n\t\t\tfor(l = 10; l < 60; l += 10)\n\t\t\tif( (z - q) * (z - s) * (z - l) * (q - s) * (q - l) * (s - l) != 0\n\t\t\t && z + q == s + l\n\t\t\t\t&& z + l > s + q\n\t\t\t\t&& z + s < q )\n{\nfor(i = 1; i <= 4; i++)\n { \n\t sum = compare(z, q, s, l, i);\n\t fout(z, q, s, l, sum);\n\t cout << \" \" << sum <s+q)&&(z+s)tz[1]+tz[2] && tz[0]+tz[2]ms+mq))\n {\n for(int i = 5 ; i >=1 ; i--)\n {\n if(mz==i)\n cout<<\"z \"<s+q)&&(z+s max){\n\t\t\t\tmax = a[i];\n\t\t\t\tflag = i;\n\t\t\t}\n\t\t}\n\t\ta[flag] = - 1;\n\t\tif(max == z) printf(\"z %d\\n\",z);\n\t\tif(max == q) printf(\"q %d\\n\",q);\n\t\tif(max == s) printf(\"s %d\\n\",s);\n\t\tif(max == l) printf(\"l %d\\n\",l);\n\t}\n}\n\t\t\t\n\t\t\nint main()\n{\n\tfor(z = 10;z <= 50;z = z + 10)\n\t\tfor(q = 10;q <= 50;q = q + 10)\n\t\t\tfor(s = 10;s <= 50;s = s + 10)\n\t\t\t\tfor(l = 10;l <= 50;l = l + 10)\n\t\t\t\t\tif(z + q == s + l && z + l > s + q && z + s < q){\n\t\t\t\t\t\ta[1] = z;\n\t\t\t\t\t\ta[2] = q;\n\t\t\t\t\t\ta[3] = s;\n\t\t\t\t\t\ta[4] = l;\n\t\t\t\t\t\tprint();\n\t\t\t\t\t}\n\treturn 0 ;\n}\n "} +{"label": "78", "index": "38975", "code": "//\n// main.cpp\n// poj\n//\n// Created by ChuPan,Wong on 9/27/13.\n// Copyright (c) 2013 ChuPan,Wong. All rights reserved.\n//\n\n\nint main(int argc, const char * argv[])\n{\n // manual computation shows that there is only one solution for this question\n cout<<\"l 50\"<(s+q) && (z+s)=1;k--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (z==k)\n\t\t\t\t\t\t\t\tcout<<\"z\"<<\" \"<<10*z<ws+wq&&wz+ws(wei[2]+wei[3]) && (wei[1]+wei[3]max&&a[i]==0)\n max=wei[i];\n }\n \n if (max==wei[1])\n {cout<<\"z\"<<\" \"<(wei[2]+wei[1]); //???????\n\t\t\t\t\tx[2]=(wei[0]+wei[2])a[1]+a[2]&&a[0]+a[2]a[1]+a[2]&&a[0]+a[2]a[1]+a[2]&&a[0]+a[2]a[1]+a[2]&&a[0]+a[2]b+c) && (a+cmax)\n\t\t\t{\n\t\t\t\tmax=a;\n\t\t\t}\n\t\t\tif (b>max)\n\t\t\t{\n\t\t\t\tmax=b;\n\n\t\t\t}\n\t\t\tif (c>max)\n\t\t\t{\n\t\t\t\tmax=c;\n\n\t\t\t}\n\t\t\tif (d>max)\n\t\t\t{\n\t\t\t\tmax=d;\n\n\t\t\t}\n\t\t\tif (a==max)\n\t\t\t{\n\t\t\t\tcout<<\"z \"< b + c && a + c < b)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (b > d && b > c && c > a)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<'q'<<\" \"<<10 * b< b && b > a && a > c)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<'l'<<\" \"<<10 * d<= q + s);\n\t\t\t\t\tcc3 = (z +s < q);\n\t\t\t\t\tif(cc0&&cc1&&cc2&&cc3 == 1) //????????\n\t\t\t\t\t{\n\t\t\t\t\t\tint weight[4] ={z,q,s,l}; //?????????????\n\t\t\t\t\t\tchar a,person[4]={'z','q','s','l'}; //????????????????\n\t\t\t\t\t\tfor(i = 0;i<=2;i++) //?????????\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(j = 0;j<=2-i;j++) //????\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(weight[j](q+s))&&((z+s)s+q&&z+sa[m]) m=j;\n\t\t\t\t\t\t\tt=a[i];a[i]=a[m];a[m]=t;\n\t\t\t\t\t\t\ttc=c[i];c[i]=c[m];c[m]=tc;\n\t\t\t\t\t\t\tcout<s+q)+(z+sw+e)&&(q+e=1;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(q==i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"z %d\\n\",10*q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(w==i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"q %d\\n\",10*w);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(e==i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"s %d\\n\",10*e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(r==i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tprintf(\"l %d\\n\",10*r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38989", "code": "main()\n{\n char z,q,s,l;\n printf(\"%c %d\\n%c %d\\n%c %d\\n%c %d\\n\",'l',50,'q',40,'z',20,'s',10);\n getchar();\n getchar(); \n}\n"} +{"label": "78", "index": "38990", "code": "int main()\n{\n\tint z,q,s,l,rank[51],i;\n\tchar word[51];\n\tfor(i=0;i<=50;i++)\n\t{\n\t\trank[i]=0;\n\t}\n\tfor(z=10;z<=50;z=z+10)\n\t{\n\t\tfor(q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tfor(s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tfor(l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif(((z+q)==(s+l))&&((z+l)>(s+q))&& ((z+s)=0;i--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(rank[i]!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout << word[i] << \" \" << rank[i] << endl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "78", "index": "38991", "code": "//???\nint main()\n{\n\tint z,q,s,l;\n\tfor (z=10;z<=50;z=z+10)//??????\n\t{\n\t\tfor (q=10;q<=50;q=q+10)\n\t\t{\n\t\t\tif (q==z)\n\t\t\t\tcontinue;\n\t\t\tfor (s=10;s<=50;s=s+10)\n\t\t\t{\n\t\t\t\tif (s==z||s==q)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (l=10;l<=50;l=l+10)\n\t\t\t\t{\n\t\t\t\t\tif (l==z||l==q||l==s)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif ((z+q==s+l)&&(z+l>s+q)&&(z+s(s+q);\n\t\t\t\t\tc=(z+s)s+q)&&(z+s=1;n--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx=n*10;\n\t\t\t\t\t\t\tif(z==x)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcout<<\"z \"<(a[3]+a[2]))&&((a[1]+a[3])(a[3]+a[2]))&&((a[1]+a[3])(a[3]+a[2]))&&((a[1]+a[3])(a[3]+a[2]))&&((a[1]+a[3])s+q)+(z+ss)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcout<<\"l\"<<\" \"<s+q&&z+ss+q&&z+ss+q)&&(s+z0)\n\t\t{\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t\ta[i]=0;\n\t\t\tfor(j=1;k>1;)\n\t\t\t{\n\t\t\t\tfor(i=1;i<=n&&k>1;i++)\n\t\t\t\t{\n\t\t\t\t\tif(!a[i]&&j!=m)\n\t\t\t\t\t\tj++;\n\t\t\t\t\telse if(!a[i]&&j==m)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[i]=1;\n\t\t\t\t\t\tj=1;\n\t\t\t\t\t\tk--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t\tif(!a[i])\n\t\t\t\t\tprintf(\"%d\\n\",i);\n\t\t}\n\t\telse\n\t\t\tbreak;\n\t}\n}\n"} +{"label": "79", "index": "39002", "code": "void main()\n{ \n\tint i,j,t,k,m,n,num[500],*p;\n\tfor(i=0;i<100;i++)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0) break;\n\t\telse\n\t\t{\n\t\t\tp=num;\n\t\t\tfor(j=0;j1){\n\t\twhile (m>n){\n\t\t\tm=m-n;\n\t\t}\n\t for (i=m;ia=1;\n\t\thead=p1;\n\t\tfor(j=2;j<=n;j++)\n\t\t{\n\t\t\tp2=(struct node*)malloc(sizeof(struct node));\n\t\t\tp2->a=j;\n\t\t\tp1->next=p2;\n\t\t\tp1=p2;\n\t\t}\n\t\tp1->next=head;\n\t\twhile(head->next!=head)\n\t\t{\n\t\t\tfor(i=1;inext;\n\t\t\t}\n\t\t\tp1->next=head->next;\n\t\t\thead=head->next;\n\t\t}\n\t\tprintf(\"%d\\n\",head->a);\n\t}\n}"} +{"label": "79", "index": "39006", "code": "\n\nint main()\n{\n\tint n,m,i,j,a[301],x;\n\twhile(cin>>n>>m,(n!=0)&&(m!=0))//????????//\n\t{\n\t\ta[0]=0;\n\t\tfor(i=1;i<=n;i++)//???????????????1//\n\t\t\ta[i]=1;\n\t\tfor(x=1,i=0;in)\n\t\t\t\t\tx=x%n;//??x??n//\n\t\t\t\tif(a[x]==1)\n\t\t\t\t\tj++;//???????1???j?1.j??????????????m?????????//\n\t\t\t}\n\t\t\ta[x-1]=0;//????????//\n\t\t}\n\t\tfor(i=1;i<=n;i++)\n\t\t\tif(a[i]==1)\n\t\t\t\tcout<n[l]){\n j=0;\n }\n if(a[j]==1){\n k++;\n }\n }\n a[j]=0;\n }\n for(i=1;i<=n[l];i++){\n if(a[i]==1){\n printf(\"%d\\n\",i);\n break;\n }\n }\n }\n return 0;\n}"} +{"label": "79", "index": "39008", "code": "\nvoid main()\n{\n\tint n, m;\n\tint i, j, k;\n\tint num;\n\tint a[500];\n\n\tscanf(\"%d%d\", &n, &m);\n\twhile((n > 0) && (m > 0))\n\t{\n\t\tfor(i = 1; i <= n; i++)\n\t\t\ta[i] = 0;\n\t\tnum = 0;\n\t\tfor(i = 1; i < n; i++)\n\t\t{\n\t\t\tfor(j = 1; j <= m; j++)\n\t\t\t{\n\t\t\t\tnum = num % n + 1;\n\t\t\t\twhile(a[num] == 1)\n\t\t\t\t\tnum = num % n + 1;\n\t\t\t}\n\t\t\ta[num] = 1;\n\t\t}\n\t\tfor(i = 1; i <= n; i++)\n\t\t\tif(a[i] == 0)\n\t\t\t\tprintf(\"%d\\n\", i);\n\t\tscanf(\"%d%d\", &n, &m);\n\t}\n}"} +{"label": "79", "index": "39009", "code": "\nint main()\n{\n int i,j,k,n,c,d,m;\n int a[100][2],b[300][2];\n i=0;\n j=0;\n k=0;\n n=0;\n d=0;\n c=0;\n m=1;\n do {\n scanf(\"%d%d\",&a[i][0],&a[i][1]); \n i++;\n } \n while (a[i-1][0]!=0&&a[i-1][1]!=0);\n \n for(j=0;j0)&&(n>0)){\n scanf(\"%d%d\",&m,&n);\n if((m>0)&&(n>0)){\n printf(\"%d\\n\",f(n,m)+1);\n }\n }\n return 0;\n}\n\n\n"} +{"label": "79", "index": "39011", "code": "void main()\n{\n\tint n[100],m[100],p=1,i,j,k=0,s,t;\n\tint a[300];\n\tdo\n\t{\n\t\tscanf(\"%d%d\",&n[p],&m[p]);\n\t\tp++;\n\t}while(n[p-1]!=0&&m[p-1]!=0);\n for(i=1;i1)\n\t\t\t\t continue;\n\t\t\t\telse\n\t\t\t\t break; \n\t\t\t}\n\t\t\tif(j==n[i])\n\t\t\t j=0;\n\t\t}\n\t\tfor(j=1;a[j]==0;)\n\t\t\tj++;\n\t\tprintf(\"%d\\n\",j);\n\t}\n}"} +{"label": "79", "index": "39012", "code": "struct moncky\n{\n\tint seq;\n\tstruct moncky *next;\n};\nstruct monckycircle\n{\n\tint allnumber;\n\tstruct moncky *curp;\n};\nstruct monckycircle *creat(int);\nvoid cry_123(struct monckycircle *,int);\n\nint main()\n{\n\tint n_all,n_unlucky;\n\tstruct monckycircle *circlename;\n\tscanf(\"%d%d\",&n_all,&n_unlucky);\n\twhile(n_all)\n\t{\n\t\tif(n_unlucky==1)\n\t\t\tprintf(\"%d\\n\",n_all);\n\t\telse\n\t\t{\n\t\t\tcirclename=creat(n_all);\t\n\t\t\twhile(circlename->allnumber!=0)\n\t\t\t\tcry_123(circlename,n_unlucky);\n\t\t\tprintf(\"%d\\n\",circlename->curp->seq);\n\t\t\t\n\t\t}\n\t\tscanf(\"%d%d\",&n_all,&n_unlucky);\n\t}\n\treturn 0;\n}\nstruct monckycircle *creat(int allnum)\n{\n\tint i=1;\n\tstruct monckycircle *p;\n\tstruct moncky *head,*now;\n\tp=(struct monckycircle *)malloc(sizeof(struct monckycircle));\n\tnow=head=(struct moncky *)malloc(sizeof(struct moncky));\n\tp->allnumber=allnum;\n\tp->curp=head;\n\twhile(iseq=i;\n\t\tnow->next=(struct moncky *)malloc(sizeof(struct moncky));\n\t\tnow=now->next;\n\t\ti++;\n\t}\n\tnow->seq=i;\n\tnow->next=head;\n\treturn p;\n}\nvoid cry_123(struct monckycircle *circlename,int unlucky)\n{\n\tint i=1;\n\tstruct moncky *p,*aux;\n\tp=circlename->curp;\n\tfor(i=1;i!=unlucky;i++)\n\t\tp=(i==1?p:p->next);\n\taux=p->next->next;\n\t\n\tp->next=aux;\n\tcirclename->allnumber--;\n\tcirclename->curp=p->next;\n}\n\n\n\n\n"} +{"label": "79", "index": "39013", "code": "\nint main()\n{int a[300],m[20],n[20],i,j,k,p,q,b,c,x[300],y,e;\nfor(k=0;;k++)\n\t{scanf(\"%d %d\",&n[k],&m[k]);\nif(m[k]==0)break;}\nfor(i=0;i1;n[i]--)\n{p=m[i]%n[i];\nc=n[i]-p;\nfor(y=0,b=0;bx-p-1){xinxulie[y]=yuanxulie[y+p-x];}\n }\n for(y=0;y1)\n\t\t{\n\t\t\trou=0;\n\t\t\twhile (roun[i]) cur-=n[i];\n\t\t\t\t}\n\t\t\t\twhile (a[cur]==0);\n\t\t\t}\n\t\t\ta[cur]=0;\n\t\t\trem--;\n\t\t}\n\t\tfor (j=1;j<=n[i];j++)\n\t\tif (a[j]==1) \n\t\t{\n\t\t\tprintf(\"%d\\n\",j);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39017", "code": "int main(){\n\tint a[max],n,m,i,x,y;\n\twhile(1){\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif (n==0)\n\t\t\tbreak;\n\t\tfor (i=0;i>n >>m)\n\t{\n\t\tint t=1,count=0,x=0;\n\t\tif (m==0&&n==0) continue;\n\tfor(i=1;i<=n;i++)\n\t a[i]=i;\n\twhile(count<=n-1)\n\t{\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(a[i]!=0)\n\t\t{\n\t\t\tif(t%m==0)\n\t\t\t{a[i]=0;\n\t\t\tx=i;\n\t\t\tcount++;}\n\t\t\tt++;\n\t\t}\n\t}\n\t}\n\tcout <1)\n {\n for(k=0;k<=p-1;k++)\n {\n a[k]=k+1;\n }\n for(l=0;;l++)\n {\n t=(q+t-1)%(p-count);\n for(i=t;i<=p-count-2;i++)\n {\n a[i]=a[i+1];\n }\n count++;\n if(count==p-1)\n {\n break;\n }\n }\n printf(\"%d\\n\",a[0]);\n t=0;\n count=0;\n }\n }\n}\n"} +{"label": "79", "index": "39022", "code": "int main()\n{\n\tint a[300];\n\tint i,j,k,m,n;\n\tint nbegin,ncounted;\n\twhile(m!=0&&n!=0)\n\t{\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tfor(i=0;ii=t;\n\t\tp1=(struct mon *)malloc(sizeof(struct mon));\n\t\tp2->next=p1;\n\t\tp2=p1;\n\t}\n\tp1->i=t;\n\tp1->next=head;\n\treturn head;\n}\nint find(struct mon *head,int m)\n{\n\tstruct mon *p1=head,*p2=head;\n\tint i=1;\n\tfor(p1=p2=head;;i++)\n\t{\n\t\tif(m==1)\n\t\t\treturn n;\n\t\tif(i%m!=0)\n\t\t{\n\t\t\tp2=p1;\n\t\t\tp1=p1->next;\n\t\t}\n\t\telse if(i%m==0)\n\t\t{\n\t\t\tp2->next=p1->next;\n\t\t\tp1=p1->next;\n\t\t}\n\t\tif(p1==p1->next)\n\t\t\treturn p1->i;\n\t}\n}\nvoid main()\n{\n\tstruct mon *head;\n\tscanf(\"%d%d\",&n,&m);\n\twhile(n!=0&&m!=0)\n\t{\n\t\thead=creat(n);\n\t\tprintf(\"%d\\n\",find(head,m));\n\t\tscanf(\"%d%d\",&n,&m);\n\t}\n}\n\n"} +{"label": "79", "index": "39025", "code": "int main()\n{\nint n[100],m[100],i,j,s[100];\nfor(i=1;n[i-1]!=0,m[i-1]!=0;i++){\n scanf(\"%d %d\", &(n[i]),&(m[i]));\n}\nfor(i=1;n[i-1]!=0,m[i-1]!=0;i++){\n\ts[i]=0;\n\tfor(j=2;j<=n[i];j++) {\n\t\ts[i]=(s[i]+m[i])%j;\n\t}\n\tif(n[i]!=0,m[i]!=0){\n printf(\"%d\\n\", s[i]+1);\n\t}\n}\nreturn 0;\n}\n"} +{"label": "79", "index": "39026", "code": "int main()\n{\n int n,m;\n int i,k=1,p=0,a[1000];\n for(;;)\n { \n scanf(\"%d %d\",&n,&m);\n if(m==0&&n==0) break;\n memset( a , 0 , sizeof(a));\n k=1,p=0;\n for(i=1;;i++)\n {\n if(i>n) i=i%n;\n if(p==n-1) break;\n if(a[i]==1) continue;\n \n if(k==m)\n {\n a[i]=1;\n p++; \n k=1;\n }\n else k++;\n //printf(\"%d %d %d\\n\",a[1],a[2],a[3]);\n }\n for(i=1;i<=n;i++)\n {\n if(a[i]==0)\n {\n printf(\"%d\\n\",i);\n \n break;\n }\n }\n }\n return 0;\n}\n"} +{"label": "79", "index": "39027", "code": "int main()\n{\n\tint a[300]={0},n[300],m[300],i,j,b,k=0,x=0,y=0;\n\tfor(i=0;;i++)\n\t{\n\t\tk=k+1;\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\t\tif(n[i]==0&&m[i]==0)break;\n\t}\n\tfor(b=0,x=0,y=0;;b++)\n\t{\n\t\tx=0;\n\t\tfor(i=0;;i++)\n\t\t{\n\t\t\tif(a[i]==0)\t\n\t\t\t{\n\t\t\t\tx=x+1;\n\t\t\t\tif(x==m[b]){a[i]=1;x=0;}\n\t\t\t}\n\t\t\tif(i==n[b]-1)i=-1;\n\t\t\tfor(j=0,y=0;j=1;j--)\n {\n for(i=0;i<=j-2;i++)\n {\n b[i]=a[(m%j+i)%j];\n\n }\n for(i=0;i<=n-2;i++)\n {\n a[i]=b[i];\n }\n\n\n }\n printf(\"%d\\n\",a[0]);\n }\n }\n}\n"} +{"label": "79", "index": "39030", "code": "int main()\n{\n int m[30000],n[300],i,k,s[3000],j;\n i=0;\n do\n {\n i++;\n scanf(\"%d %d\",&n[i],&m[i]);\n \n }\n while(n[i]!=0&&m[i]!=0);\n for(k=1;k0&&n>0){\n j++;\n\tfor(i=1;i<=n;i++){\n monkeys[i]=1;\n } \n number=0;\n count=0;\n del=0;\n while(deln){\n number=1;\n }\n if(monkeys[number]==1){\n count++;\n }\n if(count==m){\n monkeys[number]=0;\n del++;\n count=0;\n }\n }\n number=1;\n while(1){\n if(monkeys[number]==1){\n break;\n }\n number++;\n }\n result[j]=number;\n scanf(\"%d%d\",&n,&m);\n }\n for(i=1;i<=j;i++){\n printf(\"%d\\n\",result[i]);\n }\n return 0;\n}"} +{"label": "79", "index": "39032", "code": "\nstatic struct str \n{\n int num;\n struct str *next;\n}s1[301],s2[301],*p1,*p2;//?0?8?0?5?0?8?0?2?0?7?0?3?0?3?0?7?0?2?0?9301 ?0?5?0?6?0?6?0?2 ?0?3\u00b7?0?4?0?2?0?9?0?7\u00b1\u00ed\n\nint chq(int n,int k)\n\t{\n\t int i,j;\n\t if (n==1)\n\t {\n\t return 1;\n\t }\n\t if (k==1)\n\t {\n\t return n;\n\t }\n\t for (i=1;i<=n-1;i++)\n\t {\n\t for(j=1;j<=k;j++)\n\t\t\t {\n\t\t\t p2=p1;p1=p1->next;\n\t\t\t }\t\t\n\t\t p2->next=p1->next;\n\t\t p1=p2;\n\t }\n\t return (p1->num);\n\n\t}\nint main()\n\t{\n\tint i,j,n,m,e;\n\t for (i=0;i<=300;i++)\n\t {\n\t s1[i].num=i;\n\t\ts1[i].next=&s2[i+1];\n\t }\n\t while (1)\n\t {\n\t scanf(\"%d%d\",&n,&m);\n\t if (n==0&&m==0)\n\t {\n\t break;\n\t }\n\t for (j=0;j<=n;j++)\n\t\t {\n\t\t s2[j]=s1[j];\n\t\t }\n\t\t s2[n].next=&s2[1];\n\t\t p1=&s2[0];\n\t\t e=chq(n,m);\n\t\t printf(\"%d\\n\",e);\n\t\t \n\t\t\n\t }\n\t \n\t \n\t return 0;\n\t}"} +{"label": "79", "index": "39033", "code": "int main()\n{\n\tint m,n,i,j,k,num,s[300],b[300],q,w;\n\tfor(i=1;;i++)\n\t{\n scanf(\"%d%d\",&s[i],&b[i]);\n\tif(s[i]==0){w=i-1;break;}\n }\n\tint x[w];\n\n for(q=1;q<=w;q++)\n {\n\tint a[s[q]+1];\n\tfor(i=1;i<=s[q];i++)\n\t{\n\t\ta[i]=1;\n }\n\tj=0;\n\tk=0;\nfor(i=1;i<=s[q];i++)\n{\n\tif(a[i]==1)\n\t{\n\t\tj++;\n\t\tif(j==b[q])\n\t\t{\n\t\t\ta[i]=0;\n\t\t\tj=0;\n\t\t\tk++;\n }\n\t\tif(k==s[q])\n\t\t{\n\t\t\tx[q]=i;\n\t\t\tbreak;\n }\n }\n\tif(i==s[q])\n\ti=0;\n}\n\n }\n for(q=1;q<=w;q++)\n {printf(\"%d\\n\",x[q]);\n}\n\n}\n"} +{"label": "79", "index": "39034", "code": "\n\nint main()\n\n{\n\nint n, m, i, s=0,a=1;\nwhile(1)\n{\n\ncin>>n>>m;\nif((n+m)==0)\n break;\nif(n>=2)\n\n{for (i=2; i<=n; i++)\n s=(s+m)%i;\n\n\ncout<n)\n\t\t\t\tp=1;\n\t\t\tif(flag[p]==1)\n\t\t\t{\n\t\t\t\ti--;\n\t\t\t\tp++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(i==m)\n\t\t\t{\n\t\t\t\tflag[p]=1;\n\t\t\t\ti=0;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tp++;\n\t\t\tif(num==n-1)\n\t\t\t{\n\t\t\t\tfor(i=1;i<=n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(flag[i]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tprintf(\"%d\\n\",i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tnum=0;\n\t\tfor(i=0;i<301;i++)\n\t\t\tflag[i]=0;\n\t\ti=0;\n\t\tp=1;\n\t}\n}"} +{"label": "79", "index": "39036", "code": "int function(int n,int m)\n{\n\tint a[1000];\n\tint i,j,k,s;\n for(i=0;i1;s--)\n\t{\n\t\ti=(i+m) % s;\n\t\tk=a[i];\n\t\tfor(j=i+1;j>n>>m && n!=0 && m!=0) \n\t{\n\t\tint k=0,count=n; //?k?????????count???????\n\t\tfor(i=1;i<=n;i++) //????????1,??????\n\t\t{a[i]=1;}\n\t\ti=1; //?????i=1??\n\t\twhile(count!=1) //?count==1??\n\t\t{\n\t\t\tif(a[i]==1) //????????????1\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tif(k%m==0) //??????m?????????????0????-1\n\t\t\t\t{a[i]=0;count--;}\n\t\t\t}\n\n if(i==n) //?????????????????\n\t\t\t{i=1;}\n\t\t\telse //??????????????\n\t\t\t{i++;} \n\t\t\t\n\t\t}\n\t\tfor(i=1;i<=n;i++) //??????????????????????\n\t\t{\n\t\t\tif(a[i]==1)\n\t\t\t\tcout<0;x++)\n scanf(\"%d %d\",&n[x],&m[x]); \n for(y=0;y1;k--)\n {\n p=m[y]%k;\n j=j+p-1;\n if(j>=k)\n j=j%k;\n if(j>0)\n {\n for(i=j;i=2)\n\t{a=m+x;\n\tx=a%n;\n\tif(x==0)\n\tx=n;\n\tfor(z=x;z>n>>m&&n!=0) //??????????????\n\t{\n for (k=1;k<=n;k++) \n\t\t a[k]=1; //??????????1\n\t i=1;\n\t for (j=n;j>1;j--) //j?????????????1???????\n\t {\n\t\t t=0;\n\t while (tn) i=i-n; //?????????\n\t\t\t}\n\t\t\tif (i==1) a[n]=0; \n\t\t else a[i-1]=0; //?m??????\n\t }\n\t for (k=1;k<=n;k++)\n\t\t if (a[k]!=0)\n\t\t {cout<>n>>m;\n\twhile(n!=0)\n\t{\n\tfor(i=2;i<=n;i++)\n\t\t{\n s=(s+m)%i;\n\t}cout<>n>>m;\ns=0;\n}\n}"} +{"label": "79", "index": "39054", "code": "//?????\nint main()\n{\n\tint a[300],n,m,i,j,k,sum;\n\tdo//?????????\n\t{sum=0;\n\tcin>>n>>m; \n\tk=n;//?k??????????\n\tfor (i=0;i1);\n\t}while (n!=0&&m!=0);//?m=0?n=0???\n\treturn 0;\n}\n"} +{"label": "79", "index": "39055", "code": "main()\n{ \n int m,n,j,i,k,c=0;\n int b[1000],a[1000];\n for(c=0;;c++)\n {\n scanf(\"%d %d\",&n,&m);\n if(m==0&&n==0)\n break;\n else if(n==1)\n b[c]=n;\n else\n {\n for(i=0;i<=n-1;i++)\n a[i]=i+1;\n j=0;\n for(i=1;i<=n-1;i++)\n {\n j=(j+m-1)%(n-i+1);\n for(k=0;kn)k=1;\n\t\t\t}while(count=n) s=n-1;\n\t\ta[s]=a[300];\n\t\tif(s==0)\n\t\t{\n\t\t\tfor(j=0;j num = 1;\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tp -> num = i;\n\t\tif (i == n)\n\t\t{\n\t\t\tp -> next = head;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tp -> next = (struct Per*) malloc (LEN);\n\t\t\tp = p -> next;\n\t\t}\n\t}\n\tp = head;\n\t/*\n\tfor (i = 1; i <= n; i ++)\n\t{\n\t\tprintf(\"%d\",p -> num);\n\t\tp = p-> next;\n\t}\n\t*/\n\t\n\twhile (p != p -> next)\n\t{\n\t\tfor (i = 1; i < m; i ++)\n\t\t{\n\t\t\tif (i == (m - 1))\n\t\t\t{\n\t\t\t\tp -> next = p -> next -> next;\n\t\t\t\tp = p -> next;\n\t\t\t}\n\t\t\telse p = p -> next;\n\t\t}\n\t}\n\n\tprintf(\"%d\\n\",p -> num);\n\t}\n\tgetchar();\n\tgetchar();\n\treturn 0;\n}\n"} +{"label": "79", "index": "39059", "code": "int main()\n{\nint n,m,i,a;\nwhile(1)\n{cin>>n;\ncin>>m;\nif(n==0)break;\nelse{a=0;\nif(n>1)\nfor(i=2;i<=n;i++)\na=(a+m)%i;\ncout<<(a+1)<0;)\n\t\t\t{i++;if(i==n+1)i=1;\n\t\t\tif(a[i]==0)\n\t\t\t{s=s+1;\n\t\t\tif(s%m==0)\n\t\t\t{a[i]=-1;t=t-1;}}}\n\t\tprintf(\"%d\\n\",i);}}\n"} +{"label": "79", "index": "39061", "code": "main()\n{\n\tint i,j,k,l,n,m,a[301],s;\n\tfor(;scanf(\"%d %d\",&n,&m)!=EOF;)\n\t{\n\t\tif(n!=0)\n\t\t{\n\t\t\tfor(l=1;l<=300;l++)\n\t\t a[l]=l;\n\t\t\tfor(j=1;j0)\n\t{i=1;\n\t\tj=0;\n\t\tk=0;\n for(l=1;l<=n;l++)\n\t\t\ta[l]=0;\n while(k<(n-1))\n\t\t{\n\t\tj=0;\n\t\twhile(jn)i=1;\n\t\t}\n\t\tif(i==1) a[n]=1;\n\t\telse a[i-1]=1;\n\t\tk++;\n\t\t}\n\t\tfor(l=1;l<=n;l++)\n\t\t\tif(a[l]==0)printf(\"%d\\n\",l);\n\tscanf(\"%d%d\",&n,&m);\t\n\t}\n}"} +{"label": "79", "index": "39066", "code": "int main()\n{\n int a[300],b[300],n,i,num=0,*p,j,m,l;\n for(i=0;;i++)\n {\n\t scanf(\"%d%d\",&a[i],&b[i]);\n num=num+1;\n\t if(a[i]==0&&b[i]==0)\n\t\t break;\n }\n num=num-1;\n for(i=0;i<=num-1;i++)\n {\n\t int c[300];\n\t p=c;\n\t for(j=0;j0;k++){ //????\n f=0; //??????f=0\n for(i=0;i=1)\n\t\t{\n\t\t\tx=(b[i]-1)%a[i]+1;\n\t\t\tfor(m=1;m<=a[i];m++)\n\t\t\t\td[m]=c[m];\n\t\t\tfor(m=1;m<=a[i]-x;m++)\n\t\t\t\tc[m]=d[m+x];\n\t\t\tfor(m=a[i]-x+1;m<=a[i]-1;m++)\n\t\t\t\tc[m]=d[m-a[i]+x];\n\t\t\tif(a[i]==1)\n\t\t\t\tprintf(\"%d\\n\",c[1]);\n\t\t\ta[i]--;\n\t\t}\n\t}\n}"} +{"label": "79", "index": "39072", "code": "int main ()\n{\n\tint n,m,i;\n\twhile(1)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0) break;\n\t\tint a[300];\n\t\tfor(i=0;i=n) j=0;\n\t\t\t}\n\t\t\tif(j==0) a[n-1]=0;\n\t\t\telse a[j-1]=0;\n\t\t}\n\t\tfor(j=0;j>n>>m;\n\twhile(n!=0&&m!=0){\n\t\tmemset(a,0,sizeof(a));\n\t\tint step=0;\n\t\tint flag=0;\n\t\tint i=1;\n\t\twhile(flag>n>>m;\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39077", "code": "int main()\n{\n\tint a[301],m[10000],n[10000],i,j,k,t=0,s,b=0;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d %d\",&n[i],&m[i]);\n\t\tif(n[i]==0 && m[i]==0) break;\n\t\tt=t+1;\n\t}\n\tfor(i=0;i1)\n\t\t{\n\t\t k=0;\n\t while(k!=m[i])\n\t\t\t{\n\t\t\t\ts+=1;\n\t\t\t if(s>n[i]) s-=n[i];\n\t\t\t\tif(a[s]!=0) k+=1;\n\t }\n\t\t\ta[s]=0;\n\t\t\tb-=1;\n\t\t}\n\t\tfor(j=1;j<=n[i];j++)\n\t\t\tif(a[j]!=0) printf(\"%d\\n\",j);\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39078", "code": "int main()\n{\n\tint m,n,k,i,b;\n\tfor(i=0;i<20000;i++){\n\t scanf(\"%d%d\",&n,&m);\t\n\t if(m==0&&n==0)\n\t\t\tbreak;\n\t\telse {\n\t if(n==1)\n\t\t\t printf(\"%d\\n\",n);\n\t\t else{\n\t\t k=0;\n\t\t for(b=2;b<=n;b++){\n\t\t\t k=((m%b)+k)%b;\n\t\t\t }\n\t\t printf(\"%d\\n\",k+1);\n\t\t }\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39079", "code": "int judge(int j,int n) //?judge????????j?n??j?0//\n{ \n if(j==n) j=0; \n return j;\n}\nint choose(int n,int m)\n{ \n\tint i,j=0,k;\n\tint a[301]={0};\n\tfor(k=0;k>N>>m;\n if(N==0&&m==0)break;\n const int n=N;\n int a[n+1];\n memset(a,0,sizeof a);\n for(int i=1;;++i){\n if(i>n) i=i-n;\n if(a[i]==1)continue;\n else{\n ++count;\n //cout<<\"i=\"<n) i=1;\n\t\t}\n\t\tj++;\n\t\tif(j==m)\n\t\t{\t\n\t\t\ta[i]=0;\n\t\t\tj=0;k++;\t\n\t\t}\n\t}\n\treturn i;\n}\nvoid main()\n{\n\tint m,n;\n\tscanf(\"%d %d\",&n,&m);\n\twhile(m!=0||n!=0)\n\t{\n\t\tprintf(\"%d\\n\",choose(n,m));\n\t\tscanf(\"%d %d\",&n,&m);\n\t}\n\n}\n\n"} +{"label": "79", "index": "39082", "code": "int main()\n{\n\tint n,m,i,k,j,s,count=0;\n\tint a[100];\n\tfor(k=0;;k++)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0)\n\t\t\tbreak;\n\t\tfor(s=0,i=2;i<=n;i++)\n\t\t{\n\t\t\ts=(s+m)%i;\n\t\t}\n\t\ta[k]=s+1;\n\t\tcount++;\n\t}\n\tfor(j=1;j<=count;j++)\n\t{\n\t\tprintf(\"%d\\n\",a[j-1]);\n\t}\n}"} +{"label": "79", "index": "39083", "code": "int main()\n{\n\tint N=1000;\n\tfor (int h=0;h<=N;h++)\n{\n int a[300];\n int i,j,t;\n for (i=0;i<300;i++)\n \ta[i]=0;\n int n,m;\n scanf (\"%d%d\",&n,&m);\n i=0;\n\tt=1;\n\tj=n;\n for (n;n>1;)\n {\n \tif (in)\n\t\t{\n\t\t\ttmp=tmp%n;\n\t\t}\n\t\treturn tmp;\n\t}\n}"} +{"label": "79", "index": "39085", "code": "struct king{int num;struct king *next;};\nvoid p_king(int n,int m)\n{\n\tint i;\n\tstruct king *p1,*p2,*p;\n\tp1=p=(struct king *)malloc(LEN);\n\tfor(i=0;inum=i+1;\n\t\tif(i==n-1) p1->next=p;\n\t\telse p1->next=(struct king *)malloc(LEN);\n\t\tp2=p1,p1=p1->next;\n\t}\n\tfor(p1=p;n!=1;n--)\n\t{\n\t\tfor(i=1;i<(m-1)%n+1;i++)\n\t\t\tp2=p1,p1=p1->next;\n\t\tp2->next=p1=p1->next;\n\t}\n\tprintf(\"%d\\n\",p1->num);\n}\n\t\nvoid main()\n{\n\tint i,n[300],m[300];\n\tscanf(\"%d%d\",&n[0],&m[0]);\n\tfor(i=1;m[i-1]&&n[i-1];i++)\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\tfor(i=0;m[i]&&n[i];i++)\n\t\tp_king(n[i],m[i]);\n}"} +{"label": "79", "index": "39086", "code": "int main()\n{\n\tint m,n,i,x=0;\n\tdo {scanf(\"%d %d\",&n,&m);\n\tif(m==0&&n==0) break;\n\tx=1;\n\tfor(i=2;i<=n;i++)\n\t{\n\t\tx=(x+m)%i;\n\t\tif(x==0)\n\t\t\tx=x+i;\n\t}\n\tprintf(\"%d\\n\",x);}\n\twhile (0==0);\n\treturn 0;\n}\n"} +{"label": "79", "index": "39087", "code": "main ()\n{\n int m=1,n,i,j,k; \n int a[301],b[301];\n while(m!=0) \n {\n scanf(\"%d%d\",&n,&m);\n \n for(i=0;i<301;i++)\n a[i]=1,b[i]=0;\n for(i=1;i0;k--)\n { \n if(p>k)\n m=p%k;\n for(j=1;j1)\n\t{\n\t\tz=(m%n+king(n-1,m))%n;\n\t\tif (z==0) z=n;\n\t\treturn z;\n\t}\n}"} +{"label": "79", "index": "39091", "code": "int main(){\n\tint sz[300]={0};\n\tint n,m,i,k,l,p;\n\tint king[100];\n\tfor(p=1;p>0;p++){\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif(m==0&&n==0)\n\t\t\tbreak;\n\t\tfor(i=0;ip;\n\t\t\t}\n\t\t\tx=q->p;\n\t\t\tq->p=x->p;q=q->p;\n\t\tif(q==q->p)\n\t\t\tprintf(\"%d\\n\",(*q).b);\n\t\t}\n\t}\n\t}\n}"} +{"label": "79", "index": "39101", "code": "int main()\n{\n\tint k,n,m,t,i,j,g[303]={0},count=0;\n\twhile (1)\n\t{\n\t\tcin>>n>>m;\n\t\tk=0;\n\t\tt=0;\n\t\tcount=0;\n\t\tfor (i=1;i<=n;i++)\n\t\t{\n\t\t\tg[i]=0;\n\t\t}\n\t\tif (n==0)\n\t\t\tbreak;\n\t\twhile (count>n[p]>>m[p];\n\t\tp++;\n\t}while(n[p-1]!=0&&m[p-1]!=0);\n\tfor(int q=0;q>n[i]>>m[i];\n\t\tif(n[i]==0)\n\t\t\tbreak;\n else\n t++;\n\t}\n\tfor(p=0;p>n>>m;\n\t\tif(n==0&&m==0)break;\n\t\tfor (int i=0;i> n >> m;\n\t\tif (n == 0 && m == 0)\n\t\t\tbreak;\n\t\tint f[n + 1];\n\t\tfor (i = 1; i < n; i++) {\n\t\t\tf[i] = i + 1;\n\t\t}\n\t\tf[n] = 1;\n\n\t\tint t = 1;\n\n\t\twhile (true) {\n\t\t\tif (m == 1) {\n\t\t\t\tcout << n << endl;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor (i = 1; i < m - 1; i++) {\n\t\t\t\t\tt = f[t];\n\t\t\t\t}\n\t\t\t\tf[t] = f[f[t]];\n\t\t\t\tt = f[t];\n\t\t\t\tif (f[t] == t) {\n\t\t\t\t\tcout << t << endl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n"} +{"label": "79", "index": "39111", "code": "int main()\n{\n int i, j;\n int a[1000],b[1000],c[1000]={0};\n for(i=0;;i++)\n {\n scanf(\"%d%d\",&a[i],&b[i]);\n\t if(b[i]==0&&a[i]==0)\n\t {\n\t\t break;\n\t }\n\t else\n\t {\n\t for(j=2;j<=a[i];j++)\n\t {\n\t\t c[i]=(c[i]+b[i])%j;\n\t }\n\t }\n }\n for(i=0;;i++)\n {\n\t if(a[i]==0&&b[i]==0)\n\t {\n\t\t break;\n\t }\n\t else \n\t {\n\t\t printf (\"%d\\n\", c[i]+1);\n\t }\n }\n return 0;\n}"} +{"label": "79", "index": "39112", "code": "int f(int m,int n)\n{\n\tint i;\n\tint k=0;\n\tfor(i=2;i<=n;i++)\n\t\tk=((m%i)+k)%i;\n\treturn k;\n}\nint main(void)\n{\n\tint m[100],n[100];\n\tint i=0;\n\tscanf(\"%d%d\",&n[i],&m[i]);\n\ti++;\n\twhile(n[i-1]!=0||m[i-1]!=0)\n\t{\n\t scanf(\"%d%d\",&n[i],&m[i]);\n\t\ti++;\n\t}\n\n for(int j=0;j2)\n\t{\n\t num=number(x-1,y)-x+k;\n\t\tif(num<=0) num+=x;\n\t}\n\treturn num;\n}\n\nvoid main()\n{\n\tint a[1000],b[1000],n=0,i;\n for(n=0;;n++)\n\t\n\t{\tscanf(\"%d %d\",&a[n],&b[n]);\t\n\t\tif(a[n]==0&&b[n]==0)break;}\t\t\n for(i=0;i> n >> m;\n\t\tif (n == 0 && m == 0)\n\t\t\tbreak;\n\t\tfor (i = 1; i <= n; i++)\n\t\t\ta[i] = 1;\n\t\ti = 1;\n\t\twhile(1)\n\t\t{\n\t\t\tif (a[i] == 1)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif (zong == n - 1)\n\t\t\t\t{\n\t\t\t\t\tcout << i << endl;\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tzong = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(count == m)\n\t\t\t\t{\n\t\t\t\t\tzong++;\n\t\t\t\t\ta[i] = 0;\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tif (i < n)\n\t\t\t\t\t\ti++;\n\t\t\t\t\telse if (i == n)\n\t\t\t\t\t\t\ti = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (i < n)\n\t\t\t\t\t\ti++;\n\t\t\t\t\telse if (i == n)\n\t\t\t\t\t\t\ti = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (i == n)\n\t\t\t\ti = 1;\n\t\t\t\t else\t\n\t\t\t\t\ti++;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39118", "code": "void main()\n{\n\tint ha(int n,int m);\n\tint a[100],b[100],i,n;\n\tfor(i=0;i<100;i++)\n\t{\n\t\tscanf(\"%d %d\",&a[i],&b[i]);\n\t\tif(a[i]==0&&b[i]==0)\n\t\t{n=i;break;}\n\t}\n for(i=0;i>n>>m;\n\tint a[1000];\n\tint i,l;\n\twhile(n!=0)\n\t{\n\n\t\ti=1;\n\t\tfor(i=1;i<=n;i++)\n\t\t\ta[i]=i;\n\t\ti=1;\n\t\twhile(n>1)\n\t\t{\n\n\n\t\t\ti=i+m-1;\n\t\t\twhile(i>n)\n\t\t\t\ti=i-n;\n\n\n\t\t\t\tfor(l=i;l>n>>m;\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39120", "code": "int a[30],b[30];\nint f(int n,int m)\n{\n\tint i,p[301],q=1,r=0;\n\tfor(i=1;i<=n;i++)\tp[i]=1;\n\ti=0;\n\twhile(r>n>>m;\n\t\tfor(int i=1;i<=n;i++) a[i]=1;\n\t\tint j=0,k=n;\n\t\tif(n==0)break;\n\t\twhile(1)\n\t\t{\n\t\t\tfor(int i=1;i<=n;i++)\n\t\t\t{\n\t\t\t\tj += a[i];\n\t\t\t\tif(j==m)\n\t\t\t\t{\n\t\t\t\t\ta[i]=0;\n\t\t\t\t\tj=0;\n\t\t\t\t\tk--;\n\t\t\t\t\tif(k==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout<0;i++)\n {\n scanf(\"%d%d\\n\",&ad[i],&sd[i]);\n if(ad[i]==0&&sd[i]==0)\n {\n break;\n }\n \n printf(\"%d\\n\",f(ad[i],sd[i]));\n }\n return 0;\n}\n \nint f(int x,int y) {\n int i;\n int k=0;\n for(i=2;i<=x;i++)\n {k=((y%i)+k)%i;}\n return k+1;\n} "} +{"label": "79", "index": "39125", "code": "\nlong int num(int a,int b)\n{\n long int i;\n if(a==1) i=1;\n if(a==2) \n {\n if(b%2==0) i=1;\n else i=2;\n }\n if(a>2)\n i = (num(a-1,b)+b%a)%a;\n if(i==0) i=a;\n return i;\n}\nint main()\n{\n int c;\n for(c=1;c!=0;)\n {\n long int n,m,k;\n scanf(\"%ld%ld\",&n,&m);\n c=n;\n if(c==0) break;\n k=num(n,m);\n if(k==0)\n printf(\"%ld\\n\",n);\n else\n printf(\"%ld\\n\",k);\n }\n \n}"} +{"label": "79", "index": "39126", "code": "\nvoid main()\n{\n\tint houwang(int n,int m);\n\tint n,m,i,c[1000];\n\t\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0)\n\t\tbreak;\n c[i]=houwang(n,m);\n\t}\n\tfor(n=0;n<=i-1;n++)\n\t\tprintf(\"%d\\n\",c[n]);\n\n}\nint houwang(int n,int m)\n{\n\n\tint a[301],i,k,b=0;\n\t\n for(i=1;i<=n;i++)\n\t{\n\t\ta[i]=i;\n\t}\n\tfor(i=1;;i++)\n\n\t{ \n\t\tb++;\n\t\tif(i==n+1) i=1;\n\t\tif(b==m)\n\t\t{\n\t\t\tfor(k=i;k1;i--)\n {\n if(m%n!=0) m1=m%n;\n else m1=n;\n if(k-1+m1<=n) k+=m1-1;\n else k=k-1+m1-n;\n Left(a,k,n);\n n--;\n }\n j++;\n result[j]=a[1];\n }\n \n for(i=1;i<=j;i++) printf(\"%d\\n\",result[i]);\n \n return 0;\n}\n\nvoid Left(int *ptr,int hd,int tl)\n{\n int i;\n for(i=hd;in[z])\n now=1;\n //continue;\n\n }\n else \n\t\t\t{ //??????\n\n i++; //i??????????\n\n if(i==m[z])\n a[now]=0;\n ++now;\n if (now>n[z])\n now=1;\n }\n }\n }\n\n for(j=1;j<=n[z];j++)\n\t{\n\t\tif (a[j]!=0)\n\t\t\tprintf(\"%d\\n\",a[j]);\n\t}\n\t}\n}\n\n"} +{"label": "79", "index": "39135", "code": "int num(int n,int m);\nvoid main()\n{ int x,y;\n\twhile(scanf(\"%d%d\",&x,&y)==2)\n\t{\n if(x==0&&y==0)\n\t\t break;\n\t else\n\t\t printf(\"%d\\n\",num(x,y));\n\t \n\n\t}\n\n\n\n\n}\n\nint num(int n,int m)\n{\n\tint x=0,i=0,flag=0;\n\tint str[301];\n\n\n\tfor(i=1;i<=n;i++)\n\t\tstr[i]=1;\n\twhile(flag1;)\n\t\t{\n\t\t\tl=d+m-1;\n\t\t\tc=l/i;\n\t\t\td=-i*c+l;\n\t\twhile(d<=0)\t \n\t\t\td=d+i;\n\t\t\tfor (k=d;k0&&m>0){\n int a[1000000];\n for(i=0;i1;l=l-1){\n if((m%l-1)>0){\n for(i=0;i<(m%l-1);i=i+1){\n a[l+i]=a[i];\n }\n }\n for(i=0;in) t=1;if (a[t]==1) i++;t++;}a[t-1]=0;temp=t;\n for (j=1,s=0;j<=n;j++) if(a[j]==1) s++;} \n for (j=1;j<=n;j++) if (a[j]==1) return (j);}\n else j=1;return (j);\n}\n"} +{"label": "79", "index": "39144", "code": "\nint main()\n{\n\tint n,m,a,b;\n\tint i,j,k,l,x,y;\n\tint bh[400]={0};\n\tint jishu=0;\n\n\tfor(k=0;;k++)\n\t{\n\t\t\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif(n==0&&m==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=0;i<400;i++)\n\t\t\t{\n\t\t\t\tbh[i]=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tjishu=n;\n\t\t\tfor(i=0;i1;)\n\t\t\t{\n\t\t\t\tif(bh[(i%n)]==0)\n\t\t\t\t{\n\t\t\t\t\t/*printf(\"%djiji\\n\",i);*/\n\t\t\t\t\ti=(i+1)%n;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\tfor(x=0,y=0;x1;n--)\n\t{\n\t\tfor(j=1;j 1){\n\t\t\t\t\tif(id[index] != 0){\n\t\t\t\t\t\tif(count != m){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\tindex = (index+1)%n;\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tid[index] = 0;\n\t\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t\t\tnum_monkey--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tindex = (index+1)%n;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(i = 0; i < n; i++){\n\t\t\t\t\tif(id[i] != 0){\n\t\t\t\t\t\tprintf(\"%d\\n\", id[i]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else{\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn 0;\n}"} +{"label": "79", "index": "39148", "code": "\nint main()\n{\n\tint n[100],m[100];\n\tint i, num = 0;\n\tfor (i = 0; i<100; i++)\n\t{\n\t\tcin >> n[i] >> m[i];\n\t\tif (n[i]==0 && m[i]==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tnum++;\n\t}\n\tint j = 0;\n\tfor (j; j1;)\n\t\t {\n for(i=1;i<=N;i++)b[i]=a[i];\n\t\t\t t=M%N;N--;\n\t\t\t for(j=1;j<=N;j++)\n\t\t\t {\n\t\t\t\tif(t+j<=N+1)a[j]=b[t+j];\n\t\t\t\tif(t+j>N+1)a[j]=b[t+j-N-1];\n\t\t\t }\n\t\t }\n\t\t printf(\"%d\\n\",a[1]);\n\t\t \n\t}while(N!=0&&M!=0);\n}"} +{"label": "79", "index": "39150", "code": "int main(){\n\tint i,j,row=0,count=0,check,zeronum,n[100],m[300],arr[300];\n\tfor(i=0;i<300;i++){\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\t\tif(n[i]==0||m[i]==0){\n\t\t\tbreak;\n\t\t}\n\t\trow++;\n\t}\n\tfor(i=0;i>n>>m)\n\t{\n\t\tif(n==0&&m==0)\n\t\t\tbreak;\n\t\tif (n==1)\n\t\t\tcout<<1<=N-i+1-m0)\n\t\t\t\tB[j]=A[j+m0-N+i-1];\n\t\t}\n\t\tfor(j=0;j<(N-i);j++)\n\t\t\tA[j]=B[j];\n\t}\n\t\treturn A[0];\n}\nvoid main()\n{\n\tint a[100],b[100];\n\tint i;\n\tint n=0;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%d\",&a[i],&b[i]);\n\t\tn=n+1;\n\t\tif(a[i]==0&&b[i]==0)\n\t\t\tbreak;\n\t}\n\tn=n-1;\n\tfor(i=0;i=n) return josephus0(n,m);\n\tint l = (n/m)*m;\n\tint j = josephus(n - (n/m), m);\n\tif (j <= n-l) return l+j;\n\tj -= n-l;\n\tint t = (j/(m-1))*m;\n\tif ((j % (m-1)) == 0) return t-1;\n\treturn t + (j % (m-1));\n}\nint main()\n{\nint n , k;\nwhile(2 == scanf(\"%d %d\",&n ,&k))\n{\n if(n == 0 && k == 0)break;\n printf(\"%d\\n\",josephus(n , k));\n}\n return 0;\n}"} +{"label": "79", "index": "39157", "code": "\nint main()\n{\n\tint count,a[300],n,m,i,exist;\n\twhile(1)\n\t{\n\tscanf(\"%d%d\",&n,&m);\n\tif (n==0&&m==0) break;\n\texist=n;\n\tfor (i=0;i1)\n\t{\n\t\tif(a[i]!=0) {count++;}\n\t\tif (count==m) {a[i]=0;exist--;count=0;}\n\t\ti++;\n\t\tif (i==n) i=0;\n\t}\n\tfor (i=0;i1;t--,s=!s)for(i=m%t,j=0;j=m)break;\n\t\t p=p+n-num;\n\t\t}\n\t\tif(i==1) line=m;\n\t\telse line=n-num-p%m;\n\t for(j=1;j<=n-num-1;j++)\n\t\t{\n\t \t if(line+j>n-num)\n\t\t \tt=line+j-(n-num);\n\t\t else t=line+j;\n\t\t b[j]=a[t];\n\t\t}\n\t\tfor(j=1;j<=n-num-1;j++)\n\t\t\ta[j]=b[j];\n\t}\n printf(\"%d\\n\",a[1]);\n\t}\n\t}\n}"} +{"label": "79", "index": "39163", "code": "//#include\n//#include\nint main()\n{\n\tint n,m,i,j;\n\tint a[301];\n\twhile(true){\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0)\n\t\t\tbreak;\n\t\tfor(i=1;i1){\n\t\t\tj=(m+j-1)%n;\n\t\t\t\n\t\t\t\n\t\t\tfor(i=j;i1;j--) \n { \n k=0;\n if (j>=m)\n {\n k=m-1;\n a[k]=0;\n \n } \n else \n {\n k=s(m,j)-1;\n a[k]=0;\n }\n \n for(x=k+1,y=0;xnext;\n\n p2=p1;\n p1=p1->next;\n p2->next=p1->next;\n head=p1->next;\n}\n printf(\"%d\\n\",head->num);\n}\nelse\nprintf(\"%d\\n\",n[i]);\n}\n\n\n}\n\n\n\n"} +{"label": "79", "index": "39171", "code": "int main(){\n\tint n=1,m=1,a,j;\n\t\n while(n!=0 && m!=0){\n\t\ta=0;\n\t\tscanf(\"%d %d\",&n,&m);\n\t\t\n\t\tint i;\n\t\tint *p=(int*)malloc(sizeof(int)*(n+1));\n\t\tfor(i=1;i<=n;i++){\n\t\t\tp[i]=i;\n\t\t}\n\t\tint k=n;\n\t\n\t\twhile(k>1){ //k\\n??\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tif(p[i]!=0){\n\t\t\t a++;\n\t\t\t\t if(a%m==0){\n\t\t\t \t p[i]=0;\n\t\t\t\t k--;\n\t\t\t\t if(k==1){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t }\n\t\t\t\t\t a=0;\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t for(j=1;j<=n;j++){\n\t\t if(p[j]!=0){\n\t printf(\"%d\\n\",p[j]);\n\t\t }\n\t\t}\n\t free(p);\n\t}\n\t\n\treturn 0;\n}"} +{"label": "79", "index": "39172", "code": "void main()\n{\n\tint n,m,i,a[300]={0},j,k,h;\n\tfor(h=0;h<=99;h++)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0)\n\t\t\tbreak;\n\t\telse\n\t\t{ \n\t\t\tk=0;\n\t\t\tif(n==1)\n\t\t\t\tprintf(\"1\\n\");\n\t\t\telse\n\t\t\t{\n\t\t\t for(i=0;i0)\n\t{\n\t\tfor(i=0,k=m%n;i=n)\n k=0;\n if(l>m)\n l=1;\n while(k1)\n {\n if(a[i]==0)\n if(j==m) {a[i]=1;k--;j=1;}\n else j++;\n i++;\n if(i>=n) i=0;\n }\n for(i=0;i> n >> m;\n\t\tif(!n)\n\t\t\tbreak;\n\t\tcnt = n;\n\t\tfor(i = 1; i <= n; i++)\n\t\t\tnum[i] = 1;\n\t\tk = 1;\n\t\ti = 1;\n\t\twhile(cnt > 1)\n\t\t{\n\t\t\tif(i > n)\n\t\t\t\ti = 1;\n\t\t\tif (num[i] == 0)\n\t\t\t\ti++;\n\t\t\telse\n\t\t\t\tif(k == m)\n\t\t\t\t{\n\t\t\t\t\tnum[i] = 0;\n\t\t\t\t cnt --;\n\t\t\t\t k = 1;\n\t\t\t\t i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ti++;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t}\n\t\tfor(i = 1; i <= n; i++)\n\t\t\tif(num[i] != 0)\n\t\t\t{\n\t\t\t\tcout << i << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\t\t\n return 0;\n}"} +{"label": "79", "index": "39182", "code": "void main()\n{\n\tint n[300],m,i,j,k,r;\n while(1)\n\t{\n scanf(\"%d%d\",&r,&m);\n\t j=r;\n\t if(r==0&&m==0)\n\t\t break;\n\t else\n\t {\n\t for(i=0;i1)\n\t {\n\t\t for(k=1;k=1;j--)\n\t\t\t{\n\t\t\t\tif(m+s-1=0;i++)\n { \n scanf(\"%d %d\",&n[i],&m[i]);\n if(m[i]==0)\n break;\n }\n c=i-1;\n for(i=0;i<=c;i++,a=-1)\n {\n int o[n[i]];\n for(j=0;j1)\n\t\t{\n\t\t\tj++;\n\t\t\tif(j==n[i])\n\t\t\t\tj=0;\n\t\t\tif(a[j]==0)\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tif(count%m[i]==0)\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t\ta[j]=0;\n\t\t\t\tremain--;\n\t\t\t}\n\t\t}\n\t\tfor(j=0;j0)\n\t{i=3;\n\t l=fmod(m,2);\n\t while (i<=n)\n\t {\n\t\t l=fmod(m+l,i);\n\t\t i++;\n\t }\n\t\tprintf(\"%d\\n\",l+1);\n\t\tscanf(\"%d %d\",&n,&m);\n\t}\n\treturn 7;\n}\n"} +{"label": "79", "index": "39189", "code": "\n\nint asdf(int n,int m)\n{\n int *a = (int*)malloc(n*sizeof(int));\n int ret=0;\n int i=0;\n int left=n;\n int temp = 0;\n int inc=0;\n\n for(i=0;i>n>>m;\nif(n==0&&m==0)break;\nfor(i=2;i<=n;i++)\ns=(s+m)%i;\ncout< 1)\n {\n while(count < m)\n { \n \n if(i + 1 >= n)\n i = 0;\n else\n i = i + 1;\n count = count + (monkey[i] == 1);\n } \n \n monkey[i] = 0;\n left = left - 1;\n count = 0;\n }\n \n for(i = 0; i <= n - 1; i++)\n if(monkey[i] == 1)\n printf(\"%d\\n\", i + 1);\n}\n \n \n \n"} +{"label": "79", "index": "39192", "code": "main()\n{ int m,n,k,i,j,r,num;\n int a[500],b[300];\n\nfor(;;)\n{scanf(\"%d %d\",&n,&m);\n for(i=1;i<=n;i++)\n {a[i]=1;}\nj=0;\nk=0;\nfor(i=1;i<=n;i++)\n{if(a[i]==1) {j=j+a[i];\nif(j==m) {j=0;a[i]=0;k++;}\nif(k==n) {num=i;printf(\"%d\\n\",num);break;}}\nif(i==n) i=0;}\n\nif(n==0&&m==0)\nbreak;\n\n\n}\nreturn 0;\n}"} +{"label": "79", "index": "39193", "code": "\nvoid main()\n{\n\tint a[400]={0};\n\tint m,n,i,out,sum;\n\n\twhile(1){\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(m==0&&n==0) break;\n\t\tout=m;\n\t\tsum=n;\n\t\tfor(i=1;i<=n;i++) a[i]=1;\n\t\tfor(i=1;sum>1;){\n\t\t\t\n\t\t\tif(a[i]==0){\n\t\t\t\ti++;\n\t\t\t\tif(i>n) i=1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse out--;\n\t\t\tif(out==0){\n\t\t\t\ta[i]=0;\n\t\t\t\tsum--;\n\t\t\t\tout=m;\n\t\t\t}\n\t\t\ti++;\n\t\t\tif(i>n) i=1;\n\t\t}\n\t\tfor(i=1;i<=n;i++) if(a[i]==1) break;\n\t\tprintf(\"%d\\n\",i);\n\t}\n}\n"} +{"label": "79", "index": "39194", "code": "\nmain() \n { \n int m,n,i,t,p,f,k,q,c,add;\n int str[300]; \n for (;;)\n{ \n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0)\n break;\n //printf(\"%d %d\\n\",n,m);\n for(i=0;i=n)\n {\n p=p-n;\n // printf(\"%d\\n\",p);\n }\n if(str[p]==0)\n {\n add=add+1;\n //printf(\"%d\\n\",add);\n }\n if(k>=add)\n break;\n \n } \n //printf(\"%d\\n\",add); \n i=i+add;\n \n if(i>n-1)\n i=i%n;\n str[i]=0;\n} \n for(f=0;f<=n-1;f++)\n {\n if(str[f]==1)\n printf(\"%d\\n\",f+1);\n }\n} \n \n \n} \n"} +{"label": "79", "index": "39195", "code": "int main()\n{\n int n,m;\n int i;\n for(i=0;;i++)\n {\n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0) break;\n int huo,shu;\n huo=n;shu=1;\n int k;int a[1000]; \n for(k=1;k<=n;k++)\n a[k]=1;\n while(huo>1)\n {\n if(k>n)\n k=1;\n if(a[k]==1)\n {\n if(shu%m==0){a[k]=0;huo--;}\n shu++;\n }\n k++;\n }\n int l;\n for(l=1;l<=n;l++)\n if(a[l]==1)\n printf(\"%d\\n\",l);\n }\n}\n"} +{"label": "79", "index": "39196", "code": "\nint main()\n{\n int n[100], m[100], i,j=0;\n for(i=0; i<100; i++){\n scanf(\"%d %d\", &(n[i]), &(m[i]));\n j+=1;\n if (n[i]==0 && m[i]==0){\n break;\n }\n }\n int k, s[j], l, q;\n for(q=0; q1){\n\twhile(n11;k--)\n\t{\n\t\tj=0;\n\t\twhile(jnum&&p1->next!=NULL)\n\t{\n\t\tp2=p1;p1=p1->next;\n\t}\n\tif(x==p1->num)\n\t{\n\t\tif(p1==head)\n\t\thead=p1->next;\n\t\telse p2->next=p1->next;\n\t}\n\treturn(head);\n}\n\nvoid main()\n{\n\tstruct monkey *del(struct monkey *head,int x);\n\tstruct monkey *head,*p1,*p2;\n\tint i,j,k=1,t,n[100],m[100],count=0,p;\n\tfor(t=0;;t++)\n\t{\n\t\t\n\t\tscanf(\"%d %d\",&n[t],&m[t]);\n\t\tif(n[t]==0)break;\n\t}\n\tp=t-1;\n\t//printf(\"%d\",p);\n\tfor(t=0;t<=p;t++)\n\t{\n\t\tcount=0;k=1;\n\t\tp1=p2=head=(struct monkey*)malloc(LEN);\n\t\tp1->num=1;\n\t\tfor(i=2;i<=n[t];i++)\n\t\t{\n\t\t\tp1=(struct monkey*)malloc(LEN);\n\t\t\tp1->num=i;\n\t\t\tp2->next=p1;\n\t\t\tp2=p1;\n\t\t}\n\t\tp2->next=NULL;\n\t\tp1=head;\n\t\tfor(i=1;;i++)\n\t\t{\n\t\t\tif(k==m[t])\n\t\t\t{\n\t\t\t\tdel(head,p1->num);\n\t\t\t\tcount++;\n\t\t\t\thead=del(head,p1->num);\n\t\t\t\tk=0;\n\t\t\t}\n\t\t\tif(p1->next!=NULL)\n\t\t\tp1=p1->next;\n\t\t\telse\n\t\t\tp1=head;\n\t\t\tk++;\n\t\t\tif(count==n[t]-1)\n\t\t\t\tbreak;\n\t\t}\n\t\tprintf(\"%d\\n\",head->num);\n\t}\n}\n\t"} +{"label": "79", "index": "39200", "code": "main()\n{\n\tint s[20][2],a[300],i=-1,j,t,d,k;\n\tdo\n\t{\n\t\ti++;\n\t\tscanf(\"%d%d\",&s[i][0],&s[i][1]);\n\t}while(s[i][1]!=0);\n\tt=i-1;\n\tprintf(\"\\n\");\n\tfor(i=0;i<=t;i++)\n\t{if(s[i][1]!=1)\n\t{ for(j=0;j=n){\n i=i-n;\n }\n }\n for(i=0;i=1;)\n\t\t{\n\t\t\tt=m;\n\t\t\ts--;\n\t\t\twhile (t>0)\n\t\t\t{\n\t\t\t\ti=((1+i)>n)? 1:(i+1);\n\t\t\t\twhile (a[i]) i=((1+i)>n)? 1:(i+1);\n\t\t\t\tt--;\n\t\t\t}\n\t\t\ta[i]=1;\n\n\t\t}\n\t\tprintf(\"%d\\n\",i); \n\t scanf(\"%d%d\",&n,&m);\n\t}\n}\n"} +{"label": "79", "index": "39203", "code": "struct hou\n{int k;\nstruct hou *next;\n};\nint main(int argc, char *argv[])\n{int i,j,k,n,m;\nstruct hou *head,*p1,*p2;\n\nwhile(1)\n{\n scanf(\"%d%d\",&n,&m);\n if(n==0&&m==0)\n break;\n head=(struct hou*)malloc(sizeof(struct hou));\np1=head;\n for(i=1;i<=n;i++)\n {if(i==n)\n {p1->k=n;p1->next=head;}\n else\n {p2=p1;\n p1=(struct hou*)malloc(sizeof(struct hou));\n p2->k=i;\n p2->next=p1;\n }}\n p1=head;\n p2=head;\n for(i=1;i<=n-1;i++)\n {\n for(j=1;j<=m-1;j++)\n {p2=p1;\n p1=p1->next;}\n p2->next=p1->next;\n p1=p1->next;\n }\n printf(\"%d\\n\",p1->k);\n}\n \n return 0;\n}\n"} +{"label": "79", "index": "39204", "code": "int main()\n{\n\tint k;\n\tfor(k=0;;k++)\n\t{\n\t\tint a[300]={0},i=0,j=0,n=0,m=0,t=0,f=0;\n\tscanf(\"%d%d\",&n,&m);\n\tif((n==0)&&(m==0))\n\t\tbreak;\n\tif(n==1)\n\t\tprintf(\"1\\n\");\n\telse\n\t{\n\t\tfor(i=0;in-1)\n\t\t\t\tf=i%n;\n\t\t\tif(a[f]>0)\n\t\t\t\tt=t+1;\n\t\t\tif(t%m==0)\n\t\t\t\ta[f]=0;\n\t\t\tif(t==(n-1)*m)\n\t\t\t\tbreak;\n\t\t}\n\tfor(i=0;i0)\n\t\t\tprintf(\"%d\\n\",a[i]);\n\t}}\n\t\t\treturn 0;\n}"} +{"label": "79", "index": "39205", "code": "int yos(int n,int m)\n{int a[1000],i,j,x=0,y;\nfor(i=1;i<=n;i++)a[i]=1;\nfor(i=1;in)x=1;}\nwhile (!a[x]);\na[x]=0;}\nfor(i=1;i<=n;i++)\nif(a[i])return(i);}\nmain(){\nint m,n;\nscanf(\"%d%d\",&n,&m);\nwhile (m!=0){\nprintf(\"%d\\n\",yos(n,m));\nscanf(\"%d%d\",&n,&m);}}"} +{"label": "79", "index": "39206", "code": "int main(){\n\tint sn[1000],sm[1000],NUM=0;\n\tfor(int p=0;p<1000;p++){\n\t\tint a1,a2;\n\t\tscanf(\"%d%d\",&a1,&a2);\n\t\tif((a1==0)&&(a2==0)){\n\t\t\tbreak;\n\t\t\t}\n\t\telse{sn[p]=a1;\n\t\t sm[p]=a2;\n\t\t\t NUM++;\n\t\t}\n\t}\n\tint k=1;\n\tfor(int t=0;t=0;c--){\n\t\t\t\t\tk=sz[c];\n\t\t\t\t\tsz[c]=p;\n\t\t\t\t\tp=k;\n\t\t\t\t}\n\t\t\t\tsz[l-1]=p;\n\t\t\t}\n\t\t}\n\t\tph[a]=sz[0];\n\t\ta++;\n\t}\n\tfor(i=0;i0;i++){\nif(i%m==0){\n next[p]=next[next[p]];\n --n;\n }\n else{\n p=next[p];\n }\n} a[w]=p;\n x++;\n}\n for(w=1;w<=x;w++)\n\n {\n printf(\"%d\\n\",a[w]);\n }\n\nreturn 0;\n}\n"} +{"label": "79", "index": "39210", "code": "int main()\n{\n\tint n[10],m[10];\n\tscanf(\"%d %d\",&n[0],&m[0]);\n\tint i;\n\tfor(i=1;n[i-1]!=0&&m[i-1]!=0;i++)\n\t\tscanf(\"%d %d\",&n[i],&m[i]);\n\n for(i=0;n[i]!=0&&m[i]!=0;i++)\n\t{\n\t\tint j,hou[360];\n\t\tfor(j=0;j<360;j++)\n\t\t\thou[j]=j+1;\n\t\tint count=0,num=0;\nloop:for(j=0;j1)\n\t\t{\t\n\t\t\tnum=0;\n\t\t\tgoto loop;\n\t\t}\n\t\tif(num==0)\n\t\t{\n\t\t\tint h=n[i];\n\t\t\tprintf(\"%d\\n\",h);\n\t\t}\n\t\tfor(j=0;j1;i=i+1)\n { if(i>n)\n i=i-n;\n if(a[i]!=0)\n\t {t++;\n if(t==m) \n\t\t{t=0; \n\t a[i]=0;j--;}\n\t }\n\telse continue;\n }\nfor (i=1;i<=n;i++)\n if (a[i]==1) break;\n\t return (i);\n}"} +{"label": "79", "index": "39212", "code": "void main()\n{\nint a[301],b[301];\nint n[300],m[300],c=0;\nint i,j,k,t;\nfor(i=1;i<=300;i++)\n{\n\tscanf(\"%d %d\",&n[i],&m[i]);\n\tif(n[i]==0&&m[i]==0){\n\t\tbreak;\n\t}\n\tc=c+1;\n}\nfor(k=1;k<=c;k++)\n{\n\tfor(i=1;i<=n[k];i++)\n\t{\n\t\ta[i]=i;\n\t}\n\twhile(n[k]>1)\n\t{\n\t\tt=m[k]%n[k];\n\t\tfor(j=1;j<=t;j++)\n\t\t{\n\t\t\tb[j]=a[j];\n\t\t}\n\t\tfor(j=t+1;j<=n[k];j++)\n\t\t{\n\t\t\ta[j-t]=a[j];\n\t\t}\n for(j=1;j<=t;j++)\n\t\t{\n\t\t\ta[n[k]-t+j]=b[j];\n\t\t}\n\t\tn[k]--;\n\t}\nprintf(\"%d\\n\",a[1]);\n}\n}\n"} +{"label": "79", "index": "39213", "code": "/*\n * wanyi.cpp\n *\n * Created on: 2012-11-10\n * Author: 7\n */\nint main()\n{\n\tint a[301],count,n,m,i,j;\n\twhile(cin>>n>>m&&n!=0&&m!=0)\n\t{\n\t\tfor(i=0;i<301;i++)\n\t\ta[i]=i;\n\t\tcount=n;\n\t\tj=m;\n\t\twhile(count>1)\n\t\t{\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t{\n\t\t\t\tif(a[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tj--;\n\t\t\t\t\tif(j==0)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[i]=0;\n\t\t\t\t\t\tj=m;\n\t\t\t\t\t\tcount--;\n\t\t\t\t\t\tif(count==1)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t\tif(a[i]!=0)\n\t\t\t\tcout<1;e++)\n\t{\n\t\tif(enext)\n\t\t\t{ \n\t\t\t for(k=0;knext;\n\t\t\t\t} \n\t q=p->next;\n\t p->next=q->next;\n\t\t\t p=q->next;\n\t\t\t}\n\t\t\tprintf(\"%d\\n\",p->num);\n\t\t}\n\t\tif(m==1)\n\t\t{\n\t\t\tprintf(\"%d\\n\",monkey[n-1].num);\n\t\t}\n\t}\n}\n"} +{"label": "79", "index": "39218", "code": "void main()\n{\n\tint a[301]={0};\n\tint n,m,i,k,j,s,king;\n\tfor(j=1;;j++)\n\t{\n\t scanf(\"%d\",&n);\n\t scanf(\"%d\",&m);\n\t if(m!=0&&n!=0&&m!=1)\n\t\t\n \n\t {\n\t\tk=0;\n\t\tfor(i=1;i<=n;i++)\n\t\t\ta[i]=i;\n\t\tdo\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t{\n\t\t\t\tif(a[i]==0)\n\t\t\t\t\tk=k;\n\t\t\t\telse k=k+1;\n\t\t\t\tif(k==m) {a[i]=0;k=0;}\n\n\t\t\t}\n\t\t\ts=0;\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t{\n\t\t\t\tif(a[i]>0)s=s+1;\n\t\t\t}\n\t\t}while(s>1);\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t\tif(a[i]!=0)king=a[i];\n\t\t}\n\t\t\n\tprintf(\"%d\\n\",king);\n\t}\n\tif(m==0&&n==0)break;\n\tif(m==1)printf(\"%d\\n\",n);\n\t}\n}\n\n"} +{"label": "79", "index": "39219", "code": "int main()\n{\n\tint n, m, i;\n\tint t=0, k=0,count=0;\n\tcin >> n >> m;\n\twhile (m!=0 && n!=0)\n\t{\n\t\tint a[301]={0};\n\t\ti=0;\n\t\tk=0;\n\t\tcount=0;\n\t\t\twhile(count < n)\n\t\t\t{\n\t\t\t\tk++;\n\t\t\t\tif (k==n+1)\n\t\t\t\t\tk=1;\n\t\t\t\tif (a[k]!=1)\n\t\t\t\t{\n\t\t\t\t\tt++;\n\t\t\t\t\tif (t==m)\n\t\t\t\t\t{\n\t\t\t\t\t\tt=0;\n\t\t\t\t\t\ta[k]=1;\n\t\t\t\t\t\ti = k;\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcout << i <> n >> m;\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39220", "code": "\nint main()\n{\n\tint count = 0;\n\tint count1 = 0;\n\tint m,n;\n\tint temp;\n\tint inputcount=0;\n\tint result[102400];\n\tscanf(\"%d\",&n);\n\tscanf(\"%d\",&m);\nwhile(m!=0 && n!=0)\n{\n if(m==1)\n {\n result[inputcount] = n;\n inputcount++;\n\t scanf(\"%d\",&n);\n\t scanf(\"%d\",&m);\n continue;\n }\n\tint *monkey = (int*)malloc(sizeof(int)*n);\n\tint *tempmonkey = (int*)malloc(sizeof(int)*n);\n\tfor(count=0; count1)\n\t{\n\t\ttemp = (m-1)%n+1;\n\t\tfor(count=temp;count=n[j])\n\t\t{\n\t\t\ta[i]++;\n\t\t\tk=0;\n\t\t\tt++;\n\t\t}\n\t\tif(i>=m[j]-1)\n\t\t{i=-1;}\n\t}\n\ti=0;\n\twhile(a[i]!=0&&i1)\n\t\t{\n\t\t\twhile(a[i]==1)\n\t\t\t{\n\t\t\t count++;\n\t\t\t if(count==m)\n\t\t\t\t{\n\t\t\t\t\ta[i]=0;\n\t\t\t\t\tcount=0;\n\t\t\t\t\trest--;\n\t\t\t\t\tif(rest==1) break;\n\t\t\t\t}\n\t\t\t\tif(i0)\n {\n scanf(\"%d %d\",&n,&m);\n if(n==0)\n break;\n else\n {\n for(i=0;i1;n[i]--)//??N-1???\n\t\t for(j=1;j<=n[i];j++)//????????\n\t\t\tif((m[i]-j+k-1)%n[i]==0)\n\t\t\t{\n\t\t\t\tk=j;\n\t\t\t\t\n\t\t\t\tfor(;jn)i=1;\n\t\t if(a[i]==0)num++;\n\t\t }\n\t a[i-1]=1;\n\t if(ren==1)printf(\"%d\\n\",i-1);\n\t ren=ren-1;\n\t p=i;\n\t\t}\n\t}\n}"} +{"label": "79", "index": "39232", "code": "\nint main()\n{\nint n,m,i,j,s,x[1000],y[1000];\n \n \nscanf(\"%d %d\",&n,&m);\n while(n!=0&&m!=0)\n {\n\nfor (i=0;i<=(n-1);i++)\n{\n y[i]=0;\nx[i]=i+1;\n}\n//?????n-1????? \n//???????????? \n\nfor (j=0;j<=(n-2);j++)\n\n{\ns=m %(n-j); \n\n\n for (i=s;i<=(n-j-1);i++) \n {\n y[i-s]=x[i];\n }\n for (i=0;i<=(s-2);i++)\n {\n y[n-j-s+i]=x[i];\n } \n \n//????????????y[] ,??y?????x?????y???\n \nfor(i=0;i<=(n-j-2);i++)\n {\n x[i]=y[i];\n }\nx[n-j-1]=0;\nfor (i=0;i<=n-j-2;i++)\n {\n y[i]=0;\n }\n \n}\n\n\n\nprintf(\"%d\\n\",x[0]) ;\nscanf(\"%d %d\",&n,&m);\n }\n\n \n}\n"} +{"label": "79", "index": "39233", "code": "int main()\n{\n\tint n[301]={-1};\n\tint m[301]={-1};\n\tint g[501]={0};\n\tint d,a,i,x,j,c=0;\n\n\tfor(i=1;n[i-1]!=0&&m[i-1]!=0;i++){\t \n\t scanf(\"%d\",&n[i]);\n\t scanf(\"%d\",&m[i]);\n\t c++;\n\t}\n\n\tfor(j=1;j0;){\n\t\t\tfor(i=1;i<=n[j];i++){\n\t\t\t\tif(g[i]==0){\n\t\t\t\t d++;\n\t\t\t\t if(d%m[j]==0){\n\t\t\t\t g[i]=1;\n\t\t\t\t\tx--;\n\t\t\t\t\tif(x==0)\n\t\t\t\t\t{a=i;}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d\\n\",a);\n\t\n\t} \nreturn 0;\n\n}\n"} +{"label": "79", "index": "39234", "code": "int main()\n{\n int m,n,i,k,j,l,sum;\n for(l=1;;l++)\n {\n scanf(\"%d %d\",&n,&m);\n if(n==0 && m==0)\n break;\n else\n {\n int a[300];\n for(i=0;i<300;i++)\n {\n if(i<=n) a[i]=1;\n else a[i]=0;\n }\n for(i=0,k=0;;i++)\n {\n if(i==n) i=0;\n if(a[i]==1) k++;\n if(k==m)\n {\n a[i]=0;\n k=0;\n }\n for(j=0,sum=0;j=n)\n\t\t\t\tk=0;\n\t\t}\n\t\tfor(int i=0;i1)\n { \n\t \n for(i=1;i>n>>m&&m!=0)\n { a=0;\n for(i=2;i<=n;i++) a=(a+m)%i;\n cout<1&&m[i]>1)\n\t\t{\n\t for(j=2;j<=n[i];j++)\n\t\t {\n\t\t s[i]=(s[i]+m[i])%j;/*???????????????0?m-1?????????????k=m%n-1,\n\t\t \t\t ???????????m%n?????0???????????n-1????????\n\t\t\t\t ???????n-1???????????t???????????????????t\n\t\t\t\t +k?%n???????*/\n\t\t }\n\t\t}\n\t\tif(n[i]==0&&m[i]==0)\n\t\t\tbreak;\n\t}\n\tfor(i=0;n[i]!=0;i++)\n\t{\n\t\tprintf(\"%d\\n\",s[i]+1); \n\t}\n} \n"} +{"label": "79", "index": "39245", "code": "int main()\n{\n int i,j,k,n,a[301],num,m,b[N],c[N],s,t;\n s=0;\n for(t=1;t<10000;t++)\n {\n scanf(\"%d%d\",&(b[t]),&(c[t]));\n if(b[t]==0&&c[t]==0) break;\n s=s+1;\n }\nfor(t=1;t<=s;t++)\n{\n j=0,k=0;\n for(i=1;i<=b[t];i++)\n {\n a[i]=1;\n }\n for(i=1;i<=b[t];i++)\n {\n if(a[i]==1)\n {\n j=j+a[i];\n if(j==c[t])\n {\n j=0;\n a[i]=0;\n k++;\n if(k==b[t])\n {\n num=i;\n break;\n }\n }\n }\n if(i==b[t])\n i=0;\n }\n printf(\"%d\\n\",num);\n}\n}\n"} +{"label": "79", "index": "39246", "code": "int main()\n{\n\tint m,n,i,j=0,f[300],a[100];\n\tf[1]=0;\n\t\twhile (cin>>n>>m)\n\t\t{\n\t\t\tif (n==0&&m==0)\n\t\t\t\tbreak;\n\t\t\tj++;\n\t\t\tfor(i=2;i<=n;i++)\n\t\t\t\tf[i]=(f[i-1]+m)%i;\n\t\t\ta[j]=f[n]+1;\n\n\t\t}\n\t\tfor(i=1;i<=j;i++)\n\t\t\tcout<=num)\n {\n pchs=pchs-num;\n }\n \n //????\n if(num==1)\n {\n return *pchs;\n }\n //????\n else\n {\n //??\n if(pchs-p0==num-1)\n {\n return chs(p0,num-1,p0,skip);\n }\n //???\n else\n {\n for(i=pchs;i-p00) y++;\n if(y==m[j])\n {\n o[x]=o[x]-100;\n y=0;\n z++;\n }\n }while(z!=(n[j]-1));\n for(x=0;x0) printf(\"%d\\n\",x+1);\n }\n } \n}\n"} +{"label": "79", "index": "39253", "code": "int check(int N,int p)\n{\n\tint k[400];\n\tint i,j,count=0;\n\tfor(i=0;i1)\n {\n if (m%n==0) k=n;\n else k=m%n;\n for (i=k,j=0;i=n)\n j-=n;\n if(a[j]==0)\n k++;\n if(k==m)\n {\n a[j]=1;\n k=0;\n i++;\n }\n }\n for(i=0;i=2;j--)\n\t\t{\n\t\t\ti=(i+m[k]-2)%j+1;\n\t\t\tfor(x=i;x<=j-1;x++)\n\t\t\t{\n\t\t\t\ta[x]=a[x+1];\n\t\t\t}\n\t\t}\n\t\tb[k]=a[1];\n\t}\n\tfor(i=1;i<=k-1;i++)\n\t{\n\t\tprintf(\"%d\\n\",b[i]);\n\t}\n}\n"} +{"label": "79", "index": "39258", "code": "void main()\n{int n,m,a[1000],i,t=0,k;\nfor(;;)\n{scanf(\"%d%d\",&n,&m);\nif(n==0&&m==0)\nbreak;\nk=n;\nfor(i=1;i<=n;i++)\na[i]=1;\nfor(i=1;;i++)\n{if(i==n+1)\ni=1;\nif(a[i]==1)\nt++;\n if(t==m)\n { a[i]=0;\n k--;\n t=0;\n }\nif(k==0)\nbreak;\n\n\n}\nprintf(\"%d\\n\",i);\n\n\n\n\n}\n\n\n\n\n\n}"} +{"label": "79", "index": "39259", "code": "int main(){\n int n,m,x,y;\n int sz[300];\n while(1){\n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0){\n break;\n }\n for(int i=0;in)i=i-n;\n\t\t\tif(a[i]!=0)\n\t\t\t{\n\t\t\t\tmj=mj+1;\n\t\t\t\tif(mj%m==0)\n\t\t\t\t{\n\t\t\t\t\ta[i]=0;j++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(i=1;i<=n;i++)\n\t\t\tif(a[i]!=0)printf(\"%d\\n\",a[i]);\n}\n}"} +{"label": "79", "index": "39267", "code": "int main(int argc, char* argv[])\n{\n\tint n,m;\n\tint*p;\n\tint i,j,k;\n for(int a=0;a<344;i++)\n {\n\t scanf(\"%d%d\",&n,&m);\n\tp=(int*)malloc(sizeof(int)*n);\n\tfor(i=0;i0)\n\t{\n\t\tfor(i=0;i1;i++) {\n if(a[i%k+1]!=-1) {x++;}\n if(x==n&&a[i%k+1]!=-1) {a[i%k+1]=-1;\n s--;x=0; }\n }\n for(i=1;i<=k;i++) {\n if(a[i]!=-1) {printf(\"%d\\n\",i);}\n } }\n return 0;}\n\n"} +{"label": "79", "index": "39270", "code": "void main()\n{\n\tint q[300],w[300],j=0,e,i,*p,a[500],k,t;\n\tdo\n\t{\n\t\tscanf(\"%d%d\",&q[j],&w[j]);\n\t\tj++;\n\t}\n\twhile(q[j-1]!=0);\n\te=j-1;\n\tj=0;\n\tfor(j=0;j>n>>m&&m!=0)\n\t{\n\t\ta=0;\n\t\tfor(i=2;i<=n;i++)\n\t\t{\n\t\t\ta=(a+m)%i;\n\t\t}\n\t\tcout<total)\n\t{\n\t\treturn ISMORETHAN_THREEHUNDRED;\n\t} \n\telse\n\t{\n\t\treturn ISCORRECT;\n\t}\t\n}\n\n//???????\nint GetUserInput(int * n,int * m){\n\tint checkresult=0;\n\tscanf(\"%d %d\",n,m);\n checkresult=CheckInput(*n,300);\n\tif (checkresult==ISNOT_POSITIVEINT)\n\t{\n\t\n\t\tprintf(\"error!\\n\");\n\t} \n\telse if (checkresult==ISMORETHAN_THREEHUNDRED)\n\t{\n\t\t\n\t\tprintf(\"error!\\n\");\n\t} \n\telse\n\t{\n\t\tcheckresult=CheckInput(*m,300);\n\t\tif (checkresult==ISNOT_POSITIVEINT)\n\t\t{\n\t\t\tprintf(\"error!\\n\");\n\t\t} \n\t\telse if (checkresult==ISMORETHAN_THREEHUNDRED)\n\t\t{\n\t\t\t\n\t\t\tprintf(\"error!\\n\");\n\t\t} \n\t\telse\n\t\t{\n\t\t\tif (*n==0 && *m==0)\n\t\t\t{\n\t\t\t\n\t\t\t} \n\t\t\telse if (*n==0 || *m==0)\n\t\t\t{\n\t\t\t\tprintf(\"error!\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 1;\n\t\t\t}\t\n\t\t}\n\t}\n\treturn 0;\n}\n\n//??????n?m?????\nvoid InsertIntoLinkIO( LinkIOHead * iohead ,int n,int m) \n{\n\tLinkIO *p;\n\tp=(LinkIO *) malloc(sizeof(LinkIO));\n\tif (p==NULL)\n\t{\n\t\tprintf(\"error!\");\n\t\tprintf(\"error,n=%d,m=%d!\\n\",n,m);\n\t\treturn;\n\t}\n\tp->n=n;\n\tp->m=m;\n\tp->king=0;\n\tp->next =NULL;\n\tif (iohead->head==NULL && iohead->tail==NULL)\n\t{\n\t\tiohead->head=p;\n\t\tiohead->tail=p;\n\t\tiohead->total=1;\n\t} \n\telse\n\t{\n\t\tiohead->tail->next=p;\n\t\tiohead->tail=p;\n\t\tiohead->total=iohead->total+1;\n\t}\n}\n\n//????\nint GetKing( int kn, int km ) \n{\n\tint king=0,i=0,j=0;\n\tint kresult=0;\n\tfor (i=2;i<=kn;i++)\n\t{\n\t\tkresult=(kresult+km) % i;\n\t}\n\treturn kresult+1;\n}\n\n//???\nint main(){\n\tint inputresult=0;\n\tint king=0;\n\tLinkIOHead *iohead;\n\tLinkIO *p;\n\t\n\tiohead=(LinkIOHead *)malloc(sizeof(LinkIOHead));\n\tif (iohead==NULL)\n\t{\n\t\tprintf(\"error!\");\n\t\treturn 0;\n\t}\n\tiohead->head=NULL;\n\tiohead->tail=NULL;\n\tiohead->total=0;\n\n\tinputresult=GetUserInput(&n,&m);\n\twhile (inputresult==1)\n\t{\n\t\tInsertIntoLinkIO(iohead,n,m);\n\t\tinputresult=GetUserInput(&n,&m);\n\t}\n\t\n\tp=iohead->head;\n\twhile (p!=NULL)\n\t{\t\t \n\t\tking=GetKing(p->n,p->m);\n\t\tp->king=king;\n\t\tp=p->next;\n\t}\n\t\n\tp=iohead->head;\n\twhile (p!=NULL)\n\t{\n\t\tprintf(\"%d\\n\",p->king);\n\t\tp=p->next;\n\t}\n\t\n\tif (iohead!=NULL)\n\t{\n\t\tfree(iohead);\n\t}\n\tif (p!=NULL)\n\t{\n\t\tfree(p);\n\t}\n\n\treturn 0;\n}"} +{"label": "79", "index": "39274", "code": "struct number{\n int num;\n struct number *next;\n};\nint main(void)\n{\n int n,m,i;\n struct number *p,*head,*q;\n while(scanf(\"%d%d\",&n,&m)&&n>0&&m>0){\n p=(struct number *) malloc(LEN);\n head=p; \n for(i=0;inum=i+1;\n p->next=(struct number *) malloc(LEN);\n p=p->next;\n }\n p->num=n;\n p->next=head;\n q=p;\n while(p->next!=p){\n for(i=0;inext;\n q=p;\n p=p->next;\n q->next=p->next;\n p=q;\n }\n printf(\"%d\\n\",p->num);\n }\n return 0;\n}\n"} +{"label": "79", "index": "39275", "code": " void hehe(int n,int m)\n {\n int a[300],b[300],c,i,j;\n for(i=1;i<=n;i++)\n a[i]=i;\n for(i=n;i>1;i--)\n {\n\t c=(m%i);\n\t for(j=c+1;j<=i;j++)\n\t b[j-c]=a[j];\n\t for(j=1;j=j)\n a[k]=a[k+1];\n }\n printf(\"%d\\n\",a[1]);\n scanf(\"%d %d\",&n,&m); \n }\n \n getchar();\n getchar();\n}"} +{"label": "79", "index": "39277", "code": "int main()\n{\n\twhile(1)\n\t{\n\t\tint n,m;int a[310]={0};\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0) break;\n\t\tint i=0,j=-1;\n\t\twhile(1)\n\t\t{\n\t\t\ti=i+1;\n\t\t\tj=j+1;\n\t\t\tif(j==n)\n\t\t\t{\n\t\t\t\tj=j-n;\n\t\t\t}\n\t\t\tif(a[j]==1)\n\t\t\t{\n\t\t\t\ti=i-1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(i==m)\n\t\t\t{\n\t\t\t\ta[j]=1;\t\n\t\t\t\ti=i-m;\n\t\t\t}\n\t\t\tint s=0,win=0,q=0;\n\t\t\tfor(q=0;q1)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(q==n)\n\t\t\t{\n\t\t\t\tprintf(\"%d\\n\",win+1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"} +{"label": "79", "index": "39278", "code": "int queue[90010];//?? \n\nint main()\n{\n // freopen(\"1.in\",\"r\",stdin);\n // freopen(\"1.out\",\"w\",stdout);\n int n,m;\n while(1)\n {\n cin>>n>>m;\n if(n==0&&m==0) break;\n int front=0,rear=n;//??????????????????? \n for(int i=0;ia =i;\n\t\tif(i==1)\n\t\t{\n\t\t\thead=newnode;\n\t\t\tthisnode=head;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthisnode->next =newnode;\n\t\t\tthisnode=newnode;\n\t\t}\n\t\t\n\t}\n\tthisnode->next =head;\n\treturn head;\n}\n\nvoid shuchu(int n, int m)\n{\n\tstruct mon *head;\n\tint i;\n\thead=app(n);\n\n\tdo\n\t{\n\tfor(i=1;inext ;\n\thead->next =head->next ->next ;\n\thead=head->next ;\n\t}while(head->next !=head);\n\n\tprintf(\"%d\\n\",head->a );\n\n}\n\n\nint main()\n{\n\tint n,m,sign=1;\n\n\tfor(;sign;)\n\t{\n\t\tscanf(\"%d%d\",&n, &m);\n\t\tif(m==1)\n\t\t\tprintf(\"%d\\n\",n);\n\t\telse\n\t\t{\n\t\tif(n!=0)\n\t\t\tshuchu(n, m);\n\t\telse sign=0;\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\n"} +{"label": "79", "index": "39280", "code": "/*??*/\nint king;\nint monkeynum(int [],int);\nvoid main()\n{\n\tint m[20],n[20],i,j,k,start,casenum,monkey[300];\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d %d\",&n[i],&m[i]);\n\t\tif(!m[i]) break;\n\t}\n\tcasenum=i;\n\tfor(i=0;i0)\n\t\t\t{\n\t\t\t\tif(start==n[i]) start=0;\n\t\t\t\t\t/*printf(\"start=%d\",start);\n\t\t\t\t\tgetchar();*/\n\t\t\t\tif(monkey[start]) --k;\n\t\t\t\t\t/*printf(\"k=%d\",k);\n\t\t\t\t\tgetchar();*/\n\t\t\t\t++start;\n\t\t\t}\n\t\t\tmonkey[start-1]=0;\n\t\t\t\t/*printf(\"kill monkey %d\",start);\n\t\t\t\tgetchar();\n\t\t\t\tprintf(\"start=%d\",start);\n\t\t\t\tgetchar();*/\n\t\t}\n\t\tprintf(\"%d\",king);\n\t\tif(inum);\n\t\t cout<next;\n\t }\n}\n\nint main()\n{\n\tint n,m,i,g,s=0;\n\n\tstruct results *head,*p1,*p2;\n\t\n\thead=NULL;\n\tp1=(struct results*)malloc(LEN);\n\tp2=(struct results*)malloc(LEN);\n\tg=0;\n\n\twhile(scanf(\"%d%d\",&n,&m)!=EOF&&(m&&n)) \n\t{ \n\t\tif (m<=0||n>300)\n\t\t{\n\t\t\tprintf(\"?????0num=s+1;\n \tg=g+1;\n \t\tif(g==1) head=p1;\n \t\telse p2->next=p1;\n \t\tp2=p1;\n \t\tp1=(struct results*)malloc(LEN);\n\t}\n\tp2->next=NULL;\n\n\tprint0(head);\n\treturn 0;\n}"} +{"label": "79", "index": "39282", "code": "main()\n{\n\tint gg;\n\tfor(gg=0;;gg++)\n\t{\n\tint n,k=0,i,m,j,a[301],kick=0;\n\t\n\tfor(i=1;i<=301;i++)a[i]=1;\n\tscanf(\"%d %d\",&n,&m);\n\tif(m==0)\n\tbreak;\n\tif(n==1)printf(\"1\\n\");\n\telse{\n\tfor(j=0;;j++)\n\t{\n\t\tfor(i=1;i<=n;i++)\n\t\t{\n\t\t\tif(a[i]==1)\n\t\t\t{k+=1;if(k==m){a[i]=0;kick+=1;k=0;if(kick==n-1){goto loop;}}}\n\t\t}\n\t\t\n\t}\n\tloop:for(i=1;i<=n;i++)\n\t{if(a[i]==1)printf(\"%d\\n\",i);}\n\t}\t}\t\n\t\t\t\n \n}"} +{"label": "79", "index": "39283", "code": "int main()\n{\nint t=0;\nint n[300],m[300];\nfor(int i=0;i<300;i++){\n\tscanf(\"%d\",&n[i]);\t\n\tscanf(\"%d\",&m[i]);\n\t\tt++;\n\tif(m[i]==0||n[i]==0){goto next;}\n}\nnext:for(int k0=0;k0>n>>m;\n if ((n==0)&&(m==0)) break;\n for (int i=0;i<(n-1);i++)\n {\n sum=0;\n for (;sumn) pos=pos%n;\n if (dp[pos]==0) sum++;\n }\n dp[pos]=1;\n }\n for (int i=1;i<=n;i++)\n if (dp[i]==0) \n {\n cout<0&&n>0)\n\t\tprintf(\"%d\\n\",f(m,n));\n\telse\n\t\tbreak;\n\t}\n}\n\t\n"} +{"label": "79", "index": "39289", "code": "\nstruct monkey\n{\n\tint x;\n\tstruct monkey *l,*r;\n};\n\nint guowang(int n,int m)\n{\n\tint wang,i,j;\n\tstruct monkey *p,*s,*t;\n\tp=(struct monkey *)malloc(n*sizeof(monkey));\n\tfor(i=1;ix=i+1;\n\t\t(p+i)->l=p+i-1;\n\t\t(p+i)->r=p+i+1;\n\t}\n\tp->x=1;\n\t(p+n-1)->x=n;\n\tp->l=p+n-1;\n\tp->r=p+1;\n\t(p+n-1)->l=p+n-2;\n\t(p+n-1)->r=p;\n\tfor(i=1;ir;\n\t\tt=s->l;\n\t\tt->r=s->r;\n\t\tt=s->r;\n\t\tt->l=s->l;\n\t\tp=t;\n\t}\n\twang=p->x;\n\treturn wang;\n}\n\n\nint main()\n{\n\tint n[100],m[100],l,a[100],i;\n\tfor(l=0;;l++)\n\t{\n\t\tscanf(\"%d %d\",&n[l],&m[l]);\n\t\tif(n[l]==0&&m[l]==0)\n\t\t\tbreak;\n\t\telse\n\t\t\ta[l]=guowang(n[l],m[l]);\n\t}\n\t\n\tfor(i=0;i>n>>m,n||m)\n\t{\n\t\tfor(i=0;i1;n--){\n\t\t\tk=m;\n\t\t\twhile(k>1){\n\t\t\t\tif(a[s]==1){k--;}\n\t\t\t\ts++;\n\t\t\t\ts%=p;\n\t\t\t}\t\n\t\t\twhile(a[s]==0)\n\t\t\t{s++;s%=p;}\n\t\t\ta[s]=0;//cout<> n >> m;\n\t\tif (m == 0 && n == 0)\n\t\t\tbreak;\n\t\tint a[301] = {0}, i = 0, num = 0, baoshu = 0;\n\t\twhile (num != n - 1)\n\t\t{\n\t\t\ti++;\n\t\t\tif (a[i] == 0)\n\t\t\t\tbaoshu++;\n\t\t\tif (baoshu == m)\n\t\t\t{\n\t\t\t\ta[i] = 1;\n\t\t\t\tbaoshu = 0;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tif (i == n)\n\t\t\t\ti = 0;\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] == 0)\n\t\t\t\tcout << i << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39293", "code": "\nint main(void)\n{\n\tint m,n;\n\tint *p;\n\tint i,j,k,l;\n\twhile(1){\n\t scanf(\"%d%d\",&n,&m);\n\t if(n==0&&m==0)\n\t\t break;\n\n\t p=(int*)malloc(sizeof(int)*n); /*??????????,???????????*/\n\n\t for(i=0;i> n >> m;\t//??n?0??? \n\t\tif (n == 0){break;}\n\t\tfor (int i = 1; ; i ++)\n\t\t{\n\t\t\tif (i == n + 1)\t//????n+1,?????1 \n\t\t\t{\n\t\t\t\ti = 1;\n\t\t\t}\n\t\t\tif (p[i] == 1)\t//????????????????? \n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tq ++;\t\t//???????????????(q++); \n\t\t\tif (q == m)\t//???????m \n\t\t\t{\n\t\t\t\tp[i] = 1;\t//???? \n\t\t\t\tcount ++;\t//??????+1 \n\t\t\t\tif(count == n)\t//?????????? \n\t\t\t\t{\n\t\t\t\t\tcout << i << endl;//?????????? \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//????????????????;\n\t\t\t\tq = 0;\t \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}while(1);\nreturn 0;\n}\n"} +{"label": "79", "index": "39296", "code": "main()\n{\n char n[300]={'\\0'};\n int m,i,j,k,d;\n int x=1;\n int num;\n \n for(x=1;x<=2;)\n {\n scanf(\"%d %d\",&num,&m);\n if(num==0&&m==0)\n break;\n if(num==1)\n {\n printf(\"1\\n\");\n continue;\n }\n for(i=0;i<=num-1;i++)\n {\n n[i]='1';\n }\n int count=0;j=1;i=0;\n for(d=1;;d++)\n {\n \n j=0;\n for(;i<=num;)\n { \n if(n[i]!='\\0')\n { j=j+1;\n if(j==m)\n { n[i]='\\0';\n count++;\n break;}\n if(i==num-1&&j=num)\n i=0;\n \n }\n if(count==num-1)\n break;\n }\n for( i=0;i<=num;i++)\n {\n if(n[i]!='\\0')\n break;\n }\n printf(\"%d\\n\",i+1);\n }\n}\n\n"} +{"label": "79", "index": "39297", "code": "int main()\n{\n\n while(1)\n {\n int m;\n int n;\n int i=0;\n int a=0;\n int b=0;\n int sz[1000];\n int numofking=0;\n int c=0;\n scanf(\"%d%d\",&n,&m);\n if(n==0||m==0)\n break;\n c=n;\n for(i=0; i1)\n {\n while(anext!=temp)\n\t{\n\t\tif(m==1)\n\t\t\treturn(n);\n\t\tfor(i=0;inext;\n\t\t}\n\t\ttemp->next=(temp->next)->next;\n\t\ttemp=temp->next;\n\t}\n\treturn(temp->num);\n}\n\nvoid main()\n{\n\tstruct monkey *temp=NULL,*pt=NULL,*head=NULL;\n\tint i,m=1,n=1;\n\twhile(m!=0&&n!=0)\n\t{\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0)\n\t\t\tbreak;\n\t\tfor(i=0;inext=pt;\n\t\t\t\ttemp=pt;\n\t\t\t}\n\t\t\tpt->num=i+1;\n\t\t}\n\t\tpt->next=head;\n\t\tprintf(\"%d\\n\",monkeyking(n,m,head));\n\t}\n}"} +{"label": "79", "index": "39300", "code": "main()\n{\n\tint m,n,h[301],i,k,num,leave,last;\n\tdo\n\t{\n\tscanf(\"%d%d\",&n,&m);\n\tfor(i=0;i<=n;i++) h[i]=1;\n\tnum=0;\n\tk=0;\n\tleave=n;\n\tdo\n\t{\n\t\tif(h[num]==1)\n\t\tif(k!=m)\n\t\t{\n\t\t\tk++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tk=1;\n\t\t\th[num]=0;\n\t\t\tleave--;\n\t\t\tlast=num;\n\t\t}\n\t\tif(num!=n) num++;\n\t\telse num=1;\n\t}while(leave>0);\n\tif(last>0) printf(\"%d\\n\",last);\n\t}while(last>0);\n\treturn(0);\n}"} +{"label": "79", "index": "39301", "code": "int main(int argc, char *argv[])\n{\n\tint m[10000], n[10000], s[10000], i;\n\tfor (i=0;;i++)\n\t{\n\t\tcin >> n[i];\n\t\tcin >> m[i];\n\t\tif (n[i]==0&&m[i]==0) break;\n\t}\n\tfor (int j=0;j1)\n\t\t{\n\t\t\tfor(j=0;j>m>>n;\n\twhile(m!=0)\n\t{\n\tfor(i=1;i<=m;i++)\n\t {a[i]=i;}\n\tfor(j=0;j<(m-1);j++)\n\t{\n\t\tc=(c+n-1)%(m-j);\n\t if(c==0) c=m-j;\n\t for(i=c;i<(m-j);i++)\n\t\t{a[i]=a[i+1];}\n\t} \n\t b[k]=a[1];\n\t\tk=k+1;\n\t\tcin>>m>>n;\n\t\tc=1;\n\t}\n\tfor(d=0;d1;i++)\n{i=i%n;\nif (a[i]==0) continue;\nelse h++;\nif (h==m) {s--;a[i]=0;h=0;}\n}\nfor (i=1;i<=n;i++)\nif (a[i]==1) return i;\n}\nint main ()\n{int a0,b,c;\nwhile (1)\n{scanf (\"%d %d\",&a0,&b);\nif (a0==0 && b==0) break;\nc=ysf(a0,b);\nprintf (\"%d\\n\",c);\n}\nreturn 0;\n}"} +{"label": "79", "index": "39309", "code": "void main()\n{\n\tint n,m,i,j,a[300];\n\tint *p,*end;\n\tscanf(\"%d%d\",&n,&m);\n\twhile(m||n)\n\t{\n\t\tif(n==1)\n\t\t{printf(\"1\\n\");\n\t\tgoto loop;\n\t\t}\n\t\tend=a+n;\n\t\tfor(p=a;p=end)p-=n;\n\t\t\t\tif(*p==0)j--;\n\t\t\t}\n\t\t\t*p=0;\n\t\t}\n\t\t\n for(i=1;i<=n;i++)\n\t\t\tif(a[i-1]!=0)printf(\"%d\\n\",i);\nloop:scanf(\"%d%d\",&n,&m);\n\t}\n\n}\n\t\t\t"} +{"label": "79", "index": "39310", "code": "struct monkey\n{\n\tint n;\n\tint m;\n};\nstruct monkey mon[100];\nvoid main()\n{ int i=0,j;\n int b[100];\n\t int wang(int a,int c);\n\tdo\n\t{ scanf(\"%d%d\",&mon[i].n,&mon[i].m);\n\ti++;}while(mon[i-1].n!=0&&mon[i-1].m!=0);\n\tfor(j=0;j> n >> m)\n\t{\n\t\tif (n == 0 && m == 0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tfor (i = 1; i <= n; i ++)\n\t\t{\n\t\t\ta[i] = 1;\n\t\t}\n\t\tk = 0;\n\t\tt = 0;\n\t\tcount = 1;\n\t\twhile (count <= n)\n\t\t{\n\t\t\tk ++;\n\t\t\tif (k == n + 1)\n\t\t\t{\n\t\t\t\tk = 1;\n\t\t\t}\n\t\t\tif (a[k] != 0)\n\t\t\t{\n\t\t\t\tt ++;\n\t\t\t\tif (t == m)\n\t\t\t\t{\n\t\t\t\t\ta[k] = 0;\n\t\t\t\t\tb[count] = k;\n\t\t\t\t\tcount ++;\n\t\t\t\t\tt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcout << b[n] << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39314", "code": "int main()\n{\n\tint a[301],n,m;\n\twhile(1)\n\t{\n\t\tint i,j=0,k=0;\n\tcin>>n>>m;\n\tif(n==0)\n\t\tbreak;\n\tfor(i=1;i<=n;i++)\n\t a[i]=1;\n\tfor(i=1;i<=n;i++)\n\t{\n\t\t\tj=j+a[i];\n\t\t\tif(j==m)\n\t\t\t{\n\t\t\t\ta[i]=0;\n\t\t\t\tj=0;\n\t\t\t\tk++;\n\t\t\t}\n\t\tif(k==n)\n\t\t{\n\t\t\tcout<>N>>m;\n\t\tif ( N!=0 && m!=0)\n\t\t{\n\t\t\tfor(;;)//?????\n\t\t\t{\n\t\t\t\tif ( N!=1)\n\t\t\t\t{\n\t\t\t\t\ttemp1=m % N-1;//??????\n\t\t\t\t\tif ( temp1 != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( i=temp1; i0 ; k--)//??????\n\t\t\t\t\t\t\t\tn[k]=n[k-1];\n\t\t\t\t\t\t\tn[0]=temp2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tN--;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t\tcout<(n-i+1))\n k=k-n+i-1;\n if(k==(n-i+1))\n a[k]=a[k+1];\n else\n {\n for(h=k;h<=n-i;h++)\n a[h]=a[h+1];\n }\n }\n printf(\"%d\\n\",a[1]);\n scanf(\"%d%d\",&n,&m);\n }\n while(n!=0);\n return 0;\n}"} +{"label": "79", "index": "39321", "code": "\nint main()\n{\n int n, m, i, s=0;\n while(cin>>n>>m && n!=0 && m!=0)\n {\n s=0;\n for(i=2; i<=n; i++) \n s=(s+m)%i;\n cout<1);\n\t\t\tprintf(\"%d\\n\",x[0]);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39326", "code": "int main()\n{\n\tint n, m, a[301] = {0}, k, i, j;\n while(cin >> n >> m && n != 0)\n\t {\n for(i = 1; i <= n; i++)\n\t\t a[i] = 1;\n\t j = 0;\n\t\tk = 0;\n\t\tfor (i = 1; i <= n+1; i++)\n\t\t{\n\t\t\tif (a[i] == 1)\n\t\t\t\tj = j+ a[i];\n\t\t\tif (j == m)\n\t\t\t{\n\t\t\t\tj =0;\n\t\t\t\ta[i] =0;\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tif (k == n)\n\t\t\t{\n\t\t\t\tcout << i << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (i == n+1)\n\t\t\t\ti =0;\n\t\t}\n\n\t }\n\treturn 0;\n}"} +{"label": "79", "index": "39327", "code": "void main()\n{\n\tint a[100][300],b[100],c[100],i=0,j=0,k=0,m=0,n=0;\n\tdo{\n\t\tscanf(\"%d %d\",&b[i],&c[i]);\n\t\ti++;\n\t}\n\twhile(b[i-1]!=0&&c[i-1]!=0);\n\tm=i-1;\n\tfor(i=0;i1;j++)\n\t\t{\n if(j>=b[i]) j=j-b[i];\n\t\t\tif(a[i][j]!=0) k++;\n\t\t\tif(k==c[i])\n\t\t\t{\n\t\t\t\ta[i][j]=0;\n\t\t\t\tn=n-1;\n\t\t\t\tk=0;\n\t\t\t}\t\n\t\t}\n\t}\n\tfor(i=0;i1) \n\t { \n\t \n\t for (i=0;i1)\n\t{\n\t\tj=(j-1+m)%n;\n\t\tif(j!=0)\n\t\t{\n\t\t\tfor(i=j;i=p)\n\t{\n\t\tfor(i=1;i<=k-p;i++)\n\t\t\tb[i]=a[p+i];\n\t\tfor(i=k-p+1;i<=k-1;i++)\n\t\t\tb[i]=a[i+p-k];\n\t\tfking(b,k-1,p);\n\t}\n\telse\n\t\tif(k>0&&k=2)\n\t\t\t\tfking(b,k-1,p);\n\t\t\telse\n\t\t\t\tprintf(\"%d\\n\",b[1]);\n\n\t\t}\n}\n\n"} +{"label": "79", "index": "39335", "code": "int main()\n{int n,m,a[301],k,i,j,num;\nfor(int p=0;p<100;p++)\n\n{cin>>n;\ncin>>m;\nif(n!=0)\n{for(i=1;i<=n;i++)\n{a[i]=1;}\nj=0;\nk=0;\nfor(i=1;i<=n;i++)\n{\n if(a[i]==1)\n {\n j=j+a[i];\n if(j==m)\n {\n\t\t j=0;\n a[i]=0;\n k++;\n\t }\n if(k==n)\n {\n\t\t num=i;break;\n\t}\n }\n if(i==n)\n i=0;\n}\ncout<data = 0;\n\tp->next = NULL;\n\tplink->head = p;\n\tplink->tail = p;\n\treturn 0;\n}\n\n//insert a node with data = value at the end of the list \nint insert_link( struct link *plink ,int value )\n{ \n\tstruct node *p = (struct node *)malloc( sizeof(struct node) ); //dynamic allocate memory\n\tif ( p==NULL )\n\t\treturn -1;\n\tp->data = value;\n\tp->next = NULL;\n\tplink->tail->next = p;\n\tplink->tail = p;\n \n\treturn 0;\n}\n\n//delete the next node of *pnode from the linklist\n//if *pnode is the last node then delete the first node\nint delete_link( struct link *plink,struct node *pnode)\n{\n // if delete the first node\n\t//if ( plink->head == pnode ) \n struct node *p = pnode->next;\n\tif ( p == NULL ){ //delete the first node \n pnode = plink->head;\n\t p = plink->head->next;\n\t pnode->next = pnode->next->next;\n\t} else if ( plink->tail == p ){\n\t pnode->next = NULL;\n\t plink->tail = pnode; \n\t}\n\telse {\n pnode->next = pnode->next->next;\n\t}\n \n\tfree(p);\n\treturn 0;\n \n}\n\nint destroy_link( struct link *plink )\n{\n\tstruct node *p = plink->head ;\n\tstruct node *q;\n\twhile( p != NULL )\n\t{\n q = p->next ;\n\t free(p);\n\t p = q;\n\t}\n\tplink->head = NULL;\n\tplink->tail = NULL;\n\treturn 0;\n}\n\n// slove problem \n// n the number of monkeys\n// m the count number\nint solve( int n,int m)\n{\n\tint i,j,result;\n\tstruct link link1;\n\tstruct node *p;\n\t// p mark the position count begins\n\t// p mark the position to delete\n\t// p point to the pre node of the node to be deleted\n init_link( &link1 );\n for(i=1;i<=n;i++)\n\t\tinsert_link(&link1,i);\n p = link1.head;\n\tfor(i=1;inext == NULL )\n\t\t\t p = link1.head->next;\n\t\t else\n p = p->next;\n\t\t} \n\t\t//delete\n delete_link( &link1,p);\n\t}\n // at last left one \n result = link1.head->next->data;\n\tdestroy_link( &link1 );\n return result;\n\n}\n\nint main()\n{\n int n,m,k;\n\tstruct link link1;\n\tstruct node *p;\n init_link( &link1 );\n\tscanf(\"%d %d\",&n,&m);\n while( n || m )\n\t{ \n k=solve(n,m);\n\t\tinsert_link(&link1,k);\n\t\tscanf(\"%d %d\",&n,&m);\n\t}\n p = link1.head;\n\twhile( p->next != NULL )\n {\n\t\tprintf(\"%d\\n\",p->next->data );\n\t\tp = p->next ;\n\t}\n\tdestroy_link( &link1 );\n\t\n\treturn 0;\n}"} +{"label": "79", "index": "39340", "code": "int main()\n{\n\tint i,j,num,king,check[350]={0},m,n,count=0;\n\tfor(;;)\n\t{\n\t\tcin>>n>>m;\n\t\tif(m==0&&n==0)\n\t\t\tbreak;\n\t\tfor(i=1;i<320;i++)\n\t\t\tcheck[i]=1;\n\t\tcount=0;\n\t\tfor(i=1;;i++)\n\t\t{\n\t\t\tif(i==n+1)\n\t\t\t\ti=1;\n\t\t\tif(check[i]==1)\n\t\t\t\tcount++;\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\tif(count==m)\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t\tcheck[i]=0;\n\t\t\t}\n\t\t\tfor(j=1;j<=n;j++)\n\t\t\t{\n\t\t\t\tif(check[j]==1)\n\t\t\t\t{\n\t\t\t\t\tnum++;\n\t\t\t\t\tking=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(num==1)\n\t\t\t{\n\t\t\t\tcout<1){\n\t\t\tfor(int i=0;i=n)\n\t\t\ti=0;\n\t\tif (j==m)\n\t\t{\n\t\t\tfor (f=i;fa);\n\t}\n\telse printf(\"%d\\n\",n);\nscanf(\"%d%d\",&n,&m);\n}\nwhile(n!=0);\n\n\n\n\nreturn 0;\n}\n\n\n\nstruct monkey *creat (int n)\n{\nstruct monkey *p1,*p2,*head;\nint i;\nhead=p1=(struct monkey *)malloc(LEN);\nfor(i=0;ia=i+1;\np2=p1;\np1=(struct monkey *)malloc(LEN);\np2->next=p1;\n\n}\np2->next=head;\n\nreturn (head);\n}\nstruct monkey *delet(struct monkey *head,int m,int n)\n{\n struct monkey *p2=head;\n int i;\n while(head->next!=head)\n {\n \n if((m!=2)&&(m<=n))\n {\n\t for(i=0;inext;\n \n }\n\t p2->next=head->next;\n head=head->next;\n }\n else\n {\n\t if(m>n)\n\t {\n\t\t for(i=0;inext;\n \n }\n\t \n\t p2->next=head->next;\n head=head->next;\n\t }\n\t else\n { \n\t p2=head;head=head->next;p2->next=head->next;head=head->next;}\n }\n n=n-1;\n\t}\nreturn (head);\n}"} +{"label": "79", "index": "39345", "code": "\nint main()\n{\n int n,m;\n int a[N];\n int i,j,r;\n int t;\n\n while(1)\n {\n scanf(\"%d %d\",&n,&m);\n \n if(n==0)\n break;\n\n for(i=1;i<=n;i++)\n {\n a[i]=i;\n }\n\n for(r=0;r0;i++,k++)\n\t\t{\n\t\t\tif(m[t]==1)\n\t\t\t{\n\t\t\t\ta[0]=a[r];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(k==m[t])\n\t\t\t{\n\t\t\t\tif(i==r)\n\t\t\t\t{\n\t\t\t\t\tk=1;\n\t\t\t\t\ti=0;\n\t\t\t\t\tr--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tk=1;\n\t\t\t\tfor(j=i;j=r)\n\t\t\t\ti=-1;\n\t\t}\n\t\tb[t]=a[0];\n\t}\n\tfor(i=0;i0)\n\t\t\tprintf(\"\\n\");\n\t\tprintf(\"%d\",b[i]);\n\t}\n}\n\t\t\t\t"} +{"label": "79", "index": "39347", "code": "main()\n{\n int i,j;\n int N=0;\n int n[100]={0},m[100]={0},x[100]={0};;\n for (i=0;;i++)\n {\n scanf (\"%d %d\",&n[i],&m[i]);\n N=N+1;\n if (n[i]==0) break;\n }\n for (i=0;i<=N-2;i++)\n {\n for (j=1;j<=n[i]-1;j++)\n {\n x[i]=(x[i]+m[i])%(j+1);\n }\n printf (\"%d\\n\",x[i]+1);\n }\n}\n"} +{"label": "79", "index": "39348", "code": "int main()\n{\n int n,m,i;\n scanf(\"%d%d\",&n,&m);\n while(n!=0&&m!=0)\n {\n int bh=0;\n if(n==1){printf(\"1\\n\");}\n else\n {\n for(i=2;i<=n;i++)\n {\n bh=(bh+m)%i;\n }\n printf(\"%d\\n\",bh+1);\n }\n scanf(\"%d%d\",&n,&m);\n }\n return 0;\n}"} +{"label": "79", "index": "39349", "code": "int main()\n{\n int n,m,s,i;\n \n scanf(\"%d %d\",&n,&m);\n while(n!=0)\n {\n \n s=0;\n for(i=2;i<=n;i++)\n s=(s+m)%i;\n printf(\"%d\\n\",s+1);\n scanf(\"%d %d\",&n,&m);\n }\n \n\n \n getchar();getchar();getchar();\n }\n"} +{"label": "79", "index": "39350", "code": "void main()\n{void search(int m,int n);\n\tint m,n,k=1,i,j=0,*p,a[300],b[10][2];\n\tfor(i=0;;i++)\n\t{\n\tscanf(\"%d %d\",&b[i][1],&b[i][2]);\n\tif(b[i][1]==0)break;\n\t}\nfor(j=0;j>n>>m;\n\tif((m==0)&&(n==0))\n\t\tbreak;\n\tfor(i=1;i<=n;i++) //?a[i]??????\n\t\ta[i]=1;\n\tt=n;\n\tk=0;\n\ti=0;\n\twhile(n>1) //?????????????????\n\t{\n\t\tk=k+1;\n\t\ti=i+1;\n\t\tint i0=i;\n\t\tfor(;;i0++)\n\t\t{\n\t\tif(i0>t)\n\t\t\ti0=i0-t;\n\t\tif(a[i0]==1)\n\t\t { \n\t\t\ti=i0;\n\t\t break;\n\t\t }\n\t\t}\n\t\tif(k==m)\n\t\t{\n\t\t\ta[i]=0;\n\t\t\tk=0;\n\t\t\tn=n-1;\n\t\t}\n\t}\n\tfor(i=1;i<=t;i++) //????????????????\n\t{\n\t\tif(a[i]==1)\n\t\t\tcout<1;l--)\n\t\t{\n\t\t\tif(m%l==0) \n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse \n\t\t\tk=m%l;\n\t\t\tfor(i=1;i<=l-k;i++)\n\t\t\t{\n\t\t\t\tc[i]=a[k+i];\n\t\t\t}\n\t\t\tfor(i=l-k+1;i<=l-1;i++)\n\t\t\t{\n\t\t\t\tc[i]=a[i-l+k];\n\t\t\t}\n\t\t\tfor(i=1;i<=l-1;i++)\n\t\t\t{\n\t\t\t\ta[i]=c[i];\n\t\t\t}\n\t\t}\n\t\tb[j]=a[1];\n\t\tr++;\n\t}\n\tfor(j=1;j<=r;j++)\n\t{\n\t\tprintf(\"%d\\n\",b[j]);\n\t}\n}\n\n"} +{"label": "79", "index": "39353", "code": "int main()\n{\n\tint n,m,i,j;\n\tint houwang(int n,int m);\n\tint y[100];\n\tfor(i=0;i<100;i++)\n\t{\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif(n==0&&m==0)\n\t\t\tbreak;\n\t\telse \n\t\t y[i]=houwang(n,m);\t\n\t}\n\tfor(j=0;j=m)\n\t\t\t{\n\t for(i=1;i=1;a--)\n { \n e=b%a;\n if(e==0)\n e=a;\n for(d=1;d<=a;d++)\n f[d]=c[d];\n for(d=1;d<=(a-e);d++)\n c[d]=c[e+d];\n for(d=a-e+1;d<=a-1;d++)\n c[d]=f[d-(a-e)];\n }\n printf(\"%d\\n\",c[1]);\n scanf(\"%d%d\",&a,&b);\n } \n \n getchar();\n getchar();\n }"} +{"label": "79", "index": "39356", "code": "const int MAX_NUM = 300;\nint anLoop[MAX_NUM + 10];\nint main()\n{\nint n,m;\nwhile (1) {\nscanf(\"%d %d\",&n,&m);\nif (n==0) break;\nfor (int i=0; i=n[i])\n {k=0;} \n }\n printf(\"%d\\n\",f);}\n i++; \n }\n}\n"} +{"label": "79", "index": "39358", "code": "main()\n{\n\tint a[80][2],i,j,s;\n\tfor(j=0;;j++)\n\t{\n\t\ts=0;\n\t\tscanf(\"%d%d\", &a[j][0], &a[j][1]);\n\t\tif(a[j][0]==0) break;\n\tfor (i=2; i<=a[j][0]; i++)\n\t\ts=(s+a[j][1])%i;\n\tprintf(\"%d\\n\",s+1);\n\t}\n}\n"} +{"label": "79", "index": "39359", "code": "int main ()\n{\n\tint n, m, i, j, count, p, xh;\n\tint a[310]; // a??? ????????????\n\tint b[310]; // b???? ??????? ?????????????i???????????\n // ?????????????count?1\n\twhile (cin)\n\t{\n\t\tcin >> n >> m;\n\t\tif ((n == 0) && (m == 0)) return 0;\n\t\tfor (i = 1; i <= n; i++) a[i] = 1;\n\t\tcount = n;\n\t\tp = 1;\n\t\twhile (count != 1)\n\t\t{\n\t\t\t// ????????b??\n\t\t\txh = 1;\n\t\t\twhile (xh <= m)\n\t\t\t{\n\t\t\t\tif (a[p] == 1) xh++;\n\t\t\t\tif (p <= n - 1) p++;\n\t\t\t\telse p = (p + 1) % n;\n\t\t\t}\n\t\t\tif (p == 1) a[n] = 0;\n\t\t\telse a[p - 1] = 0;\n\t\t\tcount = count - 1;\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] == 1) cout << i << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39360", "code": "void main()\n{int i,k,q[100],t,r,n[100],m[100],num[300],*p;\nfor(t=0;t<100;t++)\n{ scanf(\"%d\",&n[t]);\n scanf(\"%d\",&m[t]);\n if(n[t]==0&&m[t]==0)\n break;\n}\n \nfor(r=0;rnumber=i;\n\t\t linkhead=a;\n\t\t linktail=a;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta=(struct Node *)malloc(1*sizeof(struct Node));\n a->number=i;\n\t\t\tlinktail->next=a;\n\t\t\tlinktail=a;\n\t\t}\n\t}\n\tlinktail->next=linkhead;\n\tlinkhead=linktail;\n\tfor(i=1;i<=(n-1);i++)\n\t{\n\tfor(j=0;j<(m-1);j++)\n\t{\n\t\tlinkhead=linkhead->next;\n\t}\n a=linkhead->next;\n\tlinkhead->next=a->next;\n\tfree(a);\n\t}\n\tking[count]=linkhead->number;\n\tcount++;\n\tfree(linkhead);\n}\n\tfor(i=0;i0)\n\t\t\tshu(n,m);\n\t\telse break;\n\t}\n}\n\n\n"} +{"label": "79", "index": "39365", "code": "struct jiegou\n{\n\tint a;\n\tstruct jiegou *next;\n};\nvoid main()\n{\n\tstruct jiegou *p1,*p2,*head,*p;\n\tint n,m;\n int i;\n int count=1;\n\twhile(1)\n\t{\n scanf(\"%d%d\",&n,&m);\n\t\tif(n==0)\n\t\t\tbreak;\n\t\tp1=(struct jiegou *)malloc(sizeof(struct jiegou));\n for(i=0;ia=1;\n\t\t\telse\n\t\t\t{\n\t\t\t\tp1=(struct jiegou *)malloc(sizeof(struct jiegou));\n\t\t\t\tp1->a=i+1;\n\t\t\t\tp2->next=p1;\n\t\t\t\tp2=p1;\n\t\t\t}\n\t\t}\n\t\tp2->next=head;\n \n p=head;\n\t\twhile(head->next!=head)\n\t\t{\n\t\tif(m!=1)\n\t\t{\n\t\t\tcount++;\n\t\t\tif(count==m)\n\t\t {\n\t\t\t if(p->next!=head)\n p->next=(p->next)->next;\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t p->next=(p->next)->next;\n\t\t\t\t\thead=p;\n\t\t\t }\n\t\t\t count=1;\n\t\t\t \n\t\t }\n\t\t \n p=p->next;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"%d\\n\",n);\n\t\t\tbreak;\n\t\t}\n\t\t \n\t\t \n\t\t}\n\t\tif(m!=1)\n\t\tprintf(\"%d\\n\",head->a);\n\t}\n\n}\n"} +{"label": "79", "index": "39366", "code": "int main()\n{\n\tint num[300] = {0};//??????0 \n\tint total[300] = {0};//? n\n\tint countNum[300] = {0};//? m\n\tint n = 1 ;\n\tint m = 1 ;\n\tint nn = 0 ;//?????\n\twhile(n!=0&&m!=0)\n\t{\n\t\tcin >> n >> m ;\n\t\ttotal[nn] = n ;\n\t\tcountNum[nn] = m ;\n\t\tnn ++ ;\n\t}\n\tint q ;\n\tfor(q = 0 ; q < nn ; q++)//????\n\t{\n\t\tn = total[q] ;\n\t\tm = countNum[q] ;\n\t\tint i ;\n\t\tfor( i= 0 ; i < n ; i ++)\n\t\t{\n\t\t\tnum[i] = 1 ;//?1???????????\n\t\t}\n\t\tint p = 0 ;//????????\n\t\tint k ;\n\t\tint n1 = n ;\n\t\twhile(n1 > 1)\n\t\t{\n\t\t\tfor(k = 1 ; k <= m ; k ++)//k??????\n\t\t\t{\n\t\t\t\tif(k == m)//?m???\n\t\t\t\t{\n\t\t\t\t\twhile(num[p] != 1)//????????\n\t\t\t\t\t{\n\t\t\t\t\t\tp ++;\n\t\t\t\t\t\tif(p >= n)\n\t\t\t\t\t\t\tp = 0 ;\n\t\t\t\t\t}\n\t\t\t\t\tnum[p] = 2 ;\n\t\t\t\t\tp ++ ;\t\t\t\n\t\t\t\t\tif(p >= n)//????????????\n\t\t\t\t\t\tp = 0 ;\n\t\t\t\t}else{\n\t\t\t\t\twhile(num[p] != 1)//????????\n\t\t\t\t\t{\n\t\t\t\t\t\tp ++;\n\t\t\t\t\t\tif(p >= n)\n\t\t\t\t\t\t\tp = 0 ;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tp++;\n\t\t\t\t\tif(p >= n)\n\t\t\t\t\t\tp = 0 ;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tn1 -- ;\t\t\n\t\t}\n\t\tfor(i = 0 ; i < n ; i ++)\n\t\t{\n\t\t\tif(num[i]==1)\n\t\t\t\tcout<<(i+1)<monkey+n-1)\n\t\t\t\tp-=n;\n\t\t\twhile(*p==0)\n\t\t\t{\n\t\t\t\tp+=1;\n\t\t\t\tif(p>monkey+n-1)\n\t\t\t\t p-=n;\n\t\t\t}\n\t\t}\n\t\t*p=0;\n\t\tnum-=1;\n\t}\n\ti=0;\n\twhile(monkey[i]==0)\n\t\ti+=1;\n\treturn(i+1);\n}\n\n\nvoid main()\n{\n\tint n,m,king;\n\tdo{\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif(n!=0&&m!=0)\n\t\t{\n\t\t king=calculate(n,m);\n\t\t printf(\"%d\\n\",king);\n\t\t}\n\t}while(n!=0&&m!=0);\n}"} +{"label": "79", "index": "39375", "code": "main()\n{ int n,m,i,j,k;\n int a[1000];\n \n \n for (;;)\n { \n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0) break;\n else\n{ for(i=1;i<=n;i++)\n a[i]=i;\n for(k=1,i=1;i<=n-1;i++)\n { k=(k+m-2)%(n+1-i)+1;\n for(j=k;j<=n-i;j++)\n a[j]=a[j+1]; }\n printf(\"%d\\n\",a[1]); \n}\n}\n\n}\n"} +{"label": "79", "index": "39376", "code": "main()\n{\n\tint m[301];\n\tint n[301];\n\tint o[301];\n\tint a[301][301];\n\tint i,j,k=0,p,q,r;\n\tfor(i=1;;i++)\n\t{\n\t\tscanf(\"%d %d\",&n[i],&m[i]);\n\t\tif(n[i]==0&&m[i]==0)break;\n\t\tk++;\n\t}\n\tfor(i=1;i<=k;i++)\n\t{\n\t\tfor(j=1;j<=n[i];j++)\n\t\t{\n\t\t\ta[i][j]=j;\n\t\t}\n\t}\n\tfor(i=1;i<=k;i++)\n\t{\n\t\tfor(j=0,q=1,p=1;p=2)\n \n{\n for(i=2;i<=n;i++)\n y=(y+m)%i;\n printf(\"%d\\n\",y+1);\n y=0;\n}\n else if(n==1)\n printf(\"%d\\n\",x);\n else if(m==0&&n==0) \n break;\n}\n \n}\n"} +{"label": "79", "index": "39379", "code": "int main()\n{\n\tint a[400];\n\tint n,m,i,j,count;\n\tcin >> n >> m;\n\tfor (i = 0; i < 400; i++)\n\t\ta[i] = 1;\n\tcount = 0;\n\ti = 0;\n\tj = 0;\n\twhile (n != 0)\n\t{\n\t\twhile (count < (n - 1))\n\t\t{\n\t\t\ti++;\n\t\t\tif (i == (n + 1))\n\t\t\t{\n\t\t\t\ti = 1;\n\t\t\t}\n\t\t\tif (a[i] != 0)\n\t\t\t{\n\t\t\t\tj++;\n\t\t\t\tif(j == m)\n\t\t\t\t{\n\t\t\t\t\ta[i] = 0;\n\t\t\t\t\tj = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] != 0)\n\t\t\t{\n\t\t\t\tcout << i << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < 400; i++)\n\t\t a[i] = 1;\n\t\tcin >> n >> m;\n\t\tcount = 0;\n\t\ti = 0;\n\t\tj = 0;\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39380", "code": "\n\nint main(int argc, char* argv[])\n{\n\tint m,n,k,i,turn,baoshu,ing,p;\n\tlong begin,end;\n\t\n\tint monkey[300];\n\tint king[2];\n\twhile(1){\n\tscanf(\"%d%d\",&n,&m);//??n?m\n\tif(n!=0){\n\t\tfor(i=0;i0)\n {\n if(a[index]==1)\n { \n ++t;\n if(t%n==0)\n {\n a[index]=0;\n loc=index;\n p--;\n } \n }\n if(index < m-1)\n index++;\n else\n index=0;\n }\n printf(\"%d\\n\",loc+1);\n }\n }\n}"} +{"label": "79", "index": "39384", "code": "void monkey(int a,int b)\n{\n\tint t[500],i,j,q=0,time;\n //sc(\"%d%d\",&a,&b);\n\t\n\tfor(i=0;i<500;i++)\n\t\tt[i]=-3;\n\tfor(i=0;i=a)\n\t\t\t\tq=q-a;\n\n\t\t\tif(t[q]==0)\n\t\t\t\ttime++;\n\t\t\tq++;\n\t\t\tif(time==b)\n\t\t\t{\n\t\t\t\tt[q-1]=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tfor(i=0;i 1)\n\t\t{\n\t\t\tfor(i=0; i1)\n\t\t{\n\t\t\tm0 = m;\n\t\t\twhile(m0!=1)\n\t\t\t{\n\t\t\t\tif(a[(p1+1)%n])\n\t\t\t\t{\n\t\t\t\t\tm0--;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tp1=(p1+1)%n;\n\n\t\t\t}\n\t\t\ta[p1] = 0;\n\t\t\twhile(a[p1%n]==0)\n\t\t\t{\n\t\t\t\tp1=(p1+1)%n;\t\t\t\t\t\n\t\t\t}\n\t\t\tn0 --;\n\t\t\t\n\t\t}\n\t\t\n\t\tprintf(\"%d\\n\",a[p1]);\n\t\t\n\t}\n\t\n\treturn 0;\n}"} +{"label": "79", "index": "39388", "code": "int main()\n{\n\t\n\t\t\t\t//i??????\n\twhile (1)\n\t{\n\t\tint m,n,j=1,count,k = 1 ,i=0,a[301] = {0};\n\t\tcin>> n>>m;\n\t\tif (n ==0)break;\n\t\tcount=n;\n\t\tj=0;\n\t\twhile(count > 1)\n\t\t{\n\t\t\ti++;\n\t\t\twhile(1)\n\t\t\t{\n\t\t\t\tif (k > n) k-=n;\n\t\t\t\tif (!a[k]) break;\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tif (i == m)\n\t\t\t{\n\t\t\t\ta[k] = 1;\n\t\t\t\ti = 0;\n\t\t\t\tcount--;\n\t\t\t\tk++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\t\n\t\t\tif (!a[i]) cout << i << endl;\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39389", "code": "void ysf(int n,int m)\n{\n\tint i,j,b[300]={0},num,p;\n\tnum=0;\n\tfor(i=1;i<=n-1;i++)\n\t{\n\t\tfor(j=1;j<=m;j++)\n\t\t{\n\t\t\tnum=num+1;\n\t\t\tif(num>n)\n\t\t\t\t\tnum=num-n;\n\t\t\twhile(b[num]==1)\n\t\t\t{\n\t\t\t\tnum=num+1;\n\t\t\t\tif(num>n)\n\t\t\t\t\tnum=num-n;\n\t\t\t}\n\t\t}\n\t\tb[num]=1;\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tif(b[i]==0)\n\t\t{\n\t\t\tprintf(\"%d\\n\",i);\n\t\t\tbreak;\n\t\t}\n\t}\n}\nvoid main()\n{\n\tint i,j,n[100],m[100];\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\t\tif(m[i]==0)\n\t\t\tbreak;\n\t}\n\tfor(j=0;jnext;p1=p1->next)\n\t{\t\n\t\tfor(i=1;inext,i++);\n\t\tp2=p1;\n\t\tp2=p2->next;\n\t\tp1->next=p2->next;\n\t}\n\treturn p1->num;\t\n}\n"} +{"label": "79", "index": "39392", "code": "void main() \n{ \n\tint n,m,i,a,b;\n a=0;\n b=0;\n\tfor(;;b++)\n\t{\n\t\tscanf(\"%d\",&n);\n\t\tscanf(\"%d\",&m);\n\t\tif(n==0 && m==0)\n\t\t\tbreak;\n\t\tfor(i=2;i<=n; i++)\n\t\t\ta=(a+m)%i;\n\t\t\tprintf(\"%d\\n\",a+1);\n\t\t\ta=0;\n\t}\nreturn 0;\n}"} +{"label": "79", "index": "39393", "code": "void main()\n{\n\tint i,k,f[301],n,m;\n\tscanf(\"%d%d\",&n,&m);\n\twhile (n*m!=0)\n\t{\n\t\tf[1]=0;\n\t\tfor (i=2;i<=n;i++)\n\t\t{\n\t\t\tk=m%i;\n\t\t\tf[i]=(f[i-1]+k)%i;\n\t\t}\n\t\tprintf(\"%d\\n\",f[n]+1);\n\t\tscanf(\"%d%d\",&n,&m);\n\t}\n}"} +{"label": "79", "index": "39394", "code": "int main()\n{\n while(1)\n {\n\tint n,m;\n\tscanf(\"%d %d\",&n,&m);\n\tif(n==0&&m==0)\n\t{\n\t break;\n\t}\n\telse\n\t{\n\t //int m1;\n\t int i,j=0,sum=0;\n\t int *a=(int*)malloc(sizeof(int)*n);\n\t for(i=0;in-1)\n\t {\n\t i=i%n;\n\t }\n\t sum=sum+a[i];\n\t // m1=m;\n\t //while(m1>(n-j))\n\t // {\n\t // m1%=(n-j);\n\t // }\n\t if(m==sum)\n\t {\n\t a[i]=0;\n\t\t j++;\n\t\t sum=0;\n\t }\n\t if(j==n-1)\n\t {\n\t break;\n\t }\n\t }\n\t for(i=0;i0)\n\t {\n\t printf(\"%d\\n\",i+1);\n\t\t break;\n\t }\n\t }\n free(a);\n\t}\n }\n\treturn 0;\n}"} +{"label": "79", "index": "39395", "code": "int main()\n{\t\n\tfor(;;)\n\t{\n\tint m,n,i,j,k,t=0;\n\tscanf(\"%d%d\",&n,&m);\n\tif(n==0)break;\n\tint a[n];\n\tfor(i=0;in)i%=n;\n\t\t}\n\t\tt++;\n\t\tif(i!=1)a[i-2]=1;\n\t\telse a[n-1]=1;\t\n\t}\n\tfor(i=0;i0)\n {\n if(a[index]==1)\n { \n ++t;\n if(t%n==0)\n {\n a[index]=0;\n loc=index;\n p--;\n }\n \n }\n if(index < m-1)\n index++;\n else\n index=0;\n }\n printf(\"%d\\n\",loc+1);\n}}"} +{"label": "79", "index": "39399", "code": "\nint main(void)\n{\nint i,j;\nint s = 0;\nint n;\nint m;\nfor(j=1;j<=9;j++){\nscanf(\"%d%d\\n\", &n,&m);\nfor (i = 1; i <= n; i++)\n{\ns = (s + m) % i;\n}\n\nprintf(\"%d\\n\", s + 1);}\n\nreturn 0;\n}"} +{"label": "79", "index": "39400", "code": "\n\n\n\n\n\nint main()\t{\n\tint a[100], b[100];\n\tint i, p = 1, q = 1;\n\tfor (i = 0; p != 0 && q != 0; i ++)\t{\n\t\tscanf(\"%d%d\", &p, &q);\n\t\ta[i] = p; b[i] = q;\n\t};\n\tint j, aa, bb;\n\tint monkey[500];\n\tfor (j = 0; j < i - 1; j ++)\t{\n\t\taa = a[j]; bb = b[j];\n\t\tint sum = 0;\n\t\tint ptr, s = 0;\n\t\tfor (ptr = 0; ptr < aa; ptr ++)\tmonkey[ptr] = 1;\n\t\tfor (ptr = 1; sum < aa - 1; ptr = (ptr + 1) % aa)\t{\n\t\t\tif (monkey[ptr] == 1)\t{\n\t\t\t\ts ++;\n\t\t\t\tif (s == bb)\t{\n\t\t\t\t\tmonkey[ptr] = 0;\n\t\t\t\t\tsum ++;\n\t\t\t\t\ts = 0;\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tint ans;\n\t\tfor (ptr = 0; ptr < aa; ptr ++)\tif (monkey[ptr] == 1)\tans = ptr;\n\t\tif (ans == 0)\tans = aa;\n\t\tprintf(\"%d\\n\", ans);\n\t};\n\treturn 0;\n};\n"} +{"label": "79", "index": "39401", "code": "int main()\n{\n\tint m,n,a,b,c;\n\tint hz[300];\n\tscanf(\"%d%d\",&n,&m);\n\twhile((n!=0)&&(m!=0))\n\t{\n\t\tc=0;\n\t\tfor(a=2;a<=n;a++)\n\t\t{\n\t\t\tc=(c+m)%a;\n\t\t}\n\t\tprintf(\"%d\\n\",c+1);\n\t\tscanf(\"%d%d\",&n,&m);\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39402", "code": "int hezi(int a[])\n{\n\tint m,i=1;\n\twhile(1)\n\t{\n\t\tif(a[i]!=0)\n\t\t{\n\t\t\tm=a[i];\n\t\t\tbreak;\n\t\t}\n\t\ti=i+1;\n\t}\n\treturn m;\n}\nint pan(int n,int m)\n{\n\tint a[301],b[301],i,k,l,p,s=0,r;\n\tfor(i=0;i<=n;i++) a[i]=i;\n\twhile(1)\n\t{\n\t\tl=1;\n\t\tk=0;\n\t\twhile(m*l+s<=n)\n\t\t{\n\t\t\ta[m*l+s]=0;\n\t\t\tl=l+1;\n\t\t\tk=k+1;\n\t\t\tif(n-k==1)\n\t\t\t{\n\t\t\t\ta[1]=hezi(a);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(n-k==1) break;\n\t\tp=m*l+s-n;\n\t\tn=n-k;\n\t\ts=p%n;\n\t\tif(s==0) s=n;\n\t\ts=s-m;\n\t\tr=1;\n\t\tfor(i=1;i<=n+k;i++)\n\t\t{\n\t\t\tif(a[i]!=0)\n\t\t\t{\n\t\t\t\tb[r]=a[i];\n\t\t\t\tr=r+1;\n\t\t\t}\n\t\t}\n\t\tfor(i=1;i<=n;i++) a[i]=b[i];\n\t}\n\treturn a[1];\n}\nint main()\n{\n\tint n,m,a[20],i=0;\n\twhile(1)\n\t{\n\t scanf(\"%d %d\",&n,&m);\n\t if(m+n==0) \n\t\t{\n\t\t a[i]=0;\n\t\t break;\n\t\t}\n\t a[i]=pan(n,m);\n\t i=i+1;\n\t}\n\tfor(i=0;a[i]!=0;i++) printf(\"%d\\n\",a[i]);\n\treturn 1;\n}\n\n"} +{"label": "79", "index": "39403", "code": "int sz[301];\nint m,n;\nint remove(int k);\nint main(){\n\tint i,k;\n\tscanf(\"%d%d\",&n,&m);\n\twhile(m||n){\n\t\tfor(i=0;i1;n--){\n\t\t\tk=remove(k);\n\t\t}\n\t\tprintf(\"%d\\n\",sz[0]);\n\t\tscanf(\"%d%d\",&n,&m);\n\t}\n\treturn 0;\n}\nint remove(int k){\n\tint i,t;\n\tt=(m+k-1)%n;\n\tfor(i=t+1;i 1 ;i = i%N+1){\n if (!x[i]){\n count++;\n if (count == M){\n x[i] = 1;\n alive --;\n count = 0;\n }\n }\n }\n for (i = 1; i <= N ;i++)\n if(!x[i]) printf(\"%d\\n\",i);\n }\n\n return 0;\n}"} +{"label": "79", "index": "39405", "code": "int main()\n{int n=0,p,i,j,t,k;\nint sl[301],cz[301];\nfor(i=0;i<301;i++)\n\t{scanf(\"%d%d\",&(sl[i]),&(cz[i]));\n\t\tif(sl[i]==0){break;}\n\t\tn=n+1;\n\t}\n\tk=1;\nfor(t=0;t1)\n {\n k=(k+m-1)%n;\n if(k==0) k=n;\n for(i=k;ix=i+1;\n\t\t(p+i)->l=p+i-1;\n\t\t(p+i)->r=p+i+1;\n\t}\n\tp->x=1;\n\t(p+n-1)->x=n;\n\tp->l=p+n-1;\n\tp->r=p+1;\n\t(p+n-1)->l=p+n-2;\n\t(p+n-1)->r=p;\n\tfor(i=1;ir;\n\t\t\n\t\ts->l->r=s->r;\n\t\t\n\t\ts->r->l=s->l;\n\t\tp=s->r;\n\t}\n\twang=p->x;\n\treturn wang;\n}\n\n\nint main()\n{\n\tint n[100],m[100],l,a[100],i;\n\tfor(l=0;;l++)\n\t{\n\t\tscanf(\"%d %d\",&n[l],&m[l]);\n\t\tif(n[l]==0&&m[l]==0)\n\t\t\tbreak;\n\t\telse\n\t\t\ta[l]=guowang(n[l],m[l]);\n\t}\n\t\n\tfor(i=0;i1){\n\t\tj=0;\n\t\twhile(j!=m){\n\t\t\ti=monk[i].nextmonk;\n\t\t\tif(monk[i].num){\n\t\t\t\tj++;\n\t\t\t\tif(j!=m) last=monk[i].num;\n\t\t\t}\n\t\t}\n\t\tmonk[i].num=0;\n\t\tsum--;\n\t}\n\tprintf(\"%d\\n\",last);\n}\n\n\n\nvoid main()\n{\n\tint n,m;\n\twhile(1){\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(m==0&&n==0) break;\n\t\tcountoff(n,m);\n\t}\n}\n"} +{"label": "79", "index": "39412", "code": "int main()\n{\n\tint m,n;\n\tint in[320]; //????\n\tint i;\n\tint num; //????\n\tint last;\n\twhile(1>0)\n\t{\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif((n==0)||(m==0))\n\t\t\tbreak;\n\t\telse\n\t\t{\n\t\t\tfor(i=1;i<=n;i++)\n\t\t\t{\n\t\t\t\tin[i]=i; //?????\n\t\t\t//\tprintf(\"%d\\n\",in[i]); //debug\n\t\t\t}\n\t\t\t//??????\n\t\t\tlast=1;\n\t\t\tnum=n;\n\t\t\twhile(num!=1)\n\t\t\t{\n\t\t\t\tlast+=m-1; //??????\n\t\t\t//\tprintf(\"%d\",last); //debug\n\t\t\t\twhile(last>num)\n\t\t\t\t{\n\t\t\t\t\tlast=last-num;\n\t\t\t\t}\n\t\t\t//\tprintf(\" %d\\n\",last);//debug\n\t\t\t\tnum--;\n\t\t\t\tfor(i=last;i<=n;i++)\n\t\t\t\t{\n\t\t\t\t\tin[i]=in[i+1];\n\t\t\t\t}\n\t\t\t//\tprintf(\"\\n%d\",num); //debug\n\t\t\t/*\tfor(i=1;i<=num;i++)\n\t\t\t\t{\n\t\t\t\t\tprintf(\" %d\",in[i]);\n\t\t\t\t}\n\t\t\t\tprintf(\"\\n\"); */ //debug\n\t\t\t}\n\t\t\tprintf(\"%d\\n\",in[1]);\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39413", "code": "int main(){\n int m,n,i,x,e,max;\n while(e==e){\n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0)break;\n int c[n+1];\n for(i=1;i<=n;i++)\n c[i]=i;\n x=n;\nfor(i=1;;) {\n for(i=1;i<=n;i++)\n if(c[i]%m!=0){\n x++;\n c[i]=x;\n }\n max=1;\n for(i=1;i<=n;i++)\n if(c[i]>c[max])\n max=i;\n e=0;\n for(i=1;i<=n;i++)\n if(c[i]%m==0)\n e=e+1;\n if(e==n)break;\n\n}\nprintf(\"%d\\n\",max);}\nreturn 0;\n}\n\n\n\n"} +{"label": "79", "index": "39414", "code": "main(){\n int a[301];\n int b[301];\n int i,j,n,m,c,x;\n scanf(\"%d %d\",&n,&m);\n while(n!=0){\n for(i=1;i<=n;i++)a[i]=i;\n x=n;\n for(i=1;i=2)\n\t{\n\t\tfor(i=2,r=1;i<=n;i++)\n\t\t{\n\t\t\tr=(r+m%i)%i;\n\t\t\tif(r==0)\n\t\t\t\tr=i;\n\t\t}\n\t}\n\telse if(n==1)\n\t\tr=1;\n\t\tprintf(\"%d\\n\",r);\n\t\tscanf(\"%d %d\",&n,&m);\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39416", "code": "\nmain()\n{\nint n,m,i,s=0;\nfor(;;)\n{\nscanf(\"%d %d\",&n,&m);\nif(n==0&&m==0) break;\nif(n==1) printf(\"%d\\n\",n) ;\nelse\n{\n s=0; \nfor(i=2;i<=n;i++)\ns=(s+m)%i;\nprintf(\"%d\\n\",s+1);\n}\n\n}\n\n}"} +{"label": "79", "index": "39417", "code": "\nint main()\n{\nint n, m, s;\nwhile( cin >> n >> m && n )\n{\ns = 0;\nfor( int i = 2; i <= n; i ++ )\ns = ( s + m ) % i;\ncout << s + 1 << endl;\n}\nreturn 0;\n}"} +{"label": "79", "index": "39418", "code": "struct monkey\n\t{\n\t\tint number;\n\t\tint selected;\n\t\tstruct monkey *next;\n\t};\nvoid maintoo(int,int);\nvoid main()\n{\n\t\n\tint n[20],m[20],i,j;\n\tfor(i=0;;i++)\n\t{\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\t\tif(!m[i]) break;\n\t}\n\tfor(j=0;jnumber=i;\n\t\tp_this->selected=1;\n\t\tp_next=(struct monkey *)malloc(sizeof(struct monkey));\n\t\tp_this->next=p_next;\n\t\tp_this=p_next;\n\t}\n\tp_this->number=n;\n\tp_this->selected=1;\n\tp_this->next=p1;\n\tdo\n\t{\n\t\ti=0;\n\t\tdo\n\t\t{\n\t\t\tp_this=p_this->next;\n\t\t\tif(p_this->selected) i++;\t\t\t\n\t\t}\n\t\twhile(iselected=0;\n\t\tn--;\n\t}\n\twhile(n>0);\n\tprintf(\"%d\\n\",p_this->number);\n}\n"} +{"label": "79", "index": "39419", "code": "\nstruct node\n{\n\tint data;\n\tstruct node *next;\n};\n\nint choose(int n, int m)\n{\n\tint i=2;\n\tstruct node *head;\n\tstruct node *p1, *p2;\n\thead=(struct node*)malloc(len);\t\n\thead->data = 1;\t\n\tp1 = head;\n\tfor(i=2; i<=n; i++)\n\t{\t\n\t\t\tp2 = (struct node*)malloc(len);\t\n\t\t\tp2->data = i;\t\t\n\t\t\tp1->next = p2;\t\n\t\t\tp1 = p2;\t\n\t}\n\tp1->next = head;\n\ti=1;\n\n\twhile(head->next != head)\n\t{\n\t\tfor(i=1; inext;\n\t\t}\n\t\tp1->next = head->next;\n\t\thead = head->next;\n\t}\n\treturn(head->data);\n}\n\nint main()\n{\n\tint n=1, m=1, result;\n\twhile(n!=0 && m != 0)\n\t{\n\t\tscanf(\"%d%d\", &n, &m);\n\t\tif(n==0 && m==0)\n\t\t\tbreak;\n\t\tprintf(\"%d\\n\", choose(n, m));\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39420", "code": "int main()\n{\n\tint i,j,k,a=0;\n\tint m[100],n[100];\n\n\tfor(i=0;;i++){\n\t\tscanf(\"%d%d\",&n[i],&m[i]);\n\t\tif(n[i]==0&&m[i]==0){\n\t\t\tbreak;\n\t\t}\n\t\ta++;\n\t}\n\tfor(i=0;i> n >> m;\n\t\n\twhile((n != 0) && (m != 0))\n\t{\n\t\tfor (k = 1; k <= n; k++)\n\t\t\ta[k] = 1; \n\t\n\t\tk = 0; t = 0; count = 0; \n\t\n\t\twhile(count < n)\n\t\t{ \t\n\t\t\tk++;\n\t\t\tif(k == n + 1)\n\t\t\t\tk = 1;\n\t\t\tif ( a[k] != 0 )\n\t\t\t{ \n\t\t\t\tt++;\n\t\t\t\tif ( t == m )\n\t\t\t\t{ \n\t\t\t\t\ta[k] = 0; t = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcout << k <> n >> m;\n\t}\n\n\treturn 0;\n} \n"} +{"label": "79", "index": "39422", "code": "int main()\n{int m[100],n[100],i;\nscanf(\"%d %d\",&m[0],&n[0]);\nfor(i=1;m[i-1]!=0;i++)\nscanf(\"%d %d\",&m[i],&n[i]);\nprintf(\"5\\n\");\nprintf(\"1\\n\");\nprintf(\"7\\n\");\nprintf(\"10\\n\");\nprintf(\"1\\n\");\nprintf(\"11\\n\");\nprintf(\"148\\n\");\nprintf(\"25\\n\");\nprintf(\"178\");\n\nreturn 0;}"} +{"label": "79", "index": "39423", "code": "\n\nint main()\n{\n\tint n;\n\tint m;\n\tdo\n\t{\n\t\tint *p;\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif ( n == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tp = ( int * ) malloc ( sizeof (int) * n );\n\n\t\tint i = 0 ;\n\t\tfor ( i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\t*(p+i) = 1 ;\n\t\t}\n\t\tint count = 0;\n\t\tint count2 = n;\n\t\ti = 0;\n\t\tdo\n\t\t{\n\t\t\tif ( *(p+i) != 0 )\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif ( count == m )\n\t\t\t\t{\n\t\t\t\t\t//printf(\"%d\\n\",i);\n\t\t\t\t\tcount2--;\n\t\t\t\t\tcount = 0;\n\t\t\t\t\t*(p+i) = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( i < n - 1 )\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t\t//printf(\"%d\\n\",i);\n\t\t}while(count2 > 1);\n\t\ti = 0 ;\n\t\tdo\n\t\t{\n\t\t\tif ( *(p+i) == 1 )\n\t\t\t{\n\t\t\t\tprintf(\"%d\\n\",i+1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti++;\n\t\t}while ( i < n );\n\t\tfree(p);\n\t}while ( n > 0 );\n\treturn 0;\n}"} +{"label": "79", "index": "39424", "code": "void main()\n{int i,j,k,m[100],n[100],num[301],a[100],*p;\nfor(j=0;;j++)\n\t{scanf(\"%d %d\",&n[j],&m[j]);\n\tif(n[j]==0&&m[j]==0)\n\tbreak;\n\t}\nfor(j=0;;j++)\n\t{if(n[j]==0&&m[j]==0)\n\tbreak;\n\tp=num;\n\tfor(i=0;i=(m-1) % i+1)\n leave=j+1 ;\n\t\telse \n\t\tleave=j;\n\t}\n\treturn leave;\n\n}\n"} +{"label": "79", "index": "39426", "code": "int ysf(int n,int m)\n{\nint i,s,k;\ns=0;\nfor(i=2; i<=n; i++) \ns=(s+m)%i;\nk=s+1;\nreturn(k);\n}\nvoid main()\n{\n int n,m,i,j,a[100];\n m=1;n=1;i=0;\n while(m!=400)\n {\n scanf(\"%d %d\",&n,&m);\n if(m==0) break;\n a[i]=ysf(n,m);\n i++;\n }\n for(j=0;j>n>>m;\n\t\tif((n==0)&&(m==0))return 0;\n\t\tm--;\n\t\tfor(int i=0;i1;i--)\n\t\t\t{\n\t\t\t\tfor(t=0;t1;i--){\n\t\tint M;\n\t\tM=m%i;\n\t\tif(M==0){\n\t\t\tM=i; //??//\n\t\t}else{\n\t\t\tM=m%i;\n\t\t}\n\t\tint count=0;\n\t\tfor(j=begin;j=M){\n\t\t\tfor(j=begin;j1;j--)\n {\n kill=(m[i])%j;\n if(kill==0)\n {\n minmj=m[i];\n if(j> n >> m)\n\t{\n\t\tif(n!=0)\n\t\t{\n\t\t for(i=0;i0;i--)\n\t\t {\n\t\t\t for(k=0;k1;f++)\n\t\t{\n\t\t\t\n\t\t\tif(f>n[i])f=f-n[i];\n\t\t\tif(a[i][f]!=0)k=k+1;\n\t\t\tif(k==m[i])\n\t\t\t{\n\t\t\t\ta[i][f]=0;\n\t\t\t\tq=q-1;\n\t\t\t\tk=0;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i1)\n\t\t{\n\t\t\tp=p%q;\n\t\t\tk=k+1;\n\t\t\tif(p>0&&p> n[i] >> m[i];\n if(n[i] == 0 && m[i] == 0)\n {\n break;\n }\n for(j = 1;j <= n[i];j++)\n {\n a[j] = 1;\n }\n while(num < n[i])\n {\n k++;\n if(k == n[i] + 1)\n {\n k = 1;\n }\n if(a[k] != 0)\n {\n t++;\n if(t == m[i])\n {\n a[k] = 0;\n t = 0;\n num++;\n s[i] = k;\n }\n }\n }\n k = t = num =0;\n for(j = 1;j < 300;j++)\n {\n a[j] = 0;\n }\n }\n for(j = 0;j < i;j++)\n {\n cout << s[j] << endl;\n }\n return 0;\n}"} +{"label": "79", "index": "39442", "code": "int j;\nstruct monkey//???????????????????\n{\n\tint num;\n\tstruct monkey *next;\n};\nstruct monkey *create(int c) //????create???????????????\n{\n\tstruct monkey *head,*p1,*p2;//??????monkey?????head?p1?p2\n\tint i;\n\tp1=p2=(struct monkey*)malloc(LEN);//(struct monkey*)malloc(LEN)???????p1?p2\n\thead=p1; //p1?????head\n\thead->num=1; //?1???head??num\n\tfor(i=1,p1->num=1;inum=i+1;//???????\n\t\tp2->next=p1;//????????\n\t\tp2=p1;\n\t}\n\tp2->next=head;\n\treturn head;//??head?num=1?next???????\n}\nstruct monkey *findout(struct monkey *start,int d)//????findout?????????monkey\n{\n\tint i;\n\tstruct monkey *p;\n\tp=start;\n\tfor(i=1;inext;//?start???????????????d-2??\n\treturn p;//????????????\n}\nstruct monkey *letout(struct monkey *last)\n{\n\tstruct monkey *out,*next;\n\tout=last->next;\n\tlast->next=out->next;//????????????????????\n\tnext=out->next;\n\tfree(out);\n\treturn next;\n}\nint main()\n{\n\tint n[301],m[300],k=0,c,d;\n\twhile(1)\n\t{\n\t\tscanf(\"%d %d\",&n[k],&m[k]);//?????\n\t\tk++;\n\t\tif(n[k-1]==0&&m[k-1]==0)\n\t\t\tbreak;\n\t}\n\tfor(j=0;jnum;//p2????num???king\n\t\t\tfree(p2);\n\t\t}\n\t\tprintf(\"%d\\n\",king);\n\t}\nreturn 0;\n}\n\n\n"} +{"label": "79", "index": "39443", "code": "void main()\n{\n\tint n,m,i,s=0,count;\n\tfor(count=0;;count++)\n\t{\n\t\tscanf(\"%d%d\",&n,&m);\n\t\tif(n==0&&m==0)\n\t\t\tbreak;\n\t\tif(m==1)\n\t\t\ts=n-1;\n\t\tif(n==1)\n\t\t\ts=0;\n\t\tif(n>1)\n\t\t{\n\t\t\tfor(i=2;i<=n;i++)\n\t\t\t\ts=(s+m)%i;\n\t\t}\n\t\tprintf(\"%d\\n\",s+1);\n\t\ts=0;\n\t}\n}\n"} +{"label": "79", "index": "39444", "code": " int manage(int n,int q)\n{\n\tint a[1000],i=0,*p=a,k=0,m=0,b;\n\tfor(i=0;i=n)a=a-n;\n\t\t\t\twhile(b[a]!=0)\n\t\t\t\t{\n\t\t\t\t\ta=a+1;\n\t\t\t\t\tif(a>=n)a=a-n;\n\t\t\t\t}\n\t\t\t}\n\t\t\tb[a]=1;\n\t\t}\n\t\tfor(j=0;j<=n-1;j++)\n\t\t{\n\t\t\tif(b[j]==0)break;\n\t\t}\n\t\td[c]=j+1;\n\t\tc=c+1;\n\t}\n\tfor(z=0;z<=c-1;z++)\n\t{\n\t\tprintf(\"%d\\n\",d[z]);\n\t}\n}\n"} +{"label": "79", "index": "39446", "code": "\n\nint main()\n{\n\tint n, m;\n\t\n\twhile (1) {\n\t\tcin >> n >> m;\n\t\tif (n == 0 && m == 0)\n\t\t\tbreak;\n\t\tint a[500];\n\t\tmemset(a, 0, sizeof(a));\n\t\tint tmp = n, start = -1;\n\n\t\twhile (tmp > 1) {\n\t\t\tint mtmp = (m-1) % tmp + 1;\n\t\t\tunsigned i = 0;\n\t\t\twhile (i < mtmp) {\n\t\t\t\tstart = (start+1) % n;\n\t\t\t\twhile (a[start] == 1)\n\t\t\t\t\tstart = (start+1) % n;\n\t\t\t\t++i;\n\t\t\t}\n\t\t\ta[start] = 1;\n\t\t\t--tmp;\n\t\t}\n\t\tfor (unsigned i = 0; i < n; ++i) {\n\t\t\t//cout << a[i] << \" \";\n\t\t\tif (a[i] != 1) {\n\t\t\t\tcout << i + 1 << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39447", "code": "int main(){ \n int n,m,i;\n for(int j=0;j<100000;j++){\n scanf(\"%d %d\",&n,&m);\n if(n==0&&m==0)break;\n int a=0;\n for(i=2;i<=n;i++){\n a=((m%i)+a)%i; \n }\n a++;\n printf(\"%d\\n\",a);}\n return 0;\n}\n\n"} +{"label": "79", "index": "39448", "code": "int main()\n{\n\tint sum,q=0,f,s;//???sum?????q,f?????,s??????\n\tint n=1,m=1;\n\tint a[300];\n\twhile(n!=0||m!=0)\n\t{\n\t\tfor(int i=1;i<=300;i++)//?????\n\t\t{\n\t\t\ta[i-1]=i;\n\t\t}\n\t\tcin>>n>>m;\n\t\tif(n!=1)\n\t\t{\n\t\t\tsum=((1+n)*n)/2;\n\t\t\tq=0;\n\t\t\tf=m;\n\t\t\ts=n;\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif(f%s==0)\n\t\t\t\t{\n\t\t\t\t\tf=s;\n\t\t\t\t}else{\n\t\t\t\t\tf%=s;\n\t\t\t\t}\n\t\t\t\tsum-=a[f-1];//????\n\t\t\t\tfor(int i=f;i<=s;i++)//??????f??????????????????\n\t\t\t\t{\n\t\t\t\t\ta[i-1]=a[i];\n\t\t\t\t}\n\t\t\t\tq++;\t\n\t\t\t\ts--;\n\t\t\t\tf+=(m-1);\n\t\t\t}while(q=0)\n {scanf(\"%d %d\",&n[i],&m[i]);\n if(n[i]==0&&m[i]==0)\n {i=i+1;\n break;}\n else \n i=i+1;}\n T=i;\n for(i=1;i<=T;i++)\n for(j=1;j<=n[i-1];j++)\n num[i-1][j]=1;\n for(i=1;i<=T;i++)\n {N=n[i-1];\n M=m[i-1];\n t=N;\n k=1;\n x=0;\n while(t>1)\n { do {\n if(num[i-1][k]==1)\n {x=x+1;\n k=k+1;}\n else\n k=k+1;\n if(k==(N+2))\n k=1;}\n while(x-1;i++){\n\t\tscanf(\"%d\"\"%d\",&n[i],&m[i]);\n\t\tif((m[i]==0)&&(n[i]==0)){\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(t=0;t1){\n t=m[times]%n[times];\n i=1;\n n[times]--;\n for(i=1;i<=n[times];i++){\n if(i+t-1<=n[times])b[i]=a[t+i];\n else{b[i]=a[t+i-n[times]-1];} } \n for(j=1;j<=n[times];j++)\n {a[j]=b[j];}\n }\n \n printf(\"%d\\n\",a[1]);}\n \n \n return 0;} \n"} +{"label": "79", "index": "39453", "code": "void main()\n{\n\tint n[100],m[100];\n\tint i,j,y,x;\n\t\n struct monkey\n\t{\n\t\tint num;\n\t\tstruct monkey *next;\n\t};\n\tstruct monkey mon[300];\n\tstruct monkey *head,*p;\n\tint k=-1;\n\t\tdo\n\t\t{ k++;\n scanf(\"%d %d\",&n[k],&m[k]);\n\t\t \n\t\t}\n\t\twhile(n[k]!=0);\n\t\tfor(i=0;inext)!=head)\n\t\t\t{\n\t\t\t\tx=1;\n\t\t\t\twhile(xnext;\n\t\t\t\t\tx++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thead->next=(head->next)->next;\n\t\t\t}\n\t printf(\"%d\\n\",head->num);\n\t\t}\n}\n\n"} +{"label": "79", "index": "39454", "code": "int main()\n{\n int i,j=1,k=0,n,m,count=0,sz[N];\n\twhile(1)\n\t{\n scanf(\"%d%d\", &n,&m);\n if(m==0&&n==0) break;\n\t else\n\t {\n\t\t if(n==1){j=1;}\n\t\t else\n {\n\t\t\t j=1;\n\t\t\t for(i=2;i<=n;i++)\n\t\t\t {\n j=(j+m-1)%i+1;\n\t\t\t }\n\t\t }\n\t\t count++;\n\t\t sz[k]=j;\n\t\t k++;\n\t }\n } \n\tfor(k=0;k1)\n\t\t{\n\t\t\tfor(i=1;in) x=x-n;\n\t\t\t\twhile(a[x]==0)\n\t\t\t\t{\n\t\t\t\t\tx++;\n\t\t\t\t\tif(x>n) x=x-n;\n\t\t\t\t}\n\t\t\t}\n\t\t\ta[x]=0;\n\t\t\ts=s-1;\n\t\t\tx=x+1;\n\t\t\tif(x>n) x=x-n;\n\t\t\twhile(a[x]==0)\n\t\t\t{\n\t\t\t\tx=x+1;\n\t\t\t\tif(x>n) x=x-n;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d\\n\",x);\n scanf(\"%d %d\",&n,&m);\n\t}\n}\n"} +{"label": "79", "index": "39456", "code": "\nint main(){\n\tint n[10000], m[10000], i=0, s[10000],k,l,j,r=0;\n while(1){\t\n\t scanf(\"%d\", &n[i]);\n\t scanf(\"%d\", &m[i]);\n\t if(m[i]==0&&n[i]==0){\n\t \tbreak;\n\t }\n\t \t k=n[i];\n\t for(j=2; j<=k; j++){\n\t s[i]=(s[i]+m[i])%j;\n\t } \n\t i++;\n\t r++;\n }\n for(l=0;l=2;n--)\n\t\t{\n\t\t\tif((j+m-1)%n!=0)\n\t\t\t\tj=(j+m-1)%n;\n\t\t\telse\n\t\t\t\tj=n;\n\t\t\tfor(i=1;i<=h;i++)\n\t\t\t\tif(a[i]==j)\n\t\t\t\t{\n\t\t\t\t\ta[i]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tfor(;i+1<=h;i++)\n\t\t\t\tif(a[i+1]!=0)\n\t\t\t\t\ta[i+1]--;\n\t\t}\n\t\tfor(i=1;i<=h;i++)\n\t\t\tif(a[i]!=0)\n\t\t\t\tprintf(\"%d\\n\",i);\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39458", "code": "int a(int x,int y)\n{\n\tint a[300],i,p,b=1;\n\tfor(i=0;i1)\n\t{\n\tp=y%x;\n\tb=b-1+p;\n\tif(b==0)\n\t{\n\t\tx=x-1;\n\t\tb=b+1;\n\t\t}\n\telse if(b<=x&&b>0)\n\t{\n\t\tfor(i=b-1;ix)\n\t{\n\t\tb=b-x;\n\t\tfor(i=b-1;i>mn[kao][0]>>mn[kao][1];\n\t\tint t=0;\n\t n=mn[kao][0];\n\t m=mn[kao][1];\n\t if(n!=0)\n\t {\n\t for(i=1;i<=n;i++) a[i]=i;\n\t int p=1;\n\t while(t<(n-1)*m)\n\t {\n\t\t if(a[p]!=0) t=t+1;\n\t\t else t=t;\n\t\t if(t%m==0&&a[p]!=0) a[p]=0;\n\t\t if(p==n) p=1;\n\t\t else p++;\n\t }\n\t for(i=1;i<=n;i++)\n\t {\n\t\t if(a[i]!=0)\n\t\t\t cout<n-1) {i3=i3%(n);}\n if (houzi[i3]==0)\n {\n continue;\n }\n count++;\n\n if (count==m) {houzi[i3]=0;left--;count = 0;}\n if (count>m) {count=count%m;} \n }\n for (int i4=0;i4> n >> m;\n\t\tif(n == 0 && m == 0)\n\t\t\tbreak;\n\t\tcount = 0;\n\t\ti = 1;\n\t\tj = 1;\n\t\twhile(1)\n\t\t{\n\t\t\tif(flag[j] == 0)\n\t\t\t{\n\t\t\t\tif(i == m)\n\t\t\t\t{\n\t\t\t\t\tflag[j] = -1;\n\t\t\t\t\ti = 1;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(count == n)\n\t\t\t{\n\t\t\t\tcout << j << endl;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(j == n)\n\t\t\t\tj = 1;\n\t\t\telse\n\t\t\t\tj++;\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39463", "code": "int main(int argc, char* argv[])\n{\n\tint sz[300];\n\tint n,m,i,k,j,szhe=0,add=0,XS;\n\twhile(1){\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0){\n\t\tbreak;\n\t\t}\n\t\tfor(i=0;i1;count--)\n\t\t\t{\n\t\t\t\tfor(i=1;i<=m-1;i++)\n\t\t\t\t{\n\t\t\t\t\tcut=f(cut+1,n);\n\t\t\t\t\twhile(a[cut]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcut=f(cut+1,n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta[cut]=0;\n\t\t\t\twhile(a[cut]==0)\n\t\t\t\t{\n\t\t\t\t\tcut=f(cut+1,n);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprintf(\"%d\\n\",cut);\n\t\t}\n\t}\n\t\n}\nint f(int a,int n)\n{\n\tif(a%n==0)\n\t\treturn n;\n\telse \n\t\treturn a%n;\n}\n\n\n"} +{"label": "79", "index": "39468", "code": "int main()\n{\n int n,m,i,s;\n do\n {\n cin>>n>>m;\n if(n==0||m==0) break;\n else if(n==1) cout<<\"1\"<n && k%n!=0) k=k%n;\n if (k>n && k%n==0) k=n; \n \n for(;n!=1;)\n {for (i=k;in && k%n!=0) k=k%n;\n if (k>n && k%n==0) k=n; \n \n \n // printf(\"%d %d\\n\",n,k);\n }\n\n printf(\"%d\\n\",a[1]);\n\n}} \n \n return 0;\n} \n"} +{"label": "79", "index": "39470", "code": "int main(){\n int a[3000],b[3000],c[3000],x=0,i,j,s;\n for(j=0;j<3000;j++){ \n s=0;\n scanf(\"%d%d\",&a[j],&b[j]);\n if(a[j]==0) break;\n else{\n for (i=2; i<=a[j]; i++) s=(s+b[j])%i;\n x++;\n c[j]=s+1;\n } \n }\n for(j=0;j0)\n\t\t{\n\t\t\tif(a[s][index]==1)\n\t\t\t{ \n ++t;\n if(t%n[s]==0)\n\t\t\t\t {\n a[s][index]=0;\n loc=index;\n p--;\n\t\t\t\t }\n\t\t\t}\n if(index < m[s]-1)\n index++;\n else\n index=0;\n\t\t}\n printf(\"%d\\n\",loc+1);\n\t}\n\treturn 0;\n}\n\n"} +{"label": "79", "index": "39472", "code": "int hs(int n,int m){\nint i,k=0;\nfor(i=2;i<=n;i++){\n\tk=((m%i)+k)%i;}\nreturn k;\n}\t\nint main(){\n\tint m,n,h=0;\n\tint a[100],j=0,y=0;\n\twhile(h==0){\n\tscanf(\"%d %d\",&n,&m);\n\tif((n==0)&&(m==0)){\n\th=1;\n\t}\n\ta[j]=hs(n,m)+1;\n\t\tj++;\n\t\ty+=1;\n\t\t}\n\tfor(j=0;j-1;j++){\nscanf(\"%d %d\",&n,&m);\nif(m==0) {d=j; break;}\nc[j]=f(m,n)+1;}\n\nfor(j=0;j>n>>m;\n\t\tflag = n;\n\t\tif(n == 0 && m == 0)\n\t\t\tbreak;\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\ta[i] = 1;\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] != 0)\n\t\t\t{\n\t\t\t\tnum++;\n\t\t\t\tif (num == m)\n\t\t\t\t{\n\t\t\t\t\tif (flag != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\ta[i] = 0;\n\t\t\t\t\t\tnum = 0;\t\t\t\t\t\n\t\t\t\t\t\tflag -= 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i == n)\n\t\t\t\ti = 0;\n\n\t\t}\n\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] == 1)\n\t\t\t\tcout<a=1;\n\t\tfor(i=2;i<=n;i++)\n\t\t{\n\t\t\tp2=(struct node *)malloc(sizeof(struct node));\n\t\t\tp2->a=i;\n\t\t\tp1->next=p2;\n\t\t\tp1=p2;\n\t\t}\n\t\tp1->next=head;\n\t\twhile(p1->next!=p1)\n\t\t{\n\t\t\tfor(i=1;inext;\n\t\t\tp1->next=p1->next->next;\n\t\t}\n\t\tprintf(\"%d\\n\",p1->a);\n\t}\n\n}"} +{"label": "79", "index": "39480", "code": "int ss(int a);\nint main()\n{\n int i=0,n,m,sum=0,count=0;\n int b[10000];\n for(i;;i++)\n {\n scanf(\"%d%d\",&n,&m);\n if(n==0&&m==0){\n break;}\n int a[10000],p=0,j=0,k=0,number=0;\n for(j=0;ja=i+1;\n\t\t(p+i)->b=i+1;\n\t}\n\n\tint *out;\n\tout=(int *)malloc(sizeof(int)*n);\n\n\tfor(i=0;ib==0){\n\t\t\t\tcontinue;\n\t\t\t}\n \n\t\t\telse if((p+i)->b-m*j==m){\n\t\t\t\tout[j]=(p+i)->a;\n\t\t\t\t(p+i)->b=0;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t(p+i)->b+=(n-j);\n\t\t\t}\n\t\t}\t\t\n\t}\n\t\n if(n!=0&&m!=0){\n res[t]=out[n-1];\n\n t++;}\n free(p);\n\tfree(out);\n\n\n }\n \n for(t=0;res[t]!=0;t++){\n printf(\"%d\\n\",res[t]);\n }\n\n\treturn 0;\n}"} +{"label": "79", "index": "39482", "code": "main(){\n\tint k;\n\tint a[300][300];\n\t\tfor(k=0;k<300;k++){\n\t\tint n,m,i,j;\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(n==0&&m==0) break;\n\t\tif(n==1) {\n\t\tprintf(\"1\\n\");continue;}\n\t\tfor(i=0;i<300;i++){\n\t\t\tfor(j=0;j<300;j++){a[i][j]=0;}}\n\t\tfor(i=0;inum=a;\n\t\thead=p1;\n\t\twhile(anext=p1;\n\t\t\tp2=p1;\n\t\t\tp1=(struct student *)malloc(LEN);\n\t\t\tp1->num=a+1;\n\t\t\ta++;\n\t\t}\n\t\tp2->next=p1;\n\t\tp1->next=head;\n\t\tfor(;n[i]>1;n[i]--)\n\t\t{\n\t\t\tp1=p2=head;\n\t\t\tfor(j=1;jnext;\n\t\t\t}\n\t\t\tp2->next=p1->next;\n\t\t\thead=p1->next;\n\t\t}\n\t\tr[i]=head->num;\n\t}\n\tfor(i=0;in) j=1;\n\t\t\telse j++;\n\t\t}\n\t\tfor (i=j;i<=n-1;i++)\n\t\t\ta[i-1]=a[i];\n\t\tn--;\n\t}\n\tprintf(\"%d\\n\",a[0]);\n\t}\n}\n"} +{"label": "79", "index": "39488", "code": "\nint main(void)\n{ int f[100],h[100];\n int m,n,b,c,d,e,g,i,j;\n i=0;\n scanf(\"%d%d\",f+i,h+i);\n while(f[i]!=0&&h[i]!=0)\n {i++,scanf(\"%d%d\",f+i,h+i);}\n \n \n g=0;\n while(f[g]!=0&&h[g]!=0)\n {n=f[g];\n m=h[g];\n int a[n];\n for(i=0;i=0;e--)\n {\n if(a[e]!=0)\n {a[e]=i;i--;}\n }\n } \n }\n i=0;\n while(a[i]!=1)\n i++;\n printf(\"%d\\n\",i+1); \n g++;\n }\n \n}\n"} +{"label": "79", "index": "39489", "code": "//******************************************\n//*???????.cpp **\n//*??: ?? 1100012808 **\n//*???2011.12.17 **\n//******************************************\nint main() //???\n{ //?????\n\tint flag[301] = {0}, i, n, j = 0, m, count, k, t;\n\twhile (cin >> n)\n\t{\n\t\tmemset(flag, 0, sizeof(flag));\n\t\tcin >> m;\n\t\tj = 0;\n\t\tif (m == 0 && n == 0)\n\t\t\tbreak;\n\t\tif (m == 1)\n\t\t{\n\t\t\tcout << n << endl;\n\t\t\tcontinue;\n\t\t}\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tcount = 0;\n\t\t\tif (flag[i] == 0)\n\t\t\t{\n\t\t\t\tj++;\n\t\t\t\tif (j == m)\n\t\t\t\t{\n\t\t\t\t\tj = 0;\n\t\t\t\t\tflag[i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i == n)\n\t\t\t{\n\t\t\t\ti = 0;\n\t\t\t\tfor (k = 1; k <= n; k++)\n\t\t\t\t\tif (flag[k] == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tt = k;\n\t\t\t\t\t}\n\t\t\t\tif (count == 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcout << t << endl;\n\t}\n\treturn 0;\n} //?????\n"} +{"label": "79", "index": "39490", "code": "int main()\n{\n int n,m,i,j,pos,f[400];\n while (scanf(\"%d %d\",&n,&m),n|m)\n {\n memset(f,0,sizeof(f));\n pos=0;\n for (i=1;i<=n;i++)\n {\n j=0;\n while (jn)pos=1;\n if (f[pos]==0)\n j++;\n \n }\n //printf(\"!%d\\n\",pos);\n f[pos]=1;\n }\n printf(\"%d\\n\",pos);\n }\n return 0;\n}\n"} +{"label": "79", "index": "39491", "code": "\nvoid main()\n{\n\tint a[400]={0};\n\tint m,n,i,out,sum;\n\n\twhile(1){\n\t\tscanf(\"%d %d\",&n,&m);\n\t\tif(!m*!n) break;\n\t\tout=m;\n\t\tsum=n;\n\t\tfor(i=1;i<=n;i++) a[i]=1;\n\t\tfor(i=1;sum>1;){\n\t\t\t\n\t\t\tif(!a[i]){\n\t\t\t\ti++;\n\t\t\t\tif(i>n) i=1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse out--;\n\t\t\tif(!out){\n\t\t\t\ta[i]=0;\n\t\t\t\tsum--;\n\t\t\t\tout=m;\n\t\t\t}\n\t\t\ti++;\n\t\t\tif(i>n) i=1;\n\t\t}\n\t\tfor(i=1;i<=n;i++) if(a[i]) break;\n\t\tprintf(\"%d\\n\",i);\n\n\n\t}\n}"} +{"label": "79", "index": "39492", "code": "int main()\n{\n\tint m,n,a[1000],l,i,j;\n\twhile(1)\n\t{ scanf(\"%d %d\",&n,&m);\n\tif((n==0)&&(m==0))\n\t\tbreak;\n for(i=1;i<=n;i++)\n\t\ta[i]=i;\n\tl=(m-1)%n+1;\n\tfor(i=1;i<=n-1;i++)\n\t{ for(j=1;j<=n;j++)\n\t if(j>=l)a[j]=a[j+1];\n\t l=(l+m-2)%(n-i)+1;\n\t \n\t }\n\tprintf(\"%d\\n\",a[1]);\n\t}\n\treturn 0;\n}"} +{"label": "79", "index": "39493", "code": "int main()\n{\n\tint n, m, houzi[301], k, i, number;\n\twhile (cin >> n >> m && n != 0)\n\t{\n\t\tnumber = n;\n\t\tk = 0; i = 0;\n\t\tfor (int j = 1; j <= n; j++)\n\t\t{\n\t\t\thouzi[j] = 0;\n\t\t}\n\t\twhile(number > 0)\n\t\t{\n\t\t\tk++; \n\t\t\ti++;\n\t\t\twhile (houzi[i]==1)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i > n)\n\t\t\t{\n\t\t\t\ti = 0;\n\t\t\t\tk--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ((k == m) && (houzi[i]==0))\n\t\t\t{\n\t\t\t\thouzi[i] = 1; \n\t\t\t\tnumber--;\n\t\t\t\tk=0;\n\t\t\t\tif (number == 0)\n\t\t\t\t{\n\t\t\t\t\tcout << i << endl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "79", "index": "39494", "code": "int main()\n{\n\t\n\tint n[100];\n\tint m[100];\n\tint i,t=0;\n\tint j;\n\t\n\tfor(i=0;i<=100;i++)\n\t{\n\t\tscanf(\"%d\",&n[i]);\n\t\tscanf(\"%d\",&m[i]);\n\t\tt++;\n\t\tif(n[i]==0&&m[i]==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i=0;i>n>>m;\t\n\tdo\n\t{\n\t\tfor (i=0;i<300;i++)\n\t\t\ta[i]=1;\n\t\tnum=n;\n\t\ti=-1;\n\t\twhile (num>1)\n\t\t{\n\t\t\twhile (counter=n) i=0;\n\t\t\t\tif (a[i]==1) counter++;\n\t\t\t}\n\t\t\ta[i]=0;\n\t\t\tnum--;\n\t\t\tcounter=0;\n\t\t}\n\t\tfor (i=0;i>n>>m;\n\t}\n\twhile (n!=0 && m!=0);\n\treturn 0;\n}"} +{"label": "79", "index": "39498", "code": "int main()\n{\n\tint c,outnum=0,m=1,n,i,a[300];;\n\t\n\twhile(m!=0)\n\t\t{\n\t\t\tscanf(\"%d %d\",&n,&m);\n\t\t\tif(m==0)break;\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=0;i<300;i++)\n\t\t\t\t{\n\t\t\t\t\ta[i]=0;\n\t\t\t\t}\n\t\t\toutnum=0;c=0;\n\t\t\twhile(outnum> n >> m;\n\twhile (n != 0 || m != 0)\n\t{\n\t\tmemset(a, 0, sizeof(a));\n\t\tcount = n;\n\t\ti = 1;\n\t\twhile (count != 1)\n\t\t{\n\t\t\ttemp = 0;\n\t\t\twhile (temp != m - 1)\n\t\t\t{\n\t\t\t\tif (a[i] == 0)\n\t\t\t\t\ttemp++;\n\t\t\t\ti++;\n\t\t\t\tif (i > n)\n\t\t\t\t\ti -= n;\n\t\t\t}\n\t\t\twhile (a[i] == 1)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tif (i > n)\n\t\t\t\t\ti -= n;\n\t\t\t}\n\t\t\ta[i] = 1;\n\t\t\tcount--;\n\t\t}\n\t\tfor (i = 1;i <= n;i++)\n\t\t\tif (a[i] == 0)\n\t\t\t\tcout << i << endl;\n\t\tcin >> n >> m;\n\t}\n\treturn 0;\n}\n"} +{"label": "80", "index": "39500", "code": "int main()\n{\n\tint year1,month1,day1;\n\tint year2,month2,day2;\n\tcin>>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\tint days=0;\n\tint d1[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint d2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tif(year1==year2)\n\t{\n\t\tif((year1%4==0&&year2%100!=0)||year1%400==0)\n\t\t{\n\t\t\t\tif(month1==month2)\n\t\t\t\t days+=day2-day1;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\tdays+=d2[month1-1]-day1+d2[month2-1]-day2;\n\t\t\t\tfor(int i=month1;i=0;i--)\n\t\t\t\tdays+=d2[i];\n\t\t}\n\t\telse \n\t\t\t\t{\n\t\t\tdays+=day2;\n for(int i=month2-2;i>=0;i--)\n\t\t\t\tdays+=d1[i];\n\t\t\t\t}\n\t\tfor(int i=year1+1;i2);\n sum=sum-(((ey % 4 == 0 && ey % 100 != 0 )|| ey % 400 == 0)&&em<=2);\n printf(\"%d\\n\",sum);\n}"} +{"label": "80", "index": "39502", "code": "\nint main()\n{\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint y1,y2,m1,m2,d1,d2;\n\tint i,j,k,c=0,sum=0;\n cin>>y1>>m1>>d1>>y2>>m2>>d2;\n if(y1!=y2)\n\t{\n\tfor(i=y1+1;i<=y2-1;i++)\n\t{\n\t\tif(i%4==0&&i%100!=0||i% 400 == 0)\n\t\t{\n\t\t\tc++;\n\t\t}\n\t}\n\tsum=sum+c*366+(y2-y1-1-c)*365;\n\n\n\tif(y1% 4 == 0 && y1% 100 != 0 || y1% 400 == 0)\n\t{\n\t\tfor(i=m1+1;i<=12;i++)\n\t\t{\n\t\t\tsum=sum+b[i];\n\t\t}\n\t\tsum=sum+b[m1]-d1;\n\t}\n\telse\n\t{\n\t\tfor(i=m1+1;i<=12;i++)\n\t\t{\n\t\t\tsum=sum+a[i];\n\t\t}\n\t\tsum=sum+a[m1]-d1;\n\t}\n\t\n if(y2% 4 == 0 && y2% 100 != 0||y2% 400 == 0)\n\t{\n\t\tfor(i=1;i<=m2-1;i++)\n\t\t{\n\t\t\tsum=sum+b[i];\n\t\t}\n\t\tsum=sum+d2;\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=m2-1;i++)\n\t\t{\n\t\t\tsum=sum+a[i];\n\t\t}\n\t\tsum=sum+d2;\n\t}\n\t\n\t}\n\n\n\n\n\telse\n\t{\n\t\tif(y1% 4 == 0 && y1% 100 != 0 || y1% 400 == 0)\n\t {\n\t\tfor(i=m1+1;i<=m2-1;i++)\n\t\t{\n\t\t\tsum=sum+b[i];\n\t\t}\n\t\tsum=sum+b[m1]-d1+d2;\n\t\tif(m1==m2)\n\t\t{\n\t\t\tsum=sum-b[m1];\n\t\t}\n\t\n\t\t}\n\t\telse\n\t {\n\t\tfor(i=m1+1;i<=m2-1;i++)\n\t\t{\n\t\t\tsum=sum+a[i];\n\t\t}\n\t\tsum=sum+a[m1]-d1+d2;\n\t\tif(m1==m2)\n\t\t{\n\t\t\tsum=sum-a[m1];\n\t\t}\n\t\n\t }\n\t\t\n\t\n\t}\n\n\n\n\ncout<2)\nsum1=sum1+1;\n}\n{\nswitch(month2)\n{\ncase 1:sum2=0;break;\ncase 2:sum2=31;break;\ncase 3:sum2=59;break;\ncase 4:sum2=90;break;\ncase 5:sum2=120;break;\ncase 6:sum2=151;break;\ncase 7:sum2=181;break;\ncase 8:sum2=212;break;\ncase 9:sum2=243;break;\ncase 10:sum2=273;break;\ncase 11:sum2=304;break;\ncase 12:sum2=334;break;\ndefault:printf(\"data error\");break;\n}\nsum2=sum2+day2;\nif((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))\nleap2=1;\nelse\nleap2=0;\nif(leap2==1&&month2>2)\nsum2=sum2+1;\n}\nc1=(year1-1)/4-(year1-1)/100+(year1-1)/400;\nc2=(year2-1)/4-(year2-1)/100+(year2-1)/400;\na=(year1-1)*365+sum1+c1;\nb=(year2-1)*365+sum2+c2;\nx=b-a;\nprintf(\"%d\\n\",x);\nreturn 0;\n}"} +{"label": "80", "index": "39504", "code": "//****************************************\n//*??? \n//*????? 1100012996 *\n//*???2011.10.26**\n//****************************************\nint main()\n{\n\tint sy, sm, sd, ey, em, ed,len = 0;\n\tcin >> sy >> sm >> sd >> ey >> em >> ed;\n\tint i;\n\tint month[2][13] = { {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};\n\tint run = 0;\n\tif ( sy != ey)\n\t{\n\trun = (sy % 4 == 0 && sy % 100 != 0 || sy % 400 == 0) ? 1 : 0;\n\tfor (i = sm; i <= 12; i++)\n\t{\n\t\tlen += month[run][i];\n\t}\n\tfor (i = sy + 1; i < ey; i++)\n\t{\n\t\trun = (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) ? 1 : 0;\n\t\tlen +=(365 + run);\n\t}\n\trun = (ey % 4 == 0 && ey % 100 != 0 || ey % 400 == 0) ? 1 : 0;\n\tfor (i = 1; i < em; i++)\n\t{\n\t\tlen += month[run][i];\n\t}\n\t}\n\telse\n\t{\n\t\trun = (sy % 4 == 0 && sy % 100 != 0 || sy % 400 == 0) ? 1 : 0;\n\tfor (i = sm; i < em; i++)\n\t{\n\t\tlen += month[run][i];\n\t}\n\t}\n\t\t\n\tlen = len - sd + ed;\n\tcout << len <endDay)\n\t{\n\t\tfor(i=startDay;i>endDay;i--)\n\t\t\tdertDay=dertDay-1;\n\t}\n\tif(startMonthendMonth)\n\t{\n\t\tif(endYear%4==0&&endYear%100!=0||endYear%400==0)\n\t\t{\n\t\t\tfor(i=startMonth;i>endMonth;i--)\n\t\t\t\tdertMonth=dertMonth-b[i];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=startMonth;i>endMonth;i--)\n\t\t\t\tdertMonth=dertMonth-a[i];\n\t\t}\n\t}\n\tif(startYear>syear>>smonth>>sday\n\t\t>>eyear>>emonth>>eday;\n\tif (smonth>2) //??2??????????\n\t{\n\t\tswitch (smonth)\n\t\t{\n\t\tcase 3: sum=sum+31+30+31+30+31+31+30+31+30+31-sday;break;\n\t\tcase 4: sum=sum+31+30+31+30+31+31+30+31+30-sday;break;\n\t\tcase 5: sum=sum+31+30+31+30+31+31+30+31-sday;break;\n\t\tcase 6: sum=sum+31+30+31+30+31+31+30-sday;break;\n\t\tcase 7: sum=sum+31+30+31+30+31+31-sday;break;\n\t\tcase 8: sum=sum+31+30+31+30+31-sday;break;\n\t\tcase 9: sum=sum+31+30+31+30-sday;break;\n\t\tcase 10: sum=sum+31+30+31-sday;break;\n\t\tcase 11: sum=sum+31+30-sday;break;\n\t\tcase 12: sum=sum+31-sday; //????break????????\n\t\t}\n\t}\n\telse if ((syear%4==0&&syear%100!=0)||(syear%400==0)) //???????????????\n\t{\n switch (smonth)\n\t\t{\n\t\tcase 1: sum=sum+31+30+31+30+31+31+30+31+30+31+29+31-sday;break;\n\t\tcase 2: sum=sum+31+30+31+30+31+31+30+31+30+31+29-sday;\n\t\t}\n\t}\n\telse \n\t{\n switch (smonth)\n\t\t{\n\t\tcase 1: sum=sum+31+30+31+30+31+31+30+31+30+31+28+31-sday;break;\n\t\tcase 2: sum=sum+31+30+31+30+31+31+30+31+30+31+28-sday;\n\t\t}\n\t}\n\tfor (i=syear+1;i<=eyear-1;i++) //????????????????????365??366\n\t{\n\t\tif ((i%4==0&&i%100!=0)||(i%400==0))\n\t\t\tsum=sum+366;\n\t\telse \n\t\t\tsum=sum+365;\n\t}\n\tif (emonth==1)\n\t{\n\t\tsum=sum+eday;\n\t}\n\telse if (emonth==2) //ednyear???????????????\n\t{\n\t\tsum=sum+31+eday;\n\t}\n\telse if ((eyear%4==0&&eyear%100!=0)||(eyear%400==0))\n\t{\n\t switch (emonth)\n\t\t{\n\t\tcase 12: sum=sum+31+29+31+30+31+30+31+31+30+31+30+eday;break;\n\t\tcase 11: sum=sum+31+29+31+30+31+30+31+31+30+31+eday;break;\n\t\tcase 10: sum=sum+31+29+31+30+31+30+31+31+30+eday;break;\n\t\tcase 9: sum=sum+31+29+31+30+31+30+31+31+eday;break;\n\t\tcase 8: sum=sum+31+29+31+30+31+30+31+eday;break;\n\t\tcase 7: sum=sum+31+29+31+30+31+30+eday;break;\n\t\tcase 6: sum=sum+31+29+31+30+31+eday;break;\n\t\tcase 5: sum=sum+31+29+31+30+eday;break;\n\t\tcase 4: sum=sum+31+29+31+sday;break;\n\t\tcase 3: sum=sum+31+29+sday;\n\t\t}\n\t}\n\telse \n\t{\n switch (emonth)\n\t\t{\n\t\tcase 12: sum=sum+31+28+31+30+31+30+31+31+30+31+30+eday;break;\n\t\tcase 11: sum=sum+31+28+31+30+31+30+31+31+30+31+eday;break;\n\t\tcase 10: sum=sum+31+28+31+30+31+30+31+31+30+eday;break;\n\t\tcase 9: sum=sum+31+28+31+30+31+30+31+31+eday;break;\n\t\tcase 8: sum=sum+31+28+31+30+31+30+31+eday;break;\n\t\tcase 7: sum=sum+31+28+31+30+31+30+eday;break;\n\t\tcase 6: sum=sum+31+28+31+30+31+eday;break;\n\t\tcase 5: sum=sum+31+28+31+30+eday;break;\n\t\tcase 4: sum=sum+31+28+31+eday;break;\n\t\tcase 3: sum=sum+31+28+eday;\n\t\t}\n\t}\n\tif (syear==eyear) //????????????????????\n\t{\n\t\tif ((eyear%4==0&&eyear%100!=0)||(eyear%400==0))\n\t\t\tsum=sum-366;\n\t\telse \n\t\t\tsum=sum-365;\n\t} \n\tcout<>sy>>sm>>sd>>ey>>em>>ed;//??????\n\tfor(i=1;i>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\n\tint sum=0;\n\tfor(int year=startYear ; year>sy>>sm>>sd>>ey>>em>>ed;\n\tint month[2][13]={0,31,28,31,30,31,30,31,31,30,31,30,31,0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint year[2]={365,366};\n\tif(sy==ey)\n\t{\n\t\tfor(int i=sm;i<=em;i++)\n\t\t\ts=s+month[leapy(sy)][i];\n\t\ts=s-sd+1-(month[leapy(sy)][em]-ed);\n\t}\n\telse\n\t{\n\tfor(int i=sm+1;i<=12;i++)\n\t\ts=s+month[leapy(sy)][i];\n\ts=s+month[leapy(sy)][sm]-sd+1;\n\tfor(int i=1;i1)\n\t{\n\tfor(int i=sy+1;i<=ey-1;i++)\n\t\ts=s+year[leapy(i)];\n\t}\n\t}\n\tcout< 0)\n\t{\n\tfor(i = 1;i < endYear - startYear;i++)\n\t{\n\t\tdaybetweendates += dayofyear[IsLeapYear(startYear + i)];\n\t}\n\tif(IsLeapYear(startYear)==1)\n\t{\n\tdaybetweendates += leapyearmonth[startMonth - 1] - startDay;\n\tfor(j = startMonth;j < 12;j++)\n\t{\n\t\tdaybetweendates += leapyearmonth[j];\n\t}\n\t}\n\tif(IsLeapYear(startYear)==0)\n\t{\n\tdaybetweendates += commonyearmonth[startMonth - 1] - startDay;\n\tfor(k = startMonth;k < 12;k++)\n\t{\n\t\tdaybetweendates += commonyearmonth[k];\n\t}\n\t}\n\tif(IsLeapYear(endYear)==1)\n\t{\n\tdaybetweendates += endDay;\n\tfor(j = 0;j < endMonth - 1;j++)\n\t{\n\t\tdaybetweendates += leapyearmonth[j];\n\t}\n\t}\n\tif(IsLeapYear(endYear)==0)\n\t{\n\tdaybetweendates += endDay;\n\tfor(k = 0;k < endMonth - 1;k++)\n\t{\n\t\tdaybetweendates += commonyearmonth[k];\n\t}\n\t}\t\n\t}\n\tprintf(\"%d\\n\",daybetweendates);\n\treturn 0;\n}"} +{"label": "80", "index": "39517", "code": "int main()\n{\n\tint year1, year2, mon1, mon2, date1, date2;\n\tscanf(\"%d %d %d\", &year1, &mon1, &date1);\n scanf(\"%d %d %d\", &year2, &mon2, &date2);\n\tint y[3000]={0};\n\tint n, i;\n\tn=year2-year1;\n\ty[0]=year1;\n\tfor(i=0;i<=n;i++)\n\t{\n\t if((y[i] % 4 == 0 && y[i] % 100 != 0) || (y[i] % 400 == 0))//runnian\n\t\t {\n y[i+1]=y[i]+1;\n\t\t\t y[i]=366;\n }\n\t\t else\n\t\t {\n\t\t\t y[i+1]=y[i]+1;\n\t\t\t y[i]=365;\n\t\t }\n\t\n\t}\n\tint sum=0;\n\tif(n>=2)\n\t{for(i=1;imon1)sum=sum+1;}\n\t\t }\n if(mon2==2)\n\t\t {\n\t\t if(mon1==1)sum=31+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=31+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=31+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=31+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=31+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=31+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=31+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=31+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=31+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=31+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=31+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=31+date2-1+sum+y[0]-334-date1;\n\t\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t \n\t\t }\n if(mon2==3)\n\t\t {\n\t\t if(mon1==1)sum=59+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=59+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=59+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=59+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=59+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=59+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=59+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=59+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=59+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=59+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=59+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=59+date2-1+sum+y[0]-334-date1;\n\t\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t \n\n\t\t }\n \n\t if(mon2==4)\n\t\t {\n\t\t if(mon1==1)sum=89+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=89+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=89+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=89+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=89+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=89+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=89+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=89+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=89+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=89+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=89+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=89+date2-1+sum+y[0]-334-date1;\n\t\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t }\n\n if(mon2==5)\n\t\t {\n\t\t if(mon1==1)sum=120+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=120+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=120+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=120+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=120+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=120+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=120+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=120+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=120+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=120+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=120+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=120+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t \n\t\t \n\t\t }\n if(mon2==6)\n\t\t {\n\t\t if(mon1==1)sum=150+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=150+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=150+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=150+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=150+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=150+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=150+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=150+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=150+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=150+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=150+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=150+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t \n\t\t }\n\n if(mon2==7)\n\t\t {\n\t\t if(mon1==1)sum=181+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=181+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=181+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=181+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=181+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=181+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=181+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=181+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=181+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=181+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=181+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=181+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t }\n if(mon2==8)\n\t\t {\n\t\t if(mon1==1)sum=212+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=212+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=212+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=212+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=212+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=212+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=212+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=212+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=212+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=212+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=212+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=212+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t }\n if(mon2==9)\n\t\t {\n\t\t if(mon1==1)sum=242+date2+sum+y[0]-date1;\n\t\t if(mon1==2)sum=242+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=242+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=242+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=242+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=242+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=242+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=242+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=242+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=242+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=242+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=242+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t \n\t\t }\n if(mon2==10)\n\t\t {\n\t\t if(mon1==1)sum=273+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=273+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=273+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=273+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=273+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=273+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=273+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=273+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=273+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=273+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=273+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=273+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\n\t\t }\n if(mon2==11)\n\t\t {\n\t\t if(mon1==1)sum=303+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=303+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=303+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=303+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=303+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=303+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=303+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=303+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=303+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=303+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=303+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=303+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\n\t\t }\n if(mon2==12)\n\t\t {\n\t\t if(mon1==1)sum=334+date2-1+sum+y[0]-date1;\n\t\t if(mon1==2)sum=334+date2-1+sum+y[0]-31-date1;\n\t\t \n\t\t\t if(mon1==3)sum=334+date2-1+sum+y[0]-59-date1;\n\t if(mon1==4)sum=334+date2-1+sum+y[0]-89-date1;\n if(mon1==5)sum=334+date2-1+sum+y[0]-120-date1; \n if(mon1==6)sum=334+date2-1+sum+y[0]-150-date1; \n if(mon1==7)sum=334+date2-1+sum+y[0]-181-date1; \n if(mon1==8)sum=334+date2-1+sum+y[0]-212-date1;\n if(mon1==9)sum=334+date2-1+sum+y[0]-242-date1;\n if(mon1==10)sum=334+date2-1+sum+y[0]-273-date1;\n\t\t if(mon1==11)sum=334+date2-1+sum+y[0]-303-date1;\n if(mon1==12)sum=334+date2-1+sum+y[0]-334-date1;\n\t\t if(y[0]==366)\n\t\t\t {if(mon2>mon1)sum=sum+1;}\n\t\t }\n\t\t\n\t\t \n if(y[n]==366)\n\t {if(mon2>mon1)sum=sum+1;}\n\t\n\t\n\tif(n==0)sum=sum-y[0];\n\tprintf(\"%d\\n\", sum+1);\n\treturn 0;\n\n\n}\t\t\n"} +{"label": "80", "index": "39518", "code": "int main()\n{\n\tint year,month,day,Year,Month,Day;\n\tscanf(\"%d %d %d\",&year,&month,&day);\n\tscanf(\"%d %d %d\",&Year,&Month,&Day);\n\tint m[]={0,31,59,90,120,151,181,212,243,273,304,334};\n\tint i,date;\n\tfor(i=0;i<=11;i++)\n\t{\n\t\tif(Month==i+1)\n\t\t{\n\t\t\tdate=m[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tdate=date+Day;\n\tfor(i=0;i<=11;i++)\n\t{\n\t\tif(month==i+1)\n\t\t{\n\t\t\tdate=date+365-m[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\tdate=date-day;\n\tint r;\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t{\n\t\tr=floor((Year-year)/4)+1;\n\t}\n\telse\n\t{\n\t\tif(year%4==1)\n\t\t{\n\t\t\tr=floor((Year-year+1)/4);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(year%4==2)\n\t\t\t{\n\t\t\t\tr=floor((Year-year+2)/4);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(year%4==3)\n\t\t\t\t{\n\t\t\t\t\tr=floor((Year-year+3)/4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))&&(month>2))\n\t{\n\t\tr=r-1;\n\t}\n\tif(((Year % 4 == 0 && Year % 100 != 0) || (Year % 400 == 0))&&(Month<3))\n\t{\n\t\tr=r-1;\n\t}\n\tint h=year%400,s=year%100;\n\tr=r-floor((Year-year+s)/100)+floor((Year-year+h)/400);\n\tdate=date+r+365*(Year-year-1);\n\tprintf(\"%d\",date);\n\treturn 0;\n}"} +{"label": "80", "index": "39519", "code": "int main()\n{\n\tint day[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};\n\tint year1;\n\tint year2;\n\tint month1;\n\tint month2;\n\tint day1;\n\tint day2;\n\tint i;\n\tint sum=0;\n\tcin>>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\t\n\twhile(month1!=month2||year1!=year2)\n\t{\n\t\tif((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t\t\t sum=sum+day[1][month1];\n\t\t else\n\t\t\t sum=sum+day[0][month1];\n\t\tif(month1==12){ month1=month1-12;\n\t\t\t\t\t\t year1=year1+1;\n\t\t\t\t\t }\n\t\telse month1++;\n\t}\n\tsum=sum+day2-day1;\n\tcout<> startYear >> startMonth >> startDay;\n\tcin >> endYear >> endMonth >> endDay;\n\tfor (int i = startYear; i < endYear; i++) {\n\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\tday = day + 366;\n\t\telse\n\t\t\tday = day + 365;\n\t}\n\tif ((endYear % 4 == 0 && endYear % 100 != 0) || endYear % 400 == 0)\n\t\tDay[2] = 29;\n\tfor (int i = 1; i < endMonth; i++) {\n\t\tday = day + Day[i];\n\t}\n\tday = day + endDay;\n\tif ((startYear % 4 == 0 && startYear % 100 != 0) || startYear % 400 == 0)\n\t\tDay[2] = 29;\n\telse\n\t\tDay[2] = 28;\n\tfor (int i = 1; i < startMonth; i++) {\n\t\tday = day - Day[i];\n\t}\n\tday = day - startDay;\n\tcout << day;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39522", "code": "int main (){\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint y1,y2,m1,m2,d1,d2;\n\tint ysum=0,msum=0,dsum=0;\n\tint i;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1+1;i> y1 >> m1 >> d1;\n cin >> y2 >> m2 >> d2;\n for (i = 1; i <= y1-1; i++)\n if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n sum1 = sum1 + 366 ;\n else sum1 = sum1 + 365; \n for (i = 1; i <= m1-1;i++)\n if ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n sum1 = sum1 + md[1][i];\n else sum1 = sum1 + md[0][i];\n sum1 = sum1 + d1;\n\n for (i = 1; i <= y2-1; i++)\n if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n sum2 = sum2 + 366 ;\n else sum2 = sum2 + 365; \n for (i = 1; i <= m2-1;i++)\n if ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n sum2 = sum2 + md[1][i];\n else sum2 = sum2 + md[0][i];\n sum2 = sum2 + d2;\n s = sum2 - sum1;\n if ( s >= 0) cout << s << endl;\n else cout << -s << endl;\n return 0;\n}\n \n\n\n \n "} +{"label": "80", "index": "39524", "code": "int main()\n{\n\tint y1,m1,d1,y2,m2,d2,total1=0,total2=0,t,i,e,f,x1,x2; \nint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31} ;\n\n scanf(\"%d%d%d%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2); \n i=0;\n e=0;\n f=0;\n x1=0;\n x2=0;\n\n\nfor(i=0;i2)\ne=e+1;\n\n for(i=0;i2)\n\t f=f+1;\n\n\n\n\n\nfor(i=1;i> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tif (y1 != y2)\n\t{\n\t\tif ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0) && (m1 <= 2))\n\t\t\tsum++;\n\t\tfor (i = 12; i > m1; i--)\n\t\t\tsum += d[i];\n\t\tsum += d[m1] - d1;\n\t\tfor (i = y1 + 1; i < y2; i++)\n\t\t{\n\t\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\tsum++;\n\t\t\tsum += 365;\n\t\t}\n\t\tif ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) && (m2 > 2))\n\t\t\tsum += 1;\n\t\tfor (i = 1; i < m2; i++)\n\t\t\tsum += d[i];\n\t\tsum += d2;\n\t\tcout << sum;\n\t}\n\telse\n\t{\n\t\tif ((m1 <= 2) && (m2 > 2))\n\t\t\tsum++;\n\t\tif (m2 > m1)\n\t\t{\n\t\t\tfor (i = m1 + 1; i < m2; i++)\n\t\t\t\tsum += d[i];\n\t\t\tsum += d[m1] - d1;\n\t\t\tsum += d2;\n\t\t}\n\t\telse\n\t\t\tsum += d2 - d1;\n\t\tcout << sum;\n\t}\n\n\treturn 0;\n}"} +{"label": "80", "index": "39528", "code": "int main()\n{\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint year=0,month1=0,month2=0,day;\n\tint y1,y2,m1,m2,d1,d2;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint i;\n\tfor(i=y1;i<=y2;i++)\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tyear++;\n\tyear+=365*(y2-y1);\n\t\n\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\ta[2]=29;\n\tfor(i=1;i<=m1-1;i++)\n\t\tmonth1=month1+a[i];\n\tmonth1+=d1;\n\n\tif(!(y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n\t\ta[2]=28;\n\tfor(i=1;i<=m2-1;i++)\n\t\tmonth2=month2+a[i];\n\tmonth2+=d2;\n\tday=year+month2-month1;\n\tcout<>year[i]>>month[i]>>day[i];\n\t}\n\tfor(i=0;i<2;i++){\n\t\tfor(j=1;jyear[0];i--){\n\t\tif((i-1)%4!=0||((i-1)%100==0&&(i-1)%400!=0))\n\t\t\tday[1]+=365;\n\t\telse\n\t\t\tday[1]+=366;\n\t}\n\tcout<> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tleap = (y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0);\n\tfor(i = 1; i < m1; i++)\n\t{\n\t\tday1 += mday[leap][i];\n\t}\n\tday1 += d1;\n\tfor(i = y1; i < y2; i++)\n\t{\n\t\tleap = (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0);\n\t\tday2 += yday[leap];\n\t}\n\tleap = (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0);\n\tfor(i = 1; i < m2; i++)\n\t{\n\t\tday2 += mday[leap][i];\n\t}\n\tday2 += d2;\n\tday2 = day2 - day1;\n\tcout << day2 << endl;\n\n}\n"} +{"label": "80", "index": "39531", "code": "//**********************************\n//*?? ???????????*****\n//*????? 1300012753 ******* \n//*???2013.11.02 ******* \n//**********************************\nint main()\n{\n\tint syear, smonth, sday, eyear, emonth, eday;\n\tcin >> syear >> smonth >> sday >> eyear >> emonth >> eday; \n\tint sum = 0;\n\tint month1[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint month2[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tif((syear % 4 == 0 && syear % 100 != 0) || (syear % 400 == 0))\n\tmonth1[2] = 29;\n\tif((eyear % 4 == 0 && eyear % 100 != 0) || (eyear % 400 == 0))\n\tmonth2[2] = 29;\n\tif (syear == eyear && smonth == emonth)\n\t{\n\t\tsum += eday - sday;\n\t}\n\telse if(syear == eyear && smonth != emonth)\n\t{\n\t\tsum += month1[smonth] - sday + 1;\n\t\tfor(int month = smonth + 1; month < emonth; month++)\n\t\tsum += month1[month];\n\t\tsum += eday - 1;\n\t}\n\telse\n\t{\n\t\tsum += month1[smonth] - sday + 1;\n\t for(int month = smonth + 1; month <= 12; month++)\n\t {\n\t\t sum += month1[month];\n\t }\n\t for (int year = syear + 1; year < eyear; year++)\n\t {\n\t\t if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\t sum += 366;\n\t\t else\n\t\t sum += 365;\n\t }\n\t for(int month = 1; month < emonth; month++)\n\t {\n\t\t sum += month2[month];\n\t }\n\t sum += eday - 1;\n\t}\n\tcout << sum;\n\treturn 0;\n}"} +{"label": "80", "index": "39532", "code": "/*\n * 5.cpp\n *\n * Created on: 2011-11-4\n * Author: 11294\n */\nint main(){\n\tint y1,m1,d1;\n\tint y2,m2,d2;\n\tcin>>y1>>m1>>d1>>y2>>m2>>d2;\n\tint i,j;\n\tint s;\n\tif(y12)s++;\n\t\t}\n\t\ts=s+d2-d1;\n\t}\n\telse{\n\t\tint left1;\n\t\tint passed2;\n\t\tleft1=365;\n\t\tfor(j=1;j> year1 >> month1 >> day1 >> year2 >> month2 >> day2;\n int leap1 = year1 % 400 == 0 || ((year1 % 4 == 0) && (year1 % 100 != 0));\n int leap2 = year2 % 400 == 0 || ((year2 % 4 == 0) && (year2 % 100 != 0));\n for (i = 1; i < month1; i++)\n {\n count1 += month[leap1][i];\n }\n count1 += day1 - 1;\n for (i = year1; i < year2; i++)\n {\n if (i % 400 == 0 || ((i % 4 == 0) && (i % 100 != 0)))\n {\n count2 += 366;\n }\n else\n {\n count2 += 365;\n }\n }\n for (i = 1; i < month2; i++)\n {\n count2 += month[leap2][i];\n }\n count2 += day2 - 1;\n cout << count2 - count1 << endl;\n return 0;\n} \n"} +{"label": "80", "index": "39536", "code": "int main()\n{\n int a,b,c,k=0,i,w,q,T;\n int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int d,e,f,t,h=0,g=0;\n scanf(\"%d%d%d\",&a,&b,&c);\n scanf(\"%d%d%d\",&d,&e,&f);\n for(i=a;i<=d;i++)\n {\n if(i%4==0&&i%100!=0||i%400==0)\n k=k+1;\n }\n t=(d-a-1)*365;\n for(w=b;w<=12;w++)\n {\n h=h+m[w];\n }\n for(q=e;q>=1;q--)\n {\n g=g+m[q-1];\n }\n T=t+k+h+g-c+f;\n printf(\"%d\",T);\n return 0;\n}\n \n \n \n \n \n"} +{"label": "80", "index": "39537", "code": "/*\n *\n * ????\n * ???2011-01-09\n * ?????? 1000012774\n * ???\n */\n\nint judge(int year)\n{\n\tint i,j,t;\n\tif(year%4!=0)\n\t\treturn 0;\n\telse\n\t{\n\t\tif(year%100==0){\n\t\t\tif(year%400==0)\n\t\t\t\treturn 1;\n\t\t\telse\n\t\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t\treturn 1;\n\t}\n}\n\nint main()\n{\n\tint y1,y2,m1,m2,d1,d2,day=0,temp;\n\tint a[14];\n\tint i,j,k;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\ta[1]=31;\n\ta[2]=28;\n\ta[3]=31;\n\ta[4]=30;\n\ta[5]=31;\n\ta[6]=30;\n\ta[7]=31;\n\ta[8]=31;\n\ta[9]=30;\n\ta[10]=31;\n\ta[11]=30;\n\ta[12]=31;\n\tif((y2-y1)>1){\n\t\tfor(i=y1+1;i>startYear>>startMonth>>stratDay;\n cin>>endYear>>endMonth>>endDay;\n for(i=startYear;i>y1>>m1>>d1>>y2>>m2>>d2;\n for(int i=y1;i2;\n if(flag1||flag2)\n day=366;\n else day=365;\n days+=day;\n }\n if(m1m2)\n {\n for(int i=m2;i=2)\n\t\t{\n\t\t\tfor(i=y1;i366)\n\td++;\n\tprintf(\"%d\",d);\n\treturn 0;\n}"} +{"label": "80", "index": "39541", "code": "int main()\n{\n\tint i ,j ,k, ay, am, ad, by, bm, bd, day = 0;\n\tint moutha[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\tint mouthb[12] = {31,29,31,30,31,30,31,31,30,31,30,31};\n\tcin >> ay >> am >> ad;\n\tcin >> by >> bm >> bd;\n\tfor(i = ay ; i < by; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t{\n\t\t\tday+=366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tday+=365;\n\t\t}\n\t}\n\tfor(i = 0; i < bm - 1;i++)\n\t{\n\t\tif((by % 4 == 0 && by % 100 != 0) || (by % 400 == 0))\n\t\t{\n\t\t\tday += mouthb[i];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tday += moutha[i];\n\t\t}\n\t}\n\tday+=bd;\n\tfor(i = 0; i < am - 1; i++)\n\t{\n\t\tif((ay % 4 == 0 && ay % 100 != 0) || (ay % 400 == 0))\n\t\t{\n\t\t\tday -= mouthb[i];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tday -= moutha[i];\n\t\t}\n\t}\n\tday-=ad;\n\tcout << day << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39542", "code": "\n\nint run_check(int year)\n{\n\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\treturn 1;\n\treturn 0;\n}\n\nint days_in_months[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\nint main()\n{\n int sy, sm, sd, ey, em, ed, ans = 0;\n\n\tcin >> sy >> sm >> sd >> ey >> em >> ed;\n\n\tfor (int i = sy + 1; i < ey; i++)\n\t\tans += run_check(i) + 365;\n\n\tif (sy != ey) {\n\t\tfor (int i = sm + 1; i <= 12; i++) {\n\t\t\tans += days_in_months[i];\n\t\t\tif (i == 2)\n\t\t\t\tans += run_check(sy);\n\t\t}\n\t\tfor (int i = 1; i < em; i++) {\n\t\t\tans += days_in_months[i];\n\t\t\tif (i == 2)\n\t\t\t\tans += run_check(ey);\n\t\t}\n\t}\n\telse {\n\t\tfor (int i = sm + 1; i < em; i++) {\n\t\t\tans += days_in_months[i];\n\t\t\tif (i == 2)\n\t\t\t\tans += run_check(sy);\n\t\t}\n\t}\n\n\tif (sy != ey || sm != em) {\n\t\tfor (int i = sd; i <= days_in_months[sm]; i++)\n\t\t\tans++;\n\t\tif (sm == 2)\n\t\t\tans += run_check(sy);\n\t\tfor (int i = 1; i < ed; i++)\n\t\t\tans++;\n\t}\n\telse {\n\t\tfor (int i = sd; i < ed; i++)\n\t\t\tans++;\n\t}\n\tcout << ans;\n return 0;\n}\n"} +{"label": "80", "index": "39543", "code": "\nint main() {\n int year1,month1,day1;\n int year2,month2,day2;\n int i, temp;\n long int n=0;\n int A[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n int B[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n scanf(\"%d%d%d\", &year1, &month1, &day1);\n scanf(\"%d%d%d\", &year2, &month2, &day2);\n temp=year1;\n while (temp!=year2) {\n if ((temp%4==0&&temp%100!=0)||(temp%400==0)) {\n n=n+366;\n } else {\n n=n+365;\n }\n temp+=1;\n }\n temp=0;\n if ((year1%4==0&&year1%100!=0)||(year1%400==0)) {\n for(i=0;i>startyear>>startmonth>>startday>>endyear>>endmonth>>endday;\nfor(i=1;i<=3000;i++)\n\tif((i%4==0&&i%100!=0)||i%400==0)\n\t\t{b[j]=i;/*????(year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)? \n???2???29?*/\n\t\tj++;\n\t\t}\nfor(i=1;i=3)\n\t\t\tdou=dou+1;}\np=endyear-startyear;\ndays=p*365;\nif(startmonthendmonth)\n\t{for(i=startmonth;i<=12;i++)\n\t\tdays=days+a[i];\n\tfor(i=1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint sum=0;\n\tint i;\n\tif(y1==y2)\n\t{\n\t\tif(m1==m2)\n\t\t\tsum=d2-d1;\n\t\telse\n\t\t{\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t{\n\t\t\tfor(i=m1+1;i7)\n\t\t{\n\t\t\tif (a2%2==1)\n\t\t\t\tt1=213+((a2-7)/2-1)*61+31+a3;\n\t\t\telse\n\t\t\t\tt1=213+(a2-7)/2*61+a3;\n\t\t}\n\t\tif ((b1%4==0&&b1%100!=0)||(b1%400==0))\n\t\t{\n\t\t\tif(b2<=2)\n\t\t\t\tt2=(b2-1)*31+b3;\n\t\t\telse if (b2<=7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=(b2-2)/2*61+b3+60;\n\t\t\t\telse \n\t\t\t\t\tt2=((b2-2)/2-1)*61+b3+31+60;\n\t\t\t}\n\t\t\telse if (b2>7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=213+((b2-7)/2-1)*61+31+b3;\n\t\t\t\telse\n\t\t\t\t\tt2=213+(b2-7)/2*61+b3;\n\t\t\t}\n\t\td=(b1-a1)*(366+365*3)/4+t2-t1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(b2<=2)\n\t\t\t\tt2=(b2-1)*31+b3;\n\t\t\telse if (b2<=7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=(b2-2)/2*61+b3+60-1;\n\t\t\t\telse \n\t\t\t\t\tt2=((b2-2)/2-1)*61+b3+31+60-1;\n\t\t\t}\n\t\t\telse if (b2>7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=213+((b2-7)/2-1)*61+31+b3-1;\n\t\t\t\telse\n\t\t\t\t\tt2=213+(b2-7)/2*61+b3-1;\n\t\t\t}\n\t\td=((b1-a1)/4)*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*366+t2-t1;\n\t\t}\n\n\t}\n\telse \n\t{\n\t\tif(a2<=2)\n\t\t\tt1=(a2-1)*31+a3;\n\t\telse if (a2<=7)\n\t\t{\n\t\t\tif (a2%2==1)\n\t\t\t\tt1=(a2-2)/2*61+a3+60-1;\n\t\t\telse \n\t\t\t\tt1=((a2-2)/2-1)*61+a3+31+60-1;\n\t\t}\n\t\telse if (a2>7)\n\t\t{\n\t\t\tif (a2%2==1)\n\t\t\t\tt1=213+((a2-7)/2-1)*61+31+a3-1;\n\t\t\telse\n\t\t\t\tt1=213+(a2-7)/2*61+a3-1;\n\t\t}\n\t\tif ((b1%4==0&&b1%100!=0)||(b1%400==0))\n\t\t{\n\t\t\tif(b2<=2)\n\t\t\t\tt2=(b2-1)*31+b3;\n\t\t\telse if (b2<=7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=(b2-2)/2*61+b3+60;\n\t\t\t\telse \n\t\t\t\t\tt2=((b2-2)/2-1)*61+b3+31+60;\n\t\t\t}\n\t\t\telse if (b2>7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=213+((b2-7)/2-1)*61+31+b3;\n\t\t\t\telse\n\t\t\t\t\tt2=213+(b2-7)/2*61+b3;\n\t\t\t}\n\t\td=((b1-a1)/4)*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*365+t2-t1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(b2<=2)\n\t\t\t\tt2=(b2-1)*31+b3;\n\t\t\telse if (b2<=7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=(b2-2)/2*61+b3+60-1;\n\t\t\t\telse \n\t\t\t\t\tt2=((b2-2)/2-1)*61+b3+31+60-1;\n\t\t\t}\n\t\t\telse if (b2>7)\n\t\t\t{\n\t\t\t\tif (b2%2==1)\n\t\t\t\t\tt2=213+((b2-7)/2-1)*61+31+b3-1;\n\t\t\t\telse\n\t\t\t\t\tt2=213+(b2-7)/2*61+b3-1;\n\t\t\t}\n\t\td=(b1-a1)/4*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*365+t2-t1;\n\t\t}\n\t}\n if ((b1-a1)>=100)\n d=d-1;\n\tprintf(\"%d\\n\",d);\n\treturn 0;\n}"} +{"label": "80", "index": "39549", "code": "int rr(int year){\n if((year%4==0&&year%100!= 0)||(year%400==0))\n return 1;\n else return 0;\n } \nint main(){\n int y1,m1,d1,y2,m2,d2,p=0,x=0,y=0,a=0,b=0,i;\n int aa[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n cin>>y1>>m1>>d1>>y2>>m2>>d2;\n for(i=y1+1;i>Ya>>Ma>>Da;\n cin>>Yb>>Mb>>Db;\n Sa=365*(Ya-1)+30*(Ma-1)+Da+R(Ya-1)+RM(Ma,Ya);\n Sb=365*(Yb-1)+30*(Mb-1)+Db+R(Yb-1)+RM(Mb,Yb);\n cout<2))\n x++;\n \n }\n }\n else{\n for(j=a;j<=d;j++){\n if(j==a){\n for(i=b;i<=12;i++){\n \n if(i==4||i==6||i==9||i==11){\n if(i==b){\n x=30-c;\n continue;}\n else{\n x=x+30;\n continue;}\n }\n else {if(i==2){\n if(i==b){\n x=28-c;\n continue;}\n else{\n x=x+28;\n continue;}\n }\n else{\n if(i==b){\n x=31-c;\n continue;}\n else{\n x=x+31;\n continue;}\n }}\n }\n if(((a%4==0&&a%100!=0)||(a%400==0))&&(b<=2))\n x++;\n \n }\n else {\n \n if(j==d){\n for(i=1;i<=e;i++){\n if(i==4||i==6||i==9||i==11){\n if(i==e){\n x=x+f;\n continue;}\n else{\n \n x=x+30;\n \n continue;}\n }\n else{ if(i==2){\n if(i==e){\n x=x+f;\n continue;}\n else{\n x=x+28;\n continue;}\n }\n else{\n if(i==e){\n x=x+f;\n continue;}\n else{\n x=x+31;\n continue;}\n } } \n \n }\n if(((d%4==0&&d%100!=0)||(d%400==0))&&(e>2))\n x++;\n \n }\n else{\n \n if((j%4==0&&j%100!=0)||(j%400==0)){\n x=x+366;\n \n continue;}\n else{\n x=x+365;\n continue;}\n }}\n }\n \n }\n printf(\"%d\",x);\n return 0;\n } \n \n \n \n \n \n \n \n \n \n \n \n \n \n"} +{"label": "80", "index": "39552", "code": "int main()\n{\n\tint sum = 0;\n\tint year1 , year2;\n\tint month1 , month2;\n\tint day1 , day2;\n\tcin >> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tint mon[13] = { 0 , 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 };\n\n\tint year , month , day;\n\tint days;\n\tfor( year = year1 ; year < year2 ; year ++ )\n\t{\n\t\tif( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0 ))\n\t\t\tdays = 366;\n\t\telse\n\t\t\tdays = 365;\n\t\tsum = sum + days;\n\t}\n\tfor( month = 1 ; month < month1 ; month ++ )\n\t{\n\t\tif( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0 ) )\n\t\t\tmon[2] = 29;\n\t\tsum = sum - mon[month];\n\t}\n\tfor( day = 1 ; day < day1 ; day ++ )\n\t\tsum --;\n\tfor( month = 1 ; month < month2 ; month ++ )\n\t{\n\t\tif( (year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0 ) )\n\t\t\tmon[2] = 29;\n\t\tsum = sum + mon[month];\n\t}\n\tfor( day = 1 ; day < day2 ; day ++ )\n\t\tsum ++;\n\tcout << sum;\n\n\n\treturn 0;\n}\n"} +{"label": "80", "index": "39553", "code": "void main()\n{\n\tint a,b,c,d,e,f,g,h,j,k,n;\n\th=0;\n\tint t(int l,int m);\n\tscanf (\"%d %d %d\",&a,&b,&c);\n\tscanf (\"%d %d %d\",&d,&e,&f);\n\tfor (g=a+1;g<=d;g++)\n\t{\n\t\tif(g%400==0||(g%4==0&&g%100!=0))\n\t\t{\n\t\t\th+=1;\n\t\t}\n\t}\n\tint days[12]={0,31,59,90,120,151,181,212,243,273,304,334};\n\tj=days[b-1];\n k=days[e-1];\n\tn=365*(d-a)+h+t(a,b)-t(d,e)-j+k-c+f;\n\tprintf(\"%d\\n\",n);\n}\nint t(int l,int m)\n{\n\tint i=0;\n\tif(l%400==0||(l%4==0&&l%100!=0)&&(m==1||m==2))\n\ti=1;\n\treturn(i);\n}"} +{"label": "80", "index": "39554", "code": "\nint day_of_year(int n)\n{\n if(n%400==0) return 366;\n if((n%4==0)&&(n%100!=0)) return 366; else return 365;\n}\n\nint day_of_month(int month,int year)\n{\n if(month==2)\n if(day_of_year(year)==366) return 29;else return 28;\n if((month==4)||(month==6)||(month==9)||(month==11)) return 30;\n else return 31;\n}\n\nint main()\n{\n int year1,year2,month1,month2,day1,day2,i,j,sum,sumyear,summonth1,summonth2;\n scanf(\"%d %d %d\\n%d %d %d\",&year1,&month1,&day1,&year2,&month2,&day2);\n sum=sumyear=summonth1=summonth2=0;\n for(i=year1;i2)i+=1;\nreturn i;\n}\nint l(int c,int d){\nint i,sum=0;\nint a[12]={31,28,31,30,31,30,31,31,30,31,30,31}; for(i=0;i<=c-2;i++) {sum+=a[i];}sum+=d;\nreturn sum; }\nint main(){int y1,m1,d1,y2,m2,d2;\nint sum;\nscanf(\"%d%d%d\",&y1,&m1,&d1);\nscanf(\"%d%d%d\",&y2,&m2,&d2);sum=s(y2,m2)-s(y1,m1)+l(m2,d2)-l(m1,d1)+365*(y2-y1);\nprintf(\"%d\",sum);\nreturn 0;}"} +{"label": "80", "index": "39556", "code": "int main()\n{\n\tint year1,year2,month1,month2,day1,day2,s=0,s1=0,s2=0,i,j,k;\n\tint a[12]={31,28,31,30,31,30,31,31,30,31,30,31},\n\t\tb[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d%d%d\\n\",&year1,&month1,&day1);\n\tscanf(\"%d%d%d\",&year2,&month2,&day2);\n\tfor(i=year1;i<=year2;i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\ts=s+366;\n\t\telse\n\t\t\ts=s+365;}\n\tif((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t{\n\t\tfor(j=month1-1;j<=11;j++)\n\t\t{if(j==month1-1)\n\t\t\t\ts1=s1+b[j]-day1;\n\t\t\telse\n\t\t\t\ts1=s1+b[j];}\n\ts=s-(366-s1);}\n\telse\n\t{\n\t\tfor(j=month1-1;j<=11;j++)\n\t\t{if(j==month1-1)\n\t\t\t\ts1=s1+a[j]-day1;\n\t\t\telse\n\t\t s1=s1+a[j];}\n\ts=s-(365-s1);}\n\tif((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))\n\t{\n\t\tfor(k=month2-1;k>=0;k--)\n\t\t{if(k==month2-1)\n\t\t\ts2=s2+day2;\n\t\t\telse\n\t\t\ts2=s2+b[k];}\n\t\ts=s-(366-s2);\n\t}\n\telse\n\t{\n\t\tfor(k=month2-1;k>=0;k--)\n\t\t{if(k==month2-1)\n\t\t\t\ts2=s2+day2;\n\t\t\telse\n\t\t\ts2=s2+a[k];}\n\t\ts=s-(365-s2);\n\t}\n\tprintf(\"%d\",s);\n\treturn 0;\n}\n\t\n\n\n\n\n\n\n\n\n\n\t"} +{"label": "80", "index": "39557", "code": "//??????????????????\n//????????????????????????\nint DateToDay(int year,int month,int day)\n{\n\tint a[]={0,31,59,90,120,151,181,212,243,273,304,334,365};\t//??????????????????\n\tint b[]={0,31,60,91,121,152,182,213,244,274,305,335,366};\t//???\n\tint d1,d2,d3;\n\tint leap;\t//??\n\tleap=((year-1)/4)-((year-1)/100)+((year-1)/400);\t//??????\n\td1=leap*366+(year-1-leap)*365;\t\t\t//?????\n\tif((year%4==0&&year%100!=0)||year%400==0)\t\t//???????\n\t\td2=b[month-1];\t\t//?b??\n\telse\t\t\t\t\t//??\n\t\td2=a[month-1];\t\t//?a??\t\t//?????\n\td3=day;\n\treturn d1+d2+d3;\n}\n\nint main()\n{\n\tint starty,startm,startd;\n\tint endy,endm,endd;\n\tint distance;\n\tcin>>starty>>startm>>startd;\n\tcin>>endy>>endm>>endd;\n\tdistance=DateToDay(endy,endm,endd)-DateToDay(starty,startm,startd);\n\tcout<endmonth)\n\t{\n\t\tdays=365*(a-1);\n\t\tfor(i=startmonth;i2))\n\t\tdays=days-1;\n\tif(((endyear%4==0&&endyear%100!=0)||(endyear%400==0))&&(endmonth<2))\n\t\tdays=days-1;\n\tprintf(\"%d\",days);\n\treturn 0;\n}\n\n"} +{"label": "80", "index": "39560", "code": "int main()\n{\nint syear,smonth,sday,eyear,emonth,eday;\nscanf(\"%d %d %d\\n%d %d %d\",&syear,&smonth,&sday,&eyear,&emonth,&eday);\nint y,s1,leapy,s2=0,s3=0,s;\ns1=365*(eyear-syear);\nfor(y=syear,leapy=0;y2)){\n\t\ts2=s2+1;\n\t}\n\tif(((eyear%4==0&&eyear%100!=0)||(eyear%400==0))&&(emonth>2)){\n\t\ts3=s3+1;\n\t}\ns=s1+s3-s2;\nprintf(\"%d\\n\",s);\nreturn 0;\n}\n\n"} +{"label": "80", "index": "39561", "code": "int main()\n{\n\tint A[4],B[4],i,j,d,d1,d2[3],d3,d4;\n\tfor (i=1;i<4;i++)\n\t\tscanf(\"%d\",&A[i]);\n\tfor (i=1;i<4;i++)\n\t\tscanf(\"%d\",&B[i]);\n\tswitch(A[2])\n\t{\n\t\tcase 1: \n\t\t\td2[1]=A[3];\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\td2[1]=A[3]+31;\n\t\t\tbreak;\n\t\tcase 3: \n\t\t\td2[1]=A[3]+59;\n\t\t\tbreak;\n\t\tcase 4: \n\t\t\td2[1]=A[3]+90;\n\t\t\tbreak;\n\t\tcase 5: \n\t\t\td2[1]=A[3]+120;\n\t\t\tbreak;\n\t\tcase 6: \n\t\t\td2[1]=A[3]+151;\n\t\t\tbreak;\n\t\tcase 7: \n\t\t\td2[1]=A[3]+181;\n\t\t\tbreak;\n\t\tcase 8: \n\t\t\td2[1]=A[3]+212;\n\t\t\tbreak;\n\t\tcase 9: \n\t\t\td2[1]=A[3]+243;\n\t\t\tbreak;\n\t\tcase 10: \n\t\t\td2[1]=A[3]+273;\n\t\t\tbreak;\n\t\tcase 11: \n\t\t\td2[1]=A[3]+304;\n\t\t\tbreak;\n\t\tcase 12: \n\t\t\td2[1]=A[3]+334;\n\t\t\tbreak;\n\t}\n\tif (A[1]%4==0 && A[1]%100!=0 && A[2]>2)\n\t\td2[1]++;\n\tif (A[1]%400==0 && A[2]>2)\n\t\td2[1]++;\n\tswitch(B[2])\n\t{\n\t\tcase 1: \n\t\t\td2[2]=B[3];\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\td2[2]=B[3]+31;\n\t\t\tbreak;\n\t\tcase 3: \n\t\t\td2[2]=B[3]+59;\n\t\t\tbreak;\n\t\tcase 4: \n\t\t\td2[2]=B[3]+90;\n\t\t\tbreak;\n\t\tcase 5: \n\t\t\td2[2]=B[3]+120;\n\t\t\tbreak;\n\t\tcase 6: \n\t\t\td2[2]=B[3]+151;\n\t\t\tbreak;\n\t\tcase 7: \n\t\t\td2[2]=B[3]+181;\n\t\t\tbreak;\n\t\tcase 8: \n\t\t\td2[2]=B[3]+212;\n\t\t\tbreak;\n\t\tcase 9 : \n\t\t\td2[2]=B[3]+243;\n\t\t\tbreak;\n\t\tcase 10 : \n\t\t\td2[2]=B[3]+273;\n\t\t\tbreak;\n\t\tcase 11 : \n\t\t\td2[2]=B[3]+304;\n\t\t\tbreak;\n\t\tcase 12 : \n\t\t\td2[2]=B[3]+334;\n\t\t\tbreak;\n\t}\n\tif (B[1]%4==0 && B[1]%100!=0 && B[2]>2)\n\t\td2[2]++;\n\tif (B[1]%400==0 && B[2]>2)\n\t\td2[2]++;\n\td1=0;\n\tif (A[1]<=B[1])\n\t{\n\t\tfor(i=A[1];i>y1>>m1>>d1>>y2>>m2>>d2;\n\tfor(i=y1;i2)\n\t\td-=1;\n\td-=d1;\n\tfor(i=1;i2)\n\t\td+=1;\n\td+=d2;\n\tcout<> a1 >> b1 >> c1 >> a2 >> b2 >> c2;\n\tint i;\n\tfor (i = a1; i < a2; i++)\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tcount++;\n\tnum = 365 * (a2 - a1 - count) * 365 + count * 366;\n\tif (a1 == 1886)\n\t\tcout << 23 * a1 - 29;\n\telse if (a2==2012)\n\t\tcout<<4*366+8*365-2< b2) {\n\t\t\tfor (i = b1; i <= 12; i++) {\n\t\t\t\tif (i == 1 && 3 && 5 && 7 && 8 && 10 && 12)\n\t\t\t\t\tnum = num + 31;\n\t\t\t\telse if (i == 2)\n\t\t\t\t\tnum = num + 28;\n\t\t\t\telse\n\t\t\t\t\tnum = num + 30;\n\t\t\t}\n\t\t\tfor (i = 1; i <= b2; i++) {\n\t\t\t\tif (i == 1 && 3 && 5 && 7 && 8 && 10 && 12)\n\t\t\t\t\tnum = num + 31;\n\t\t\t\telse if (i == 2)\n\t\t\t\t\tnum = num + 28;\n\t\t\t\telse\n\t\t\t\t\tnum = num + 30;\n\t\t\t}\n\t\t}\n\n\t\tnum = num + c2 - c1;\n\t\tcout << num << endl;\n\t}\n\treturn 0;\n}\n\n"} +{"label": "80", "index": "39564", "code": "void main()\n{\n\tint startyear,startmonth,startday,endyear,endmonth,endday,i;\n\tlong day1=0,day2=0;\n\tscanf(\"%d %d %d\",&startyear,&startmonth,&startday);\n scanf(\"%d %d %d\",&endyear,&endmonth,&endday);\n for(i=0;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i>Sy>>Sm>>Sd;\n\tcin>>Ey>>Em>>Ed;\n\tyear=Sy;\n\tx=((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0));\n\tif(Sy==Ey)\n\t{\n\t\tif(Sm==Em)\n\t\t\tcout<>y1>>m1>>d1; \ncout<>y2>>m2>>d2; \nint count = 0; \nwhile(!((y1==y2)&&(m1==m2)&&(d1==d2))) \n{ \ncount++; \nd1++; \nif((m1==12)&&(d1==32)) \n{ \ny1++; \nm1=1; \nd1=1; \n} \nelse if(((m1==1)||(m1==3)||(m1==5)||(m1==7)||(m1==8)||(m1==10))&&(d1==32)) \n{ \nm1++; \nd1 =1; \n} \nelse if(((m1==4)||(m1==6)||(m1==9)||(m1==11))&&(d1==31)) \n{ \nm1++; \nd1=1; \n} \nelse if(m1==2) \n{ \nif(((y1%4==0&&y1%100!=0)||(y1%400==0))&&(d1==30)) \n{ \nm1++; \nd1=1; \n} \nelse if((!((y1%4==0&&y1%100!=0)||(y1%400==0)))&&(d1==29)) \n{ \nm1++; \nd1=1; \n} \n} \n} \ncout<2)\n\t\t\td1=d1-1;\n\t}\n\td2=(y2-1)*30;\n\t{\n\t\tif(y2==1||y2==3)\n\t\t\td2=d2;\n\t\telse\n\t\tif(y2==2||y2==4||y2==5)\n\t\t\td2=d2+1;\n\t\telse\n\t\t\tif(y2==6||y2==7)\n\t\t\t\td2=d2+2;\n\t\t\telse\n\t\t\t\tif(y2==8)\n\t\t\t\t\td2=d2+3;\n\t\t\t\telse\n\t\t\t\t\tif(y2==9||y2==10)\n\t\t\t\t\t\td2=d2+4;\n\t\t\t\t\telse\n\t\t\t\t\t\td2=d2+5;\n\t}\n\t{\n\tif((n2%4==0&&n2%100!=0)||n2%400==0)\n\td2=d2;\n\telse\n\t\tif(y2>2)\n\t\t\td2=d2-1;\n\t}\n\td3=r2-r1;\n\td=d0-d1+d2+d3;\n\tprintf(\"%d\\n\",d);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39569", "code": "\nint isLeapYear(int year)\n{\n\treturn ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ;\n}\n\nint deltayear (int year1 , int year2)\n{\n\tint i ,result;\n\tresult = 0 ;\n\tfor (i = year1 ; i < year2 ; i++)\n\t{\t\t\n if (isLeapYear(i))\n\t\t\tresult+=366;\n\t\telse\n\t\t\tresult+=365;\n\t}\n\treturn result ;\n}\n\nint deltamonth (int year1 , int year2 , int month1 , int month2)\n{\n\tint m[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\tint i , result ;\n\tresult = 0 ;\n\tif (isLeapYear(year1))\n\t\tm[1] = 29;\n\tfor (i = 0 ; i < month1-1 ; i++)\n\t\tresult-=m[i];\n\tif (isLeapYear(year1))\n\t\tm[1] = 28 ;\n\tif (isLeapYear(year2))\n\t\tm[1] = 29 ;\n\tfor (i = 0 ; i < month2-1 ; i++)\n\t\tresult+=m[i];\n\tif (isLeapYear(year2))\n\t\tm[1] = 28 ;\n\treturn result ;\n}\n\nint deltaday (int day1 , int day2)\n{\n\tint result ;\n\tresult = 0 ;\n\tresult-=day1;\n\tresult+=day2;\n\treturn result ;\n}\n\nint delta (int year1 , int month1 , int day1 , int year2 , int month2 , int day2)\n{\n\tint result ;\n\tresult = deltayear(year1,year2) + deltamonth(year1,year2,month1,month2) + deltaday(day1,day2) ;\n\treturn result ;\n}\n\nint main ()\n{\n\tint year1 , month1 , day1 ;\n\tint year2 , month2 , day2 ;\n\tint result ;\n\tscanf (\"%d%d%d%d%d%d\",&year1,&month1,&day1,&year2,&month2,&day2);\n\tresult = delta (year1,month1,day1,year2,month2,day2);\n\tprintf (\"%d\\n\",result);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39570", "code": "int main()\n{\n\tint y1,m1,d1,y2,m2,d2,days=0;\n\tcin>>y1>>m1>>d1>>y2>>m2>>d2;\n\tint m[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint mo[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n int i;\n\tif(y2==y1){\n\t\tif(m1!=m2){\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t{\n\t\t\tfor(int j=m1;j1){\n\t\t\tfor(int j=0;j1){\n\t\t\tfor(int j=0;j1)\n\t{\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t{\n\t\t\tfor(int j=m1;j<12;j++)\n\t\t\t{\n\t\t\t\tdays=days+mo[j];\n\t\t\t}\n\t\t\tdays=days+mo[m1-1]-d1;\n\t\t}\n\t\telse \n\t\t{for(int j=m1;j<12;j++)\n\t\t\t{\n\t\t\t\tdays=days+m[j];\n\t\t\t}\n\t\t\tdays=days+m[m1-1]-d1;\n\t\t}\n\t\tfor(int k=1;k=1;x2--)\n\t {\n\t\t\t\tsumwei+=date1[x2-1];\n\t\t\t}\n\t\t\tsumwei+=f+1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(x2=e-1;x2>=1;x2--)\n\t {\n\t\t\t\tsumwei+=date1[x2-1];\n\t\t\t}\n\t\t\tsumwei+=f;\n\t\t}\n\n\t}\n\tsumwei=sumwei;\n\t\n\n if(a==d&&b==e&&c==f)\n\t\tresult=0;\n if(d==a)\n\t{\n\t\tif((d%4==0&&d%100!=0)||(d%400==0))\n\t\t\tresult=sumwei+sumshou-366;\n\t\telse\n\t\t\tresult=sumwei+sumshou-365;\n\t}\n\tif(d==a+1)\n\t\tresult=sumwei+sumshou;\n\tif(d>a+1)\n\t{\n\t\tint x3,sumzhong=0;\n\t\tfor(x3=a+1;x3<=d-1;x3++)\n\t\t{\n\t\t\tif((x3%4==0&&x3%100!=0)||(x3%400==0))\n\t\t\t\tsumzhong+=366;\n\t\t\telse\n \t\t\t\tsumzhong+=365;\n\t\t}\n\t\tresult=sumwei+sumshou+sumzhong;\n\t}\n printf(\"%d\",result);\n \treturn 0;\n}"} +{"label": "80", "index": "39572", "code": "void main()\n{\n\tint n=0,y1,m1,d1,y2,m2,d2,i;\n\tscanf(\"%d%d%d\\n%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\n \n if(y1==y2)\n {\n \t if(m1==m2) n=d2-d1;\n \t else \n \t {\n for(i=m1+1;i>sty>>stm>>std>>eny>>enm>>end;\n int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int r=0;\n for(int i=sty;i<=eny;i++)\n if((i%4==0 && i%100!=0)||(i%400==0))\n r++;\n\n if((eny%4==0 && eny%100!=0)||eny%400==0&&enm>2)\n r=r;\n else if(enm<=2&&(eny%4==0 && eny%100!=0)||eny%400==0)\n r-=1;\n\n int days=0;\n for(int i=1;i<=enm;i++)\n days+=a[i];\n days+=end;\n for(int i=1;i<=stm;i++)\n days-=a[i];\n days-=std;\n \n days+=(r+365*(eny-sty));\n if(days==43348)days++;\n cout<> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tfor (i = y1 + 1; i < y2; i++)\n\t\tsum1 = sum1 + panrun(i);\n\t//cout << sum1 << \" \";\n\tif (panrun(y1) == 366) {\n\t\tfor (i = 0; i < m1; i++)\n\t\t\tsum2 = sum2 + a[i];\n\t\tsum2 = sum2 + d1;\n\t\tif (y1 != y2)\n\t\t\tsum2 = 366 - sum2;\n\t} else {\n\t\tfor (i = 0; i < m1; i++)\n\t\t\tsum2 = sum2 + b[i];\n\t\tsum2 = sum2 + d1;\n\t\tif (y1 != y2)\n\t\t\tsum2 = 365 - sum2;\n\t}\n\t//cout << sum2 << \" \";\n\tif (panrun(y2) == 366) {\n\t\tfor (i = 0; i < m2; i++)\n\t\t\t//cout<<\"***\"<>num[i];\n\t}\n\tfor(i=0;i<3;i++)\n\t{\n\t\tcin>>nul[i];\n\t}\n\tif(nul[1]<=2)\n\t{\n\t\tfor(i=num[0];i2)\n\t{\n\t\tfor(i=num[0]+1;i<(nul[0]+1);i++)\n\t\t{\n\t\t\tif(((i%4==0)&&(i%100!=0))||(i%400==0))\n\t\t\t\tsum=sum+366;\n\t\t\telse\n\t\t\t\tsum=sum+365;\n\t\t}\n\t}\n\tif(((num[0]%4==0)&&(num[0]%100!=0))||(num[0]%400==0))\n\t{\n\t\tif(num[1]==1)\n\t\t\th=num[2];\n\t\tif(num[1]==2)\n\t\t\th=num[2]+31;\n\t\tif(num[1]==3)\n\t\t\th=num[2]+60;\n\t\tif(num[1]==4)\n\t\t\th=num[2]+91;\n\t\tif(num[1]==5)\n\t\t\th=num[2]+121;\n\t\tif(num[1]==6)\n\t\t\th=num[2]+152;\n\t\tif(num[1]==7)\n\t\t\th=num[2]+182;\n\t\tif(num[1]==8)\n\t\t\th=num[2]+213;\n\t\tif(num[1]==9)\n\t\t\th=num[2]+244;\n\t\tif(num[1]==10)\n\t\t\th=num[2]+274;\n\t\tif(num[1]==11)\n\t\t\th=num[2]+305;\n\t\tif(num[1]==12)\n\t\t\th=num[2]+335;\n\t}\n\telse\n\t{\n\t\tif(num[1]==1)\n\t\t\th=num[2];\n\t\tif(num[1]==2)\n\t\t\th=num[2]+31;\n\t\tif(num[1]==3)\n\t\t\th=num[2]+59;\n\t\tif(num[1]==4)\n\t\t\th=num[2]+90;\n\t\tif(num[1]==5)\n\t\t\th=num[2]+120;\n\t\tif(num[1]==6)\n\t\t\th=num[2]+151;\n\t\tif(num[1]==7)\n\t\t\th=num[2]+181;\n\t\tif(num[1]==8)\n\t\t\th=num[2]+212;\n\t\tif(num[1]==9)\n\t\t\th=num[2]+243;\n\t\tif(num[1]==10)\n\t\t\th=num[2]+273;\n\t\tif(num[1]==11)\n\t\t\th=num[2]+304;\n\t\tif(num[1]==12)\n\t\t\th=num[2]+334;\n\t}\n\tif(((num[0]%4==0)&&(num[0]%100!=0))||(num[0]%400==0))\n\t{\n\t\tif(nul[1]==1)\n\t\t\tk=nul[2];\n\t\tif(nul[1]==2)\n\t\t\tk=nul[2]+31;\n\t\tif(nul[1]==3)\n\t\t\tk=nul[2]+60;\n\t\tif(nul[1]==4)\n\t\t\tk=nul[2]+91;\n\t\tif(nul[1]==5)\n\t\t\tk=nul[2]+121;\n\t\tif(nul[1]==6)\n\t\t\tk=nul[2]+152;\n\t\tif(nul[1]==7)\n\t\t\tk=nul[2]+182;\n\t\tif(nul[1]==8)\n\t\t\tk=nul[2]+213;\n\t\tif(nul[1]==9)\n\t\t\tk=nul[2]+244;\n\t\tif(nul[1]==10)\n\t\t\tk=nul[2]+274;\n\t\tif(nul[1]==11)\n\t\t\tk=nul[2]+305;\n\t\tif(nul[1]==12)\n\t\t\tk=nul[2]+335;\n\t}\n\telse\n\t{\n\t\tif(nul[1]==1)\n\t\t\tk=nul[2];\n\t\tif(nul[1]==2)\n\t\t\tk=nul[2]+31;\n\t\tif(nul[1]==3)\n\t\t\tk=nul[2]+59;\n\t\tif(nul[1]==4)\n\t\t\tk=nul[2]+90;\n\t\tif(nul[1]==5)\n\t\t\tk=nul[2]+120;\n\t\tif(nul[1]==6)\n\t\t\tk=nul[2]+151;\n\t\tif(nul[1]==7)\n\t\t\tk=nul[2]+181;\n\t\tif(nul[1]==8)\n\t\t\tk=nul[2]+212;\n\t\tif(nul[1]==9)\n\t\t\tk=nul[2]+243;\n\t\tif(nul[1]==10)\n\t\t\tk=nul[2]+273;\n\t\tif(nul[1]==11)\n\t\t\tk=nul[2]+304;\n\t\tif(nul[1]==12)\n\t\t\tk=nul[2]+334;\n\t}\n\tcout<2)\n\t\t\t\t sum1=sum1+1;\n\t\t\t else sum1=sum1;\n\t\t }\n\t\t else if(m%400==0)\n\t\t {\n\t\t\t if(b>2)\n\t\t\t\t sum1=sum1+1;\n\t\t\t else sum1=sum1;\n\t\t };\n\t}\nif(x%4==0)\n\t {\n\t\t if(x%100!=0)\n\t\t {\n\t\t\t if(y>2)\n\t\t\t\t sum2=sum2+1;\n\t\t\t \n\t\t };\n\t\t if(x%400==0)\n\t\t {\n\t\t\t if(y>2)\n\t\t\t\t sum2=sum2+1;\n\t\t\t else sum2=sum2;\n\t\t };\n\t}\n\t\t sum1=sum1+c;\n\t\t sum2=sum2+z;\n\nfinal=sum2-sum1;\nprintf(\"\\n%d\",final);\n}"} +{"label": "80", "index": "39577", "code": "int main()\n{\n\tint starty,startm,startd;\n\tint endy,endm,endd;\n\tint i,j,y=0,m1=0,m2=0,year,year1;\n\tint month1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//????\n\tint month2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//??\n\n\tcin>>starty>>startm>>startd;\n\tcin>>endy>>endm>>endd;\n\tfor( year=starty;year>startyear>>startmonth>>startday;\n\tcin>>endyear>>endmonth>>endday;\n\tyearx=endyear-startyear;\n\tmonthx=endmonth-startmonth;\n\tdayx=endday-startday;\n\tif(yearx==0)\n\t{\t\n\t\tsum=0;\n\t\tleap=0;\n\t\tif((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))\n\t\t\tleap=1;\n\t\tif(monthx==0)\n\t\t{\n\t\t\tsum=dayx;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=startmonth;i>sy>>sm>>sd>>ey>>em>>ed;\n\twhile(sy!=ey||sm!=em||sd!=ed)\n\t{\n\t\tday++;\n\t\tif((sd==31&&(sm==1||sm==3||sm==5||sm==7||sm==8||sm==10))||(sd==30&&(sm==4||sm==6||sm==9||sm==11)))\n\t\t{\n\t\t\t//cout<>startyear>>startmonth>>startday;\n\tcin>>endyear>>endmonth>>endday;\n\tint leapyear=0,sum1=0,sum2=0,sum3=0;\n\tint year[2]={365,366};\n\tint month[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};\n\tleapyear=((startyear%4==0)&&(startyear%100!=0))||(startyear%400==0);\n\tfor(int i=0;i2)) startdays=startdays+1;\n\tfor(j=1;j<=endmonth-1;j++)\n\tenddays=enddays+month[j-1];\n\tenddays=enddays+endday;\n\tif(((endyear%4==0&&endyear%100!=0)||(endyear%400==0))&&(endmonth>2)) enddays=enddays+1;\n\tif(startyear==endyear) sumday=enddays-startdays;\n\telse\n\t{\n\t\tfor(j=startyear;j<=endyear-1;j++)\n\t\tif((j%400!=0&&j%100==0)||(j%4!=0)) sum=sum+365;\n\t\telse sum=sum+366;\n\t\tsumday=sum+enddays-startdays;\n\t}\n\tprintf(\"%d\",sumday);\n\treturn 0;\n}"} +{"label": "80", "index": "39586", "code": "int yue( int m,int n)\n{\n\tif(n==1 || n==3 || n==5 || n==7 || n==8 || n==10 || n==12)\n\t\treturn 31;\n\telse if(n==4 || n==6 || n==9 || n==11)\n\t\treturn 30;\n\telse if((m % 4 == 0 && m % 100 != 0) || (m % 400 == 0) && n==2)\n\t\treturn 29;\n\telse\n\t\treturn 28;\n}\nint nian(int m)\n{\n\tif((m % 4 == 0 && m % 100 != 0) || (m % 400 == 0))\n\t\treturn 366;\n\telse\n\t\treturn 365;\n}\nint main()\n{\n\tint a,b,c,d,e,f;\n\tcin>>a>>b>>c;\n\tcout<>d>>e>>f;\n\tint sum=0,t=0;\n\tif(a==d)\n\t{\n\t\tfor(int i=b;ib)\n\t\t{\n\t\t\tfor(int s=b;s0)\n {\n for(i=y1;i1)\n {\n for(i=1;i1)\n {\n for(i=1;i>sy>>sm>>sd>>ey>>em>>ed;\n\tint sum=0;\n\n\tfor(int i=sy+1;i<=ey-1;i++)\n\t\tif( (i%4==0 && i%100!=0) || (i%400==0) )\n\t\t\tsum=sum+366;\n\t\telse sum=sum+365;\n\n\tint syb=yearbegin(sy,sm,sd);\n\tint eyb=yearbegin(ey,em,ed);\n\n\tif(sy!=ey){\n\tif( (sy%4==0 && sy%100!=0) || (sy%400==0) )\n\t syb=366-syb;\n\telse syb=365-syb;\n\n\tsum=sum+syb+eyb;}\n\n\telse sum=eyb-syb;\n\n\tcout<>sy>>sm>>sd>>ey>>em>>ed;\n\tint i,run=0;\n\tfor(i=sy;i>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\tfor(int i=year1;i2||month2<=2)\n\t\t\t{\n\t\t\t for(i=1;i<=(month2-month1)-1;i++)\n\t\t\t\t the_number=the_number+month[month1+i];\n\t\t\t the_number=the_number+month[month1]-day1+day2;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t for(q=1;q<=month2-month1-1;q++)\n\t\t\t\t the_number=the_number+month[month1+q];\n\t\t\t the_number=the_number+month[month1]-day1+day2+theleapyeardata(year1);\n\t\t\t}\n\t\t}\n\t}\n\telse //the dates are in differentyears\n\t{\n\t\tif(month1>2&&month2<=2)\n\t\t{\n\t\t\tfor(p=1;p<=y-2;p++)\n\t\t\t\tz=z+theleapyeardata(year1+p);\n\t\t\tfor(l=1;l<=12-month1;l++)\n\t\t\t\tthe_number=the_number+month[month1+l];\n\t\t\tfor(w=1;w<=month2-1;w++)\n\t\t\t\tthe_number=the_number+month[w];\n\t\t\tthe_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(month1<=2&&month2>2)\n\t\t\t{\n\t\t\t\tfor(h=0;h<=y;h++) //the number of leapyears\n\t\t\t\t z=z+theleapyeardata(year1+h);\n\t\t\t for(v=1;v<=12-month1;v++) //the first year without the first month\n\t\t\t\t the_number=the_number+month[month1+v];\n\t\t\t\tfor(c=1;c<=month2-1;c++) //the last year without the last month\n\t\t\t\t\tthe_number=the_number+month[c];\n\t\t\t the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(month1<=2&&month2<=2)\n\t\t\t\t{\n\t\t\t for(s=1;s<=y;s++)\n\t\t\t\t z=z+theleapyeardata(year1+s-1);\n\t\t\t for(t=1;t<=12-month1;t++)\n\t\t\t \t the_number=the_number+month[month1+t];\n\t\t\t\t\tfor(e=1;e<=month2-1;e++)\n the_number=the_number+month[e];\n\t\t\t the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t for(u=1;u<=y;u++)\n\t\t\t\t z=z+theleapyeardata(year1+u);\n\t\t\t for(k=1;k<=12-month1;k++)\n\t\t\t the_number=the_number+month[month1+k];\n\t\t\t\t\tfor(f=1;f<=month2-1;f++)\n\t\t\t\t\t\tthe_number=the_number+month[f];\n\t\t\t the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d\\n\",the_number);\n\treturn 0;\n}\n\nint theleapyeardata(int year)\n{\n int z;\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\tz=1;\n\telse z=0;\n\treturn(z);\n}"} +{"label": "80", "index": "39593", "code": "/*\n * 3.cpp\n *\n * Created on: 2011-1-9\n * Author: jsgl\n */\nint main(){\n\tint sy,sm,sd,ey,em,ed,day1=0,day2=0;\n\tcin>>sy>>sm>>sd>>ey>>em>>ed;\n\tint nory[11]={31,28,31,30,31,30,31,31,30,31,30};\n\tint aby[11]={31,29,31,30,31,30,31,31,30,31,30};\n\tint year,i;\n\tfor(year=0;yearn2.y)||(n1.y==n2.y&&n1.m>n2.m)||(n1.y==n2.y&&n1.m==n2.m&&n1.d>n2.d)){\n\t t=n1;\n\t\tn1=n2;\n\t\tn2=t;\n\t}\n s1=djt(n1.y,n1.m,n1.d);\n s2=djt(n2.y,n2.m,n2.d);\n\tif(n1.y==n2.y){\n\t s=s2-s1;\n\t\n\t}else {\n\t\tif(ir(n1.y)){\n\t\t s1=366-s1;\n\t\t}else {\n\t\t s1=365-s1;\n\t\t}\n\t\tfor(i=n1.y+1;i> d[0] >>a[0]>> sd ;\n\tcin >> d[1] >>a[1] >> ed ;\n\tint ld;\n\t\t\t\n\tif(d[0]==d[1])\n\t{\n\t\tif((d[0]&400==0)||(d[0]%4==0&&d[0]%100!=0))\n\t\t\t\tld=29;\n\t\t\telse\n\t\t\t\tld=28;\n\t\tif(a[0]==a[1])\n\t\t{\n\t\t\tcout << ed-sd << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint s=0;\n\t\t\tfor(j=a[0];j<=a[1]-1;j++)\n\t\t\t{\n\t\t\t\tswitch(j)\n\t\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t case 5:\n\t\t\t case 7:\n\t\t\t case 8:\n\t\t\t case 10:\n\t\t\t case 12:b[j]=31;break;\n\t\t\t case 2:b[j]=ld;break;\n\t\t\t case 4:\n\t\t\t case 6:\n\t\t\t case 9:\n\t\t\t\tcase 11:b[j]=30;break;\n\t\t\t\t}\n\t\t\t\ts+=b[j];\n\t\t\t}\n\t\t\tcout<< s-sd+ed << endl;\n\t\t}\n\t}\n\n\n\telse\n\t{ \n\t\tint z=0,D=0;\n\t\tint c[2]={0};\n\t\tfor(i=d[0];i<=d[1]-1;i++)\n\t\t{\n\t\t\tif((i%400==0)||(i%4==0&&i%100!=0))\n\t\t\t{\n\t\t\t\tz++;\n\t\t\t}\n\t\t}\n\t\tfor(k=0;k<=1;k++)\n\t\t{\n\t\t\tfor(int x=0;x<=a[k]-1;x++)\n\t\t\t{\n\t\t\t\tif((d[k]&400==0)||(d[k]%4==0&&d[k]%100!=0))\n\t\t\t\tld=29;\n\t\t\telse\n\t\t\t\tld=28;\n\t\t\t\tswitch(x)\n\t\t\t\t{\n\t\t\t\tcase 0:b[x]=0;break;\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t case 5:\n\t\t\t case 7:\n\t\t\t case 8:\n\t\t\t case 10:\n\t\t\t case 12:b[x]=31;break;\n\t\t\t case 2:b[x]=ld;break;\n\t\t\t case 4:\n\t\t\t case 6:\n\t\t\t case 9:\n\t\t\t\tcase 11:b[x]=30;break;\n\t\t\t\t}\n\t\t\t\tc[k]+=b[x];\n\t\t\t}\n\t\t}\n\n\t\tD=(d[1]-d[0]-z)*365+z*366-c[0]-sd+c[1]+ed;\n\t\tcout << D << endl ;\n\t}\n\n\treturn 0;\n}"} +{"label": "80", "index": "39596", "code": "\nint mon1[12]={31,28,31,30,31,30,31,31,30,31,30,31};\nint mon2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\nint cal(int y,int m,int d)\n{\n\tint num=0,i;\n\twhile(y>400)\n\t{\n\t\ty-=400;\n\t\tnum+=146097;\n\t}\n\tif(y==400)\n\t{\n\t\tnum+=145731;\n\t\tfor(i=0;i100)\n\t\t{\n\t\t\ty-=100;\n\t\t\tnum+=36524;\n\t\t}\n\t\tif(y==100)\n\t\t{\n\t\t\tnum+=36159;\n\t\t\tfor(i=0;i4)\n\t\t\t{\n\t\t\t\ty-=4;\n\t\t\t\tnum+=1461;\n\t\t\t}\n\t\t\tif(y==4)\n\t\t\t{\n\t\t\t\tnum+=365*3;\n\t\t\t\tfor(i=0;i>y1>>m1>>d1>>y2>>m2>>d2;\n\tcout<>oy>>om>>od>>ty>>tm>>td;\n int run[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n int ping[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int zong=0;\n int year,mon,day;\n if(oy==ty)\n {\n if(om!=tm)\n {\n for(mon=om+1;mon=a[1][1];j--)\n\t\t\t{\n\t\t\t\tif(j!=a[1][1])\n\t\t\t\t{\n\t\t\t\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\t\t\t\tn-=31;\n\t\t\t\t\telse if(j==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t\t\t\t\tn-=29;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tn-=28;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tn-=30;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\t\t\t\tn-=31-a[1][2];\n\t\t\t\t\telse if(j==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t\t\t\t\tn=n-29+a[1][2];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tn=n-28+a[1][2];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tn=n-30+a[1][2];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t\tn+=366;\n\t\t\telse\n\t\t\t\tn+=365;\n\t\t}\n\t}\n\t}\n\telse if(a[0][1]==a[1][1])\n\t\tn+=(a[1][2]-a[0][2]);\n\telse\n\t\tfor(j=a[0][1];j<=a[1][1];j++)\n\t\t{\n\t\t\tif(j==a[0][1])\n\t\t\t{\n\t\t\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\t\t\t\tn+=31-a[0][2];\n\t\t\t\t\telse if(j==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t\t\t\t\tn+=29-a[0][2];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tn+=28-a[0][2];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tn+=30-a[0][2];\n\t\t\t}\n\t\t\telse if(j==a[1][1])\n\t\t\t\tn+=a[1][2];\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\t\t\t\tn+=31;\n\t\t\t\t\telse if(j==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t\t\t\t\tn+=29;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tn+=28;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tn+=30;\n\t\t\t}\n\t\t}\n\tprintf(\"\\n%d\",n);\n\treturn 0;\n}"} +{"label": "80", "index": "39599", "code": "int main()\n{\n\tint sum1, sum2, month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tint year1, year2, month1, month2, day1, day2;\n\tint i, count = 0;\n\tcin >> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tfor(i = 1; i < year1; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tcount++;\n\t}\n\tsum1 = 365 * (year1 - 1) + day1 + count;\n\tfor(i = 1; i < month1; i++)\n\t\tsum1 += month[i];\n\tif((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t{\n\t\tif(month1 > 2)\n\t\t\tsum1++;\n\t}\n\tcount = 0;\n\tfor(i = 1; i < year2; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tcount++;\n\t}\n\tsum2 = 365 * (year2 - 1) + day2 + count;\n\tfor(i = 1; i < month2; i++)\n\t\tsum2 += month[i];\n\tif((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))\n\t{\n\t\tif(month2 > 2)\n\t\t\tsum2++;\n\t}\n\tcout << sum2 - sum1 << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39600", "code": "int main()\n{\n\tint startyear, startmonth, startday, endyear, endmonth, endday, year, sum = 0, i;\n\tint m1[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, m2[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tcin >> startyear >> startmonth >> startday >> endyear >> endmonth >> endday;\n\tyear = startyear;\n\twhile(year < endyear)\n\t{\n\t\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\t\tyear++;\n\t}\n\tif ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))\n\t{\n\t\tfor (i = 1; i < startmonth; i++)\n\t\t\tsum -= m2[i];\n\t\tsum -= startday;\n\t}\n\telse\n\t{\n\t\tfor (i = 1; i < startmonth; i++)\n\t\t\tsum -= m1[i];\n\t\tsum -= startday;\n\t}\n\tif ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))\n\t{\n\t\tfor (i = 1; i < endmonth; i++)\n\t\t\tsum += m2[i];\n\t\tsum += endday;\n\t}\n\telse\n\t{\n\t\tfor (i = 1; i < endmonth; i++)\n\t\t\tsum += m1[i];\n\t\tsum += endday;\n\t}\n\tcout << sum << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39601", "code": "int run(int year);\nint main()\n{\n\tint sy,sm,sd,ey,em,ed,i,sum=0;\n\tint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>sy>>sm>>sd;\n\tcin>>ey>>em>>ed;\n\tfor(i=sy;i2)\n {\n for(i=1;i<=y-1;i++) {d=d+a[i];}\n if((x%4==0&&x%100!=0)||(x%400==0)) d=d+1+z;\n else d=d+z;\n }\n return(d);\n}\n\nmain()\n{\n int sy,sm,sd,ey,em,ed;\n int days(int x,int y,int z);\n int a,b;\n scanf(\"%d %d %d %d %d %d\",&sy,&sm,&sd,&ey,&em,&ed);\n a=days(sy,sm,sd);\n b=days(ey,em,ed);\n printf(\"%d\",b-a);\n}\n"} +{"label": "80", "index": "39604", "code": "\nint mon[2][13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,\n 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\n\nint f(int y, int m, int d)\n{\n\tint i, day = 0;\n\tfor (i = 1; i < y; i++)\n\t{\n\t\tif ((i % 400 == 0) || ((i % 100 != 0) && (i % 4 == 0)))\n\t\t{\n\t\t\tday = day + 366;\n\t\t}\n\t\telse\n\t\t\tday = day + 365;\n\t}\n\tint temp = ((y % 400 == 0) || ((y % 100 != 0) && (y % 4 == 0)));\n\tfor (i = 1; i < m; i++)\n\t{\n\t\tday = day + mon[temp][i];\n\t}\n\tday = day + d;\n\treturn day;\n}\n\nint main()\n{\n\tint y1, m1, d1, y2, m2, d2, day1, day2;\n\tcin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tday1 = f(y1, m1, d1);\n\tday2 = f(y2, m2, d2);\n\tif (day1 >= day2)\n\t\tcout << day1 - day2 << endl;\n\telse\n\t\tcout << day2 - day1 << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39605", "code": "int year(int y)\n{\n\tint a;\n\tif((y%4==0&&y%100!=0)||(y%400==0)) a=366;\n\telse a=365;\n\treturn(a);\n}\nint month(int m)\n{\n\tint d;\n\tswitch(m)\n\t{\n\tcase 1:d=31;break;\n case 2:d=28;break;\n case 3:d=31;break;\n case 4:d=30;break;\n case 5:d=31;break;\n case 6:d=30;break;\n case 7:d=31;break;\n case 8:d=31;break;\n case 9:d=30;break;\n case 10:d=31;break;\n case 11:d=30;break;\n case 12:d=31;break;\n\t}\n\treturn(d);\n}\nvoid main()\n{\n\tint y1,y2,m1,m2,d1,d2,i,ds=0;\n\tscanf(\"%d%d%d\",&y1,&m1,&d1);\n\tscanf(\"%d%d%d\",&y2,&m2,&d2);\n\tfor(i=y1;i2&&m1<3) ds=ds+1;\n\t}\n\tif(y1!=y2)\n\t{\n\t\tif(year(y1)==366&&m1>2) ds=ds-1;\n\t if(year(y2)==366&&m2>2) ds=ds+1;\n\t}\n\tprintf(\"%d\\n\",ds);\n}"} +{"label": "80", "index": "39606", "code": "/*\n *????? ???????????.cpp\n *??\t ???\n *????: 2011-11-4\n *????????????????????.\n */\n\n\nint main()\n{\n\tint year1,year2,month1,month2,date1,date2,Day=0,Day1=0,Day2=0,i,numr=0,nump;//?????year1,year2,month1,month2,date1,date2????????Day????????Day??????????????Day2??????????????numr,nump??????????????\n\tint Monthr[13]={0,31,29,31,30,31,30,31,31,30,31,30,31}; //????Monthr????????\n\tint Monthp[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; //????Monthp????????\n\tcin>>year1>>month1>>date1; \n\tcin>>year2>>month2>>date2;\n\tif((year1%4==0&&year1%100!=0)||(year1%400==0)) //???year1???????????????????????\n\t{\n\t\tfor(i=1;i<=month1;i++)\n\t\t\tDay1=Monthr[i]+Day1;\n\t\tDay1=Day1-(Monthr[month1]-date1)-1;\n\t}\n\telse\n\t{\n\t\tfor(i=1;i<=month1;i++)\n\t\t\t\t\tDay1=Monthp[i]+Day1;\n\t\t\t\tDay1=Day1-(Monthp[month1]-date1)-1;\n\t}\n\n\tif((year2%4==0&&year2%100!=0)||(year2%400==0)) //???year2???????????????????????\n\t\t{\n\t\t\tfor(i=12;i>=month2;i--)\n\t\t\t\tDay2=Monthr[i]+Day2;\n\t\t\tDay2=Day2-date2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=12;i>=month2;i--)\n\t\t\t\t\t\tDay2=Monthp[i]+Day2;\n\t\t\t\t\tDay2=Day2-date2;\n\t\t}\nfor(i=year1;i<=year2;i++) //?????????????\n{\n\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\tnumr++;\n}\n\tnump=year2-year1+1-numr; //?????????????? \n\tDay=365*nump+366*numr-Day1-Day2-1; //?????????????????????????????\n\tcout< year2)\n\t\t{\n\t\t\td = 1;\n\n\t\t\ttempyear=year1;\n\t\t\tyear1=year2;\n\t\t\tyear2=tempyear;\n\n\t\t\ttempmonth=month1;\n\t\t\tmonth1=month2;\n\t\t\tmonth2=tempmonth;\n\n\t\t\ttempday=day1;\n\t\t\tday1=day2;\n\t\t\tday2=tempday;\n\t\t}\n\t\tif ((year1%4==0)&&(year1%100!=0)||(year1%400==0))\n\t\t\tc+=366-(montha[month1-1]+day1);\n\t\telse\n\t\t\tc+=365-(monthb[month1-1]+day1);\n\n\t\tif ((year2%4==0)&&(year2%100!=0)||(year2%400==0))\n\t\t\tc+=(montha[month2-1]+day2);\n\t\telse\n\t\t\tc+=(monthb[month2-1]+day2);\n\n\t\tif (d == 0) printf(\"%d\",c);\n\t\telse printf(\"%d\",0-c);\n\t}\n}"} +{"label": "80", "index": "39608", "code": "int main()\n{\n\tint y,m,d,y2,m2,d2,max,t=0;\n\tint day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d%d%d\",&y,&m,&d);\n\tscanf(\"%d%d%d\",&y2,&m2,&d2);\n\tmax=day[m];\n\tif(m==2 && ((y%4==0 && y%100!=0) ||(y%100==0 && y%400==0))) max++;\n\twhile(ymax)\n\t\t{\n\t\t\td=1;\n\t\t\tm++;\n\t\t}\n\t\tif(m>12)\n\t\t{\n\t\t\tm=1;\n\t\t\ty++;\n\t\t}\n\t\tmax=day[m];\n\t if(m==2 && ((y%4==0 && y%100!=0) ||(y%100==0 && y%400==0))) max++;\n\t}\n\tprintf(\"%d\",t);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39609", "code": "int main ()\n{\n\tint syear, smonth, sday,eyear, emonth,eday;\n\tint leap[3001]={0},i;\n\tint days=0;\n\tint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin >> syear >> smonth >> sday ;\n\tcin >> eyear >> emonth >> eday ;\n\tfor (i=1; i<=3000; i++ )//??????\n\t\tleap[i]= (( (i % 4==0) && (i % 100!=0)) || i % 400==0);\n\tdays = days+(eyear-syear)*365;\n\tfor ( i=syear; i<= eyear; i++ )\n\t\tdays = days+ leap[i]; \n\tfor ( i=1; i<= emonth-1; i++ )\n\t\tdays = days + m[i];\n\tfor ( i=1; i<= smonth - 1; i++ )\n\t\tdays = days - m[i];\n\tif ( leap [ syear ] == 1 && smonth > 2 )\n\t\tdays = days -1;\n\tif ( leap [eyear ] ==1 && emonth <= 2 )\n\t\tdays = days -1;\n\tdays = days + eday - sday ;\n\tcout << days << endl; \n\treturn 0;\n}\n"} +{"label": "80", "index": "39610", "code": "\n\nint b[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint c[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\nint calender(int y,int m,int d)\n{\n\tint date=0;\n\tint y1=1;\n\twhile(y11)\n\t{\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1% 400 == 0))\n\t\t{\n\t\t\tdate=date+c[m-1];\n\t\t\tm--;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdate=date+b[m-1];\n\t\t\tm--;\n\t\t}\n\t}\n\tdate=date+d-1;\n\treturn date;\n\n}\n\n\nint main()\n{\n\tint y1,m1,d1;\n\tint y2,m2,d2;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tcout<=b[1];k--)\n\t{\n\t\tif(k==1||k==3||k==5||k==7||k==8||k==10||k==12)\n\t\t\tm=m+31;\n\t\tif(k==4||k==6||k==9||k==11)\n\t\t\tm=m+30;\n\t\tif(k==2&&(b[0]%4==0&&b[0]%100!=0||b[0]%400==0))\n\t\t\tm=m+29;\n\t\tif(k==2&&(b[0]%4!=0||b[0]%100==0&&b[0]%400!=0))\n\t\t\tm=m+28;\n\t}\n\ts=n-d-m+b[2]-a[2];\n\tprintf(\"%d\",s);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39614", "code": "void main()\n{\n\tint sy,sm,sd,ey,em,ed,i=0,j=0,m=0;\n\tlong int n;\n\tscanf(\"%d %d %d\\n%d %d %d\",&sy,&sm,&sd,&ey,&em,&ed);\n\tn=-sd+ed;\n\twhile(i<=sm-1){\n\t switch(i){\n\t case 0:n=n;break;\n\t\tcase 1:n=n-31;break;\n\t\tcase 2:n=n-30;break;\n\t case 3:n=n-31;break;\n\t\tcase 4:n=n-30;break;\n\t\tcase 5:n=n-31;break;\n\t\tcase 6:n=n-30;break;\n\t\tcase 7:n=n-31;break;\n\t\tcase 8:n=n-31;break;\n case 9:n=n-30;break;\n\t\tcase 10:n=n-31;break;\n\t\tcase 11:n=n-30;break;\n\t }\n\t\n\t\ti=i+1;\n\t}\n\tif(((sy%4==0&&sy%100!=0)||(sy%400==0))&&sm>=3){\n\t\tn=n+1;\n\t}\n\twhile(j<=em-1){\n\t\tswitch(j){\n\t\tcase 0:n=n;break;\n\t\tcase 1:n=n+31;break;\n\t\tcase 2:n=n+30;break;\n\t case 3:n=n+31;break;\n\t\tcase 4:n=n+30;break;\n\t\tcase 5:n=n+31;break;\n case 6:n=n+30;break;\n\t\tcase 7:n=n+31;break;\n\t\tcase 8:n=n+31;break;\n case 9:n=n+30;break;\n\t\tcase 10:n=n+31;break;\n\t\tcase 11:n=n+30;break;\n\t }\n\t\n\t\tj=j+1;\n\t}\n\tif(((ey%4==0&&ey%100!=0)||(ey%400==0))&&em>=3){\n\t\tn=n-1;\n\t}\n\twhile(m+sy<=ey-1){\n\t\tif(((m+sy)%4==0&&(m+sy)%100!=0)||((m+sy)%400==0)){\n\t\t\tn=n+366;\n\t\t}\n\t\telse{\n\t\t\tn=n+365;\n\t\t}\n\t\tm=m+1;\n\t}\n\tprintf(\"%ld\\n\",n);\n}\n\t\n"} +{"label": "80", "index": "39615", "code": "int main()\n{\n\tint sy,sm,sd,ey,em,ed,i,x;\n\tscanf(\"%d %d %d\\n\",&sy,&sm,&sd);\n\tscanf(\"%d %d %d\",&ey,&em,&ed);\n\tx=(ey-sy+1)*365-(sm-1)*31-(12-em+1)*31+ed-sd;\n\n\tfor(i=sy;i<=ey;i++)\n\t{if(i%4==0&&i%100!=0||i%400==0)x=x+1;} \n\n\tfor(i=1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i2))\n\t\tnumr--;\n\tint yd1=0,yd2=0;\n\tif((y2%4==0&&y2%100!=0)||(y2%400==0))\n\t\tmonth[1]++;\n\tfor(i=0;i 2) { r1 ++; }\n\t}\n\tr2 = 0;\n\tfor(int year = 1; year < y2; year ++) {\n\t\tif((year % 4 == 0 && year % 100 != 0) || (year % 400) == 0) { r2 += 366; }\n\t\telse { r2 += 365; }\n\t}\n\tfor(int month = 1; month < m2; month ++) {\n\t\tr2 += M[month];\n\t}\n\tr2 += d2 - 1;\n\tif((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400) == 0) {\n\t\tif(m2 > 2) { r2 ++; }\n\t}\n\tprintf(\"%d\", r2 - r1);\n\treturn 0;\n}\n\n// 1 1 1??0?"} +{"label": "80", "index": "39619", "code": "\nint isRun(int year)\n{\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nint main(int argc, char* argv[])\n{\n\tint startYear, startMonth, startDay ;\n\tint endYear, endMonth, endDay;\n\n\tint startOffset=0, endOffset=0; ///??????????startyear 1-1\n\tint Month[12]={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tint i, j;\n\n\tscanf(\"%d%d%d\", &startYear, &startMonth, &startDay);\n\tscanf(\"%d%d%d\",&endYear, &endMonth, &endDay);\n\n\tif (isRun(startYear))\n\t{\n\t\tif (startMonth>2)\n\t\t{\n\t\t\tfor (i=0; i2)\n\t\t{\n\t\t\tfor (i=0; i=startOffset)\n\t{\n\t\tprintf(\"%d\",(endOffset-startOffset));\n\t}\n\t\n\treturn 0;\n}"} +{"label": "80", "index": "39620", "code": "int main()\n{ \n int sy,sm,sd,ey,em,ed,DS,DE,i,j,k,m,p,n,l,md,\n answer;\n \n n=0;\n l=0;\n DS=0;\n DE=0;\n p=0;\n md=0;\n \n scanf(\"%d %d %d\",&sy,&sm,&sd);\n scanf(\"%d %d %d\",&ey,&em,&ed);\n for(i=1;i> startyear >> startmonth >> startday >> endyear >> endmonth >> endday;\n\tif ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))\n\t{\n\t\tday_month[1] = 29;\n\t}\n\tfor (i = 0; i < startmonth - 1; i++)\n\t{\n\t\tday_sum1 += day_month[i];\n\t}\n\tday_month[1] = 28;\n\tday_sum1 += startday;\n\tfor (i = startyear; i < endyear; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tday_sum2 += 366;\n\t\telse\n\t\t\tday_sum2 += 365;\n\t}\n\tif ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))\n\t{\n\t\tday_month[1] = 29;\n\t}\n\tfor (i = 0; i < endmonth - 1; i++)\n\t{\n\t\tday_sum2 += day_month[i];\n\t}\n\tday_sum2 += endday;\n\tcout << day_sum2 - day_sum1 << endl;\n\treturn 0;\n}\n\n"} +{"label": "80", "index": "39623", "code": "int main()\n{\n\tint y1,m1,d1,y2,m2,d2,r,s,s1,s2,i;\n\tscanf(\"%d%d%d\\n\",&y1,&m1,&d1);\n\tscanf(\"%d%d%d\",&y2,&m2,&d2);\n if(y1>y2)\n\t{\n\t\tr=y1;y1=y2;y2=r;r=m1;m1=m2;m2=r;r=d1;d1=d2;d2=r;\n\t}\n\tif(y1==y2)\n\t{\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t{\n\t\t\tif(m1==1)s1=d1;\n\t\t\telse if(m1==2)s1=d1+31;\n\t\t\telse if(m1==3)s1=d1+60;\n\t\t\telse if(m1==4)s1=d1+91;\n\t\t\telse if(m1==5)s1=d1+121;\n\t\t\telse if(m1==6)s1=d1+152;\n\t\t\telse if(m1==7)s1=d1+182;\n\t\t\telse if(m1==8)s1=d1+213;\n\t\t\telse if(m1==9)s1=d1+244;\n\t\t\telse if(m1==10)s1=d1+274;\n\t\t\telse if(m1==11)s1=d1+305;\n\t\t\telse if(m1==12)s1=d1+335;\n if(m2==1)s2=d2;\n\t\t\telse if(m2==2)s2=d2+31;\n\t\t\telse if(m2==3)s2=d2+60;\n\t\t\telse if(m2==4)s2=d2+91;\n\t\t\telse if(m2==5)s2=d2+121;\n\t\t\telse if(m2==6)s2=d2+152;\n\t\t\telse if(m2==7)s2=d2+182;\n\t\t\telse if(m2==8)s2=d2+213;\n\t\t\telse if(m2==9)s2=d2+244;\n\t\t\telse if(m2==10)s2=d2+274;\n\t\t\telse if(m2==11)s2=d2+305;\n\t\t\telse if(m2==12)s2=d2+335;\n\t\t\ts=s2-s1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(m1==1)s1=d1;\n\t\t\tif(m1==2)s1=d1+31;\n\t\t\tif(m1==3)s1=d1+59;\n\t\t\tif(m1==4)s1=d1+90;\n\t\t\tif(m1==5)s1=d1+120;\n\t\t\tif(m1==6)s1=d1+151;\n\t\t if(m1==7)s1=d1+181;\n\t\t\tif(m1==8)s1=d1+212;\n\t\t\tif(m1==9)s1=d1+243;\n\t\t\tif(m1==10)s1=d1+273;\n\t\t\tif(m1==11)s1=d1+304;\n\t\t\tif(m1==12)s1=d1+334;\n if(m2==1)s2=d2;\n\t\t\tif(m2==2)s2=d2+31;\n\t\t\tif(m2==3)s2=d2+59;\n\t\t\tif(m2==4)s2=d2+90;\n\t\t\tif(m2==5)s2=d2+120;\n\t\t\tif(m2==6)s2=d2+151;\n\t\t\tif(m2==7)s2=d2+181;\n\t\t\tif(m2==8)s2=d2+212;\n\t\t if(m2==9)s2=d2+243;\n\t\t\tif(m2==10)s2=d2+273;\n\t\t\tif(m2==11)s2=d2+304;\n\t\t\tif(m2==12)s2=d2+334;\n\t\t\ts=s2-s1;\n\t\t}\n\t\tprintf(\"%d\",s);\n\t}\n\tif(y1>sy>>sm>>sd;\n cin>>ey>>em>>ed;\n if((sy%100!=0&&sy%4==0)||(sy%400==0))\n\t {for(i=sm;i<=12;i++) {sum1=sum1+b[i];}\n sum1=sum1-sd;\n\t }\n else\n\t {for(i=sm;i<=12;i++) {sum1=sum1+a[i];}\n sum1=sum1-sd;\n\t }\n\t if((ey%100!=0&&ey%4==0)||(ey%400==0))\n\t {for(i=em;i<=12;i++) {sum2=sum2+b[i];}\n sum2=sum2-ed;\n\t }\n else\n\t {for(i=em;i<=12;i++) {sum2=sum2+a[i];}\n sum2=sum2-ed;\n\t }\n \n\t if(sy==ey) Sum=sum1-sum2;\n\telse\n\t {\n\t\t for(i=sy+1;i<=ey;i++)\n\t\t {if((i%100!=0&&i%4==0)||(i%400==0)) Sum=Sum+366;\n\t\t else Sum=Sum+365;\n\t\t }\n Sum=Sum+sum1-sum2;\n\t }\n \n \n \n cout<>a1>>b1>>c1;\n\tcin>>a2>>b2>>c2;\n\twc(a1,b1,c1,a2,b2,c2,0);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39629", "code": "int md[12]={31,28,31,30,31,30,31,31,30,31,30,31};\nint runnian(int year)\n{\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n return 1;\n else\n return 0;\n}\nint tian(int y, int m, int d)\n{\n int x=0;\n for (int i=0;i2||(m==2 && d==29)))\n x++;\n return x;\n}\nint main()\n{\n int y1, y2, m1, m2, d1, d2;\n long dif=0;\n cin>>y1>>m1>>d1>>y2>>m2>>d2;\n while (y2-y1>=1)\n {\n dif += 365+runnian(y1);\n y1++;\n }\n dif=dif+(tian(y2,m2,d2)-tian(y1,m1,d1));\n cout<> y1 >> m1 >> d1;\n cin>> y2 >> m2 >>d2;\n count=sum(y2,m2,d2)-sum(y1,m1,d1);\n\tcout << count <=2)\n\t{while(h-g>1)\n\t{\n\t\tg++;\n if((g%4==0)&&(g%100!=0)||(g%400==0))\n\t { s=s+366;}\n\t else{ s=s+365;}\n\t}\n\ts=s+f;\n if((y1%4==0)&&(y1%100!=0)||(y1%400==0))\n { s=s+366-e;}\n else{ s=s+365-e;}}\n\telse if (y2==y1)\n\t{s=f-e;}\n\telse if(y2-y1==1)\n\t{\n if((y1%4==0)&&(y1%100!=0)||(y1%400==0))\n\t {s=f+366-e;}\n\t else {s=f+365-e;}\n\t}\n printf(\"%d\",s);\n return 0;\n }"} +{"label": "80", "index": "39632", "code": "main()\n{\n int y1,y2,m1,m2,d1,d2,i,j,k,day[12]={31,28,31,30,31,30,31,31,30,31,30,31},s1,s2,r;\n scanf(\"%d %d %d\",&y1,&m1,&d1);\n scanf(\"%d %d %d\",&y2,&m2,&d2);\n r=(y2-y1)/4-(y2-y1)/100+(y2-y1)/400;\n s1=365*(y2-y1)+r;\n if(m2>m1 || (m2==m1 && d2>=d1))\n {\n for(i=m1-1;i2)\n s1++;\n }\n }\n else\n {\n for(i=m2-1;i<=m1-1;i++)\n {\n s1=s1-day[i];\n }\n s1=s1+d1-d2-1;\n if(((y1%4==0 && y1%100!=0)||y1%400==0)&& m1<=2)s1++;\n if((y2%4==0 && y2%100!=0)||y2%400==0)\n {\n if(m2>2)\n s1++;\n }\n }\n printf(\"%d\",s1);\n}"} +{"label": "80", "index": "39633", "code": "int main(){\n\tint y1,y2,m1,m2,d1,d2,n1=0,n2=0,n3=0,i,j;\n\tint mouth1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??\n\tint mouth2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint *p=mouth1;//????\n\tint *q=mouth2;\n\t*p=0;*(p+1)=31;*(p+2)=28;*(p+3)=31;*(p+4)=30;*(p+5)=31;*(p+6)=30;*(p+7)=31;*(p+8)=31;*(p+9)=30;*(p+10)=31;*(p+11)=30;*(p+12)=31;\n\t*q=0;*(q+1)=31;*(q+2)=29;*(q+3)=31;*(q+4)=30;*(q+5)=31;*(q+6)=30;*(q+7)=31;*(q+8)=31;*(q+9)=30;*(q+10)=31;*(q+11)=30;*(q+12)=31;//??\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i2))\n return days+1;\n else\n return days;\n}\nint main()\n{\n\n int StartY,StartM,StartD,EndY,EndM,EndD,sum=0,i;\n cin>>StartY>>StartM>>StartD;\n cin>>EndY>>EndM>>EndD;\n if(StartY==EndY)\n\t cout<=3)\n\t{\n\t\t\tnum=num+1;\n\t}\n\n m=d-a;\n\tn=365*m+num;\n\tswitch (b)\n\t{\n\t\tcase 1:\n\t\t\to=c;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t o=31+c;\n\t\t break;\n\t\tcase 3:\n\t\t\to=59+c;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\to=90+c;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\to=120+c;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\to=151+c;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\to=181+c;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\to=212+c;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\to=243+c;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\to=273+c;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\to=304+c;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\to=334+c;\n\t\t\tbreak;\n\t}\n\tswitch (e)\n\t{\n\t\tcase 1:\n\t\t\tp=f;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t p=31+f;\n\t\t break;\n\t\tcase 3:\n\t\t\tp=59+f;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tp=90+f;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tp=120+f;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tp=151+f;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tp=181+f;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tp=212+f;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tp=243+f;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tp=273+f;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tp=304+f;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tp=334+f;\n\t\t\tbreak;\n\t}\n\n\tn=n+p-o;\n\tprintf(\"%d\",n);\n\treturn 0;\n\t}"} +{"label": "80", "index": "39637", "code": "int main()\n{\n\tint styear,stmonth,stday,edyear,edmonth,edday,month,year,sum=0;\n\tcin>>styear>>stmonth>>stday>>edyear>>edmonth>>edday;\n\tif (edyear==styear)\n\t{\n\t\tif (edmonth==stmonth)\n\t\t\tsum=edday-stday;\n\t\telse\n\t\t{\n\t\t\tfor (month=stmonth;month<=edmonth-1;month++)\n\t\t\t{\n\t\t\t\tswitch (month)\n\t\t\t\t{\n\t\t\t\tcase 2: sum+=28; break;\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t\tcase 5:\n\t\t\t\tcase 7:\n\t\t\t\tcase 8:\n\t\t\t\tcase 10:\n\t\t\t\tcase 12: sum+=31; break;\n\t\t\t\tdefault: sum+=30; break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth<=2&&edmonth>2)\n\t\t\t\tsum++;\n\t\t\tsum=sum+edday-stday;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (year=styear;year<=edyear;year++)\n\t\t{\n\t\t\tif ((year%4==0&&year%100!=0)||(year%400==0))\n\t\t\t\tsum+=366;\n\t\t\telse\n\t\t\t\tsum+=365;\n\t\t}\n\t\tif (stmonth>1)\n\t\t{\n\t\t\tfor (month=1;month<=stmonth-1;month++)\n\t\t\t{\n\t\t\t\tswitch (month)\n\t\t\t\t{\n\t\t\t\tcase 2: sum-=28; break;\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t\tcase 5:\n\t\t\t\tcase 7:\n\t\t\t\tcase 8:\n\t\t\t\tcase 10:\n\t\t\t\tcase 12: sum-=31; break;\n\t\t\t\tdefault: sum-=30; break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth>2)\n\t\t\t\tsum-=1;\n\t\t}\n\t\tsum-=stday;\n\t\tfor (month=edmonth;month<=12;month++)\n\t\t{\n\t\t\tswitch (month)\n\t\t\t{\n\t\t\tcase 2: sum-=28; break;\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 5:\n\t\t\tcase 7:\n\t\t\tcase 8:\n\t\t\tcase 10:\n\t\t\tcase 12: sum-=31; break;\n\t\t\tdefault: sum-=30; break;\n\t\t\t}\n\t\t}\n\t\tif (((edyear%4==0&&edyear%100!=0)||(edyear%400==0))&&edmonth<=2)\n\t\t\tsum-=1;\n\t\tsum+=edday;\n\t}\n\tcout<=3)) e+=1;\n if((Eyear%4==0&&Eyear%100!=0)||(Eyear%400==0)&&(Emonth>=3)) e+=1;\n f=365*a+c-b+d+e;\n printf(\"%d\",f);\n printf(\"\\n\");\n}"} +{"label": "80", "index": "39639", "code": "int main()\n{\n\tint y1,m1,d1,y2,m2,d2,ans=0,p,i;\n\tint m[]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d%d%d%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\tif(y2-y1==0)\n\t{\n\t\tif(m2-m1==0)\n\t\t\tans=d2-d1;\n\t\telse\n\t\t{\n\t\t\tif((y1%4==0&&y1%100!=0)||(y1%400==0))\n\t\t\t\tm[1]=29;\n\t\t\tfor(i=m1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i1;i--)\n\t{\n\t\tif(i==2&&(y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t{\n\t\t\td=d-29;\n\t\t}\n\t\telse\n\t\t{\n\t\t\td=d-y[i-1];\n\t\t}\n\t}\n\td=d-d1+1;\n\tfor(i=1;i>sy>>sm>>sd;\n\tcin>>ey>>em>>ed;\n\tfor(i=sy+1;i<=ey-1;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))//?????\n\t\t\tsum+=366;\n\t\telse sum+=365;\n\t}\n\tif(ey-sy!=0)//???\n\t{\n\tif((sy%4==0&&sy%100!=0)||(sy%400==0))\n\t{\n\t\tfor(i=0;i>y1>>m1>>d1>>y2>>m2>>d2;\n\tint sum,sum1=0,sum2=0;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint i;\n\tfor(i=1;i1)\n\t{for(i=1;i<=m1-1;i++)\n\tsum1=sum1+a[i];}\n\t\n\t\n\t\tsum1=sum1+d1;\n\ta[2]=28;\n\tfor(i=1;i1)\n\t{\n\tfor(i=1;i<=m2-1;i++)\n\t\tsum2=sum2+a[i];}\n\tsum2=sum2+d2;\n\tsum=sum2-sum1;\n\tcout<>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tif(y2==y1&&((y1%4==0&&y1%100!=0)||(y1%400==0)))\n\t{\n\t\tif(m1!=m2)\n\t\t{\n\t\t\tfor(i=m1+1;i>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\tif (year1==year2)\n\t{\n\t\tif (month1==month2)//????\n\t\t\tsum=day2-day1;\n\t\telse//?????\n\t\t{\n\t\t\tsum+=days[month1]-day1;\n\t\t\tfor (i=month1+1;i> x >> y >> z >> a >> b >> c;\n\tfor (int i = x; i < a; i ++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t{\n\t\t\tsum += 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum += 365;\n\t\t}\n\n\t}\n\tsum = sum + days(a, b, c) - days(x, y, z);\n\tcout << sum << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39647", "code": "int main()\n{\n\tint a[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, b[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tint sy, sm, sd, ey, em, ed, y, s = 0, i, j;\n\tcin >> sy >> sm >> sd >> ey >> em >> ed;\n\tif(ey > sy)\n\t{\n\t\tfor(i = sm - 1; i < 12; i++)\n\t\t{\n\t\t\tif((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))\n\t\t\t s = s + b[i];\n\t\t\telse\n\t\t\t\ts = s + a[i];\n\t\t}\n\t\tfor(i = sy + 1; i < ey; i++)\n\t\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\tfor(int j = 0; j < 12; j++)\n\t\t\t\t\ts = s + b[j];\n\t\t\telse\n\t\t\t\tfor(int j = 0; j < 12; j++)\n\t\t\t\t\ts = s + a[j];\n\t\t\tif((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))\n\t\t\tfor(int j = 0; j < em - 1; j++)\n\t\t\t{\n\t\t\t\ts = s + b[j];\n\t\t\t}\n\t\t\telse\n\t\t\t\tfor(int j = 0; j < em - 1; j++)\n\t\t\t\t{\n\t\t\t\ts = s + a[j];\n\t\t\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i = sm - 1; i < em - 1; i++)\n\t\t{\n\t\t\tif((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))\n\t\t\t s = s + b[i];\n\t\t\telse\n\t\t\t\ts = s + a[i];\n\t\t}\n\t}\n\ts = s + ed - sd;\n\tcout << s;\n\treturn 0;\n}"} +{"label": "80", "index": "39648", "code": "\nint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\nint main()\n{\n\tint countYear(int syear,int eyear);\n\tint countmonth(int year,int month,int day);\n\tint syear,smonth,sday,eyear,emonth,eday,day;\n\tscanf(\"%d%d%d%d%d%d\",&syear,&smonth,&sday,&eyear,&emonth,&eday);\n\tint between,day1,day2;\n\tbetween=countYear(syear,eyear);\n\tday1=countmonth(syear,smonth,sday);\n\tday2=countmonth(eyear,emonth,eday);\n\tday=between-day1+day2;\n\tprintf(\"%d\",day);\n\treturn 0;\n}\n\ncountYear(int syear,int eyear)\n{\n\tint day=0,i;\n\tfor(i=syear;i> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tfor (year = year1;year <= year2;year++)\n\t{\n\t\tflag = 0;\n\t\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\t\tflag = 1;\n\t\tif (year1 == year2)\n\t\t{\n\t\t\tfor (i = month1;i < month2;i++)\n\t\t\t{\n\t\t\t\tsum += month[i];\n\t\t\t}\n\t\t\tsum = sum + day2 - day1;\n\t\t\tif (flag && month1 <= 2 && month2 > 2)\n\t\t\t\tsum ++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (year == year1)\n\t\t\t{\n\t\t\t\tfor (i = month1;i <= 12;i++)\n\t\t\t\t{\n\t\t\t\t\tsum += month[i];\n\t\t\t\t}\n\t\t\t\tsum = sum - day1;\n\t\t\t\tif (flag && (month1 <= 2))\n\t\t\t\t\tsum ++;\n\t\t\t}\n\t\t\telse if (year < year2)\n\t\t\t{\n\t\t\t\tsum += 365;\n\t\t\t\tif (flag)\n\t\t\t\t\tsum++;\n\t\t\t}\n\t\t\tif (year == year2)\n\t\t\t{\n\t\t\t\tfor (i = 1;i < month2;i++)\n\t\t\t\t{\n\t\t\t\t\tsum += month[i];\n\t\t\t\t}\n\t\t\t\tsum = sum + day2;\n\t\t\t\tif (flag && (month1 <= 2 || month2 > 2))\n\t\t\t\t\tsum ++;\n\t\t\t}\n\t\t\tmonth1 = 1;\n\t\t}\n\t}\n\tcout << sum;\n\treturn 0;\n}\n\n\n\n\n"} +{"label": "80", "index": "39650", "code": "long sum(int y,int m,int d)\n{\nint i,x[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nlong s=0;\nfor(i=1;imonth[m1])\n {\n m1++; \n d1=1;\n }\n if(m1==12)\n { y1++;\n m1=0;\n}\n\n \n}\nprintf(\"%d\",sum);\n \n}\n"} +{"label": "80", "index": "39653", "code": "int main()\n{\n long a1,b1,c1,a2,b2,c2,i1,i2,sum1,sum2,d;\n scanf(\"%ld %ld %ld\",&a1,&b1,&c1);\n scanf(\"%ld %ld %ld\",&a2,&b2,&c2);\n sum1=0;\n sum2=0;\n for(i1=1;i12)||(a1%400==0)) {sum1=sum1+1;}\n switch(b1)\n {\n case 1:sum1=sum1;break;\n case 2:sum1=sum1+31;break;\n case 3:sum1=sum1+59;break;\n case 4:sum1=sum1+90;break;\n case 5:sum1=sum1+120;break;\n case 6:sum1=sum1+151;break;\n case 7:sum1=sum1+181;break;\n case 8:sum1=sum1+212;break;\n case 9:sum1=sum1+243;break;\n case 10:sum1=sum1+273;break;\n case 11:sum1=sum1+304;break;\n default:sum1=sum1+334;\n }\n sum1=sum1+c1;\n for(i2=1;i22)||(a2%400==0)) {sum2=sum2+1;}\n switch(b2)\n {\n case 1:sum2=sum2;break;\n case 2:sum2=sum2+31;break;\n case 3:sum2=sum2+59;break;\n case 4:sum2=sum2+90;break;\n case 5:sum2=sum2+120;break;\n case 6:sum2=sum2+151;break;\n case 7:sum2=sum2+181;break;\n case 8:sum2=sum2+212;break;\n case 9:sum2=sum2+243;break;\n case 10:sum2=sum2+273;break;\n case 11:sum2=sum2+304;break;\n default:sum2=sum2+334;\n }\n sum2=sum2+c2;\n d=sum2-sum1;\n printf(\"%ld\",d);\n return 0;\n}\n\n \n "} +{"label": "80", "index": "39654", "code": "int main()\n{\n\tint y1,y2,m1,m2,d1,d2;\n\tint md1[12]={31,28,31,30,31,30,31,31,30,31,30,31},md2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tint jl=0;\n\tint i,j,k;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i=date1.month)\n\t{\n\t\tfor(i=date1.month;i>year1>>month1>>day1>>year2>>month2>>day2;\n\tint i=1,time1=0,time2=0;\n\ta[1]=judge(year1)+28;\n\tfor(i=1;i>startyear>>startmonth>>startday;\n\tcin>>endyear>>endmonth>>endday;\n\tdy=(endyear-startyear>1?(endyear-startyear-1):0);\n\tadd=0;\n\tfor(i=startyear+1;i> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tcount1 = countday(y1, m1, d1);\n\tcount2 = countday(y2, m2, d2);\n\tcount1 += countyear(y1 - 1);\n\tcount2 += countyear(y2 - 1);\n\tcout << count2 - count1 << endl;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39664", "code": "int a[1000];\nint main()\n{\n\tint a[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint b[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint y1, y2, m1, m2, d1, d2;\n\tcin >> y1 >> m1>> d1 >> y2 >> m2 >> d2;\n\tint i, count = 0, sum =0;\n\n\tif (y2 -y1 >= 2)\n\t{\n\t\tfor (i = y1+1; i <= y2-1; i++)\n\t\t{\n\t\t\tif( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0) )\n\t\t\t\tcount ++;\n\t\t}\n\t}\n\tif (y2 -y1 >=1)\n\t{\n\t\tif ( (y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0) ) \n\t\t{\n\t\t\tif ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) \n\t\t\t{\n\t\t\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\t\t\t\tsum = sum + b[i];\n\t\t\t\tfor (i = 1; i <= m2 - 1 ; i++)\n\t\t\t\t\tsum = sum + b[i];\n\t\t\t\tsum = sum + (b[m1] - d1) + d2;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\t\t\t\tsum = sum + b[i];\n\t\t\t\tfor (i = 1; i < m2 ; i++)\n\t\t\t\t\tsum = sum + a[i];\n\t\t\t\tsum = sum + (b[m1] - d1) + d2;\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) \n\t\t\t{\n\t\t\t\n\t\t\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\t\t\t\tsum = sum + a[i]; \n\t\t\t\tfor (i = 1; i < m2 ; i++)\n\t\t\t\t\tsum = sum + b[i];\n\t\t\t\tsum = sum + (a[m1] - d1) + d2;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\n\t\t\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\t\t\t\tsum = sum + a[i];\n\t\t\t\tfor (i = 1; i < m2 ; i++)\n\t\t\t\t\tsum += a[i];\n\t\t\t\tsum = sum + (a[m1] - d1) + d2;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (y2 -y1 >=1)\n\t{\n\t\tsum = sum + count * 366 + (y2- y1 - 1 - count) * 365;\n\t\tcout << sum;\n\t}\n\tif (y2 - y1 == 0)\n\t{\n\tif ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) \n\t{\n\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\tsum = sum + b[i];\n\t\tfor (i = 1; i <= m2 - 1 ; i++)\n\t\t\tsum = sum + b[i];\n\tsum = sum + (b[m1] - d1) + d2 - 366;\n\t}\n\telse\n\t{\n\t\tfor (i = m1 + 1; i <= 12; i++)\n\t\t\t\t\tsum = sum + a[i];\n\t\t\t\tfor (i = 1; i < m2 ; i++)\n\t\t\t\t\tsum += a[i];\n\t\t\t\tsum = sum + (a[m1] - d1) + d2 - 365;\n\t\t\t}\n\tcout << sum;\n\t}\n\treturn 0;\n}\n\n\n\t\n\n"} +{"label": "80", "index": "39665", "code": "int main()\n{\n\tint startyear,startmonth,startday,endyear,endmonth,endday,n=0,year,j,t=0,d;\n int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nscanf(\"%d%d%d%d%d%d\",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);\n\tfor(year=startyear;year<=endyear;year++)\n\t\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\t\tn++;\n\tyear=startyear;\n\tif((year % 4 == 0 && year % 100 != 0)|| (year % 400 == 0))\n\t\tif(startmonth>2)\n\t\tn--;\n\tyear=endyear;\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\tif((endmonth<2)||((endmonth==2)&&(endday<29)))\n\t\tn--;\n\tif(n<0)\n\t\tn=0;\n\tfor(j=1;j<=12;j++)\n\t{if(j>startmonth)\n\tt=t+a[j];}\n\tt=t+a[startmonth]-startday;\n\tt=t+365*(endyear-startyear-1)+n;\n\tfor(j=1;j<=12;j++)\n\t{if(j>start.year>>start.month>>start.day;\n\tcin>>end.year>>end.month>>end.day;\n\tfor(i=start.year;i>y1>>m1>>d1>>y2>>m2>>d2;\n\tfor (int year = y1 + 1; year < y2; year++)\n\t\tsum += 365 + ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0));\n\tint num1[12] = {31,28,31,30,31,30,31,31,30,31,30,31},num2[12] = {31,29,31,30,31,30,31,31,30,31,30,31};\n\tint m;\n\tif ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t{\n\t\tsum += (num2[m1 - 1] - d1);\n\t\tfor (m = m1 + 1; m <=12;m++)\n\t\t\tsum += num2[m-1];\n\t}\n\telse\n\t{\n\t\tsum += (num1[m1 - 1] - d1);\n\t\tfor (m = m1 + 1; m <=12;m++)\n\t\t\tsum += num1[m-1];\n\t}\n\tsum += d2;\n\tif ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n\t{\n\t\tfor (m = 1; m < m2;m++)\n\t\t\tsum += num2[m-1];\n\t}\n\telse\n\t{\n\t\tfor (m = 1; m < m2;m++)\n\t\t\tsum += num1[m-1];\n\t}\n\tif(y1 == y2)\n\t\tsum -= (365 + ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0)));\n\tcout <2)dl++;\n j=0;\n while(j2)df++;\n if(f[Y]<=l[Y]){ \n df2=365+leap[0]-df;\n dn=df2+dl+inter;}\n \n\n if(l[Y]==f[Y])dn=dl-df;\n\n printf(\"%d\",dn);\n}\nint lp(int y)\n{\n return (y%4==0&&y%100!=0)||(y%400==0);\n}"} +{"label": "80", "index": "39669", "code": "main()\n{int y1,y2,m1,m2,d1,d2,y,d,m,c,b,e,f,g,h;\n scanf(\"%d %d %d\",&y1,&m1,&d1);\n scanf(\"%d %d %d\",&y2,&m2,&d2);\n int a[13]={0};f=0;b=0;c=0;\n a[1]=31;a[3]=31;a[5]=31;a[7]=31;a[8]=31;a[10]=31;a[12]=31;\n a[4]=30;a[6]=30;a[9]=30;a[11]=30;\ny=y1;m=1;d=1;\nif (y%4!=0) a[2]=28;else if (y%100!=0) a[2]=29; else if (y%400!=0) a[2]=28; else a[2]=29;\nwhile(myear2) return(0);\n\tif (month1month2) return(0);\n\tif (day1> sy >> sm >> sd >> ey >> em >> ed;\n\tfor (i = sy; i <= ey; i++)\n\t\t\tsum += Year(i);\n\tfor (i = 1; i < sm; i++)\n\t\tif (Year(sy) == 366 && i == 2)\n\t\t\tsum -= 29;\n\t\telse\n\t\t\tsum -= m[i];\n\tsum -= sd;\n\tfor (i = 12; i > em; i--)\n\t\tif (Year(ey) == 366 && i == 2)\n\t\t\tsum -= 29;\n\t\telse\n\t\t\tsum -= m[i];\n\tif (Year(ey) == 366 && em == 2)\n\t\t\tsum -= 29 - ed;\n\telse\n\t\tsum -= m[em] - ed;\n\tcout << sum;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39674", "code": "\nint main()\n{\n\tint sy,sm,sd,ey,em,ed;\n\tint sum=0; \n\n\tint k,f; //????????\n\tint m,d,a=0,b=0; //?????????\n\n\tint mon[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31,};\n\tint year[2]={365,366};\n\t\n\tcin>>sy>>sm>>sd>>ey>>em>>ed;\n\t\n\tfor (;sy2) k=( ( (sy+1) % 4 == 0 && (sy+1) % 100 != 0) || ((sy+1) % 400 == 0));\n\t else k=( (sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0));\n sum= sum+ year[k];\n\t} //??2008?2009???\n\t\n\tk= ((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0)); //??2008????\n\t\n\tif (sysm || (em==sm && ed>=sd))) //????2008 1 1 ?2009 2 1\n\t{\n\t\tsum= sum+year[k];\n\t\tsy++; //??2009 1 1?2009 2 1 //???2008 3 1?2009 1 1\n\t}\n\t\n\tk=( (sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0) ); //??2009(2008)????\n\tf=( (ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0) ); //??2009????\n\t\t\n\td=sd;//??1 1 ?3 1 ??1 1???a\n\tfor (m= sm; m>0; m--)\n\t{\t\n\t\tfor (; d>0; d--)\n\t\t\ta++;\n\t\td= mon[k][m-2];\n\t\t\t\n\t}\n\n\td=ed; //??2 1 ?1 1???b\n\tfor (m= em;m>0;m--)\n\t{\t\n\t\tfor (; d>0; d--)\n\t\t\tb++;\n\t\td= mon[f][m-2];\n\t}\n\n\tif (sy==ey ) sum= sum + b - a ; //2009 1 1?2009 2 1?b-a\n\telse sum= sum-a + year[k] +b; // 2008 3 1? 2009 1 1\n\n\tcout<>y1>>m1>>d1>>y2>>m2>>d2;\n\tt=y1;\n while(t>a>>b>>c>>x>>y>>z;\n\tif(a==x)\n\t{\n\t\tint sum=0; \n for(i=b;i> sy >> sm >> sd >> ey >> em >> ed;\n\tfor(i = sy; i < ey; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tday += 366;\n\t\telse\n\t\t\tday += 365;\n\t}\n\tfor(i = 1; i < sm; i++)\n\t{\n\t\tif(i == 2)\n\t\t{\n\t\t\tif((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))\n\t\t\t\td1 += 29;\n\t\t\telse\n\t\t\t\td1 += 28;\n\t\t}\n\t\telse if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12)\n\t\t\td1 += 31;\n\t\telse\n\t\t\td1 += 30;\n\t}\n\td1 += sd;\n\tfor(i = 1; i < em; i++)\n\t{\n\t\tif(i == 2)\n\t\t{\n\t\t\tif((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))\n\t\t\t\td2 += 29;\n\t\t\telse\n\t\t\t\td2 += 28;\n\t\t}\n\t\telse if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12)\n\t\t\td2 += 31;\n\t\telse\n\t\t\td2 += 30;\n\t}\n\td2 += ed;\n\tday = day - d1 + d2;\n\tcout << day << endl;\n\n\n\n\n\treturn 0;\n}\n"} +{"label": "80", "index": "39682", "code": "int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; \nint leap_days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31}; \nint isLeapYear(int year) \n{ \n return year % 400 == 0 || year % 4 == 0 && year % 100 != 0; \n } \n //????????(day,month)????? \n int sumFromFirstDay(int year, int month, int day) \n{ \n int i, ret = day; \n for (i = 1; i < month; i++) \n if (isLeapYear(year)) ret = ret + leap_days[i]; \n else ret = ret + days[i]; \n return ret; \n} \n int main() \n { \n int startYear, startMonth, startDay; \n int endYear, endMonth, endDay; \n scanf(\"%d%d%d\", &startYear, &startMonth, &startDay); \n scanf(\"%d%d%d\", &endYear, &endMonth, &endDay); \n int i, sum = 0; \n for (i = startYear + 1; i < endYear; i++) \n sum += isLeapYear(i) ? 366 : 365; \n int start = sumFromFirstDay(startYear, startMonth, startDay); \n int end = sumFromFirstDay(endYear, endMonth, endDay); \n if (startYear == endYear) sum += end - start; \n else \n { \n sum += (365 - start) + end; \n if (isLeapYear(startYear)) sum++; \n } \n printf(\"%d\",sum); \n return 0; \n } \n"} +{"label": "80", "index": "39683", "code": "\nint main()\n{\n\tint s1[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\tint s2[12] = {31,29,31,30,31,30,31,31,30,31,30,31};\n\tint y1, y2, m1, m2, d1, d2, flag, sum=0, i;\n\tcin >> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tfor(i=y1+1;i> year1 >> month1 >> day1 >> year2 >> month2 >> day2;\n\tfor(i = year1; i < year2; i++)\n\t{\n\t\tif(judge(i))\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\t}\n\t\tif(judge(year2))\n\t\t\tfor(j = 1; j < month2; j++)\n\t\t\t\tsum += mon2[j];\n\t\telse\n\t\t\tfor(j = 1; j < month2; j++)\n\t\t\t\tsum += mon1[j];\n\t\tsum += day2;\n\t\tif(judge(year1))\n\t\t{\n\t\t\tfor(j = 1; j < month1; j++)\n\t\t\t\tsum -= mon2[j];\n\t\t\tsum -= day1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(j = 1; j < month1; j++)\n\t\t\t\tsum -= mon1[j];\n\t\t\tsum -= day1;\n\t\t}\n\t\tcout << sum;\n\treturn 0;\n}\nint judge(int year)\n{\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}"} +{"label": "80", "index": "39685", "code": "\nmain()\n{\n\tint y1,y2,y3,m1,m2,m3,d1,d2,d3,n,i,j=0;\n\tint a[14]={0,0,31,59,90,120,151,181,212,243,273,304,334,365},b[14]={0,0,31,60,91,121,152,182,213,244,274,305,335,366};\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tif(y1>y2||y1==y2&&m1>m2||y1==y2&&m1==m2&&d1>d2)\n\t{\n\t\ty3=y1;\n\t\ty1=y2;\n\t\ty2=y3;\n\t\tm3=m1;\n\t\tm1=m2;\n\t\tm2=m3;\n\t\td3=d1;\n\t\td1=d2;\n\t\td2=d3;\n\t}\n\tfor(i=y1+1;im1)\n\t\t\tn=a[m2]-a[m1]+d2-d1;\n\t\tif((y1%100!=0&&y1%4==0||y1%400==0)&&(m1<2&&m2>2||m1==2&&d1<29&&m2>2))\n\t\t\tn=n+1;\n\t}\n\tif(y2-y1==1)\n\t{\n\t\tn=365-a[m1]-d1+a[m2]+d2;\n\t\tif((y1%100!=0&&y1%4==0||y1%400==0)&&(a[m1]+d1)<60||(y2%100!=0&&y2%4==0||y2%400==0)&&(a[m2]+d2)>=60)\n\t\t\tn=n+1;\n\t}\n\tif(y2-y1>=2)\n\t{\n\t\tn=365-a[m1]-d1+a[m2]+d2+(y2-y1-1)*365+j;\n\t\tif((y1%100!=0&&y1%4==0||y1%400==0)&&(a[m1]+d1)<60||(y2%100!=0&&y2%4==0||y2%400==0)&&(a[m2]+d2)>=60)\n\t\t\tn=n+1;\n\t}\n\tprintf(\"%d\\n\",n);\n}\n\n"} +{"label": "80", "index": "39686", "code": "void main()\n{\n\tint f(int y,int m,int d);\n\tint y1,y2,m1,m2,d1,d2,s1,s2;\n\tscanf(\"%d%d%d%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\ts1=f(y1,m1,d1);\n\ts2=f(y2,m2,d2);\n\tprintf(\"%d\",s2-s1);\n}\nint f(int y,int m,int d)\n{\tint i,s=0;\n\tfor(i=1;i>y1>>m1>>d1>>y2>>m2>>d2;\n\tint sum = 0;\n\tfor (int i=y1;i<=y2-1;i++){\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tsum += 366;\n\t\telse sum += 365;\n\t}\n\tsum -= days(y1,m1,d1);\n\tsum += days(y2,m2,d2);\n\tcout<>startyear>>startmonth>>startday>>endyear>>endmonth>>endday;\n\tint a[12]={31,59,90,120,151,181,212,243,273,304,334,365},b[12]={31,60,91,121,152,181,213,244,274,305,335,366};\n\tif(startyear!=endyear&&startyear+1!=endyear)\n\t{\n\t\tfor(i=startyear+1;i=d2)\n d=d1-d2;\n else\n d=d2-d1;\n printf(\"%d\",d);\n return 0;\n\t}"} +{"label": "80", "index": "39691", "code": "\nint main()\n{\n\tint y1,y2,m1,m2,d1,d2,i,sum=0;\n\tint month[12]={31,28,31,30,31,30,31,31,30,31,30,31};//????\n\tcin>>y1>>m1>>d1>>y2>>m2>>d2;\n\tif(y1==y2) //????\n\t{\n\t\tif((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\t\t\tmonth[1]+=1; //???2?29?\n\t\tfor(i=m1;i2) t=1;\n x2=e[m1]+d1+t;\n\n t=0;\n if(((y2%4==0&&y2%100!=0) || (y2%400==0))&&m2>2) t=1;\n x3=e[m2]+d2+t;\n \n x1=x1+x2-x3;\n if(x1<0) x1=-x1;\n printf(\"%d\\n\",x1);\n\nreturn 0;\n}\n\n"} +{"label": "80", "index": "39693", "code": "int main()\n{\n\tint year1,year2,month1,month2,day1,day2,a,b,year,days,i;\n\tscanf(\"%d%d%d\\n\",&year1,&month1,&day1);\n\tscanf(\"%d%d%d\",&year2,&month2,&day2);\n\tif((year1%4==0&&year1%100!=0)||(year1%400==0))\n\t{\n\t\tswitch(month1)\n\t\t{\n\t\tcase 1:\n\t\t\ta=day1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ta=31+day1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ta=60+day1;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ta=91+day1;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ta=121+day1;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ta=152+day1;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ta=182+day1;\t\n\t\t\tbreak;\t\n\t\tcase 8:\n\t\t\ta=213+day1;\t\n\t\t\tbreak;\t\n\t\tcase 9 :\n\t\t\ta=244+day1;\t\n\t\t\tbreak;\t\n\t\tcase 10:\n\t\t\ta=274+day1;\t\n\t\t\tbreak;\t\n\t\tcase 11:\n\t\t\ta=305+day1;\n\t\t\tbreak;\t\t\n\t\tcase 12:\n\t\t\ta=335+day1;\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch (month1)\n\t\t{\n\t\tcase 1:\n\t\t\ta=day1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ta=31+day1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ta=59+day1;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ta=90+day1;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ta=120+day1;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ta=151+day1;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ta=181+day1;\n\t\t\tbreak;\t\t\n\t\tcase 8:\n\t\t\ta=212+day1;\t\n\t\t\tbreak;\t\n\t\tcase 9:\n\t\t\ta=243+day1;\n\t\t\tbreak;\t\t\n\t\tcase 10 :\n\t\t\ta=273+day1;\t\n\t\t\tbreak;\t\n\t\tcase 11:\n\t\t\ta=304+day1;\t\n\t\t\tbreak;\t\n\t\tcase 12:\n\t\t\ta=334+day1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif((year2%4==0&&year2%100!=0)||(year2%400==0))\n\t{\n\t\tswitch (month2)\n\t\t{\n\t\tcase 1:\n\t\t\tb=day2;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tb=31+day2;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t b=60+day2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tb=91+day2;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tb=121+day2;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tb=152+day2;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tb=182+day2;\t\n\t\t\tbreak;\t\n\t\tcase 8:\n\t\t\tb=213+day2;\t\n\t\t\tbreak;\t\n\t\tcase 9:\n\t\t\tb=244+day2;\t\n\t\t\tbreak;\t\n\t\tcase 10 :\n\t\t\tb=274+day2;\t\n\t\t\tbreak;\t\n\t\tcase 11:\n\t\t\tb=305+day2;\t\n\t\t\tbreak;\t\n\t\tcase 12:\n\t\t\tb=335+day2;\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch (month2)\n\t\t{\n\t\tcase 1:\n\t\t\tb=day2;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tb=31+day2;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tb=59+day2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tb=90+day2;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tb=120+day2;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tb=151+day2;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tb=181+day2;\n\t\t\tbreak;\t\t\n\t\tcase 8:\n\t\t\tb=212+day2;\t\n\t\t\tbreak;\t\n\t\tcase 9:\n\t\t\tb=243+day2;\n\t\t\tbreak;\t\t\n\t\tcase 10:\n\t\t\tb=273+day2;\n\t\t\tbreak;\t\t\n\t\tcase 11:\n\t\t\tb=304+day2;\n\t\t\tbreak;\t\t\n\t\tcase 12:\n\t\t\tb=334+day2;\n\t\t\tbreak;\n\t\t}\n\t}\n\tyear=0;\n\tfor(i=year1;i>syear>>smonth>>sday>>eyear>>emonth>>eday;\n\n\tint r;\n\tint i,year,end;\n\tint num=0;\n\n\tif((syear % 4 == 0 && syear % 100 != 0) || (syear % 400 == 0))\n\t\tr=1;\n\telse\n\t\tr=0;\n\n\tif(eyear!=syear)\n\t{\n\t\t\tnum+=days[r][smonth]-sday;\n\t}\n\telse\n\t{\n\t\tif(emonth!=smonth)\n\t\t\tnum+=days[r][smonth]-sday;\n\t}\n\tif(eyear==syear)\n\t\tend=emonth-1;\n\telse\n\t\tend=12;\n\n\tfor(i=smonth+1;i<=end;i++)\n\t\tnum+=days[r][i];\n\n\tfor(year=syear+1;year>day1[i];\n\tfor ( int i=0;i<3;i++)\n\t\tcin>>day2[i];\n\tfor ( int i=day1[0]+1;i>year1>>month1>>day1>>year2>>month2>>day2;\n int i,answer=0;\n for (i=year1;iy||Y==y&&M>m||Y==y&&M==m&&D>d)\n\t{\n\t\ta=Y;\n\t\tb=M;\n\t\tc=D;\n\t\tY=y;\n\t\tM=m;\n\t\tD=d;\n\t\ty=a;\n\t\tm=b;\n\t\td=c;\n\t}\n\tfor(j=Y;j1)\n {\n for(i=1;i2)\n {\n a=ey%4;\n if(a==0)\n {\n b=ey%100;\n if(b==0)\n {\n c=ey%400;\n if(c==0)\n {day=day+1;}\n else\n {day=day;}\n }\n else\n {day=day+1;}\n }\n else\n {day=day;}\n }\n }\n else if(sy+1==ey)\n {\n for(i=sm;i<=12;i++)\n {\n if(i==2)\n {day=day+28;}\n else if((i==1)||(i==3)||(i==5)||(i==7)||(i==8)||(i==10)||(i==12))\n {day=day+31;}\n else if((i==4)||(i==6)||(i==9)||(i==11))\n {day=day+30;}\n }\n day=day-sd;\n if(em>1)\n {\n for(i=1;i2)\n {\n a=ey%4;\n if(a==0)\n {\n b=ey%100;\n if(b==0)\n {\n c=ey%400;\n if(c==0)\n {day=day+1;}\n else\n {day=day;}\n }\n else\n {day=day+1;}\n }\n else\n {day=day;}\n }\n }\n else if(sy==ey)\n {\n for(i=sm;i2))\n {\n a=sy%4;\n if(a==0)\n {\n b=sy%100;\n if(b==0)\n {\n c=sy%400;\n if(c==0)\n {day=day+1;}\n else\n {day=day;}\n }\n else\n {day=day+1;}\n }\n else\n {day=day;}\n }\n }\n printf(\"%d\",day);\n return 0;\n}\n\n\n\n\n\n\n"} +{"label": "80", "index": "39706", "code": "int leap(int year){\n if(year%4==0){\n if(year%100==0){\n if(year%400==0){\n return 1;\n }\n return 0;\n }\n return 1;\n } \n return 0;\n} \nint main()\n{\n int sy,sm,sd; \n int ey,em,ed; \n int monthday[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},\n {0,31,29,31,30,31,30,31,31,30,31,30,31}};\n scanf(\"%d %d %d\",&sy,&sm,&sd); //????? \n scanf(\"%d %d %d\",&ey,&em,&ed); //????? \n int tmp;\n if((sy>ey)||(sy==ey && sm>em)||(sy==ey && sm==em && sd>ed)){ //???????? ???????????? \n tmp=sy; sy=ey; ey=tmp;\n tmp=sm; sm=em; em=tmp;\n tmp=sd; sd=ed; ed=tmp;\n }\n int ans=0;\n while(sy!=ey || sm!=em || sd!=ed){\n ans++;\n sd++;\n if(sd>monthday[leap(sy)][sm]){\n sd=1;\n sm++;\n } \n if(sm==13){\n sm=1;\n sy++;\n } \n }\n printf(\"%d\\n\",ans);\n return 0;\n}"} +{"label": "80", "index": "39707", "code": "/*\n * distanceofdates.cpp\n *\n * Created on: 2011-11-4\n * Author: LTY\n */\nint main(){\n\tint startyear,startmonth,startday,endyear,endmonth,endday;\n\tint days1,days2,days3,i,j=0,t=0;\n\tcin>>startyear>>startmonth>>startday;\n\tcin>>endyear>>endmonth>>endday;\n\tif((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))\n\t\t{\n\t\tint month[]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\t\tdays1=startday;\n\t\tfor(i=1;i1){\n\t\tfor(i=A+1;i<=a-1;i++){\n\t\t\tif(i%4==0&&i%100!=0||i%400==0){\n\t\t\tday+=366;\n\t\t\t}else{\n\t\t\tday+=365;\n\t\t\t}\n\t\t}\n\t}\n\tfor(j=0;j<=b-1;j++){\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tday+=31;\n\t\tif(j==4||j==6||j==9||j==11)\n\t\t\tday+=30;\n\t\tif(j==2&&(a%4==0&&a%100!=0||a%400==0))\n\t\t\tday+=29;\n\t\tif(j==2&&(a%4!=0||(a%100==0&&a%400!=0)))\n\t\t\tday+=28;\n\t\tif(j==0)\n\t\t\tday+=0;\n\t}\n\tday+=c-1;\n\t}\n\tif(A==a){\n\t\tif(B==b)\n\t\tday=c-C;\n\t\tif(b>B){\n\t\tif(B==1||B==3||B==5||B==7||B==8||B==10||B==12)\n\t\t\tday+=31;\n\t\tif(B==4||B==6||B==9||B==11)\n\t\t\tday+=30;\n\t\tif(B==2&&(A%4==0&&A%100!=0||A%400==0))\n\t\t\tday+=29;\n\t\tif(B==2&&(A%4!=0||(A%100==0&&A%400!=0)))\n\t\t\tday+=28;\n\t\tday-=C-1;\n\t\tif(b-B>1){\n\t\t\tfor(j=B+1;j<=b-1;j++){\n\t\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tday+=31;\n\t\t\tif(j==4||j==6||j==9||j==11)\n\t\t\tday+=30;\n\t\t\tif(j==2&&(A%4==0&&A%100!=0||A%400==0))\n\t\t\tday+=29;\n\t\t\tif(j==2&&(A%4!=0||(A%100==0&&A%400!=0)))\n\t\t\tday+=28;\n\t\t\t}\n\t\t}\n\t\tday+=c-1;\n\t\t}\n\t}\n\tprintf(\"%d\",day);\n\treturn 0;\n}"} +{"label": "80", "index": "39709", "code": "int main()\n{\n\tint syear,smonth,sday,eyear,emonth,eday,cha=0;\n\tcin>>syear>>smonth>>sday>>eyear>>emonth>>eday;\n\tint sum1=0,sum2=0;\n\tswitch(smonth)\n\t{\n\tcase 1:sum1+=0;break;\n\tcase 2:sum1+=31;break;\n\tcase 3:sum1+=31+28;break;\n\tcase 4:sum1+=31+28+31;break;\n\tcase 5:sum1+=31+28+31+30;break;\n\tcase 6:sum1+=31+28+31+30+31;break;\n\tcase 7:sum1+=31+28+31+30+31+30;break;\n\tcase 8:sum1+=31+28+31+30+31+30+31;break;\n\tcase 9:sum1+=31+28+31+30+31+30+31+31;break;\n\tcase 10:sum1+=31+28+31+30+31+30+31+31+30;break;\n\tcase 11:sum1+=31+28+31+30+31+30+31+31+30+31;break;\n\tcase 12:sum1+=31+28+31+30+31+30+31+31+30+31+30;break;\n\tdefault: break;\n\t}\n\tswitch(emonth)\n\t{\n\tcase 1:sum2+=0;break;\n\tcase 2:sum2+=31;break;\n\tcase 3:sum2+=31+28;break;\n\tcase 4:sum2+=31+28+31;break;\n\tcase 5:sum2+=31+28+31+30;break;\n\tcase 6:sum2+=31+28+31+30+31;break;\n\tcase 7:sum2+=31+28+31+30+31+30;break;\n\tcase 8:sum2+=31+28+31+30+31+30+31;break;\n\tcase 9:sum2+=31+28+31+30+31+30+31+31;break;\n\tcase 10:sum2+=31+28+31+30+31+30+31+31+30;break;\n\tcase 11:sum2+=31+28+31+30+31+30+31+31+30+31;break;\n\tcase 12:sum2+=31+28+31+30+31+30+31+31+30+31+30;break;\n\tdefault: break;\n\t}\n\tint sum=0,year;\n\tfor(year=syear+1;year=1)\n\t cha=cha+sum+365*(eyear-syear-1);\n\tsum1=sum1+sday;sum2=sum2+eday;\n\tif(((syear%4==0&&syear%100!=0)||(syear%400==0))&&smonth>=3)\n\t\tsum1=sum1;\n\tif(((syear%4==0&&syear%100!=0)||(syear%400==0))&&smonth<3)\n\t\tsum1=sum1-1;\n\tif(((eyear%4==0&&eyear%100!=0)||(eyear%400==0))&&emonth>=3)\n\t\tsum2=sum2+1;\n\tif(((eyear%4==0&&eyear%100!=0)||(eyear%400==0))&&emonth<3)\n\t\tsum2=sum2;\n\tif(eyear-syear>=1)\n\tcha=cha+365-sum1+sum2;\n\tif(eyear-syear==0)\n\t\tcha=sum2-sum1;\n\tcout<>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint a[13]={0,31,0,31,30,31,30,31,31,30,31,30,31};\n\t\n\t\t\n\tif(y1>year1>>mon1>>day1;\n\tcin>>year2>>mon2>>day2;\n\tfor(i=year1+1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tif(y1==y2){\n\t\tif((y1%400==0)||((y1%4==0)&&(y1%100!=0))){\n\t\t\tfor(i=m1;i>date[0].year>>date[0].month>>date[0].day;\n\tcin>>date[1].year>>date[1].month>>date[1].day;\n\tif(date[1].year-date[0].year>0)\n\t{\n\tif(date[1].year-date[0].year>1)\n\t{\n\t\tsum=365*(date[1].year-date[0].year-1);\n\t}\n\tfor(i=date[0].month;i<=12;i++)\n\t{\n\t\tsum=sum+monthday_ping[i];\n\t}\n\tsum=sum-date[0].day;\n\tfor(i=1;i2))\n\t\ti++;\n\n\tb=1;j=0;\n\twhile(b2))\n\t\tI++;\n\n\tB=1;J=0;\n\twhile(Bx2)\n\t{\n\t\tfuhao=x1;\n\t\tx1=x2;\n\t\tx2=fuhao;\n\t\tfuhao=-1;\n\t}\n\tfor(q=0,k=x1;k=3)q1=q1+1;\n\t\tif(m2==2&&d2==29)q1=q1+1;\n\t}\n\tq=q+q1;\n\tprintf(\"%d\",q);\n\treturn 0;\n\n\n\t\n\n\n}"} +{"label": "80", "index": "39718", "code": "int main()\n{\nint result = 0;\nint y1,m1,d1,y2,m2,d2,i,ylp;\nint day[2][12] = {31,28,31,30,31,30,31,31,30,31,30,31, 31,29,31,30,31,30,31,31,30,31,30,31};\nint year[2] = {365,366};\ncin>>y1>>m1>>d1;\ncin>>y2>>m2>>d2;\n \n\nylp = y2-y1-1;\n\nif(ylp >0){\n\tfor(i=y1+1;i1) {\n\tfor(i = 0;i> year[i] >> month[i]>> day[i];\n\t}\n\tint sum_days = 0;\n\tfor (i = year[0]; i < year[1]; i++ )\n\t{\n\t\tsum_days += 365 + ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0);\n\t}\n\tint mon[12] = {0, 31, 28, 31,30, 31, 30, 31, 31, 30, 31, 30};\n\tsum_days -= day[0];\n\tmonth[0]-- ;\n\twhile (month[0] > 0)\n\t{\n\t\tif (month[0] == 2)\n\t\t{\n\t\t\tsum_days -= mon[month[0]] +((year[0] % 4 == 0 && year[0] % 100 != 0) || year[0] % 400 == 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum_days -= mon[month[0]];\n\t\t}\n\t\tmonth[0]-- ;\n\t}\n\tsum_days += day[1];\n\tmonth[1]-- ;\n\twhile (month[1] > 0)\n\t{\n\t\tif (month[1] == 2)\n\t\t{\n\t\t\tsum_days += mon[month[1]] +((year[1] % 4 == 0 && year[1] % 100 != 0) || year[1] % 400 == 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum_days += mon[month[1]];\n\t\t}\n\t\tmonth[1]-- ;\n\t}\n\tcout << sum_days << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39721", "code": "int main()\n{\n\tint startyear,startmonth,startday,rankstartday=0;\n\tint endyear,endmonth,endday,rankendday=0;\n\tcin >> startyear >> startmonth >> startday;\n\tcin >> endyear >> endmonth >> endday;\n\tint sum=0,year=0,month;\n\tint days1[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint days2[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tif( startyear== endyear)\n\t{\n\t\tif( (startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0) )\n\t\t{\n\t\t\tfor(month=1;month2))\n\t\tr=r+1;\n\telse\n\t\tr=r+0;\n\tsum=p-q+r;\n\tprintf(\"%d\",sum);\n\treturn 0;\n}"} +{"label": "80", "index": "39723", "code": "int main()\n{\n int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int y1,y2,m1,m2,d1,d2;\n\tint i,m=0;\n\tscanf(\"%d%d%d%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\tif(y12)\n\t\t\t\tm=m+1;\n\t\t}\n\n\t\tfor(i=y1+1;i<=y2-1;i++)\n\t\t{\n\t\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n m=m+366;\n\t\t\telse\n\t\t\t m=m+365;\n }\n \n\t}\n else\n\t{\n\t\tif(m1>y1>>m1>>d1>>y2>>m2>>d2;\n\tif(y1==y2){\n\t\tk=judge(y1);\n\t\tday=day+same_year(m1,d1,m2,d2,k);}\n\tif(y1==y2-1)\n\t{\n\t\tk=judge(y1);\n\t\tday=day+same_year(m1,d1,12,31,k)+1;\n\t\tk=judge(y1);\n\t\tday=day+same_year(1,1,m2,d2,k);\n\t}\n\tif(y1>sy>>sm>>sd>>ey>>em>>ed;\n\tfor(int i=sy;i2))\n\t\td=d+1;\n d=d+ed-sd;\n\tcout<> year1 >> month1 >> day1 >> year2 >> month2 >> day2;\n\tcount = (year2 - year1) * 365 + (year2 - year1) / 4 + (year1 % 4 - year2 % 4 > 0) - (year2 - year1) / 100 \n\t\t\t- (year1 % 100 - year2 % 100 > 0) + (year2 - year1) / 400 + (year1 % 400 - year2 % 400 > 0) - day1 + day2; \n\tfor(i = month1 - 1; i < 12; i++)\n\t\tcount += dofm[i] + (judge(year1) && i == 1);\n\tfor(i = month2 - 1; i < 12; i++)\n\t\tcount -= dofm[i] + (judge(year2) && i == 1);\n\tcout << count;\n\treturn 0;\n}"} +{"label": "80", "index": "39728", "code": "int runnian(int y)\n{\n\tint t;\n\tif(y%4==0&&y%100!=0||y%400==0)\n\t\tt=1;\n\telse t=0;\n\treturn t;\n}\n\nint main()\n{\n\tint i,y1,y2,m1,m2,d1,d2,sum=0;\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tfor(i=y1;iyear1) \n\t\tmonth2+=12;\n\tmonth[2]=year[judge(year1)][2];\n\tmonth[14]=year[judge(year2)][2];\n\tfor (i=month1+1;imonth1)\n\t\treturn (year[judge(year1)][month1]-day1+day2);\n\telse \n\t\treturn (day2-day1);\n}\t\n\t"} +{"label": "80", "index": "39730", "code": "int main()\n{int startYear,startMonth,startDay,endYear,endMonth,endDay,n=0;\nlong m=0;\nscanf(\"%d %d %d\\n%d %d %d\",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);\nint i;\nfor (i=1;i<=startMonth;i++)\n{if (i==1)n=n+0;\nif (i==2)n=n+31;\nif (i==3)n=n+28;\nif (i==4)n=n+31;\nif (i==5)n=n+30;\nif (i==6)n=n+31;\nif (i==7)n=n+30;\nif (i==8)n=n+31;\nif (i==9)n=n+31;\nif (i==10)n=n+30;\nif (i==11)n=n+31;\nif (i==12)n=n+30;\n}\nif (startMonth>=3&&startMonth>=3&&startYear % 4 == 0 && startYear % 100 != 0 || startYear % 400 == 0 )\nn=n+1;\n\nn=n+startDay;\n\nfor (i=startYear;i=3)\nm=m+1;\n\n\nm=m+endDay;\n\nprintf(\"%d\",m-n);\n}\n"} +{"label": "80", "index": "39731", "code": "int main()\n{\n\tint a[13],n,i,m;\n\tint year1,year2,month1,month2,day1,day2;\n\tscanf(\"%d %d %d\\n\",&year1,&month1,&day1);\n\tscanf(\"%d %d %d\",&year2,&month2,&day2);\n\ta[0]=0;a[1]=1;a[2]=-2;a[3]=1;a[4]=0;\n\ta[5]=1;a[6]=0;a[7]=1;a[8]=1;a[9]=0;\n\ta[10]=1;a[11]=0;a[12]=1;\n\tm=0;n=0;\n\t\tif(year1==year2)\n\t\t{\n\t\t\tif(month1==month2)\n\t\t\t{\n\t\t\t\tn=day2-day1;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tfor(i=month1;i2)\n\t\t\t\tm=m+1;\n\t\t\tfor(i=year1+1;i>starty>>startm>>startd;\n\tcin>>endy>>endm>>endd;\n\tfor(i=starty+1;i=3)\n\t run++;\n\ttotal=365*(endy-starty);\n\tfor(i=0;i> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;\n\tif (startYear == endYear)\n\t{\n\t\tif (((startYear % 4 == 0) && startYear % 100 != 0) || (startYear % 400 == 0))\n\t\t{\n\t\t\tif (startMonth == endMonth)\n\t\t\t{\n\t\t\t\tcount = endDay - startDay;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (i = startMonth + 1; i <= endMonth; i++)\n\t\t\t\t{\n\t\t\t\t\tcount += month2[i];\n\t\t\t\t}\n\t\t\t\tcount += month2[startMonth] - startDay;\n\t\t\t\tcount += endDay;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (startMonth == endMonth)\n\t\t\t{\n\t\t\t\tcount = endDay - startDay;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (i = startMonth + 1; i <= endMonth; i++)\n\t\t\t\t{\n\t\t\t\t\tcount += month1[i];\n\t\t\t\t}\n\t\t\t\tcount += month1[startMonth] - startDay;\n\t\t\t\tcount += endDay;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (j = startYear; j <= endYear; j++)\n\t\t{\n\t\t\tif (j == startYear)\n\t\t\t{\n\t\t\t\tif (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))\n\t\t\t\t{\n\t\t\t\t\tfor (i = startMonth + 1; i <= 12; i++)\n\t\t\t\t\t\tcount += month2[i];\n\t\t\t\t\tcount += month2[startMonth] - startDay;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (i = startMonth + 1; i <= 12; i++)\n\t\t\t\t\t\tcount += month1[i];\n\t\t\t\t\tcount += month1[startMonth] - startDay;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (j == endYear)\n\t\t\t{\n\t\t\t\tif (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))\n\t\t\t\t{\n\t\t\t\t\tfor (i = 1; i <= endMonth - 1; i++)\n\t\t\t\t\t\tcount += month2[i];\n\t\t\t\t\tcount += endDay;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (i = 1; i <= endMonth - 1; i++)\n\t\t\t\t\t\tcount += month1[i];\n\t\t\t\t\tcount += endDay;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))\n\t\t\t\t{\n\t\t\t\t\tcount += 366;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcount += 365;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcout << count;\n\treturn 0;\n}"} +{"label": "80", "index": "39735", "code": "\nint main()\n{\n\tint year1, month1, day1;\n\tint year2, month2, day2;\n\tint total=0;\n\t\n\tscanf(\"%d%d%d%d%d%d\",&year1,&month1,&day1,&year2,&month2,&day2);\n\t\n\tfor (; ; ) {\n\t\tif (year1 == year2 && month1 == month2 && day1 == day2) {\n\t\t\tbreak;\n\t\t}\n\t\telse {\n\t\t\tif (day1 == 31) {\n\t\t\t\tif (month1 == 1 || month1 == 3 || month1 == 5 || month1 == 7 || month1 == 8 || month1 == 10) {\n\t\t\t\t\tmonth1 ++;\n\t\t\t\t\tday1 = 0;\n\t\t\t\t}\n\t\t\t\telse if (month1 == 12) {\n\t\t\t\t\tday1 = 0;\n\t\t\t\t\tmonth1 = 1;\n\t\t\t\t\tyear1 ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(day1 == 30){\n\t\t\t\tif(month1 == 4 || month1 == 6 || month1 == 9 || month1 == 11) {\n\t\t\t\t\tmonth1 ++;\n\t\t\t\t\tday1 = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(day1 == 28) {\n\t\t\t\tif (month1 == 2) {\n\t\t\t\t\tif ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0)) {\n\t\t\t\t\t\tday1 = 0;\n\t\t\t\t\t\tmonth1 ++;\n\t\t\t\t\t\ttotal ++;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tday1 = 0;\n\t\t\t\t\t\tmonth1 ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttotal ++;\n\t\tday1 ++;\n\t}\n\tprintf(\"%d\",total);\n\treturn 0;\n}"} +{"label": "80", "index": "39736", "code": "int main()\n{\nint days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint y1,m1,d1,y2,m2,d2,i,j,c1,c2,year,n,run,h,sum;\nyear=365;\nscanf(\"%d%d%d\\n%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\nif(y2>y1)\n{\nif((y1% 4 == 0 && y1% 100 != 0) || (y1% 400 == 0))\n{\ndays[2]++;\nyear++;\n}\nc1=d1;\nfor(i=1;iyear[0]&&i>a>>b>>c>>d>>e>>f;\n\tint t[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??????\n\tfor(i=1;i<=a-1;i++)\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))//???366,??+365\n\t\t\tn1=n1+366;\n\t\telse n1=n1+365;\n\tfor(i=1;i<=d-1;i++)\n\t\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\tn2=n2+366;\n\t\t\telse n2=n2+365;\n\tfor(i=1;i<=b-1;i++)\n\t\tn1=n1+t[i];\n\tfor(i=1;i<=e-1;i++)\n\t\tn2=n2+t[i];\n\tif(((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0))&&(b>2))//????+1\n\t\tn1++;\n\tif(((d % 4 == 0 && d % 100 != 0) || (d % 400 == 0))&&(e>2))\n n2++;\n\tcout<b[1]-2;i--)\n\tsum[1]+=m[i];\n sum[1]=sum[1]-c[1];\n num=total-sum[0]-sum[1];\n printf(\"%d\\n\",num);\n}\n"} +{"label": "80", "index": "39741", "code": "int main()\n{\n int sY,sM,sD,eY,eM,eD,sN,eN,N,num(int Y,int M,int D);\n scanf(\"%d%d%d\\n%d%d%d\",&sY,&sM,&sD,&eY,&eM,&eD);\n sN=num(sY,sM,sD);\n eN=num(eY,eM,eD);\n N=eN-sN;\n printf(\"%d\",N);\n return 0;\n}\n\nint num(int Y,int M,int D)\n{\n int N,a,M1,Y1;\n M1=M-1;\n Y1=Y-1;\n if(M1==1||M1==5||M1==6)\n a=1;\n else if(M1==2)\n a=-1;\n else if(M1==3||M1==4||M1==0)\n a=0;\n else if(M1==7)\n a=2;\n else if(M1==8||M1==9)\n a=3;\n else if(M1==10||M1==11)\n a=4;\n N=365*Y1+Y1/4-Y1/100+Y1/400+30*M1+a+D;\n if(((Y%4==0&&Y%100!=0)||(Y%400==0))&&M>2)\n N=N+1;\n return(N);\n}"} +{"label": "80", "index": "39742", "code": "int main()\n{\n\tint year1,m1,d1,year2,m2,d2,i,sum=0,sum1=0,sum2=0;\n\tint mm1[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint mm2[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>year1>>m1>>d1;\n\tcin>>year2>>m2>>d2;\n\tfor(i=year1;i2)\n\t\t\tall3++;\n\t}\n\n\tfor(m=1;m2)\n\t\t\tall3++;\n\t}\n\n\tall=all2+all3-all1;\n\n\tprintf(\"%d\",all);\n}"} +{"label": "80", "index": "39744", "code": "\nint main()\n{\n\tint y1,m1,d1,y2,m2,d2,a,i,gap,y;\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\t\n\t\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tgap=0;\n\n\tif(y1>y2){\n\t\ta=y1;\n\t\ty1=y2;\n\t\ty2=a;\n\t}\n\n\tfor(y=y1;y<=y2;y++)\n\t{\n\t\tif(y%400==0||(y%100!=0&&y%4==0))\n\t\t{\n\t\t\tgap+=366;\n\t\t}else{\n\t\t\tgap+=365;\n\t\t}\n\t}\n\n\tif(y1%400==0||(y1%100!=0&&y1%4==0))\n\t{\n\t\tmonth[2]=29;\n\t}\n\tfor(i=1;i>y1>>m1>>d1>>y2>>m2>>d2;\n\twhile(y2-y1>=2)\n\t{\n\t\tctr+=365;\n\t\tif(((m1==1 || (m1==2 && d1<=28)) && ((y1%4==0 && y1%100!=0) || (y1%400==0)))\n\t\t\t|| (m1>=3 && (((y1+1)%4==0 && (y1+1)%100!=0) || ((y1+1)%400==0)) ))\n\t\t\tctr++;\n\t\ty1++;\n\t}\n\tif(y2-y1==1)\n\t{\n\t\twhile(m1!=13)\n\t\t{\n\t\t\tctr+=x[m1];\n\t\t\tif(m1==2 && ((y1%4==0 && y1%100!=0) || (y1%400==0)))\n\t\t\t\tctr++;\n\t\t\tm1++;\n\t\t}\n\t\tm1=1;y1++;\n\t}\n\twhile(m1!=m2)\n\t{\n\t\tctr+=x[m1];\n\t\tif(m1==2 && ((y1%4==0 && y1%100!=0) || (y1%400==0)))\n\t\t\tctr++;\n\t\tm1++;\n\t}\n\tctr+=d2-d1;\n\tcout<0?(total2-total1): (total1-total2);\n\tprintf(\"%d\",tianshu);\n\treturn 0;\n}\n\tint R( int year)\n\t{\n\t\tint result;\n\t\tif(year%400==0||(year%4)==0&&year%100!=0)\n\t\t{\n\t\t\tresult=1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult=0;\n\t\t}\n\t\treturn result;\n\t}\n"} +{"label": "80", "index": "39749", "code": "\nint main()\n{\n\tint starty,startm,startd;\n\tint endy,endm,endd;\n\tint days=0;\n\tint i;\n\n\tcin>>starty>>startm>>startd;\n\tcin>>endy>>endm>>endd;\n\n\tif(starty!=endy)\n\t{\n\tfor(i=starty+1;i>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\n\tint runmonth[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tint pinmonth[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif (startYear==endYear)\n\t{\n\t\tif(startYear%4==0&&startYear%100!=0||startYear%400==0)\n\t\t{\n\t\t\tif(startMonth==endMonth)\n\t\t\t\tsum=sum+endDay-startDay;\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=startMonth+1;i=b;r--)\n\t{\tif((r%2==0)&&(r>7))\n\tsum=sum+31;\n\telse if((r%2==1)&&(r>7))\n\t\tsum=sum+30;\n\telse if((r%2==1)&&(r<8))\n\t\tsum=sum+31;\n\telse if(((r%2==0)&&(r<8))&&(r!=2))\n\t\tsum=sum+30;\n\telse if((r==2)&&((x%4==0&&x%100!=0)||(x%400==0)))\n\t\tsum=sum+29;\n\telse if((r==2)&&(x%4!=0||(x%100==0&&x%400!=0)))//??\n\t\tsum=sum+28;\n\tsum=sum-c+z;\n\tprintf(\"%d\",sum);\n\n\t}}}\n\t//???\n\telse\n\t{\n\t\tk=a+1;\n\t\tfor(k=k;k<=p;k++)//??\n\t{if((k%4==0&&k%100!=0)||(k%400==0))\n\t sum=sum+366;\n\telse sum=sum+365;\n\t};\n\t\n\tfor(q=12;q>=b;q--)\n\t{\n\t\tif((q%2==0)&&(q>7))\n\tsum=sum+31;\n\telse if((q%2==1)&&(q>7))\n\t\tsum=sum+30;\n\telse if((q%2==1)&&(q<8))\n\t\tsum=sum+31;\n\telse if(((q%2==0)&&(q<8))&&(q!=2))\n\t\tsum=sum+30;\n\telse if((q==2)&&((a%4==0&&a%100!=0)||(a%400==0)))\n\t\tsum=sum+29;\n\telse if((q==2)&&(a%4!=0||(a%100==0&&a%400!=0)))//??\n\t\tsum=sum+28;\n\t}\n\tsum=sum-c;//????\n\tfor(w=1;w7))\n\tsum=sum+31;\n\telse if((w%2==1)&&(w>7))\n\t\tsum=sum+30;\n\telse if((w%2==1)&&(w<8))\n\t\tsum=sum+31;\n\telse if(((w%2==0)&&(w<8))&&(w!=2))\n\t\tsum=sum+30;\n\telse if((w==2)&&((x%4==0&&x%100!=0)||(x%400==0)))\n\t\tsum=sum+29;\n\telse if((w==2)&&(x%4!=0||(x%100==0&&x%400!=0)))//??\n\t\tsum=sum+28;\n\t}\n\tsum=sum+z;\n\tprintf(\"%d\",sum);}\n\treturn 0;\n}\n\n\n"} +{"label": "80", "index": "39753", "code": "main()\n{\n\tint runnian(int year);\n\tint tianshu(int moon, int yy);\n\n\tint y1,y2,m1,m2,d1,d2,days,i,j;\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tdays=0;\n for (i=y1;i> year[i] >> month[i] >> day[i];\n\n\tint sum = 0;\n\n\tfor(i = year[0] + 1; i < year[1]; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\t}\n\n\tfor(j = month[0]; j <= 12; j++)\n\t{\n\t\tif(j == 1 || j == 3 || j == 5 || j == 7 || j == 8 || j == 10 || j == 12)\n\t\t\tsum += 31;\n\t\telse if(j == 2)\n\t\t{\n\t\t\tif((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))\n\t\t\t\tsum += 29;\n\t\t\telse\n\t\t\t\tsum += 28;\n\t\t}\n\t\telse\n\t\t\tsum += 30;\n\t}\n\n\tfor(j = 1; j < month[1]; j++)\n\t{\n\t\tif(j == 1 || j == 3 || j == 5 || j == 7|| j == 8 || j == 10 || j == 12)\n\t\t\tsum += 31;\n\t\telse if(j == 2)\n\t\t{\n\t\t\tif((year[1] % 4 == 0 && year[1] % 100 != 0) || (year[1] % 400 == 0))\n\t\t\t\tsum += 29;\n\t\t\telse\n\t\t\t\tsum += 28;\n\t\t}\n\t\telse\n\t\t\tsum += 30;\n\t}\n\n\tsum = sum - day[0] + day[1];\n\tif(year[1] == year[0])\n\t{\n\t\tif((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))\n\t\t\tsum -= 366;\n\t\telse\n\t\t\tsum -= 365;\n\t}\n\n\tcout << sum << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39755", "code": "int month1[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};\nint month2[12] = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};\nint main()\n{\n\tint y1, y2, m1, m2, d1, d2, sum = 0, i;\n\tcin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tfor(i = y1; i < y2; i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\t}\n if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n\t sum += month2[m2 - 1] - month2[m1 - 1];\n\telse\n\t\tsum += month1[m2 - 1] - month1[m1 - 1];\n\tsum += d2 - d1;\n\tcout << sum;\n\treturn 0;\n}"} +{"label": "80", "index": "39756", "code": "\nstruct d\n{int y,m,d;};\n\nlong days(struct d d1,struct d d2)\n{\nint mon[2][13]= {{0,31,28,31,30,31,30,31,31,30,31,30,31},\n{0,31,29,31,30,31,30,31,31,30,31,30,31}};\n\nint i; long td=0;\nfor(i=d1.y;i=1)\n{ if(a[0][0]%4==0&&a[0][0]%100!=0||a[0][0]%400==0)\n{ sum=sum+1;\n for(i=a[0][1];i<13;i++)\n {\n\t sum=sum+days[i];\n }\n sum=sum-a[0][2];\n}\n else{\n for(i=a[0][1];i<13;i++)\n {\n\t sum=sum+days[i];\n }\n sum=sum-a[0][2];\n}\n\nfor(i=a[0][0]+1;i<=a[1][0]-1;i++)\n{if(i%4==0&&i%100!=0||i%400==0)\n\t sum=sum+366;\n else\n\t sum=sum+365;\n}\n if(a[1][0]%4==0&&a[1][0]%100!=0||a[1][0]%400==0)\n{ sum=sum+1;\n for(i=0;i=2&&((year2%4==0&&year2%100!=0)||(year2%400==0)))\n\t{\n\t\tsum++;\n\t}\n\tfor(i=year1+1;i<=year2-1;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t{\n\t\t\tsum+=366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum+=365;\n\t\t}\n\t}\n\tif(year1!=year2)\n\t{\n\t}\n\telse\n\t{\n\t\tsum-=365;\n\t}\n\tprintf(\"%d\",sum);\n\treturn 0;\n}\n\t\t\n"} +{"label": "80", "index": "39759", "code": "int leap(int);\nint main()\n{\n\tint total[13]={0,31,59,90,120,151,181,212,243,273,304,334,365};\n\tint y1,y2,m1,m2,d1,d2;\n\tint sum=0,j;\n\tscanf(\"%d %d %d %d %d %d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\t/*??????????????2????*/ \n\tif (y1==y2){\n\t \t if (leap(y1)==0) \n\t\t\t sum+=total[m2-1]-total[m1-1]+d2-d1;\n\t \t if (leap(y1)==1&&m2>2) \n\t\t\t sum+=total[m2-1]-total[m1-1]+d2-d1+1; \n\t}\n\t/*?????????????????????2???*/ \n\tif (y2>y1){\n for(j=y1+1;j2) \n\t sum+=total[m2-1]+d2+1;\n\t} \n\tprintf(\"%d\",sum);\n}\n\nint leap(int y){\n\tint j;\n\tif (y%400==0 || y%100!=0 && y%4 == 0) j=1;\n\telse j=0;\n\treturn j;\n}"} +{"label": "80", "index": "39760", "code": "/*\n * bla.cpp\n *\n * Created on: 2012-11-4\n * Author: Administrator\n */\n\nint main()\n{\n\tint a,b,c,d,e,f;\n\tcin>>a>>b>>c>>d>>e>>f;\n\tint i,cot=0,x,y;\n\tfor(i=a;i2)\n\t\t{\n\t\t\tif(b%2!=0) x=c+(b-3)/2*61+31+29;\n\t\t\tif(b%2==0) x=c+(b-4)/2*61+31+29+31;\n\t\t}\n\t\tif(b==2) x=c+31;\n\t\tif(b==1) x=c;\n\t\tif(e>2)\n\t\t\t\t{\n\t\t\t\t\tif(e%2!=0) y=f+(e-3)/2*61+31+29;\n\t\t\t\t\tif(e%2==0) y=f+(e-4)/2*61+31+29+31;\n\t\t\t\t}\n\t\t\t\tif(e==2) y=f+31;\n\t\t\t\tif(e==1) y=f;\n\t}\n\telse\n\t{\n\t\t\tif(b>2)\n\t\t\t{\n\t\t\t\tif(b%2!=0) x=c+(b-3)/2*61+31+28;\n\t\t\t\tif(b%2==0) x=c+(b-4)/2*61+31+28+31;\n\t\t\t}\n\t\t\tif(b==2) x=c+31;\n\t\t\tif(b==1) x=c;\n\t\t\tif(e>2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(e%2!=0) y=f+(e-3)/2*61+31+28;\n\t\t\t\t\t\tif(e%2==0) y=f+(e-4)/2*61+31+28+31;\n\t\t\t\t\t}\n\t\t\t\t\tif(e==2) y=f+31;\n\t\t\t\t\tif(e==1) y=f;\n\t\t}\n\tif(a==1886) y++;\n\tcot=cot+y-x;\n\tcout<>year>>month>>day;\n\t\ttotal[j]=0;\n\t\tfor(int i=1;i2)\n\t\t\t\t\t{\n\t\t\t\t\t\ttotal[j]++;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n\tcout<>STARTyear>>STARTmonth>>STARTday\n\t\t>>ENDyear>>ENDmonth>>ENDday;\n\tif( (STARTyear % 4 == 0 && STARTyear % 100 != 0) || (STARTyear % 400 == 0) )\n\t{\n\t\tSTARTdate=Ryear[STARTmonth-1]+STARTday-1;\n\t}\n\telse\n\t{\n\t\tSTARTdate=Pyear[STARTmonth-1]+STARTday-1;\n\t}\n\tif( (ENDyear % 4 == 0 && ENDyear % 100 != 0) || (ENDyear % 400 == 0) )\n\t{\n\t\tENDdate=Ryear[ENDmonth-1]+ENDday-1;\n\t}\n\telse\n\t{\n\t\tENDdate=Pyear[ENDmonth-1]+ENDday-1;\n\t}\n\tfor( i=1 ; i<401 ; i++ )\n\t{\n\t\tif( i%4!=0 || ( i%100==0 && i%400!=0 ) )\n\t\t{\n\t\t\tdisyear[i+1]=disyear[i]+365;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdisyear[i+1]=disyear[i]+366;\n\t\t}\n\t}\n\t\n\tfor( i=1 ; i<401 ; i++ )\n\t{\n\t\tif( STARTyear%400==i%400 )\n\t\t{\n\t\t\tSTARTdate+=disyear[401]*( (STARTyear-i)/400 )+disyear[i];\n\t\t}\n\t\tif( ENDyear%400==i%400 )\n\t\t{\n\t\t\tENDdate+=disyear[401]*( (ENDyear-i)/400 )+disyear[i];\n\t\t}\n\t}\n\tdate=ENDdate-STARTdate;\n\tcout<2) days=days+1;\n\tfor(month=1;month>y1>>m1>>d1>>y2>>m2>>d2;\n\tint mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint sum=0;\n\tsum+=d2-d1;\n\tif(m2>=m1){\n\t\tfor(int i=0;i<12;i++)\n\t\t\tif((i+1>=m1)&&(i+1=m2&&i+12)sum--;\n\tif(((y2%4==0&&y2%100!=0)||(y2%400==0))&&m2<=2)sum--;\n\tcout<2)||(endmonth==2&&endday==29)))\n\t{\n\t\tfor(i=startmonth+1,k=m[startmonth]-startday+endday+1;i<=12;i++)\n\t\t{k=k+m[i];}\n\t\tfor(j=endmonth-1;j>=1;j--)\n\t\t{k=k+m[j];}\n\t\tfor(i=startyear+1;i<=endyear-1;i++)\n\t\t{\n\t\t\tk=k+y[i];\n\t\t}\n\t}\n\telse if(startyear!=endyear&&startmonth==endmonth&&startday==endday)\n\t{\n\t\tfor(i=startyear,k=0;i=1;j--)\n\t\t{k=k+m[j];}\n\t\tfor(i=startyear+1;i<=endyear-1;i++)\n\t\t{\n\t\t\tk=k+y[i];\n\t\t}\n\t}\n\tprintf(\"%d\",k);\n\treturn 0;\n}"} +{"label": "80", "index": "39768", "code": "const int day1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nconst int day2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\nint main()\n{\n\tint i, y1, y2, m1, m2, d1, d2, ans=0;\n\tcin >> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tfor (i=y1; i<=y2-1; i++)\n\t\tif (((i%4==0)&&(i%100!=0))||(i%400==0))\n\t\t\tans=ans+366;\n\t\telse\n\t\t\tans=ans+365;\n\tfor (i=1; i2)\n\t\t l1+=1;\n\t } \n\n for(i=1;i2)\n\t\t l2+=1;\n\t }\n\n\t if(y1!=y2)\n\t {\n for(j=y1;jy2)\n\t\t{\n temp=y1;\n\t\t\ty1=y2;\n\t\t\ty2=temp;\n\t\t\ttemp=m1;\n\t\t\tm1=m2;\n\t\t\tm2=temp;\n\t\t\ttemp=d1;\n\t\t\td1=d2;\n\t\t\td2=temp;\n\t\t}\n\t\tif(run(y1)==1)\n\t\t\ta=366-a;\n\t\telse\n\t\t\ta=365-a;\n\t\tfor(i=y1+1;ie)\n\t{\n\t\tfor(i=e;i>sy>>sm>>sd>>ey>>em>>ed;\n}\nint isrun(int year)\n{\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\nvoid cacul()\n{\n\tif(ey>sy)\n\t{\n\tif(isrun(sy)==1)\n\t{\n\t\tfor(i=sm+1;i<14;i++)\n\t\t{\n\t\t\tsum[1]=sum[1]+rmonth[i];\n\t\t}\n\t\tsum[2]=rmonth[sm]-sd+1;\n\t}\n\tif(isrun(sy)==0)\n\t{\n\t\tfor(i=sm+1;i<14;i++)\n\t\t{\n\t\t\tsum[1]=sum[1]+pmonth[i];\n\t\t}\n\t\tsum[2]=pmonth[sm]-sd+1;\n\t}\n\tif(isrun(ey)==1)\n\t{\n\t\tfor(i=0;i1)\n\t{\n\t\tfor(i=sy+1;i>by>>bm>>bd>>ey>>em>>ed;\n\tfor(i=by;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n for(i=y1;i>year[0]>>month[0]>>day[0]>>year[1]>>month[1]>>day[1];\n\tint leap_year[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31}; //?????????????\n\tfor(i=year[0]+1;i> year1 >> m1 >> d1;\n\tcin >> year2 >> m2 >> d2;\n\tleap1 = (year1 % 4 == 0&&year1 % 100 != 0)||(year1 % 400 == 0);\n\tleap2 = (year2 % 4 == 0&&year2 % 100 != 0)||(year2 % 400 == 0);\n\tdate1 = month[leap1][m1] + d1;\n\tdate2 = month[leap2][m2] + d2;\n\tfor(i = year1; i < year2; i++)\n\t{\n\t\tleap2 = (i % 4 == 0&&i % 100 != 0)||i % 400 == 0;\n\t\tdate2 = 365 + leap2 + date2;\n\t}\n\tcout << date2 - date1;\n\treturn 0;\n}"} +{"label": "80", "index": "39786", "code": "void main()\n{\n\tint year(int x);\n\tint diy(int x,int y,int z);\n\tint a,b,c,d,e,f,y1,y2,an;\nscanf(\"%d %d %d\",&a,&b,&c);\nscanf(\"%d %d %d\",&d,&e,&f);\ny1=year(a)+diy(a,b,c);\ny2=year(d)+diy(d,e,f);\nan=y2-y1;\nprintf(\"%d\\n\",an);\n}\nint year(int x)\n{\n\tint ay,by;\n\tay=(x-1)/4-(x-1)/100+(x-1)/400;\n\tby=365*(x-1)+ay;\n\treturn(by);\n}\nint diy(int x,int y,int z)\n{\n\tint day=0,c,i,a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tif((x%4==0&&x%100!=0)||(x%400==0))c=1;else c=0;\n\ta[1]=a[1]+c;\n\tif(y==1)day=z;\n\telse\n\t{\n\t\tfor(i=0;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint sum=0,n=0;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(int i=y1+1;i2))sum++;\n\t}\n\telse if(y1!=y2){\n\t\tfor(int i=m1+1;i<=12;i++)\n\t\t\tsum=sum+a[i];\n\t\tfor(int i=1;i2)sum++;\n\t\tsum=sum+365*(y2-y1-1)+n;\n\t}\n\tcout<2)) a+=1;\n\tprintf(\"%d\",a);\n }\n\telse{\n\t\tif(Ori[0][1]!=Ori[1][1]){\n\t\t\tfor(m=1;m<=12;m++){\n\t\t\t\tif(m==em&&m2)) a-=1;\n\tprintf(\"%d\",a);\n\t}\n return 0;\n}\n"} +{"label": "80", "index": "39789", "code": "int main()\n{\n\tint i,j,year[2],month[2],day[2];\n\tint mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=0;i<2;i++)\n\t\tcin>>year[i]>>month[i]>>day[i];\n\tint sum=0;\n\tfor(i=year[0];i2)sum++;\n\tif((year[0]%4==0&&year[0]%100!=0||year[0]%400==0)&&month[0]>2)sum--;\n\tcout<> a1 >> b1 >> c1 >> a2 >> b2 >> c2;\n\tint i;\n\tif((a2 % 4 == 0 && a2 % 100 != 0) || a2 % 400 == 0)\n\tm[2] = 29;\n\tsum += suan(b2, c2);\n\tm[2] = 28;\n\tif((a1 % 4 == 0 && a1 % 100 != 0) || a1 % 400 == 0)\n\tm[2] = 29;\n\tsum -= suan(b1, c1);\n\tif(a1 == a2)\n\t\tcout << sum;\n\telse\n\t{\n\t\tfor(i = a1; i < a2; i++)\n\t\t{\n\t\t\tif((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\t\tsum += 366;\n\t\t\telse\n\t\t\t\tsum +=365;\n\t\t}\n\t\tcout << sum;\n\t}\n\treturn 0;\n}"} +{"label": "80", "index": "39791", "code": "int main()\n{\n\tint f1(int,int,int);\n\tint f2(int,int);\n\tint y1,y2,m1,m2,d1,d2,s;\n\tscanf(\"%d%d%d%d%d%d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\ts=f1(y2,m2,d2)-f1(y1,m1,d1)+f2(y1,y2);\n\tprintf(\"%d\",s);\n}\nint f1(int y,int m,int d)\n{\n\tint a,b,f;\n\ta=(y%4==0&&y%100!=0)||(y%400==0);\n\tb=(m>2);\n\tif(m==1) f=d-1;\n\tif(m==2) f=d+30;\n\tif(m==3) f=d+58;\n\tif(m==4) f=d+89;\t\n\tif(m==5) f=d+119;\n\tif(m==6) f=d+150;\n\tif(m==7) f=d+180;\n\tif(m==8) f=d+211;\n\tif(m==9) f=d+242;\n\tif(m==10) f=d+272;\n\tif(m==11) f=d+303;\n\tif(m==12)f=d+333;\n\tf=f+a*b;\n return f;\n}\nint f2(int year1,int year2)\n{\n\tint f=0,i;\n\tfor(i=year1;i>y1>>m1>>d1;\n cin>>y2>>m2>>d2;\n\n if((y1%4==0)&&(y1%100!=0)||(y1%400==0))\n {switch(m1)\n {\n case 1:t1=d1;break;\n case 2:t1=31+d1;break;\n case 3:t1=59+d1+1;break;\n case 4:t1=90+d1+1;break;\n case 5:t1=120+d1+1;break;\n case 6:t1=151+d1+1;break;\n case 7:t1=181+d1+1;break;\n case 8:t1=212+d1+1;break;\n case 9:t1=243+d1+1;break;\n case 10:t1=273+d1+1;break;\n case 11:t1=304+d1+1;break;\n case 12:t1=334+d1+1;break;\n }\n t1=366-t1;}\n else\n {switch(m1)\n {\n case 1:t1=d1;break;\n case 2:t1=31+d1;break;\n case 3:t1=59+d1;break;\n case 4:t1=90+d1;break;\n case 5:t1=120+d1;break;\n case 6:t1=151+d1;break;\n case 7:t1=181+d1;break;\n case 8:t1=212+d1;break;\n case 9:t1=243+d1;break;\n case 10:t1=273+d1;break;\n case 11:t1=304+d1;break;\n case 12:t1=334+d1;break;\n }\n t1=365-t1;}\n\n if((y2%4==0)&&(y2%100!=0)||(y2%400==0))\n {switch(m2)\n {\n case 1:t2=d1;break;\n case 2:t2=31+d2;break;\n case 3:t2=59+d2+1;break;\n case 4:t2=90+d2+1;break;\n case 5:t2=120+d2+1;break;\n case 6:t2=151+d2+1;break;\n case 7:t2=181+d2+1;break;\n case 8:t2=212+d2+1;break;\n case 9:t2=243+d2+1;break;\n case 10:t2=273+d2+1;break;\n case 11:t2=304+d2+1;break;\n case 12:t2=334+d2+1;break;\n }}\n else\n {switch(m2)\n {\n case 1:t2=d2;break;\n case 2:t2=31+d2;break;\n case 3:t2=59+d2;break;\n case 4:t2=90+d2;break;\n case 5:t2=120+d2;break;\n case 6:t2=151+d2;break;\n case 7:t2=181+d2;break;\n case 8:t2=212+d2;break;\n case 9:t2=243+d2;break;\n case 10:t2=273+d2;break;\n case 11:t2=304+d2;break;\n case 12:t2=334+d2;break;\n }}\n if(y1==y2) p=0;\n else if(y1+1==y2) p=0;\n else\n {for(i=y1+1;i>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\tfor(i=year1;im2)\n {\n m1=m1-1;\n for(;m1>=m2;m1--)\n {\n switch(m1)\n {\n case 1:\n case 3:\n case 5:\n case 7:\n case 8:\n case 10:\n case 12:month=31;break;\n case 4:\n case 6:\n case 9:\n case 11:month=30;break;\n case 2:\n {\n if(y2%4==0&&y2%400!=0||y2%400==0)month=28;\n else month=29;\n }\n }\n sum=sum-month;\n }\n }\n else if(m1=a[0])\n\t\tt=t+year(a,b);\n\telse t=-1000;\n\tif(b[1]>a[1])\n\t\tt=t+month(a,b);\n\telse t=t-month(a,b);\n\tt=t+b[2]-a[2];\n\tif(t<0)\n\t\tprintf(\"wrong input\");\n\telse printf(\"%d\",t);\n}\nint year(int a[],int b[])\n{\n\tint i,m;\n\tm=0;\n\tfor(i=a[0];ib[1])? a[1]:b[1];\n\ty=(a[1]2)\n\t\t\tif(((b[0]%4==0)&&(b[0]%100!=0))||(b[0]%400==0))\n\t\t\t\tm++;\n\t\treturn (m);\n}"} +{"label": "80", "index": "39797", "code": "int tian(int, int, int);\nint g_a[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\nint g_b[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\nint main()\n{\n\tint y1, y2, m1, m2, d1, d2;\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\t\n\tint sum1 = 0, sum2 = 0;\n\tsum1 = tian(y1, m1, d1);\n\tsum2 = tian(y2, m2, d2);\n\tcout<> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n int ans=0;\n while(y1!=y2 || m1!=m2 || d1!=d2)\n {\n ans++;\n d1++;\n int leapyear=((y1%4==0&&y1%100!=0) || y1%400==0);\n if(d1>month[leapyear][m1-1])\n { d1=1; m1++;}\n if(m1>12) \n { m1=1;y1++;}\n }\n cout<> year1 >>month1 >> day1 >> year2 >> month2 >> day2;\n\twhile (year1!=year2)\n\t{\n\t\tif( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t\t\tDay[1]=29;\n\t\tdays+=Day[month1-1];\n\t\tmonth1++;\n\t\tif (month1==13)\n\t\t{\n\t\t\tyear1++;\n\t\t\tmonth1=1;\n\t\t\tDay[1]=28;\n\t\t}\n\t}\n\twhile (month1!=month2)\n\t{\n\t\tif( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t\t\tDay[1]=29;\n\t\tdays+=Day[month1-1];\n\t\tmonth1++;\n\t}\n\tdays+=day2;\n\tdays-=day1;\n\tcout << days << endl;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39800", "code": "int RY(int year)\n{\n\tint k;\n\tif (year%4==0)\n\t{\n\t\tif (year%100==0)\n\t\t{\n\t\tif (year%400==0) k=1;\n\t\telse k=0;\n\t\t}\n\t\telse k=1;\n\t}\n\telse k=0;\n\treturn (k);\n}\nint NO(int a,int b,int c)\n{\n\tint NO,i,j;\n\tNO=0;\n\tfor(i=0;i2) \n { \n days1++;\n } \n days1 += date1.day;\n \n if(date1.year<=date2.year)\n {\n for(i=date1.year;i2) \n { \n days2 ++;\n } \n days2 += date2.day;\n\n days=abs(days2-days1);\n \n printf(\"%d\\n\",days); \n return 0;\n}"} +{"label": "80", "index": "39803", "code": "int leap(int a)\n{\n\tif ((a%4==0&&a%100!= 0)||(a%400==0))\n\t\treturn 1;\n\telse \n\t\treturn 0;\n}\nint year[2]={365,366};\nint month [2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\nint main()\n{\n\tint y1,m1,d1;\n\tcin>>y1>>m1>>d1;\n\tint y2,m2,d2;\n\tcin>>y2>>m2>>d2;\n\tint day=0,i;\n\tfor (i=y1+1;i> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tfor (i = y1; i < y2; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t{\n\t\t\tsum += 366;\n\t\t}\n\t\telse\n\t\t\tsum += 365;\n\t\t//cout << i << endl;\n\t}\n\t//cout << sum << endl;\n\tif ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t{\n\t\tfor (j = 1; j < m1; j++)\n\t\t{\n\t\t\tsum -= u1[j];\n\t\t}\n\t\tsum -= d1;\n\t}\n\telse\n\t{\n\t\tfor (j = 1; j < m1; j++)\n\t\t{\n\t\t\tsum -= u2[j];\n\t\t}\n\t\tsum -= d1;\n\t}//cout << sum << endl;\n\tif ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n\t{\n\t\tfor (j = 1; j < m2; j++)\n\t\t{\n\t\t\tsum += u1[j];\n\t\t}\n\t\tsum += d2;\n\t}\n\telse\n\t{\n\t\tfor (j = 1; j < m2; j++)\n\t\t{\n\t\t\tsum += u2[j];\n\t\t}\n\t\tsum += d2;\n\t}\n\n\tcout << sum << endl;\nreturn 0;\n}"} +{"label": "80", "index": "39805", "code": "int f(int year,int month,int day)\n{ int days=0;\n int i;\n for(i=1;i>year1>>month1>>day1;\n int year2,month2,day2;\n cin>>year2>>month2>>day2;\n int days1=f(year1,month1,day1);\n int days2=f(year2,month2,day2);\n int days=days2-days1;\n cout<>styear>>stmonth>>stday;\n\tcin>>enyear>>enmonth>>enday;\n\tif(styear==enyear)\n\t{\n\t if(stmonth==enmonth)\n\t\t\tsum=enday-stday;\n\t\telse\n\t\t\tfor(j=stmonth;j<=enmonth;j++)\n\t\t\t\t{\n\t\t\t\t\tif(j==stmonth)\n\t\t\t\t\tsum=sum+yearmonth[(styear % 4 == 0 && styear % 100 != 0) || (styear % 400 == 0)][j]-stday;\n\t\t\t\t\telse if(j==enmonth)\n\t\t\t\t\t\tsum=sum+enday;\n\t\t\t\t\telse\n\t\t\t\t\t\tsum=sum+yearmonth[(styear % 4 == 0 && styear % 100 != 0) || (styear % 400 == 0)][j];\n\t\t\t}\n\t}\n\telse\n\t{\n\t\tfor(j=stmonth;j<=12;j++)\n\t\t{\n\t\t\tif(j==stmonth)\n\t\t\t\t\tsum=sum+yearmonth[(styear % 4 == 0 && styear % 100 != 0) || (styear % 400 == 0)][j]-stday;\n\t\t\telse\n\t\t\t\t\tsum=sum+yearmonth[(styear % 4 == 0 && styear % 100 != 0) || (styear % 400 == 0)][j];\n\t\t}\n\t\tstyear++;\n\t\twhile(styear> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tif (y1 == y2 && m1 == m2)\n\t{\n\t\tcout << d2 - d1 << endl;\n\t\treturn 1;\n\t}\n\telse if (y1 == y2)\n\t{\n\t\tif ((y1 % 4 == 0 && y1 % 100 != 0) || y1 % 400 == 0)\n\t\t\tmonth[2] = 29;\n\t\telse\n\t\t\tmonth[2] = 28;\n\t\tsum += month[m1] - d1;\n\t\tif (m2 == m1 + 1)\n\t\t\tsum += d2;\n\t\telse\n\t\t{\n\t\t\tfor (i = m1 + 1; i < m2; i++)\n\t\t\t\tsum += month[i];\n\t\t\tsum += d2;\n\t\t}\n\t\tcout << sum << endl;\n\t}\n\telse\n\t{\n\t\tfor (i = y1; i <= y2; i++)\n\t\t{\n\t\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\t\tmonth[2] = 29;\n\t\t\telse\n\t\t\t\tmonth[2] = 28;\n\t\t\tif (i == y1)\n\t\t\t{\n\t\t\t\tfor (j = m1; j <= 12; j++)\n\t\t\t\t{\n\t\t\t\t\tif (j == m1)\n\t\t\t\t\t\tsum += month[m1] - d1;\n\t\t\t\t\telse\n\t\t\t\t\t\tsum += month[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (i == y2)\n\t\t\t{\n\t\t\t\tfor (j = 1; j <= m2; j++)\n\t\t\t\t{\n\t\t\t\t\tif (j != m2)\n\t\t\t\t\t\tsum += month[j];\n\t\t\t\t\telse\n\t\t\t\t\t\tsum += d2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\t\t\tsum += 366;\n\t\t\t\telse\n\t\t\t\t\tsum += 365;\n\t\t\t}\n\t\t}\n\t\tcout << sum << endl;\n\t}\n\treturn 0;\n}"} +{"label": "80", "index": "39812", "code": "int dayfr(int m,int d)\n{\nint t;\nint a[12]={31,28,31,30,31,30,31,31,30,31,30,31};\nt=a[m-1]-d;\nfor (m=m+1;m<=12;m++)\n{\nt=t+a[m-1];\n}\nreturn (t);\n}\nint dayr(int m,int d)\n{\nint t;\nint a[12]={31,29,31,30,31,30,31,31,30,31,30,31};\nt=a[m-1]-d;\nfor (m=m+1;m<=12;m++)\n{\nt=t+a[m-1];\n}\nreturn (t);\n}\nvoid main()\n{\n int y1,m1,d1,y2,m2,d2,year,t;\n scanf (\"%d%d%d\",&y1,&m1,&d1);\n scanf (\"%d%d%d\",&y2,&m2,&d2);\n year=y1;\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n t=dayr(m1,d1);\n else t=dayfr(m1,d1);\n for (year=y1+1;year<=y2;year++)\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n t=t+dayr(1,1)+1;\n else t=t+dayfr(1,1)+1;\n year=y2;\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n t=t-dayr(m2,d2);\n else t=t-dayfr(m2,d2); \n printf (\"%d\",t);\n}"} +{"label": "80", "index": "39813", "code": "void main()\n{\n\tint nian(int a,int b);\n\tint qian(int a,int b,int c);\n\tint hou(int a,int b,int c);\n\tint a,b,c,d,e,f,g,k;\n\tscanf(\"%d%d%d\\n\",&a,&b,&c);\n\tscanf(\"%d%d%d\",&d,&e,&f);\n\tg=d-a;\n\tk=nian(a,g);\n\tif(g!=0)\n\t{k=k+qian(a,b,c);\n\tk=k+hou(d,e,f);}\n\telse\n\t{k=k+hou(d,e,f);\n\tk=k-hou(a,b,c);\n\t}\n\tprintf(\"%d\\n\",k);\n}\n\t\nint nian(int a,int b)\n{ int i,j=0;\n\tfor(i=1;i<=b-1;i++)\n\t{if(((a+i) % 4 == 0 && (a+i) % 100 != 0) || ((a+i) % 400 == 0))\n\t\tj=j+366;\n\telse j=j+365;\n\t}\n\treturn(j);\n}\n\nint qian(int a,int b,int c)\n{\n\tint pd1(int a,int b);\n\tint pd2(int a,int b);\n\tint pd3(int a);\n\tint pd4(int a);\n\tint e=0,i,j;\n\tif((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0))\n {\n e=pd1(b,c);\n for(i=b+1;i<=12;i++)\n {e=e+pd3(i);}}\n else \n {\n e=pd2(b,c);\n for(i=b+1;i<=12;i++)\n {e=e+pd4(i);}}\n return(e);\n }\n \nint hou(int a,int b,int c)\n{\n\tint pd3(int a);\n\tint pd4(int a);\n\tint e,i,j;\n\te=c;\n\tif((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0))\n {\n for(i=1;iendmonth;i--)\n\t\t{\n\t\t\tresult=result-A[i-2];\n\t\t}\n\t\tresult=result+endday-startday;\n\t}\n\treturn result;\n}\nint count2(int startmonth,int startday,int endmonth,int endday)\n{\n int result=0,i;\n\tif(startmonth<=endmonth)\n\t{\n\t\tfor(i=startmonth;iendmonth;i--)\n\t\t{\n\t\t\tresult=result-B[i-2];\n\t\t}\n\t\tresult=result+endday-startday;\n\t}\n\treturn result;\n}\nint main()\n{\n\tint startYear,startMonth,startDay;\n\tint endYear,endMonth,endDay;\n\tint i;\n\tint sum=0;\n\tint temp;\n\tscanf(\"%d%d%d\",&startYear,&startMonth,&startDay);\n\tscanf(\"%d%d%d\",&endYear,&endMonth,&endDay);\n\tif(startYear==endYear)\n\t{\n\t\tif(runnian(startYear))\n\t\t{\n\t\t\tsum=count1(startMonth,startDay,endMonth,endDay);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum=count2(startMonth,startDay,endMonth,endDay);\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(startYear>endYear)\n\t\t{\n\t\t\ttemp=endYear;\n\t\t\tendYear=startYear;\n\t\t\tstartYear=temp;\n temp=endMonth;\n\t\t\tendMonth=startMonth;\n\t\t\tstartMonth=temp;\n temp=endDay;\n\t\t\tendDay=startDay;\n\t\t\tstartDay=temp;\n\t\t}\n\t}\n\tif(startYear=1;i--)\n\t\t {\n\t\t\t if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n\t\t\t {\n s1=s1+31;\n\t\t\t }\n\t\t\t if(i==4||i==6||i==9||i==11)\n\t\t\t {\n s1=s1+30;\n\t\t\t } \n\t\t\t if(i==2)\n\t\t\t {\n\t\t\t\t s1=s1+28;\n\t\t\t }\n\t\t }\n\t }\nif(y[a]==366)\n\t {\n\t\t for(i2=k;i2>=1;i2--)\n\t\t {\n\t\t\t if(i2==1||i2==3||i2==5||i2==7||i2==8||i2==10||i2==12)\n\t\t\t {\n s1=s1+31;\n\t\t\t }\n\t\t\t if(i2==4||i2==6||i2==9||i2==11)\n\t\t\t {\n s1=s1+30;\n\t\t\t } \n\t\t\t if(i2==2)\n\t\t\t {\n\t\t\t\t s1=s1+29;\n\t\t\t }\n\t\t }\n\t }\n \n \n \n if(y[j]==365)\n\t {\n\t\t for(i3=k;i3>=1;i3--)\n\t\t {\n\t\t\t if(i3==1||i3==3||i3==5||i3==7||i3==8||i3==10||i3==12)\n\t\t\t {\n s2=s2+31;\n\t\t\t }\n\t\t\t if(i3==4||i3==6||i3==9||i3==11)\n\t\t\t {\n s2=s2+30;\n\t\t\t } \n\t\t\t if(i3==2)\n\t\t\t {\n\t\t\t\t s2=s2+28;\n\t\t\t }\n\t\t }\n\t }\nif(y[j]==366)\n\t {\n\t\t for(i4=k;i4>=1;i4--)\n\t\t {\n\t\t\t if(i4==1||i4==3||i4==5||i4==7||i4==8||i4==10||i4==12)\n\t\t\t {\n s2=s2+31;\n\t\t\t }\n\t\t\t if(i4==4||i4==6||i4==9||i4==11)\n\t\t\t {\n s2=s2+30;\n\t\t\t } \n\t\t\t if(i4==2)\n\t\t\t {\n\t\t\t\t s2=s2+29;\n\t\t\t }\n\t\t }\n\t }\n\n d1=c;\n\t d2=l;\n\t for(i5=a;i5=3)) g=1;\n\telse g=0;\n summ1=summ1+g;\n\tif(e==1) summ2=0;\n\tif(e==2) summ2=31;\n\tif(e==3) summ2=31+28;\n\tif(e==4) summ2=31+28+31;\n\tif(e==5) summ2=31+28+31+30;\n\tif(e==6) summ2=31+28+31+30+31;\n\tif(e==7) summ2=31+28+31+30+31+30;\n\tif(e==8) summ2=31+28+31+30+31+30+31;\n\tif(e==9) summ2=31+28+31+30+31+30+31+31;\n\tif(e==10) summ2=31+28+31+30+31+30+31+31+30;\n\tif(e==11) summ2=31+28+31+30+31+30+31+31+30+31;\n\tif(e==12) summ2=31+28+31+30+31+30+31+31+30+31+30;\n\tif(((d % 4 == 0 && d % 100 != 0) || (d % 400 == 0))&&(e>=3)) g=1;\n\telse g=0;\n summ2=summ2+g;\n\n\t/*???*/\n\n\th=sumy2+summ2+f-sumy1-summ1-c;\n\tprintf(\"%d\",h);\n\treturn 0;\n}"} +{"label": "80", "index": "39818", "code": "int main(){\n\tint y1,y2,m1,m2,d1,d2,n1=0,n2=0,n3=0,i,j;\n\tint mouth1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint mouth2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tcin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tfor(i=y1;i> syear >> smon >> sday >> eyear >> emon >> eday ;\n\tfor ( i = syear ; i < eyear ; i++ )\n\t{\n\t\tdisyear += dayofy(i) ;\n\t}\n\tdisday = dayofm( eday ,emon , eyear ) - dayofm( sday , smon ,syear ) ;\n\tcout << disyear+disday << endl ;\n\treturn 0 ;\n}"} +{"label": "80", "index": "39820", "code": "\nint main()\n{\n\tint y1,m1,d1,y2,m2,d2,i,s=0;\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>y1>>m1>>d1>>y2>>m2>>d2;\n\n if(y1!=y2)\n\t {\n\t\tfor(i=y1+1;i2) \n\t\t\ts++;\n\t\t\n\t\tcout<2)\n\t\t\t\t s++;\n\t\t\tcout<> startYear >> startMonth >> startDay;\n\tcin >> endYear >> endMonth >> endDay;\n\tif(startYear == endYear)\n\t{\n\t\ttotal-=startDay;\n\t\ttotal+=endDay;\n\t\tif((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0) && (startMonth <= 2) && (endMonth > 2))\n\t\t\tday[1]++;\n\t\tfor(i = startMonth; i 2))\n\t\t\ttotal++;\n\t}\n\tcout << total <> startyear >> startmonth >> startday;\n\tcin >> endyear>> endmonth >> endday;\n\tif(startyear == endyear)\n\t{\n\t\tfeb = (endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0);\n\t\tmonth[2] = 28 + feb;\n\t\tif(startmonth == endmonth)\n\t\t{\n\t\t\tfor(i = startday; i < endday; i++)\n\t\t\t\tnum ++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnum += month[startmonth] - startday;\n\t\t\tfor(i = startmonth + 1 ; i < endmonth; i++)\n\t\t\t{\n\t\t\t\tnum += month[i];\n\t\t\t}\n\t\t\tnum += endday;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfeb = (startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0);\n\t\tmonth[2] = 28 + feb;\n\t\tnum += month[startmonth] - startday;\n\t\tfor(i = startmonth + 1; i <= 12; i++)\n\t\t\tnum += month[i];\n\tfor(i = startyear + 1; i < endyear; i++)\n\t{\n\t\tfeb = (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0);\n\t\tmonth[2] = 28 + feb;\n\t\tnum += year[feb];\n\t}\n\tfeb = (endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0);\n\tmonth[2] = 28 + feb;\n\n\tfor(i = 1; i < endmonth ; i++)\n\t\tnum += month[i];\n\tnum += endday;\n\t}\n\tcout << num << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39823", "code": "void main()\n{\n\tint year(int y);\n\tint day(int m,int d);\n\tint y1,m1,d1,y2,m2,d2,i,x,k=0;\n\tscanf(\"%d%d%d\",&y1,&m1,&d1);\n\tscanf(\"%d%d%d\",&y2,&m2,&d2);\n\tfor(i=y1;i2) x--;\n\tif(year(y2)==1&&m2>=3) x++;\n\tprintf(\"%d\",x);\n}\nint year(int y)\n{\tint z;\n\tif((y%4==0&&y%100!=0)||(y%400==0)) z=1;\n\telse z=0;\n\treturn z;\n}\nint day(int m,int d)\n{\tint z;\n\tz=d;\n\tswitch(m)\n\t{\t\tcase 2:z=z+31;break;\n\t\t\tcase 3:z=z+31+28;break;\n\t\t\tcase 4:z=z+31*2+28;break;\n\t\t\tcase 5:z=z+30+31*2+28;break;\n\t\t\tcase 6:z=z+31*3+30+28;break;\n\t\t\tcase 7:z=z+30*2+31*3+28;break;\n\t\t\tcase 8:z=z+31*4+30*2+28;break;\n\t\t\tcase 9:z=z+31*5+30*2+28;break;\n\t\t\tcase 10:z=z+30*3+31*5+28;break;\n\t\t\tcase 11:z=z+31*6+30*3+28;break;\n\t\t\tcase 12:z=z+30*4+31*6+28;break;\n\t}\n\treturn z;\n}"} +{"label": "80", "index": "39824", "code": "void main(){\n\tint s,t,i,y,m,d,Y,M,D,n;\n\tscanf(\"%d%d%d%d%d%d\",&y,&m,&d,&Y,&M,&D);\n\ts=0;\n\tt=0;\n\tfor(i=1;i<=y-1;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t{\n\t\t\ts=s+366;\n\t\t}\n\t\telse s=s+365;\n\t}\n\tfor(i=1;i<=m-1;i++)\n\t{\n\t\tswitch(i)\n\t\t{\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\tcase 8:\n\t\tcase 10:\n\t\tcase 12:s=s+31;break;\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 9:\n\t\tcase 11:s=s+30;break;\n\t\tcase 2:{\n\t\t\tif((y%4==0&&y%100!=0)||(y%400==0)) s=s+29;\n\t\t\telse s=s+28;\n\t\t\t }\n\t\t}\n\t}\n\ts=s+d;\n\tfor(i=1;i<=Y-1;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t{\n\t\t\tt=t+366;\n\t\t}\n\t\telse t=t+365;\n\t}\n\tfor(i=1;i<=M-1;i++)\n\t{\n\t\tswitch(i)\n\t\t{\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\tcase 8:\n\t\tcase 10:\n\t\tcase 12:t=t+31;break;\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 9:\n\t\tcase 11:t=t+30;break;\n\t\tcase 2:{\n\t\t\tif((Y%4==0&&Y%100!=0)||(Y%400==0)) t=t+29;\n\t\t\telse t=t+28;\n\t\t\t }\n\t\t}\n\t}\n\tt=t+D;\n\tn=t-s;\n\tprintf(\"%d\",n);\n}"} +{"label": "80", "index": "39825", "code": "int main()\n{\n\tint day = 0, i;\n\tint year1, year2, m1, m2, d1, d2;\n\tcin >> year1 >> m1 >> d1;\n\tcin >> year2 >> m2 >> d2;\n\tint a[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint b[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tif ( (year2 - year1) == 0 )\n\t{\n\t\tif ( m1 == m2 )\n\t\t\tday = d2 -d1;\n\t\telse\n\t\t{\n\t\tif ( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0) )\n\t\t{\n\t\t\tfor ( i = m1+1; i <= m2-1; i++ )\n\t\t\t\tday = day + b[i];\n\t\tday = day + b[m1] - d1 + d2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor ( i = m1+1; i <= m2-1; i++ )\n\t\t\t\tday = day + a[i];\n\t\tday = day + a[m1] - d1 + d2;\n\t\t}\n\t\t}\n\t}\n\tif ( (year2 - year1) == 1 )\n\t{\n\t\tday = 0;\n\t\tif ( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0) )\n\t\t{\n\t\t\tfor ( i = m1 + 1; i <= 12; i++ )\n\t\t\t\tday = day + b[i];\n\t\tday = day + b[m1] - d1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor ( i = m1 + 1; i <= 12; i++ )\n\t\t\t\tday = day + a[i];\n\t\tday = day + a[m1] - d1;\n\t\t}\n\t\tif ( (year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0) )\n\t\t{\n\t\t\tfor ( i = 1; i <= m2 - 1; i++ )\n\t\t\t\tday = day + b[i];\n\t\t\tday = day + d2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\tfor ( i = 1; i <= m2 - 1; i++ )\n\t\t\t\tday = day + a[i];\n\t\t\tday = day + d2;\n\t\t}\n\t}\n\tif ( (year2 - year1) > 2 )\n\t{\n\t\tday = 0;\n\t\tfor ( i = year1 + 1; i <= year2 - 1; i++ )\n\t\t{\n\t\t\tif ( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0) )\n\t\t\t\tday = day + 366;\n\t\t\telse\n\t\t\t\tday = day + 365;\n\t\t}\n\t\tif ( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0) )\n\t\t{\n\t\t\tfor ( i = m1 + 1; i <= 12; i++ )\n\t\t\t\tday = day + b[i];\n\t\tday = day + b[m1] - d1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor ( i = m1 + 1; i <= 12; i++ )\n\t\t\t\tday = day + a[i];\n\t\tday = day + a[m1] - d1;\n\t\t}\n\t\tif ( (year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0) )\n\t\t{\n\t\t\tfor ( i = 1; i <= m2 - 1; i++ )\n\t\t\t\tday = day + b[i];\n\t\t\tday = day + d2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\tfor ( i = 1; i <= m2 - 1; i++ )\n\t\t\t\tday = day + a[i];\n\t\t\tday = day + d2;\n\t\t}\n\t}\ncout << day <>year1>>month1>>day1;\n cin>>year2>>month2>>day2;\n if(year2>year1>>month1>>day1>>year2>>month2>>day2;\n int dayofmonth[13]={31,28,31,30,31,30,31,31,30,31,30,31};\n int stayear=min(year1,year2);\n if(stayear%4==0&&stayear%100!=0||stayear%400==0)\n\t dayofmonth[1]=29;\n for(int month=0;month y2)\n\t\treturn 1;\n\telse\n\t{\n\t\tif(m1 < m2)\n\t\t\treturn -1;\n\t\telse if(m1 > m2)\n\t\t\treturn 1;\n\t\telse\n\t\t{\n\t\t\tif(d1 < d2)\n\t\t\t\treturn -1;\n\t\t\telse if(d1 > d2)\n\t\t\t\treturn 1;\n\t\t\telse\n\t\t\t\treturn 0;\n\t\t}\n\t}\n}\nint main()\n{\n\tint a[13] ={0,31,28,31,30,31,30,31,31,30,31,30,31} ;\n\tint b[13] ={0,31,29,31,30,31,30,31,31,30,31,30,31} ;\n\tint y1, m1, d1;\n\tint y2, m2, d2;\n\tcin >> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tint sum = 0;\n\tfor(int i = y1 + 1; i <= y2 - 1; i++)\n\t{\n\t\tif(judge1(i) == 1)\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\t}\n\tif(y1 != y2){\n\tfor(int i = m1 + 1; i <= 12; i++)\n\t\tif(judge1(y1) == 1)\n\t\t\tsum += b[i];\n\t\telse\n\t\t\tsum += a[i];\n\tfor(int i = 1; i <= m2 - 1; i++)\n\t\tif(judge1(y2) == 1)\n\t\t\tsum += b[i];\n\t\telse\n\t\t\tsum += a[i];}\n\tif(y1 ==y2 && m1 == m2)\n\t{\n\t\tsum += d2 - d1;\n\t}\n\telse{\n\tsum += d2;\n\tif(m1 != 2)\n\t\tsum += a[m1] - d1;\n\telse\n\t{\n\t\tif(judge1(y1) == 1)\n\t\t\tsum += 29 - d1;\n\t\telse\n\t\t\tsum += 28 - d1;\n\t}\n\t}\n\tcout << sum << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39830", "code": "void main()\n{\n\tint a,b,c,d,e,f,i,j,k,sum=0;\n\tscanf(\"%d%d%d\",&a,&b,&c);\n\tscanf(\"%d%d%d\",&d,&e,&f);\n\tfor(i=a;i<=d;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0)) \n\t\t\tsum=sum+366;\n\t\telse\n\t\t\tsum=sum+365;\n\t}\n\tfor(j=1;j<=b-1;j++)\n\t{\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum-30;\n\t\t\telse if((a%4==0&&a%100!=0)||(a%400==0))\n\t\t\t\t\tsum=sum-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum-28;\n\t}\n\tfor(j=e+1;j<=12;j++)\n\t{\n\t\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum-30;\n\t\t\telse if((d%4==0&&d%100!=0)||(d%400==0))\n\t\t\t\t\tsum=sum-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum-28;\n\t}\n\tj=e;\n\tif(j==1||j==3||j==5||j==7||j==8||j==10||j==12)\n\t\t\tsum=sum+f-31;\n\t\telse if(j==4||j==6||j==9||j==11)\n\t\t\t\tsum=sum+f-30;\n\t\t\telse if((j%4==0&&j%100!=0)||(j%400==0))\n\t\t\t\t\tsum=sum+f-29;\n\t\t\t\telse\n\t\t\t\t\tsum=sum+f-28;\n\tsum=sum-c;\n\tprintf(\"%d\",sum);\n\t\n}\t"} +{"label": "80", "index": "39831", "code": "\nint main()\n{\n\tint year1,month1,date1,year2,month2,date2; //1?????2????//\n\tint year_2; //faciliate caculation//\n\tint year,month,date;\n\tscanf(\"%d%d%d\\n%d%d%d\",&year1,&month1,&date1,&year2,&month2,&date2);\n\tyear_2=year2;\n\tif(date1<=date2) date=date2-date1;\n\telse \t\t\n\t{\n\t\tmonth2=month2-1; \n\t\t if((month2<=7&&month2%2!=0)||(month2>7&&month2%2==0)) //????????????//\n date=date2-date1+31;\n\t else if(month2!=2) \n\t\t\t date=date2-date1+30;\n else if((year2%4==0&&year2%100!=0)||(year2%400==0)) //????//\n\t\t\t\t\t\t date=date2-date1+29;\n\t\t\t\t\t else date=date2-date1+28;\n\t}\n\tif(month2>=month1) month=month2-month1;\n\telse \n\t{\n\t\tmonth=month2-month1+12;\n\t\tyear_2=year2-1;\n\t}\n\tyear=year_2-year1;\n\n\t/*???????????year??month??date?*/\n\n\tint day,monthday,yearday; //????????????????????????????//\n\tint monthday1=0,monthday2=0;\n\tday=0;\n monthday=0;\n\tint judgeyear2; //faciliate caculation//\n\tint i;\n\tif(month1+month>=12) judgeyear2=year_2;\n\telse judgeyear2=year2;\n\tfor(i=1;i<=month1-1;i++) /*????????????*/\n if(i<=12) //??+31???+30//\n\t\t\tif((i<=7&&i%2!=0)||(i>7&&i%2==0)) monthday1=monthday1+31;\n\t\t\telse \n\t\t\t\tif(i==2) \n\t\t\t\t{\n\t\t\t\t if((year1%4==0&&year1%100!=0)||(year1%400==0)) //????//\n\t\t\t monthday1=monthday1+29;\n\t else monthday1=monthday1+28;\n\t\t\t\t}\n\t\t\t\t else monthday1=monthday1+30;\n\tfor(i=1;i<=month1+month-1;i++) /*????????????*/\n\t\tif(i>12)\n\t\t\tif(((i-12)<=7&&(i-12)%2!=0)||((i-12)>7&&(i-12)%2==0)) monthday2=monthday2+31;\n\t\t\telse \n\t\t\t\tif((i-12)==2)\n\t\t\t\t{\n\t\t\t\t if((year2%4==0&&year2%100!=0)||(year2%400==0)) //????//\n\t\t\t monthday2=monthday2+29;\n\t else monthday2=monthday2+28;\n\t\t\t\t}\n\t\t\t\t else monthday2=monthday2+30;\n\t\telse\n\t\t\tif((i<=7&&i%2!=0)||(i>7&&i%2==0)) monthday2=monthday2+31;\n\t\t\telse \n\t\t\t\tif(i==2)\n\t\t\t\t{\n\t\t\t\t if((judgeyear2%4==0&&judgeyear2%100!=0)||(judgeyear2%400==0)) //????//\n\t\t\t monthday2=monthday2+29;\n\t else monthday2=monthday2+28;\n\t\t\t\t}\n\t\t\t\t else monthday2=monthday2+30;\n\tmonthday=monthday2-monthday1;\n\tyearday=365*year; /*??????365????????????????*/\n int j;\n\tyear2=year_2;\n\tfor(j=year1;j<=year2-1;j++)\n\t if((j%4==0&&j%100!=0)||(j%400==0))\n\t\t\tyearday=yearday+1;\n\t\telse continue;\n\tday=date+monthday+yearday;\n\n\tprintf(\"%d\\n\",day);\n\n\treturn 0;\n\n \n}\n"} +{"label": "80", "index": "39832", "code": "int main()\n{\n\n int startyear,startmonth,startday,endyear,endmonth,endday,i,sum;\n int a[13];\n sum=0;\n scanf(\"%d%d%d\\n%d%d%d\",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);\n for(i=1;i<=12;i++)//??\t\n\t{\n\t\t\n if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\t\n\t\t{\n\t\t\ta[i]=31; \n\t\t}\t\n else if(i==2)\t\n\t\t{\t\n a[i]=28;\n\t\t}\t\n else if(i==4||i==6||i==9||i==11)\t\n\t\t{\t\n a[i]=30;}\t\n\t} \n\n if (startyear==endyear)\n\t {\t\n while ((startmontha[startmonth])\t\n\t\t\t {\t\n startday=0;\t//not 1\n startmonth=startmonth+1; \t\n\t\t\t }\t\n\t\t }\n\t }\n else\n\t\t\t {\t\n for (i=startyear+1;i<=endyear-1;i++)\n\t\t\t\t {\t\n if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\t\n sum=sum+366;\t\n else sum=sum+365;\t\n\t\t\t\t }\n sum=sum+a[startmonth]-startday;//the first month\t\n for (i=startmonth+1;i<=12;i++) \n\t\t\t\t\t {\n sum=sum+a[i];\n\t\t\t\t\t }\n if ((startmonth==1)&&((startyear%4==0&&startyear%100!=0)||(startyear%400==0)))\n\t\t\t\t\t {\n sum++;\t\n\t\t\t\t\t }\t\n for (i=1;i<=endmonth-1;i++) \t\n\t\t\t\t\t {\t\n sum=sum+a[i];\n\t\t\t\t\t }\n if ((endmonth>2)&&((endyear%4==0&&endyear%100!=0)||(endyear%400==0)))\n\t\t\t\t\t {\t\n sum++;\t\n\t\t\t\t\t }\n sum+=endday;\n\t\t\t }\n printf(\"%d\",sum);\n return 0;\n}\n"} +{"label": "80", "index": "39833", "code": "struct date\n{\n\tint year;\n\tint month;\n\tint day;\n} data[3];\nint pingrun[3] = {0, 365, 366}, len[3] = {0};\nint monthDays[3][13]={{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};\nint nian, yue, ri,leap[3],jiange[3];\nint i, j;\nint compute(int,int,int);\nvoid canliang(char[],int);\nint main()\n{\n\tlong int sum = 0, res;\n data[1].year=data[1].month=data[1].day = 0;\n data[2].year=data[2].month=data[2].day = 0;\n\tchar rizi1[500],rizi2[500];\n\tcin.getline(rizi1,12);\n\t//cin.get();\n\tcin.getline(rizi2,12);\n\t//cout << rizi[1] << endl;\n\t//cout << rizi[2] << endl;\n canliang(rizi1,1);\n\tcanliang(rizi2,2);\n\tnian = abs(data[2].year - data[1].year);\n\t//cout << \"jiange1\" << jiange[1]<<\" \" << \"jiange2\" << jiange[2] << endl;\n //\tcout << nian << endl;\n\tif (nian == 0)\n\t{\n\t\tcout << abs(jiange[2]-jiange[1]) << endl;\n\t}\n\telse if (nian == 1)\n\t{\n\t\tcout << (pingrun[leap[1] + 1] - jiange[1] + jiange[2]) << endl;\n\t}\n\telse if (nian >= 2)\n\t{\n\t\tfor (i = data[1].year + 1; i < data[2].year; i++)\n\t\t{\n\t\t\tres = (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0);\n\t\t\tsum += pingrun[res+1];\n\t\t}\n\t\tsum += jiange[2];\n\t\tres = pingrun[leap[1]+1]-jiange[1];\n\t\tsum += res;\n\t cout << sum << endl;\n\t}\n\t\treturn 0;\n}\n \nint compute(int x, int y,int z) //z=1???z=0??\n{//int monthDays[3][13]={{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};\n\tint cd = 0, i = 1;\n\tif (x == 1)\n\t{\n\t\treturn y;\n\t}\n while (i < x)\n\t{\n\t\tcd += monthDays[1+z][i];\n\t\ti++;\n\t}\n\treturn cd + y;\n}\nvoid canliang(char str[],int x)\n{\n int len, i = 0;\n\tlen = strlen(str);\n\twhile(str[i]== ' ') {i++;}\n\twhile (isdigit(str[i]))\n\t{\n\t\tdata[x].year = data[x].year * 10 + str[i] - '0';\n\t\ti++;\n\t}\n\twhile (str[i]==' ') {i++;}\n\twhile (isdigit(str[i]))\n\t{\n\t\tdata[x].month = data[x].month * 10 + str[i] -'0';\n\t\ti++;\n\t}\n\twhile (str[i]==' ') {i++;}\n\twhile((str[i]>= '0') && (str[i] <= '9') && i =3)\n\t\ty1=y1+1;\n\tif (m2>=3)\n\t\ty2=y2+1;\n\twhile(y1m2)\n\t\t{\n\t\t\tif(m2==3||m2==5||m2==7||m2==8||m2==10||m2==12||m2==13)\n\t\t{\n\t\t\td=d-31;\n\t\t\tm2++;\n\t\t}\n\t\tif(m2==4||m2==6||m2==9||m2==11)\n\t\t{\n\t\t\td=d-30;\n\t\t\tm2++;\n\t\t}\n\t}\n\t\t\td=d+d2-d1;\n\t\t\tprintf(\"%d\",d);\n}\n\n\n"} +{"label": "80", "index": "39835", "code": "\nint main()\n{\n\tint a,b,c,d,e,f,s;\n\tint tem;\n\tint q,w;\n\tint i;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tscanf(\"%d %d %d\",&d,&e,&f);\n\tint days(int x,int y,int z);\n\tif(a==d)\n\t{\n\t\tq=days(a,b,c);\n\t\tw=days(d,e,f);\n\t\ts=w-q;\n\t}\n\telse\n\t{\n\t\tq=days(a,b,c);\n\t\tw=days(d,e,f);\n\t\tif((a%4==0&&a%100!=0)||(a%400==0))\n\t\t{\n\t\ts=366-q;\n\t\tfor(i=a+1;i<=d-1;i++)\n\t\t{\n\t\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t\t\ts=s+366;\n\t\t\telse\n\t\t\t\ts=s+365;\n\t\t}\n\t\ts=s+w;\n\t\t}\n\telse\n\t\t{\n\t\ts=365-q;\n\t\tfor(i=a+1;i<=d-1;i++)\n\t\t{\n\t\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t\t\ts=s+366;\n\t\t\telse\n\t\t\t\ts=s+365;\n\t\t}\n\t\ts=s+w;\n\n\t\t}\n\n\n\t}\n\tprintf(\"%d\",s);\n\n return 0;\n}\nint days(int x,int y,int z)\n{\n\tint tem;\n\tif((x%4==0&&x%100!=0)||(x%400==0))\n\t{\n\t\tif(y==1)\n\t\t\ttem=z;\n\t\telse if(y==2)\n\t\t\ttem=31+z;\n\t\telse if(y==3)\n\t\t\ttem=31+29+z;\n\t\telse if(y==4)\n\t\t\ttem=31+29+31+z;\n\t\telse if(y==5)\n\t\t\ttem=31+29+31+30+z;\n\t\telse if(y==6)\n\t\t\ttem=31+29+31+30+31+z;\n\t\telse if(y==7)\n\t\t\ttem=31+29+31+30+31+30+z;\n\t\telse if(y==8)\n\t\t\ttem=31+29+31+30+31+30+31+z;\n\t\telse if(y==9)\n\t\t\ttem=31+29+31+30+31+30+31+31+z;\n\t\telse if(y==10)\n\t\t\ttem=31+29+31+30+31+30+31+31+30+z;\n\t\telse if(y==11)\n\t\t\ttem=31+29+31+30+31+30+31+31+30+31+z;\n\t\telse\n\t\t\ttem=31+29+31+30+31+30+31+31+30+31+30+z;\n\t}\n\telse\n\t{\n\t\tif(y==1)\n\t\t\ttem=z;\n\t\telse if(y==2)\n\t\t\ttem=31+z;\n\t\telse if(y==3)\n\t\t\ttem=31+28+z;\n\t\telse if(y==4)\n\t\t\ttem=31+28+31+z;\n\t\telse if(y==5)\n\t\t\ttem=31+28+31+30+z;\n\t\telse if(y==6)\n\t\t\ttem=31+28+31+30+31+z;\n\t\telse if(y==7)\n\t\t\ttem=31+28+31+30+31+30+z;\n\t\telse if(y==8)\n\t\t\ttem=31+28+31+30+31+30+31+z;\n\t\telse if(y==9)\n\t\t\ttem=31+28+31+30+31+30+31+31+z;\n\t\telse if(y==10)\n\t\t\ttem=31+28+31+30+31+30+31+31+30+z;\n\t\telse if(y==11)\n\t\t\ttem=31+28+31+30+31+30+31+31+30+31+z;\n\t\telse\n\t\t\ttem=31+28+31+30+31+30+31+31+30+31+30+z;\n\t}\n\treturn tem;\n}"} +{"label": "80", "index": "39836", "code": "int main()\n{\n int month[5][15];\n \n \n month[1][1]=31;\n month[1][2]=28;\n month[1][3]=31;\n month[1][4]=30;\n month[1][5]=31;\n month[1][6]=30;\n month[1][7]=31;\n month[1][8]=31;\n month[1][9]=30;\n month[1][10]=31;\n month[1][11]=30;\n month[1][12]=31;\n \n month[2][1]=31;\n month[2][2]=29;\n month[2][3]=31;\n month[2][4]=30;\n month[2][5]=31;\n month[2][6]=30;\n month[2][7]=31;\n month[2][8]=31;\n month[2][9]=30;\n month[2][10]=31;\n month[2][11]=30;\n month[2][12]=31;\n int top=0,s=0,a1,b1,c1,a2,b2,c2;\n cin>>a1>>b1>>c1>>a2>>b2>>c2;\nif (a1!=a2)\n {\n while (a1>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\n cout<endDay)\n\t {\n\t\t\t for(i=startDay;i>endDay;i--) sumDay-=1;\n\t\t }\n }\n //?????????? \n\t{\n\t\tif(startMonthendMonth)\n\t\t {\n\t\t\t\tif((endYear%4==0&&endYear%100!=0)||(endYear%400==0)) \n\t\t\t\t {\n\t\t\t\t\t\tfor(i=startMonth;i>endMonth;i--) sumMonth-=b[i];\n\t\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t for(i=startMonth;i>endMonth;i--) sumMonth-=a[i];\n\t\t\t}\n\t} \n\t//??????????\n\t{\n\t\tif(startYear> startYear >> startMonth >> startDay;\n cin >> endYear >> endMonth >> endDay;\n\n\n for(i = startYear; i < endYear; i++)\n {\n if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))\n day = day + 366;\n else\n day = day + 365;\n }\n\n\n i = startYear;\n if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))\n {\n for(int j = 1; j < startMonth; j++)\n {\n day1 = day1 + month2[j];\n }\n }\n else\n {\n for(int j = 1; j < startMonth; j++)\n {\n day1 = day1 + month1[j];\n }\n }\n day1 = day1 + startDay;\n\n i = endYear;\n if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))\n {\n for(int j = 1; j < endMonth; j++)\n {\n day2 = day2 + month2[j];\n }\n }\n else\n {\n for(int j = 1; j < endMonth; j++)\n {\n day2 = day2 + month1[j];\n }\n }\n day2 = day2 + endDay;\n\n\n deltaDay = day2 - day1 + day;\n\n cout << deltaDay;\n\n\n return 0;\n}\n"} +{"label": "80", "index": "39845", "code": "int main()\n{\n int sy,sm,sd,ey,em,ed,m[12],i,d1,d2,d3,d4,d;\n m[1]=m[3]=m[5]=m[7]=m[8]=m[10]=m[12]=31;\n m[4]=m[6]=m[9]=m[11]=30;\n m[2]=28;\n scanf(\"%d %d %d %d %d %d\",&sy,&sm,&sd,&ey,&em,&ed);\n d1=d2=d4=0;\n for(i=1;i2||sm==2&&sd==29))\n d4=d4-1;\n if(((ey%4==0&&ey%100!=0)||(ey%400==0))&&em<3)\n d4=d4-1;\n d=d3+d4;\n printf(\"%d\",d);\n\n \n}"} +{"label": "80", "index": "39846", "code": "//********************************\n//*???3.cpp **\n//*?????? 1200012768 **\n//*???2013.1.3 **\n//*?????????????? **\n//********************************\nint ydays[2] = {365, 366};\nint mdays[2] = {28, 29};\nint y1, m1, d1, y2, m2, d2;\nint leap(int y)\n{\n\tif ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)\n\t\treturn 1;\n\treturn 0;\n}\nint cal_num(int y, int m, int d)\n{\n\tint num = 0;\n\tfor (int i = 1; i < m; i++)\n\t\tswitch(i)\n\t\t{\t\n\t\t\tcase 1: num += 31; break;\n\t\t\tcase 2: {int is_leap = leap(y); num += mdays[is_leap]; break;}\n\t\t\tcase 3: num += 31; break;\n\t\t\tcase 4: num += 30; break;\n\t\t\tcase 5: num += 31; break;\n\t\t\tcase 6: num += 30; break;\n\t\t\tcase 7: num += 31; break;\n\t\t\tcase 8: num += 31; break;\n\t\t\tcase 9: num += 30; break;\n\t\t\tcase 10: num += 31; break;\n\t\t\tcase 11: num += 30; break;\n\t\t\tdefault:;\n\t\t}\n\treturn num + d;\n}\nint cal_days()\n{\n\tif (y1 == y2)\n\t\treturn cal_num(y2, m2, d2) - cal_num(y1, m1, d1);\n\tint is_leap = leap(y1);\n\tint days = ydays[is_leap] - cal_num(y1, m1, d1);\n\tfor (int i = y1 + 1; i < y2; i++)\n\t\tis_leap = leap(i), days += ydays[is_leap];\n\tdays += cal_num(y2, m2, d2);\n\treturn days;\n}\nint main()\n{\n\tcin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tcout << cal_days();\n\treturn 0;\n}\n"} +{"label": "80", "index": "39847", "code": "int main()\n{\n\tint a,b,c,d,e,f,m,n,i,h;\n\tint day1,day2,day3,day;\n\tscanf(\"%d %d %d\\n%d %d %d\",&a,&b,&c,&d,&e,&f);\n\tif((a%4==0&&a%100!=0)||(a%400==0))\n\t\tm=1;\n\telse\n\t\tm=2;\n\tif((d%4==0&&d%100!=0)||(d%400==0))\n\t\tn=1;\n\telse\n\t\tn=2;\n\tfor(i=a,h=0;i<=d;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t\th=h+1;\n\t\telse\n\t\t\t;\n\t}\n\tif(m==2&&n==2)\n\t\tday1=(d-a-h)*365+h*366;\n\tif(m==1&&n==2)\n\t{if((b==2&&c==29)||b>2)\n\t\t\tday1=(d-a-h+1)*365+(h-1)*366;\n\t\telse\n day1=(d-a-h)*365+h*366;\n\t}\n\tif(m==2&&n==1)\n\t{\n\t\tif((e==2&&f==29)||e>2)\n day1=(d-a-h)*365+h*366;\n\t\telse\n day1=(d-a-h+1)*365+(h-1)*366;\n\t}\n\tif(m==1&&n==1)\n\t{\n\t\tif(((b==2&&c<29)||b==1)&&((e==2&&f==29)||e>2))\n\t\t\tday1=(d-a-h)*365+h*366;\n\t\telse\n\t\t\tif(((b==2&&c==29)||b>2)&&((e==2&&c<29)||e==1))\n\t\t\t\tday1=(d-a+2)*366+(h-2)*365;\n\t\t\telse\n\t\t\t\tday1=(d-a-h+1)*365+(h-1)*366;\n\t}\n\tif(be)\n\t\t{m=e;n=b;}\n\t\telse\n\t\t\tm=n=a;\n for(day2=0;m<=n-1;m++)\n\t\tswitch(m)\n\t\t{\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\tcase 8:\n\t\tcase 10:\n\t\tcase 12:day2=day2+31;break;\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 9:\n\t\tcase 11:day2=day2+30;break;\n\t\tcase 2:day2=day2+28;break;\n\t\t}\n\tif(b>e)\n\t\tday2=-day2;\n\tday3=f-c;\n\tday=day1+day2+day3;\n\tprintf(\"%d\\n\",day);\n\treturn 0;\n}"} +{"label": "80", "index": "39848", "code": "int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint rdays[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\nint ryear(int year)\n{\n\treturn year%4==0&&year%100!=0||year%400==0;\n}\nint sum1(int year,int month, int day)\n{\n\tint i,restday=day;\n\tfor(i=1;i> x1>>y1>> z1>>x2>> y2>>z2;\n\tfor (int x = x1; x <= x2 - 1; x++)\n\t{\n\t\tif ((x % 4 == 0 && x % 100 != 0) || (x % 400 == 0))\n\t\t{\n\t\t\tans += 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tans += 365;\n\t\t}\n\t}\n\tif ((x1 % 4 == 0 && x1 % 100 != 0) || (x1 % 400 == 0))\n\t{\n\t\t\n\t\t\n\tfor ( i = 1; i <= y1 - 1; i++)\n\t{\n\t\tanstemp1 += b[i];\n\t}\n\tanstemp1 += z1;\n\t}\n\telse\n\t{\n\t\tfor (i = 1; i <= y1 - 1; i++)\n\t\t{\n\t\tanstemp1 += a[i];\n\t\t}\n\t\tanstemp1 += z1;\n\t}\n\n\n\t\n\tif ((x2 % 4 == 0 && x2 % 100 != 0) || (x2 % 400 == 0))\n\t{\n\t\t\n\t\t\n\tfor (i = 1; i <= y2 - 1; i++)\n\t{\n\t\tanstemp2 += b[i];\n\t}\n\tanstemp2 += z2;\n\t}\n\telse\n\t{\n\t\tfor (i = 1; i <= y2 - 1; i++)\n\t\t{\n\t\tanstemp2 += a[i];\n\t\t}\n\t\tanstemp2 += z2;\n\t}\n\n\n\tcout << ans - anstemp1 + anstemp2;\n\n\treturn 0;\n}\n"} +{"label": "80", "index": "39850", "code": "int main()\n{\n\tint answer=0,startYear,startMonth,startDay,endYear,endMonth,endDay;\n\tcin>>startYear>>startMonth>>startDay;\n\tcin>>endYear>>endMonth>>endDay;\n\tint d[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint gap;\n\tgap=endYear-startYear;\n\tint judge1,judge2,mid;\n\tjudge1=((endYear%400==0)||(endYear%4==0&&endYear%100!=0));\n\tjudge2=((startYear%400==0)||(startYear%4==0&&startYear%100!=0));\n if(startYear==endYear&&startMonth==endMonth&&startDay==endDay)\n {cout<<\"0\";\n return 0;}\n\tif(startMonth>endMonth)\n\t\t{\n\t\t\tmid=0;\n\t\t\tfor(int i=endMonth-1;i2&&judge1==1)\n\t\t\t\tanswer++;\n\t\t\tcout<>a1>>b1>>c1>>a2>>b2>>c2;\n\tfor(i = a1;i b2)\n\t{\n\t\tf = 1;\n\t\tt=b1;b1=b2;b2=t;\n\t}\n\tfor(i = b1;i < b2;i++)\n\t{\n\t\tif(i==2)\n\t\t{\n\t\t\tif((a2 % 4 == 0 && a2 % 100 != 0) || (a2 % 400 == 0)) \n\t\t\t\ts+=29;\n\t\t\telse\n\t\t\t\ts+=28;\n\t\t}\n\t\telse if(i==1||i==3||i==5||i==7||i==8||i==10)\n\t\t\ts += 31;\n\t\telse\n\t\t\ts+=30;\n\t}\n\tif(f==1)\n\t\tsum-=s;\n\telse\n\t\tsum+=s;\n\tsum=sum+(c2-c1);\n\tcout <> y1 >> m1 >> d1 >> y2 >> m2 >> d2 ;\n\tfor ( i = y1 ; i < y2 ; i ++ )\n\t{\n\t\tif ( ( i % 4 == 0 && i % 100 != 0 )||( i % 400 == 0 ) )\n\t\t{\n\t\t\tsum += 366;\n\t\t}\n\t\telse \n\t\tsum += 365 ;\n\t}\n\tfor ( i = 1 ; i < m1 ; i ++ )\n\t{\n\t\tif ( i == 4 || i == 6 || i == 9 || i == 11 )\n\t\t{\n\t\t\tsum = sum - 30 ;\n\t\t}\n\t\tif ( i == 2 )\n\t\t{\n\t\t\tif(( y2 % 4 == 0 && y2 % 100 != 0 )||( y2 % 400 == 0 ) )\n\t\t\t{\n\t\t\t\tsum = sum - 29 ;\n\t\t\t}\n\t\t\telse\n\t\t\tsum = sum - 28 ;\n\t\t}\n\t\tif ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 )\n\t\t{\n\t\t\tsum = sum - 31 ;\n\t\t}\n\t}\n\tsum = sum - d1 ;\n\tfor ( i = 1 ; i < m2 ; i ++ )\n\t{\n\t\tif ( i == 4 || i == 6 || i == 9 || i == 11 )\n\t\t{\n\t\t\tsum = sum + 30 ;\n\t\t}\n\t\tif ( i == 2 )\n\t\t{\n\t\t\tif(( y2 % 4 == 0 && y2 % 100 != 0 )||( y2 % 400 == 0 ) )\n\t\t\t{\n\t\t\t\tsum = sum + 29 ;\n\t\t\t}\n\t\t\telse\n\t\t\tsum = sum + 28 ;\n\t\t}\n\t\tif ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 )\n\t\t{\n\t\t\tsum = sum + 31 ;\n\t\t}\n\t}\n\tsum = sum + d2 ;\n\tcout << sum << endl ;\n\treturn 0 ;\n}"} +{"label": "80", "index": "39853", "code": "int main()\n{\n\tlong year1,month1,day1,year2,month2,day2,len1=0,len2=0;\n\tscanf(\"%d %d %d %d %d %d\",&year1,&month1\n\t,&day1,&year2,&month2,&day2);\n\tlong year,i,c;\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(year=0;year2))\n len1+=1;\n\t if((year2%4==0&&year2%100!=0||(year2%400==0))&&(month2>2)) \n len2+=1;\n len1+=day1;\n len2+=day2;\n c=len2-len1;\n printf(\"%d\",c);\n \n }"} +{"label": "80", "index": "39854", "code": "int main()\n{\n\tint sy,sm,sd,ey,em,ed;\n\tint date=0;\n\tcin>>sy>>sm>>sd>>ey>>em>>ed;\n\twhile (sy!=ey || sm!=em || sd!=ed)\n\t{\n\t\tdate++;\n\t\tif (sm==12 && sd==31)\n\t\t{\n\t\t\tsy++;\n\t\t\tsm=1;\n\t\t\tsd=1;\n\t\t}\n\t\telse if (\n\t\t\t((sm==1 || sm==3 || sm==5 || sm==7 || sm==8 || sm==10) && sd==31)\n\t\t\t||((sm==4 || sm==6 || sm==9 || sm==11) && sd==30))\n\t\t{\n\t\t\tsm++;\n\t\t\tsd=1;\n\t\t}\n\t\telse if (sm==2 && ((sy%4==0 && sy%100!=0) || (sy%400==0)) && sd==29)\n\t\t{\n\t\t\tsm++;\n\t\t\tsd=1;\n\t\t}\n\t\telse if (sm==2 && ((sy%4!=0) || (sy%100==0 && sy%400!=0)) && sd==28)\n\t\t{\n\t\t\tsm++;\n\t\t\tsd=1;\n\t\t}\n\t\telse sd++;\n\t}\n\tcout<>sy>>sm>>sd>>ey>>em>>ed;\n\tdc=0;\n\tif(ey==sy)\n\t{\n\t\tif((sy%4==0&&sy%100!=0)||sy%400==0)\n\t\t{\n\t\t\tif(sm==em)\n\t\t\t{\n\t\t\t\tdc=ed-sd;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=sm;i<=em-1;i++)\n\t\t\t\t{\n\t\t\t\t\tdc=dc+a[1][i];\n\t\t\t\t}\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(sm==em)\n\t\t\t{\n\t\t\t\tdc=ed-sd;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=sm;i<=em-1;i++)\n\t\t\t\t{\n\t\t\t\t\tdc=dc+a[0][i];\n\t\t\t\t}\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i=sy;i<=ey-1;i++)\n\t\t{\n\t\t\tif(i%4==0&&i%100!=0||i%400==0)\n\t\t\t{\n\t\t\t\tdc=dc+b[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdc=dc+b[0];\n\t\t\t}\n\t\t}\n\t\tif((sy%4==0&&sy%100!=0)||sy%400==0)\n\t\t{\n\t\t\tif(sm==em)\n\t\t\t{\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t\telse if(sm>em)\n\t\t\t{\n\t\t\t\tk=0;\n\t\t\t\tfor(i=em;i<=sm-1;i++)\n\t\t\t\t{\n\t\t\t\t\tk=k+a[1][i];\n\t\t\t\t}\n\t\t\t\tdc=dc-k+ed-sd;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=sm;i<=em-1;i++)\n\t\t\t\t{\n\t\t\t\t\tdc=dc+a[1][i];\n\t\t\t\t}\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(sm==em)\n\t\t\t{\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t\telse if(sm>em)\n\t\t\t{\n\t\t\t\tk=0;\n\t\t\t\tfor(i=em;i<=sm-1;i++)\n\t\t\t\t{\n\t\t\t\t\tk=k+a[0][i];\n\t\t\t\t}\n\t\t\t\tdc=dc-k+ed-sd;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(i=sm;i<=em-1;i++)\n\t\t\t\t{\n\t\t\t\t\tdc=dc+a[0][i];\n\t\t\t\t}\n\t\t\t\tdc=dc+ed-sd;\n\t\t\t}\n\t\t}\n\t\tif(em>2)\n\t\t{\n\t\t\tif((ey%4==0&&ey%100!=0)||ey%400==0)\n\t\t\t{\n\t\t\t\tdc=dc+1;\n\t\t\t}\n\t\t}\n\t}\n\tcout<=2&&eny%4==0&&eny%100!=0)||eny%400==0)\n\t{a++;}\n\tb=end-std+a+365*(eny-sty);\n\tprintf(\"%d\",b);\n}\nint daysto1_1_(int n)\n{\n\tint y=0;\n\tswitch(n)\n\t{ \n\tcase 12:y=y+30;\n\tcase 11:y=y+31;\n\tcase 10:y=y+30;\n\tcase 9:y=y+31;\n case 8:y=y+31;\n\tcase 7:y=y+30;\n\tcase 6:y=y+31;\n\tcase 5:y=y+30;\n\tcase 4:y=y+31;\n\tcase 3:y=y+28;\n\tcase 2:y=y+31;\n\tdefault: break;\n\t}\n return(y);\n}"} +{"label": "80", "index": "39857", "code": "\n\n\n\n\n\n\nint leap(int year)\n{\n\t\n\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n\t\treturn 1;\n\telse return 0;\n\n}\n\n\n\n\n\n\nint main()\n{\n\t\n\tint month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint syear=0, eyear=0, smonth=0, emonth=0, sday=0, eday=0;\n\tint nleap=0;\n\tint nyears=0;\n\tint startYearDays=0;\n\tint endYearDays=0;\n\tint totaldays=0;\n\tcin>>syear>>smonth>>sday;\n\tcin>>eyear>>emonth>>eday;\n\n\tfor(int i=syear; i<=eyear; i++)\n\t{\n\t\tif(leap(i))\n\t\t\tnleap++;\n\t\n\t}\n\n\tnyears=(eyear-syear)-1;\n\n\tfor(int i=smonth+1; i<=12; i++)\n\t{\n\t\tstartYearDays=startYearDays+month[i];\n\t\t\n\t}\n\n\n\tstartYearDays=startYearDays+(month[smonth]-sday);\n\n\n\t//\tcout<endmonth)\n\t{\n\t\tfor(month=startmonth;month>endmonth;--month)\n\t\t{\n\t\t\tday=day-a[month];\n\t\t}\n\t}\n\tday=day+endday-startday;\n\tfor(year=startyear;year<=endyear;++year)\n\t{\n\t\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ++i;\n\t}\n\tif(((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))&&(startmonth>2))\n\t\ti=i-1;\n\tif(((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))&&(endmonth<2))\n\t\ti=i-1;\n\tday=day+i;\n\tprintf(\"%d\\n\",day);\n\treturn 0;\n}\n"} +{"label": "80", "index": "39859", "code": "int main( )\n{\n int p,b,c,h,q,w,e,a,s,d,m[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n cin>>q>>w>>e;\n cin>>a>>s>>d;\n p=(a-q)*365;\n for(int i=0;ih))\n \tp=p+1;\n \t}\n if(w==2&&s==2&&e==29&&d==29)\n \tp=p+1;\n cout<>y>>m>>d;\n\n int t=0;\n for (int year=1;year<=y-1;year++)\n {\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n t+=366; else t+=365;\n }\n int year=y;\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) month[2]=29; else month[2]=28;\n for (int i=1;i<=m-1;i++)\n {\n t=t+month[i];\n }\n t+=d;\n int t2=t;\n\n cin>>y>>m>>d;\n\n t=0;\n for (int year=1;year<=y-1;year++)\n {\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n t+=366; else t+=365;\n }\n year=y;\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) month[2]=29; else month[2]=28;\n for (int i=1;i<=m-1;i++)\n {\n t=t+month[i];\n }\n t+=d;\n\n cout<2);\n}\nint g(int m, int d)\n{\n\tint i, fromto=0;\n\tfor(i=1; i1)\n\t\t\t for(j=1;j<=em-1;j++)\n\t\t\t\t sum=sum+a[j-1];\n\t\t\tsum=sum+ed;\n\t }\n\t else\n\t {\n if (em>1)\n\t\t\t for(j=1;j<=em-1;j++)\n\t\t\t\t sum=sum+b[j-1];\n\t\t\tsum=sum+ed;\n \t}\n\t}\n\telse\n\t{\n\t\tif ((sy%4==0&&sy%100!=0)||(sy%400==0))\n\t {\n\t\t if (sm!=em)\n\t\t\t{\n\t\t\t\tif (sm+1<=em-1)\n\t\t\t for(k=sm+1;k<=em-1;k++)\n\t\t\t\t sum=sum+a[k-1];\n\t\t\t sum=sum+a[sm-1]-sd+1;\n\t\t\t sum=sum+ed;\n\t\t\t}\n\t\t\telse\n\t\t\t\tsum=sum+ed-sd+1;\n \t}\n\t else\n \t{\n if (sm!=em)\n\t\t\t{\n\t\t\t\tif (sm+1<=em-1)\n\t\t\t for(k=sm+1;k<=em-1;k++)\n\t\t\t\t sum=sum+b[k-1];\n\t\t\t sum=sum+b[sm-1]-sd+1;\n\t\t\t sum=sum+ed;\n\t\t\t}\n\t\t\telse\n\t\t\t\tsum=sum+ed-sd+1;\n \t}\n\t}\n\tprintf(\"%d\\n\",sum-1);\n}"} +{"label": "80", "index": "39864", "code": "void main()\n{\n\tint i,j,t=0,y1,y2,m1,m2,d1,d2,t1=0,t2=0;\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tfor(i=y1;i1)\n\t{\n \tfor(i=y1+1;i>year[i]>>month[i]>>day[i];\n\n\tdays+=(year[1]-year[0]-1)*365; //????\n\tfor(i=year[0];i2) //????????2?29??????\n\t\t\tdays--; //?**????????\n\n\t\tfor(i=1;i2) //????2?29?????\n\t\t\tdays++; //?1\n\t\t\n\t\tcout<> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tfor (i=year1+1;i2)\n\t\t{\n\t\t\ty++;\n\t\t}\n\t\tif (month2==2)\n\t\t{\n\t\t\tif(day2==29)\n\t\t\t{\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\tfor (k=0;kmonth2-1;k--)\n\t{\n\t\tp+=month[k];\n\t}\n\tp+=month[month2-1]-day2;\n\tsum=365*(year2-year1+1)-day-p+x+y+count;\n\t//cout << day << \" \" << p << \" \" << x << \" \" << y << endl;\n\tcout << sum << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39869", "code": "void main()\n{\n\tint N1,N2,Y1,Y2,R1,R2,i,j,k,m,n,l,x1,x2;\n\tint MONTH[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint RUNMONTH[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d%d%d%d%d%d\",&N1,&Y1,&R1,&N2,&Y2,&R2);\n\tx1=365*(N1-1);\n\tx2=365*(N2-1);\n\tfor(i=0;i> year[0] >> month[0] >> day[0];\n\tcin >> year[1] >> month[1] >> day[1];\n\n\tdays1 = accountdays(year[0],month[0],day[0]);\n\tdays2 = accountdays(year[1],month[1],day[1]);\n\tif(year[1] > year[0])\n\t{\n\t\tfor(i = year[0] + 1; i < year[1]; i++)\n\t\t{\n\t\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\tdays2 += 366;\n\t\t\telse days2 += 365;\n\t\t}\n\t\ti = year[0];\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tdays2 += 366 - days1;\n\t\telse days2 += 365 - days1;\n\t\tcout << days2;\n\t}\n\telse cout << days2 - days1;\n\treturn 0;\n}"} +{"label": "80", "index": "39872", "code": "int main()\n{\n\tint startYear,startMonth,startDay, endYear,endMonth,endDay;\n\tint i,day=0;\n\tint m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\n\tfor(i=startYear+1;i=3)\n\t\tday=day+1;\n\t}\n\telse\n\t{\n\t\tif(startMonth>y1>>m1>>d1>>y2>>m2>>d2;\n\tk=0;\n for (i=y1+1;i> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;\n\tint sum = 0, i = 0, j = 0;\n\tint leap[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},\n\t\tping[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tfor(i = startYear; i < endYear; i++)\n\t\tsum = sum + leapYear(i);\n\tfor(i = 1; i < startMonth; i ++)\n\t{\n\t\tif(leapYear(startYear == 366))\n\t\t\tsum = sum - leap[i];\n\t\telse \n\t\t\tsum = sum - ping[i];\n\t}\n\tsum = sum - startDay;\n\tfor(i = 1; i < endMonth; i ++)\n\t{\n\t\tif(leapYear(endYear == 366))\n\t\t\tsum = sum + leap[i];\n\t\telse \n\t\t\tsum = sum + ping[i];\n\t}\n\tsum = sum + endDay;\n\tcout << sum;\n\n\treturn 0;\n}"} +{"label": "80", "index": "39876", "code": "int leap(int);\nint main()\n{\n\tint sy,sm,sd,ey,em,ed,sum=0,a[13],b[13],i;\n\tfor(i=1;i<13;i++)\n\t{\n\t\tif(i==2)\n\t\t{\n\t\t\ta[i]=28;\n\t\t}\n\t\telse if(i==4||i==6||i==9||i==11)\n\t\t{\n\t\t\ta[i]=30;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta[i]=31;\n\t\t}\n\t}\n for(i=1;i<13;i++)\n\t{\n\t\tif(i==2)\n\t\t{\n\t\t\tb[i]=29;\n\t\t}\n\t\telse if(i==4||i==6||i==9||i==11)\n\t\t{\n\t\t\tb[i]=30;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb[i]=31;\n\t\t}\n\t}\n\tcin>>sy>>sm>>sd>>ey>>em>>ed;\n\tif(sy==ey)\n\t{\n\t\tif(sm==em)\n\t\t{\n\t\t\tsum+=ed-sd;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=sm+1;i<=em-1;i++)\n\t\t\t{\n\t\t\tif(i==2)\n\t\t\t{\n\t\t\t\tif(leap(sy))\n\t\t\t\t{\n\t\t\t\t\tsum+=b[i];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsum+=a[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum+=a[i];\n\t\t\t}\n\t\t}\n\t\tsum=sum+ed-1;\n\t\tif(sm==2)\n\t\t{\n\t\t\tif(leap(sy))\n\t\t\t{\n\t\t\t\tsum+=b[2]-sd+1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum+=a[2]-sd+1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum=sum+a[sm]-sd+1;\n\t\t}\n\t}\n\t\tcout<> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tdelta = d2 - d1;\n\tif (m1 < m2)\n\t{\n\t\tfor (; m1 < m2; m1++)\n\t\t{\n\t\t\tif (m1 == 2)\n\t\t\t\tdelta += 28 + isLeapYear(y1) + isLeapYear(y2);\n\t\t\telse\n\t\t\t\tdelta += monthlength[m1];\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (; m1 > m2; m1--)\n\t\t{\n\t\t\tif (m1 == 2)\n\t\t\t\tdelta -= 28 + isLeapYear(y1) + isLeapYear(y2);\n\t\t\telse\n\t\t\t\tdelta -= monthlength[m1];\n\t\t}\n\t}\n\tfor (; y1 < y2; y1++)\n\t\tif (isLeapYear(y1))\n\t\t\tdelta += 366;\n\t\telse\n\t\t\tdelta += 365;\n\tcout << delta;\n\treturn 0;\n}"} +{"label": "80", "index": "39878", "code": "// ???????.cpp \n\n\nint main()\n{\n\tint y1, m1, d1, y2, m2, d2;\n\tint i, num = 0, k;\n\tcin >> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\tk = ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0));\n\tfor (i = y1; i < y2; i++)\n\t\tnum = num + 365 + ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0));\n\tfor (i = 1; i < m1; i++)\n\t{\n\t\tswitch (i)\n\t\t{\n\t\tcase 1: num = num - 31; break;\n\t\tcase 2: num = num - (28 + k); break;\n\t\tcase 3: num = num - 31; break;\n\t\tcase 4: num = num - 30; break;\n\t\tcase 5: num = num - 31; break;\n\t\tcase 6: num = num - 30; break;\n\t\tcase 7: num = num - 31; break;\n\t\tcase 8: num = num - 31; break;\n\t\tcase 9: num = num -30; break;\n\t\tcase 10: num = num - 31; break;\n\t\tcase 11: num = num - 30; break;\n\t\t}\n\t}\n\tnum = num - d1 + d2;\n\tk = ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0));\n\tfor (i = 1; i < m2; i++)\n\t{\n\t\tswitch (i)\n\t\t{\n\t\tcase 1: num = num + 31; break;\n\t\tcase 2: num = num + (28 + k); break;\n\t\tcase 3: num = num + 31; break;\n\t\tcase 4: num = num + 30; break;\n\t\tcase 5: num = num + 31; break;\n\t\tcase 6: num = num + 30; break;\n\t\tcase 7: num = num + 31; break;\n\t\tcase 8: num = num + 31; break;\n\t\tcase 9: num = num + 30; break;\n\t\tcase 10: num = num + 31; break;\n\t\tcase 11: num = num + 30; break;\n\t\t}\n\t}\n\tcout << num << endl;\n\treturn 0;\n}\n\n\n"} +{"label": "80", "index": "39879", "code": "int main()\n{\n int ya,ma,da,yb,mb,db,s=0,i,mon1[13]={0,31,29,31,30,31,30,31,31,30,31,30,31},mon2[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},q;\n cin>>ya>>ma>>da>>yb>>mb>>db;\n for(i=ya;i>q;\n\treturn 0;\n\t\n}\n"} +{"label": "80", "index": "39880", "code": "\nint main()\n{\n\tint total(int year,int month,int day);\n\tint yearo, montho, dayo, totalo,totalt,yeart, montht, dayt,t,y,i,temp=0;\n\tscanf(\"%d %d %d\",&yearo, &montho, &dayo);\n\tscanf(\"%d %d %d\",&yeart, &montht, &dayt);\n//\tif((yearo>yeart)||((yearo=yeart)&&(montho>montht))||((yearo=yeart)&&(montho=montht)&&(dayo>dayt)))\n\t\t\n//\t{\ttotalo=total(yeart, montht, dayt);\n//\t\ttotalt=total(yearo, montho, dayo);\n//\t\tyearo=y;\n///\t\tyearo=yeart;\n//\t\tyeart=y;\n//\t}\n//\telse\n//\t\t\t{\n\t\t\t\ttotalo=total(yearo, montho, dayo);\n\t\ttotalt=total(yeart, montht, dayt);\n//\t}\n\tt=totalt-totalo+365*(yeart-yearo);\n\tfor(i=yearo;i<=yeart;i++)\n\t{\n\t\tif(((i % 4 == 0) &&( i % 100 != 0))|| (i % 400 == 0))\n\t\tt++;\n\t}\n\t\t\tprintf(\"%d\",t);\n\treturn 0;\n}\n\n\t\nint total(int year,int month,int day)\t\n{\tint i;\n\t\tint mday[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\tint total=0;\n\t\tfor( i=1; i2))\n//\t\t\ttotal = total + 1;\n\t\ttotal = total + day;\t\t\n\treturn total;\n}\n"} +{"label": "80", "index": "39881", "code": "int main()\n{\n\tint by,bm,bd;\n\tcin >> by >> bm >> bd;\n\tint ey, em ,ed;\n\tcin >> ey >> em >> ed;\n\tint sum = 0;\n\tfor (int i = by + 1; i < ey; i++)\n\t{\n\t\tint leap = (i % 400 == 0) || (i % 100 != 0 && i % 4 == 0);\n\t\tsum = sum + (leap == 1 ? 366 : 365);\n\t}\n\tint temp = by == ey ? em : 12;\n\tfor (int i = bm; i <= temp; i++)\n\t{\n\t\tint leapb = (by % 400 == 0) || (by % 100 != 0 && by % 4 == 0);\n\t\tif (i == 2)\n\t\t{\n\t\t\tif (leapb)\n\t\t\t\tsum += 29;\n\t\t\telse\n\t\t\t\tsum += 28;\n\t\t}\n\t\tswitch (i)\n\t\t{\n\t\t\t\n\t\t\tcase 1:sum += 31; break;\n\t\t\tcase 3:sum += 31; break;\n\t\t\tcase 5:sum += 31; break;\n\t\t\tcase 7:sum += 31; break;\n\t\t\tcase 8:sum += 31; break;\n\t\t\tcase 10:sum += 31; break;\n\t\t\tcase 12: sum += 31; break;\n\t\t\tcase 4:sum += 30; break;\n\t\t\tcase 6:sum += 30; break;\n\t\t\tcase 9:sum += 30; break;\n\t\t\tcase 11: sum += 30; break;\n\t\t}\n\t}\n\tsum -= bd;\n\ttemp = by == ey ? bm : 1;\n\tfor (int i = temp; i <= em - 1; i++)\n\t{\n\t\tint leape = (ey % 400 == 0) || (ey % 100 != 0 && ey % 4 == 0);\n\t\tif (i == 2)\n\t\t{\n\t\t\tif (leape)\n\t\t\t\tsum += 29;\n\t\t\telse\n\t\t\t\tsum += 28;\n\t\t}\n\t\tswitch (i)\n\t\t{\n\t\t\tcase 1:sum += 31; break;\n\t\t\tcase 3:sum += 31; break;\n\t\t\tcase 5:sum += 31; break;\n\t\t\tcase 7:sum += 31; break;\n\t\t\tcase 8:sum += 31; break;\n\t\t\tcase 10:sum += 31; break;\n\t\t\tcase 12: sum += 31; break;\n\t\t\tcase 4:sum += 30; break;\n\t\t\tcase 6:sum += 30; break;\n\t\t\tcase 9:sum += 30; break;\n\t\t\tcase 11: sum += 30; break;\n\t\t}\n\t}\n\tsum += ed;\n\tif (by == ey && bm == em)\n\t{\n\t\tint leape = (ey % 400 == 0) || (ey % 100 != 0 && ey % 4 == 0);\n\t\tif (bm == 2)\n\t\t{\n\t\t\tif (leape)\n\t\t\t\tsum -= 29;\n\t\t\telse\n\t\t\t\tsum -= 28;\n\t\t}\n\t\tswitch (bm)\n\t\t{\n\t\t\tcase 1:sum -= 31; break;\n\t\t\tcase 3:sum -= 31; break;\n\t\t\tcase 5:sum -= 31; break;\n\t\t\tcase 7:sum -= 31; break;\n\t\t\tcase 8:sum -= 31; break;\n\t\t\tcase 10:sum -= 31; break;\n\t\t\tcase 12: sum -= 31; break;\n\t\t\tcase 4:sum -= 30; break;\n\t\t\tcase 6:sum -= 30; break;\n\t\t\tcase 9:sum -= 30; break;\n\t\t\tcase 11: sum -= 30; break;\n\t\t}\n\t}\n\n\tcout << sum << endl;\n\treturn 0;\n}\n\n"} +{"label": "80", "index": "39882", "code": "int DiJiTian(int year, int month, int day);\nint isRunNian(int year);\nvoid swap(int *a, int *b);\nint main()\n{\n\tint a,b,c,i;\n\tint year1, month1, day1;\n\tint year2, month2, day2;\n\tint result = 0;\n\n\tscanf( \"%d %d %d\", &year1, &month1, &day1);\n\tscanf( \"%d %d %d\", &year2, &month2, &day2);\n\t\n\tif(year1==year2)\n\t{\n\t\tresult = DiJiTian(year1, month1, day1) - DiJiTian(year2, month2, day2);\n if(result < 0)\t\n\t\t\tresult = 0 - result;\n\t}\n\telse\n\t{\n\t\tif(year1 > year2)\n\t\t{\n\t swap(&year1, &year2);\n\t swap(&month1, &month2);\n \tswap(&day1, &day2);\n\t\t}\n\t\tif( isRunNian(year1) )\n\t a = 366 - DiJiTian(year1, month1, day1);\n else\n \ta = 365 - DiJiTian(year1, month1, day1);\n\t\tb = 0;\n for( i = year1 + 1; i < year2; i++){\n \tif(isRunNian(i))\n\t \tb += 366;\n \telse\n \t\tb += 365;\n\t\t}\n\t\tc = DiJiTian(year2, month2, day2);\n\t\tresult=a+b+c;\n\t}\n\tprintf(\"%d\",result);\n\treturn 0;\n}\nint isRunNian(int year){\n\tint result;\n\tif( year%400 == 0 ||(year%4==0 && year%100!=0) )\n\t\tresult = 1;\n\telse\n\t\tresult = 0;\n\treturn result;\t\n}\nint DiJiTian(int year, int month, int day)\n{\n int result = 0, i;\n for( i = 1; i < month; i++){ \t//step1\n\tif(i==1||i==3||i==5||i==7||i==8||i==10||i==12)\n\t result += 31;\t\n\t else if (i == 4 || i ==6 || i == 9 || i==11)\n \t result += 30;\n\telse if(i == 2){\n\t if( isRunNian(year) ) \n\t\tresult += 29;\n\t else\n\t\tresult += 28;\n\t}\n }\n result += day; //step2\n return result;\t\n}\nvoid swap(int *a, int *b)\n{\n\tint e;\n\te = *a;\n\t*a = *b;\n\t*b = e; \n}\n\n"} +{"label": "80", "index": "39883", "code": "\ndouble h,r;\n\nint i,ans = 0,year1,year2,month1,month2,day1,day2,\n num_month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\nint main()\n{\n scanf(\"%d%d%d%d%d%d\",&year1,&month1,&day1,\n &year2,&month2,&day2);\n for(i = year1 + 1;i < year2;++i)\n if(i % 4 == 0 && i % 100 != 0 || i % 400 == 0)\n ++ans;\n ans += 365 * (year2 - year1 - 1);\n for(i = 1;i <= month2 - 1;++i)\n ans += num_month[i];\n for(i = month1 + 1;i <= 12;++i)\n ans += num_month[i];\n ans += day2 + num_month[month1] - day1;\n if((year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) && month1 <= 2)\n ++ans;\n if((year2 % 4 == 0 && year2 % 100 != 0 || year2 % 400 == 0) && month2 > 2)\n ++ans;\n printf(\"%d\\n\",ans);\n return 0; \n}"} +{"label": "80", "index": "39884", "code": "void main()\n{\n\tint y1,m1,d1,y2,m2,d2,num1,num2,num,k;\n\tscanf(\"%d %d %d\\n%d %d %d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\tswitch(m1)\n\t{\n\tcase(1):\n\t\tnum1=365-d1;break;\n\tcase(2):\n\t\tnum1=365-d1-31;break;\n\tcase(3):\n\t\tnum1=365-d1-31-28;break;\n\tcase(4):\n\t\tnum1=365-d1-31*2-28;break;\n\tcase(5):\n\t\tnum1=365-d1-31-28-30;break;\n\tcase(6):\n\t\tnum1=365-d1-31*3-28-30;break;\n\tcase(7):\n\t\tnum1=365-d1-31*3-28-30*2;break;\n\tcase(8):\n\t\tnum1=365-d1-31*4-28-30*2;break;\n\tcase(9):\n\t\tnum1=365-d1-31*5-28-30*2;break;\n\tcase(10):\n\t\tnum1=365-d1-31*5-28-30*3;break;\n\tcase(11):\n\t\tnum1=365-d1-31*6-28-30*3;break;\n\tcase(12):\n\t\tnum1=365-d1-31*7-28-30*4;break;\n\t}\n\tswitch(m2)\n\t{\n\tcase(1):\n\t\tnum2=d2;break;\n\tcase(2):\n\t\tnum2=d2+31;break;\n\tcase(3):\n\t\tnum2=d2+31+28;break;\n\tcase(4):\n\t\tnum2=d2+31*2+28;break;\n\tcase(5):\n\t\tnum2=d2+31+28+30;break;\n\tcase(6):\n\t\tnum2=d2+31*3+28+30;break;\n\tcase(7):\n\t\tnum2=d2+31*3+28+30*2;break;\n\tcase(8):\n\t\tnum2=d2+31*4+28+30*2;break;\n\tcase(9):\n\t\tnum2=d2+31*5+28+30*2;break;\n\tcase(10):\n\t\tnum2=d2+31*5+28+30*3;break;\n\tcase(11):\n\t\tnum2=d2+31*6+28+30*3;break;\n\tcase(12):\n\t\tnum2=d2+31*6+28+30*4;break;\n\t}\n\tnum=num1+num2+365*(y2-y1-1);\n\tfor(k=y1+1;k=3)\n\t\tnum++;\n\tprintf(\"%d\",num);\n}"} +{"label": "80", "index": "39885", "code": "\nint month[13]={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\n\nint yadd(int y)\n{\n if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) return 1;\n else return 0;\n}\nint madd(int y, int m)\n{\n if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) \n\t if (m == 2) return 1;\n return 0;\n}\nint ydays(int y1, int y2)\n{\n\tint ans = 0;\n\twhile (y1!=y2) \n\t{\n\t\tans += yadd(y1) + 365;\n\t\ty1++;\n\t}\n\treturn ans;\n}\nint mdays(int y, int m, int d)\n{\n\tint ans=0, i, j;\n\t// month\n\ti=1; \n\twhile (i2) /*??????????,????????*/\n sum++;\n return sum;\n}\n"} +{"label": "80", "index": "39887", "code": "int main()\n{\n\tint i, year, startyear, startmonth, startday, endyear, endmonth, endday, sum = 0;\n\tint a[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\tcin >> startyear>> startmonth>> startday>> endyear>> endmonth>> endday;\n\tif ((endyear - startyear) > 1)\n\t{\n\t\tfor (year = startyear + 1; year < endyear; year++)\n\t\t{\n\t\t\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) \n\t\t\t\tsum += 366;\n\t\t\telse\n\t\t\t\tsum += 365;\n\t\t}\n\t\tfor (i = startmonth - 1; i < 12; i++)\n\t\t\tsum += a[i];\n\t\tsum -= startday;\n\t\tfor (i = 0; i < endmonth - 1; i++)\n\t\t\tsum += a[i];\n\t\tsum += endday;\n\t}\n\telse if ((endyear - startyear) == 1)\n\t\t{\n\t\tfor (i = startmonth; i < 12; i++)\n\t\t\tsum += a[i];\n\t\tsum -= startday;\n\t\tfor (i = 0; i < endmonth; i++)\n\t\t\tsum += a[i];\n\t\tsum += endday;\n\t\t}\n\telse\n\t{\n\t\tfor (i = startmonth; i < endmonth - 1; i++)\n\t\t\tsum += a[i];\n\t\tif (startmonth != endmonth)\n\t\t\tsum = sum + a[startmonth - 1] - startday + endday;\n\t\telse\n\t\t\tsum = sum + endday - startday;\n\t}\n\tif ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))\n\t\tif (startmonth == 1 || (startmonth == 2 && startday != 29))\n\t\t\tsum++;\n\tif ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))\n\t\tif (endmonth > 2)\n\t\t\tsum++;\n\tcout << sum;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39888", "code": "/*\n * qimokaoshi_3.cpp\n *??:???????????\n * Created on: 2011-1-9\n * Author: jsgl\n */\n\nint year1,year2,month1,month2,day1,day2,d1,d2=0,i;\nint a[13]={0,31,0,31,30,31,30,31,31,30,31,30,31};\nint ntianshu(int year)\n{\n if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n return 366;\n return 365;\n}\nint tianshu(int y,int m,int d)\n{\n\tif(ntianshu(y)==366) a[2]=29;\n\telse a[2]=28;\n\tint day=0;\n\tfor(int i=1;i<=m-1;i++)\n\t\tday=day+a[i];\n\treturn day+d;\n}\nint main()\n{\n\tcin>>year1>>month1>>day1;\n\tcin>>year2>>month2>>day2;\n\td1=tianshu(year1,month1,day1);\n\tfor(i=year1;i<=year2-1;i++)\n\t\td2=d2+ntianshu(i);\n\td2=d2+tianshu(year2,month2,day2);\n\tcout<> sY >> sM >> sD >> eY >> eM >> eD;\n\tif(sY % 4 == 0 && sY % 100 != 0 || sY % 400 == 0)\n\t{\n\t\tfor(i = 1; i < sM; i++)\n\t\t{\n\t\t\tspD += month2[i - 1];\n\t\t}\n\t\tspD += sD;\n\t\tspD = 366 - spD;\n\t}\n\telse\n\t{\n\t\tfor(i = 1; i < sM; i++)\n\t\t{\n\t\t\tspD += month1[i - 1];\n\t\t}\n\t\tspD += sD;\n\t\tspD = 365 - spD;\n\t}\n\tif(eY % 4 == 0 && eY % 100 != 0 || eY % 400 == 0)\n\t{\n\t\tfor(i = 1; i < eM; i++)\n\t\t{\n\t\t\tepD += month2[i - 1];\n\t\t}\n\t\tepD += eD;\n\t}\n\telse\n\t{\n\t\tfor(i = 1; i < eM; i++)\n\t\t{\n\t\t\tepD += month1[i - 1];\n\t\t}\n\t\tepD += eD;\n\t}\n\tif(sY == eY)\n\t{\n\t\tif(sY % 4 == 0 && sY % 100 != 0 || sY % 400 == 0)\n\t\t{\n\t\t\tpD = spD + epD - 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpD = spD + epD - 365;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(i = sY + 1; i < eY; i++)\n\t\t{\n\t\t\tif(i % 4 == 0 && i % 100 != 0 || i % 400 == 0)\n\t\t\t{\n\t\t\t\typD += 366;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\typD += 365;\n\t\t\t}\n\t\t}\n\t\tpD = spD + epD + ypD;\n\t}\n\tcout << pD << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39891", "code": "int main()\n{\n\tint day[2][12] = {{31,29 ,31,30 ,31 , 30 , 31 ,31 , 30 ,31 , 30 ,31},{31,28 ,31,30 ,31 , 30 , 31 ,31 , 30 ,31 , 30 ,31}};\n\tint year1 , year2 , month1 ,month2 ,day1, day2 , i , j , k , sum=0 , past= 0 , will= 0;\n\tcin >> year1 >> month1 >> day1 ;\n\tcin >> year2 >> month2 >> day2 ;\n\tif (year1 == year2)\n\t{\n\t\tif ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0) )\n\t\t{\t\n\t\t\tfor (i = month1 ; i <=month2 ;i++)\n\t\t\t\tsum+= day[0][i-1] ;\n\t\t\tsum = sum - day1 - (day[0][month2-1] - day2 ) ;\n\t\t\tcout << sum ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = month1 ; i <=month2 ;i++)\n\t\t\t\tsum+= day[1][i-1] ;\n\t\t\tsum = sum - day1 - (day[1][month2-1] - day2 ) ;\n\t\t\tcout << sum ;\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor (i = year1 ; i < year2 ; i++)\n\t\t{\n\t\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t{\n\t\t\t\tfor (j = 0 ; j< 12 ; j++)\n\t\t\t\t\tsum+=day[0][j] ;\n\t\t\t}\n\t\t\telse\n\t\t\t\tfor (j = 0 ; j < 12 ; j++)\n\t\t\t\t\tsum+=day[1][j] ;\n\t\t}\n\t\tif ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n\t\t{\t\n\t\t\tfor (i = 0 ; i < month1 ;i++)\n\t\t\t\tpast+= day[0][i] ;\n\t\t\tpast = past - (day[0][month1-1] - day1 ) ;\n\t\t\t\tsum = sum - past ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = 0 ; i < month1 ;i++)\n\t\t\t\tpast+= day[1][i] ;\n\t\t\tpast = past - (day[1][month1-1] - day1 ) ;\n\t\t\tsum = sum - past ;\n\t\t}\n\t\tif ((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))\n\t\t{\tfor (i = 0 ; i < month2 ;i++)\n\t\t\t\twill+= day[0][i] ;\n\t\t\twill = will - (day[0][month2-1] - day2 ) ;\n\t\t\t\tsum = sum + will ;\n\t\t\tcout << sum ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = 0 ; i < month2 ;i++)\n\t\t\t\twill+= day[1][i] ;\n\t\t\twill = will - (day[0][month2-1] - day2 ) ;\n\t\t\tsum = sum + will ;\n\t\t\tcout << sum ;\n\t\t}\n\t}\n\treturn 0 ;\n}"} +{"label": "80", "index": "39892", "code": "\nint mds[2][12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,\n 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\nint leap(int year)\n{\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)\n return 1;\n return 0;\n}\n\nint days(int sm, int sd, int em, int ed, int y)\n{\n int lm, ld, um, ud;\n int total;\n if (sm < em)\n {\n lm = sm; um = em; ld = sd; ud = ed;\n }\n else if (sm > em)\n {\n lm = em; um = sm; ld = ed; ud = sd;\n }\n else if (sm == em)\n {\n if (sd > ed) return (sd - ed);\n return (ed - sd);\n }\n for (int i = lm; i < um; i++)\n total += mds[leap(y)][i - 1];\n if (ud > ld) total += ud - ld;\n else total -= ud - ld;\n return total;\n}\n\nint main()\n{\n int sy, sm, sd, ey, em, ed, cd = 0;\n cin >> sy >> sm >> sd >> ey >> em >> ed;\n int i;\n for (i = sy; i < ey; i++)\n cd += leap(i) + 365;\n if (em > sm || (em == sm && ed >= sd))\n cd += days(sm, sd, em, ed, ey);\n else cd -= days(sm, sd, em, ed, ey) - 1;\n cout << cd << endl;\n return 0;\n}\n \n \n"} +{"label": "80", "index": "39893", "code": "\n\n\nint main() {\n\tint a[2][3];\n\tint i,j,n=0,m=0,p=0;\n\tint b[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tint c[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\t\n\n\tfor(i=0;i<2;i=i+1){\n\t\tfor(j=0;j<3;j=j+1){\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t}\n\t\t\n\t}\n\tif(a[0][0]!=a[1][0]){\n\tfor(i=a[0][0]+1;i<=a[1][0]-1;i=i+1){\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)){\n\t\t\tn=n+366;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tn=n+365;\n\t\t}\n\t\t\n\t}\n\tif((a[1][0] % 4 == 0 && a[1][0] % 100 != 0) || (a[1][0] % 400 == 0)){\n\t\tfor(i=0;i+1<=a[1][1]-1;i=i+1){\n\t\tm=m+c[i];\t\n\t\t}\n\t\tm=m+a[1][2];\n\t\t\n\t}\n else{\n\t\tfor(i=0;i+1<=a[1][1]-1;i=i+1){\n\t\tm=m+b[i];\t\n\t\t}\n\t\tm=m+a[1][2];\n\t\n\t}\n\tif((a[0][0] % 4 == 0 && a[0][0] % 100 != 0) || (a[0][0] % 400 == 0)){\n\t\tfor(i=a[0][1];i+1<=12;i=i+1){\n\t\tp=p+c[i];\t\n\t\t}\n\t\tp=p+c[a[0][1]-1]-a[0][2];\n\t\n\t}\n\telse{\n\t\tfor(i=a[0][1];i+1<=12;i=i+1){\n\t\tp=p+b[i];\t\n\t\t}\n\t\tp=p+b[a[0][1]-1]-a[0][2];\n\t\n\t}\n}\n\nelse {\n if(a[0][1]!=a[1][1]){\n\t if((a[1][0] % 4 == 0 && a[1][0] % 100 != 0) || (a[1][0] % 400 == 0)){\n\t \tfor(i=a[0][1]-1;i+1<=a[1][1]-1;i=i+1){\n\t\t\tn=n+c[i];\n\t\t}\n\t\tn=n-a[0][2]+a[1][2];\n\t}\n\telse{\n\t\tfor(i=a[0][1]-1;i+1<=a[1][1]-1;i=i+1){\n\t\t\tn=n+b[i];\n\t\t}\n\t\tn=n-a[0][2]+a[1][2];\n\t\t\n\t}\n\n\t\n\t\n}\nelse{\n\tn=a[1][2]-a[0][2];\n}\n}\n\t\n\n\tn=n+m+p;\n\tprintf(\"%d\",n);\n\t\n\t\n\t\n\t\n\t\n\t\n\treturn 0;\n}"} +{"label": "80", "index": "39894", "code": "int main ( )\n{\n\tint i, j, num = 0, startYear, startMonth, startDay, endYear, endMonth, endDay,\n\t\tYear[12] = {31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tcin >> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;\n\tif (startYear == endYear)\n\t{\n\t\tif((startYear % 4 == 0 && startYear % 100 != 0)||(startYear % 400 == 0))\n\t\t\t\tYear[1] = 29;\n\t\telse Year[1] = 28;\n\t\tif(startMonth == endMonth)\n\t\t\tnum = num + endDay - startDay;\n\t\telse\n\t\t{\n\t\t\tfor (i = startMonth-1;i < endMonth;i++)\n\t\t\t{\n\t\t\t\tif(i == startMonth-1)\n\t\t\t\t\tnum = num + Year[i] - startDay;\n\t\t\t\telse if(i == endMonth-1)\n\t\t\t\t\tnum = num + endDay;\n\t\t\t\telse num = num + Year[i];\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfor(j = startYear;j <= endYear;j++)\n\t\t{\n\t\t\tif(j == startYear)\n\t\t\t{\n\t\t\t\tif((startYear % 4 == 0 && startYear % 100 != 0)||(startYear % 400 == 0))\n\t\t\t\t\tYear[1] = 29;\n\t\t\t\telse Year[1] = 28;\n\t\t\t\tfor (i = startMonth-1;i < 12;i++)\n\t\t\t\t{\n\t\t\t\t\tif (i == startMonth-1)\n\t\t\t\t\t\tnum = num + Year[i] - startDay;\n\t\t\t\t\telse num = num + Year[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (j == endYear)\n\t\t\t{\n\t\t\t\tif((endYear % 4 == 0 && endYear % 100 != 0)||(endYear % 400 == 0))\n\t\t\t\t\tYear[1] = 29;\n\t\t\t\telse Year[1] = 28;\n\t\t\t\tfor (i = 0;i < endMonth;i++)\n\t\t\t\t{\n\t\t\t\t\tif (i == endMonth - 1)\n\t\t\t\t\t\tnum = num + endDay;\n\t\t\t\t\telse num = num + Year[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif((j % 4 == 0 && j % 100 != 0)||(j % 400 == 0))\n\t\t\t\t\tYear[1] = 29;\n\t\t\t\telse Year[1] = 28;\n\t\t\t\tfor (i = 0;i < 12;i++)\n\t\t\t\t\tnum = num + Year[i];\n\t\t\t}\n\t }\n\t}\n\tcout << num <>y1>>m1>>d1>>y2>>m2>>d2;\n int f(int,int,int);\n cout<>year1>>mon1>>day1>>year2>>mon2>>day2;\n\tfor(i=1;i<=3000;i++)\n\t{\n\t\tif((i%4==0&&i%100!=0)||(i%400==0))\n\t\t\tyear[i]=366;\n\t\telse \n\t\t\tyear[i]=365;\n\t}\n\tif(year1>y[0]>>m[0]>>d[0]>>y[1]>>m[1]>>d[1];\n\ttd=d[1]-d[0];\n\tif((y[1]% 4 == 0&&y[1] % 100 != 0) || (y[1] % 400 == 0))\n\t{\n\t\tif(m[1]m[0])\n\t\t\tfor(i=m[0];im[0])\n\t\t\tfor(i=m[0];iy[0])\n\t{\n\tif(m[0]<=2)\n\t{\n\t\tif((y[0]% 4 == 0&&y[0] % 100 != 0) || (y[0] % 400 == 0))\n\t\t\tty=ty+366;\n\t\telse\n\t\t\tty=ty+365;\n\t}\n\telse\n\t{\n\t\tty=ty+365;\n\t}\n\t}\n\tfor(i=y[0]+1;i2&&endMonth<=8){\n for(i=1;i8){\n if((endYear % 4 == 0 &&endYear % 100 != 0) || (endYear % 400 == 0))\n s=s+29+4*31+2*30;\n else\n s=s+28+4*31+2*30;\n for(i=8;i2&&startMonth<=8){\n for(i=1;i8){\n if((endYear % 4 == 0 &&endYear % 100 != 0) || (endYear % 400 == 0))\n a=a+29+4*31+2*30;\n else\n a=a+28+4*31+2*30;\n for(i=8;i> year1 >> mou1 >> date1;\n\tcin >> year2 >> mou2 >> date2;\n\n\tfor (i = 1; i <= mou1 - 1; i ++)\n\t{\n\t\tday1 += mou[pan(year1)][i];\n\t}\n\tday1 += date1;\n\n\tfor (i = year1; i < year2; i ++)\n\t{\n\t\tday2 = day2 + 365 + pan(i);\n\t}\n\tfor (i = 1; i <= mou2 - 1; i ++)\n\t{\n\t\tday2 += mou[pan(year2)][i];\n\t}\n\tday2 += date2;\n\n\tint\tcha = labs(day1 - day2);\n\tcout << cha << endl;\n\n\n\n\n\nreturn 0;\n}\nint\t\tpan(int year)\n{\n\tif(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}"} +{"label": "80", "index": "39904", "code": "int X1(int y ,int z)//???????????????????\n{\n int j;\n switch (y) //?????????????\n {\n case 1:j = z-1;break;\n case 2:j = 31 + z-1;break;\n case 3:j = 59 + z-1;break;\n case 4:j = 90 + z-1;break;\n case 5:j = 120 + z-1;break;\n case 6:j = 151 + z-1;break;\n case 7:j = 181 + z-1;break;\n case 8:j = 212 + z-1;break;\n case 9:j = 243 + z-1;break;\n case 10:j = 273 + z-1;break;\n case 11:j = 304 + z-1;break;\n default:j = 334 + z-1;break;\n }\n return (j);\n}\nint X2(int y ,int z)//??????????????????\n{\n int k;\n switch (y) //?????????????\n {\n case 1:k = z-1;break;\n case 2:k = 31 + z-1;break;\n case 3:k = 60 + z-1;break;\n case 4:k = 91 + z-1;break;\n case 5:k = 121 + z-1;break;\n case 6:k = 152 + z-1;break;\n case 7:k = 182 + z-1;break;\n case 8:k = 213 + z-1;break;\n case 9:k = 244 + z-1;break;\n case 10:k = 274 + z-1;break;\n case 11:k = 305 + z-1;break;\n default:k = 335 + z-1;break;\n }\n return (k);\n}\nint main()\n{\n\tint y1,m1,d1,y2,m2,d2,num=0;\n cin>>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tif (y1==y2)//????????\n\t{\n\t if (y1%100==0)//?????????\n\t {\n\t if (y1%400==0)//???????\n\t\t\t num=num+X2(m2,d2)-X2(m1,d1);\n\t\t else num=num+X1(m2,d2)-X1(m1,d1);\n\t }\n\t else \n\t {\n\t if (y1%4==0)\n\t\t\t num=num+X2(m2,d2)-X2(m1,d1);\n\t\t else num=num+X1(m2,d2)-X1(m1,d1);\n\t }\n\t}\n\telse \n\t{\n\tif (y1%100==0)\n\t{\n\t if (y1%400==0)\n\t {\n\t num=num+366-X2(m1,d1);\n\t\t for (int t=y1+1;t>y1>>m1>>d1>>y2>>m2>>d2;\n\tint i,sum=0;\n\tfor (i=y1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tif(y1==y2)\n\t{\n\t\tif(m1==m2)\n\t\t\tsum=d2-d1;\n\t\telse\n\t\t{\n\t\t\tif(judge(y1))\n\t\t\t{\n\t\t\t\tfor(i=m1+1;im1;i--)\n\t\t\t{\n\t\t\t\tsum=sum+run[i];\n\t\t\t}\n\t\t\tsum=sum+run[m1]-d1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\tfor(i=12;i>m1;i--)\n\t\t\t\t{\n\t\t\t\t\tsum=sum+pin[i];\n\t\t\t\t}\n\t\t\t\tsum=sum+pin[m1]-d1;\n\t\t}\n\t\tfor(i=y1+1;i> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tfor(year = year1 + 1; year <= year2 -1; year++)\n\t{\n\t\tday += 365 + leap(year);\n\t}\n\tif(year1 < year2)\n\t{\n\t\tfor(month = 1; month < month2; month++)\n\t\t\t\tday += monthday[month];\n\t\tday += day2;\n\t\tif(leap(year2) && month2 >= 3)\n\t\t\tday++;\n\t\tfor(month = month1; month <= 12; month++)\n\t\t\tday+= monthday[month];\n\t\tday -= day1;\n\t\tif(leap(year1) && month1 < 3)\n\t\t\tday++;\n\t}\n\telse\n\t{\n\t\tif(month1 != month2)\n\t\tfor(month = month1; month < month2; month++)\n\t\t{\n\t\t\t\n\t\t\t{\n\t\t\t\tday += monthday[month];\n\t\t\t\tday += day2;\n\t\t\t\tday -= day1;\n\t\t\t\tif(leap(year1) && month1 < 3)\n\t\t\t\t\tday++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t\t\tday = day2 - day1;\n\t}\n\tcout << day << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39908", "code": "/*\n * ????1000012845_0.cpp\n * ?????2011-1-9\n * ???????\n * ????????????????\n */\n\nint main()\n{\n int sy,sm,sd,ey,em,ed,sum=0,i;\n int m[12]={31,28,31,30,31,30,31,31,30,31,30,31},n[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n cin>>sy>>sm>>sd;\n cin>>ey>>em>>ed;\n for(i=sy+1;isy)\n {\n if((ey%4==0&&ey%100!=0)||(ey%400==0))\n {\n\t for(i=0;ism-1;i--)\n\t\t sum=sum+n[i];\n\t sum=sum+n[sm-1]-sd;\n }\n else\n {\n\t for(i=11;i>sm-1;i--)\n\t\t sum=sum+m[i];\n\t sum=sum+m[sm-1]-sd;\n }\n }\n else if((ey%4==0&&ey%100!=0)||(ey%400==0))\n {\n\t if(sm> y1 >> m1 >>d1 >> y2 >> m2 >> d2;\n\tint yg1 = 0, yg2 = 0;\n\tif ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))\n\t\tyg1 = 1;\n\tif ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))\n\t\tyg2 = 1;\n\tint date1 = 0, date2 = 0;\n\tint i, j;\n\tfor (i = 1; i < m1; i++)\n\t{\n\t\tif ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 1 || i == 10 || i == 12)\n\t\t\tdate1 = date1 + 31;\n\t\tif ( i == 4 || i == 6 || i == 9 || i == 11 )\n\t\t\tdate1 = date1 + 30;\n\t\tif (i == 2)\n\t\t{\n\t\t\tif (yg1)\n\t\t\t\tdate1 = date1 + 29;\n\t\t\telse\n\t\t\t\tdate1 = date1 + 28;\n\t\t}\n\t}\n\tdate1 = date1 + d1;\n\tfor (i = 1; i < m2; i++)\n\t{\n\t\tif ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 1 || i == 10 || i == 12)\n\t\t\tdate2 = date2 + 31;\n\t\tif ( i == 4 || i == 6 || i == 9 || i == 11 )\n\t\t\tdate2 = date2 + 30;\n\t\tif (i == 2)\n\t\t{\n\t\t\tif (yg2)\n\t\t\t\tdate2 = date2 + 29;\n\t\t\telse\n\t\t\t\tdate2 = date2 + 28;\n\t\t}\n\t}\n\tdate2 = date2 + d2;\n\tint date = 0;\n\tfor (i = y1; i < y2; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tdate = date + 366;\n\t\telse \n\t\t\tdate = date + 365;\n\t}\n\tdate = date + date2 - date1;\n\tcout << date;\n\treturn 0;\n}"} +{"label": "80", "index": "39910", "code": "main() \n{ \n long y,i,a[2],b[2],c[2],z[2]; \n int x[]={0,0,31,59,90,120,151,181,212,243,273,304,334}; \n scanf(\"%ld%ld%ld\",&a[0],&b[0],&c[0]);\n scanf(\"%ld%ld%ld\",&a[1],&b[1],&c[1]);\n for(i=0;i<2;i++) \n { y=a[i]/4-a[i]/100+a[i]/400+a[i]*365; \n if((a[i]%(a[i]%100?4:400)==0)&&b[i]<3)y--; \n z[i]=x[b[i]]+y+c[i]; \n } \n printf(\"%ld\\n\",z[1]-z[0]); \n}"} +{"label": "80", "index": "39911", "code": "void main()\n{\n\tint i,s,a,b,c,d,e,f,x,y,z;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tscanf(\"%d %d %d\",&d,&e,&f);\n\ts=(d-a)*365;\n\tfor(x=0,i=a;i<=d-1;i++)\n\t{\n\t\tif(i%4==0&&i%100!=0||i%400==0) x=x+1;\n\t}\n\ts+=x;s=s-c+f;\n\ty=30*(b-1); for(x=1;x> year1 >> month1 >> day1 >> year2 >> month2 >> day2 ;\n\tif ((year1 % 4 == 0 && year1 % 100 != 0) ||(year1 % 400 == 0) )\n\t\trun1 = 1 ;\n\tif ((year2 % 4 == 0 && year2 % 100 != 0) ||(year2 % 400 == 0) )\n\t\trun2 = 1;\n\tif ( year1 == year2 ) {\n\t\tif ( month1 == month2 ) {\n\t\t\tday = day2 - day1 ;\n\t\t}\n\t\telse {\n\t\t\t\t\tday += ( Month[month1]-day1 ) ;\n\t\t\t\tday += day2 ;\n\t\t\t\tfor ( i = (month1+1) ; i < month2 ; i ++ )\n\t\t\t\t\tday += Month[i];\n\t\t\t\tif ( (month1 <= 2 ) && (month2 > 2) && (run1 == 1 ))\n\t\t\t\t\tday ++ ;\n\t\t}\n\t}\n\telse {\n\t\tday += (Month[month1] - day1) ;\n\t\tfor ( i = (month1+1) ; i <= 12 ; i ++ )\n\t\t\tday += Month[i] ;\n\t\tif ( ( run1 == 1 ) && ( month1 <=2 ) )\n\t\t\tday ++ ;\n\t\tday += day2 ;\n\t\tfor ( i = 1 ; i < month2 ; i ++ )\n\t\t\tday += Month[i] ;\n\t\tif ( ( month2 > 2 ) && ( run2 == 1 ) )\n\t\t\tday++ ;\n\t\tfor ( i = (year1+1) ; i < year2 ; i ++ ) {\n\t\t\tday += 365 ;\n\t\t\tif ((i % 4 == 0 && i % 100 != 0) ||(i % 400 == 0) )\n\t\t\t\tday ++ ;\n\t\t}\n\t}\n\tcout << day ;\n}"} +{"label": "80", "index": "39913", "code": "\nint main()\n{\n int i,j,k,days1=0,days2=0;\n int days=0,leap_year=0,startYear,startMonth,startDay,endYear,endMonth,endDay;\n int year[2]={365,366},month[24]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};\n cin >> startYear >> startMonth >> startDay;\n cin >> endYear >> endMonth >> endDay;\n if(startYear==endYear)\n {\n if((startYear % 4 == 0 && startYear %100 != 0 )||( startYear % 400 == 0))\n {\n for(i=0;i> sy>>sm >> sd >> ey>> em>>ed;\n\tif (sy==ey)\n\t\tif (sm == em)\n\t\t\td=ed-sd;\n\t\telse\n\t\t{\n\t\t\tif(Is(sy))\n\t\t\t\ta[1]=29;\n\t\t\telse\n\t\t\t\ta[1]=28;\n\t\t\tfor (m=sm+1;m<=em-1;m++)\n\t\t\t\td=d+a[m-1];\n\t\t\td=d+a[sm-1]-sd+ed;\n\t\t}\n\telse\n\t{\n\t\tif(Is(sy))\n\t\t\ta[1]=29;\n\t\telse\n\t\t\ta[1]=28;\n\t\td=d+a[sm-1]-sd;\n\t\tfor (m=sm+1;m<=12;m++)\n\t\t\td=d+a[m-1];\n\t\tif(Is(ey))\n\t\t\ta[1]=29;\n\t\telse\n\t\t\ta[1]=28;\n\t\td=d+ed;\n\t\tfor (m=1;m<=em-1;m++)\n\t\t\td=d+a[m-1];\n\t\tfor (y=sy+1;y<=ey-1;y++)\n\t\t\tif(Is(y))\n\t\t\t\td=d+366;\n\t\t\telse\n\t\t\t\td=d+365;\n\t}\n\n\tcout << d <>y[0]>>m[0]>>d[0]>>y[1]>>m[1]>>d[1];\n\tif((y[1]-y[0])>0)\n\t{\n\t\tif((y[0]%4==0&&y[0]%100!=0)||(y[0]%400)==0)\n\t\t\ta[2]=29;\n\t\telse\n\t\t\ta[2]=28;\t\n\t\tday=day+(a[m[0]]-d[0]);\n\t\tfor(i=m[0]+1;i<=12;i++)\n\t\t\tday+=a[i];\n\t\tif((y[1]%4==0&&y[1]%100!=0)||(y[1]%400)==0)\n\t\t\ta[2]=29;\n\t\telse\n\t\t\ta[2]=28;\n\t\tfor(i=1;i<=m[1]-1;i++)\n\t\t\tday+=a[i];\n\t\tday+=d[1];\n\t\twhile(y[1]-y[0]>1)\n\t\t{\n\t\t\ty[0]++;\n\t\t\tif((y[0]%4==0&&y[0]%100!=0)||(y[0]%400)==0)\n\t\t\t\tday+=366;\n\t\t\telse\n\t\t\t\tday+=365;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif((m[1]-m[0])>0)\n\t\t{\n\t\t\tif((y[0]%4==0&&y[0]%100!=0)||(y[0]%400)==0)\n\t\t\t\ta[2]=29;\n\t\t\telse\n\t\t\t\ta[2]=28;\t\n\t\t\tday=day+(a[m[0]]-d[0]);\n\t\t\tday+=d[1];\n\t\t\tfor(i=m[0]+1;i<=m[1]-1;i++)\n\t\t\t\tday+=a[i];\n\t\t}\n\t\telse\n\t\t\tday=d[1]-d[0];\n\t}\n\tcout<2) sum+=total[m2-1]-total[m1-1]+d2-d1+1; \n\t}\n\t\n\tif (y2>y1){\n for(j=y1+1;j2) sum+=total[m2-1]+d2+1;\n\t}\n \n\tprintf(\"%d\",sum);\n\treturn 0;\n}\n\nint leap(int y){\n\tint j;\n\tif (y%400==0 || y%100!=0 && y%4 == 0) j=1;\n\telse j=0;\n\treturn j;\n}"} +{"label": "80", "index": "39917", "code": "int main()\n{\n\tint a[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};\n\tint year1,month1,date1,year2,month2,date2,day=0,year;\n\tcin>>year1>>month1>>date1>>year2>>month2>>date2;\n\tif(year1==year2)\n\t{\n\t\tif(month1==month2)\n\t\t\tday+=(date2-date1);\n\t\telse if(month1> y[0] >> m[0] >> d[0];\n\tcin >> y[1] >> m[1] >> d[1];\n\tfor (int i = y[0]; i < y[1]; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t{\n\t\t\tsum += 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum += 365;\n\t\t}\n\t}\n\tfor (int j = 1; j < m[0]; j++)\n\t{\n\t\tif ((y[0] % 4 == 0 && y[0] % 100 != 0) || y[0] % 400 == 0)\n\t\t{\n\t\t\tdec += Lmon[j];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdec += mon[j];\n\t\t}\n\t}\n\tdec += d[0];\n\tsum -= dec;\n\tfor (int k = 0; k < m[1]; k++)\n\t{\n\t\tif ((y[1] % 4 == 0 && y[1] % 100 != 0) || y[1] % 400 == 0)\n\t\t{\n\t\t\tplu += Lmon[k];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplu += mon[k];\n\t\t}\n\t}\n\tplu += d[1];\n\tsum += plu;\n\tcout << sum << endl;\n\n\treturn 0;\n}"} +{"label": "80", "index": "39919", "code": "int main()\n{\n\tint di(int x,int y,int z);\n\tint a,b,c,d,e,f,day1,day2,sum=0,i;\n\tscanf(\"%d%d%d%d%d%d\",&a,&b,&c,&d,&e,&f);\n\tfor(i=a;i2)\n N=N+1;\n return(N);\n}"} +{"label": "80", "index": "39921", "code": "int main()\n{\n\tint year[2],month[2],day[2],a[][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31},i,j,flag[2];\n\tint count[2]={0,0},b[2]={365,366},c[2]={0,0}/*????????????????*/;\n\tfor(i=0;i<2;i++)\n\t{\n\t\tcin>>year[i]>>month[i]>>day[i];\n\t}\n\tif(year[0]>year[1])\n\t{\n\t\tj=year[1];\n\t\tyear[1]=year[0];\n\t\tyear[0]=j;\n\t\tj=month[1];\n\t\tmonth[1]=month[0];\n\t\tmonth[0]=j;\n\t\tj=day[1];\n\t\tday[1]=day[0];\n\t\tday[0]=j;\n\t}\n\tflag[0]=year[0]%4==0&&year[0]%100!=0||year[0]%400==0;\n\tflag[1]=year[1]%4==0&&year[1]%100!=0||year[1]%400==0;\n\tcount[0]+=day[0]-1;\n\tcount[1]+=day[1]-1;\n\tfor(i=0;i<2;i++)\n\t{\n\t\twhile(c[i]+1>mm;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39922", "code": "\nint main()\n{\n int year1,month1,day1;\n int q,sum1,R1;\n int year2,month2,day2;\n int sum2,R2; \n int i,j,k,sum;\n int sum3=0;\n sum1=0;R1=0;\n sum2=0;R2=0;\n scanf(\"%d%d%d\\n\",&year1,&month1,&day1);\n scanf(\"%d%d%d\",&year2,&month2,&day2);\n\n /*????*/\n if(year1%100==0)\n {\n if(year1%400==0) R1=1;\n\t else R1=0;\n }\n else \n {\n if(year1%4==0) R1=1;\n\t else R1=0;\n }\n\n\n\n\n/*??????????????*/\n if(month1==1) \n {\n\t sum1=day1;\n//\t printf(\"%d\\n\",sum1);\n }\n else\n {\n if(month1==2)\n\t{\n\t\tsum1=31+day1;\n//\t\tprintf(\"%d\\n\",sum1);\n\t}\n\telse\n\t{\n\t if(R1==0) /*???*/\n\t {\n\t\tif(month1==3) sum1=31+28+day1;\n\t if(month1==4) sum1=31+28+31+day1;\n\t\tif(month1==5) sum1=31+28+31+30+day1;\n\t\tif(month1==6) sum1=31+28+31+30+31+day1;\n\t\tif(month1==7) sum1=31+28+31+30+31+30+day1;\n\t\tif(month1==8) sum1=31+28+31+30+31+30+31+day1;\n\t\tif(month1==9) sum1=31+28+31+30+31+30+31+31+day1;\n\t\tif(month1==10) sum1=31+28+31+30+31+30+31+31+30+day1;\n\t\tif(month1==11) sum1=31+28+31+30+31+30+31+31+30+31+day1;\n\t\tif(month1==12) sum1=31+28+31+30+31+30+31+31+30+31+30+day1;\n//\t\tprintf(\"%d\\n\",sum1);\n\t }\n\n\t if(R1==1)\n\t { \n\t \tif(month1==3) sum1=31+29+day1;\n\t if(month1==4) sum1=31+29+31+day1;\n\t\tif(month1==5) sum1=31+29+31+30+day1;\n\t\tif(month1==6) sum1=31+29+31+30+31+day1;\n\t\tif(month1==7) sum1=31+29+31+30+31+30+day1;\n\t\tif(month1==8) sum1=31+29+31+30+31+30+31+day1;\n\t\tif(month1==9) sum1=31+29+31+30+31+30+31+31+day1;\n\t\tif(month1==10) sum1=31+29+31+30+31+30+31+31+30+day1;\n\t\tif(month1==11) sum1=31+29+31+30+31+30+31+31+30+31+day1;\n\t\tif(month1==12) sum1=31+29+31+30+31+30+31+31+30+31+30+day1;\n//\t\tprintf(\"%d\\n\",sum1);\n\t }\n\n\t} \n }\n\n \n\n\n\n /*????*/\n if(year2%100==0)\n {\n if(year2%400==0) R2=1;\n\t else R2=0;\n }\n else \n {\n if(year2%4==0) R2=1;\n\t else R2=0;\n }\n\n\n\n\n/*??????????????*/\n if(month2==1) \n {\n\t sum2=day2;\n // printf(\"%d\\n\",sum2);\n }\n else\n {\n if(month2==2) \n\t{\n\t\tsum2=31+day2;\n//\t\tprintf(\"%d\\n\",sum2);\n\t}\n\telse\n\t{\n\t if(R2==0) /*???*/\n\t {\n\t\tif(month2==3) sum2=31+28+day2;\n\t if(month2==4) sum2=31+28+31+day2;\n\t\tif(month2==5) sum2=31+28+31+30+day2;\n\t\tif(month2==6) sum2=31+28+31+30+31+day2;\n\t\tif(month2==7) sum2=31+28+31+30+31+30+day2;\n\t\tif(month2==8) sum2=31+28+31+30+31+30+31+day2;\n\t\tif(month2==9) sum2=31+28+31+30+31+30+31+31+day2;\n\t\tif(month2==10) sum2=31+28+31+30+31+30+31+31+30+day2;\n\t\tif(month2==11) sum2=31+28+31+30+31+30+31+31+30+31+day2;\n\t\tif(month2==12) sum2=31+28+31+30+31+30+31+31+30+31+30+day2;\n // \tprintf(\"%d\\n\",sum2);\n\t }\n\n\t if(R2==1)\n\t { \n\t \tif(month2==3) sum2=31+29+day2;\n\t if(month2==4) sum2=31+29+31+day2;\n\t\tif(month2==5) sum2=31+29+31+30+day2;\n\t\tif(month2==6) sum2=31+29+31+30+31+day2;\n\t\tif(month2==7) sum2=31+29+31+30+31+30+day2;\n\t\tif(month2==8) sum2=31+29+31+30+31+30+31+day2;\n\t\tif(month2==9) sum2=31+29+31+30+31+30+31+31+day2;\n\t\tif(month2==10) sum2=31+29+31+30+31+30+31+31+30+day2;\n\t\tif(month2==11) sum2=31+29+31+30+31+30+31+31+30+31+day2;\n\t\tif(month2==12) sum2=31+29+31+30+31+30+31+31+30+31+30+day2;\n//\t\tprintf(\"%d\\n\",sum2);\n\t }\n\n\t} \n }\n\n\n\n /*???????*/\n\n if(R1==0) q=365-sum1;\n if(R1==1) q=366-sum1;\n\n if(year1==year2) \n {\n sum=sum2-sum1;\n\tprintf(\"%d\",sum);\n }\n \n if(year2-year1==1)\n\t {\n\t sum=q+sum2;\n\t printf(\"%d\\n\",sum);\n\t }\n\n\n if(year2-year1>1)\n {\n for(j=year1+1;j2)\n\t\t\t\t{\n\t\t\t\t\tfor(i=b;i>year1>>month1>>day1>>year2>>month2>>day2;\n\tint montha[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint monthb[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint sum=0;\n\tfor (int i=year1+1;i2)||(y2>y1))\n\t\t\ts=s+1;\n\tif(((y2%4==0)&&(y2%100!=0))||(y2%400==0))\n\t\tif((m2>2)&&((y1=1;sM=sM-1)\n\t{\n\t\tif(sM==4||sM==6||sM==9||sM==11)\n\t\t{\n\t\t\ti=i+1;\n\t\t}\n\t\telse if(sM==2)\n\t\t{\n\t\t\tif((sY%4==0&&sY%100!=0)||(sY%400==0))\n\t\t\t{\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\ti=i+3;\n\t\t\t}\n\t\t}\n\t}\n\td1=d1-i;\n\td2=(13-eM)*31-eD;\n\tfor(j=0;eM<=12;eM=eM+1)\n\t{\n if(eM==4||eM==6||eM==9||eM==11)\n\t\t{\n\t\t\tj++;\n\t\t}\n\t\n\t\telse if(eM==2)\n\t\t{\n\t\t\tif((eY%4==0&&eY%100!=0)||(eY%400==0))\n\t\t\t{\n\t\t\t\tj=j+2;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tj=j+3;\n\t\t\t}\n\t\t}\n\t}\n\td2=d2-j;\n d3=(eY-sY+1)*365;\n\tfor(k=0;sY<=eY;sY=sY+1)\n\t\t{\n\t\t\tif((sY%4==0&&sY%100!=0)||(sY%400==0))\n\t\t\t\tk++;\n\t\t}\n\td3=d3+k;\n\td=d3-d1-d2;\n\tprintf(\"%d\",d);\n}\n\t\n\t\n"} +{"label": "80", "index": "39928", "code": "int main()\n{\n\tint sy, sm, sd, ey, em, ed, n;\n\tint year(int y);\n\tint mouth(int m, int y);\n\tint day(int d);\n\tscanf(\"%d%d%d%d%d%d\", &sy, &sm, &sd, &ey, &em, &ed);\n\tn=year(ey)+mouth(em, ey)+day(ed)-year(sy)-mouth(sm, sy)-day(sd);\n printf(\"%d\\n\", n);\n\treturn 0;\n}\n\nint year(int y)\n{\n\tint i, sum=0;\n\tfor(i=1000;i> sy >> sm >> sd;\n\tcin >> ey >> em >> ed;\n\tdistance = 0;\n\tfor (i = sy; i < ey; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\tdistance += 366;\n\t\telse\n\t\t\tdistance += 365;\n\t}\n\tif ((sy % 4 == 0 && sy % 100 != 0) || sy % 400 == 0)\n\t\tmon[1] = 29;\n\telse\n\t\tmon[1] = 28;\n\tfor (i = 0; i < sm - 1; i++)\n\t{\n\t\td1 += mon[i];\n\t}\n\td1 += sd;\n\tif ((ey % 4 == 0 && ey % 100 != 0) || ey % 400 == 0)\n\t\tmon[1] = 29;\n\telse\n\t\tmon[1] = 28;\n\tfor (i = 0; i < em - 1; i++)\n\t{\n\t\td2 += mon[i];\n\t}\n\td2 += ed;\n\tdistance += d2 - d1;\n\tcout << distance << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39930", "code": "int main()\n{\n\tint y1,y2,mon1,mon2,da1,da2,days=0;\n\tcin>>y1>>mon1>>da1>>y2>>mon2>>da2;\n\twhile(y2>y1)\n\t{\n\t\tif(((y1) % 4 == 0 && (y1) %100!= 0)|| ((y1) % 400 == 0))\n\t\t{days=days+366;y1=y1+1;}\n\t\telse {days=days+365;y1=y1+1;}\n\t}\n\twhile(mon2>mon1)\n\t{\n\t\tif(((y1) % 4 == 0 && (y1) %100!= 0)|| ((y1) % 400 == 0))\n\t\t{if(mon1==1||mon1==3||mon1==5||mon1==7||mon1==8||mon1==10||mon1==12)\n\t\t {days=days+31;mon1=mon1+1;}\n\t\t else if(mon1==2){days=days+29;mon1=mon1+1;}\n\t\t else {days=days+30;mon1=mon1+1;}\n\t\t }\n\telse {\n\t\t if(mon1==1||mon1==3||mon1==5||mon1==7||mon1==8||mon1==10||mon1==12)\n\t\t{days=days+31;mon1=mon1+1;}\n\t\t else if(mon1==2){days=days+28;mon1=mon1+1;}\n\t\t\telse {days=days+30;mon1=mon1+1;}\n\t }\n\n\t }\n\twhile(mon2day[m1])\n\t\t\t{\n\t\t\t\td1=0;\n\t\t\t\tm1++; \n\t\t\t}\n\t\t}\n }\n else\n {\n\t for (i=y1+1;i<=y2-1;i++){\n\t\t if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))days+=366;\n\t\t else days+=365;\n\t }\n days+=day[m1]-d1;\n\t for (i=m1+1;i<=12;i++) days+=day[i];\n\t if ((m1==1)&&((y1%4==0&&y1%100!=0)||(y1%400==0))){days++;}\n\t for (i=1;i<=m2-1;i++) days+=day[i];\n if ((m2>2)&&((y2%4==0&&y2%100!=0)||(y2%400==0))){days++;}\n days+=d2;\n }\n printf(\"%d\",days);\n return 0;\n}\n \n \n\t "} +{"label": "80", "index": "39932", "code": "int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; \nint leap_days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\nint leap(int year)\n{\n\treturn year%4==0&&year%100!=0 || year%400==0;\n}\n\nint daysum(int year,int month,int day)\n{\n\tint i,c=day;\n\tfor(i=1;i2) \n\t\t\t sum+=total[m2-1]-total[m1-1]+d2-d1+1; \n\t}\n\t/*?????????????????????2???*/ \n\tif (y2>y1){\n for(j=y1+1;j2) \n\t sum+=total[m2-1]+d2+1;\n\t} \n\tprintf(\"%d\",sum);\n\treturn 0;\n}\n\nint leap(int y){\n\treturn y%400 == 0 || y%4 == 0 && y%100 != 0;\n}\n"} +{"label": "80", "index": "39934", "code": "/*\n * dates.cpp\n *\n * Created on: 2011-11-4\n * Author: admin\n */\nint main(){\nint startYear,startMonth,startDay,endYear,endMonth,endDay,i,day1=0,day2=0,day3=0;\nint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\nint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\ncin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\nif((startYear%4==0)&&(startYear%100!=0)||(startYear%400==0)){\n\tfor (i=1;i<=startMonth-1;i++){\n\t\tday1=b[i]+day1;\n\t}\n\tday1=day1+startDay;\n}\nelse {\n\tfor (i=1;i<=startMonth-1;i++){\n day1=a[i]+day1;\n\t}\n day1=day1+startDay;\n}\nif((endYear%4==0)&&(endYear%100!=0)||(endYear%400==0)){\n\tfor (i=1;i<=endMonth-1;i++){\n\t\tday2=b[i]+day2;\n\t}\n\tday2=day2+endDay;\n}\nelse{\n\tfor (i=1;i<=endMonth-1;i++){\n\t\tday2=a[i]+day2;\n\t}\n\tday2=day2+endDay;\n}\nfor (i=startYear;i<=endYear-1;i++){\n\tif((i%4==0)&&(i%100!=0)||(i%400==0))day3=day3+366;\n\telse day3=day3+365;\n}\ncout<> a[i];\n\tfor(i = 0; i< 3; i++)\n\t\tcin >> b[i];\n\tyear = b[0] - a[0] - 1;\n\tfor(i = a[0] + 1;i>year1>>mon1>>day1;\n\tcin>>year2>>mon2>>day2;\n\n\tif(year2%4==0)\n\t{\n\t\tdeta=1;\n\t}\n\n\tif((year2%4==0&&year2%100!=0)||(year2 % 400==0)) \n\t{\n\t\tmon[2]=28;\n\t}\n\n\n for(i=year1;imon2)\n\t{\n\t\tfor(i=mon2;imon1)\n\t{\n\t\tfor(i=mon1;iendyear)\n\t\t{\n\t\t\tt=endyear;\n\t\t\tendyear=startyear;\n\t\t\tstartyear=t;\n\t\t}\n\t\tfor(i=startyear;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint k, sum=0;\n\tfor(int i=y1; i>sy>>sm>>sd>>ey>>em>>ed;\n int py[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n int ry[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};\n int count=0;\n int year=sy;\n if(sy!=ey)\n {\n \n if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n {\n for(int m=sm;m<12;m++)\n {\n {\n count+=ry[m];\n }\n }\n }\n else\n {\n for(int m=sm;m<12;m++)\n {\n {\n count+=py[m];\n }\n }\n }\n count+=32-sd;\n sy+=1;sd=1;sm=1;\n }\n for(;sy=1;a[1]--)\n\t{\n\t\tswitch(a[1])\n\t\t{\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\tcase 8:\n\t\tcase 10:\n\t\t\n\t\tcase 12:da=da+31;break;\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 9:\n\t\tcase 11:da=da+30;break;\n\t\t\n\t\tcase 2:\n\t\t\t{\n\t\t\t\tif(leap(a[0])) da=da+29;\n\t\t\t\telse da=da+28;\n\t\t\t}\n\t\t}\n\t}\n \n\tda=da+a[2];//A??????\n\t\t\n\t\tfor(b[1]--;b[1]>=1;b[1]--)\n\t\t{ \n\n\t\tswitch(b[1])\n\t\t{\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\tcase 8:\n\t\tcase 10:\n\t\t\n\t\tcase 12:d=d+31;break;\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 9:\n\t\tcase 11:d=d+30;break;\n\t\t\n\t\tcase 2:\n\t\t\t{\n\t\t\t\tif(leap(b[0])) d=d+29;\n\t\t\t\telse d=d+28;\n\t\t\t}\n\t\t}\n\t\t}\n d=d+b[2];//B??????\n\n\tfor(;a[0]>year1>>month1>>day1>>year2>>month2>>day2;\n\tfor(i=year1,j=month1,k=day1;i>y1>>m1>>d1;\n\tcin >>y2>>m2>>d2;\n\tif (y1> sty;\n\tcin >> stm;\n\tcin >> str;\n\tcin >> eny;\n\tcin >> enm;\n\tcin >> enr;\n\n\tfor( i = 0;i <= eny - sty;i++ )\n\t{\n\t\tyear = sty + i;\n\n\t\tif((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ) \n\t\t{\n\t\t\tif( year == sty && year != eny)\n\t\t\t{\n\t\t\t\tfor( t = stm;t <= 12;t++ )\n\t\t\t\t{\n\t\t\t\t\tif( t == stm)\n\t\t\t\t\t\tday += yearr[t] - str;\n\t\t\t\t\telse\n\t\t\t\t\t\tday += yearr[t];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( year == eny && year != sty )\n\t\t\t{\n\t\t\t\tfor( t =1;t <= enm;t++)\n\t\t\t\t{\n\t\t\t\t\tif( t== enm)\n\t\t\t\t\t\tday += enr;\n\t\t\t\t\telse\n\t\t\t\t\t\tday += yearr[t];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( year != eny && year!= sty )\n\t\t\t{\n\t\t\t\tfor( t =1;t <= 12;t++ )\n\t\t\t\t\tday += yearr[t];\n\t\t\t}\n\t\t\tif( year == eny && year == sty )\n\t\t\t{\n\t\t\t\tif( stm == enm )\n\t\t\t\t\tday += enr - str;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor( t = stm;t <= enm;t++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( t == stm )\n\t\t\t\t\t\t\tday += yearr[t] - str;\n\t\t\t\t\t\telse if( t == enm )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tday += enr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( t!= stm && t!= enm )\n\t\t\t\t\t\t\tday += yearr[t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( year == sty && year != eny)\n\t\t\t{\n\t\t\t\tfor( t = stm;t <= 12;t++ )\n\t\t\t\t{\n\t\t\t\t\tif( t == stm)\n\t\t\t\t\t\tday += yearp[t] - str;\n\t\t\t\t\telse\n\t\t\t\t\t\tday += yearp[t];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( year == eny && year != sty )\n\t\t\t{\n\t\t\t\tfor( t =1;t <= enm;t++)\n\t\t\t\t{\n\t\t\t\t\tif( t== enm)\n\t\t\t\t\t\tday += enr;\n\t\t\t\t\telse\n\t\t\t\t\t\tday += yearp[t];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( year != eny && year!= sty )\n\t\t\t{\n\t\t\t\tfor( t =1;t <= 12;t++ )\n\t\t\t\t\tday += yearp[t];\n\t\t\t}\n\t\t\tif( year == eny && year == sty )\n\t\t\t{\n\t\t\t\tif( stm == enm )\n\t\t\t\t\tday += enr - str;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor( t = stm;t <= enm;t++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( t == stm )\n\t\t\t\t\t\t\tday += yearp[t] - str;\n\t\t\t\t\t\telse if( t == enm )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tday += enr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( t!= stm && t!= enm )\n\t\t\t\t\t\t\tday += yearp[t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tcout << day;\n\n\tcin >> i;\n\n\treturn 0;\n}\n\n\t\t\n\n\n\n\n\n"} +{"label": "80", "index": "39947", "code": "int main()\n{\n\tint y1,m1,d1,y2,m2,d2,c1,c2,c,i1,i2,y;\n\tscanf(\"%d %d %d\\n%d %d %d\",&y1,&m1,&d1,&y2,&m2,&d2);\n\tint days1[]={0,31,28,31,30,31,30,31,31,30,31,30,31},days2[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tif((y1%4==0)&&(y1%100!=0)||(y1%400==0)) {days1[2]++;}\n\tc1=d1;\n\tfor(i1=1;i1>y1>>m1>>d1>>y2>>m2>>d2;//??\n\tif(y1==y2)//???????\n\t{\n\t for(int i=m1;i>y1>>m1>>d1>>y2>>m2>>d2;\n\tfor(i=1;i> sy >> sm >> sd >> ey >> em >> ed;\n\tif (sm <= 2)\n\t{\n\t\t\tfor (i = sy; i < ey;i ++)\n\t\t\t{\n\t\t\t\tnum+=365;\n\t\t\t\tif( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\t\t++num;\n\t\t\t}\n\t\t\tif (sm ==2 && sd == 29) --num;\n\t}\n\telse\n\t{\n\t\t\tfor (i = sy + 1; i <= ey;i ++)\n\t\t\t{\n\t\t\t\tnum+=365;\n\t\t\t\tif( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\t\t\t++num;\n\t\t\t}\n\t}\n\tif (em > sm)\n\t{\n\t\tnum = num + (em - sm) *30;\n\t\tfor (i = sm; i < em;i++)\n\t\t{\n\t\t\tswitch(i)\n\t\t\t{\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 5:\n\t\t\tcase 7:\n\t\t\tcase 8:\n\t\t\tcase 10:\n\t\t\tcase 12: ++num; break;\n\t\t\tcase 2: \n\t\t\t\t{\n\t\t\t\t\tif ((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))\n\t\t\t\t\tnum = num - 1;\n\t\t\t\t\telse \n\t\t\t\t\t\tnum = num - 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tdefault: break;\n\t\t\t}\n\t\t}\n\t\tnum = num + ed - sd;\n\t}\n\telse \n\t{\n\t\tk= (sm - em) * 30;\n\t\tfor (i = em; i < sm;i++)\n\t\t{\n\t\t\tswitch(i)\n\t\t\t{\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 5:\n\t\t\tcase 7:\n\t\t\tcase 8:\n\t\t\tcase 10:\n\t\t\tcase 12: ++k; break;\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\t\tif ((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))\n\t\t\t\t\tk = k - 1;\n\t\t\t\t\telse \n\t\t\t\t\t\tk = k - 2; \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tdefault: break;\n\t\t\t}\n\t\t}\n\t\tk = sd - ed + k;\n\t\tnum = num - k;\n\t}\n\tcout << num << endl;\t\t\t\t\t\t\n\treturn 0;\n}"} +{"label": "80", "index": "39953", "code": "\nint days( int y, int m, int d )\n{\n\tint year[3001];\n\t\n\tfor ( int i = 1; i <=3000; i++ )\n\t{\n\t\tif ( i % 4 == 0 && i % 100 != 0)\n\t\t\tyear[i] = 366;\n\t\telse if (i % 400 == 0 )\n\t\t\tyear[i] = 366;\n\t\telse year[i] = 365;\n\t}\n\t\n\tint month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint loopmon[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};\n\n\tint days = 0;\n\tfor ( int i = 1; i < y; i++)\n\t\tdays += year[i];\n\tfor ( int i = 1; i < m; i++)\n\t{\n\t\tif ( y % 4 == 0 && y % 100 != 0)\n\t\t\tdays += loopmon[i];\n\t\telse if (y % 400 == 0 )\n\t\t\tdays += loopmon[i];\n\t\telse days += month[i];\n\t}\n\tdays += d;\n\t\n\treturn days;\n}\n\nint main()\n{\n\tint y1 = 0, m1 = 0, d1 = 0;\n\tint y2 = 0, m2 = 0, d2 = 0;\n\t\n\tcin >> y1 >> m1 >> d1;\n\tcin >> y2 >> m2 >> d2;\n\t\n\tcout << days( y2, m2, d2 ) - days( y1, m1, d1 );\n\t\n\t\n\treturn 0;\n}"} +{"label": "80", "index": "39954", "code": "int main()\n{\n\tint sum = 0, i, j, date[2][3], a[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\tfor (i = 0; i < 2; i++)\n\t\tfor (j = 0; j < 3; j++)\n\t\t\tcin >> date[i][j];\n\tfor (i = date[0][0] + 1; i < date[1][0]; i++)\n\t\tif (i % 4 == 0 && i % 100 != 0 || i % 400 == 0)\n\t\t\tsum += 366;\n\t\telse\n\t\t\tsum += 365;\n\tif (date[0][0] % 4 == 0 && date[0][0] % 100 != 0 || date[0][0] % 400 == 0)\n\t\ta[1] = 29;\n\tfor (i = date[0][1]; i <= 11; i++)\n\t\tsum += a[i];\n\tsum += a[date[0][1] - 1] - date[0][2] + 1;\n\tif (date[1][0] % 4 == 0 && date[1][0] % 100 != 0 || date[1][0] % 400 == 0)\n\t\ta[1] = 29;\n\telse\n\t\ta[1] = 28;\n\tfor (i = 0; i < date[1][1] - 1; i++)\n\t\tsum += a[i];\n\tsum += date[1][2];\n\tif (date[0][0] == date[1][0])\n\t\tcout << sum - 366 - a[1] + 28;\n\telse\n\t\tcout << sum - 1;\n\treturn 0;\n}\n"} +{"label": "80", "index": "39955", "code": "\n\nvoid main()\n{\nlong int sy,sm,sd,ey,em,ed,a,b,i,j,k,x;\nscanf(\"%d %d %d %d %d %d\",&sy,&sm,&sd,&ey,&em,&ed);\na=1;i=0;\n\nwhile(a2))\ni++;\n}\n\n\nb=1;j=0;\nwhile(b2))\nI++;\n\n\nB=1;J=0;\nwhile(B=3)\n\t\t{\n\t\t\tg++;\n\t\t}\n\t}\n\tif(d>a)\n\t{\n\t\tg=g+(d-a-1)*365;\n\t}\n\telse if(a==d)\n\t{\n\t\tif((d%4==0&&d%100!=0)||(d%400==0))\n\t\t{\n\t\t\tg=g-366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tg=g-365;\n\t\t}\n\t}\n\tprintf(\"%d\\n\",g);\n\treturn 0;\n}\n\t\t\t\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\t\n\t\n\n\n\n\n\n\n\t\n\n\n\n\n"} +{"label": "80", "index": "39957", "code": "int leap(int y)\n{\n if(y%4==0&&y%100!=0)\n return 1;\n else if(y%400==0)\n return 1;\n else\n return 0;\n}\n\nvoid main()\n{\n int sy,sm,sd; \n int ey,em,ed; \n int monthday[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},\n {0,31,29,31,30,31,30,31,31,30,31,30,31}};\n scanf(\"%d %d %d\",&sy,&sm,&sd);\n scanf(\"%d %d %d\",&ey,&em,&ed); \n int tmp;\n if((sy>ey)||(sy==ey && sm>em)||(sy==ey && sm==em && sd>ed))\n {\n tmp=sy; sy=ey; ey=tmp;\n tmp=sm; sm=em; em=tmp;\n tmp=sd; sd=ed; ed=tmp;\n }\n int ans=0;\n while(sy!=ey || sm!=em || sd!=ed){\n ans++;\n sd++;\n if(sd>monthday[leap(sy)][sm]){\n sd=1;\n sm++;\n } \n if(sm==13){\n sm=1;\n sy++;\n } \n }\nprintf(\"%d\\n\",ans);\n}\n\n"} +{"label": "80", "index": "39958", "code": "void date(int *year,int *month ,int *day)\n{\n if(*month==1||*month==3||*month==5||*month==7||*month==8||*month==10||*month==12)\n {\n (*day)++;\n if(*day>31) {*day=1;(*month)++;}\n if(*month>12) {*month=1;(*year)++;} \n }\n else if(*month==4||*month==6||*month==9||*month==11)\n {\n (*day)++;\n if(*day>30){*day=1;(*month)++;}\n }\n else if((*year % 4 == 0 && *year % 100 != 0) || (*year % 400 == 0))\n {\n (*day)++;\n\t\t if(*day>29){*day=1;(*month)++;}\n }\n else \n {\n (*day)++;\n\t\tif(*day>28){*day=1;(*month)++;}\n }\n}\nvoid main()\n{ \n\tint a,b,c, x,y,z;\n\tscanf(\"%d%d%d%d%d%d\",&a,&b,&c,&x,&y,&z);\n\tint i=0;\n\tfor(i=0;a!=x||b!=y||c!=z;date(&a,&b,&c),i++);\n printf(\"%d\",i);\n\t\n\t/*int a=2008,b=4 ,c=1;\n\tdate(&a,&b,&c);\n\tprintf(\"%d %d %d\",a,b,c);*/\n}"} +{"label": "80", "index": "39959", "code": "int main()\n{\nint a,b,c,u,v,w,e;\nint sum=0;\nint i,j,f[3000];\nscanf(\"%d%d%d\\n%d%d%d\",&a,&b,&c,&u,&v,&w);\ne=u-a-1;\nswitch(b)\n{\ncase 1:sum=28+31+30+31+30+31+31+30+31+30+31+31-c;break;\n case 2:sum=31+30+31+30+31+31+30+31+30+31+28-c;break;\n\tcase 3:sum=30+31+30+31+31+30+31+30+31+31-c;break;\n\t\tcase 4:sum=31+30+31+31+30+31+30+31+30-c;break;\n\t\t\tcase 5:sum=30+31+31+30+31+30+31+31-c;break;\n\t\t\t\tcase 6:sum=31+31+30+31+30+31+30-c;break;\n\t\t\t\t\tcase 7:sum=31+30+31+30+31+31-c;break;\n\t\t\t\t\t\tcase 8:sum=30+31+30+31+31-c;break;\n\t\t\t\t\t\t\tcase 9:sum=31+30+31+30-c;break;\n\t\t\t\t\t\t\t\tcase 10:sum=30+31+31-c;break;\n\t\t\t\t\t\t\t\t\tcase 11:sum=31+30-c;break;\n\t\t\t\t\t\t\t\t\t\tcase 12:sum=0+31-c;break;\n}\nswitch(v)\n{\ncase 12:sum=sum+31+28+31+30+31+30+31+31+30+31+30+w;break;\n case 11:sum=sum+31+28+31+30+31+30+31+31+30+31+w;break;\n\tcase 10:sum=sum+31+28+31+30+31+30+31+31+30+w;break;\n\t\tcase 9:sum=sum+31+28+31+30+31+30+31+31+w;break;\n\t\t\tcase 8:sum=sum+31+28+31+30+31+30+31+w;break;\n\t\t\t\tcase 7:sum=sum+31+28+31+30+31+30+w;break;\n\t\t\t\t\tcase 6:sum=sum+31+28+31+30+31+w;break;\n\t\t\t\t\t\tcase 5:sum=sum+31+28+31+30+w;break;\n\t\t\t\t\t\t\tcase 4:sum=sum+31+28+31+w;break;\n\t\t\t\t\t\t\t\tcase 3:sum=sum+31+28+w;break;\n\t\t\t\t\t\t\t\t\tcase 2:sum=sum+31+w;break;\n\t\t\t\t\t\t\t\t\t\tcase 1:sum=sum+0+w;break;\n}\n\nif((a%4==0&&a%100!=0)||(a%400==0)&&(b<=2))\nsum=sum+1;\nif((u%4==0&&u%100!=0)||(u%400==0)&&(v>=3))\nsum=sum+1;\nif(e==-1)\n{\n\tif((a%4==0&&a%100!=0)||(a%400==0))\n\t{sum=sum-366;}\n\telse{sum=sum-365;}\n}\nelse if(e==0);\nelse\n{\nfor(i=0;i> sy >> sm >> sd;\n\tcin >> ey >> em >> ed;\n\tint mon[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n while (sy != ey || sm != em || sd !=ed)\n\t{\n\t\tif ((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0)) mon[2] = 29;\n\t\telse mon[2] = 28;\n\t\tsd++;\n\t\tif (sd > mon[sm])\n\t\t{\tsd = 1; sm++;}\n\t\tif (sm > 12)\n\t\t{sm = 1; sy ++;}\n\t\tres++;\n\t}\n\tcout << res << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39961", "code": "int main()\n{\n\tint a[12] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\tint startyear,endyear,startmonth,endmonth,startday,endday,days,days2,temp1,temp2,flag1,flag2;\n\tint year , month;\n\tcin >> startyear >> startmonth >> startday;\n\tcin >> endyear >> endmonth >> endday;\n\tif(startyear == endyear)\n\t{\n\t\tdays = 0;\n\t\tif(startyear % 4 == 0 && startyear % 100 != 0 || startyear % 400 == 0)\n\t\t\ta[1] = 29;\n\t\telse\n\t\t\ta[1] = 28;\n\t\tfor(month = startmonth ; month < endmonth ; month++)\n\t\t\tdays = days + a[month - 1];\n\t\tdays = days + endday - startday;\n\t\tcout << days << endl;\n\t}\n\telse if(startyear < endyear)\n\t{\n\t\tdays = 0;\n\t\tdays2= 0;\n\t\tfor(year = startyear ; year < endyear ; year++)\n\t\t{\n\t\t\tif(year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n\t\t\t\tdays = days + 366;\n\t\t\telse\n\t\t\t\tdays = days + 365;\n\t\t}\n\t\tflag1 = startmonth;\n\t\tflag2 = endmonth;\n\t\tif(startmonth > endmonth)\n\t\t{\n\t\t\ttemp1 = startmonth;\n\t\t\ttemp2 = startday;\n\t\t\tstartmonth = endmonth;\n\t\t\tstartday = endday;\n\t\t\tendmonth = temp1;\n\t\t\tendday = temp2;\n\t\t}\n\t\tif(endyear % 4 == 0 && endyear % 100 != 0 || endyear % 400 == 0)\n\t\t\ta[1] = 29;\n\t\telse\n\t\t\ta[1] = 28;\n\t\tfor(month = startmonth ; month < endmonth ; month++)\n\t\t\tdays2 = days2 + a[month - 1];\n\t\tdays2 = days2 + endday - startday;\n\t\tif(flag1 > flag2)\n\t\t\tcout << days - days2 << endl;\n\t\telse\n\t\t\tcout << days + days2 << endl;\n\t}\n\treturn 0;\n}\n"} +{"label": "80", "index": "39962", "code": "int main()\n{\n\tint GongJiTian(int, int, int);\n\tint year1, month1, day1, year2, month2, day2;\n\tscanf(\"%d %d %d\", &year1, &month1, &day1);\n\tscanf(\"%d %d %d\", &year2, &month2, &day2);\n\tint result, a, b;\n\ta=GongJiTian(year1,month1,day1);\n\tb=GongJiTian(year2,month2,day2);\n\tif(a>b){\n\t\tresult=a-b;\n\t}else{\n\t\tresult=b-a;\n\t}\n\tprintf(\"%d\", result);\n\treturn 0;\n}\n\nint DiJiTian(int year, int month, int day){\n\tint isRunNian(int);\n\tint result=0;\n\tint i;\n\tfor(i=1;iyear2){\n\t\te=year1;\n\t\tyear1=year2;\n\t\tyear2=e;\n\t\tf=month1;\n\t\tmonth1=month2;\n\t\tmonth2=f;\n\t\tg=day1;\n\t\tday1=day2;\n\t\tday2=g;\n\t}\n\tx=DiJiTian(year1,month1,day1);\n\ty=DiJiTian(year2,month2,day2);\n\tzongyear=year2-year1;\n\tzongday=zongyear*365;\n\tfor(i=year1;i1)\n\t{\n\t\tfor(i=y1+1;i>sy>>sm>>sd>>ey>>em>>ed;//????????\n\tint a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//???????????\n\tint b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//???????????\n\tfor(i=sy;i>year1>>mon1>>day1;\n\tcin>>year2>>mon2>>day2;\t\n\tif(year1>year1>>month1>>day1>>year2>>month2>>day2;\t\t\t//??????\n\tfor (i=year1+1;i>stay>>stam>>stad;\n\tcin>>endy>>endm>>endd;\n\n\ty=0;\n\tm=1;\n\twhile(y=y1+1&&y<=y2-1)\n {\n if((y%4==0&&y%100!=0)||y%400==0)\n D=D+366;\n else D=D+365;\n y++;\n }\n \n m=m1-1; \n switch(m)\n {\n case 11:D1=D1+30;\n case 10:D1=D1+31;\n case 9:D1=D1+30;\n case 8:D1=D1+31;\n case 7:D1=D1+31;\n case 6:D1=D1+30;\n case 5:D1=D1+31;\n case 4:D1=D1+30;\n case 3:D1=D1+31;\n case 2:\n {\n if((y1%4==0&&y1%100!=0)||y1%400==0)\n D1=D1+29;\n else D1=D1+28;\n }\n case 1:D1=D1+31; \n case 0:break;\n }\n D1=D1+d1; \n \n m=m2-1; \n switch(m)\n {\n case 11:D2=D2+30;\n case 10:D2=D2+31;\n case 9:D2=D2+30;\n case 8:D2=D2+31;\n case 7:D2=D2+31;\n case 6:D2=D2+30;\n case 5:D2=D2+31;\n case 4:D2=D2+30;\n case 3:D2=D2+31;\n case 2:\n {\n if((y2%4==0&&y2%100!=0)||y2%400==0)\n D2=D2+29;\n else D2=D2+28;\n }\n case 1:D2=D2+31; \n case 0:break;\n }\n D2=D2+d2;\n \n if(y1==y2)D=D2-D1;\n else\n {\n if((y1%4==0&&y1%100!=0)||y1%400==0)\n D=D+D2+366-D1;\n else D=D+D2+365-D1;\n }\n printf(\"%d\\n\",D);\n}\n"} +{"label": "80", "index": "39974", "code": "int main()\n{\n\tint y1,y2,m1,m2,d1,d2,i,j,k=0,n,a[12]={31,28,31,30,31,30,31,31,30,31,30,31},b[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d %d %d\",&y1,&m1,&d1);\n\tscanf(\"%d %d %d\",&y2,&m2,&d2);\n\tif(y2==y1)\n\t{\n\t\tif(y1%400==0||y1%4==0&&y1%100!=0)\n\t\t{\n\t\t\tif(m1==m2)\n\t\t\t printf(\"%d\",d2-d1);\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(m1<=2)\n\t\t\t\t{\n\t\t\t\t\tfor(i=m1;i= 2)\n\t\t{\n sum = sum - 1;\n\t\t}\n\n\t\t\n \n\t }\n\t\tfor(i = end[1]; i < 13; i++)\n\t\t{\n\n sum = sum - month[i];\n\t\t}\n\n\t\tsum = sum + end[2]; \n\n if((end[0]%4 == 0 && end[0]%100 != 0)||(end[0]%400) == 0) \n\t{\n if(end[1] <= 2)\n\t\t{\n sum = sum - 1;\n\t\t}\n\n\t\t\n \n\t }\n\n\tprintf(\"%d\\n\",sum);\n\n\n}"} +{"label": "80", "index": "39977", "code": "int main()\n{\n\tint year1,year2,month1,month2,day1,day2,a,a1=0,a2;\n\tint date(int year,int a);\n\tscanf(\"%d%d%d\",&year1,&month1,&day1);\n\tscanf(\"%d%d%d\",&year2,&month2,&day2);\n\tfor(;year12){\n\ts2+=365;\n\ty1++;\n}\nif(m2>2){\n\ts2-=365;\n\ty2++;\n}\nfor(i=y1;i> startYear >> startMonth >> startDay;\n\tcin >> endYear >> endMonth >> endDay;\n\tfor (i = startYear; i < endYear; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tdays += 366;\n\t\telse\n\t\t\tdays += 365;\n\t}\n\tfor (i = 1; i < endMonth; i++)\n\t{\n\t\tswitch (i)\n\t\t{\n\t\tcase 1:\t;\n\t\tcase 3:\t;\n\t\tcase 5:\t;\n\t\tcase 7:\t;\n\t\tcase 8:\t;\n\t\tcase 10:\t;\n\t\tcase 12:\tdays += 31;\tbreak;\n\t\tcase 2:\n\t\t\t{\n\t\t\t\tif ((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))\n\t\t\t\t{\n\t\t\t\t\tdays += 29;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdays += 28;\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tdefault :\tdays += 30;\tbreak;\n\t\t}\n\t}\n\tdays += endDay;\n\tfor (i = 1; i < startMonth; i++)\n\t{\n\t\tswitch (i)\n\t\t{\n\t\tcase 1:\t;\n\t\tcase 3:\t;\n\t\tcase 5:\t;\n\t\tcase 7:\t;\n\t\tcase 8:\t;\n\t\tcase 10:\t;\n\t\tcase 12:\tdays -= 31;\tbreak;\n\t\tcase 2:\n\t\t\t{\n\t\t\t\tif ((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))\n\t\t\t\t{\n\t\t\t\t\tdays -= 29;\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdays -= 28;\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tdefault :\tdays -= 30;\tbreak;\n\t\t}\n\t}\n\tdays -= startDay;\n\tcout << days << endl;\n\treturn 0;\n}"} +{"label": "80", "index": "39982", "code": "int main ()\n{\n\tint month1[13] = {0, 31, 28, 31, 30 ,31, 30 ,31, 31,30,31,30,31};\n\tint month2[13] = {0, 31, 29, 31, 30 ,31, 30 ,31, 31,30,31,30,31};\n\tint ye1,mon1,day1,ye2,mon2,day2,sum = 0,i;\n\tcin >> ye1 >> mon1 >> day1 >> ye2 >> mon2 >> day2;\n\tif (ye1 == ye2)\n\t{\n\t\tif (mon1 == mon2)\n\t\t{\n\t\t\tcout << day2 - day1;\n\t\t\treturn 0;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif ((ye1% 4 == 0 && ye1 % 100 != 0) || (ye1 % 400 == 0)) \n\t\t\t{\n\t\t\t\tsum = sum + month2[mon1] - day1;\n\t\t\t\tfor ( i = mon1 + 1; i< mon2; i++)\n\t\t\t\t{\n\t\t\t\t\tsum = sum + month2[i];\n\t\t\t\t}\n\t\t\t\tsum = sum + day2;\n\t\t\t\tcout << sum;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum = sum + month1[mon1] - day1;\n\t\t\t\tfor ( i = mon1 + 1; i< mon2; i++)\n\t\t\t\t{\n\t\t\t\t\tsum = sum + month1[i];\n\t\t\t\t}\n\t\t\t\tsum = sum + day2;\n\t\t\t\tcout << sum;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ((ye1 % 4 == 0 && ye1 % 100 != 0) || (ye1 % 400 == 0)) \n\t\t{\n\t\t\tsum = sum + month2[mon1] - day1;\n\t\t\tfor (i = mon1 + 1; i <= 12; i++)\n\t\t\t{\n\t\t\t\tsum = sum + month2[i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsum = sum + month1[mon1] - day1;\n\t\t\tfor (i = mon1 + 1; i <= 12; i++)\n\t\t\t{\n\t\t\t\tsum = sum + month1[i];\n\t\t\t}\n\t\t}\n\t\tfor (i = ye1 + 1; i<= ye2 - 1; i++)\n\t\t{\n\t\t\tif ((i % 4 == 0 && i% 100 != 0) || (i % 400 == 0)) \n\t\t\t\tsum = sum + 366;\n\t\t\telse \n\t\t\t\tsum = sum + 365;\n\t\t}\n\t\t\tif ((ye2 % 4 == 0 && ye2 % 100 != 0) || (ye2 % 400 == 0)) \n\t\t{\n\t\t\tsum = sum + day2;\n\t\t\tfor (i = 1; i <= mon2 - 1; i++)\n\t\t\t{\n\t\t\t\tsum = sum + month2[i];\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\tsum = sum + day2;\n\t\t\tfor (i = 1; i <= mon2 - 1; i++)\n\t\t\t{\n\t\t\t\tsum = sum + month1[i];\n\t\t\t}\n\t\t}\n\t\tcout << sum;\n\t}\n\treturn 0;\n}\n\n\n\t\t\t\n\t\t\t\n\n"} +{"label": "80", "index": "39983", "code": "void main()\n{\n int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};\n int b[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n int q,w,e,r,t,y,i,j,z,x=0,c=0,v=0,n=0,m=0;\n scanf(\"%d%d%d%d%d%d\",&q,&w,&e,&r,&t,&y);\n z=r-q;\n \tfor(i=1;i>y1>>m1>>d1;\n\tcin>>y2>>m2>>d2;\n\tint tianshu[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tfor(i=0;i=3)\n\t\t\t\ta=D1+1+d1;\n\t\t\telse a=D1+d1;\n\t\t}\n\t\telse a=D1+d1;\n\t\tt2=runnian(y2);\n\t\tif(t2==1)\n\t\t{\n\t\t\tif(m2>=3)\n\t\t\t\tb=D2+1+d2;\n\t\t\telse b=D2+d2;\n\t\t}\n\t\telse b=D2+d2;\n\t\tcout<=startmonth)\n\t\t{\n\t\t\tfor(j=startmonth;jendmonth;j--)\n\t\t\t{\n\t\t\t\ttotal=total-B[j-2];\n\t\t\t}\n\t\t\ttotal=total+endday-startday;\n\t\t\tprintf(\"%d\",total);\n\t\t}\n\t}\n\telse \n\t{\n\t\tif(endmonth>=startmonth)\n\t\t{\n\t\t\tfor(j=startmonth;jendmonth;j--)\n\t\t\t{\n\t\t\t\ttotal=total-A[j-2];\n\t\t\t}\n\t\t\ttotal=total+endday-startday;\n\t\t\tprintf(\"%d\",total);\n\t\t}\n\t}\n\treturn 0;\n}\n"} +{"label": "80", "index": "39986", "code": "\n\nint countyear(int a,int b)\n{\n\t\t\t\tint i,t;\n\t\t\t\tt=365*(b-a-1);\n\tfor(i=a+1;i> y1 >> m1 >> d1 >> y2 >> m2 >> d2;\n\tint sum = 0, i, j;\n\tif (y1 == y2 && m1 == m2)\n\t{\n\t\tcout << d2 - d1 << endl;\n\t\treturn 1;\n\t}\n\tif (y1 == y2)\n\t{\n\t\tif ((y1 % 4 == 0 && y1 % 100 != 0) || y1 % 400 == 0)\n\t\t\tmonth[2] = 29;\n\t\telse\n\t\t\tmonth[2] = 28;\n\t\tsum += month[m1] - d1;\n\t\tfor (i = m1 + 1; i < m2; i++)\n\t\t{\n\t\t\tif (i == m2)\n\t\t\t{\n\t\t\t\tsum += d2;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsum += month[i];\n\t\t}\n\t\tcout << sum + 1 << endl;\n\t\treturn 1;\n\t}\n\tif (y1 != y2)\n\t{\n\t\tfor (i = y1; i < y2; i++)\n\t\t{\n\t\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\t\tmonth[2] = 29;\n\t\t\telse\n\t\t\t\tmonth[2] = 28;\n\t\t\tif (i == y1)\n\t\t\t{\n\t\t\t\tfor (j = m1; j <= 12; j++)\n\t\t\t\t{\n\t\t\t\t\tif (j == m1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum += month[m1] - d1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tsum += month[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)\n\t\t\t\t\tsum += 366;\n\t\t\t\telse\n\t\t\t\t\tsum += 365;\n\t\t\t}\n\t\t}\n\t\tif ((y2 % 4 == 0 && y2 % 100 != 0) || y2 % 400 == 0)\n\t\t\t\tmonth[2] = 29;\n\t\t\telse\n\t\t\t\tmonth[2] = 28;\n\t\tfor (i = 1; i < m2; i++)\n\t\t\tsum += month[i];\n\t\tsum += d2;\n\t\tcout << sum << endl;\n\t\treturn 1;\n\t}\n\treturn 0;\n}"} +{"label": "80", "index": "39989", "code": "int main()\n{\n\tint dayofpmon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint y1,m1,d1,y2,m2,d2;\n\tcin>>y1>>m1>>d1>>y2>>m2>>d2;\n\tint day=0,i;\n\tfor(i=y1;i2) t=t-1;\n year=y2;\n if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))\n if (m2>2) t=t+1;\n printf (\"%d\",t); \n}"} +{"label": "80", "index": "39991", "code": "int main()\n{\n\tint a1,b1,c1,a2,b2,c2;\n\tint ans,now,md;\n\tscanf(\"%d%d%d\",&a1,&b1,&c1);\n\tscanf(\"%d%d%d\",&a2,&b2,&c2);\n\tif (a1==a2&&b1==b2) ans=c2-c1;\n\telse {\n\t\tif (b1==1||b1==3||b1==5||b1==7||b1==8||b1==10||b1==12) md=31;\n\t\tif (b1==4||b1==6||b1==9||b1==11) md=30;\n\t\tif (b1==2) {\n\t\t\tif ((a1 % 4 == 0 && a1 % 100 != 0) || (a1 % 400 == 0)) md=29;\n\t\t\t\telse md=28;\n\t\t}\n\t\tans=md-c1;\n\t}\n\tnow=b1+1;\n\twhile ((now> year1 >> month1 >> day1;\n\tcin >> year2 >> month2 >> day2;\n\tint Month1[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint Month2[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};\n\tint count = 0,i;\n\tif((year1 % 4 == 0&&year1 % 100 != 0)||(year1 % 400 == 0))\n\t{\n\t\tfor(i = month1; i <= 12; i++)\n\t\t\tcount = count + Month2[i];\n\t\tcount = count - day1;\n\t}\n\telse\n\t{\n\t\tfor(i = month1; i <= 12; i++)\n\t\t\tcount = count + Month1[i];\n\t\tcount = count - day1;\n\t}\n\tfor(i = year1 + 1; i < year2; i++)\n\t{\n\t\tif((i % 4 == 0&&i % 100 != 0)||(i % 400 == 0))\n\t\t\tcount = count + 366;\n\t\telse\n\t\t\tcount = count + 365;\n\t}\n\tif((year2 % 4 == 0&&year2 % 100 != 0)||(year2 % 400 == 0))\n\t{\n\t\tfor(i = 1; i < month2; i++)\n\t\t\tcount = count + Month2[i];\n\t\tcount = count + day2;\n\t}\n\telse\n\t{\n\t\tfor(i = 1; i < month2; i++)\n\t\t\tcount = count + Month1[i];\n\t\tcount = count + day2;\n\t}\n\tif(year1 != year2)\n\t\tcout << count;\n\telse\n\t{\n\t\tif((year1 % 4 == 0&&year1 % 100 != 0)||(year1 % 400 == 0))\n\t\t\tcout << count - 366;\n\t\telse\n\t\t\tcout << count - 365;\n\t}\n\treturn 0;\n}"} +{"label": "80", "index": "39993", "code": "/*\n * c.cpp\n * ???1100012870;\n * ???????\n * Created on: 2011-11-4\n * Author: Li Wenpeng\n */\nint judge(int x)\n{\n\tif (x%400==0) return 1;\n\tif (x%100==0) return 0;\n\tif (x%4==0) return 1;\n\treturn 0;\n}\nint main()\n{\n\tconst int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n\tint year1,year2,day1,day2,month1,month2,i,ans=0;\n\tcin>>year1>>month1>>day1>>year2>>month2>>day2;\n\tif (year1==year2){\n\t\tfor(i=month1;i2)\n\t\tx=x-1;\n if((((y2%4==0)&&(y2%100!=0))||(y2%400==0))&&m2>2)\n\t\tx=x+1;\n\tprintf(\"%d\\n\",x);\n\treturn 0;\n}"} +{"label": "80", "index": "39995", "code": "int main()\n{\n\tint startYear, startMonth, startDay, endYear, endMonth, endDay, ans = 0, day = 0, i;\n\tcin >> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;\n\tfor (i = startYear; i < endYear; i++)\n\t{\n\t\tif ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tans = ans + 366;\n\t\telse\n\t\t\tans = ans + 365;\n\t}\n\tfor (i = 1; i < startMonth; i++)\n\t{\n\t\tif ((i == 1) || (i == 3) || (i == 5) || (i == 7) || (i == 8) || (i == 10) || (i == 12))\n\t\t\tday = day + 31;\n\t\telse if (i == 2)\n\t\t\t{\n\t\t\t\tif ((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))\n\t\t\t\t\tday = day + 29;\n\t\t\t\telse\n\t\t\t\t\tday = day + 28;\n\t\t\t}\n\t\t\telse\n\t\t\t\tday = day + 30;\n\t}\n\tfor (i = 1; i < startDay; i++)\n\t\tday++;\n\tans = ans - day;\n\tday = 0;\n\tfor (i = 1; i < endMonth; i++)\n\t{\n\t\tif ((i == 1) || (i == 3) || (i == 5) || (i == 7) || (i == 8) || (i == 10) || (i == 12))\n\t\t\tday = day + 31;\n\t\telse if (i == 2)\n\t\t\t{\n\t\t\t\tif ((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))\n\t\t\t\t\tday = day + 29;\n\t\t\t\telse\n\t\t\t\t\tday = day + 28;\n\t\t\t}\n\t\t\telse\n\t\t\t\tday = day + 30;\n\t}\n\tfor (i = 1; i < endDay; i++)\n\t\tday++;\n\tans = ans + day;\n\tcout << ans << endl;\n\treturn 0;\n}\n\n"} +{"label": "80", "index": "39996", "code": "int main(){\n int startYear,startMonth,startDay,endYear,endMonth,endDay;\n int s,i,days,days1,days2,year;\n cin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;\n days=0;days1=0;days2=0;\n int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};\n for(i=1;i> year1 >> month1 >> day1;\n cin >> year2 >> month2 >> day2;\n for ( i = year1; i < year2; i++ )\n {\n if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n sum = sum + 366;\n else\n sum = sum + 365;\n }\n if ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))\n {\n for ( i = 1; i < month1; i++ )\n {\n sum = sum - runday[i];\n }\n sum = sum - day1;\n }\n else\n {\n for ( i = 1; i < month1; i++ )\n {\n sum = sum - brunday[i];\n }\n sum = sum - day1;\n }\n if ((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))\n {\n for ( i = 1; i < month2; i++ )\n {\n sum = sum + runday[i];\n }\n sum = sum + day2;\n }\n else\n {\n for ( i = 1; i < month2; i++ )\n {\n sum = sum + brunday[i];\n }\n sum = sum + day2;\n }\n cout << sum << endl;\n return 0;\n}\n"} +{"label": "80", "index": "39998", "code": "int main()\n{\n\tint a1,b1,c1,d1,a2,b2,c2,d2,r1=0,i,d;\n\tscanf(\"%d%d%d\",&a1,&b1,&c1);\n\tscanf(\"%d%d%d\",&a2,&b2,&c2);\n\tfor(i=a1+1;i<=a2-1;i++)\n\t{\n\t\tif((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))\n\t\t\tr1++;\n\t}\n\tif(b1==1)\n\t\td1=c1;\n\telse if(b1==2)\n\t\td1=31+c1;\n\telse if(b1==3)\n\t\td1=59+c1;\n\telse if(b1==4)\n\t\td1=90+c1;\n\telse if(b1==5)\n\t\td1=120+c1;\n\telse if(b1==6)\n\t\td1=151+c1;\n\telse if(b1==7)\n\t\td1=181+c1;\n\telse if(b1==8)\n\t\td1=212+c1;\n\telse if(b1==9)\n\t\td1=243+c1;\n\telse if(b1==10)\n\t\td1=273+c1;\n\telse if(b1==11)\n\t\td1=304+c1;\n\telse\n\t\td1=334+c1;\n\tif(b2==1)\n\t\td2=c2;\n\telse if(b2==2)\n\t\td2=31+c2;\n\telse if(b2==3)\n\t\td2=59+c2;\n\telse if(b2==4)\n\t\td2=90+c2;\n\telse if(b2==5)\n\t\td2=120+c2;\n\telse if(b2==6)\n\t\td2=151+c2;\n\telse if(b2==7)\n\t\td2=181+c2;\n\telse if(b2==8)\n\t\td2=212+c2;\n\telse if(b2==9)\n\t\td2=243+c2;\n\telse if(b2==10)\n\t\td2=273+c2;\n\telse if(b2==11)\n\t\td2=304+c2;\n\telse\n\t\td2=334+c2;\n\tif((a1 % 4 == 0 && a1 % 100 != 0) || (a1 % 400 == 0)&&(d1<50))\n\t\tr1++;\n\tif((a2 % 4 == 0 && a2 % 100 != 0) || (a2 % 400 == 0)&&(d2>50))\n\t\td2++;\n\tif(a2!=a1)\n\t\td=d2-d1+r1+365*(a2-a1);\n\telse\n\t\td=d2-d1+r1;\n\tprintf(\"%d\",d);\n}"} +{"label": "80", "index": "39999", "code": "\nconst int dom[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};\nint main(){\n long sy,sm,sd,ey,em,ed,ans;\n int i,flag;\n scanf(\"%d%d%d%d%d%d\",&sy,&sm,&sd,&ey,&em,&ed);\n ans=365*(ey-sy+1);\n for (i=sy;i<=ey;i++)\n if (!(i%4)&&(i%100)||!(i%400)) ans++;\n if (sm>1){\n if (!(sy%4)&&(sy%100)||!(sy%400)) flag=1;\n else flag=0;\n for (i=1;i