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:
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N,K,Q=MI()
A=[K]*N
q=[0]*Q
for i in range(Q):
    q[i]=II()

for x in q:
    for i in range(len(A)):
        if i != x-1:
            A[i] -=1
for a in A:
    if a >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)]

Point = []

for i in range(N):
    Point.append(K - Q + A.count(i+1))

    if 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)]

Point = []
Result = []

for i in range(N):
    Point.append(A.count(i+1))

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

for i in range(N):
    if Point[i] > 0:
        Result.append("Yes")
    else:
        Result.append("No")

for i in range(N):
    print(Result[i])

Submission status: Time Limit Exceeded

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

for i in a:
    sc = [j - 1 for j in sc]
    sc[i - 1]+=1
for j in sc:
    print('Yes' if j > 0 else 'No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
scores = [k] * n


for i in range(q):
    a = int(input())
    for j in range(len(scores)):
        if(j != a - 1):
            scores[j] -= 1

for i in scores:
    if(i <= 0):
        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-q] * n
for i in set(a):
    ans[i-1] += a.count(i)
for k in ans:
    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)]
for i in range(1, n+1):
    if k - q + a.count(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)]
ans=["No"]*n
for i in range(n):
    if a.count(i+1)>q-k:
        ans[i]="Yes"
for i in range(n):
    print(ans[i])

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A=[]
for i in range(Q):
    A.append(int(input()))
    
for j in range(1,N+1):
    count=0
    for k in A:
        if k==j:
            count+=1
    if K-(Q-count)>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)]
Z=[K for i in range(N)]
for i in A:
    for c in range(N):
        if c==i-1:
            continue
        else:
            Z[c]=Z[c]-1
for t in Z:
    if t<=0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n,k,q,*a=map(int,open(0).read().split())
for i in range(1,n+1):
  print('Yes' if k-q+a.count(i)>0 else 'No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

A_list = []

for _ in range(Q):
    A_list.append(int(input()))

for n in range(1, N + 1):
    n_lost_point = Q - A_list.count(n)
    if n_lost_point < K:
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#入力。参加者数N, 初期得点K ,正解数Q
N, K, Q = list(map(int,input().split()))
#入力。正解した人の番号A[i]
A = [None for _ in range(Q)]
for i in range(Q):
  A[i] = int(input())
#初期得点(hp)をリスト化。
hp = [K for _ in range(N)]
#まず他の人への攻撃力at(各人の正解数)を記録。
at = [0 for _ in range(N)]
#正解した人の攻撃力+1。
for i in range(Q):
  j = A[i]
  at[j-1] += 1
#攻撃力分の数を一度全員のhpからマイナスする。
for i in range(N):
  hp[i] -= sum(at)
#各々自分の攻撃力分は本来受けないはずのダメージなのでhpに戻す(足す)。
for i in range(N):
  hp[i] += at[i]
#結果(生き残り判定)
for i in range(N):
  if hp[i] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n,k,q = MI()

A = [k]*n
for i in range(q):
    c = I()
    A = list(map(lambda x: x-1, A))
    A[c-1] += 1

for a in A:
    if a > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

for a in A:
    ans = list(map(lambda x: x-1, ans))
    ans[a-1] += 1

for b in ans:
    if b > 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)]

score = [k-q for i in range(n)]
for i in a:
    for j in range(len(score)):
        if j == i-1:
            score[j] = score[j]+1
            pass

for i in score:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

score = [k for i in range(n)]
for i in a:
    for j in range(len(score)):
        if j != i-1:
            score[j] = score[j]-1

for i in score:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def scoredown(n):
    return n-1

N, K, q=map(int, input().split())
a=[int(input()) for i in range(q)]
score=[K]*N

for i in range(q):
    score=list(map(scoredown, score))
    score[a[i]-1]+=1

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

Submission status: Time Limit Exceeded

Solution code:
# 初期入力
import numpy as np
N,K,Q = (int(x) for x in input().split())
A = [int(input()) for i in range(Q)] 


