Made a mistake on this problem. Pypy is not reliable, next time shall try both. Conclusion tomorrow

这题失误了,pypy不可靠,还是两种都试试。明天再写总结

# 老版
k = int(input())
n = []
a = []
b = a
for i in range(0,k):
    n.append(int(input()))
    a.append([int(x) for x in input().split()])
S = []
A = []
for i in range(0,k):
    s = 0
    for e in a[i]:
        s = s + int(e)
    S.append(s)
for i in range(0,k):
    for j in range(0,n[i]):
        A.append([i,j,S[i]-a[i][j]])
A = sorted(A, key=lambda x:x[2])
nn = len(A)
flag = 0
for i in range(0,nn-1):
    if A[i][2] == A[i+1][2] and A[i][0] != A[i+1][0]:
        print('YES')
        print(A[i][0]+1,A[i][1]+1)
        print(A[i+1][0]+1,A[i+1][1]+1)
        flag = 100
        break
if flag == 0:
    print('NO')

学习一个,im angry!

#优化过的完美程序
k = int(input())
A = []
for i in range(0,k):
    n = int(input())
    a = [int(x) for x in input().split()]
    s = sum(a)
    A+= [[i,j,s-a[j]] for j in range(0,n)]
A = sorted(A, key=lambda x:x[2])
nn = len(A)
flag = 0
for i in range(0,nn-1):
    if A[i][2] == A[i+1][2] and A[i][0] != A[i+1][0]:
        print('YES')
        print(A[i][0]+1,A[i][1]+1)
        print(A[i+1][0]+1,A[i+1][1]+1)
        flag = 100
        break
if flag == 0:
    print('NO')