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:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    # 視点を変えて、num[i] := i人目が何問正解するか
    n,k,q = readInts()
    num = [0] * n
    for i in range(q):
        a = int(input()) - 1 # 0-based index
        num[a] += 1
    for i in range(n):
        points = k - (q - num[i]) # Q問中 num[i]問 正解なら、ポイント減少分はQ - num[i]
        if points <= 0:
            print('No')
        else:
            print('Yes')
if __name__ == '__main__':
  main()

Submission status: Accepted

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

for i in solve_number:
    print('Yes' if K - (Q-i) > 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

answers = [0] * N
for Ai in A:
    index = Ai - 1
    answers[index] += 1

border = Q - K
results = ['Yes' if answer > border else 'No' for answer in answers]
results = "\n".join(results)

print(results)

Submission status: Accepted

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

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


import collections

c = collections.Counter(ll)

for i in range(n):
  if c.get(i+1)==None:
    if p - a > 0:
      print("Yes")
    else:
      print("No")
    continue
  if a - c.get(i+1) >= p:
    print("No")
  else:
    print("Yes")

Submission status: Accepted

Solution code:
from collections import defaultdict

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k,q = map(int,input().split())
count = [0]*n
for i in range(q):
  a = int(input())
  count[a-1] += 1
for i in range(n):
  if k-q+count[i]>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()))
c = {i:0 for i in range(1,N+1)}
for i in A:
    c[i] += 1
P = [K-Q for _ in range(N)]
for i in range(N):
    P[i] += c[i+1]
for i in P:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

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

for i in a:
    point[i-1]+=1
    
for i in point:
    if 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)]
all_point = [K - Q]*N
x = 0
for a in A:
    all_point[a-1] += 1

for b in all_point:
    if b <= 0:
        all_point[x] = "No"
    else:
        all_point[x] = "Yes"
    x += 1

for c in all_point:
    print(c)

Submission status: Accepted

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

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
print('\n'.join('Yes' if l[i]-q+k>0 else 'No' for i in range(n)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(k) for k in input().split()]
#template
N,K,Q = inputlist()
A = [0]*Q
for i in range(Q):
    A[i] = int(input())
from collections import Counter
c = Counter(A)
for i in range(1,N+1):
    if K - Q + c[i] <= 0:
        print("No")
        continue
    print("Yes")

Submission status: Accepted

Solution code:
from time import time

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

    life = [0 for i in range(N)]

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

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

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

if __name__ == '__main__':
    start = time()
    main()
    # print(time() - start)

Submission status: Accepted

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

Submission status: Accepted

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

for j in ans:
    if q - j < k:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

a = {}

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

    if A in a.keys():
        a[A] += 1
    else:
        a[A] = 1

    K -= 1

count = 0

if K > 0:
    for i in range(N):
        print('Yes')
else:
    for i in range(N):
        if i in a.keys():
            if a[i] + K > 0:
                print('Yes')
            else:
                print('No')
        else:
            print('No')

Submission status: Accepted

Solution code:
def myAnswer(N:int,K:int,Q:int,A:dict) -> None:
   for user,point in A.items():
      if( K -  (Q - point) <= 0):
         print("No")
      else:
         print("Yes")



def modelAnswer():
   tmp=1
def main():
   N, K, Q = map(int,input().split())
   A = {key:0 for key in range(1,N+1)}
   for _ in range(Q):
      tmp=int(input())
      A[tmp]+=1
   myAnswer(N,K,Q,A)

if __name__ == '__main__':
   main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

S = np.array([ K-Q ] * N)

for i in range(Q):
    # a番目の人が正解
    a = int(input())
    S[a-1] += 1

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

Submission status: Accepted

Solution code:
n, k, q = map(int, input().split())
d = dict()
for i in range(n):
    d[i + 1] = 0
for i in range(q):
    d[int(input())] += 1
for i in range(n):
    print("YNeos"[(q - k) >= d[i + 1]::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from collections import Counter
n, k, q = (int(x) for x in input().split())
A = Counter([int(input()) for i in range(q)])
for i in range(n):
  print('Yes' if k - q + A[i+1] > 0 else 'No')

Submission status: Accepted

Solution code:
n,k,q=map(int,input().split())
l=[0]*n
for i in range(q):
    a=int(input())
    l[a-1]+=1
for j in range(n):
    l[j]+=(k-q)
for x in range(n):
    if l[x]>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):
	a=int(input())
	ans[a-1]+=1
for i in range(N):
	if ans[i]>0:
		print('Yes')
	else:
		print('No')

Submission status: Accepted

Solution code:
import sys
from collections import Counter
def input(): return sys.stdin.readline().rstrip()
def main():
    n,k,q=map(int,input().split())
    A=[int(input())for _ in range(q)]
    A_C=Counter(A)

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

if __name__=='__main__':
    main()

Submission status: Accepted

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

for i in range(n):
    if k - q + win[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)]
N_array = [K - Q] * N
for x in A:
    N_array[x - 1] += 1
for z in N_array:
    if z > 0:
        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_i = int(input())
    a[a_i - 1] += 1

for i, aa in enumerate(a):
    score = k - q + aa
    if score > 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 = {i:0 for i in range(1, n+1)}
for i in a:
    b[i] += 1

for i in range(1, n+1):
    print('Yes' if k - q + b[i] > 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

for p in P:
    if Q - p < K:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ma():return map(int,input().split())
def nli(x):return [int(input()) for _ in range(x)]
def hukusuu():
  listA=[] #appendのために宣言が必要
  while True:
    try:listA.append(list(map(int,input().split())))
    except:break #または、quit(),os.exit()をして止める。
  return listA

def ifif(s):
  if s:print("Yes")
  else:print("No")

n,k,q=ma()

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

for i in range(n):
  ifif(k-q+b[i]>0)

Submission status: Accepted

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

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

for _ in range(Q):
  k = int(input())
  L[k-1] +=1

s = sum(L)

for i in range(N):
  if K + L[i] -s <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Accepted

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

count = [0]*n_people

for i in range(n_ques):
  people = int(input())
  count[people-1] += 1

     
for i in range(n_people):
  if count[i] > n_ques-full_p:
    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)]
