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)]
li = [k-q] * n

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

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

Submission status: Accepted

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

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

points = [None] * N
A = [None] * Q

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


counter = Counter(A)

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

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

Submission status: Accepted

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

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

for s in score:
    if(s-Q>0):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N, K, Q = map(int, input().split())
ctr = Counter(int(input()) for _ in range(Q))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.buffer.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
N,K,Q = map(int,input().split())
points = [K-Q]*N
for _ in range(Q):
    a = int(input())
    points[a-1] += 1
for i in points:
    if i > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))
n, k, q = map(int, input().split())
point = [0 for _ in range(n)]
for i in range(q):
    a = int(input())
    point[a - 1] += 1
for i in range(n):
    if q - point[i] < k:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力
n,k,q = map(int,input().split())
#変数point
point = [k-q]*n

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

for j in range(n):
    if point[j] > 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)]
from collections import Counter
a = Counter(a)
for i in range(1,n+1):
    if not i in a:
        a[i] = 0
for i in range(1,n+1):
    if k+a[i]-q >0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N ,K,Q = map(int,input().split())
arr = [K-Q for _ in range(N)]
for _ in range(Q):
	q = int(input())
	arr[q-1]+=1
for x in arr:
	if x<=0:
		print("No")
	else:
		print("Yes")

Submission status: Accepted

Solution code:
N,K,Q = map(int,input().split())
A = [0]*Q
for i in range(Q): A[i]=int(input())-1
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:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n,k,q = MI()

A = [0]*n
for i in range(q):
    c = I()
    A[c-1] += 1

for a in A:
    if q < k + a:
        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()) - 1
    point[A] += 1

for j in range(N):
    if point[j] > 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 i in range(n):
    if point[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import itertools

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

l=[0] * n

for _ 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 = []
for _ in range(Q): A.append(int(input()))

points = [K] * N
points = list(map(lambda x: x - Q, points))
for a in A:
    points[a - 1] += 1

# output: 0 opint => No, else => Yes
for p in points:
    if p > 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

HP = [0] * N

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

for i in range(N):
    if K - Q + HP[i] > 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 i in range(n):
  if a[i] > q - 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.append(int(input()))
point = [0]*N
for i in range(Q):
  point[A[i]-1] += 1

for i in range(N):
  if Q - point[i] < K:
    point[i] = 'Yes'
  else:
    point[i] = 'No' 

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

Submission status: Accepted

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

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

for b in ans:
    if b > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
NKQ = list(map(int, input().split()))
N = NKQ[0]
K = NKQ[1]
Q = NKQ[2]
corrCount = {}
for i in range(1,N+1):
    corrCount[i] = 0
As = []
for i in range(Q):
    As.append(int(input()))
minAnsCorr = Q - K + 1
for j in As:
    corrCount[j] += 1
for k in range(1,N+1):
    if corrCount[k] < minAnsCorr:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
n, k, q = map(int, input().split())
dd = {} #正解数
for i in range(n):
    dd[i+1] = 0
for i in range(q):
    temp = int(input())
    dd[temp] += 1

count  = 0
for i in range(n):
    if k - (q-dd[i+1]) >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)]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
A = [0]*(N+1)
for i in range(Q):
    A[int(input())]+=1
for i in range(1,N+1):
    a = K-(Q-A[i])
    print("Yes" if a>0 else "No")

Submission status: Accepted

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

for _ in range(Q):
    a=int(input())
    answer_count[a]+=1

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

Submission status: Accepted

Solution code:
from collections import defaultdict

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

num_correct = defaultdict(int)

for _ in range(Q):
  answerer = int(input()) - 1  # index に直す
  num_correct[answerer] += 1  
                                  
for i in range(N):
  if K - Q + num_correct[i] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest
from collections import Counter

def resolve():
    n, k, q = map(int, input().split())
    a = [int(input()) for _ in range(q)]

    counter = Counter(a)

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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """6 3 4
3
1
3
2"""
        output = """No
No
Yes
No
No
No"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """6 5 4
3
1
3
2"""
        output = """Yes
Yes
Yes
Yes
Yes
Yes"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """10 13 15
3
1
4
1
5
9
2
6
5
3
5
8
9
7
9"""
        output = """No
