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())

A_i = [int(input()) for _ in range(Q)]

for i in range(N):
    a = len(list(filter(lambda x: x == (i+1), A_i)))
    if (K-Q+a) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

a = []
for i in range(q):
    a.append(int(input()))
for j in a:
    nl = list(map(lambda x: x - 1, nl))
    nl[j-1] += 1
for k in range(n):
    if nl[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()))
print()

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

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


for i in  points:
		if i <= 0:
				print("No")
		else: 
				print("Yes")

Submission status: Time Limit Exceeded

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

    l = [K] * N

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

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


if __name__ == '__main__':
    p_c()

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
ans = ["Yes"] * N
ok = Q - K
for i in range(1, N + 1):
  sumA = A.count(i)
  if sumA <= ok:
    ans[i - 1] = "No"

for ANS in ans:
  print(ANS)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q = map(int,input().split())
Qlist = [int(input()) for _ in range(Q)]
Alist = np.full(N,K)
for i in Qlist:
    Alist[i-1]+=1
    Alist-=1
for A in Alist:
    print("Yes" if A>0 else "No")

Submission status: Time Limit Exceeded

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

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

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


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

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

Submission status: Time Limit Exceeded

Solution code:
#C

n, k, q = map(int, input().split())
a=[]
for i in range(q):
    ak = int(input())
    a.append(ak)
#print(a)

seikai = []
for j in range(n):
    #プレイヤーjの正解数を調べる
    ss = a.count(j+1)
    ten = k - q + ss
#    print(ss)
    if ten > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N,K,Q = map(int, input().split())
    res = [K]*N
    for _ in range(Q):
        a = int(input())
        a -= 1
        for n in range(N):
            if n != a:
                res[n] -= 1
    for x in res:
        if 0<x: print('Yes')
        else: print('No')

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]
for s in range(1, n+1):
	b = a.count(s)
	if b > 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())

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


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

for j in num:
    if j > 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 = int(input())
    A.append(a)

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:
#import heapq
#import itertools
#import math
#import numpy as np
#import sys

#N = int(input())
N, K, Q = list(map(int, input().split()))
A = [input() for _ in range(Q)]
#T = [list(map(int,input().split())) for _ in range(N)]
H = [K] * N
#print(A)
#print(H)
for a in A :
    for i in range(N) :
        if i == int(a) :
            pass
        else :
            H[i -1] -= 1
for h in H :
    if h > 0 :
        print('Yes')
    else :
        print('No')
#ans = ['Yes' if h > 0 else 'No' for h in H]
#for a
#print(ans)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

a = np.full(n, k)

for _ in range(q):
    seikaisha = int(input()) - 1
    a -= 1
    a[seikaisha] += 1

for sankasha_point in a:
    if sankasha_point > 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("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

ptsList = []
for i in range(N):
    ptsList.append(K-Q)

for i, Ai in enumerate(aList):
    AiPts = ptsList[Ai-1]
    AiPts += 1
    ptsList.pop(Ai-1)
    ptsList.insert(Ai-1, AiPts)

for i, e in enumerate(ptsList):
    if e > 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 _ in range(Q)]

players = np.array([K] * N)
for a in A:
    players = players - 1
    players[a-1] += 1
    
for p in players:
    if p > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
temp = list(map(int, input().split()))
N = temp[0]
K = temp[1]
Q = temp[2]
A = []
p = []
for i in range(N):
  p.append(K)
for i in range(Q):
  A.append(int(input())-1)
  for j in range(N):
    if(j != A[i]):
      p[j] -= 1
      
for i in range(N):
  if(p[i]>0):
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1, n+1):
    if q - point.count(i) < k:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]
N, K, Q = int_list[0], int_list[1], int_list[2]
A = []
for _ in range(Q):
    A.append( int(input()) )
point = [int(K)]*N
import numpy as np
point = np.array(point)
for ii in range(Q):
    point -= 1
    point[A[ii]-1] += 1
for ii in range(N):
    if point[ii] <= 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(q):
  a.append(int(input()))
for j in range(n):
  if k-q+(a.count(j+1))>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)]
point=np.array([k]*n)
for i in range(q):
    point[:a[i]-1]-=1
    point[a[i]:]-=1
