You are viewing a single comment's thread. Return to all comments →
Easiest approach:
N=input()
sumi=0;
maxi=0;
j=0;
for i in range(N):
a,b=raw_input().split() sumi+=int(a)-int(b) if(sumi<0): sumi=0 j=i+1
print(j)
Seems like cookies are disabled on this browser, please enable them to open this website
Truck Tour
You are viewing a single comment's thread. Return to all comments →
Easiest approach:
N=input()
sumi=0;
maxi=0;
j=0;
for i in range(N):
print(j)