Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if i == j+1:
        ans += C[i-1]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if j == i+1:
        ans += C[i-1]
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if i == j+1:
        ans += C[a-1]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = sum(B)
for i, j in zip(A, A[1:]):
    if j == i+1:
        ans += C[i-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
print(max(0,c-(a-b))

Fixed submission:
n = int(input())
ans = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import math,sys,os,collections,functools
if(os.path.exists('input.txt')):
	sys.stdin=open('input.txt','r')
	sys.stdout=open('output.txt','w')
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	t=D/S
	if t<=T:
		print('Yes')
	else:
		print('No')	
		                                         

Fixed submission:
D,T,S=map(int,input().split())
t=D/S
if t<=T:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	d=S*T
	if d>=D:
		print('Yes')
	else:
		print('No')	
		                                         

Fixed submission:
D,T,S=map(int,input().split())
t=D/S
if t<=T:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
for testcase in range(int(input())):
	D,T,S=map(int,input().split())
	speed=D/T
	if speed>=S:
		print('Yes')
	else:
		print('No')	

Fixed submission:
D,T,S=map(int,input().split())
t=D/S
if t<=T:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
arr=list(map(int,input().split()))
count=0
for i in range(len(arr)):
	for j in range(i+1,len(arr)):
		count+=(arr[i]*arr[j])
print(count%((10**9)+7))

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
count=0
pre=[arr[0]]
for i in range(1,len(arr)):
	pre.append((pre[-1]+arr[i]))
ans=0
for i in range(len(arr)-1,0,-1):
	ans+=(pre[i-1]*arr[i])
print(ans%((10**9)+(7)))
Buggy python submission (verdict: Runtime Error):
n,m,k=map(int,input().split())
arr=list(map(int,input().split()))
brr=list(map(int,input().split()))

sumA=sum(arr)
bpointer=0
ans=0
sumB=0
for i in range(len(arr),-1,-1):
    if i<n:
        sumA-=arr[i]
    if sumA<=k:
        while bpointer<m and sumA+sumB+brr[bpointer]<=k:
            sumB+=brr[bpointer]
            bpointer+=1
    	ans=max(ans,i+bpointer)
print(ans)


Fixed submission:
n,m,k=map(int,input().split())
arr=list(map(int,input().split()))
brr=list(map(int,input().split()))

sumA=sum(arr)
bpointer=0
ans=0
sumB=0
for i in range(len(arr),-1,-1):
    if i<n:
        sumA-=arr[i]
    if sumA<=k:
        while bpointer<m and sumA+sumB+brr[bpointer]<=k:
            sumB+=brr[bpointer]
            bpointer+=1
        ans=max(ans,i+bpointer)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ls = list(map(int,input().split(' ')))
pro = 1
for i in ls:
    pro = pro*i
if(pro>(10**18)):
    print(-1)
else:
    print(pro)

Fixed submission:
n = int(input())
ls = list(map(int,input().split(' ')))
pro=1
f=0
zero=0
for i in ls:
    if(i==0):
        zero=1
if(zero==1):
    print(0)
else:
    for i in ls:
        pro = pro*i
        if(pro > 1000000000000000000):
            print(-1)
            f=1
            break
    if(f==0 and pro<=1000000000000000000):
        print(pro)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
print(3^a^b)

Fixed submission:
a = int(input())
b = int(input())
print(a^b)
Buggy python submission (verdict: Runtime Error):
s = input()
ops = ['-', '+']
for i in range(2):
    for j in range(2):
        for k in range(2):
            com = s[0] + op[i] + s[1] + op[j] + s[2] + op[k] + s[3]
            if eval(com) == 7:
                print(com + '=7')


Fixed submission:
s = input()
op = ['-', '+']
for i in range(2):
    for j in range(2):
        for k in range(2):
            com = s[0] + op[i] + s[1] + op[j] + s[2] + op[k] + s[3]
            if eval(com) == 7:
                print(com + '=7')
                exit(0)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans =0

for i in range(1,n):
    ans +=(n-1)//a
print(ans)

Fixed submission:
n = int(input())
ans =0

for i in range(1,n):
    ans +=(n-1)//i
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if sum(n)%9 ==0:
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
if n%9 ==0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
x,k,d = ,ap(int,input().split())
x = abs(x)
if x-k*d>0:
    print(x-k*d)
elif (k-x//d)%2 ==1:
    print(abs(x%d-d))
else:
    print(x%d)

Fixed submission:
x,k,d = map(int,input().split())
x = abs(x)
if x-k*d>0:
    print(x-k*d)
elif (k-x//d)%2 ==1:
    print(abs(x%d-d))
else:
    print(x%d)
Buggy python submission (verdict: Runtime Error):
n,d = map(int,input().split())
cnt = 0
for i in raneg(n):
    p,q = map(int,input().split())
    cnt += p*p+q*q <= d*d
print(cnt)

Fixed submission:
n,d = map(int,input().split())
cnt = 0
for i in range(n):
    p,q = map(int,input().split())
    cnt += p*p+q*q <= d*d
print(cnt)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
print("AC x",s.count("AC"))
print("WA x",a.count("WA"))
print("TLE x",a.count("TLE"

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
print("AC x",s.count("AC"))
print("WA x",s.count("WA"))
print("TLE x",s.count("TLE"))
print("RE x",s.count("RE"))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a =list(map(int,input().split()))
s =sum(a)
x = [0]*100001
for i in a:
    x[i] += 1

q = int(input())
for i in range(q):
    b,c = map(int(input().split()))
    s -= b*x[b]
    s += c*x[c]
    x[c] += x[b]
    x[b] = 0
    print(s)

Fixed submission:
n = int(input())
a =list(map(int,input().split()))
s =sum(a)
x = [0]*1000001
for i in a:
    x[i] += 1

q = int(input())
for i in range(q):
    b,c = map(int,input().split())
    s -= b*x[b]
    s += c*x[b]
    x[c] += x[b]
    x[b] = 0
    print(s)
Buggy python submission (verdict: Runtime Error):
x,n = map(int,input()split())
p = list(map(int,input().split()))
for i in range(101):
    if x-i not in p:
        print(x-i)
        exit()
    elif x+i not in p:
        print(x+i)
    exit()


Fixed submission:
x,n = map(int,input().split())
p = list(map(int,input().split()))
for i in range(101):
    if x-i not in p:
        print(x-i)
        exit()
    elif x+i not in p:
        print(x+i)
        exit()

Buggy python submission (verdict: Runtime Error):
x,n = map(int,input()split())
p = lsit(map(int,input().split()))
for i in range(101):
    if x-i not in p:
        print(x-i)
        exit()
    elif x+i not in p:
        print(x+i)
    exit()


Fixed submission:
x,n = map(int,input().split())
p = list(map(int,input().split()))
for i in range(101):
    if x-i not in p:
        print(x-i)
        exit()
    elif x+i not in p:
        print(x+i)
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
from operator import mul
from functools import reduce
ans = (reduce(mul,a))

if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(n-1):
    ans *= a[i+1]
    if ans > 10**18:
        break
if 0 in a:
    print(0)
elif ans > 10**18:
    print(-1)
else:
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(n-1):
    ans *= a[i+1]
if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(n-1):
    ans *= a[i+1]
    if ans > 10**18:
        break
if 0 in a:
    print(0)
elif ans > 10**18:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
import decimal
a,b = input().split()
a = decimal(a)
b = decimal(b)
print(int(a*b))

Fixed submission:
from decimal import Decimal
a,b = map(Decimal,input().split())

print(int(a*b))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(n-1):
    ans *= a[i+1]
    if ans > 10**18:
        break
if ans > 10**18:
    print(-1)
else:
    print(ans)


Fixed submission:
from decimal import Decimal
a,b = map(Decimal,input().split())

print(int(a*b))

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().spolit())
print(int(a*b))

Fixed submission:
from decimal import Decimal
a,b = map(Decimal,input().split())

print(int(a*b))
Buggy python submission (verdict: Runtime Error):
import math
a,b,h,m = map(int,input().split())
a_S = (30*h)%360+0.5*m
b_s = (6*m)

s = max(a_s,b_s)-min(a_s,b_s)
ans = math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(s)))
print(ans)

Fixed submission:
import math
a,b,h,m = map(int,input().split())
a_s = (30*h)%360+0.5*m
b_s = (6*m)

s = max(a_s,b_s)-min(a_s,b_s)
ans = math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(s)))
print(ans)
Buggy python submission (verdict: Runtime Error):

Copy
Copy
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _i in range(m)]
 
