Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

count = 0
for i in range(len(S)):
  if S[i] == T[i]:
  	continue
  else:
    S[i] = T[i]
    count += 1
return count
    

Fixed submission:
S = list(input())
T = list(input())

count = 0
for i in range(len(S)):
  if S[i] == T[i]:
  	continue
  else:
    S[i] = T[i]
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
α = int(input())
 
if α == α.upper():
  return print('A')
elif α == α.lower():
  return print('a')

Fixed submission:
α = input()
 
if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')

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

if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')


Fixed submission:
α = input()
 
if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')

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

if a == a.upper():
  print("A")
elif a == a.lower():
  print("a")


Fixed submission:
α = input()
 
if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')

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

if a == a.upper():
  return "A"
elif a == a.lower():
  return "a"

Fixed submission:
α = input()
 
if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')

Buggy python submission (verdict: Runtime Error):
if α==α.upper():
  return "A"
if α==α.lower():
  return "a"


Fixed submission:
α = input()
 
if α == α.upper():
  print('A')
elif α == α.lower():
  print('a')
Buggy python submission (verdict: Runtime Error):
N = int(input())

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

return num2alpha(N)

Fixed submission:
N = int(input())

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

print(num2alpha(N).lower())

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

if N<=26:
	return chr(64+num)
elif N%26==0:
    return num2alpha(N//26-1)+chr(90)
else:
    return num2alpha(N//26)+chr(64+N%26)

  


Fixed submission:
N = int(input())

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

print(num2alpha(N).lower())

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

num=0
for index, item in enumerate(list(N)):
	num += pow(26,len(N)-index-1)*(ord(item)-ord('A')+1)


if num<=26:
	return chr(64+num)
elif num%26==0:
    return num2alpha(num//26-1)+chr(90)
else:
    return num2alpha(num//26)+chr(64+num%26)

  

Fixed submission:
N = int(input())

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

print(num2alpha(N).lower())
Buggy python submission (verdict: Runtime Error):
x,y,z = map(int,input().split())
print(z x y)

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

x[0],x[1] = x[1],x[0]
x[0],x[2] = x[2],x[0]

print(str(x[0]) +" " + str(x[1]) + " "+  str(x[2]))
Buggy python submission (verdict: Runtime Error):
s = list(input())

if s[2] == s[3] & s[4] == s[5]:
  print("Yes")
else:
  print("No")

Fixed submission:
s = list(input())

if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b = input().split
c,d = map(int,input().split())
e = input()

if a == e:
  print("{} {}".format(c-1,d))
else:
  print("{} {}".format(c,d-1))

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

if a == e:
  print("{} {}".format(c-1,d))
else:
  print("{} {}".format(c,d-1))

Buggy python submission (verdict: Runtime Error):
a,b = input().split
c,d = map(int,input().split())
e = input()

if a == e:
  print(c-1 d)
else:
  print(c d-1)

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

if a == e:
  print("{} {}".format(c-1,d))
else:
  print("{} {}".format(c,d-1))
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().spit())
if n == m:
  print("Yes")
else:
  print("No")

Fixed submission:
n,m = map(int,input().split())
if n == m:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
k,x = map(int,input())

if 500*k >= x:
  print("Yes")
else:
  print("No")


Fixed submission:
k,x = map(int,input().split())

if 500*k >= x:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
k,x = mnap(int,input())

if 500*k >= x:
  print("Yes")
else:
  print("No")

Fixed submission:
k,x = map(int,input().split())

if 500*k >= x:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-1):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Fixed submission:
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-2):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(n-1):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Fixed submission:
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-2):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(n):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Fixed submission:
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-2):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k = map(int,input().split())
taka = a
aoki = b
recur = k
if (taka+aoki)<=k:
  print("0 0")
  exit()
for i in range(k):
  if taka == 0 and aoki == 0:
    break
  if taka >= 1:
    taka -=1
  elif taka == 0 and aoki >= 1:
    aoki -= 1
  
  
print("{} {}".format(taka,aoki))

Fixed submission:
a,b,k = map(int,input().split())
taka = a
aoki = b
recur = k
if taka>=k:
  print("{} {}".format(taka-k,aoki))
elif k>=taka and (aoki+taka)>=k:
  print("{} {}".format(0,aoki-(k-taka)))
elif (aoki+ taka)<=k:
  print("0 0")
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input())
list_ab =[]
list_ab.append(a+b)
list_ab.append(a-b)
list_ab.append(a*b)

print(max(list_ab))

