Search found 4 matches

by Joybo
Tue Nov 04, 2003 3:29 pm
Forum: Volume 104 (10400-10499)
Topic: 10474 - Where is the Marble?
Replies: 50
Views: 19475

10474 wa~who can help me

It seems very easy, but I don't know what the bug in my program. Who can tell me the bug or some notes? [c] #include <stdio.h> #define MAXSIZE 10000 int N,Q,ar[MAXSIZE]; void quick(int left,int right){ int s,t,i,j,m; if(left<right){ s=ar[(left+right)/2]; i=left-1; j=right+1; while(1){ while(ar[++i]<...
by Joybo
Tue Nov 04, 2003 2:18 am
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 43741

babor wrote:It may be for negative co-ordinate .
I found some bug, thx for you.
by Joybo
Sat Nov 01, 2003 6:26 pm
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 43741

That's my code, but why I got wa? [c] #include <stdio.h> #define swap(a,b) {long t; t=a;a=b;b=t; } char s[1000002]; void main(void){ long times,len; long n,start,end,i,j; char c; for(times=1;;times++){ gets(s); len=strlen(s); s[0]-='0'; for(i=1;i<len;i++) s =s -'0'+s[i-1]; printf("Case %ld:\n",times...
by Joybo
Tue Sep 23, 2003 12:09 pm
Forum: Volume 4 (400-499)
Topic: 465 - Overflow
Replies: 104
Views: 24229

[465]I got wa!

[c] #include <stdio.h> #include <string.h> #define INT_MAX 2147483647 void main(void){ long double n1,n2; char ch[4]; while(scanf("%lf",&n1)==1){ scanf("%s%lf",&ch,&n2); if(n1>INT_MAX||n2>INT_MAX){ if(n1>INT_MAX) printf("first number too big\n"); if(n2>INT_MAX) printf("second number too big\n"); if(...

Go to advanced search