Problem:


Score: 300 points

Problem Statement

Takahashi has decided to hold fastest-finger-fast quiz games. Kizahashi, who is in charge of making the scoreboard, is struggling to write the program that manages the players' scores in a game, which proceeds as follows.

A game is played by N players, numbered 1 to N. At the beginning of a game, each player has K points.

When a player correctly answers a question, each of the other N-1 players receives minus one (-1) point. There is no other factor that affects the players' scores.

At the end of a game, the players with 0 points or lower are eliminated, and the remaining players survive.

In the last game, the players gave a total of Q correct answers, the i-th of which was given by Player A_i.
For Kizahashi, write a program that determines whether each of the N players survived this game.

Constraints

All values in input are integers.

2 \leq N \leq 10^5

1 \leq K \leq 10^9

1 \leq Q \leq 10^5

1 \leq A_i \leq N\ (1 \leq i \leq Q)

Input

Input is given from Standard Input in the following format:

N K Q
A_1
A_2
.
.
.
A_Q

Output

Print N lines. The i-th line should contain Yes if Player i survived the game, and No otherwise.

Sample Input 1

6 3 4
3
1
3
2

Sample Output 1

No
No
Yes
No
No
No

In the beginning, the players' scores are (3, 3, 3, 3, 3, 3).

Player 3 correctly answers a question. The players' scores are now (2, 2, 3, 2, 2, 2).

Player 1 correctly answers a question. The players' scores are now (2, 1, 2, 1, 1, 1).

Player 3 correctly answers a question. The players' scores are now (1, 0, 2, 0, 0, 0).

Player 2 correctly answers a question. The players' scores are now (0, 0, 1, -1, -1, -1).

Players 1, 2, 4, 5 and 6, who have 0 points or lower, are eliminated, and Player 3 survives this game.

Sample Input 2

6 5 4
3
1
3
2

Sample Output 2

Yes
Yes
Yes
Yes
Yes
Yes

Sample Input 3

10 13 15
3
1
4
1
5
9
2
6
5
3
5
8
9
7
9

Sample Output 3

No
No
No
No
Yes
No
No
No
Yes
No



Sample input:
6 3 4
3
1
3
2


Sample output:
No
No
Yes
No
No
No

Submission status: Time Limit Exceeded

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

for i, _ in enumerate(range(n)):
    if k - (q - answer.count(i + 1)) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline

n,k,q = map(int,input().split())
l = [int(input()) for _ in range(q)]
l.sort()
ll = set(l)
l2 = []

for _ in ll:
	l2.append(l.count(_))

lll = list(ll)

for _ in range(1,n+1):
	if _ in lll:
		if k - q + l2[lll.index(_)] > 0:
			print('Yes')
		else:
			print('No')
	else:
		if k - q > 0:
			print('Yes')
		else:
			print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int, input().split())
#print(N,K,Q)
A=list()
for j in range(Q):
  A.append(int(input()))

#print(A)
#C=list()
for j in range(N):
  if Q-A.count(j+1)<K:
    print('Yes')
  else:
    print('No')
 
#print(C)

Submission status: Time Limit Exceeded

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

arr = [int(k)] * n

for i in range(q):
    q_i = int(input())

    for j in range(len(arr)):
        arr[j] = arr[j] - 1
    arr[q_i - 1] += 1

for go_or_not in arr:
    if go_or_not > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

if k > q:
    for i in range(n):
        print('Yes')
elif k == q:
    for j in range(1, n+1):
        if j in a:
            print('Yes')
        else:
            print('No')
else:
    border = q - k
    for h in range(1, n+1):
        if a.count(h) > border:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys

info = input().split(" ")
N = int(info[0])
K = int(info[1])
Q = int(info[2])
  
point = [K]*N
  
for i in range(1, Q+1):
  person = int(input())
  for n in range(N):
    if person != n+1:
      point[n] = point[n] - 1
      
  
for p in point:
  if p <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
input_data = input().split(" ")
N = int(input_data[0])
K = int(input_data[1])
Q = int(input_data[2])