Points = [K-Q]*N
for i in A:
    Points[i-1] += 1
for j in Points:
    if j > 0:
        print("Yes")
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

#処理
B=[0 for i in range(N)]

for i in A:
    B[i]+=1

for i in B:
    if Q-i<K:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k,q = iim()
l = [k]*n
for i in range(q):
    p = ii()
    l[p-1] += 1

for j in l:
    if j < q+1:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
import sys
import numpy as np

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

score = [K - Q] * N

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

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

Submission status: Accepted

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

Submission status: Accepted

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

res = [0] * N

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

ans = [''] * N

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

Submission status: Accepted

Solution code:
# import sys
# sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
# 入力を整数に変換して受け取る
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

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


def solve():
    n, k, q = MI()
    A = [II() for _ in range(q)]

    ini = k-q
    point = [ini for _ in range(n)]
    for a in A.copy():
        point[int1(a)] += 1

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(n):
    ans.append(k - q + cnt[i])

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

Submission status: Accepted

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

p = [k for _ in range(n)]

for i in range(q):
    p[a[i]-1] += 1
    
for j in range(n):
    p[j] -= q
    
for k in range(n):
    if p[k] > 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)]
p = [k-q for _ in range(n)]
WIN = []
for i in range(q):
	p[a[i]-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())
C = dict([i+1, K - Q] for i in range(N))
for _ in range(Q):
    A = int(input())
    C[A] += 1
for v in C.values():
    print('Yes' if v > 0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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
ans_l=[K-Q]*N
for i in range(Q):
    #Al[i]=int(input())
    ans_l[int(input())-1]+=1
    


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# int(input()) # 入力が1つ
n, k, q = map(int, input().split()) # 入力が複数
A = [0] * n
for _ in range(q):
    m = int(input())
    A[m - 1] += 1

for i in range(n):
    A[i] = k - (q - A[i])

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

Submission status: Accepted

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

p = [k - q] * n

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

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

Submission status: Accepted

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(N+1):
      res[i] = 0
  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 res2:
    res[i] = -1
for i in range(1,N+1):
    if (res[i] == -1):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial, log, log10, log2
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  n, k, q = map(int, readline().split())
  A = [0]*n
  for i in range(q):
    a = int(input())
    A[a-1] += 1
  ans = 0
  for i in range(n):
    if A[i]>q-k:
      print('Yes')
    else:
      print('No')
  
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def check(s):
    for i in range(len(s)):
        if s[i] != s[len(s)-1-i]:
            return False
    return True

def main():
    n, k, q = rli()
    solve = [0 for _ in range(n+1)]
    for i in range(q):
        a = ri()
        solve[a] += 1
    for i in range(n):
        if k-q+solve[i+1] > 0:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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



if __name__ == '__main__':
    main()

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')
        
'''
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]

point_list=[k-q]*n
for i in range(q):
    point_list[a[i]-1]+=1

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

point_list=[k-q]*n
for i in range(q):
    point_list[a[i]-1]+=1

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

Submission status: Accepted

Solution code:
N,K,Q=map(int,input().split())
P=[K-Q]*N
for i in range(Q):
    P[int(input())-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())
P=[K-Q]*N
for i in range(Q):
    A=int(input())-1
    P[A]+=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(" "))
person = [K - Q for i in range(N)]
for i in range(Q):
  a = int(input())
  person[a - 1] += 1

print('\n'.join(['Yes' if i > 0 else 'No' for i in person]))

Submission status: Accepted

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

score = [k-q]*n

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

#print(score)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
n,k,q = map(int,input().split())
a=[]
for i in range(q):
    a.append(int(input()))
point=[k-q]*n
r=Counter(a)
for i,j in r.items():
    point[i-1] += j
for i in point:
    if i>0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
from collections import Counter
N,K,Q = map(int,input().split())
A = [int(input()) for _ in range(Q)]
data = [K-Q]*N
C = Counter(A)
for i,j in C.items():
  data[i-1] += j
for i in range(N):
  if data[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)]
point=[K-Q]*N
for i in A:
  i=int(i)
  point[i-1]+=1
for i in point:
  if i>0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for n in N_count:
    if K - (Q - n) > 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)]
answer = [0]*N

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

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

Submission status: Accepted

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

p = [K - (Q - ai) for ai in A[1:]]

for pi in p:
    print('YNeos'[pi < 1::2])

Submission status: Accepted

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

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

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