qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys
input = sys.stdin.readline
n,k,q=map(int,input().split())
point=[0]*n
for a in range(q):
    a=int(input())
    point[a-1]+=1
print(point)
for i in point:
    if i>q-k:
        print("Yes")
    else:
        print("No")


Fixed code:
import sys
input = sys.stdin.readline
n,k,q=map(int,input().split())
point=[0]*n
for a in range(q):
    a=int(input())
    point[a-1]+=1
#print(point)
for i in point:
    if i>q-k:
        print("Yes")
    else:
        print("No")
Buggy code:
n, k, q = [ int(_) for _ in input().split() ]
a = [ int(input()) for _ in range(q) ]

p = [ k for _ in range(n) ]

for x in a:
	p[x-1] += 1
	p = [ y-1 for y in p ]

ans = []

for z in p:
	if z > 0:
		ans.append('Yes')
	else:
		ans.append('No')

print(ans)

Fixed code:
n, k, q = [ int(_) for _ in input().split() ]
a = [ int(input()) for _ in range(q) ]

p = [ k for _ in range(n) ]

p = [ y-q for y in p ]

for x in a:
	p[x-1] += 1

ans = []

for z in p:
	if z > 0:
		ans.append('Yes')
	else:
		ans.append('No')

for blah in ans:
	print(blah)
Buggy code:
pos=input()
pos=pos.split()
N=int(pos[0])
P=int(pos[1])
T=int(pos[2])
point=[0]*N

for i in range(0,T):
    c=input()
    point[int(c)-1]+=1
point=[P- d for d in point]
for i in range(0,N):
    if(point[i]>0):
        print('Yes')
    else:
        print('No')

Fixed code:
pos=input()
pos=pos.split()
N=int(pos[0])
P=int(pos[1])
T=int(pos[2])
point=[0]*N

for i in range(0,T):
    c=input()
    point[int(c)-1]+=1
point=[P-T+d for d in point]
for i in range(0,N):
    if(point[i]>0):
        print('Yes')
    else:
        print('No')
Buggy code:
N, K, Q = map(int, input().split())
A = []
for _ in range(Q):
    A.append(int(input()))

point = [K] * N

for i in range(Q):
    if A[i] == i:
        break
    else:
        point[i] -= 1

for j in range(N):
    if point[j] > 0:
        print('Yes')
    else:
        print('No')

Fixed code:
N, K, Q = map(int, input().split())
A = []
for _ in range(Q):
    A.append(int(input()))

point = [K-Q] * N

for i in range(Q):
    point[A[i] - 1] += 1

for j in range(N):
    if point[j] > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
def resolve():
    N, K, Q = map(int, input().split())
    A = [Q-K]*N
    for _ in range(Q):
        a = int(input())
        A[a-1] += 1
    for i in range(N):
        if A[i] > 0:
            print("Yes")
        else:
            print("No")
resolve()

Fixed code:
def resolve():
    N, K, Q = map(int, input().split())
    A = [K-Q]*N
    for _ in range(Q):
        a = int(input())
        A[a-1] += 1
    for i in range(N):
        if A[i] > 0:
            print("Yes")
        else:
            print("No")
resolve()
Buggy code:
N,K,Q=map(int,input().split())
A=[int(input()) for i in range(Q)]
point=[K]*N
for i in A:
  i=int(i)
  point=list(map(lambda x: x-1,point))
  point[i]+=1
for i in point:
  if i>0:
    print("Yes")
  else:
    print("No")


Fixed code:
N,K,Q=map(int,input().split())
A=[int(input()) for i in range(Q)]
point=[K-Q]*N
for i in A:
  i=int(i)
  point[i-1]+=1
for i in point:
  if i>0:
    print("Yes")
  else:
    print("No")
Buggy code:
n,k,q=map(int,input().split())
a=[k-q]*n
for i in range(q):
    point=int(input())
    a[point-1] += 1
for i in range(len(l)):
    if l[i] > 0:
        print("Yes")
    else:
        print("No")

