i m getting correct output on my laptop but showing wrong answer on codechef. TLG problem

n = int(input())
leadp1 = [0]
leadp2 = [0]
for round in range(n):
a,b = input().split(" ")
if (int(a)>int(b)):
leadp1.append(int(a)-int(b))
elif (int(b)>int(a)):
leadp2.append(int(b)-int(a))
if (max(leadp1)>max(leadp2)):
print(“1”,max(leadp1))
else:
print(“2”,max(leadp2))`

You are testing the result of each round. You should be testing the cumulative lead after each round.

Here is a test case:

5
105 90
111 96
77 102
88 108
118 106

result

1 30

because the leads after each round are:

  • 15 (to player 1)
  • 30 (to player 1)
  • 5 (to player 1)
  • 15 (to player 2)
  • 2 (to player 2)

despite player 2 winning rounds 3 & 4 by bigger margins than any margin of player 1’s.

Wondering to see that post, that amazing tools to compare the rating to it. But in my hp laptop when I open that link it shows an error that system does not exist at that time I concert with hp support assistant to assistant and sort out the issue related it.