Fixed submission:
a,b = map(int,input().split())
list_ab =[]
list_ab.append(a+b)
list_ab.append(a-b)
list_ab.append(a*b)

print(max(list_ab))
Buggy python submission (verdict: Runtime Error):
k,x = map(int,input().split())
a = [x]
for i in range(1,k):
  a.append(x+i)
  a.append(x-i)
  
print(" ".join(sorted(a)))
  


Fixed submission:
K, X = map(int,input().split())
ans = []
if K == 1:
    print(X)
else:
    for i in range(-K + 1,K):
        ans.append(X + i)

print(*ans)
Buggy python submission (verdict: Runtime Error):
a､b= map(int,input().split())
apple_pie = (a*3 + b) //2
print(apple_pie)

Fixed submission:
a,b = map(int,input().split())
apple_pie = (a*3 + b) //2
print(apple_pie)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k] = ls[k-1].lower()
print("".join(ls))


Fixed submission:
n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k-1] = ls[k-1].lower()
print("".join(ls))

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k] = ls[k].lower()
print("".join(ls))

Fixed submission:
n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k-1] = ls[k-1].lower()
print("".join(ls))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input())
point = 0
point += max(a,b)

if max(a,b) == a:
  point += max(a-1,b)
  print(point)
else:
  point += max(a,b-1)
  print(point)

Fixed submission:
a,b = map(int,input().split())
point = 0
point += max(a,b)

if max(a,b) == a:
  point += max(a-1,b)
  print(point)
else:
  point += max(a,b-1)
  print(point)
Buggy python submission (verdict: Runtime Error):
a,b,c,d,e = [int(input()) for _ in range(4)]
k = int(input())

if abs(a-b) >k or abs(a-c) >k or abs(a-d) >k or abs(a-e) >k or abs(b-c) >k or abs(b-d) >k or abs(e-b) >k or abs(c-d) >k or abs(c-e) >k or abs(d-e) >k :
  print(":(")
else:
  print("Yay!")

Fixed submission:
a,b,c,d,e = [int(input()) for _ in range(5)]
k = int(input())

if abs(a-b) >k or abs(a-c) >k or abs(a-d) >k or abs(a-e) >k or abs(b-c) >k or abs(b-d) >k or abs(e-b) >k or abs(c-d) >k or abs(c-e) >k or abs(d-e) >k :
  print(":(")
else:
  print("Yay!")
Buggy python submission (verdict: Runtime Error):
b = list(input())

for i in len(b):
  if b[i] == "A":
    b[i] = "T"
  elif b[i] == "T":
    b[i] = "A"
  elif b[i] == "C":
    b[i] = "G"
  else:
    b[i] = "C"
    
print(b)

Fixed submission:
b = list(input())

for i in range(len(b)):
  if b[i] == "A":
    b[i] = "T"
  elif b[i] == "T":
    b[i] = "A"
  elif b[i] == "C":
    b[i] = "G"
  else:
    b[i] = "C"
    
print("".join(b))
Buggy python submission (verdict: Runtime Error):
s = input()
s = s.split("/")

if s[0] >= 2019 and s[1] >= 5:
  print("TBD")
else:
  print("Heisei")

Fixed submission:
s = input()
s = s.split("/")

if int(s[0]) >= 2019 and int(s[1]) >= 5:
  print("TBD")
else:
  print("Heisei")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

lis = [a,b,c]
lis  = lis.remove(max(lis))

print(int(lis[0]*lis[1]/2))

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

lis = [a,b,c]

lis.remove(max(lis))

