Search found 4 matches

by scor_k
Sat May 16, 2009 2:30 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 9992

445:TLE !!! please help me.......

#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> int main() { long long n,i,j,x,len,sum,a,k,b; char arr[1000],c; while(1) { scanf("%s",arr); len=strlen(arr); sum=0; x=0; while(x!=len) { for(i=x;i<len;i++) { if(isdigit(arr[i])) sum=sum*10+arr[i]-'0'; else break; } for(j=i;j<le...
by scor_k
Tue May 12, 2009 4:30 pm
Forum: Volume 112 (11200-11299)
Topic: 11292 - Dragon of Loowater
Replies: 10
Views: 6634

11292 - Dragon of Loowater TLE plz,help

#include<stdio.h> long head[20009],knight[20009]; long sort(long a[],long n) { long i,j,k,b=0; for(i=0;i<n-1;i++) for(j=0;j<n-i-1;j++) if(a[j]>a[j+1]) { b++; k=a[j]; a[j]=a[j+1]; a[j+1]=k; } } int main() { long m,n,x,y,k,a,b,sum,cnt; while(scanf("%ld %ld",&m,&n)==2) { if(m==0 && n==0) break; for(x=0...
by scor_k
Thu Oct 09, 2008 4:01 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 29578

Re: 10487 - Closest Sums

hi mf, i define arr[1005] as a global array, but still run time error. what can i do?
by scor_k
Mon Oct 06, 2008 7:54 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 29578

Re: 10487 - Closest Sums

i m getting always rte. please ....help me.please,,please #include<stdio.h> #include<math.h> #define X 1000000 int main() { long int n,m,arr[X],brr[X],i,j,p,t,s,a,b,sum,sub,crr[X],l,q,r,cas=0; while(1) { scanf("%ld",&n); cas++; if(n==0) break; for(i=0;i<n;i++) { scanf("%ld",&arr ); } scanf("%ld",&m)...

Go to advanced search