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: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

pt = [0] * n
for i in range(q):
    pt[int(input()) - 1] += 1

tmp = k - q
for i in range(n):
    if pt[i]  +tmp>0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

point=[0]*(N+1)
for i in range(Q):
    point[A[i]]+=1

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

point=[k-q+b[i] for i in range(n)]

for i in range(n):
    if(point[i]>=1):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline



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

    ans_list = [0]*(n+1)
    for _ in range(q):
        ans_list[int(input())] += 1

    norma = q - k

    for num in ans_list[1:]:
        if num > norma:
            print('Yes')
        else:
            print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

def main():
    N, K, Q = map(int, input().split())
    d = defaultdict(int)
    for _ in range(Q):
        A = int(input())
        d[A] += 1

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


main()

Submission status: Accepted

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


for e in As:
    success_counts[e-1] += 1

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    N, K, Q = LI()
    a_list = []
    for i in range(Q):
        a_list.append(II())

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

    for i in range(Q):
        a = a_list[i]
        aidx = a - 1
        score_list[aidx] += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# coding: utf-8
# Your code here!

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

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

for i in point_list:
    if k - (q - i) >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

S = [0] * N
for a in A:
    S[a-1] += 1

for i in range(N):
    if K - Q + S[i] > 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))

points = [0 for _ in range(N)]

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

for p in points:
    if K + p - Q > 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)]
ct=[0 for i in range(n)]
for i in range(q):
  ct[a[i]-1]+=1
for i in range(n):
  if k-(q-ct[i])>0:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

A = []
answered = [0 for i in range(0, N)]

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

for i in range(0, N):
    sub = Q - answered[i]
    if K - sub > 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)]

minus = [q for _ in range(n)]
for ai in a:
    minus[ai-1] -= 1

for i in range(n):
    if (minus[i] >= k):
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
def do():
    N, K, Q = map(int,input().split())
    A = []
    for i in range(Q):
        A.append(int(input()))
    
    A_p = [K]*N
    for i in range(Q):
        A_p[A[i]-1] += 1
    for i in range(N):
        if A_p[i] - Q <= 0:
            print('No')
        else:
            print('Yes')
    
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(Q):
	A[int(input()) - 1] += 1
for n in A:
	if n > Q - K:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

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

p = [k] * n

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

for i in range(n):
    if p[i] <= q:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n, k, q = LI()
    ans = [0 for i in range(n)]
    for i in range(q):
        a = II()
        ans[a-1] += 1
    for i, v in enumerate(ans):
        if k > (q - v):
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

x = [k] * n

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

for i in x:
    if i - q > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for i in range(N):
  p = c.get(i+1, 0)
  if p > Q-K:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC141
from collections import Counter


def main():
    N, K, Q, *A = map(int, open(0).read().split())
    C = Counter(A)
    ans = []
    for i in range(1, N + 1):
        x = "Yes" if K - Q + C[i] > 0 else "No"
        ans.append(x)
    print(*ans, sep="\n")


if __name__ == "__main__":
    main()

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 i in ans:
    if i > 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N, K, Q = MAP()
    B = [0] * N
    for i in range(Q):
        B[INT() - 1] += 1
    for nn in range(N):
        if Q - B[nn] >= K:
            No()
        else:
            Yes()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

score=[0]*n
for _ in range(q):
    a=int(input())
    score[a-1]+=1

for i in score:
    if q-i>=k:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

Solution code:
N,K,Q=[int(s) for s in input().split()]
ls=[0 for i in range(N)]
for i in range(Q):
  ls[int(input())-1]+=1
#print(ls)
for i in range(N):
  if K-(Q-ls[i]) <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
X = [0] * N
for _ in range(Q):
    a = int(input()) - 1
    X[a] += 1
for i in range(N):
    print("Yes" if X[i] > Q - K else "No")

Submission status: Accepted

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

point = [K-Q] * N

for i in range(Q):
  point[A[i] - 1] += 1
  #print(point)

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout

n, k, q = map(int, raw_input().strip().split())
quer = stdin.readlines()
out = []

freq = [0] * n