visit = [-1 for _ in range(n)]
visit[0] = 0
tree = [[] for _ in range(n)]
for a, b in ab:
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)
 
from collections import deque
q = deque([0])
while q:
    p = q.popleft()
    for i in tree[p]:
        if visit[i] < 0:
            visit[i] = p
            q.append(i)
if all(i >= 0 for i in visit):
    print("Yes")
    for i in visit[1:]:
        print(i+1)
else:
    print("No")

Fixed submission:
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _i in range(m)]
 
visit = [-1 for _ in range(n)]
visit[0] = 0
tree = [[] for _ in range(n)]
for a, b in ab:
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)
 
from collections import deque
q = deque([0])
while q:
    p = q.popleft()
    for i in tree[p]:
        if visit[i] < 0:
            visit[i] = p
            q.append(i)
if all(i >= 0 for i in visit):
    print("Yes")
    for i in visit[1:]:
        print(i+1)
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
x = int(input())
for i in range(-200,201):
    for j in range(-200,201):
        if i**5-j**5=x:
            print(i,j)
            exit()

Fixed submission:
x = int(input())
for i in range(-200,201):
    for j in range(-200,201):
        if i**5-j**5==x:
            print(i,j)
            exit()
Buggy python submission (verdict: Runtime Error):
x = int(input())
ans = 0
a = 100
while a < x:
    t = int(t*1.01)
    ans += 1