#
point_i =np.full(N,K) #要素数、N   初期値,K

for i in A:
    point_i = point_i -1
    point_i[i-1] +=1

for i in point_i:
    if 0 < i:
        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)]

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

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

Submission status: Time Limit Exceeded

Solution code:
import itertools
##print(ord("A"))
#n = int(input())
n,k,q = map(int,input().split())
#h = list(map(int,input().split()))	
ans_list=[input() for i in range(q)]
pnt_list = [k]*n
#print(pnt_list)
for i in range(q):
    #print(pnt_list)
    for j in range(n):
    
        if ans_list[i]==str(j+1):
            pass
        else:
            pnt_list[j]=pnt_list[j]-1
for i in range(len(pnt_list)):
    if pnt_list[i]>0:
        print("Yes")
    else:
        print("No")
#print(pnt_list)

Submission status: Time Limit Exceeded

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

ans_li = [True]*n
score_li = [k]*n


for a in a_inputs:
    score_li[a]+=1
    score_li = list(map(lambda x:x-1,score_li))
    for i in range(n):
        if score_li[i]<=0:
            ans_li[i]=False

for member in ans_li:
    if member:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
score_card = [k for _ in range(n)]
for i in range(q):
    tmp = int(input())
    for j in range(len(score_card)):
        if j + 1 == tmp:
            pass
        else:
            score_card[j] = score_card[j] - 1

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

Submission status: Time Limit Exceeded

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

for i in range(q):
    a = int(input())
    for i in range(n):
        if i == a-1:
            tokuten[i] += 1


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

Submission status: Time Limit Exceeded

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K, Q = MAP()
A = [INT() for _ in range(Q)]
Score = [K]*N

for i in range(1, N+1):
  Score[i-1] -= Q - A.count(i)
  print("Yes" if Score[i-1] > 0 else "No")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
tokuten = [k]*n

for i in range(q):
    a = int(input())
    for j in range(n):
        if j != a-1:
            tokuten[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import  numpy as np
n,k,q = map(int,input().split())
a = []
while True:
  try:
    a.append(int(input()))
  except:
    break

score = np.ones(n)*k

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

for i in score:
  if i>=1:
    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()))

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.append(int(input()))

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:
import numpy as np
n,k,q = map(int,input().split())
A = []
for i in range(q):
    A.append(int(input()))

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())
l=[input() for i in range(Q)]

for j in range(1,N+1):
    if K+l.count(str(j))-Q > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n,p,a = map(int,input().split())

ll = [int(input()) for i in range(a)]

l=[]
for i in range(n):
  l.append(p)

for j in ll:
  for i in range(n):
    if i != j-1:
      l[i] = l[i]-1
      
for i in l:
  if i <=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,q,m=map(int,input().split())
l=[]
for i in range(m):
    a=int(input())
    l.append(a)
# l1=set(l)
for i in range(1,n+1):
    if (l.count(i)+q-m)<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,q,m=map(int,input().split())
l=[]
for i in range(m):
    a=int(input())
    l.append(a)
l1=set(l)
for i in range(1,n+1):
    if (l.count(i)+q-m)<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

a = [K]*N


for i in range(Q):
    A = int(input())

    a[A-1] += 1

    a = list(map(lambda x: x-1, a))

for i in a:
    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 _ in range(q)]
d = [a.count(i) for i in range(1, n + 1)]
for i in d:
    print("YNeos"[k - q + i < 1::2])

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]
for i in range(1, n + 1):
    print("YNeos"[k - q + a.count(i) < 1::2])

Submission status: Time Limit Exceeded

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

s = [k] * n
for i in range(q):
    for j in range(n):
        if a[i] != j:
            s[j] -= 1

for i in range(n):
    if s[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 = [int(input()) for i in range(Q)]
N_array = [K] * N
np = np.array(N_array)
for x in A:
    np -= 1
    np[x - 1] += 1
for z in np:
    if z > 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):
  x=int(input())-1
  d=[1]*n
  a = [x - y for (x, y) in zip(a,d)]
  a[x]+=1
