Re: [algogeeks] SPOJ problem : CANDY

2012-06-21 Thread Mayank Singh
my code is running perfectly well but giving WA in spoj.. #includestdio.h #includestdlib.h int main() { int cand,sum; int T,N,i,j,temp[10]; scanf(%d,T); sum = 0; for(i=0;iT;i++) { scanf(%d,N); for(j=0;jN;j++) { scanf(%d,cand);

[algogeeks] SPOJ problem : CANDY III

2012-06-21 Thread Mayank Singh
here is my code : #includestdio.h #includestdlib.h int main() { long long cand,sum; int T,N,i,j,*temp; scanf(%d,T); temp= (int*)calloc(T, sizeof( int)); sum = 0; for(i=0;iT;i++) { scanf(%d,N); for(j=0;jN;j++) { scanf(%lld,cand);

[algogeeks] SPOJ problem : CANDY

2012-06-20 Thread Mayank Singh
i am using long long but still getting WA. here's my code #includestdio.h #includeconio.h int main() { long long cand,sum; int T,N,i,j,temp[10]; scanf(%d,T); sum = 0; for(i=0;iT;i++) { scanf(%d,N); for(j=0;jN;j++) {

Re: [algogeeks] SPOJ problem : CANDY

2012-06-20 Thread Mayank Singh
still getting the WA . is there any test case i am getting wrong? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] SPOJ problem : CANDY

2012-06-20 Thread Mayank Singh
oh i am really sorry the problem is CANDY III can you help me regarding that once again sorry -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

[algogeeks] spoj problem : POKER

2012-06-18 Thread Mayank Singh
here is my code: #includestdio.h #includestring.h #includestdlib.h int main() { int t,i,j,k1,k2,ans[40],sum,sum1; char str[40][20],str1[6],str2[6]; scanf(%d,t); for(i=0;i=t;i++) { gets(str[i]); } for(i=1;i=t;i++) { for(j=1,k1=0;j15,k15;j=j+3,k1++)

[algogeeks] Re: spoj problem : POKER

2012-06-18 Thread Mayank Singh
it also ran successfully on ideone.com plz help me i am classifying the card in two parts: one with same suit and other with different suit... plz let me know if futher explanation is needed abt the code help me regarding this.. thanx -- You received this message because you are subscribed

[algogeeks] spoj problem : NSTEPS

2012-06-17 Thread Mayank Singh
here is my code for the above problem: #includestdio.h #includestdlib.h int main() { int i,x[1],y[1],val; long n; scanf(%d,n); for(i=0;in;i++) { scanf(%d,x[i]); scanf(%d,y[i]); } for(i=0;in;i++) { if(x[i] == y[i] x[i]%2 == 0)