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: Wrong Answer

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

for A in As:
  if A == 1:
    Points[1] = Points[1]  + 1
  elif A == N:
    Points[0] = Points[0] + 1
    Points[N-1] = Points[N-1] - 1
  else:
    Points[0] = Points[0] + 1
    Points[A-1] = Points[A-1] - 1
    Points[A] = Points[A] + 1

for i in range(N):
  Points[i+1] = Points[i+1] + Points[i]
print(Points)

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

Submission status: Wrong Answer

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

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

for i in range(n[0]):
    if n[1]-(n[2]-a.count(i)) <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

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

l=[]
for i in range(q):
    x = int(input())
    l.append(x)

p = np.array([k - q] * n)
pp = np.array([0] * n)

for i in range(q):
    index = l[i] - 1
    pp[index] += 1

xx = p + pp
print(xx)

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

Submission status: Wrong Answer

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

score = [0] * n

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

Submission status: Wrong Answer

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

if k >= q:
    print(n)
    exit()

ans = 0
for i in range(1, n + 1):
    if q - a.count(i) < k:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

h = {}
for i in range(N):
    h[str(i+1)] = 0

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

for k, v in h.items():
    tmp = Q - v
    h[k] = K - tmp

for k, v in h.items():
    if v > 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]
N, K, Q = int_list[0], int_list[1], int_list[2]
A = []
for _ in range(Q):
    A.append( int(input()) )
point = [int(K)]*N
import numpy as np
point = np.array(point)
for ii in range(Q):
    point[A[ii]-1] += 1
point -= Q
print(point)
for ii in range(N):
    if point[ii] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

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

scores=[0 for i in range(n)]

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

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

Submission status: Wrong Answer

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

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

print(point)


for p in point:
    if p >= (q - k) + 1:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import re

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

scores=[0 for i in range(n)]

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

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

Submission status: Wrong Answer

Solution code:
import collections

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

c=collections.Counter(a)
print(c)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

arr = [0]*num


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

print(arr)
arr = [i-(q-k) for i in arr]

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

Submission status: Wrong Answer

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

n_points = [0 for _ in range(n)]

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

print(n_points)
for n_point in n_points:
    if n_point + k > q:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# print(n,k,q, a)

points = {i:0 for i in range(n)}

# print(points)
for ai in a:
    points[ai-1] += 1

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

Submission status: Wrong Answer

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]
N, K, Q = int_list[0], int_list[1], int_list[2]
A = []
for _ in range(Q):
    A.append( int(input()) )
point = [int(K)]*N
import numpy as np
point = np.array(point)
for ii in range(Q):
    point[A[ii]-1] += 1
point -= -Q
for ii in range(N):
    if point[ii] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
import sys


def main():
    n, k, q = [int(s) for s in sys.stdin.readline().strip().split()]
    a = [0] * q
    for i in range(q):
        a[i] = int(sys.stdin.readline().strip()) - 1

    scores = [0] * n
    for ai in a:
        scores[ai] += 1

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


main()

Submission status: Wrong Answer

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

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

for i in range(Q):
    for j in range(N):
        if j != a[i]:
            count[j] = count[j] - 1
for i in range(N):
    if count[i] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
# ABC141c
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

sanka = [k]*n

for i in a:
    sanka[i-1] += 1
    for j in range(n):
        sanka[j] -= 1
print(sanka)

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

Submission status: Wrong Answer

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

l=[]
for i in range(q):
    x = int(input())
    l.append(x)

p = np.array([k - q] * n)
pp = np.array([0] * n)

for i in range(q):
    index = l[i] - 1
    pp[index] += 1

xx = p + pp

for i in range(len(xx)):
    if xx[i] >= 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

status = [0]*N

input = sys.stdin.readline

need_win = Q-K

if (Q-K)<0:
    for _ in range(N):
        print('Yes')
        exit(0)

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

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

Submission status: Wrong Answer

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

for A in As:
  if A == 1:
    Points[1] = Points[1]  + 1
  elif A == N:
    Points[N-1] = Points[N-1] + 1
  else:
    Points[0] = Points[0] + 1
    Points[A-1] = Points[A-1] - 1
    Points[A] = Points[A] + 1

for i in range(N):
  Points[i+1] = Points[i+1] + Points[i]

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

Submission status: Wrong Answer

Solution code:
import sys

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

status = [0]*N

input = sys.stdin.readline

need_win = Q-K

if (Q-K)<1:
    for _ in range(N):
        print('Yes')
        exit(0)

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

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

Submission status: Wrong Answer

Solution code:
def acinput():
    return list(map(int, input().split(" ")))


N,K,Q=acinput()
a=[]
for i in range(Q):
    a.append(int(input()))

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

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

