Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K, Q, *A = map(int, open(0).read().split())
    A = [K + A.count(i) for i in range(1, N + 1)]
    print("\n".join(["Yes" if Q < a else "No" for a in A]))
    return


main()


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K, Q, *A = map(int, open(0).read().split())
    print("\n".join(["Yes" if Q < K + A.count(i)
                     else "No" for i in range(1, N + 1)]))
    return


main()


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
A = [int(i) - 1 for i in lines[1:]]
ans = [0] * N
for a in Counter(A):
    ans[a] += A.count(a)
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q, *A = map(int, open(0).read().split())
ans = ("Yes" if Q < K + A.count(a)
       else "No" for a in range(1, N + 1))
print("\n".join(ans))


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q, *A = map(int, open(0).read().split())
print("\n".join(("Yes" if Q < K + A.count(a)
                 else "No" for a in range(1, N + 1))))


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q, *A = map(int, open(0).read().split())
print("\n".join(["Yes" if Q < K + A.count(a)
                 else "No" for a in range(1, N + 1)]))


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q, *A = map(int, open(0).read().split())
print(*["Yes" if Q < K + A.count(a)
        else "No" for a in range(1, N + 1)], sep='\n')


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) - 1 for i in range(Q)]
print(*["Yes" if Q < K + A.count(a) else "No" for a in range(N)], sep='\n')


Fixed submission:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
ans = [0] * N
A = Counter((int(i) - 1 for i in lines[1:]))
for k in A.keys():
    ans[k] += A[k]
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))