Search found 7 matches

by sayem
Sun Aug 08, 2010 11:48 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 40353

10013 - Super Long Sums

@ sazzadcsedu thanks
get ACC
by sayem
Tue Oct 20, 2009 9:21 pm
Forum: Volume 104 (10400-10499)
Topic: 10494 - If We Were a Child Again
Replies: 55
Views: 17382

10494 - If We Were a Child Again

plz someone tell me why i got WA?? :( :( :( :( here is my code #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define MAX 1000 /*******************************************************************/ int call_div(char *number,long div,char *result) { int len=strlen(number); in...
by sayem
Wed Aug 05, 2009 8:22 pm
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 5051

10015 - Joseph's Cousin

hey mf
i have use this input :
2 4 5 6 7 10 100 200 300 500 1000 2000 3000 3400 3501 0
and here is th output :
1
4
1
4
3
1
60
140
278
115
897
344
1613
2238
2326
what's the problem in my code? i can't detect it can u tell?
why is showing all 3?
by sayem
Tue Aug 04, 2009 4:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 5051

10015 - Joseph's Cousin

can anyone tell for which input it show WA? i check different type of input and output in UVa toolkit and my code and i have correct answer but server show WA what will i do. here is my code>>>>>> #include<stdio.h> #include<math.h> #include<vector> using namespace std; int prime[4200]; void sieve(in...
by sayem
Mon Aug 03, 2009 2:59 am
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 5051

10015 Joseph's Cousin

hi mf whats problem now? still run time error :o :o :o #include<stdio.h> #include<math.h> #include<vector> using namespace std; int prime[4200]; void sieve(int L,int U) { int i,j,d; d=U-L+1; bool *flag=new bool[d+1]; for (i=(L%2!=0);i<d;i+=2) flag[i]=false; for (i=3;i<=sqrt(U);i+=2) { if(i>L && !fla...
by sayem
Mon Aug 03, 2009 2:56 am
Forum: Volume 101 (10100-10199)
Topic: 10183 - How Many Fibs?
Replies: 66
Views: 23774

10183 - How many Fibs?

can u tell why wrong answer? :( :( #include<stdio.h> #include<string.h> #include<ctype.h> #define MAX 1046 void sum(char first[],char sec[],char res[]) { int f,s,sum,now; f=strlen(first)-1; s=strlen(sec)-1; int x; if(f>s) now=f; else now=s; x=now; for(sum=0;(f>=0 && s>=0);now--) { sum=(first[f]-'0')...
by sayem
Sat Aug 01, 2009 11:34 pm
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 5051

10015 - Joseph's Cousin

can anyone tell me why runtime error? :( :( :( #include<stdio.h> #include<math.h> #include<vector> using namespace std; int prime[4200]; void sieve(int L,int U) { int i,j,d; d=U-L+1; bool *flag=new bool[d+1]; for (i=(L%2!=0);i<d;i+=2) flag[i]=false; for (i=3;i<=sqrt(U);i+=2) { if(i>L && !flag[i-L]) ...

Go to advanced search