Help with TLG

can anybody tell me what’s wrong with this code…??

link text

Your code:

scanf("%d%d",&p1[x],&p2[x]);
  if(p1 > p2)
	win[x] = true;
  else
	win[x] = false;
  
  s1 += p1[x];
  s2 += p2[x];

Modified one:

scanf("%d%d",&p1[x],&p2[x]);
  if(p1[x] > p2[x]) <<<<- Here is the problem with your code
	win[x] = true;
  else
	win[x] = false;
  
  s1 += p1[x];
  s2 += p2[x];

Link:https://www.codechef.com/viewsolution/14375692

1 Like
//