print(int(lis[0]*lis[1]/2))
Buggy python submission (verdict: Runtime Error):
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k/2)*(k//2)/2)


Fixed submission:
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k//2 + 1)*(k//2)))

Buggy python submission (verdict: Runtime Error):
k = int(input())
if k %2 == 0:
	print(int(k*k/2/2)
elif k%2 ==1:
          print(int((k/2)*(k//2)/2)


Fixed submission:
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k//2 + 1)*(k//2)))

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

if k %2 == 0:
  print(int(k*k/2/2)




else:
  print(int((k/2)*(k//2)/2)

Fixed submission:
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k//2 + 1)*(k//2)))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

print((a-1)(b-1))

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

print((a-1)*(b-1))
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())

if n%k = 0:
  print(0)
else:
  print(1)

Fixed submission:
n,k = map(int,input().split())

if n%k == 0:
  print(0)
else:
  print(1)
Buggy python submission (verdict: Time Limit Exceeded):
global na, n, sum, k
lsp = {}
lsn = {}
num = {}

if __name__ == '__main__':
    na = input()
    lsn = na.split(' ')
    n = int(lsn[0])
    k = int(lsn[1])
    na = input()
    lsp = na.split(' ')
    for i in range (0, n):
        num[i] = int(lsp[i])
    sum = 1
    for i in range (0, k):
        sum = sum * num[i]
    for i in range (k, n):
        ls = sum
        ls = ls * num[i]
        ls /= num[i-k]
        if sum >= ls:
            print("No")
        else:
            print("Yes")
        sum = ls

Fixed submission:
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
 
for i in range(K+1, N+1) :
  if A[i-1] > A[i-K-1] :
    print("Yes")
  else :
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


def print_ans(X, K, D):
    """Test Case
    >>> print_ans(6, 2, 4)
    2
    >>> print_ans(7, 4, 3)
    1
    >>> print_ans(10, 1, 2)
    8
    >>> print_ans(1000000000000000,1000000000000000,1000000000000000)
    1000000000000000
    """
    # 移動しない
    if K % 2 == 0 and D >= abs(X):
        print(abs(X))
    elif K % 2 != 0 and D >= abs(X):
        print(min(abs(X-D), abs(X+D)))
    elif abs(X) - D * K >= 0:
        print(abs(abs(X) - D * K))
    else:
        # near 0
        tmp = abs(X) // D
        rest_K = K - tmp
        a = abs(abs(X) - tmp * D)
        b = abs(abs(X) - (tmp + 1) * D)
        if rest_K % 2 == 0:
            print(a)
        else:
            print(b)


if __name__ == '__main__':
    X, K, D = map(int, input().rstrip().split())
    print_ans(X, K, D)


Fixed submission:
import collections
import itertools
import sys
input = sys.stdin.readline


def check_tri(a, b, c):
    if a + b > c and b + c > a and c + a > b:
        return True
    else:
        return False


def print_ans(lr):
    """Test Case
    >>> print_ans([4, 4, 9, 7, 5])
    5
    >>> print_ans([4, 5, 4, 3, 3, 5])
    8
    >>> print_ans([9, 4, 6, 1, 9, 6, 10, 6, 6, 8])
    39
    >>> print_ans([1,1])
    0
    """
    ans = 0
    c = collections.Counter(lr)
    target = itertools.combinations(list(c.keys()), 3)
    for t in target:
        if check_tri(t[0], t[1], t[2]):
            tmp = (c[t[0]] * c[t[1]] * c[t[2]])
            ans += tmp
    print(ans)


if __name__ == '__main__':
    N = int(input().rstrip())
    lr = list(map(int, input().rstrip().split()))
    print_ans(lr)
Buggy python submission (verdict: Runtime Error):
R = input()
print(R * 3.1415)

Fixed submission:
import sys
input = sys.stdin.readline

R = float(input().rstrip())
print(R * 2.0 * 3.1415)
Buggy python submission (verdict: Runtime Error):
S,  T = input().split()
print("".join(T,S))

Fixed submission:
import sys
input = sys.stdin.readline
def print_ans(S):
    """Test Case
    >>> print_ans(["oder",  "atc"])
    atcoder
    """
    print("".join(S[::-1]))

if __name__ == '__main__':
    S = list(input().rstrip().split())
    print_ans(S)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def print_ans(N, S):
    """Test Case
    >>> print_ans(4, "0224")
    3
    >>> print_ans(6, "123123")
    17
    >>> print_ans(19, "3141592653589793238")
    329
    """
    s = set()
    for i in range(N):
        for k in range(i+1,N):
            for l in range(k+1, N):
                s.add(S[i] + S[k] + S[l])
    print(len(s))



    
if __name__ == '__main__':
    N = int(input().rstrip())
    S = input().rstrip()
    print_ans(N, S)


Fixed submission:
import sys
input = sys.stdin.readline
lists = ['{0:03d}'.format(i) for i in range(1000)]
import re
def check(target, a):
    ans = re.search(a, target)
    if ans == None:
        return None
    else:
        return target[ans.start()+1:]

def print_ans(N, S):
    """Test Case
    >>> print_ans(4, "0224")
    3
    >>> print_ans(6, "123123")
    17
    >>> print_ans(19, "3141592653589793238")
    329
    """
    # s = set()
    # for i in range(N):
    #     for k in range(i+1,N):
    #         for l in range(k+1, N):
    #             s.add(S[i] + S[k] + S[l])
    # print(len(s))
    ans = 0
    for a in lists:
        tmp = S
        for i in range(3):
            tmp = check(tmp, a[i])
            if tmp == None:
                break
        if tmp != None:
            ans += 1
    print(ans)


    # print(check('123','4'))


    
if __name__ == '__main__':
    N = int(input().rstrip())
    S = input().rstrip()
    print_ans(N, S)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def print_ans(N, S):
    """Test Case
    >>> print_ans(4, "0224")
    3
    >>> print_ans(6, "123123")
    17
    """
    s = set()
    for i in range(N):
        for k in range(i+1,N):
            for l in range(k+1, N):
                s.add(S[i] + S[k] + S[l])
    print(len(s))



    
if __name__ == '__main__':
    N = int(input().rstrip())
    S = input().rstrip()
    print_ans(N, S)


Fixed submission:
import sys
input = sys.stdin.readline
lists = ['{0:03d}'.format(i) for i in range(1000)]
import re
def check(target, a):
    ans = re.search(a, target)
    if ans == None:
        return None
    else:
        return target[ans.start()+1:]

def print_ans(N, S):
    """Test Case
    >>> print_ans(4, "0224")
    3
    >>> print_ans(6, "123123")
    17
    >>> print_ans(19, "3141592653589793238")
    329
    """
    # s = set()
    # for i in range(N):
    #     for k in range(i+1,N):
    #         for l in range(k+1, N):
    #             s.add(S[i] + S[k] + S[l])
    # print(len(s))
    ans = 0
    for a in lists:
        tmp = S
        for i in range(3):
            tmp = check(tmp, a[i])
            if tmp == None:
                break
        if tmp != None:
            ans += 1
    print(ans)


    # print(check('123','4'))


    
if __name__ == '__main__':
    N = int(input().rstrip())
    S = input().rstrip()
    print_ans(N, S)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
from math import factorial
def print_ans(X, Y):
    """Test Case
    >>> print_ans(3, 3)
    2
    >>> print_ans(2, 2)
    0
    >>> print_ans(999999, 999999)
    151840682
    """
    A = np.array([[1, 2],[2, 1]])
    B = np.array([X, Y])
    X = np.linalg.solve(A, B)
    if X[0].is_integer() and X[1].is_integer() :
        ans1 = factorial(X[0] + X[1])
        ans2 = factorial(X[0])
        ans3 = factorial(X[1])
        mod =  (10**9+7)
        print((ans1 // ans2 * ans3 ) % mod)
        # print(math.factorial(X[0] + X[1]) // (math.factorial(X[0]) * math.factorial(X[1])))
    else:
        print("0")


if __name__ == '__main__':
    X, Y = map(int, input().rstrip().split())
    print_ans(X, Y)


Fixed submission:
import sys
input = sys.stdin.readline
import numpy as np
from math import factorial
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
mod = 10**9+7 #出力の制限
N = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
def print_ans(X, Y):
    """Test Case
    >>> print_ans(3, 3)
    2
    >>> print_ans(2, 2)
    0
    >>> print_ans(999999, 999999)
    151840682
    """
    A = np.array([[1, 2],[2, 1]])
    B = np.array([X, Y])
    X = np.linalg.solve(A, B)
    if X[0].is_integer() and X[1].is_integer() :
        # ans1 = factorial(X[0] + X[1])
        # ans2 = factorial(X[0])
        # ans3 = factorial(X[1])
        # mod =  (10**9+7)
        # print((ans1 // ans2 * ans3 ) % mod)
        print(cmb(int(X[0] + X[1]),int(X[0]),mod))
        # print(math.factorial(X[0] + X[1]) // (math.factorial(X[0]) * math.factorial(X[1])))
    else:
        print("0")


if __name__ == '__main__':
    X, Y = map(int, input().rstrip().split())
    print_ans(X, Y)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
def print_ans(input_line):
    """Test Case
    >>> print_ans("10")
    5
    >>> print_ans("50")
    13
    >>> print_ans("10000000019")
    10000000018
    """
    N = int(input_line)
    min_ans = N - 1
    for i in range(1,N):
        q, mod= divmod(N,i)
        if mod == 0:
            min_ans = min(min_ans, q + i -2 )
    print(min_ans)

if __name__ == '__main__':
    print_ans(input())


Fixed submission:
import sys
input = sys.stdin.readline
def print_ans(input_line):
    """Test Case
    >>> print_ans("10")
    5
    >>> print_ans("50")
    13
    >>> print_ans("10000000019")
    10000000018
    """
    N = int(input_line)
    min_ans = N - 1
    for i in range(1,int(N ** 0.5) + 1):
        q, mod= divmod(N,i)
        if mod == 0:
            min_ans = min(min_ans, q + i -2 )
    print(min_ans)

if __name__ == '__main__':
    print_ans(input())
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
def print_ans(N, K, Q, arr):
    """Test Case
    >>> print_ans(6, 3, 4, [3, 1, 3, 2])
    No
    No
    Yes
    No
    No
    No
    >>> print_ans(6, 5, 4, [3, 1, 3, 2])
    Yes
    Yes
    Yes
    Yes
    Yes
    Yes
    >>> print_ans(10, 13, 15,[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9])
    No
    No
    No
    No
    Yes
    No
    No
    No
    Yes
    No
    """
    point = [K - Q] * N
    for a in arr:
        point[a - 1] += 1
    ans_arr = ["Yes" if p > 0 else "No" for p in point]
    for ans in ans_arr:
        print(ans)

if __name__ == '__main__':
    N, K, Q = map(int,input().rstrip().split())
    arr = [ int(line) for line in input()]
    print_ans(N, K, Q, arr)

Fixed submission:
import sys
input = sys.stdin.readline
def print_ans(N, K, Q, arr):
    """Test Case
    >>> print_ans(6, 3, 4, [3, 1, 3, 2])
    No
    No
    Yes
    No
    No
    No
    >>> print_ans(6, 5, 4, [3, 1, 3, 2])
    Yes
    Yes
    Yes
    Yes
    Yes
    Yes
    >>> print_ans(10, 13, 15,[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9])
    No
    No
    No
    No
    Yes
    No
    No
    No
    Yes
    No
    """
    point = [K - Q] * N
    for a in arr:
        point[a - 1] += 1
    ans_arr = ["Yes" if p > 0 else "No" for p in point]
    for ans in ans_arr:
        print(ans)

if __name__ == '__main__':
    N, K, Q = map(int,input().rstrip().split())
    arr = [ int(input()) for i in range(Q)]
    print_ans(N, K, Q, arr)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
import numpy as np
def print_ans(N, M, input_line):
    """Test Case
    >>> print_ans(3, 3, "2 13 8")
    9
    >>> print_ans(4, 4, "1 9 3 5")
    6
    >>> print_ans(1, 100000, "1000000000")
    0
    >>> print_ans(10 ,1, "1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000")
    9500000000
    """
    ar = np.array(list(map(float, input_line.split())))
    for _ in range(M):
        max_tmp_arg = np.argmax(ar)
        ar[max_tmp_arg] = ar[max_tmp_arg] // 2
    print(int(np.sum(ar)))

if __name__ == '__main__':
    N, M = map(int, input().rstrip().split())
    input_line = input().rstrip()
    print_ans(N, M, input_line)


Fixed submission:
import sys
input = sys.stdin.readline
import heapq as hq
def print_ans(N, M, input_line):
    """Test Case
    >>> print_ans(3, 3, "2 13 8")
    9
    >>> print_ans(4, 4, "1 9 3 5")
    6
    >>> print_ans(1, 100000, "1000000000")
    0
    >>> print_ans(10 ,1, "1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000")
    9500000000
    """
    ar = [-int(i) for i in input_line.split()]
    hq.heapify(ar)
    for _ in range(M):
        hq.heappush(ar, -(-hq.heappop(ar) // 2))
    
    print(-sum(ar))

if __name__ == '__main__':
    N, M = map(int, input().rstrip().split())
    input_line = input().rstrip()
    print_ans(N, M, input_line)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
def print_ans(A, B):
    """Test Case
    >>> print_ans(-13, 3)
    -10
    >>> print_ans(1, -33)
    34
    >>> print_ans(13, 3)
    39
    """
    print(max(max(A + B, A - B), A * B))

if __name__ == '__main__':
    A = int(input().rstrip())
    B = int(input().rstrip())
    print_ans(A, B)


Fixed submission:
import sys
input = sys.stdin.readline
def print_ans(A, B):
    """Test Case
    >>> print_ans(-13, 3)
    -10
    >>> print_ans(1, -33)
    34
    >>> print_ans(13, 3)
    39
    """
    print(max(max(A + B, A - B), A * B))

if __name__ == '__main__':
    A, B = map(int,input().rstrip().split())
    print_ans(A, B)