当我给出自定义输入时,我得到正确的答案,但是当我给出自定义输入时,codechef在以下位置报告我nzec错误
rounds=int(input())
声明
p1=[]
p2=[]
lead=[]
pLead=[]
a,b=0,0
rounds=int(input())
for _ in range(int(rounds)):
a,b=map(int,input().split())
p1.append(a)
p2.append(b)
if _ ==0:
lead.append(a-b)
else:
lead.append(a-b+lead[_-1])
pLead.append(abs(lead[_]))
if lead[pLead.index(max(pLead))]<0:
print(2,-1*lead[pLead.index(max(pLead))])
else:
print(1,lead[pLead.index(max(pLead))])