for i in range(n):
  if a[i]>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):
  x=int(input())
  a.append(x-1)

C=[0]*n
for i in range(n):
  C[i]=a.count(i)
  if k-(q-C[i])>0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
n_people, full_p, n_ques = map(int, input().split())

point = [full_p]*n_people

for i in range(n_ques):
  people = int(input())
  for j in range(n_people):
    if (j+1) != people: point[j] -= 1
      
for i in range(n_people):
  if 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 _ in range(Q)]
point = [K-Q for _ in range(N)]
for i in range(1, N+1):
    point[i-1] = point[i-1] + A.count(i)
    print('Yes' if point[i-1]>0 else 'No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import collections
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K,Q=nm()
Al=[0]*Q
for i in range(Q):
    Al[i]=int(input())



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

Submission status: Time Limit Exceeded

Solution code:
import sys
import collections
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K,Q=nm()
Al=[0]*Q
for i in range(Q):
    Al[i]=ni()



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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
N,K,Q = map(int,input().split())
if K > Q:
    for i in range(N):
        print('Yes')
    sys.exit(0)
else:
  res = dict()
  for i in range(Q):
    answ = int(input())
    if answ not in res:
      res[answ] = 0
    res[answ] += 1
res2 = []
for key in res:
    if res[key] >= (Q-K+1):
        res2.append(key)
for i in range(1,N+1):
  if i in res2:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys
N,K,Q = map(int,input().split())
if K > Q:
    for i in range(N):
        print('Yes')
    sys.exit(0)
else:
  res = dict()
  for i in range(Q):
    answ = int(input())
    if answ not in res:
      res[answ] = 0
    res[answ] += 1
res2 = [answ[0] for answ in res.items() if answ[1] >= (Q-K+1)]
for i in range(1,N+1):
  if i in res2:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

for i in range(Q):
    A = int(input())-1
    for j in range(N):
        if j == A:
            continue
        scores[j] -= 1

for k in range(N):
    if scores[k] > 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()))

point=[k]*n

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

for i in point:
    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 _ in range(Q)]
data = [K]*N
for q in range(Q):
  data = list(map(lambda x: x - 1, data))
  data[A[q]-1] += 1
for i in range(N):
  if data[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)]
point=[K]*N
for i in A:
  i=int(i)
  point=list(map(lambda x: x-1,point))
  point[i-1]+=1
for i in point:
  if 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 = [0]*Q
for i in range(Q):
    A[i] = int(input())
B = [K]*N    
n_a = np.array(B)
for i in range(Q):
    n_a -= 1
    n_a[A[i]-1] += 1
    
ans = n_a.tolist()

