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: Runtime Error

Solution code:
n,k,q=map(int,input().split())
ns=range(n)
a=list([k for i in ns])
def asdfbgn(i):
  a=[a[i]-1 if i!=int(input())-1 else a[i] for i in ns]
  return 1
[asdfbgn(m)for m in range(q)]
print("\n".join(["No" if i<1 else "Yes" for i in a]))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
array = []
for i in range(c):
	array.append(input())
 
point = [b] * a
 
for i in range(c):
	for j in range(a):
		if j+1 != int(array[c]):
			point[j] = point[j] -1
            
for i in range(a):
	if point[i] > 0:
		print('Yes')
	else:
		print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

t1 = na()

q_count = t1[2]
point_list = [t1[1]] * t1[0]
import numpy as np
point_list = np.array(point_list)

for _ in range(q_count) :
  point_list = point_list - 1
  point_list[ni()] += 1

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

Submission status: Runtime Error

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

import numpy as np
T = K - Q
S = np.ones(N)*T

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

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

Submission status: Runtime Error

Solution code:
N,K,Q = map(int,input().split(' '))
A_i = list()
for k in range(Q):
    k = int(input())
    A_i.append(k)

First = [K-Q] * N

for i in A_i:
    First[i] += 1
for j in First:
    if j <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Runtime Error

Solution code:
import numpy as np

n = list(map(int, input().split()))

a = []

for i in range(n[2]):
    a.append(int(input()))