for i in range(N):
    if score[i]<=0:
        print("No")
    else:
        print("yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

def solve():
    points = [0 for _ in range(N)]
    for a in A:
        points[a] += 1
    sum_points = sum(points)
    print(points)
    print(sum_points)
    for p in points:
        if sum_points - p >= K:
            print('No')
        else:
            print('Yes')

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
n, k, q = map(int, input().split())
whois = [int(input()) for i in range(q)]
users = {x: k for x in range(1, n+1)}
for w in whois:
    for user in list(users):
        if w != user:
            users[user] -= 1

max_ = max(users.values())

for key in range(1, n+1):
    value = users[key]
    if value <= 0:
        print('No')
    elif value == max_:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(score)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# エントリーポイント
def main():
    N, K, Q = input([int, 3])
    A = input([int, Q])

    ps = [0] * (N + 1)
    max_p = 0
    for a in A:
        ps[a] += 1
        max_p = max(max_p, ps[a])
    print(max_p)
    print(ps)
    
    for p in ps[1:]:
        if p <= (Q - K):
            print("No")
        else:
            print("Yes")
    return

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Wrong Answer

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

res = [0]*n

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

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

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

n,k,q = readmi()
t = [0] * n
for i in range(q):
    s = readi()
    t[s - 1] += 1
print(t)
for i in t:
    p = k - q + i
    if p >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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: Wrong Answer

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

B = [0 for i in range(N)]
for a in A:
    B[a-1]+=1
    
for b in B:
    if K-(Q-2*b) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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
	print(a)
	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: Wrong Answer

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

for i in range(N):
    if point[i] > 0:
        print("YES")
    else:
        print("NO")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
def quiz(N,K,Q):
    if K>Q:
        for ans in range(N):
            print('Yes')
    else:
        an=[]
        for qui in range(Q):
            an.append(int(input()))
        po=(Q+1)-K
        for su in range(1,N+1):
            if an.count(su) >=po:
                print('Yes')
            else:
                print('No')
N,K,Q=map(int,input().split())
quiz(N,K,Q)

Submission status: Time Limit Exceeded

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

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


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

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

    return


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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
def calc(n):
    return n-1
for i in range(n):
  ans.append(k)
for i in range(q):
  ans = list(map(calc, ans))
  ans[a[i]-1]+= 1

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
for i in range(n):
  ans.append(k)
for i in range(q):
  for j in range(n):
    if a[i] != j +1:
      ans[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

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

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

Submission status: Time Limit Exceeded

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

A = np.zeros(n, dtype= int)
B = np.array([1]*n)

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

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    if k-q+a.count(i+1) >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
A = []
def minus(n):
    return n-1
for _ in range(Q):
    A.append(int(input()))#縦入力
Nlist = []
for i in range(N):
    Nlist.append(K)
for j in range(0,Q):
    Nlist = list(map(minus,Nlist))
    Nlist[A[j]-1] += 1
for k in range(0,N):
    if Nlist[k]>=1:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

    point = [k] * n

    for i in range(q):
        point = list(map(lambda x: x - 1, point))
        point[a[i]-1] += 1

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

L = []

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

p = np.ones(N)*K
for i in range(Q):
  p -= 1
  p[A[i]-1] += 1
  
for i in range(N):
  if p[i] > 0: print('Yes')
  else: print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
import sys
input = sys.stdin.readline
A = [K] * N
def calc(n):
  return n-1
for i in range(Q):
  M = int(input().rstrip())
  A = list(map(calc, A))
  A[M-1] += 1
for k in A:
  if k <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

for i in range(Q):
    a=int(input())
    for j in range(N):
        if a-1!=j:
            arr[j]-=1
for i in arr:
    if i>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = list(map(int, input().split()))
p = [k] * n
for _ in range(q):
    a = int(input())
    for j in range(n):
        if j != a - 1:
            p[j] -= 1
for c in p:
    print('Yes' if c > 0 else 'No')

Submission status: Time Limit Exceeded

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

start = [K] * N

for i in range(Q):
  a = int(input())
  for j in range(N):
    if j == a-1:
      start[j] += 0
    else:
      start[j] -= 1
        
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    print("Yes" if a.count(i)+point>0 else "No")

Submission status: Time Limit Exceeded

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

for i in range(n):
    print("Yes" if point[i]+a.count(i)>0 else "No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
 
ans = [K]*N
 
for i in range(Q):
  A = int(input())
  
  
  for j in range(N):
    if j != (A-1):
      if ans[j] > 0:
        ans[j] -= 1

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

Submission status: Time Limit Exceeded

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

ans = [K]*N

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

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
  m1 = [x-1 for x in m]
  a = int(input())
  m1[a-1] += 1
  m = m1
  
for b in m1:
  if b >0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

for i in range(1,n+1):
  ans=k
  for que in l:
    if que!=i:
      ans-=1
  if ans<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

    for i in a:
        for key in d.keys():
            if (i-1) != key:
                d[key] -= 1

    for value in d.values():
        print("Yes" if value > 0 else "No")
        
main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    p[i] += a.count(i)
    
for j in range(1, n + 1):
    if p[j] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

a = sorted(a)

for i in range(1, n + 1):
    p.append(a.count(i))
    
for j in range(1, n + 1):
    if k - (q - p[j]) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    p.append(a.count(i))
    
for j in range(1, n + 1):
    if k - (q - p[j]) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

def point_counter(x):
    return x - 1

for i in range(1, q + 1):
    p = list(map(point_counter, p))
    p[a[i]] += 1
    
for j in range(1, n + 1):
    if p[j] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    c = a.count(i)
    print('Yes' if k - q + c > 0 else 'No')