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);
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);
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++)
{
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
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
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++)
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
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)