Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=int(input())
red=sorted(list(map(int,input().split())) for i in range(N), key=lambda x:-1*x[1])
blue=sorted(list(map(int,input().split())) for i in range(N))
red = sorted(red, key = lambda x:x[1] * -1)
count=0
for i in red:
    for n,j in enumerate(blue):
        if i[0]<j[0] and i[1]<j[1]:
            count+=1
            del blue[n]
            break
print(count)

Fixed submission:
N=int(input())
red=sorted([list(map(int,input().split())) for i in range(N)], key=lambda x:-1*x[1])
blue=sorted([list(map(int,input().split())) for i in range(N)])
red = sorted(red, key = lambda x:x[1] * -1)
count=0
for i in red:
    for n,j in enumerate(blue):
        if i[0]<j[0] and i[1]<j[1]:
            count+=1
            del blue[n]
            break
print(count)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(len([i for i in map(str,range(a,b+1)) if i==i[::-1]))

Fixed submission:
a,b=map(int,input().split())
print(len([i for i in map(str,range(a,b+1)) if i==i[::-1]]))
Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(x))

Fixed submission:
a,b,c,x=[int(input()) for _ in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(x))
Buggy python submission (verdict: Runtime Error):
a,b,c,x=[int(input()) for i in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(x))

Fixed submission:
N,Y=map(int,input().split())
for x in range(N+1):
    for y in range(N+1):
        z=N-x-y
        if 0<=z<=2000:
            if 10000*x+5000*y+1000*z==Y:
                print(x,y,z)
                exit()
print(-1,-1,-1)
Buggy python submission (verdict: Time Limit Exceeded):
N=10**5
prime=[0]*(N+1)
for n in range(2,N+1):
  if all([n%i for i in range(2,int(n**.5)+1)]):
      prime[n]=1