Fixed code:
n,k,q=map(int,input().split())
a=[k-q]*n
for i in range(q):
    point=int(input())
    a[point-1] += 1
for i in range(len(a)):
    if a[i] > 0:
        print("Yes")
    else:
        print("No")
Buggy code:
n,k,q = map(int, input().split())
a = [k-q]*n
for i in int(input()):
  a[i-1] += 1
for i in points:
  if i <= 0:
    print('No')
  else:
    print('Yes')

Fixed code:
n, k, q = map(int, input().split())
A = [0] * (n + 1)
for i in range(q):
    a = int(input())
    A[a] += 1

for i in range(n):
    if k - (q - A[i+1]) <= 0:
        print("No")
    else:
        print("Yes")
Buggy code:
n, k, q = map(int, input().split())
point = [0] * (n+1)
for _ in range(n):
  a = int(input())
  point[a] += 1

for i in range(1, n+1):
  if k + point[i] > q:
    print('Yes')
  else:
    print('No')

Fixed code:
n, k, q = map(int, input().split())
point = [0] * (n+1)
for _ in range(q):
  a = int(input())
  point[a] += 1

for i in range(1, n+1):
  if k + point[i] > q:
    print('Yes')
  else:
    print('No')
Buggy code:
n,k,q = map(int,input().split())
# a=[int(input()) for i in range(q)]
ans=[-q]*n
for i in range(q):
    ans[int(input())-1] += 2
print(ans)
for i in ans:
    if i>0:
        print("Yes")
    else:
        print("No")

Fixed code:
n,k,q = map(int,input().split())
# a=[int(input()) for i in range(q)]
ans=[k-q]*n
for i in range(q):
    ans[int(input())-1] += 1
# print(ans)
for i in ans:
    if i>0:
        print("Yes")
    else:
        print("No")
Buggy code:
n, k, q = map(int, input().split())
if k-q >=1:
    for _ in range(q):
        print("Yes")
out = [k-q for _ in range(n)]
for _ in range(q):
    a = int(input())
    out[a] += 1
for i in range(n):
    msg = "Yes" if out[i] >= 1 else "No"
    print(msg)

Fixed code:
n, k, q = map(int, input().split())
out = [k-q for _ in range(n)]
for _ in range(q):
    a = int(input())-1
    out[a] += 1
for i in range(n):
    msg = "Yes" if out[i] > 0 else "No"
    print(msg)
Buggy code:
n , k , q = map(int,input().split())
a = [int(input()) for x in range(q)]
P = [k-q]*n
for x in a:
    P[x] +=1

ans = '\n'.join('No'if x <=0 else 'Yes' for x in P[1:])
print(ans)


Fixed code:
n , k , q = map(int,input().split())
a = [int(input()) for x in range(q)]
P = [k-q]*(n+1)
for x in a:
    P[x] +=1

ans = '\n'.join('No'if x <=0 else 'Yes' for x in P[1:])
print(ans)
Buggy code:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N, K, Q = map(int, input().split())
L = [0]*N
for _ in range(Q):
    a = int(input())
    L[a-1] += 1
ans = 0
for l in L:
    if l > K:
        print("Yes")
    else:
        print("No")


Fixed code:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N, K, Q = map(int, input().split())
L = [0]*N
for _ in range(Q):
    a = int(input())
    L[a-1] += 1
ans = 0
for l in L:
    if l+K-Q > 0:
        print("Yes")
    else:
        print("No")
Buggy code:
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]

pt = [k-q for _ in range(n)]
for i in a:
    pt[i-1] += 1

print(pt)
for i in pt:
    if i > 0:
        print("Yes")
    else:
        print("No")

Fixed code:
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]

pt = [k-q for _ in range(n)]
for i in a:
    pt[i-1] += 1

for i in pt:
    if i > 0:
        print("Yes")
    else:
        print("No")
Buggy code:
n, k, q = map(int, input().split())
a = list(map(int, [input() for i in range(q)]))
p = [k-q] * n
for i in range(q):
  p[a[i]] += 1
for i in range(n):
  print('Yes' if p[i] > 0 else 'No')