print(ans)

Fixed submission:
x = int(input())
ans = 0
a = 100
while a < x:
    a = int(a*1.01)
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
if n.count(7) == 0:
    print("No")
else:
    print("Yes")

Fixed submission:
n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
n = input()
if n.count(7) == 0:
    print("No)
else:
    print("Yes")

Fixed submission:
n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
n = [input()]
if n.count(7) == 0:
    print("No)
else:
    print("Yes")

Fixed submission:
n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
n = input()
if 7 in n:
    print("Yes")
else:
    print("No")

Fixed submission:
n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
n = input()
if n.count(7) == 0:
    print("No")
else:
    print("Yes")

Fixed submission:
n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
r  = s.count("R")
g = s.count("G")
b = s.count("B")

cnt = 0
for i in range(n):
    for j in range(i+1,n):
        if s[i] !=s[j] and ((2*j-i)<n):
            if s[2*j-i] != s[i] and s[2*j-i] != s[j]:
                cnt += 1
print(r*g*b-cnt)

Fixed submission:
n = int(input())
s = input()
r = list(s).count('R')
g = list(s).count('G')
b = list(s).count('B')

ans = r*g*b
for i in range(n):
    for j in range(i+1,n):
        k = j+(j-i)
        if (k<n and s[i] !=s[j] and s[j] !=s[k] and s[k]!=s[i]):
            ans -=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
s = sum(a)
for i in range(a):
    if i >= s/(4*m):
        ans += 1
if ans >= m:
    print("Yes")
else:
    print("No")

Fixed submission:
n,m = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
s = sum(a)
for i in a:
    if i >= s/(4*m):
        ans += 1
if ans >= m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
k,n = map(int,input().spliut())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)

Fixed submission:
k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = deque()
for i in range(n):
    for j in range(1,n):
        if a[j]-a[i] >= abs(a[j]-a[i]-k):
            ans.append(abs(a[j]-a[i]-k))
        else:
            ans.append(a[j]-a[i])
print(max(ans))

Fixed submission:
k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)

Buggy python submission (verdict: Time Limit Exceeded):
k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = []
for i in range(n):
    for j in range(1,n):
        if a[j]-a[i] >= abs(a[j]-a[i]-k):
            ans.append(abs(a[j]-a[i]-k))
        else:
            ans.append(a[j]-a[i])
print(max(ans))