No
No
No
Yes
No
No
No
Yes
No"""
        self.assertIO(input, output)

if __name__ == "__main__":
    # unittest.main()
    resolve()

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:

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

for j in range(n):
    l[j]=l[j]-q
#print(l)
    
for b in range(q):    
    a=int(input())
    l[a-1]+=1

for c in range(n):
    if l[c]>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] * n
for i in a:
    p[i - 1] += 1

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

Submission status: Accepted

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

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

for s in s_list:
    print("Yes" if s - q + k > 0 else "No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n, k, q, *a = map(int, open(0).read().split())
a = map(lambda x: x - 1 , a)

answers = [0] * n
for i in a:
    answers[i] += 1

for i in range(n):
    num = k - (q - answers[i])
    if 0 < num:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import os

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

if __name__ == "__main__":
	main()

Submission status: Accepted

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

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


def solve(N: int, K: int, Q: int, A: "List[int]"):
    score = [0]*N

    for a in A:
        score[a-1]+=1
    
    for i in range(N):
        if K-Q+score[i]>0:
            print(YES)
        else:
            print(NO)
    
    return


# Generated by 1.1.6 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 main():
    N, K, Q = map(int, input().split())
    answer = [0]*N
    for _ in range(Q):
        ind = int(input())
        answer[ind-1] += 1
    for i in range(N):
        if answer[i] - Q + K > 0:
            print("Yes")
        else:
            print("No")
if __name__ == "__main__":
    main()

Submission status: Accepted

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


#
point_i =np.full(N,K) #参加者ごとのポイント　要素数、N   初期値,K

for i in A: #正解した人のポイント加算する
    #point_i = point_i -1
    point_i[i-1] +=1
#print(point_i)

point_i -= Q #全員、全問題数分のポイント減算

for i in point_i:
    if 0 < i:
        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 = [K - Q] * (N+1)
for a in A:
    point[a] += 1
for i in range(1, N+1):
    ans = 'Yes' if point[i]>0 else 'No'
    print(ans)

Submission status: Accepted

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

from collections import Counter
dic = Counter(aa)

cnt = 0
for i in range(1,n+1):
    if dic.get(i, 0) > q-k:
	    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=[0]*n
for i in a:
  p[i-1]+=1
for j in p:
  if k-(q-j)>0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k,q =map(int,input().split())
a_li = [int(input()) for _ in range(q)]
from collections import Counter
c = Counter(a_li)
for x in range(n):
    if q-k<0:
        print('Yes')
    else:
        if c[x+1]>q-k:
            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)]

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

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

Submission status: Accepted

Solution code:
import itertools
##print(ord("A"))
#n = int(input())
n,k,q = map(int,input().split())
#h = list(map(int,input().split()))	
ans_list=[input() for i in range(q)]
pnt_list = [k-q]*n
#print(pnt_list)
for i in range(q):

    pnt_list[int(ans_list[i])-1]+=1
#print(pnt_list)
for i in range(len(pnt_list)):
    if pnt_list[i]>0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

count = [0] * N
for j in range(Q):
    count[A[j]-1] +=1

#make
for k in range(N):
    make = Q-count[k]
    if make < K:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def main():
    n, k, q = map(int, input().split())
    point = [0]+[k-q]*n

    for a in range(q):
        point[int(input())] += 1

    for i in point[1:]:
        if i <= 0:
            print("No")
        else:
            print("Yes")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    result = [x + y for (x, y) in zip(point, point_add)]

    for i in result[1:]:
        if i <= 0:
            print("No")
        else:
            print("Yes")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
from collections import Counter

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

ans = [k - q for i in range(n)]
cnt = Counter(a)
for k, v in cnt.items():
  ans[k] += v

for ansi in ans:
  print("Yes" if ansi > 0 else "No")

Submission status: Accepted

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

a = [0] * Q
p = [K] * N

# 行数の入力
for i in range(Q):
    a[i] = int(input())
    p[a[i]-1] = p[a[i]-1] + 1

for j in range(N):
    if p[j] - Q > 0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter 

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

a_dic = Counter(a_inputs)

score_li = [k]*n
for key,value in a_dic.items():
    score_li[key]+=value
score_li = list(map(lambda x:x-q,score_li))

for member in score_li:
    if member<=0:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

p = [0]*n

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

Submission status: Accepted

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

for j in score_list:
    if j > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N,K,Q = map(int,input().split())
ANS = [0] * N
A = [int(input()) for _ in range(Q)]
for a in A:
  ANS[a-1] += 1
  
R = []
for i in range(N):
  p = K - Q + ANS[i]
  if p <= 0:
    R.append('No')
  else:
    R.append('Yes')
    
print('\n'.join(R))

Submission status: Accepted

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

Submission status: Accepted

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

p=[0]*n

for i in range(q):

  a=int(input())

  p[a-1]+=1

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

  if point>0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
# solution

n,m,k=map(int,input().split())
j=[m]*n

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

Submission status: Accepted

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

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


for i in range(n):
    if tokuten[i] <= 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)]
l=[k]*n
c=0
for i in range(q):
    l[a[i]-1]+=1
    c+=1
for i in range(n):
    if l[i]-c<=0:print('No')
    else:print('Yes')

Submission status: Accepted

Solution code:
from collections import defaultdict

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

base = K - Q

d = defaultdict(int)
for a in A:
    d[a] += 1

for i in range(N): 
    if base > 0:
        print('Yes')
    else:
        n = i + 1
        if base + d[n] > 0:
            print('Yes')
        else:
            print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

p = [k]*(n+1)

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

for x in p[1:]:
    print('Yes' if x > q else 'No')

Submission status: Accepted

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

score = [k-q]*n

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

for i in score:
  if i>=1:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

list_score=[0]*n

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

Submission status: Accepted

Solution code:
import sys
import numpy as np 

I = np.array(sys.stdin.read().split(), dtype=np.int32)
n, k, q = I[:3]; a = I[3:] - 1

def main():
    res = np.full(n, k, dtype=np.int32) - q
    res += np.bincount(a, minlength=n)
    ans = np.full(n, 'No', dtype='U3')
    ans[res > 0] = 'Yes'
    print(*ans, sep='\n')

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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