Fixed code:
n,k,q = map(int,input().split())
a = [0]*q
for i in range(q):
    a[i] = int(input())

points = [0]*n
for i in range(q):
    points[a[i]-1] += 1

for i in range(n):
    if k-q+points[i] > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
import heapq
t = 1
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n,k,q = map(int,input().split())	
	v = []
	l = []
	# v = list(map(int,input().strip().split()))[0:n]
	for i in range(q):
		p = int(input().strip())
		v.append(p)
	for i in range(n):
		l.append(0)
	for i in v:
		l[i-1] += 1
	print(l)
	for i in range(n):
		if(l[i] <= q-k):
			print("No")
		else:
			print("Yes")
	# for i in range(n):
	# 	v[i] = -v[i]
	# heapq.heapify(v)
	# for i in range(m):
	# 	x = heapq.heappop(v)
	# 	x = -x
	# 	x = x//2
	# 	heapq.heappush(v,-x)
	# ans = 0
	# for i in range(n):
	# 	ans += (-heapq.heappop(v))
	# print(ans)


Fixed code:
import heapq
t = 1
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n,k,q = map(int,input().split())	
	v = []
	l = []
	# v = list(map(int,input().strip().split()))[0:n]
	for i in range(q):
		p = int(input().strip())
		v.append(p)
	for i in range(n):
		l.append(0)
	for i in v:
		l[i-1] += 1
	# print(l)
	for i in range(n):
		if(l[i] <= q-k):
			print("No")
		else:
			print("Yes")
	# for i in range(n):
	# 	v[i] = -v[i]
	# heapq.heapify(v)
	# for i in range(m):
	# 	x = heapq.heappop(v)
	# 	x = -x
	# 	x = x//2
	# 	heapq.heappush(v,-x)
	# ans = 0
	# for i in range(n):
	# 	ans += (-heapq.heappop(v))
	# print(ans)
Buggy code:
n,k,q =map(int,input().split())
a = [int(input()) for _ in range(q)]

point = [0]*n

for i in range(q):
    point[a[i]-1] += 1
print(point)

for i in range(n):
    if point[i]>= q-k+1:
        print("Yes")
    else:
        print("No")

Fixed code:
n,k,q = map(int,input().split())
a = [int(input()) for _ in range(q)]
pt = [k-q for _ in range(n)]
for i in a:
  pt[i-1] += 1
for i in pt:
  if i > 0:
    print('Yes')
  else:
    print('No')
Buggy code:
N, K, Q = map(int, input().split())
list_winner = []
list_point =[]

for _ in range(Q):
    A = int(input())
    list_winner.append(A)
    list_point.append(K)
    
def add(n):
    return n-Q
    
list_point_new = []

for i in list_point:
    list_point_new.append(add(i))
    
for i in range(Q):
    a = list_winner[i]-1
    list_point_new[a] = list_point_new[a] + 1
    
for i in range(Q):
    if list_point_new[i] <= 0:
        print('No')
    else:
        print('Yes')

Fixed code:
N, K, Q = map(int, input().split())
list_winner = []
list_point =[]

for _ in range(Q):
    A = int(input())
    list_winner.append(A)

for i in range(N):
    list_point.append(K)
    
    
def add(n):
    return n-Q
    
list_point_new = []

for i in list_point:
    list_point_new.append(add(i))
    
for i in range(Q):
    a = list_winner[i]-1
    list_point_new[a] = list_point_new[a] + 1
    
for i in range(N):
    if list_point_new[i] <= 0:
        print('No')
    else:
        print('Yes')
Buggy code:
N, K, Q = map(int, input().split())
points = [K] * N
for _ in range(Q):
    a = int(input())
    points[a] +=1

for point in points:
    if point > Q:
        print('Yes')
    else:
        print('No')

Fixed code:
N, K, Q = map(int, input().split())
points = [K] * N
for _ in range(Q):
    a = int(input())
    points[a-1] +=1

for point in points:
    if point > Q:
        print('Yes')
    else:
        print('No')
