Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
aa, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


Fixed submission:
a, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))
Buggy python submission (verdict: Runtime Error):
import sys

s = input()
t = input()
for i in range(len(s)):
    s = s[-1] + s[:-1]
    if t == s:
        print('Yes')
        sys.exit(1)
print('No')


Fixed submission:
import sys

s = input()
t = input()
n = len(s)
for i in range(n):
    for j in range(n):
        if s[j] == t[(i + j) % n]:
            continue
        else:
            break
    else:
        print('Yes')
        sys.exit(0)
    continue
print('No')

Buggy python submission (verdict: Runtime Error):
import sys

s = input()
t = input()
for i in range(len(s)):
    s = s[-1] + s[:-1]
    print(s)
    if t == s:
        print('Yes')
        sys.exit(1)
print('No')


Fixed submission:
import sys

s = input()
t = input()
n = len(s)
for i in range(n):
    for j in range(n):
        if s[j] == t[(i + j) % n]:
            continue
        else:
            break
    else:
        print('Yes')
        sys.exit(0)
    continue
print('No')
Buggy python submission (verdict: Runtime Error):
import collections
h,w = map(int, input().split())
s = ''.join([''.join(input().split()) for _ in range(h)])

ctr = collections.Counter(s)
if h % 2 == 0 and w % 2 == 0:
    four, two = h*w//4
elif h % 2 == 0:
    four, two = (h*w-h)//4, h//2
elif w % 2 == 0:
    four, two = (h*w-w)//4, w//2
else:
    four, two = (h*w-h-w+1), (h+w-1)//2