point_list = [K]*N
d_point = [1]*N
d_point1 = [0]*N

for i in range(0,Q):
  t = int(input()) - 1
  d_point[t] = 0
  d_point1 = list(map(lambda x, y :x + y, d_point1,d_point))
  d_point[t] = 1
  if i == Q-1:
    for a in d_point1:
      if a >= K:
        print("No")
      else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
a = list(map(int, input().split()))
inp = []
for i in range(a[2]):
    inp.append(int(input()))
n_dict = {}
for i in range(a[0]):
    n_dict[i+1] = a[1]
for i in range(a[2]):
    for k , v in n_dict.items():
        if k != inp[i]:
            n_dict[k] -= 1
for kk , vv in n_dict.items():
    if int(vv) <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = (int(i) for i in input().split())
a_list = [int(input()) for i in range(q)] 

t_list = [k] * n
jun = 0
jun2 = 0
jun3 = 0

while(len(a_list)):
  while(len(t_list)):
    t_list[jun2] = t_list[jun2] - 1
    jun2 += 1
    if jun2 == len(t_list):
      break
  t_list[a_list[jun] - 1] = t_list[a_list[jun] - 1] + 1
  jun2 = 0
  jun +=1
  if jun == len(a_list):
    break

while(len(t_list)):
  if t_list[jun3] <= 0:
    print("No")
  else:
    print("Yes")
  jun3 += 1
  if jun3 == len(t_list):
    break

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int, input().split())
M=K-Q
A=[]
for i in range(0,Q):
    A.append(int(input()))
for i in range(0,N):
    if M+A.count(i+1)>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
a=tuple(a)
for i in range(1,n+1):
  if a.count(i)>q-k:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

for i in A:
    for j in range(N):
        if int(i) != j+1:
            score[j] -= 1
        else:
            pass

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

Submission status: Time Limit Exceeded

Solution code:
(N,K,Q) = map(int,list(input().split()))
ansed = []
for x in range(0,Q):
    ansed.append(int(input()))
for y in range(1,N+1):
    if K - Q + ansed.count(y) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

N_K = [K for i in range(N)]
for a in A:
    N_K = [n_k-1 if a-1 != i else n_k for i, n_k in enumerate(N_K)]

for n_k in N_K:
    if n_k <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
ps = [K]*N

ac = []
for i in range(Q):
    an = int(input())
    ps[an -1] += 1
    for j in range(len(ps)):
        ps[j] = ps[j] - 1
        
    
for k in ps:
    if k > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

if k>q:
    for i in range(n):
        print('Yes')
    exit()
else:
    for i in range(n):
        p[i]=a.count(i+1)
        if k+p[i]-q<=0:
            print('No')
        else:
            print('Yes')

Submission status: Time Limit Exceeded

Solution code:
NKQ = list(map(int, input().split()))
A = []
for i in range(NKQ[2]):
    A.append(int(input()))

for j in range(NKQ[0]):
    point = NKQ[1]
    for k in range(NKQ[2]):
        if A[k] != j+1:
            point = point - 1
    if point > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=[int(e) for e in input().split(' ')]
lA=[int(input()) for _ in range(Q)]

for i in range(N):
    if Q-lA.count(i+1) >= K:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
ans = [K]*N
def minus(n):
    return n-1
for i in range(1, Q+1):
    ans = list(map(minus, ans))
    ans[A[i-1]-1] += 1    
for k in ans:
    if k <= 0:
        print('No')
    else:
         print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A=[K]*N

for q in range(Q):
  win=int(input())
  for i in range(N):
    if i!=win-1:
      A[i]-=1

def hantei(x):
    if x >0:
        return('Yes')
    else:
        return('No')
      
for answer in map(hantei,A):
    print(answer)

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int,input().split())
Pass = [1] * N
Point = [K] * N
for i in range(Q):
    Point[int(input()) - 1] += 1
    for j in range(N):
        Point[j] -= 1
        if Point[j] <= 0:
            Pass[j] = 0