Buggy code:
N,K,Q = map(int, input().split())
A = [K for _ in N]
for _ in N:
  a = int(input())
  A[a-1] += 1
for i in N:
  if A[i] > Q:
    print("Yes")
  else:
    print("No")

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

A = [K for _ in range(N)]

for _ in range(Q):
    A[int(input())-1] += 1
for i in range(N):
    print("Yes" if A[i] > Q else "No")
Buggy code:
n, k, q = map(int, input().split())
alist = [int(input()) for i in range(q)]
ans = [k - q] * n

for Ai in alist:
    ans[Ai - 1] += 1

for Ai in alist:
    print('Yes') if Ai > 0 else print('No')

Fixed code:
n, k, q = map(int, input().split())
alist = [int(input()) for i in range(q)]
ans = [k - q] * n

for Ai in alist:
    ans[Ai - 1] += 1

for Ai in ans:
    print('Yes') if Ai > 0 else print('No')
Buggy code:
import sys

n,k,q = map(int,input().split())

if k > q:
    for _ in range(n):
        print('Yes')
        sys.exit()

A = []
for _ in range(q):
    a = int(input())
    A.append(a)

ans = [0]*n

from collections import Counter
cnt = Counter(A)
for key,v in cnt.items():
    if v >= q-k+1:
        ans[key-1] = 1

for i in range(n):
    if ans[i] == 0:
        print('No')
    else:
        print('Yes')

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


if k <= q:
    
    A = []
    for _ in range(q):
        a = int(input())
        A.append(a)

    ans = [0]*n

    from collections import Counter
    cnt = Counter(A)
    for key,v in cnt.items():
        if v >= q-k+1:
            ans[key-1] = 1

    for i in range(n):
        if ans[i] == 0:
            print('No')
        else:
            print('Yes')
        
else:
    for _ in range(n):
        print('Yes')
Buggy code:
N, K, Q = map(int, input().split())

P = [0 for _ in range(N)]
for _ in range(Q):
    A = int(input()) - 1
    P[A] += 1

for p in P:
    if Q + 1 <= p:
        print('Yes')
    else:
        print('No')


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

P = [K for _ in range(N)]
for _ in range(Q):
    A = int(input()) - 1
    P[A] += 1

for p in P:
    if Q + 1 <= p:
        print('Yes')
    else:
        print('No')
Buggy code:
n, k, q = map(int, input().split())

A = [0]*n
ans = 0
for i in range(q):
    A[int(input())-1] += 1

print(A)
for i in range(n):
    if A[i] > q - k:
        print("Yes")
    else:
        print("No")

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

A = [0]*n
ans = 0
for i in range(q):
    A[int(input())-1] += 1


for i in range(n):
    if A[i] > q - k:
        print("Yes")
    else:
        print("No")
Buggy code:
import numpy as np

N, K, Q = map(int, input().split())
#A_point = np.full((N, 1), K)
A_zero  = np.zeros((N, 1))


for i in range(Q):

        Ai = int(input())
        A_zero[Ai-1][0] += 1

for i in range(len(A_zero)):

        print("Yes" if K-(4-A_zero[i][0])>=1 else "No")


Fixed code:
import numpy as np

N, K, Q = map(int, input().split())
#A_point = np.full((N, 1), K)
A_zero  = np.zeros((N, 1))


for i in range(Q):

        Ai = int(input())
        A_zero[Ai-1][0] += 1

for i in range(N):

        print("Yes" if K-(Q-A_zero[i][0])>=1 else "No")
Buggy code:
N,K,Q = map(int, input().split())
A = [-K] * N
for _ in range(Q):
  A[int(input())-1] += 1
for n in range(N):
  if A[n] > 0: print("Yes")
  else: print("No")

Fixed code:
N,K,Q = map(int, input().split())
A = [K-Q] * N
for _ in range(Q):
  A[int(input())-1] += 1
for n in range(N):
  if A[n] > 0: print("Yes")
  else: print("No")
Buggy code:
import numpy as np
n, k, q = map(int, input().split())

