qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = list(input())
N.insert(0, '')
even = N[2::2]
odd = N[1::2]
print(odd, even)
if ('R' in even or 'L' in odd):
    print('No')
else:
    print('Yes')


Fixed code:
N = list(input())
N.insert(0, '')
even = N[2::2]
odd = N[1::2]
if ('R' in even or 'L' in odd):
    print('No')
else:
    print('Yes')
Buggy code:
s=input()
f=0
for i in range(len(s)):
  if i%2==0:
    if s[i]=='R' or 'U' or 'D':
      pass
    else:
      f=1
      break
  else:
    if s[i]=='L' or 'U' or 'D':
      pass
    else:
      f=1
      break
if f==0:
  print('Yes')
else:
  print('No')
    


Fixed code:
s=input()
f=0
for i in range(len(s)):
  if i%2==0:
    if s[i]=='R' or s[i]=='U' or s[i]=='D':
      pass
    else:
      f=1
      break
  else:
    if s[i]=='L' or s[i]=='U' or s[i]=='D':
      pass
    else:
      f=1
      break
if f==0:
  print('Yes')
else:
  print('No')
Buggy code:
"""
abc141-b
"""

S = input()

ans="Yes"

for i in range(int(len(S))):
    if (i % 2 == 0):
        if (S[i] == "L"):
            ans="No"
            break
    else:
        if (S[i] == "R"):
            ans="No"
            break