for i in range(N):
    print("Yes" if Pass[i] else "No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=list(int(input()) for i in range(q))

s=[k]*n

for j in range(q):
    s=[h-1 for h in s]
    s[a[j]-1]+=1
    
for m in range(n):
    if s[m]>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution 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
for i in range(n):
    for j in range(q):
        p[i]-=1
        if a[j]-1 == i:
            p[i]+=1


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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

for i in range(n):
  cnt = a.count(i+1)
  if k - q + cnt > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

A = []
    
for a in range(0, Q):
    A.append(input())

box = []

ii = 0
while True:
    box.append(K)
    ii += 1
    if ii == N:
        break
        
for i in range(0, Q):
    for k in range(1, N + 1):
        if A[i] == str(k):
            continue
        else:
            box[k - 1] = box[k - 1] - 1
    
for t in box:
    if t > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

A_list = []

#A
for i in range(Q):
    aaa =int(input())
    A_list.append(aaa)

#print(A_list)
point_list = [K]*N
#print(point_list)

#for i in A_list:
#     aaa=point_list.pop(i-1)
#     point_list = list(map(lambda x: x-1, point_list))
#     point_list.insert(i-1,aaa)

for i in range(Q):
    point_list = list(map(lambda x: x-1, point_list))

for i in A_list:
    point_list[i-1] =point_list[i-1]+1

#print(point_list)

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int,input().split())
Ans = [] * Q
Pass = [1] * N

Point = [K] * N
for i in range(Q):
    Point[int(input()) - 1] += 1
    for j in range(N):
        Point[j] -= 1
        if Point[j] <= 0:
            Pass[j] = 0
for i in range(N):
    print("Yes" if Pass[i] else "No")

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
list1=list(map(int,input().split()))
N=list1[0]
K=list1[1]
Q=list1[2]

dl=deque()
point=deque()

for i in range(N):
    point.append(K)

for i in range(Q):
    dl.append(int(input()))

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

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

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

Submission status: Time Limit Exceeded

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

for i in range (1,n+1,1):
    if  k - q + int(x.count(i))>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
i = input()
d = i.split()
N, K, Q = int(d[0]), int(d[1]), int(d[2])

p = [K]*N

for _ in range(Q):
    a = int(input())
    for n in range(N):
        if a != n+1:
            p[n] = p[n] - 1

for n in range(N):
    if p[n] > 0:
        print('Yes', end='')
    else:
        print('No', end='')
    if n != N-1:
        print()

Submission status: Time Limit Exceeded

Solution code:
answer = []


def point_check(num):
    for i in A_dic.keys():
        A_dic[i] -= 1
    A_dic[num] += 1


N, K, Q = map(int, input().split())
A_dic = {i: K for i in range(1, N + 1)}

for j in range(Q):
    answer.append(int(input()))

for l in answer:
    point_check(l)
# print(A_dic)

for k in A_dic.values():
    if k <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int,input().split())
b = list()
for i in range(q):
    a = int(input())
    b.append(a)
for j in range(1,n+1):
    c = b.count(j)
    if c < q-k+1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int, input().split())
A = [input() for i in range(Q)]
if K > Q :
  for i in range(N):
    print("Yes")
else :
  a = Q - K
  for i in range(N):
    s = str(i+1)
    X = A.count(s)
    if X <= a:
      print("No")
    else:
      print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def main():

    N, K, Q = map(int, input().split())
    player = np.array([K] * N)
    sub = np.array([-1] * N)
    A = [int(input()) for i in range(Q)]
    for i in range(Q):
        player[A[i] - 1] += 1
        player += sub
    for k in range(N):
        if player[k] <= 0:
            print("No")
        else:
            print("Yes")

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

answer = [int(input()) for _ in range(q)]

for i, _ in enumerate(range(n)):
    point = k - (q - answer.count(i + 1))

    if point > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