l=[]
for i in range(q):
    x = int(input())
    l.append(x)

p = np.array([k - q] * n)
pp = np.array([0] * n)

for i in range(q):
    index = l[i] - 1
    pp[index] += 1

xx = p + pp

for i in range(len(xx)):
    if xx[i] >= 0:
        print('Yes')
    else:
        print('No')

Fixed code:
import numpy as np
n, k, q = map(int, input().split())

l=[]
for i in range(q):
    x = int(input())
    l.append(x)

p = np.array([k - q] * n)
pp = np.array([0] * n)

for i in range(q):
    index = l[i] - 1
    pp[index] += 1

xx = p + pp

for i in range(len(xx)):
    if xx[i] > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
N, K, Q = (int(i) for i in input().split())
A = [int(input()) for i in range(Q)]

import numpy as np
T = K - Q
S = np.ones(N)*T

for i in range(Q):
  S[A[i]] += 1

for i in range(N):
  if S[i] <= 0:
    print('No')
  else:
    print('Yes')

Fixed code:
N, K, Q = (int(i) for i in input().split())
A = [int(input()) for i in range(Q)]

import numpy as np
S = np.ones(N)*(K - Q)

for i in range(Q):
  x = A[i]
  S[x-1] += 1

for i in range(N):
  if S[i] <= 0:
    print('No')
  else:
    print('Yes')
Buggy code:
n,k,q = map(int, input().split())

score = [-q]*n

for i in range(q):
	dat = int(input())-1
	score[dat] = score[dat] + k + 1

for i in range(n):
	if score[i] > 0:
		print("Yes")
	else:
		print("No")

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

score = [k-q]*n

for i in range(q):
	dat = int(input())-1
	score[dat] = score[dat] + 1

#print(score)

for i in range(n):
	if score[i] > 0:
		print("Yes")
	else:
		print("No")
Buggy code:
n, k, q = map(int, input().split())
s = [0] * n
for i in range(q):
	a = int(input())
	s[a - 1] += 1
print(s)
for i in range(n):
	if s[i] > q - k:
		print('Yes')
	else:
		print('No')

Fixed code:
n, k, q = map(int, input().split())
s = [0] * n
for i in range(q):
	a = int(input())
	s[a - 1] += 1
for i in range(n):
	if s[i] > q - k:
		print('Yes')
	else:
		print('No')
Buggy code:
N, K, Q = map(int, input().split(' '))
P = [0 for _ in range(N)]

for i in range(Q):
    a = int(input()) - 1
    P[a] += 1

for i in range(N):
    if K - (Q - P[i]) > 0:
        print('yes')
    else:
        print('No')


Fixed code:
N, K, Q = map(int, input().split(' '))
P = [0 for _ in range(N)]

for i in range(Q):
    a = int(input()) - 1
    P[a] += 1

for i in range(N):
    if K - (Q - P[i]) > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
a = list(map(int,input().split()))
n = a[0]
k = a[1]
q = a[2]
#print(n,k,q)
n_list = [k]*n
#print(n_list[0]+100)
#print(n_list)
for i in range(q):
  #print('Q',i)
  seikaisha = int(input())
  #print('seikaishaha',seikaisha)
  for j in range(n):
    if j == seikaisha:
      n_list[j] += 0
    else:
      n_list[j] -= 1
  #print(n_list)
for k in range(n):
  if n_list[k] > 0:
    print('Yes')
  else:
    print('No')

Fixed code:
a = list(map(int,input().split()))
n = a[0]
k = a[1]
q = a[2]
n_list = [0]*n
for i in range(q):
  seikaisha = int(input())
  n_list[seikaisha-1] += 1
  #print(n_list)
for j in range(n):
  if n_list[j]+k-q > 0:
    print('Yes')
  else:
    print('No')
Buggy code:
n, k, q = map(int, input.split())
inl = [int[x] for x in range(q)]
chl = [0] * n
for z in inl:
  chl[z-1] += 1
for y in chl:
  if y > (q-k):
    print('Yes')
  else:
    print('No')


