Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A, B, C, K = list(map(int,input().split()))

out = []
for i in [A,B,C]:
    if(i <= K):
        out.append(i)
        K = (K - i) if (K - i) >= 0 else K
    else:
        out.append(((K - i) if (K - i) > 0 else K))

# if len(out) < 3:
#     for i in range(3 - len(out)):
#         out.append(0)

print(1*out[0] + 0*out[1] + (-1)*out[2])

Fixed submission:
S = list(map(str, input().split()))[0]
T = list(map(str, input().split()))[0]

if (abs(len(T) - len(S)) == 1) and (T[:-1] == S):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S, T = list(map(str, input().split()))

if (abs(len(T) - len(S)) == 1) and (T[:-1] == S):
    print("Yes")
else:
    print("No")


Fixed submission:
S = list(map(str, input().split()))[0]
T = list(map(str, input().split()))[0]

if (abs(len(T) - len(S)) == 1) and (T[:-1] == S):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys, os, time, math
import numpy as np
from collections import deque
from functools import reduce
import itertools, math

# print("Start")
S, T = list(map(str, input().split()))
# N = int(input())

if (abs(len(T) - len(S)) == 1) and (T[:-1] == S):
    print("Yes")
else:
    print("No")

Fixed submission:
S = list(map(str, input().split()))[0]
T = list(map(str, input().split()))[0]

if (abs(len(T) - len(S)) == 1) and (T[:-1] == S):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys, os, time, math
import numpy as np
import pandas as pd

 
# print("Start")
N = list(map(str, input().split()))
N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")

Fixed submission:
N = input()
# N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys, os, time, math
import numpy as np
import pandas as pd

import sys, os, time, math
import numpy as np
import pandas as pd
 
 
# print("Start")
N = list(map(str, input().split()))
N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")

Fixed submission:
N = input()
# N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys, os, time, math
import numpy as np
import pandas as pd

import sys, os, time, math
import numpy as np
import pandas as pd
 
 
# print("Start")
N = list(map(str, input().split()))
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0][0] == "7") or (N[0][1] == "7") or (N[0][2] == "7"):
    print("Yes")
else:
    print("No")

Fixed submission:
N = input()
# N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys, os, time, math
import numpy as np
import pandas as pd


print("Start")
N = list(map(str, input().split()))
# N = np.array(list(map(int, input().split())))
# print(N, K)
print(N)

if (N[0][0] == "7") or (N[0][1] == "7") or (N[0][2] == "7"):
    print("Yes")
else:
    print("No")


Fixed submission:
N = input()
# N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
# print([a-1 for a in A])
L = [-1 for i in range(N)]
visited = []
now = 0
loopstarts = None
looplength = None
for i in range(N):
    if now in visited:
        break
    else:
        L[now] = i
        visited.append(now)
        now = A[now]-1
# print(visited, L, now)
loopstarts = visited.index(now)
looplength = len(visited)-loopstarts
# print(loopstarts)
# print(looplength)
if K < loopstarts:
    print(visited[K]+1)
else:
    print(visited[loopstarts+(K-loopstarts)%looplength]+1)

Fixed submission:
from time import time
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
L = [-1 for i in range(N)]

visited = []
now = 0
loopstarts = None
looplength = None
t0 = time()

for i in range(N):
    if L[now] != -1:
        break
    else:
        L[now] = i
        visited.append(now)
        now = A[now]-1

loopstarts = visited.index(now)
looplength = len(visited)-loopstarts

if K < loopstarts:
    print(visited[K]+1)
else:
    print(visited[loopstarts+(K-loopstarts)%looplength]+1)
# print(time()-t0)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [-1, -1] + list(map(int, input().split()))
for i in range(1, N+1):
    print(A.count(i))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(N)]
for i in range(N-1):
    B[A[i]-1] += 1
print("\n".join(list(map(str, B))))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = str(input())

x, y, z = 0,0,0
for i in range(N):
    if S[i] == "R":
        x += 1
    elif S[i] == "G":
        y += 1
    elif S[i] == "B":
        z += 1
    else:
        print("ERROR")

no = 0
for s in range(N-2):
    d = 1
    while(s+2*d < N):
        if len(set([S[s],S[s+d],S[s+2*d]])) == 3:
            no += 1
        d += 1

print(x*y*z-no)

Fixed submission:
from time import time 
N = int(input())
S = str(input())
t0 = time()
x, y, z = 0,0,0
for i in range(N):
    if S[i] == "R":
        x += 1
    elif S[i] == "G":
        y += 1
    elif S[i] == "B":
        z += 1
    else:
        print("ERROR")

no = 0
for s in range(N-2):
    d = 1
    while(s+2*d < N):
#         if len(set([S[s],S[s+d],S[s+2*d]])) == 3:
        a = S[s]
        b = S[s+d]
        c = S[s+2*d]
        if a != b and b != c and c != a:
            no += 1
        d += 1