for i in range(n):
    if point[i]<=0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int,input().split())
grid = []
for i in range(q):
    array = list(map(int, input().strip().split(' ')))
    grid.append(array)

winner = [grid[i][0]-1 for i in range(q)]

point = [k - (q - winner.count(i)) for i in range(n)]

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 = [int(input()) for i in range(q)]
for i in range(1,n+1):
    if a.count(i) <= q-k:
        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)]

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

Submission status: Time Limit Exceeded

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

def main():
    n,k,q = map(int,input().split())
    a=[int(input()) for _ in range(q)]
    point=[k for i in range(n)]
    for i in range(q):
        for j in range(n):
            if(j!=(a[i]-1) and point[j]>0):
                point[j]-=1
    
    for i in range(n):
        if(point[i]>0):
            print("Yes")
        else:
            print("No")

main()

Submission status: Time Limit Exceeded

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

arr = [k]*num


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


for i in range(len(arr)):
    if arr[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 = np.array([K] * N)
for q in range(Q):
    answered = int(input())
    A[answered - 1] += 1
    A = A - 1
    #print(A)

for item in A:
    if item <= 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):
  p=k-q+1*(a.count(i))
  if p>=1:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

tmp = [init_point]*participant

for i in range(correct):
  answer_person = int(input())
  tmp[answer_person-1] += 1
  tmp = [i-1 for i in tmp]
  
for item in tmp:
  if item>0: print("Yes")
  else: print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def main():
    N, K, Q = [int(x) for x in input().split()]
    X = np.array([K] * N)
    for _ in range(Q):
        X -= 1
        X[int(input())-1] += 1
    
    for x in X:
        if x > 0:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)

# input = sys.stdin.readline


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

    winners = []
    for w in range(q):
        winners.append(int(input()))

    score = [k] * n

    for w in winners:
        winner = w - 1

        for i in range(len(score)):
            score[i] -= 1

        score[winner] += 1

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


if __name__ == '__main__':
    main()

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())-1
    for j in range(N):
        if j!=a:
            A[j]=A[j]-1
for k in range(N):
    if A[k]>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]

N, K, Q = [int(i) for i in input().split(" ")]
As = [int(input()) for _ in range(Q)]
buff = [K for _ in range(N)]
for a in As:
  for i in range(N):
    # if buff[i] == 0: continue
    if i + 1 == a:
      buff[i] += 0
    else:
      buff[i] -= 1
for b in buff:
    if b > 0: print("Yes")
    else: print("No")

Submission status: Time Limit Exceeded

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

for i in range(Q) :
    a = int(input())
    for j in range(N) :
        if(j == a - 1) :
            pass
        else :
            P[j] -= 1

for i in range(N) :
    if(P[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())
point = np.array([k for _ in range(n)])
for _ in range(q):
    a = int(input())
    point -= 1
    point[a-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 = [K] * N
for q in range(Q):
    answered = int(input())
    A[answered - 1] += 1
    A = [_ - 1 for _ in A]
    #print(A)

for item in A:
    if item <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
p = [k]*n
a = []
ans = ['No'] * n

for i in range(q):
    a.append(int(input()))

for i in range(len(a)):
    idx = a[i] - 1
    for j in range(len(p)):
        if j != idx:
            p[j] = p[j] - 1


for i in range(len(p)):
    if p[i] > 0:
        ans[i] = 'Yes'

# print(p)
# print(a)
# print(ans)

for i in range(len(ans)):
    print(ans[i])

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):
  plus = A.count(i)
  if K - (Q-plus) <= 0:
    print("No")
  else:
    print("Yes")

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())

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 _ in range(q)]

border = q-k+1
for i in range(1, n+1):
    if a.count(i) >= border:
        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()))

ans=[K for _ in range(N)]
for q in A:
    ans=[i-1 for i in ans]
    ans[q-1]+=1
for a in ans:
    if a>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

score = np.full(n, k)

for _ in range(q):
    a = int(input())
    mask = np.ones(n, dtype=bool)
    mask[a-1] = False
    score[mask] = score[mask] - 1
    
for s in score:
    if s <= 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 = [0 for i in range(q)]
for i in range(q):
    a[i] = int(input())

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