Fixed submission:
k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
print((n*(n-1)//2))+(m*(m-1)//2))

Fixed submission:
n,m = map(int,input().split())
print((n*(n-1)//2)+(m*(m-1)//2))
Buggy python submission (verdict: Runtime Error):
s = input()
a = s[::-1]
b = (s[0:((len(s)-1)//2])
c = (s[((len(s)*3)//2:-1])
if s == a and b == c:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
n = len(s)
a = s[0:(n-1)//2]
b = s[(n+3)//2-1:n]
if s ==s[::-1] and a == a[::-1] and b == b[::-1] :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
l = int(input()
print((l/3)**3)

Fixed submission:
l = int(input())
print((l/3)**3)
Buggy python submission (verdict: Runtime Error):
k = int(input())
li = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(li(k-1))

Fixed submission:
k = int(input())
li = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(li[k-1])
Buggy python submission (verdict: Runtime Error):
s = input()
s.sort()
if s[0] != s[1] or s[1] != s[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
if len(set(s))==2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
c = n//(a+b)
d = (n%(a+b))
if a ==0:
    print(0)
elif n%(a+b)==0:
    print(c*a)
elif n%(a+b)!== 0 and d <=a :
    print((c*a)+d)
else:
    print((c*a)+a)


Fixed submission:
n,a,b = map(int,input().split())
c = n//(a+b)
d = (n%(a+b))
if a ==0:
    print(0)
elif n%(a+b)==0:
    print(c*a)
elif n%(a+b)!= 0 and d <=a :
    print((c*a)+d)
else:
    print((c*a)+a)
Buggy python submission (verdict: Runtime Error):
a,b = map(int(input().split()))

for i in range(1300):
    if i == a*12.5 and b*10:
        print(i)
        exit()
print(-1)

Fixed submission:
a,b = map(int,input().split())
import math
c = []
d =[]
for i in range(1300):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        c.append(i)
    else:
        d.append(i)
if len(c) ==0 :
    print(-1)
else:
    print(min(c))
Buggy python submission (verdict: Runtime Error):
s = input()
q = int(ionput())
h,t = [],[]
p = 0

for i in range(q):
    c = input().split()
    if c[0] =='1':
        h,t = t,h
        p = 1-p
    else:
        if c[1] =='1':
            h.append(c[2])
        else:
            t.append(c[2])
if p ==1:
    s = s[::-1]
print("".join(h[::-1])+s+"".join(t))

Fixed submission:
s = input()
q = int(input())
h,t = [],[]
p = 0

for i in range(q):
    c = input().split()
    if c[0] == '1':
        h,t = t,h
        p = 1-p
    else:
        if c[1] =='1':
            h.append(c[2])
        else:
            t.append(c[2])
if p ==1:
    s = s[::-1]
print("".join(h[::-1])+s+"".join(t))

Buggy python submission (verdict: Runtime Error):
s = inmput()
q = int(ionput())
h,t = [],[]
p = 0

for i in range(q):
    c = input().split()
    if c[0] =='1':
        h,t = t,h
        p = 1-p
    else:
        if c[1] =='1':
            h.append(c[2])
        else:
            t.append(c[2])
if p ==1:
    s = s[::-1]
print("".join(h[::-1])+s+"".join(t))

Fixed submission:
s = input()
q = int(input())
h,t = [],[]
p = 0

for i in range(q):
    c = input().split()
    if c[0] == '1':
        h,t = t,h
        p = 1-p
    else:
        if c[1] =='1':
            h.append(c[2])
        else:
            t.append(c[2])
if p ==1:
    s = s[::-1]
print("".join(h[::-1])+s+"".join(t))
Buggy python submission (verdict: Runtime Error):
=[list(map(int,input().split())) for i in range(3)]
n=int(input())
for k in range(n):
  s=int(input())
  for i in range(3):
    for j in range(3):
      if s == A[i][j]:
        A[i][j]=0   
if A[0][0]==0 and A[1][0]==0 and A[2][0]==0:
  print("Yes")
   
elif A[0][1]==0 and A[1][1]==0 and A[2][1]==0:
  print("Yes")
elif A[0][2]==0 and A[1][2]==0 and A[2][2]==0:
  print("Yes")
elif [0,0,0] in A:
  print("Yes")
  
elif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:
  print("Yes")
  
elif A[0][0]==0 and A[1][1]==0 and A[2][2]==0:
  print("Yes")
  
else:
  print("No")

Fixed submission:
A=[list(map(int,input().split())) for i in range(3)]
n=int(input())
for k in range(n):
  s=int(input())
  for i in range(3):
    for j in range(3):
      if s == A[i][j]:
        A[i][j]=0   
if A[0][0]==0 and A[1][0]==0 and A[2][0]==0:
  print("Yes")
   
elif A[0][1]==0 and A[1][1]==0 and A[2][1]==0:
  print("Yes")
elif A[0][2]==0 and A[1][2]==0 and A[2][2]==0:
  print("Yes")
elif [0,0,0] in A:
  print("Yes")
  
elif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:
  print("Yes")
  
elif A[0][0]==0 and A[1][1]==0 and A[2][2]==0:
  print("Yes")
  
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [list(map(int,input().split()))]
for i in range(10**n):
    tmp = str(i)
    if len(tmp)== n:
        f = True
        for s,c in a:
            if tmp[s-1] != str(c):
                f = False
                break
        if f:
            print(i)
            exit()
print(-1)

Fixed submission:
n,m = map(int,input().split())
a = [list(map(int,input().split()))for i in range(m)]

for i in range(10**n):
    tmp = str(i)
    if len(tmp) == n:
        f = True
        for s,c in a:
            if tmp[s-1] != str(c):
                f = False
                break
        if f :
            print(i)
            exit()
print(-1)
Buggy python submission (verdict: Runtime Error):
a = lsit(map(int,input().split()))
if len(set(a))==2:
    print("Yes")
else:
    print("No")

Fixed submission:
a = list(map(int,input().split()))
if len(set(a)) == 2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input()
s = {}
for i in range(n):
    si = input()
    if si in s:
        s[si] +=1
    else:
        s[si] = 0
l = max(s.values())
ans = []
for i in s:
    if s[i] == l:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

Fixed submission:
from collections import  Counter
n = int(input())
a  = [input() for i in range(n)]
cnt = Counter(a)
l = max(cnt.values())
ans = [s for s,c in cnt.items()if c ==l]
ans.sort()
print('\n'.join(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input()
s = dict()
for i in range(n):
    si = input()
    if si in s:
        s[si] +=1
    else:
        s[si] = 0
l = max(s.values())
ans = []
for i in s:
    if s[i] == l:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

Fixed submission:
from collections import  Counter
n = int(input())
a  = [input() for i in range(n)]
cnt = Counter(a)
l = max(cnt.values())
ans = [s for s,c in cnt.items()if c ==l]
ans.sort()
print('\n'.join(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input()
s = dict()
for i in range(n):
    si = input()
    if si in s:
        s[si] +=1
    else:
        s[si] = 0
l = max(s.values())
ans = []
for i in s:
    if s[i] == 1:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

Fixed submission:
from collections import  Counter
n = int(input())
a  = [input() for i in range(n)]
cnt = Counter(a)
l = max(cnt.values())
ans = [s for s,c in cnt.items()if c ==l]
ans.sort()
print('\n'.join(ans))
Buggy python submission (verdict: Runtime Error):
s,t = map(input().split())
a,b = map(int,input().split())
u = input()

if s == u:
    print(a-1,b)
else:
    print(a,b-1)

Fixed submission:
s,t = input().split()
a,b = map(int,input().split())
u = input()

if s == u:
    print(a-1,b)
else:
    print(a,b-1)
Buggy python submission (verdict: Runtime Error):
s = input()
print(x*len(s))

Fixed submission:
s = input()
t = len(s)
print("x"*t)
Buggy python submission (verdict: Runtime Error):
n = int(input())

a = list(map(int,input().split())))
if n ==len(set(a)):
    print("YES")
else:
    print("NO")

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if len(set(a)) == n:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input()

a = list(map(int,input().split())))
if n ==len(set(a)):
    print("YES")
else:
    print("NO")

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if len(set(a)) == n:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n =int(input())
a = list(map(int,input().split()))
if n = len(set(a)):
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if len(set(a)) == n:
    print("YES")
else:
    print("NO")