print(x*y*z-no)
# print(time() - t0)
Buggy python submission (verdict: Runtime Error):
from math import *
A,B=list(map(input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
  print(x)
else:
  print(-1)

Fixed submission:
from math import *
A,B=list(map(int, input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
    print(x)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
r, D, x = map(int, input().split())
for i in range(10):
  x = r*x-D
  print(x)


Fixed submission:
A, B = map(int, input().split())
if A >= 13:
  print(B)
elif A >= 6:
  print(B//2)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
r, d, x = list(map(int, input().split()))
for i in range(10):
  x = r*x-D
  print(x)


Fixed submission:
r, D, x = list(map(int, input().split()))
for i in range(10):
  x = r*x-D
  print(x)

Buggy python submission (verdict: Runtime Error):
r, d, x = map(int, input().split())
for i in range(10):
  x = r*x-D
  print(x)

Fixed submission:
r, D, x = list(map(int, input().split()))
for i in range(10):
  x = r*x-D
  print(x)
Buggy python submission (verdict: Runtime Error):
word1 = list(input())
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    else if c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)


Fixed submission:
word1 = list(input())
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    elif c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)

Buggy python submission (verdict: Runtime Error):
word1 = input()
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    else if c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)

Fixed submission:
word1 = list(input())
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    elif c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)
Buggy python submission (verdict: Runtime Error):
print((1+(int(input()-1)//111))*111)

Fixed submission:
print((1+((int(input())-1))//111)*111)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
a.sort(reverse=True)
b=0
c=0
if n%2==0:
    for i in range(n//2):
        b+=a[2*i]
        c+=a[2*i+1]
else:
    for i in range(n//2):
        b+=a[2*i]
        c+=a[2*i+1]
    b+=a[n]
if b>c:
    print(b-c)
else:
    print(c-a)


Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
a.sort(reverse=True)
b=0
c=0
if n%2==0:
    for i in range(n//2):
        b+=a[2*i]
        c+=a[2*i+1]
else:
    for i in range(n//2):
        b+=a[2*i]
        c+=a[2*i+1]
    b+=a[n-1]
if b>c:
    print(b-c)
else:
    print(c-a)
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
c=[i+1 for i in range(n)]
e=0
for i in range(n):
    d[i]=c[i]%10+(c[i]//10)%10+(c[i]//100)%10+(c[i]//1000)%10+(c[i]//10000)%10
    if d[i]>=a and d[i]<=b:
        e+=c[i]
print(e) 


Fixed submission:
n,a,b=map(int,input().split())
c=[i+1 for i in range(n)]
d=[i+1 for i in range(n)]
e=0
for i in range(n):
    d[i]=c[i]%10+(c[i]//10)%10+(c[i]//100)%10+(c[i]//1000)%10+(c[i]//10000)%10
    if d[i]>=a and d[i]<=b:
        e+=c[i]
print(e)

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
c=[i+1 for i in range(n)]
e=0
for i in range(n):
    d[i]=c[i]%10+(c[i]//10)%10+(c[i]//100)%10+(c[i]//1000)%10+(c[i]//10000)%10
    if d[i]>=a and d[i]<=b:
        e+=c[i]
        print(c[i],e)
print(e)
    


Fixed submission:
n,a,b=map(int,input().split())
c=[i+1 for i in range(n)]
d=[i+1 for i in range(n)]
e=0
for i in range(n):
    d[i]=c[i]%10+(c[i]//10)%10+(c[i]//100)%10+(c[i]//1000)%10+(c[i]//10000)%10
    if d[i]>=a and d[i]<=b:
        e+=c[i]
print(e)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == "ABC":
  print("ARC")
  else if:
    print("ABC")

Fixed submission:
s = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

susuke = [1] * N

for i in range(K):
  di = int(input())
  ai = map(int, input().split())
  for j in range(ai):
    susuke[j - 1] = 0
    
print(sum(susuke))

Fixed submission:
N, K = map(int, input().split())

susuke = [1] * N

for i in range(K):
  di = int(input())
  ai = map(int, input().split())
  for j in ai:
    susuke[j - 1] = 0
    
print(sum(susuke))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

susuke = [1] * N

for i in range(K):
  di = int(input())
  ai = map(int, input().split())
  for j in range(ai):
    susuke[j - 1] = 0
    
print(sum(susuke))

Fixed submission:
N, K = map(int, input().split())

susuke = [1] * N

for i in range(K):
  di = int(input())
  ai = map(int, input().split())
  for j in ai:
    susuke[j - 1] = 0
    
print(sum(susuke))
Buggy python submission (verdict: Runtime Error):
X = int(input())
count = 0
money = 100

while Ture:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break

Buggy python submission (verdict: Runtime Error):
X = int(input())
count = 0
money = 100

while Ture:
  money *= 1.01
  count += 1
  if money >= X:
    print(count)
    break


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break

Buggy python submission (verdict: Runtime Error):
X = int(input())
count = 0
money = 100

while money < X:
  money *= 1.01
  count++

print(count)


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break

Buggy python submission (verdict: Runtime Error):
K = int(input())
count = 0
money = 100

while money < X:
  money *= 1.01
  count += 1

print(count)


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break

Buggy python submission (verdict: Runtime Error):
K = int(input())
count = 0
money = 100

while money < X:
  money *= 1.01
  count++

print(count)


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break

Buggy python submission (verdict: Runtime Error):
K = int(input())
count = 0
money = 100

while(money < X):
  money *= 1.01
  count++

print(count)


Fixed submission:
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = [0] * M
for i in M:
  A[i] = int(input())
  N -= A[i]

if N < 0:
  N = -1

print(N)

Fixed submission:
N,M = map(int, input().split())
A = list(map(int, input().split()))
N -= sum(A)
if N >= 0:
  print(N)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
if '7' in N:
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
if '7' in N:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
a,b,c = c,a,b
print(f"{a} {b} {c}")

Fixed submission:
a,b,c = map(int, input().split())
a,b,c = c,a,b
print("{} {} {}".format(a,b,c))
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = map(int, input().split())
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S/(4*M):
  print("Yes")
else:
  print("No")

Fixed submission:
N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S/(4*M):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
print(ans_cnt, wa_cnt)    

Fixed submission:
word = input()
word_list = [chr(ord('a') + i) for i in range(26)]
print(word_list[word_list.index(word) + 1])
Buggy python submission (verdict: Runtime Error):
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
print(ans_cnt, wa_cnt)    

Fixed submission:
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
    print(ans_cnt, wa_cnt)

Buggy python submission (verdict: Runtime Error):
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            check_list.index("AC")
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
print(ans_cnt, wa_cnt)    

Fixed submission:
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
    print(ans_cnt, wa_cnt)
Buggy python submission (verdict: Runtime Error):
words = input()

if len(words)%2 == 0:
    slice_cnt = len(words)//2
    words_cut = [words[:slice_cnt], words[slice_cnt:][::-1]]
    
    set_list = [*map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)])]
    print(set_list.count(2))
    
else:
    slice_cnt = (len(words) -1)//2
    words_cut = [words[:slice_cnt], words[slice_cnt+1:][::-1]]
    
    set_list = [*map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)])]
    print(set_list.count(2))

Fixed submission:
words = input()

if len(words)%2 == 0:
    slice_cnt = len(words)//2
    words_cut = [words[:slice_cnt], words[slice_cnt:][::-1]]
    
    set_list = list(map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)]))
    print(set_list.count(2))
    
else:
    slice_cnt = (len(words) -1)//2
    words_cut = [words[:slice_cnt], words[slice_cnt+1:][::-1]]
    
    set_list = list(map(len, [set([words_cut[0][i], words_cut[1][i]]) for i in range(slice_cnt)]))
    print(set_list.count(2))
Buggy python submission (verdict: Runtime Error):
number =list(map(int, input().split()))

if (1 <= number[0] <= 9) and (1 <= number[1] <= 9):
    print(a*b)
else:
    print(-1)

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

if (1 <= number[0] <= 9) and (1 <= number[1] <= 9):
    print(number[0] * number[1])
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([total]*nkq[0])
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Fixed submission:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([total]*nkq[0])
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([])
for i in range(nkq[0]):
    hold_point = np.insert(hold_point, i, total)
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([total]*nkq[0])
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
hold_point = []
[hold_point.append(nkq[1]) for i in range(nkq[0])]
hold_point = np.array(hold_point)
for i in range(nkq[2]):
    hold_point = hold_point - 1
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([total]*nkq[0])
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Time Limit Exceeded):
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
hold_point = []
[hold_point.append(nkq[1]) for i in range(nkq[0])]
for i in range(nkq[2]):
    for v in range(nkq[0]):
        hold_point[v] -= 1
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([total]*nkq[0])
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i <= 0:
        print('No')
    else:
        print('Yes')
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 in range(n-1):
    if a[i+1] - a[i] == 1:
        add = a[i-1]
        ans += c[add]
    else:
        pass
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 in range(n-1):
    if a[i+1] - a[i] == 1:
        add = a[i]
        ans += c[add-1]
    else:
        pass
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())

ans = 0
if(k <= a):
    print(k)
elif(k <= a + b):
    print(a)
else:
    ans = k - (a + b)
        print(a - ans)


Fixed submission:
a, b, c, k = map(int, input().split())

ans = 0
if(k <= a):
    print(k)
elif(k <= a + b):
    print(a)
else:
    ans = k - (a + b)
    print(a - ans)
Buggy python submission (verdict: Runtime Error):
m1, d1 = map(int, input().split)
m2, d2 = map(int, input().split)

if(m1 == m2):
    print('0')
    exit()
print('1')


Fixed submission:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if(m1 == m2):
    print('0')
    exit()
print('1')