S = list(map(int,input().split()))
Num = S[2]
B = [S[1]]*S[0]
B = np.array(B)
for i in range(Num):
  B = B - 1
  temp = int(input()) - 1
  B[temp] = B[temp] + 1

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(1, Q+1)]
for i in range(1,N+1):
    if A.count(i) > (Q-K):
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = []
for i in range(Q):
    A += [input()]
B = []
B += [K-Q]*N
    
for i in range(Q):
    for j in range (N):
        if j == int(A[i]) - 1:
            B[j] += 1
            break
    
for i in range(N):
    if B[i] >= 1:
        print('Yes')
    if B[i] <= 0:
        print('No')

Submission status: Time Limit Exceeded

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

initial_point = [K] * N
import numpy as np
initial_point = np.array(initial_point)

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

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

Submission status: Time Limit Exceeded

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

P = [K] * N

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

Submission status: Time Limit Exceeded

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

for i in range(len(a)):
  for j in range(len(point)):
    if a[i] == j+1:
      continue
    point[j] -= 1
for b in range(len(point)):
  if point[b] <= 0:
    print('No')
  else:
    print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
total = nkq[1] - nkq[2]
hold_point = np.array([])
for i in range(nkq[0]):
    hold_point = np.insert(hold_point, i, total)
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

dif = K - Q
if dif > 0:
    for i in range(N):
        print('Yes')
else:
    for n in range(N):
        freq = A.count(n + 1)
        if dif + freq <= 0:
            print('No')
        else:
            print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
a = []
for i in range(0,Q):
  a.append(int(input()))
 
sc = [K] * N

for i in a:
  sc = [n-1 for n in sc]
  sc[i-1]=sc[i-1]+1
 
for i in sc:
  if i <=0:
     print("No")
  else:
     print("Yes")

Submission status: Time Limit Exceeded

Solution code:
tmp = input().split()
N = int(tmp[0])
K = int(tmp[1])
Q = int(tmp[2])

ns = []
for n in range(N):
    ns.append(K)

# print(ns)

for i in range(Q):
    a = input()
    a = int(a)-1

    for n in range(N):
        if n == a:
            continue
        else:
            ns[n] = ns[n]-1
    # print(ns)

for n in ns:
    if n > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
N,K,Q=map(int,input().split())
A=[]
for i in range(Q):
    A.append(int(input()))
P=Q-K
for i in range(N):
    if P>=(A.count(i+1)):
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

#正解者順リスト
al = [int(input()) for i in range(q)]

#このリストのindex+1が参加者ナンバーです
#みんなの持ち点
nl = []
for m in range(n):
    nl.append(k)

for r in range(q):
    for x in range(n):
        nl[x] = nl[x]-1
#とりあえず全員、全正解数＊-1点する作業

for y in al:
    nl[y-1] = nl[y-1]+1

for z in nl:
    if z > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

if k>q:
    for i in range(n):
        print('Yes')
    exit()
else:
    for i in range(n):
        p[i]=a.count(i+1)
        if k+p[i]-q>0:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A=[K] * N
for i in range(Q):
    c=int(input())
    for j in range(N):
        if j!=c-1:
            A[j]-=1 
for i in range(N):
    print("No") if A[i]<=0 else print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int,input().split())
b = list()
for i in range(q):
    a = int(input())
    b.append(a)
if k > q:
    for i in range(n):
        print('Yes')
else:
    for j in range(1,n+1):
        c = b.count(j)
        if c < q-k+1:
            print('No')
        else:
            print('Yes')

Submission status: Time Limit Exceeded

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

A = []
    
for a in range(0, Q):
    A.append(input())

box = []

ii = 0
while True:
    box.append(K)
    ii += 1
    if ii == N:
        break
        
for i in range(0, Q):
    for k in range(1, N + 1):
        if A[i] == str(k):
            continue
        else:
            box[k - 1] = box[k - 1] - 1
    
for t in box:
    if t > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

N_K = [K for i in range(N)]
for a in A:
    for j, n_k in enumerate(N_K):
        N_K[j] = n_k-1 if a-1 != j else n_k