Fixed code:
n, k, q = map(int, input().split())
inl = [int(input()) for x in range(q)]
chl = [0] * n
for z in inl:
  chl[z-1] += 1
for y in range(n):
  if chl[y] > (q-k):
    print('Yes')
  else:
    print('No')
Buggy code:
I = list(map(int,input().split()))
N = I[0]
K = I[1]
Q = I[2]
A = [0] * Q
for i in range(Q):
    A[i] = int(input())
count = [0] * N
for i in range(Q):
    count[A[i]] += 1
for i in range(N):
    ans = K - Q + count[i]
    if ans > 0:
        print('Yes')
    else:
        print('No')

Fixed code:
I = list(map(int,input().split()))
N = I[0]
K = I[1]
Q = I[2]
A = [0] * Q
for i in range(Q):
    A[i] = int(input())
C = [0] * N
for i in range(Q):
    C[A[i]-1] += 1
for i in range(N):
    ans = K - Q + C[i]
    if ans > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
inp=list(map(int,input().split()))
n=inp[0]
k=inp[1]
q=inp[2]
if q<k:
  for i in range(n):
    print ('Yes')
else:
  arr=[k-q]*(n)
  z=[]
  for i in range(n):
    x=int(input())
    arr[x-1]+=1
for i in range(len(arr)):
  if arr[i]>0:
    print ('Yes')
  else:
    print ('No')

Fixed code:
inp=list(map(int,input().split()))
n=inp[0]
k=inp[1]
q=inp[2]
arr=[k-q]*n
for i in range(q):
        x=int(input())
        arr[x-1]+=1
if q<k:
    for i in range(n):
        print ('Yes')
else:
    z=[]
    for i in range(len(arr)):
        if arr[i]>0:
            print ('Yes')
        else:
            print ('No')
Buggy code:
N,K,Q=input().split()
N=int(N)
K=int(K)
Q=int(Q)

a=[]
for q in range(Q):
    a.append(int(input()))

cnt=[0]*N
for q in range(Q):
    cnt[int(a[q])-1]+=1

'print(cnt)

for n in range(N):
    if K - (Q - cnt[n]) > 0:    
        print('Yes')
    else:
        print('No')

Fixed code:
N,K,Q=input().split()
N=int(N)
K=int(K)
Q=int(Q)

a=[]
for q in range(Q):
    a.append(int(input()))

cnt=[0]*N
for q in range(Q):
    cnt[int(a[q])-1]+=1

for n in range(N):
    if K - (Q - cnt[n]) > 0:    
        print('Yes')
    else:
        print('No')
Buggy code:
import numpy
import sys
def input():
    return sys.stdin.readline()[:-1]

N, K, Q = map(int, input().split())

points = np.array([K for _ in range(N)])

for q in range(Q):
    A = int(input()) - 1
    points -= 1
    points[A] +=1

for p in points:
    if p < 1:
        print('No')
    else:
        print('Yes')


Fixed code:
import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]

N, K, Q = map(int, input().split())

points = np.array([K - Q for _ in range(N)])

for q in range(Q):
    A = int(input()) - 1
    points[A] +=1

for p in points:
    if p < 1:
        print('No')
    else:
        print('Yes')
Buggy code:
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]
print(A)
score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1
print(score)


for i in range(N):
    if K+score[i]-Q >0:
        print('yes')
    else:
        print('No')


Fixed code:
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]
#print(A)
score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1
#print(score)

for i in range(N):
    if K+score[i]-Q >0:
        print('Yes')
    else:
        print('No')
Buggy code:
N, K, Q = map(int, input().split(' '))
res = [K for _ in range(N)]
for i in range(Q):
    a = int(input())
    res = list(map(lambda n: n-1, res))
    res[a] = res[a] + 1
for i in range(N):
    print('Yes' if res[i] > 0 else 'No')


Fixed code:
N, K, Q = map(int, input().split(' '))
res = [0 for _ in range(N)]
for i in range(Q):
    a = int(input()) - 1
    res[a] = res[a] + 1