for i in ans:
    print("No" if i<1 else "Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


#print(N,K,Q,A)
'''
score=[K]*N

for answer in A:
    score=[point-1 for point in score]
    score[answer-1]+=1
    print(score)

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

Submission status: Time Limit Exceeded

Solution code:
#ABC 141
N, K, Q = map(int, input().split())
A = [int(input())-1 for i in range(Q)]
score = [K for i in range(N)]

for a in A:
	for i in range(N):
		if i == a:
			continue
		else:
			score[i] -= 1

# 勝ち抜けチェック 
for i in range(N):
	if score[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 _ in range(q)]
for i in range(n):
  pt = k
  pl = a.count(i+1)
  if pl > 0:
    pt = pt - q + pl
  else:
    pt -= q
  if pt > 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()))
for i in range(1,N+1):
  if K > Q - A.count(i):
    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 = [k for _ in range(n)]

for s in a:
  p = list(map(lambda x: x -1, p))
  p[s-1] = p[s-1] + 1

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
quiz = [int(input()) for i in range(q)]
point = [k]*n
for i in quiz:
  point = list(map(lambda x: x-1, point))
  point[i-1] += 1
[print("Yes") if i > 0 else print("No") for i in point]

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
quiz = [int(input()) for i in range(q)]
point = [k]*n
for i in quiz:
  a = point[i-1]
  point = list(map(lambda x:x-1, point))
  point[i-1] = a
for j in point:
  if j > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

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

    process=[K]*N
    for i in range(Q):
        for j in range(N):
            if A[i]-1!=j:
                process[j]-=1
    for i in process:
        if i<=0:
            print('No')
        else:
            print('Yes')


resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
mylist=[]
pointlist=[]
for i in range(Q):
    mylist.append(int(input()))
    
#print(N,K,Q)    
#print(mylist)

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

i=0
while i<Q:
    winner=mylist[i]-1
    #winner以外のポイントを減らす
    for j in range(N):
        if j==winner: #jがwinnerの番号のときは何もしない
            pass
        else:
            pointlist[j]-=1
    #print(i)
    #print(pointlist)
    i+=1
    
for i in range(N):
    if pointlist[i]<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
points = [k] * n

for i in range(q):
    a = int(input()) - 1
    for j in range(n):
        if j != a:
            points[j] -= 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
stdin = sys.stdin
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

N, K, Q = na()
A = [0 for _ in range(N)]
for _ in range(Q):
    a = ni()
    A[a-1] += 1
for i in range(N):
    if sum(A) - A[i] < K:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n, k, q = map(int, input().split())
l = [int(input()) for i in range(q)]
ls = np.array([k]*n)
for i in l:
    ls[:i-1] -= 1
    ls[i:] -= 1
for i in range(n):
    if ls[i]>0:
        print('Yes')
    else :
        print('No')

Submission status: Time Limit Exceeded

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

for i in A:
    points = list(map(lambda x:x-1,points))
    points[int(i)-1] += 1

for i in points:
    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(q)]

for i in range(n):
    a=A.count(i+1)
    ans=k-q+a
    if ans>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)]
li=[k for i in range(n)]
for i in range(q):
    for j in range(n):
        if A[i]!=j+1:
            li[j]=li[j]-1
for i in range(n):
    if li[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)]
import numpy as np

all_score = np.array([k for _ in range(n)])
for i in a:
    all_score -= 1
    all_score[i - 1] += 1

for j in all_score:
    if j > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q = map(int, input().split(" "))

List = np.array([K]*N)

for i in range(Q):
  diff = np.array([1]*N)
  n = int(input())
  diff[n-1] = 0
  List-=diff

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

Submission status: Time Limit Exceeded

Solution code:
num, point, ques = list(map(int, input().split(" ")))
ans_list = []
point_list = []

for i in range(ques):
    ans_list.append(int(input()))

for i in range(num):
    point_list.append(point)

for ans in ans_list:
    point_list[ans-1]+=1
    for i in range(num):
        point_list[i] -= 1

for i in range(num):
    if(point_list[i]<=0):
        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)]

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

Submission status: Time Limit Exceeded

Solution code:

n,k,q = map(int,input().split())
point = [k] * n

for i in range(q):
    a = int(input())
#    print(a)
    for j in range(n):
        if j+1 != a:
            point[j] -= 1
#    print(point)

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

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    N, K, Q = map(int, input().split())
    A_list = []
    for i in range(Q):
        A_list.append(int(input()))
    point_list = [K] * N

    for i in range(len(A_list)):
        point_list = list(map(one_minus, point_list))
        index = A_list[i] - 1
        point_list[index] += 1

    for i in point_list:
        if i < 1:
            print('No')
        else:
            print('Yes')

def one_minus(n):
    return n - 1

if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
n,k,q = map(int, input().split())
a = [int(input()) for _ in range(q)]
start = [k-q]*n
points = deque(start)
for i in set(a):
    points[i-1] += a.count(i)
for _ in range(len(points)):
  x = points.popleft()
  if x <= 0:
    print('No')
  else:
    print('Yes')