print(ans

Fixed code:
"""
abc141-b
"""

S = input()

ans="Yes"

for i in range(int(len(S))):
    if (i % 2 == 0):
        if (S[i] == "L"):
            ans="No"
            break
    else:
        if (S[i] == "R"):
            ans="No"
            break
print(ans)
Buggy code:
S = input()
check = True
for i in range(len(S)):
    if (i+1) % 2 == 0:
        if S[i] == "R":
            print(i)
            check = False
    else:
        if S[i] == "L":
            print(i)
            check = False
if check == True:
    print("Yes")
else:
    print("No")

Fixed code:
S = input()
check = True
for i in range(len(S)):
    if (i+1) % 2 == 0:
        if S[i] == "R":
            check = False
    else:
        if S[i] == "L":
            check = False
if check == True:
    print("Yes")
else:
    print("No")
Buggy code:
s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[i]!='U' and s[i]!='L' and s[i]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No')

Fixed code:
s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No')
Buggy code:
s=input()
n=len(s)
k=['R','U','D']
g=['L','U','D']
for i in n:
  if (i+1)%2!=0 and s[i] not in k:
    print('No')
    exit()
  elif (i+1)%2==0 and s[i] not in g:
    print('No')
    exit()
print('Yes')
     

Fixed code:
s=input()
n=len(s)
k=['R','U','D']
g=['L','U','D']
for i in range(n):
  if (i+1)%2!=0 and s[i] not in k:
    print('No')
    exit()
  elif (i+1)%2==0 and s[i] not in g:
    print('No')
    exit()
print('Yes')
Buggy code:
s=input()
n=len(s)
list1=['R','U','D']
list2=['L','U','D']
listg=[]
listk=[]
for i in range(n):
  if i%2!=0:
    listg.append(i)
  else:
    listk.append(i)
list3=[]
for g in listg:
  if s[g] in list2:
    list3.append(g)
list4=[]
for k in listk:
  if s[k] in list1:
    list4.append(k)
if len(list3)==len(listg) and len(list4)=len(listk):
  print('Yes')
else:
  print('No')

Fixed code:
s=input()
n=len(s)
list1=['R','U','D']
list2=['L','U','D']
listg=[]
listk=[]
for i in range(n):
  if i%2!=0:
    listg.append(i)
  else:
    listk.append(i)
list3=[]
for g in listg:
  if s[g] in list2:
    list3.append(g)
list4=[]
for k in listk:
  if s[k] in list1:
    list4.append(k)
if len(list3)==len(listg) and len(list4)==len(listk):
  print('Yes')
else:
  print('No')
Buggy code:
s = list(str(input()))

flag = True
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in ['R', 'U','D']:
           pass
        else:
            flag = False
    else:
        if s[i] in ['L','U','D']:
            pass
        else:
            falg = False

if flag:
    print('Yes')
else:
    print('No')


Fixed code:
s = list(str(input()))

flag = True
for i in range(len(s)):
    if (i+1) % 2 == 0:
        if s[i] in ['L','U','D']:
           pass
        else:
            flag = False
    else:
        if s[i] in ['R','U','D']:
            pass
        else:
            flag = False

if s[0] in ['R','U','D']:
    pass
else:
    flag = False
            
if flag:
    print('Yes')
else:
    print('No')
Buggy code:
array = ['L','R','U','D']
s = input()
c = 0
for i in range(len(s)):
  if i%2 == 0:
    if s[i] = 'L' or s[i] = 'U' or s[i] = 'D':
      continue
    else:
      c = 1
  if i%2 == 1:
    if s[i] = 'R' or s[i] = 'U' or s[i] = 'D':
      continue
    else:
      c = 1
if c== 0:
  print('Yes')
else:
  print('No')

Fixed code:
array = ['L','R','U','D']
s = input()
c = 0
for i in range(len(s)):
  if i%2 == 1:
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
  if i%2 == 0:
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
if c== 0:
  print('Yes')
else:
  print('No')
Buggy code:
s = input()
c = 0
for i in range(len(s)):
  if i%2 == 0:
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
  if i%2 == 1:
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
if c== 0:
  print('Yes')
else:
  print('No')



Fixed code:
s=list(input())
f=1
for i in range(len(s)):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            f=0
    else:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            f=0
if f:
    print("Yes")
else:
    print("No")
Buggy code:
N=list(input())
#print(N)
x=len(N)
y="YES"
for i  in range(x):
	if i%2==1:
		if N[i]=="R" :
			y="No"
			break
	if i%2==0:
		if N[i]=="L":
			y="No"
			break
print(y)

Fixed code:
N=list(input())
#print(N)
x=len(N)
y="Yes"
for i  in range(x):
	if i%2==1:
		if N[i]=="R" :
			y="No"
			break
	if i%2==0:
		if N[i]=="L":
			y="No"
			break
print(y)
Buggy code:
S = input()
dancable = True
for i in range(len(S)):
  if i % 2 == 0:
    dancable &= (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')
  else:
    dancable &= (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')
print('Yes' if dancable else 'No')

Fixed code:
S = input()
dancable = True
for i in range(len(S)):
  if i % 2 == 1:
    dancable &= (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')
  else:
    dancable &= (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')
print('Yes' if dancable else 'No')
Buggy code:
s= input()
ans='Yes'
for i in s[::2]:
        if i not in 'RUD':
                print(i)
                ans='No'
                break
for j in s[1::2]:
        if j not in 'LUD':
                ans='No'
                break
print(ans)

Fixed code:
s= input()
ans='Yes'
for i in s[::2]:
        if i not in 'RUD':
                ans='No'
                break
for j in s[1::2]:
        if j not in 'LUD':
                ans='No'
                break
print(ans)
Buggy code:
N, K, Q = map(int, input().split())
L = []
for i in range(N):
 L.append(0)
for i in range(Q)
 a = int(input()) - 1
 L[a] += 1
for i in range(N):
 print("Yes" if K - Q + L.count(i+1) > 0 else "No")

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

Fixed code:
N, K, Q = input().split(' ')
n, k, q = int(N), int(K), int(Q)
t = 'No'
if k - q > 0:
    t = 'Yes'
res = [t] * n

p = [k - q] * n
for i in range(q):
    r = int(input()) - 1
    p[r] += 1
    if p[r] > 0:
        res[r] = 'Yes'
for i in res:
    print(i)
Buggy code:

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

ans = [K] * N

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

for i in range(N):
    if ans[i] > Q + 1:
        print("Yes")
    else:
        print("No")
        

Fixed code:

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

ans = [K] * N

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

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

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

b = [k for _ in range(n)]
list = [0 for _ in range(n)]

for i in a:
    list[i-1] += 1
print(list)

for i in list:
    if q -k < i:
        print('Yes')
    else:
        print('No')

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

b = [k for _ in range(n)]
list = [0 for _ in range(n)]

for i in a:
    list[i-1] += 1

for i in list:
    if q -k < i:
        print('Yes')
    else:
        print('No')
Buggy code:
import numpy as np
N,K,Q=list(map(int,input().split()))
res=np.array([K-Q for _ in range(N)])
for _ in range(Q):
    i=int(input())
    res[i-1]+=2
for i in res:
    if i>0:
        print("Yes")
    else:
        print("No")

Fixed code:
import numpy as np
N,K,Q=list(map(int,input().split()))
res=np.array([K-Q for _ in range(N)])
for _ in range(Q):
    i=int(input())
    res[i-1]+=1
for i in res:
    if i>0:
        print("Yes")
    else:
        print("No")
Buggy code:
import sys

num = input().split()
participant = int(num[0])
init_point = int(num[1])
correct = int(num[2])

tmp = [0]*participant

for i in range(correct):
  answer_person = int(input())-1
  tmp[answer_person] += 1
print(tmp)

for i in tmp:
  if i<=correct-init_point:
    print("No")
  else:
    print("Yes")

Fixed code:
import sys

num = input().split()
participant = int(num[0])
init_point = int(num[1])
correct = int(num[2])

tmp = [0]*participant

for i in range(correct):
  answer_person = int(input())-1
  tmp[answer_person] += 1

for i in tmp:
  if i<=correct-init_point:
    print("No")
  else:
    print("Yes")
Buggy code:
n, k, q = map(int, input().split())
score_list = [k-q for _ in range(n)]
for i in range(q):
    tmp = int(input())
    score_list[tmp - 1] = score_list[tmp - 1] + 1

print(score_list)
for j in score_list:
    if j > 0:
        print("Yes")
    else:
        print("No")


Fixed code:
n, k, q = map(int, input().split())
score_list = [k-q for _ in range(n)]
for i in range(q):
    tmp = int(input())
    score_list[tmp - 1] = score_list[tmp - 1] + 1

for j in score_list:
    if j > 0:
        print("Yes")
    else:
        print("No")
Buggy code:
N, K, Q = map(int, input().split())

point_list = []
for i in range(N):
  point_list.append(K)

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

for i in point_list:
  i -= Q

for i in point_list:
  if i > 0:
    print('Yes')
  else:
    print('No')

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

point_list = []
for i in range(N):
  point_list.append(K)

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

res = []
for i in point_list:
  i -= Q
  res.append(i)

for i in res:
  if i > 0:
    print('Yes')
  else:
    print('No')
Buggy code:
n, k, q = map(int, input().split())

p = [k - q] * n

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

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

for i in range(n):
    if p[i] <= 0:
        print("No")
    else:
        print("Yes")

print(p)


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

p = [k - q] * n

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

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

for i in range(n):
    if p[i] <= 0:
        print("No")
    else:
        print("Yes")
Buggy code:
x = input().split()
plist = [int(x[1]) for i in range(int(x[0]))]
y = []
l = 0
while l < int(x[2]):
    ans = input()
    y.append(int(ans))
    l += 1

for i in y:
    plist[1] += 1

for p in plist:
    if p - int(x[2]) > 0:
        print("Yes")
    else:
        print("No")


Fixed code:
x = input().split()
plist = [int(x[1]) for i in range(int(x[0]))]
y = []
l = 0
while l < int(x[2]):
    ans = input()
    y.append(int(ans))
    l += 1

for i in y:
    plist[i-1] += 1

for p in plist:
    if p - int(x[2]) > 0:
        print("Yes")
    else:
        print("No")
Buggy code:
N,K,Q = list(map(int,input().split()))
A = []

point = [[K-Q] for _ in range(N)]

for i in range(Q):
    p = int(input())-1
    point[p] += 1
for i in range(N):
    if point[i] <= 0:
        print('No')
    else:
        print('Yes')

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

point = [K-Q for _ in range(N)]

for i in range(Q):
    p = int(input())-1
    point[p] += 1
for i in range(N):
    if point[i] <= 0:
        print('No')
    else:
        print('Yes')
Buggy code:
n, k, q = map(int, input().split())
l = [int(input()) for i in range(q)]

points = [k] * n
for i in range(q):
    points = map(lambda x: x - 1, points)
    points[l[i] - 1] += 2
for i in points:
    if i <= 0:
        print('No')
    else:
        print('Yes')

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

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

if k > q:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = set(a)
  for i in range(len(ans)):
    if k - q + a.count(ans[i]) > 0:
      res[ans[i]-1] = 'Yes'
print('\n'.join(map(str, res)))

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

if k - q > 0:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = [0] * n
  for i in range(len(a)):
    ans[a[i]-1] += 1
  for i in range(n):
    if k - q + ans[i] > 0:
      res[i] = 'Yes'
print('\n'.join(map(str, res)))
Buggy code:
n,k,q=(int(x) for x in input().split())
a=[]
for i in range(q):
    a.append(int(input()))
p=[0]*n
for i in range(k):
    for j in range(n):
        p[j]+=1
print(p)
for i in range(n):
    for j in range(q):
        p[i]-=1
        if a[j]-1 == i:
            p[i]+=1
print(p)


for i in range(n):
    if p[i]>=1:
        print("Yes")
    else:
        print("No")

Fixed code:
n,k,q=(int(x) for x in input().split())
a=[]
for i in range(q):
    a.append(int(input()))
p=[k-q]*n

for i in range(q):
    p[a[0]-1]+=1
    del a[0]

for i in range(n):
    if p[i]>0:
        print("Yes")
    else:
        print("No")
Buggy code:
a,b,c=map(int,input().split())
d=[]
e=[]
for i in range(c):
  d.append(int(input()))
for i in range(a):
  e.append(b-c)
for i in d:
  e[i+1]+-1
for i in e:
  if e<=0:
    print('No')
  else:
    print('Yes')
  

Fixed code:
a,b,c=map(int,input().split())
d=[]
e=[]
for i in range(c):
  d.append(int(input()))
for i in range(a):
  e.append(b-c)
for i in d:
  e[i-1]+=1
for i in e:
  if i<=0:
    print('No')
  else:
    print('Yes')
Buggy code:
n, k, q = list(map(int, input().split()))
a = [0] * q
for i in range(q):
  a[i] = int(input())

cur_k = [k] * n

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

for i in cur_k:
  if (i > q):
    print("Yes")
  else:
    print("No")

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

for i in range(N):
    p.append(A.count(i+1))
    P = K - Q + p[i]
    if P > 0:
        print('Yes')
    else:
        print('No')


Fixed code:
N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
p = [0] * N 
for i in A:
    p[i-1] += 1    

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

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

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

ans = []
for i in l:
    if k- q + i > 0:
        ans.append("Yes")
    else:
        ans.append("No")
print("\n".join(ans))

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

ans = []
for i in l:
    if k- q + i > 0:
        ans.append("Yes")
    else:
        ans.append("No")
print("\n".join(ans))
Buggy code:
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 code:
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 code:
import sys

N, K, Q = [int(n) for n in sys.stdin.readline().strip().split()]
ans_idx = [int(sys.stdin.readline().strip()) for _ in range(Q)]
scores = [0]*N

for ai in ans_idx:
  scores[ai] += 1
scores = [K-(s-Q) for s in scores]

for s in scores:
  print('No' if s<=0 else 'Yes')

Fixed code:
import sys
 
N, K, Q = [int(n) for n in sys.stdin.readline().strip().split()]
ans_idx = [int(sys.stdin.readline().strip()) for _ in range(Q)]
scores = [0]*N
 
for ai in ans_idx:
  scores[ai-1] += 1
scores = [K-(Q-s) for s in scores]
  
for s in scores:
  print('No' if s<=0 else 'Yes')
Buggy code:
n, k, q = map(int, input().split())

members_p = list(k-q for _ in range(n))
a_list = []

for _ in range(q):
  a_list.append(int(input()))
  
for i in range(q):
  members_p[a_list[i]-1] += 1

res = ['Yes' if member > 0 else 'No' for member in members_p]  
  
print(members_p)

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

members_p = list(k-q for _ in range(n))
a_list = []

for _ in range(q):
  a_list.append(int(input()))
  
for i in range(q):
  target_index = a_list[i]-1
  members_p[target_index] += 1

res = ['Yes' if member > 0 else 'No' for member in members_p]  
  
print(*res, sep = '\n')
Buggy code:
import numpy as np
n, k, q = input().split(' ')
n, k, q = int(n),int(k), int(q)
hum = [0]*n
for i in range(q):
    ind = input()
    hum[int(ind)] += 1
hum_last = np.array(hum)-1
for i in range(len(hum_last)):
    if hum_last[len(hum_last)-1-i] <= 0:
        print('No')
    else:
        print('Yes')

Fixed code:
import numpy as np
n, k, q = input().split(' ')
n, k, q = int(n),int(k), int(q)
hum = [k]*n
for i in range(q):
    ind = input()
    hum[int(ind)-1] += 1
hum_last = np.array(hum)-q
for i in range(len(hum_last)):
    if hum_last[i] <= 0:
        print('No')
    else:
        print('Yes')
Buggy code:
def main():
    import sys
    n,k,q=map(int,input().split())
    if n-k>0:
        for i in range(n):
            print('Yes')
        sys.exit()

    a=[k-q]*n
    for i in range(q):
        a[int(input())-1]+=1
    for i in range(n):
        print('Yes' if a[i]>0 else 'No')

if __name__ == '__main__':
    main()

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




if __name__ == '__main__':
    main()
Buggy code:
# -*- coding: utf-8 -*-

n, k, q =map(int, input().split())
a = []
a = map(int, [input() for i in range(q)])

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

Fixed code:
# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = [int(input()) for i in range(q)]

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>q-k:
    print("Yes")
  else:
    print("No")
Buggy code:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = filter(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))

if __name__ == '__main__':
    main()


Fixed code:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = map(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))
    for ans in attackSurvival(n, k, q, a): print(ans)

if __name__ == '__main__':
    main()
Buggy code:
n,k,q = map(int,input().split())
n_point = [k]*n
A = [int(input()) for x in range(q)]
for i in range(q):
    n_point[A[0]-1]+=1
for i in range(n):
    n_point[i]-=q
for i in range(n): 
    if n_point[i] > 0:
        print('Yes')
    else :
        print('No')

Fixed code:
n,k,q = map(int,input().split())
n_point = [k]*n
A = [int(input()) for x in range(q)]
for i in range(q):
    n_point[A[i]-1]+=1
for i in range(n):
    n_point[i]-=q
for i in range(n): 
    if n_point[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-1)]
a_cnt = Counter(a)
ans = [k+a_cnt[i+1]-q for i in range(n)]
for i in range(n):
    if ans[i] > 0:
        print('Yes')
    else:
        print('No')

Fixed code:
from collections import Counter
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]
a_cnt = Counter(a)
ans = [k+a_cnt[i+1]-q for i in range(n)]
for i in range(n):
    if ans[i] > 0:
        print('Yes')
    else:
        print('No')
Buggy code:
n,k,q = map(int,input().split())
points = [int(input()) for _ in range(q)]
for i in range(q):
    winner = int(input())
    points[winner - 1] += 1
for i in points:
    if i >0:
        print("Yes")
    else:
        print("No")

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