for line in quer:
    x = int(line.strip())
    freq[x - 1] += 1

for i in xrange(n):
    tot = k - (q - freq[i])
    if tot <= 0:
        out.append("No")
    else:
        out.append("Yes")

stdout.write("\n".join(out))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, K, Q, A):
    C = Counter(A)
    M = [K - Q] * N
    for k in range(1, N+1):
        v = C[k]
        M[k-1] += v
        if M[k-1] > 0:
            print('Yes')
        else:
            print('No')


def main():
    N, K, Q = read_int_n()
    A = [read_int() for _ in range(Q)]
    (slv(N, K, Q, A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,K,Q = MI()
    A = []
    for _ in range(Q):
        A.append(int(input()) -1 )
    
    ans = [Q-K]*N
    for a in A:
        ans[a] -= 1
    for a in ans:
        if a >= 0:
            print("No")
        else:
            print("Yes")
    #Q-K回は正解しないといけない
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

points = [k-q] * n
ans = []
for i in a:
    points[i-1] += 1

for i in range(n):
    if points[i] <= 0:
        ans.append("No")
    else:
        ans.append("Yes")

print("\n".join(ans))

Submission status: Accepted

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

for p in P:
    print("Yes" if K + p > 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(n):
    if k - q + cor[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

lst = [K-Q]*N

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

for i in range(N):
    if lst[i]>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 i in range(n):
  if l[i]>q-k:print("Yes")
  else:print("No")

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

res = [K-Q]*N
for a in A:
    res[a-1] += 1
for re in res:
    if re > 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

count = [0]*N
for i in range(Q):
    Ai = int(input())
    count[Ai-1] += 1

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

Submission status: Accepted

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 = defaultdict(int)
	for i in range(q):
		a[int(input())] += 1
	for i in range(1,n+1):
		suc = a[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:
from heapq import heappush, heappop
import queue
import re
import math
import functools

def s_raw():
    return input().rstrip("\r")

def int_raw():
    return int(input())


def ss_raw():
    return input().split()


def ints_raw():
    return list(map(int, ss_raw()))


INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    

def main():
    N,K,Q = ints_raw()
    As = [int_raw() for _ in range(Q)]
    Ps = [0]*N
    for a in As:
        Ps[a-1]+=1
    
    for p in Ps:
        if K-(Q-p)>0:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

n,k,q=map(int,input().split())
li=np.array([k]*n)
li2=np.array([0]*n)

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

for i in li3:
    if i>=1:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

A = []

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

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

for a in A:
    atariman = a - 1
    tokuten[atariman] += 1

for ten in tokuten:
    if ten > 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)]

P=[K]*N

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for v in V:
    print('Yes' if Q-v<K else 'No')

Submission status: Accepted

Solution code:
import sys
from collections import Counter

stdin = sys.stdin

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

n, k, q = na()
d = {k:0 for k in range(1, n+1)}
for i in range(q):
    num = ni()
    d[num] += 1
for key in sorted(d.keys()):
    if k - (q - d[key]) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

p=[0]*N

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n,k,q = map(int, input().split())
p = [0]*n

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

for a in p:
    if k-(q-a)>0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

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

score = [0 for _ in range(N)]
for a in A:
    score[a-1] += 1

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

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n
# a, b
# s = input()


N, K, Q = map(int, input().split())
dp = [K-Q]*(N+1)

for _ in range(Q):
    A = int(input())
    dp[A] += 1

for i in range(1, N+1):
    if dp[i] <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(1, N+1):
    ans = K + X[i] - Q
    if ans > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

N, K, Q = map(int, readline().split())
A = [int(readline()) for _ in range(Q)]
ans = [K-Q]*N
for a in A:
    ans[a-1] += 1
ans = ['Yes' if a > 0 else 'No' for a in ans]
print(*ans, sep = '\n')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    N, K, Q = map( int, input().split())
    A = [ int( input()) for _ in range(Q)]
    Point = [-Q]*N
    for a in A:
        Point[a-1] += 1
    for i in range(N):
        if K + Point[i] <= 0:
            print('No')
        else:
            print('Yes')
if __name__ == '__main__':
    main()