res = list(map(lambda n: n - Q + K, res))
for i in range(N):
    print('Yes' if res[i] > 0 else 'No')
Buggy code:
nkq=list(map(int,input().split()))
a = [int(input()) for _ in range(nkq[2])]
point=[0]*nkq[0]
for i in range(nkq[0]):
    point[a[0]-1]+=1
    del a[0]
for j in range(nkq[0]):
    if point[j]>0:
        print('Yes')
    else:
        print('No')

Fixed code:
nkq=list(map(int,input().split()))
a = [int(input()) for _ in range(nkq[2])]
point=[nkq[1]-nkq[2]]*nkq[0]
for i in range(nkq[2]):
    point[a[0]-1]+=1
    del a[0]
for j in range(nkq[0]):
    if point[j]>0:
        print('Yes')
    else:
        print('No')
Buggy code:
#N=int(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
N,K,Q = map(int, input().split())
K-=Q

if K>0:
  print(N)
  exit()

Kl = [K]*N

for i in range(Q):
  Kl[int(input())-1]+=1

Co=0
for j in range(N):
  if Kl[j]>0:
    print('Yes')
  else:
    print('No')

Fixed code:
#N=int(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
N,K,Q = map(int, input().split())
K-=Q

Kl = [K]*N

for i in range(Q):
  Kl[int(input())-1]+=1

Co=0
for j in range(N):
  if Kl[j]>0:
    print('Yes')
  else:
    print('No')
Buggy code:
n, k, q = map(int,input().split())
a = [0 for i in range(n)]
for i in range(q):
  x = int(input())
  a[x-1] += 1
for i in range(n):
  print("Yes" if a[i] > k else "No")

Fixed code:
n, k, q = map(int, input().split())
score = [k-q]*n

for i in range(q):
  a = int(input())
  score[a-1] += 1
  
for i in range(n):
  if score[i] > 0:
    print('Yes')
  else:
    print('No')
Buggy code:
n,k,q=map(int,input().split())
if k>q:
    for i in range(n):
        print("Yes")
        exit()
ans=[k-q for i in range(n)]
for i in range(q):
    ans[int(input())-1]+=1
for i in range(n):
    if ans[i]>0:
        print("Yes")
    else:
        print("No")

Fixed code:
n,k,q=map(int,input().split())
# if k>q:
#     for i in range(n):
#         print("Yes")
#         exit()
ans=[k-q for i in range(n)]
for i in range(q):
    ans[int(input())-1]+=1
for i in range(n):
    if ans[i]>0:
        print("Yes")
    else:
        print("No")
Buggy code:
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
print(seikaisuu)
for x in seikaisuu:
    if K > Q - x:
        print("Yes")
    else:
        print("No")

Fixed code:
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 code:
N, K, Q=map(int,input().split())
K -= Q
nP = [ K for i in range(N)]

for i in range(Q):
  Tmp = int(input())
  nP[Tmp - 1] += 2

for i in range(N):
  if nP[i] > 0:
    print('Yes')
  else:
    print('No')


Fixed code:
N, K, Q=map(int,input().split())
K -= Q
#print(K)
nP = [ K for i in range(N)]
 
for i in range(Q):
  Tmp = int(input())
  nP[Tmp - 1] += 1

#print(nP)
for i in range(N):
  if nP[i] > 0:
    print('Yes')
  else:
    print('No')
Buggy code:
from collections import Counter
N,K,Q = map(int,input().split())

A = [int(input()) for _ in range(Q)]
c = dict(Counter(A))
print(c)
for i in range(1,N+1):
    if i in c:
        t = Q - c[i]
        print('Yes' if t < K else 'No')
    else:
        print('Yes' if Q < K else 'No')

Fixed code:
from collections import Counter
N,K,Q = map(int,input().split())

A = [int(input()) for _ in range(Q)]
c = dict(Counter(A))
for i in range(1,N+1):
    if i in c:
        t = Q - c[i]
        print('Yes' if t < K else 'No')
    else:
        print('Yes' if Q < K else 'No')