for n_k in N_K:
    if n_k <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import collections

n, k, q = map(int,input().split())
b = list()
for i in range(q):
    a = int(input())
    b.append(a)
if k > q:
    for i in range(n):
        print('Yes')
else:
    for j in range(1,n+1):
        c = b.count(j)
        if c < q-k+1:
            print('No')
        else:
            print('Yes')

Submission status: Time Limit Exceeded

Solution 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')

for blah in ans:
	print(blah)

Submission status: Time Limit Exceeded

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

N_K = [K for i in range(N)]
for i, a in enumerate(A):
    for j, n_k in enumerate(N_K):
        N_K[j] = n_k-1 if a-1 != j else n_k

for k, n_k in enumerate(N_K):
    if n_k <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import sys

N,K,Q = map(int,input().split())
A_list = [int(sys.stdin.readline()) for i in range(Q)]

if K - Q > 0 :
	for i in range(N):
		print('Yes')
	sys.exit()

else:
	for i in range(N):
		if K - (Q-A_list.count(i+1)) > 0:
			print('Yes')
		else:
			print('No')

Submission status: Time Limit Exceeded

Solution code:
#C
n, k, q = map(int, input().split())
a = sorted([int(input()) for _ in range(q)])
j = 0
for i in range(n):
    count = a.count(i+1)
    if q - count >= k:
        print('No')
    else:
        print('Yes')
    a[:count] = []

Submission status: Time Limit Exceeded

Solution code:
n, k, q = [int(i) for i in input().split()]

adict = {i + 1: k for i in range(n)}

answer = [int(input()) for _ in range(q)]

for k, v in adict.items():
    adict[k] = v - (q - answer.count(k))

    if adict[k] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
Q_list=[input() for i in range(Q)]  



for i in range(1,N+1):
  a=Q_list.count(str(i))
  c=K-Q+a
  if c<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A=[K]*N

for q in range(Q):
  win=int(input())
  for i,j in enumerate(A):
    if i!=win-1:
      A[i]-=1

def hantei(x):
    if x >0:
        return('Yes')
    else:
        return('No')
      
for answer in map(hantei,A):
    print(answer)

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=list(int(input()) for i in range(q))

if k>q:
    for i in range(n):
        print('Yes')
else:
    for i in range(n):
        ans=a.count(i+1)
        if ans+k>q:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int, input().split())
mem = []
for i in range(q):
    mem.append(int(input()))
for i in range(1,n+1):
  if mem.count(int(i))+k>q:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = []
for i in range(Q):
    A += [input()]
B = []
for i in range(N):
    B += [K]
    
for i in range(Q):
    for j in range (N):
        if j == int(A[i]) - 1:
            B[j] += 1
            break
for i in range(N):
    B[i] -= Q
    
for i in range(N):
    if B[i] >= 1:
        print('Yes')
    if B[i] <= 0:
        print('No')

Submission status: Time Limit Exceeded

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


if K > Q:
    for i in range(N):
        print('Yes')
else:
    for n in range(N):
        freq = A.count(n + 1)
        if K - Q + freq <= 0:
            print('No')
        else:
            print('Yes')

Submission status: Time Limit Exceeded

Solution code:
inp = input ()

no_of_players, initial_point, no_of_matches = inp.split(' ')

initial_point = int(initial_point)

score_board = {}

winners = []

for k in range(0, int(no_of_matches)):
    winners.append(int(input()))

#setup
for i in range(0, int(no_of_players)):
    score_board[i+1] = initial_point

# print(score_board)

for n in range(0, int(no_of_matches)):
    winner = winners[n]
    new_score_board = {}
    for key, value in score_board.items():
        if key != winner:
            if value > 1:
                new_score_board[key] = score_board[key] - 1
        else:
            new_score_board[key] = score_board[key]
    score_board = new_score_board
    # print(score_board)

#finally
for j in range(0, int(no_of_players)):
    if j+1 in score_board:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