cf = sum([c//4 for c in ctr.values()])
ct = sum([(c%4)//2 for c in ctr.values()])

if cf >= four and ct >= 2*(four-cf) + two:
    print('Yes')
else:
    print('No')

Fixed submission:
import collections
h,w = map(int, input().split())
s = ''.join([''.join(input().split()) for _ in range(h)])

ctr = collections.Counter(s)
if h % 2 == 0 and w % 2 == 0:
    four, two = h*w//4, 0
elif h % 2 == 0:
    four, two = (h*w-h)//4, h//2
elif w % 2 == 0:
    four, two = (h*w-w)//4, w//2
else:
    four, two = (h*w-h-w+1)//4, (h+w-1)//2

cf = sum([c//4 for c in ctr.values()])
ct = sum([(c%4)//2 for c in ctr.values()])

if cf >= four and ct + 2*(cf-four) >= two:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import sys
from collections import defaultdict

n,k = map(int, input().split())
di = defaultdict(int)
for i in range(n):
    a, b = map(int, input().split())
    di[a] += b

cnt = 0
for x in sorted(di.keys()):
    cnt += di[x]
    if cnt >= k:
        print(x)
        sys.exit()


Fixed submission:
a,b,c = map(int,input().split())
if a <= c <= b:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import functools

mod = 1e9 + 7
n = int(input())
fact = [1] * (n+1)

for i in range(2, n+1):
    for j in range(2, 32):
        if i == 0:
            break
        while True:
            if i % j == 0:
                i /= j
                fact[j] += 1
            else:
                break
    if i != 0:
        fact[int(i)] += 1

print(int(functools.reduce(lambda x, y: (x * y) % mod, fact[2:])))


Fixed submission:
import sys
import functools

mod = 1e9 + 7
n = int(input())
if n == 1:
    print(1)
    sys.exit()

fact = [1] * (n+1)

for i in range(2, n+1):
    for j in range(2, 32):
        if i == 0:
            break
        while True:
            if i % j == 0:
                i /= j
                fact[j] += 1
            else:
                break
    if i != 0:
        fact[int(i)] += 1

print(int(functools.reduce(lambda x, y: (x * y) % mod, fact[2:])))
Buggy python submission (verdict: Runtime Error):
import math as m
import functools


def int_reverse(num):
    num_len = len(bin(num))-2
    f = 2**num_len-1
    return num ^ f

n = int(input())
A = [int(input()) for i in range(n)]
lsbs = [[i for i in range(int(m.log2(a))+1) if (a>>i)&1][0] for a in A]
nim = functools.reduce(lambda x,y:x^y, A)

cnt = 0
if nim == 0:
    ans = 0
else:
    for lsb in reversed(sorted(lsbs)):
        if int(m.log2(nim)) == lsb:
            nim = int_reverse(nim)
            cnt += 1

    ans = cnt if(nim == 0) else -1
print(ans)


Fixed submission:
import math as m
import functools


def int_reverse(num):
    num_len = len(bin(num))-2
    f = 2**num_len-1
    return num ^ f

n = int(input())
A = [int(input()) for i in range(n)]
lsbs = [[i for i in range(int(m.log2(a))+1) if (a>>i)&1][0] for a in A]
nim = functools.reduce(lambda x,y:x^y, A)

cnt = 0
for lsb in reversed(sorted(lsbs)):
    if nim == 0:
        break
    if int(m.log2(nim)) == lsb:
        nim = int_reverse(nim)
        cnt += 1

ans = cnt if(nim == 0) else -1
print(ans)

Buggy python submission (verdict: Runtime Error):
import math as m
import functools


def int_reverse(num):
    num_len = len(bin(num))-2
    f = 2**num_len-1
    return num ^ f

n = int(input())
A = [int(input()) for i in range(n)]
lsbs = [[i for i in range(int(m.log2(a))+1) if (a>>i)&1][0] for a in A]
nim = functools.reduce(lambda x,y:x^y, A)

cnt = 0
for lsb in reversed(sorted(lsbs)):
    if int(m.log2(nim)) == lsb:
        nim = int_reverse(nim)
        cnt += 1

ans = cnt if(nim == 0) else -1
print(ans)


Fixed submission:
import math as m
import functools


def int_reverse(num):
    num_len = len(bin(num))-2
    f = 2**num_len-1
    return num ^ f

n = int(input())
A = [int(input()) for i in range(n)]
lsbs = [[i for i in range(int(m.log2(a))+1) if (a>>i)&1][0] for a in A]
nim = functools.reduce(lambda x,y:x^y, A)

cnt = 0
for lsb in reversed(sorted(lsbs)):
    if nim == 0:
        break
    if int(m.log2(nim)) == lsb:
        nim = int_reverse(nim)
        cnt += 1

ans = cnt if(nim == 0) else -1
print(ans)
Buggy python submission (verdict: Runtime Error):
s = open('input', 'r').read()
prev = s[0]
ans = 0

for c in s:
    if c != prev:
        ans += 1
        prev = c
print(ans-1)


Fixed submission:
s = input()
prev = s[0]
ans = 0

for c in s:
    if c != prev:
        ans += 1
        prev = c
print(ans)
Buggy python submission (verdict: Runtime Error):
n, t = map(int, input().split()))
A = list(map(int, input().split()))

ans = 0
max_diff = 0
min_a = A[0]
for a in A:
    min_a = min(min_a, a)
    if (a - min_a) == max_diff:
        ans += 1
    elif (a - min_a) > max_diff:
        ans = 1
        max_diff = (a - min_a)
print(ans)


Fixed submission:
# f = open('input', 'r')
# n, t = map(int, f.readline().split())
# A = list(map(int, f.readline().split()))
n, t = map(int, input().split())
A = list(map(int, input().split()))

ans = 0
max_diff = 0
min_a = A[0]
for a in A:
    min_a = min(min_a, a)
    if (a - min_a) == max_diff:
        ans += 1
    elif (a - min_a) > max_diff:
        ans = 1
        max_diff = (a - min_a)
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int ans = 0;
  for (int i = 0; i < N-1; i++) {
    
    for (int j = 0; j < i+1;j++){
      
      if ((i+1)%(j+1) == 0) {
        ans += 2;
        
      }
    }
  }
  
  cout <<  ans;
}


Fixed submission:
N = int(input())
ans = 0
for i in range(N-1):
    ans += (N-1)//(i+1)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans =0
for i in range(N-1):
  N = i+1
  
  for j in range(N):
    if N%(j+1) == 0:
      ans += 1

  
    
      
print(ans)

Fixed submission:
N = int(input())
ans = 0
for i in range(N-1):
    ans += (N-1)//(i+1)
    
print(ans)
Buggy python submission (verdict: Runtime Error):
X, Y =map(int,input().split())
a = 0
for i in range(X+1):
  if 2*i+4*(X-i)==Y:
    print('Yes')
   
  else:
    a += 1
    
if a==X
    
    
if a   ==1:
  print('No')

Fixed submission:
X, Y =map(int,input().split())
a = 0
for i in range(X+1):
  if 2*i+4*(X-i)==Y:
    print('Yes')
  else:
    a +=1
  
    
if a ==X+1:
  print('No')
Buggy python submission (verdict: Runtime Error):
r=int(intput())
print(r*r)

Fixed submission:
r= int(input())
print(r*r)
Buggy python submission (verdict: Runtime Error):
import sys

cubes = list(input()) # 入力受付
stack = []
count = 0

for cube in cubes:
    print(stack, cube)
    if not stack:
        stack.append(cube)
    elif stack[-1] != cube:
        print(stack, cube)
        count += 2
        stack.pop()
    else:
        stack.append(cube)
print(count)


Fixed submission:
import sys

cubes = list(input()) # 入力受付
stack = []
count = 0

for cube in cubes:
    if not stack:
        stack.append(cube)
    elif stack[-1] != cube:
        count += 2
        stack.pop()
    else:
        stack.append(cube)
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import re

str = sys.stdin.readline().rstrip()
_str = str #　結果と比較用
while True:
    tmp = str
    tmp = re.sub("10", "", tmp)
    tmp = re.sub("01", "", tmp)
    if str == tmp:
        break
    str = tmp

print(len(_str) - len(str))


Fixed submission:
import sys

cubes = list(input()) # 入力受付
stack = []
count = 0

for cube in cubes:
    if not stack:
        stack.append(cube)
    elif stack[-1] != cube:
        count += 2
        stack.pop()
    else:
        stack.append(cube)
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import re
#def INPUT_AS_INT(): return int(sys.stdin.readline().rstrip())
# def INPUT_AS_INT_LIST(): return list(map(int,sys.stdin.readline().rstrip().split()))
def INPUT_AS_STRING(): return sys.stdin.readline().rstrip()
# def INPUT_AS_STRING_LIST(): return list(sys.stdin.readline().rstrip().split())

str = INPUT_AS_STRING() # 入力受付
_str = str #　結果と比較用
while True:
    tmp = str
    tmp = re.sub("10", "", tmp)
    tmp = re.sub("01", "", tmp)
    if str == tmp:
        break
    str = tmp

print(len(_str) - len(str))


Fixed submission:
import sys

cubes = list(input()) # 入力受付
stack = []
count = 0

for cube in cubes:
    if not stack:
        stack.append(cube)
    elif stack[-1] != cube:
        count += 2
        stack.pop()
    else:
        stack.append(cube)
print(count)

Buggy python submission (verdict: Runtime Error):
import sys
import re
def INPUT_AS_INT(): return int(sys.stdin.readline().rstrip())
# def INPUT_AS_INT_LIST(): return list(map(int,sys.stdin.readline().rstrip().split()))
# def INPUT_AS_STRING(): return sys.stdin.readline().rstrip()
# def INPUT_AS_STRING_LIST(): return list(sys.stdin.readline().rstrip().split())

str = INPUT_AS_STRING() # 入力受付
_str = str #　結果と比較用
while True:
    tmp = str
    tmp = re.sub("10", "", tmp)
    tmp = re.sub("01", "", tmp)
    if str == tmp:
        break
    str = tmp

print(len(_str) - len(str))


Fixed submission:
import sys

cubes = list(input()) # 入力受付
stack = []
count = 0

for cube in cubes:
    if not stack:
        stack.append(cube)
    elif stack[-1] != cube:
        count += 2
        stack.pop()
    else:
        stack.append(cube)
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A, B = [int(_) for i in input().split()]
P =  [int(_) for i in input().split()] 
x = len([i for i in P if i <= A])
y = len([i for i in P if i <= B and i >= A+1])
z = len([i for i in P if i <= B])

if x != 0 and y != 0 and z != 0:
    print(min([x,y,z]))
else :
    print(0)

Fixed submission:
N = int(input())
A, B = [int(_) for _ in input().split()]
P =  [int(_) for _ in input().split()]
x = len([i for i in P if i <= A])
y = len([i for i in P if i <= B and i >= A+1])
z = len([i for i in P if i >= B + 1])
 
if x != 0 and y != 0 and z != 0:
    print(min([x,y,z]))
else :
    print(0)
Buggy python submission (verdict: Runtime Error):
input()
input = list(input())
print(*input[::-2], *input[::2]

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

Buggy python submission (verdict: Runtime Error):
input = list(input())
print(*input[::-2], *input[::2]

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2])
Buggy python submission (verdict: Runtime Error):

opperations = list(input())
display_stack = []
for opperation in opperations:
    if opperation == "B":
        if display_stack:
            display_stack.pop()
    else:
        display_stack.append(opperation)
print(''.join(display_stack))
ß


Fixed submission:

opperations = list(input())
display_stack = []
for opperation in opperations:
    if opperation == "B":
        if display_stack:
            display_stack.pop()
    else:
        display_stack.append(opperation)
print(''.join(display_stack))
Buggy python submission (verdict: Runtime Error):
MOD = (10**9) + 7
n = int(input())
a = list(map(int,intput().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += (num >> j) % 2
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)

Fixed submission:
MOD = (10**9) + 7
n = int(input())
a = list(map(int,input().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += (num >> j) % 2
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)

Buggy python submission (verdict: Runtime Error):
MOD = (10**9) + 7
n = int(input())
a = list(map(int,intput().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += num >> j
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b % 2
  
ans %= MOD
print(ans)

Fixed submission:
MOD = (10**9) + 7
n = int(input())
a = list(map(int,input().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += (num >> j) % 2
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)

Buggy python submission (verdict: Runtime Error):
MOD = (10**9) + 7
n = int(input())
a = list(map(int,intput().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += num >> j
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)

Fixed submission:
MOD = (10**9) + 7
n = int(input())
a = list(map(int,input().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += (num >> j) % 2
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)
Buggy python submission (verdict: Runtime Error):
li = input().split()
# li  = [3,5,-4,-2]
li1 = li[0:2]
li2 = li[2:4]
ans = -99999999999

for x in li1:
    for y in li2:
        if x*y > ans:
            ans = x*y
print(ans)

Fixed submission:
li = input().split()
# li  = [3,5,-4,-2]
li1 = li[0:2]
li2 = li[2:4]

ans = -999999999999999999999999999999999

for x in li1:
    for y in li2:
        tmp = int(x)*int(y)
        if tmp > ans:
            ans = tmp
print(ans)
Buggy python submission (verdict: Runtime Error):
from heapq import heapify, heappop
from math import ceil
N, K = map(int, input().split())
H = list(map(int, input().split()))
# N=3
# K=1
# H=[4,1,5]

Hminus = list(map(lambda x: x*(-1), H))
# print(type(Hminus))
heapify(Hminus)
# print(Hminus)
for _ in range(K):
    heappop(Hminus)
print(sum(Hminus)*(-1))

Fixed submission:
from heapq import heapify, heappop
from math import ceil
N, K = map(int, input().split())
H = list(map(int, input().split()))
# N=8
# K=9
# H=[7, 9, 3, 2, 3, 8, 4, 6]

Hminus = list(map(lambda x: x*(-1), H))
# print(type(Hminus))
heapify(Hminus)
# print(Hminus)
if K > len(H):
    print(0)
else:
    for _ in range(K):
        heappop(Hminus)
    print(sum(Hminus)*(-1))

Buggy python submission (verdict: Runtime Error):
from heapq import heapify, heappop
from math import ceil
N, K = map(int, input().split())
H = list(map(int, input().split()))
Hminus = list(map(lambda x: x*(-1), H))
Hheap = heapify(Hminus)
for _ in range(K):
    heappop(Hheap)
print(sum(Hheap))

Fixed submission:
from heapq import heapify, heappop
from math import ceil
N, K = map(int, input().split())
H = list(map(int, input().split()))
# N=8
# K=9
# H=[7, 9, 3, 2, 3, 8, 4, 6]

Hminus = list(map(lambda x: x*(-1), H))
# print(type(Hminus))
heapify(Hminus)
# print(Hminus)
if K > len(H):
    print(0)
else:
    for _ in range(K):
        heappop(Hminus)
    print(sum(Hminus)*(-1))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = 0
while len(d) > 1:
    current = d[0]
    for y in range(len(d)):
        ans += current * d[y]
#         print(ans)
    ans -= current ** 2
    d.pop(0)
print(ans)

Fixed submission:
N = int(input())
d = list(map(int, input().split()))
ans = 0
while len(d) > 1:
    current = d[0]
    for y in range(len(d)):
        ans += current * d[y]
#         print(ans)
    ans -= current ** 2
    d.pop(0)
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
ans = 0

# 先頭と後頭が一致していた場合の例外処理
Sfront = S[0]
Srear  = S[-1]
if Sfront == Srear and K > 1:
    Sleft = S.lstrip(Srear)
    kazu_left = len(S) - len(Sleft)
    ans += int(kazu_left/2)
    
    Sleftright = Sleft.rstrip(Srear)
    kazu_right = len(Sleft) - len(Sleftright)
    ans += int(kazu_right/2)
    
    kazu_wa = len(S) - len(Sleftright)
    ans += int(kazunoko/2) * (K-1)
    
    S = Sleftright
else:
    pass

while len(S) > 0:
#     print(S)
    current = S[0]
    Snext = S.lstrip(current)
    kazu = len(S) - len(Snext)
    ans += int(kazu/2) * K
    S = Snext
print(ans)

Fixed submission:
S = input()
K = int(input())
ans = 0

# 先頭と後頭が一致していた場合の例外処理
Sfront = S[0]
Srear  = S[-1]
if Sfront == Srear and K > 1:
    Sleft = S.lstrip(Srear)
    kazu_left = len(S) - len(Sleft)
    ans += int(kazu_left/2)
#     print(ans)
    
    Sleftright = Sleft.rstrip(Srear)
    kazu_right = len(Sleft) - len(Sleftright)
    if kazu_right != 0: # 通常
        ans += int(kazu_right/2)

        kazu_wa = len(S) - len(Sleftright)
        ans += int(kazu_wa/2) * (K-1)

        S = Sleftright
         
    else: # 全部同じ文字の例外
        ans = int(kazu_left * K / 2)
        
        S = ""
else:
    pass

while len(S) > 0:
#     print(S)
    current = S[0]
    Snext = S.lstrip(current)
    kazu = len(S) - len(Snext)
    ans += int(kazu/2) * K
    S = Snext
print(ans)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
ans = 0

# 先頭と後頭が一致していた場合の例外処理
Sfront = S[0]
Srear  = S[-1]
if Sfront == Srear and K > 1:
    Sleft = S.lstrip(Srear)
    kazu_left = len(S) - len(Sleft)
    ans += int(kazu_left/2)
    
    Sleftright = Sleft.rstrip(Srear)
    kazu_right = len(Sleft) - len(Sleftright)
    ans += int(kazu_right/2)
    
    kazu_wa = len(S) - len(Sleftright)
    ans += int(kazunoko/2) * (K-1)
    
    S = Sleftright
else:
    pass

while len(S) > 0:
    print(S)
    current = S[0]
    Snext = S.lstrip(current)
    kazu = len(S) - len(Snext)
    ans += int(kazu/2) * K
    S = Snext
print(ans)

Fixed submission:
S = input()
K = int(input())
ans = 0

# 先頭と後頭が一致していた場合の例外処理
Sfront = S[0]
Srear  = S[-1]
if Sfront == Srear and K > 1:
    Sleft = S.lstrip(Srear)
    kazu_left = len(S) - len(Sleft)
    ans += int(kazu_left/2)
#     print(ans)
    
    Sleftright = Sleft.rstrip(Srear)
    kazu_right = len(Sleft) - len(Sleftright)
    if kazu_right != 0: # 通常
        ans += int(kazu_right/2)

        kazu_wa = len(S) - len(Sleftright)
        ans += int(kazu_wa/2) * (K-1)

        S = Sleftright
         
    else: # 全部同じ文字の例外
        ans = int(kazu_left * K / 2)
        
        S = ""
else:
    pass

while len(S) > 0:
#     print(S)
    current = S[0]
    Snext = S.lstrip(current)
    kazu = len(S) - len(Snext)
    ans += int(kazu/2) * K
    S = Snext
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
if S = "Sunny":
    ans = "Cloudy"
elif S = "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)

Fixed submission:
S = input()
if S == "Sunny":
    ans = "Cloudy"
elif S == "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)

Buggy python submission (verdict: Runtime Error):
S = input()
ans = ""
if S = "Sunny":
    ans = "Cloudy"
elif S = "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)

Fixed submission:
S = input()
if S == "Sunny":
    ans = "Cloudy"
elif S == "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
point_list = [K]*N
for answer in A:
    point_list = list(map(lambda x: x-1, point_list))
    point_list[answer-1] += 1
    
for ans in point_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
seikaisuu = [0]*N
for answer in A:
    seikaisuu[answer-1] += 1
for x in seikaisuu:
    if K > Q - x:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
N, K, Q = map(int, input().split())
A = [int,input() for i in range(Q)]
point_list = [K]*N
for answer in A:
    point_list = list(map(lambda x: x-1, point_list))
    point_list[answer-1] += 1
    
for ans in point_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
seikaisuu = [0]*N
for answer in A:
    seikaisuu[answer-1] += 1
for x in seikaisuu:
    if K > Q - x:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
N, K, Q = map(int, input().split())
A = [list(map(int,input().split()))for i in range(Q)]
point_list = [K]*N
for answer in A:
    point_list = list(map(lambda x: x-1, point_list))
    point_list[answer-1] += 1
    
for ans in point_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
seikaisuu = [0]*N
for answer in A:
    seikaisuu[answer-1] += 1
for x in seikaisuu:
    if K > Q - x:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
N, K, Q = map(int, input().split())
A = [list(map(int,input().split()))for i in range(n)]
point_list = [K]*N
for answer in A:
    point_list = list(map(lambda x: x-1, point_list))
    point_list[answer-1] += 1
    
for ans in point_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
seikaisuu = [0]*N
for answer in A:
    seikaisuu[answer-1] += 1
for x in seikaisuu:
    if K > Q - x:
        print("Yes")
    else:
        print("No")