if n[1] > n[2]:
    for c in range(n[0):
            print('Yes')

else:
    m = [n[1]]*n[0]

    x = np.array(m)
    for j in range(n[2]):
        x -= 1
        x[a[j]-1] += 1

    for num in range(n[0]):
        if x[num] <= 0:
            print('No')
        else:
            print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

n = list(map(int, input().split()))

if n[1] > n[2]:
    for c in range(n[0):
            print('Yes')
else:
    a = []

    for i in range(n[2]):
        a.append(int(input()))

    m = [n[1]]*n[0]

    x = np.array(m)
    for j in range(n[2]):
        x -= 1
        x[a[j]-1] += 1

    for num in range(n[0]):
        if x[num] <= 0:
            print('No')
        else:
            print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-


obj = input().strip().split(' ')
N, K, Q = map(int, obj)

winner_list = []
for _ in range(Q):
    A_i = int(input().strip())
    winner_list.append(A_i)

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

for A_i in winner_list:
    point_list = [k if i == A_i else k - 1 for i in range(1, N + 1)]

is_win = [True if point_list[i] > 0 else False for i in range(N) ]

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

Submission status: Runtime Error

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

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

Point = [ 0 for _ in range(Q)]

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

for p in Point:
    if K - (K - p) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, intput().split())
array = []
for i in range(c):
	array.append(input())

point = [b] * a

for i in range(c):
	for j in range(a):
		if j+1 != int(array[c]):
			point[j] = point[j] -1
            
for i in range(a):
	if point[i] > 0:
		print('Yes')
	else:
		print('No')

Submission status: Runtime Error

Solution code:
get = list(map(int, input().split()))

N = get[0]
K = get[1]
Q = get[2]

point = [K]*N

for i in range(Q):
  A = input()
  A = int(A)
  for j in range(Q):
    if (A - 1) != j:
      point[j] += -1

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

Submission status: Runtime Error

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

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

ans_list = [K] * N

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

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

Submission status: Runtime Error

Solution code:
N, K, Q = map(int, input().split())
A = [list(map(int,input().split()))for i in range(n)]
point_list = [K]*N
for answer in A:
    point_list = list(map(lambda x: x-1, point_list))
    point_list[answer-1] += 1
    
for ans in point_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
import numpy as np

N, K, Q, *A, = map(int,map(lambda x: ''.join(sorted(x)), open(0).read().split()))
P = np.zeros(N)
for i in A:
    P[i - 1] += 1
for j in P:
    if K <= Q - j:
        print("No")
    else:
        print("Yes")

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys


def main():
    N, K, Q = map(int, input().split())
    score = np.ones(N*Q).reshape(Q,N)
    for i in range(Q):
        score[i,int(input())-1] = 0
    score = np.sum(score,axis=0).reshape(-1,)
    score -= K
    for i in range(N):
        if score[i] <0:
            print("Yes")
        else:
            print("No")








if __name__ =='__main__':
    main()

Submission status: Runtime Error

Solution code:
str = input()

split = str.split(" ")

Member = int(split[0])
Point = int(split[1])
Ans = int(split[2])
MemPoint = [0 for i in range(Member)]

for i in range(Ans):
  MemPoint[int(input())] += 1

maxNum = max(MemPoint)
for i in range(Menber):
  if maxNum == MemPoint[i]:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
n,k,q = list(map(int, input().split()))
a = [0]*q
for i in range(q):
    tmp = int(input())
    a[tmp-1] += 1

b = ["No"]*n
    

for i in range(n):
    if k - q + a[i] > 0 :
        b[i] = "Yes"

for i in range(n):
    print(b[i])

Submission status: Runtime Error

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

min_c = Q - K + 1

num = [0]*N

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

for j in num:
    if num[j] >= min_c:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

B = []
for j in range(1, N+1):
  sj = 0
  for k in range(Q):
    if j != A[k]:
      sj += 1
    if sj >= K:
      break
  if sj < K:
    B.append('Yes')
  else:
    B.append('No')

for l in range(len(B)):
  print(B[i])

Submission status: Runtime Error

Solution code:
def main():
    N, K, Q = [int(i) for i in input().split()]
    L = [0] * N
    Submits = [int(input()) for _ in range(Q)]

    for submit in Submits:
        L[submit] =  L[submit] + 1
    
    for chk in L:
        if K - Q + chk > 0:
            print("Yes")
        else:
            print("No")



if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def main():
  n,k,q = [int(x) for x in raw_input().split()]
  answers = [int(raw_input())-1 for x in xrange(q)]
  scores = [k,] * n
  
  for answer in answers:
    for i in xrange(q):
      if i != answer:
        scores[i] -= 1
  
  for score in scores:
    print("Yes" if score > 0 else "No")

main()

Submission status: Runtime Error

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

scores = []

for i in range(n):
  scores.append(n-k)

for i in range(q):
  a = int(input()) #Ai
  scores.insert(a-1, scores[a-1]+1)
  
  
for i in range(n):
  if(scores[i] > 0):
    print("Yes")
  elif:
    print("No")

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
  n, k, q = list(map(int, input().split()))
  A = [k-q]*n
  for _ in range(n):
    a = int(input())
    A[a-1] += 1

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

Submission status: Runtime Error

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

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

for l in ls:
    if l - Q > 0:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

an = [0] * n

for i in range(q):
    an[int(input())] += 1

ans = ["No","Yes"]

for j in range(n):
    print(ans[k-q+an[j]>0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k, q = map(int, input().split())
man = [0] * n
#合計正解数はq
for i in range(k):
    man[int(input()) - 1]+=1

for i in range(n):
    if k - (q - man[i]) >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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(participant):
  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: Runtime Error

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(participant):
  answer_person = int(input())
  tmp[answer_person-1] += 1
  tmp -= 1
  
for item in tmp:
  if item>0: print("Yes")
  else: print("No")

Submission status: Runtime Error

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

scores = []
def decrease(n):
  return n-1

for i in range(q):
  scores.append(k)

for i in range(n):
  a = int(input()) # Ai
  scores = map(decrease, scores) # -1 to all 
  scores[a-1] += 1

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

Submission status: Runtime Error

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

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

print(*map(lambda x:['No','Yes'][x>0],score),sep='\n')

Submission status: Runtime Error

Solution code:
f = open('input.txt', 'r')
sys.stdin = f

n, k, q = [ int(v) for v in input().split() ]
collect_list = [k-q for i in range(n)]

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


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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n,k,q = mi()
    alist = [0 for i in range(100005)]
    for i in range(q):
        a = ii()
        alist[a]+=1
   
  	for i in range(1,n+1):
        if alist[i] > q-k:
            print('Yes')
        else:
            print('No')
    


main()