li = list(map(int,input().split()))
N = li[0]
K = li[1]
Q = li[2]
score = [K] * N
for i in range(Q):
    A_i = int(input())
    A_i -= 1
    score = map (lambda x: x - 1, score)
    score = list(score)
    score[A_i] += 1
index_num = 0
for i in range(N):
    if score[index_num] <= 0:
        print("No")
    else:
        print("Yes")
    index_num += 1

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Time Limit Exceeded

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

point = [k for i in range(n)]

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

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

Submission status: Time Limit Exceeded

Solution code:
a = []
a = input().split()
N = int(a[0])
K = int(a[1])
Q = int(a[2])

A = []

for i in range(Q) :
  A.append(input())
A = [int(n) for n in A]

Point = [K for i in range(N)]

for i in range(Q) :
  for j in range(N) :
    if j+1 == A[i] :
      Point[j] = Point[j]
    else :
      Point[j] = Point[j] - 1
#  print('Point', Point)

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

#print('N', N)
#print('K', K)
#print('Q', Q)
#print('A', A)
#print('Point', Point)

Submission status: Time Limit Exceeded

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

guests = [k] * n

for i in range(q):
    guests = list(map(lambda x: x - 1, guests))
    guests[a[i] - 1] += 1


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

Submission status: Time Limit Exceeded

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

N_point = []

A = []
for i in range(Q):
  A.append(int(input()))

for i in range(N):
  N_point.append(K)

def calc_hiku(n):
    return n - 1

for i in A:
  N_point = list(map(calc_hiku, N_point))
  N_point[i-1] = int(N_point[i-1]) + 1

for num in N_point:
  if num > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A=[]
for i in range(Q):
    A.append(int(input()))
P=Q-K
for i in range(N):
    if P>=(A.count(i+1)):
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

for i in range(n):
  cnt = a.count(i+1)
  if k - q + cnt > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

if k>q:
    for i in range(1,n+1):
        print('Yes')
    exit()
else:
    for i in range(n):
        p[i]=a.count(i+1)
        if k+p[i]-q>0:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
# print('N=', N, 'K=', K, 'Q=', Q)

participant_list = []
for i in range(N):
    participant_list.append(K)
# print(participant_list)

for i in range(Q):
#     print('num=', i)
    for i in range(N):
        participant_list[i] -= 1 
    answer = int(input()) - 1
    participant_list[answer] += 1
#     print(participant_list)

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!

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

point = []
for i in range(N):
    point.append(K)
    
for i in range(Q):
    correct_player = int(input())
    point = list(map(lambda x:x - 1, point))
    point[correct_player - 1] += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
hold_point = []
[hold_point.append(nkq[1]) for i in range(nkq[0])]
hold_point = np.array(hold_point)
for i in range(nkq[2]):
    hold_point = hold_point - 1
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
 
N, K, Q = map(int, input().split())
 
points = [K for _ in range(N)]
 
for q in range(Q):
    A = int(input()) - 1
    points = [p if i == A else p-1 for i, p in enumerate(points)]
for p in points:
    if p < 1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
a,b,c = input().split()
n = int(a)
K = int(b)
Q = int(c)
CAList = []
AllP = []
for i in range(0,Q):
    CAList.append(int(input()))

for j in range(0,n):
    AllP.append(K)

for k in range(0,Q):
    box = AllP[CAList[k]-1]
    for l in range(0,n):
        AllP[l] = AllP[l] - 1
    AllP[CAList[k]-1] = box
    
for m in range(0,n):
    if AllP[m] >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = [int(i) for i in input().split()]

adict = {i + 1: k for i in range(n)}

answer = [int(input()) for _ in range(q)]

for k, v in adict.items():
    if k not in answer:
        adict[k] = v - q
    else:
        adict[k] = v - (q - answer.count(k))

    if adict[k] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int, input().split())
arr = [k]*n
def ans(t):
	for i in range(n):
		if i == t:
			pass
		else:
			arr[i]-=1

for i in range(q):
	t = int(input())
	ans(t-1)

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