for i in range(q):
    point = point - 1
    point[a[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())
a = []
for i in range(q):
  a.append(int(input()))
for i in range(n):
  temp = k-q+a.count(i+1)
  if temp>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)]

points=[k]*n
for a in A:
  for i in range(n):
    if a-1==i:
      pass
    else:
      points[i]-=1
for p in points:
  if p<=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)]
point=[k for i in range(n)]
for i in range(q):
    for j in range(n):
        if(j!=(a[i]-1)):
            point[j]-=1

for i in range(n):
    if(point[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 = []
p = np.zeros((n))
p += k
for i in range(q):
    a = int(input())

    p -= 1
    p[a-1] += 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 = (int(i) for i in input().split())
a = [int(input()) for i in range(q)]
score = np.ones(n) * k
minus = np.zeros(n)
for point in a:
  minus[point-1] += 1
  minus -= 1
final = score + minus
for f in final:
  if f > 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)]

point=[0]+[K for i in range(N)]
point=np.array(point)

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
import numpy as np

n,k,q = [int(x) for x in stdin.readline().rstrip().split()]
a_lst = []
p_lst = np.array([k] * n)

for i in range(q):
  a_lst.append(int(stdin.readline().rstrip()))
  
for i, a in enumerate(a_lst):
  p_lst[:a-1] -= 1
  p_lst[a:] -= 1
  
for p in p_lst:
  if p <=0:
    print('No')
  else:
    print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
p = [k] * n
for i in range(q):
  a = int(input())-1
  for j in range(n):
    if j != a:
      p[j] -= 1
for i in p:
  if 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())

Anslist = np.ones(N) * K
check = np.array(range(N))

for i in range(Q):
    a = int(input())
    Anslist[check != a-1] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int, raw_input().split())
P = [K]*N
for i in range(Q):
    A = int(raw_input())
    P[A-1] += 1
    P = map(lambda x:x-1, P)
    #print P

for p in P:
    #print p
    if p > 0:
        print "Yes"
    else:
        print "No"

Submission status: Time Limit Exceeded

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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


def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k, q = map(int,input().split())
l = [k-q] * 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")

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(N):
  if K - Q + getp[i] > 0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect as bi

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
B = [K]*N
p = 0
for i in range(N+1):
    A.append(i+1)
C = sorted(A)
for i in range(N):
    B[i] += bi.bisect_left(C,i+2) - p - 1
    p = bi.bisect_left(C,i+2)
for i in range(N):
    if(B[i] > Q):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

points = [K] * N

for a in A:
    points[a] += 1

for p in points:
    # print(p - Q)
    if p - Q > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(q):
  a = int(input())-1
  ans[a] += 1
  
for j in ans:
  if j > 0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    if i - Q > 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

for _ in range(q):
    winner_id = int(input()) - 1
    arr[winner_id] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k, q = [int(i) for i in input().split()]
dic = {}
for i in range(n):
  dic[i] = k 
for _ in range(q):
  dic[int(input())-1] += 1
for i in range(n):
  if dic[i] - q > 0:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

for a in A:
	party[a-1]+=1

for p in party:
	if p>0:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K, Q = map(int, input().split())
A = tuple([int(input()) for q in range(Q)])
# N人参加、初期状態で全員がKポイント
# 誰かが正解すると、それ以外の全員が1ポイント下がる
# i番目に正解したのはAi
counts = [0 for i in range(N)]
for a in A:
  counts[a-1] += 1

for i in range(N):
  print('Yes' if (K - (Q - counts[i])) >= 1 else 'No')

Submission status: Accepted

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

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


for j in range(N):
    if scores[j] + K - Q > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

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

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

d=[0]*n

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

for j in d:
    if j>q-k:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n,k,q = map(int, input().split())
p = np.full(n, k, dtype=np.int)
first = 0
for i in range(q):
    a = int(input())
    p -= 1
    p[a-1] += 1
for i in p:
    if i <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, K: int, Q: int, A: "List[int]"):
    p = [Q] * N
    for i in range(Q):
        p[A[i]-1] -= 1

    for i in range(N):
        if K - p[i]  > 0:
            print(YES)
        else:
            print(NO)

    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(Q)]  # type: "List[int]"
    solve(N, K, Q, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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