check=[0]*(N+1)
for n in range(N+1):
    if n%2==1 and prime[n] and prime[(n+1)//2]:
        check[n]=1

accumulate=[0]*(N+1)
for n in range(1,N+1):
    accumulate[n]=accumulate[n-1]+check[n]

Q=int(input())
for q in range(Q):
    l,r=map(int,input().split())
    print(accumulate[r]-accumulate[l-1])

Fixed submission:
N=10**5
prime=[1]*(N+1)
prime[0]=prime[1]=0
for i in range(2,int(N**.5)+1):
    if not prime[i]:
        continue
    for j in range(i*2,N+1,i):
        prime[j]=0

check=[0]*(N+1)
for n in range(N+1):
    if n%2==1 and prime[n] and prime[(n+1)//2]:
        check[n]=1

accumulate=[0]*(N+1)
for n in range(1,N+1):
    accumulate[n]=accumulate[n-1]+check[n]

Q=int(input())
for q in range(Q):
    l,r=map(int,input().split())
    print(accumulate[r]-accumulate[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
Q=int(input())
for q in range(Q):
    l,r=map(int,input().split())
    count=0
    for N in range(l,r+1,2):
        if all([N%i for i in range(2,int(N**.5)+1)]) and all([((N+1)/2)%i for i in range(2,int(((N+1)/2)**.5)+1)]) and N!=1:
            count+=1
    print(count)

Fixed submission:
N=10**5
prime=[1]*(N+1)
prime[0]=prime[1]=0
for i in range(2,int(N**.5)+1):
    if not prime[i]:
        continue
    for j in range(i*2,N+1,i):
        prime[j]=0

check=[0]*(N+1)
for n in range(N+1):
    if n%2==1 and prime[n] and prime[(n+1)//2]:
        check[n]=1

accumulate=[0]*(N+1)
for n in range(1,N+1):
    accumulate[n]=accumulate[n-1]+check[n]

Q=int(input())
for q in range(Q):
    l,r=map(int,input().split())
    print(accumulate[r]-accumulate[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N=int(input())
A=Counter(input().split())
B=Counter(input().split())
C=Counter(input().split())
ans=0
for a_key,a_count in A.most_common():
    for b_key,b_count in B.most_common():
        for c_key,c_count in C.most_common():
            a_key,b_key,c_key=int(a_key),int(b_key),int(c_key)
            if a_key<b_key and b_key<c_key:
                ans+=a_count*b_count*c_count
print(ans)

Fixed submission:
import bisect
N=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
C=sorted(list(map(int,input().split())))
print(sum(bisect.bisect_left(A,b)*(N-bisect.bisect_right(C,b)) for b in B))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*h*n-N*n-N*h!=0:
            w=(N*h*n)/(4*h*n-N*n-N*h)
            if w>0 and w==int(w):
                print(h,n,int(w))
                exit()

Fixed submission:
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*h*n>N*n+N*h:
            w=(N*h*n)/(4*h*n-N*n-N*h)
            if w==int(w):
                print(h,n,int(w))
                exit()
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n in 9:
    print("Yes")
else:
    print("No")

Fixed submission:
print("Yes" if "9" in input() else "No")

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

Fixed submission:
print("Yes" if "9" in input() else "No")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
print(min(abs(S-2*sum(A[i:])) for i in range(1,N)))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
T=[0]*N
for i in range(N-1):
    T[i+1]=T[i]+A[i]
print(min(abs(S-2*T[i]) for i in range(1,N)))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
print(min(abs(sum(A[:i])-sum(A[i:])) for i in range(1,N)))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
T=[0]*N
for i in range(N-1):
    T[i+1]=T[i]+A[i]
print(min(abs(S-2*T[i]) for i in range(1,N)))
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2])

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
print(*(A[::-2]+A[N%2::2]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
B=[]
for i in range(N):
    B.append(A[i])
    B=B[::-1]
print(*B)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
print(*(A[::-2]+A[N%2::2]))
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
c=[0]*8
d=0
for a in A:
    if 1<=a<=399:c[0]=1
    elif 400<=a<=799:c[1]=1
    elif 800<=a<1199:c[2]=1
    elif 1200<=a<=1599:c[3]=1
    elif 1600<=a<=1999:c[4]=1
    elif 2000<=a<=2399:c[5]=1
    elif 2400<=a<=2799:c[6]=1
    elif 2800<=a<=3199:c[7]=1
    else:d+=1
if d>0:e=1
else e=0
print(sum(c)+e,sum(c)+d)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
color=[0]*8
free=0
for a in A:
    if 1<=a<=399:color[0]=1
    elif 400<=a<=799:color[1]=1
    elif 800<=a<1199:color[2]=1
    elif 1200<=a<=1599:color[3]=1
    elif 1600<=a<=1999:color[4]=1
    elif 2000<=a<=2399:color[5]=1
    elif 2400<=a<=2799:color[6]=1
    elif 2800<=a<=3199:color[7]=1
    elif 3200<=a<=4800:free+=1
M=sum(color)+free
m=1 if sum(color)==0 and free!=0 else sum(color)
print(m,M)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=" ".join([input() for _ in [0]*m])
for i in range(i,n+1):print(s.split().count(str(i)))

Fixed submission:
n,m=map(int,input().split())
l=" ".join([input() for _ in [0]*m])
for i in range(1,n+1):print(l.split().count(str(i)))
Buggy python submission (verdict: Time Limit Exceeded):
ans=1
n=int(input())
for i in range(1,n+1):
    ans*=i
print(ans%(10**9+7))

Fixed submission:
import math
print(math.factorial(int(input()))%(10**9+7))
Buggy python submission (verdict: Runtime Error):
n,s=input(),input()
c,m=0,0
for i in range(n):
    if s[i]=="I":c,m=c+1,max(c,m)
    if s[i]=="D":c,m=c-1,max(c,m)
print(m)

Fixed submission:
input()
s=input()
c,m=0,0
for i in range(len(s)):
    if s[i]=="I":
        c+=1
        m=max(c,m)
    if s[i]=="D":
        c=c-1
        m=max(c,m)
print(m)
Buggy python submission (verdict: Time Limit Exceeded):
k,s=map(int,input().split())
print([x+y+z for z in range(k+1) for y in range(k+1) for x in range(k+1)].count(s))

Fixed submission:
k,s=map(int,input().split())
print(len([1 for z in range(k+1) for y in range(k+1) if 0<=s-y-z<=k]))
Buggy python submission (verdict: Runtime Error):
input(eval(input()))

Fixed submission:
print(eval(input()))
Buggy python submission (verdict: Runtime Error):
c=int(input())
if c in "aiueo":
    print("vowel")
else:
    print("consonant")

Fixed submission:
print("vowel" if input() in "aiueo" else "consonant")
Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())
print(sum(1 for i in range(a,b+1) if i%x==0))

Fixed submission:
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
Buggy python submission (verdict: Runtime Error):
s=input()
t=[]
for i in s:
    if i=="B" and not len(t):t.pop()
    if i=="0" or i=="1":t.append(i)
print(*t,sep="")

Fixed submission:
s=input()
t=[]
for i in s:
    if i=="B" and len(t)!=0:t.pop()
    if i=="0" or i=="1":t.append(i)
print(*t,sep="")
Buggy python submission (verdict: Time Limit Exceeded):
import functools
N = int(input())

A = list(map(int,input().split()))
#print(A)
ans = []
for i in range(len(A)):
    B = A[:i]+A[i+1:]
    res = functools.reduce(lambda x, y: x ^ y, B)
    ans.append(res)
print(*ans)

Fixed submission:
import functools
N = int(input())

A = list(map(int,input().split()))
#print(A)
s = A[0]
for num in A[1:]:
    s ^= num

res = [0] * N
for i,num in enumerate(A):
    res[i] = s^num
print(*res)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:42:23 2020

@author: Tofu
"""

N = input()
#print(N)

lst = N[-1]
#print(lst)
x = ''
if lst in ['2','4','5','7','9']:
    x = 'hon'
elif lst in ['0','1','6','8']:
    x = 'pon'
else:
    x = 'bon'
    
#print(x)
    return x

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:42:23 2020

@author: Tofu
"""

#N = input()
#print(N)
def yomi(N):
    lst = N[-1]
#print(lst)
    x = ''
    if lst in ['2','4','5','7','9']:
        x = 'hon'
    elif lst in ['0','1','6','8']:
        x = 'pon'
    elif lst == '3':
        x = 'bon'
    
    print(x)
    return x


if __name__ == '__main__':
    N = input()
    
    ans = yomi(N)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
def main():
    N = int(input())
    
    lst = []
    count = 0
    for i in range(N):
        s = ''.join(sorted(str(input())))
        #print(s,lst)
        if s in lst:
            count += Counter(lst)[s]
        lst.append(s)
    print(count)

if __name__ == "__main__":
    main()

Fixed submission:
from collections import Counter
 
n = int(input())
s = [list(input()) for _ in range(n)]
for i in range(n):
    s[i].sort()
    s[i] = ''.join(s[i])
counter = Counter(s)
#print(counter)
ans = 0
for val in counter.values():
    #countC2
    ans += val*(val-1)//2
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())

# s = [''.join(sorted(str(input()))) for _ in range(N)]
# #print(s)
# count = 0
# for i in range(N):
#     for j in range(i+1,N):
#         #diff = Counter(s[i])-Counter(s[j])
#         diff = s[i].replace(s[j],'')
#         if len(diff) == 0:
#             count += 1
        
# print(count)
lst = []
count = 0
for i in range(N):
    s = ''.join(sorted(str(input())))
    #print(s,lst)
    if s in lst:
        count += Counter(lst)[s]
    lst.append(s)
print(count)

Fixed submission:
from collections import Counter
 
n = int(input())
s = [list(input()) for _ in range(n)]
for i in range(n):
    s[i].sort()
    s[i] = ''.join(s[i])
counter = Counter(s)
#print(counter)
ans = 0
for val in counter.values():
    #countC2
    ans += val*(val-1)//2
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())

s = [''.join(sorted(str(input()))) for _ in range(N)]
#print(s)
count = 0
for i in range(N):
    for j in range(i+1,N):
        #diff = Counter(s[i])-Counter(s[j])
        diff = s[i].replace(s[j],'')
        if len(diff) == 0:
            count += 1
        
print(count)

Fixed submission:
from collections import Counter
 
n = int(input())
s = [list(input()) for _ in range(n)]
for i in range(n):
    s[i].sort()
    s[i] = ''.join(s[i])
counter = Counter(s)
#print(counter)
ans = 0
for val in counter.values():
    #countC2
    ans += val*(val-1)//2
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())

s = [str(input()) for _ in range(N)]
count = 0
for i in range(N):
    for j in range(i+1,N):
        diff = Counter(s[i])-Counter(s[j])
        if len(diff) == 0:
            count += 1
        
print(count)

Fixed submission:
from collections import Counter
 
n = int(input())
s = [list(input()) for _ in range(n)]
for i in range(n):
    s[i].sort()
    s[i] = ''.join(s[i])
counter = Counter(s)
#print(counter)
ans = 0
for val in counter.values():
    #countC2
    ans += val*(val-1)//2
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
L,R = map(int,input().split())
mn = 10**10
cal = 0
for i in range(L,R+1):
    for j in range(i+1,R+1):
        
        cal = (i%2019*j%2019)%2019
        if cal < mn:
            mn = cal
        if cal == 0:
            break
            
print(mn)
        

Fixed submission:
L,R = map(int,input().split())
mn = 10**10
cal = 0
for i in range(L,R+1):
    for j in range(i+1,R+1):
        
        cal = ((i%2019)*(j%2019))%2019
        if cal < mn:
            mn = cal
        if cal == 0:
            break
    else:
        continue
    break
print(mn)

Buggy python submission (verdict: Time Limit Exceeded):
L,R = map(int,input().split())
mn = 10**10
cal = 0
for i in range(L,R+1):
    for j in range(i+1,R+1):
        
        cal = (i%2019*j%2019)%2019
        if cal < mn:
            mn = cal
            
print(mn)
        

Fixed submission:
L,R = map(int,input().split())
mn = 10**10
cal = 0
for i in range(L,R+1):
    for j in range(i+1,R+1):
        
        cal = ((i%2019)*(j%2019))%2019
        if cal < mn:
            mn = cal
        if cal == 0:
            break
    else:
        continue
    break
print(mn)
Buggy python submission (verdict: Runtime Error):
W,H,x,y = map(int,input().split())

#print(W,H,x,y)
if x ==W/2 and y == H/2:
    area =  "{0:.6f}".format(float(x*H))
    print(area,1)
else:
    area ="{0:.6f}".format(float(min(W-x)*H,x*H))
    print(area,0)

Fixed submission:
W,H,x,y = map(int,input().split())

#print(W,H,x,y)
area =  "{0:.6f}".format(float(W*H/2))
if x == W/2 and y == H/2:
    print(area,1)
else:
    print(area,0)
Buggy python submission (verdict: Runtime Error):

def frog2(H,N,K):
    #print(H)
    DP = [10**10]*N
    #DP = [0]*N
    DP[0] = 0
    DP[1] = abs(H[1]-H[0])
    for i in range(2,N):
        for j in range(1,K+1):
            DP[i] = chmin(DP[i],DP[i-j]+abs(H[i]-H[i-j]))
    return DP[-1]

def chmin(a,b):
    if a < b:
        return a
    else:
        return b

if __name__ == '__main__':
    N,K = map(int,input().split())
    H = list(map(int,input().split()))
    ans = frog2(H,N,K)
    print(ans)
    

Fixed submission:

def frog(H,N):
    #print(H)
    DP = [0]*N
    DP[0] = 0
    DP[1] = abs(H[1]-H[0])
    for i in range(2,N):
        DP[i] = min(abs(H[i]-H[i-2])+DP[i-2],abs(H[i]-H[i-1])+DP[i-1])
    #print(DP)
    return DP[-1]    
if __name__ == '__main__':
    N = int(input())
    H = list(map(int,input().split()))
    ans = frog(H,N)
    print(ans)
Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())

x = list(map(int,input().split()))
lst = [0]*N
for i in range(len(x)):
    lst[i] = abs(x[i] - X)
    
def find_gcd(x, y): 
    while(y): 
        x, y = y, x % y 
  
    return x 

num1=lst[0] 
num2=lst[1] 
gcd=find_gcd(num1,num2) 
  
for i in range(2,len(lst)): 
    gcd=find_gcd(gcd,lst[i]) 
    
print(gcd)

Fixed submission:
import fractions
N,X = map(int,input().split())

x = list(map(int,input().split()))
lst = [0]*N
for i in range(len(x)):
    lst[i] = x[i] - X
   
a=0
for e in lst:
  a=fractions.gcd(a,e)
print(abs(a))
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())

grid = [list(str(input())) for _ in range(H)]

def elim(grid):
    grid_after = []
    for i in range(H):
        gset = list(set(grid[i]))
        #print(gset)
        #print(grid[i])
        if gset[0] != '.':
            grid_after.append(grid[i])
    return grid_after
    
def transpose(grid_after):
    
    H1 = len(grid_after)
    W1 = len(grid_after[0][:])
    gridT = [['']*H1 for _ in range(W1)]
    for i in range(W1):
        for j in range(H1):
            gridT[i][j] = grid_after[j][i]
            
            
    return gridT

grid_after = elim(grid)

gridT1 = transpose(grid_after)
#print(gridT1)
grid_after2 = elim(gridT1)
# print(grid_after2)
gridT2 = transpose(grid_after2)
#print(gridT2)
for i in gridT2:
    print(*i,sep='')

Fixed submission:
def elimrow(lst):
    lst_after = []
    gset = []
    H1 = len(lst)
    for i in range(H1):
        gset = list(set(lst[i]))
        gset.sort()
        #print(gset)
        if gset[0] != '.':
            lst_after.append(lst[i])
    return lst_after

def trans(lst):
    return list(zip(*lst))

def main():
    H,W = map(int,input().split())

    grid = [list(str(input())) for _ in range(H)]
    grid_after = []
    grid_after = elimrow(grid)
    gridT = trans(grid_after)
    grid_after2 = elimrow(gridT)
    gridT2 = trans(grid_after2)
    #print(gridT2)
    for i in gridT2:
        print(*i,sep='')

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def prime(n):
    prime_lst = []
    num_lst = []
    for i in range(2,n+1):
        if i not in num_lst:
            prime_lst.append(i)
            for j in range(i*i, n+1, i):
                #add all the dividers 
                num_lst.append(j)
        #print(prime_lst)
        #print(num_lst)
    return prime_lst
    
    
Q = int(input())
for i in range(Q):
    x = []
    l,r = map(int,input().split())
    for i in range(l,r+1,2):
        #print(i)
        lst = prime(i)
        if i in lst and (i+1)/2 in lst:
            x.append(i)

    print(len(x))

Fixed submission:
import math
from itertools import accumulate

def is_prime(n):
    if n == 1:
        return 0
    for k in range(2,int(math.sqrt(n))+1):
        if n % k == 0:
            return 0
    return 1
    
Q = int(input())    
L = [0]*Q
R = [0]*Q

for i in range(Q):
    L[i], R[i] = list(map(int, input().split()))

min_L = min(L)
max_R = max(R)

check = []
for i in range(min_L,max_R+ 1):
    if (i%2 ==1):
        flg = (is_prime(i) and is_prime((i+1)/2))
    else:
        flg = 0
    check.append(flg)
    
#print(check)

check = [0] + check
check = list(accumulate(check))
#print(check)
#print(R,L,min_L)

for i in range(Q):
    print(check[R[i]-min_L+1]-check[L[i]-min_L])
Buggy python submission (verdict: Runtime Error):
import string
s = str(input())
low = string.ascii_lowercase
fin = ''
for i in range(len(low)):
    if low[i] not in s:
        fin += low[i]
        
print(fin[0])

Fixed submission:
import string
s = str(input())
low = string.ascii_lowercase
fin = ''
for i in range(len(low)):
    if low[i] not in s:
        fin += low[i]
if len(fin) == 0:
    print('None')
else:
    print(fin[0])
Buggy python submission (verdict: Runtime Error):
O = str(input())
E = str(input())
st = ''
for i in range(len(O)):
    st += O[i]
    st+= E[i]
    
print(st)
        

Fixed submission:
O = str(input())
E = str(input())
st = ''
if len(O) == len(E):
    for i in range(len(O)):
        st += O[i]
        st+= E[i]
    print(st)
else:
    for i in range(len(O)-1):
        st += O[i]
        st+= E[i]
    
    print(st+O[-1])
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
    mannmn = 10**8
    for j in range(M):
        mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
        if mann <= mannmn:
            mannmn = mann
            ref = j
    print(ref+1)

Fixed submission:
N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
    mannmn = 10**10
    mann = 10**10
    for j in range(M):
        mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
        if mann < mannmn:
            mannmn = mann
            ref = j
    print(ref+1)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
    mannmn = 10**8
    for j in range(M):
        mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
        if mann < mannmn:
            mannmn = mann
            ref = j+1
    print(ref)
        

Fixed submission:
N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
    mannmn = 10**10
    mann = 10**10
    for j in range(M):
        mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
        if mann < mannmn:
            mannmn = mann
            ref = j
    print(ref+1)
Buggy python submission (verdict: Runtime Error):
lst = map(int,input().split())

if lst[0] > lst[1]:
  print('Alice')
elif lst[0] < lst[1]:
  print('Bob')
else:
  print('Draw')



Fixed submission:
lst = list(map(int,input().split()))

if lst[1] != 1 and lst[0] > lst[1] :
    print('Alice')
elif lst[0] != 1 and lst[0] < lst[1]:
    print('Bob')
elif lst[1] == 1 and lst[0] != 1:
    print('Bob')
elif lst[0] == 1 and lst[1] != 1:
    print('Alice')
else:
  print('Draw')
Buggy python submission (verdict: Runtime Error):

lst = list(map(str,input().split()))
#print(lst)
#print(lst[1])
print(lst[0][0]+lst[1][0]+lst[2][0])

Fixed submission:

#lst = list(map(str,input().split()))
st = str(input())
if st in ['a','e','i','o','u']:
    print('vowel')
else:
    print('consonant')
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
t=input()

for i in range(n,2*n-1):
    if s[:2*n-i] == t[2*n-i]:
        print(i)
        exit()
print(2*n)

Fixed submission:
n=int(input())
s=input()
t=input()

for i in range(n+1):
    #print(s[i:],t[:n-i])
    if s[i:] == t[:n-i]:
        print(n+i)
        exit()