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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

def solve(n,k,q,a):
    l = [(k+a.count(i+1)-q)>0 for i in range(n)] 
    return l


def main():
    N,K,Q = map(int,input().split())
    a = [int(input()) for _ in range(Q)]
    L = solve(N,K,Q,a)
    for i in range(N):
        print("Yes" if L[i] else "No")

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

def solve(n,k,q,a):
    l = [(k+a.count(i+1)-q)>0 for i in range(n)] 
    return l


def main():
    N,K,Q = map(int,input().split())
    a = [int(input()) for _ in range(Q)]
    L = solve(N,K,Q,a)
    for i in range(N):
        print("Yes" if L[i] else "No")

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

def solve(n,k,a):
    l = [k]*n
    for i in range(len(a)):
        l[a[i]-1] += 1
        l = list(map(lambda x: x-1, l))
    lst = list(map(lambda x : x > 0 ,l))
    return lst


def main():
    N,K,Q = map(int,input().split())
    a = [int(input()) for _ in range(Q)]
    L = solve(N,K,a)
    for i in range(N):
        print("Yes" if L[i] else "No")

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

scores = [K] * N
for i in range(Q):
    ans = int(input())
    scores = list(map(lambda x: x - 1 , scores))
    scores[ans - 1] += 1
    

for score in scores:
    print('Yes' if score > 0 else 'No')

Submission status: Time Limit Exceeded

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

# In[13]:


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


# In[ ]:

Submission status: Time Limit Exceeded

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

# In[6]:


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


# In[ ]:

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

#特典初期設定
Score = np.ones(N,dtype = int)
Score = Score * K

for A in As:
    Score -= 1
    Score[A - 1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = [int(x) for x in input().split()]

scores = np.full(N, K)
for i in range(Q):
    ans = int(input())
    scores -= 1
    scores[ans - 1] += 1

for score in scores:
    print('Yes' if score > 0 else 'No')

Submission status: Time Limit Exceeded

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

    return


resolve()

Submission status: Time Limit Exceeded

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

    return


resolve()

Submission status: Time Limit Exceeded

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

    return


resolve()

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    N, K, Q = list(map(int, input().split()))
    A = [int(input()) for _ in range(Q)]
    points = [K] * N
    for i in range(N):
        points[i] += A.count(i+1)

    points = list(map(lambda x: x - Q, points))

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

resolve()

Submission status: Time Limit Exceeded

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

ans = [k] * n

for i in range(q):
  for j in range(n):
    if a[i]-1 != j :
      ans[j] -= 1
  
for anss in ans:
  print("Yes" if anss > 0 else "No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import copy
a,b,c=map(int,input().split())
d=[]
for i in range(c):
    i=int(input())
    d.append(i)
d=[i-1 for i in d]
e=[b]*a

for i in d:
    e=[i-1 for i in e]
    e[i]=e[i]+1

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

Submission status: Time Limit Exceeded

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

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


points = [K] * N

for i in range(Q):

    for j in range(N):
        if A[i] - 1 != j:
            points[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N, K, Q = map(int, input().split()) 
score = np.array([0]*N)

def change_score(N ,A, score):
    score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)
    f_score = score

for i in f_score:
    if i + K> 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N, K, Q = map(int, input().split()) 
score = np.array([K]*N)

def change_score(N ,A, score):
    score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)

for i in score:
    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()) 
score = np.array([K]*N)

def change_score(N ,A, score):
    score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)
    f_score = score

for i in f_score:
    if i > 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)]

points = [k] * n
for i in range(q):
    points = list(map(lambda x: x - 1, points))
    points[l[i] - 1] += 1
for i in points:
    if 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 _ in range(q)]
# print(A)
for i in range(1, n + 1):
    if k - q + (A.count(i)) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

point = [K] * N
A = []
for i in range(Q):
    point = list(map(lambda x: x -1 , point))
    point[int(input()) - 1] += 1

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

Submission status: Time Limit Exceeded

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

lis = []
for _ in range(q):
    lis.append(int(input()))
    
ori = k - q
for i in range(n):
    if ori + lis.count(i+1) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
#-*- coding:utf-8 -*-

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

pt_li = [] #所持点数のリストを作る
for i in range(n):
    pt_li.append(k)

for t in range(q):
    for u in range(n):
        pt_li[u] -= 1
    pt_li[a_li[t]-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
#-*- coding:utf-8 -*-
 
n, k, q = map(int, input().split())
a_li = [int(input()) for i in range(q)]
 
pt_li = []
for i in range(n):
    pt_li.append(k)
 
for t in range(q):
    for u in range(n):
        pt_li[u] -= 1 
    pt_li[a_li[t]-1] += 1
 
for v in range(n):
    if pt_li[v] <= -1:
        pt_li[v] = 0
 
for s in range(n):
     if pt_li[s] == 0:
         print("No")
     else:
         print("Yes")

Submission status: Time Limit Exceeded

Solution code:
#-*- coding:utf-8 -*-

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

pt_li = []
for i in range(n):
    pt_li.append(k)

for t in range(q):
    for u in range(n):
        pt_li[u] -= 1 
    pt_li[a_li[t]-1] += 1

for v in range(n):
    if pt_li[v] <= -1:
        pt_li[v] = 0

for s in range(n):
     if pt_li[s] == 0:
         print("No")
     else:
         print("Yes")

Submission status: Time Limit Exceeded

Solution code:
N, K, Q, *A = map(int, open(0).read().split())

import numpy as np
scores = np.array([K]*N)

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

for s in scores:
    if s > 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)]

import numpy as np
scores = np.array([K]*N)

for a in A:
    scores -= 1
    scores[a-1] += 1
    
print(*["Yes" if x else "No" for x in scores > 0], sep="\n")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n,k,q = map(int,input().split())
A = []
ans = np.array([k]*n)
tmp = np.array([1]*n)
for _ in range(q):
    a = int(input())
    A.append(a)

for i in A:
    ans -= tmp
    ans[i-1] += 1

for j in ans:
    if j >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with

#A = int(input())
N,K,Q= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())
l=np.zeros(N)
l+=K
#print(l)
for m in range(Q):
    A = int(input())
    l-=1
    l[A-1]+=1
#    print(l)
l=np.where(l<1,'No','Yes')
for i in l:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with

#A = int(input())
N,K,Q= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())
l=np.zeros(N)
l+=K
#print(l)
for m in range(Q):
    A = int(input())
    l-=1
    l[A-1]+=1
#    print(l)

for i in np.where(l<1,'No','Yes'):
    print(i)

Submission status: Time Limit Exceeded

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

A = [0] * N

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

sum(A)

for j in range(N):
	if K - (sum(A)-A[j]) > 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 = [K] * N

A_np = np.array(A)

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


for j in range(N):
	if A_np[j] > 0:
		print("Yes")
	else:
		print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7


N, K, Q = rl()
A = []
for i in range(Q):
	a = ri()
	A.append(a)

scores = [K] * N
for a in A:
	idx = a-1
	for i in range(N):
		if i != idx:
			scores[i] -= 1
for s in scores:
	if s > 0:
		print('Yes')
	else:
		print('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 a-1!=j:
      ans[j]=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, point, Q = map(int, input().split())
ans = [int(input()) for i in range(Q)]
ans = [n-1 for n in ans]
# participants = [i for i in range(N)]
points = [point for i in range(N)]

for i in ans:
    points = [n-1 for n in points]
    points[i] += 1

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

Submission status: Time Limit Exceeded

Solution code:
N, point, Q = map(int, input().split())
ans = [int(input()) for i in range( Q)]
ans = [n-1 for n in ans]
participants = [i for i in range(N)]
points = [point for i in range(N)]

for i in range(len(ans)):
    points = [n-1 for n in points]

for i in ans:
    points[i] += 1

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

Submission status: Time Limit Exceeded

Solution code:
N, point, Q = map(int, input().split())
ans = [int(input()) for i in range( Q)]
ans = [n-1 for n in ans]
participants = [i for i in range(N)]
points = [point for i in range(N)]

for i in ans:
    points = [n-1 for n in points]
    points[i] += 1

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

Submission status: Time Limit Exceeded

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

def s (x:int):
    for k,v in d.items():
        if k == x:
            pass
        else:
            d[k] = v-1

for _ in range(q):
    a = int(input())
    s (a)

for v in d.values():
    if 0 < v:
        print ("Yes")
    else:
        print ("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
	A = int(input())
	for j in range(N):
		if A!=j+1:
			players[j]-=1
for p in players:
	if p<1:print("No")
	else:print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n,k,q=map(int,input().split())
a=np.ones(n)*k
for i in range(q):
	b=int(input())
	a=a-1
	a[b-1]+=1
	
for j in range(n):
	if a[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)]
P = [k for _ in range(n)]

for i in range(q):
    for j in range(n):
        if (A[i] - 1) != j:
            P[j] -= 1

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

Submission status: Time Limit Exceeded

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

# print(N, K, Q, A_i)

scores = [K] * N
for i in range(Q):
    for j in range(N):
        if A_i[i] != j + 1:
            scores[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N, K, Q = invr()
S = [K] * (N+1)

for i in range(1, Q+1):
    a = inp()
    for j in range(1, N+1):
        if j != a:
            S[j] -= 1
for i in range(1, N+1):
    if S[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N, K, Q = invr()
S = [K] * (N+1)
A = []
for i in range(1, Q+1):
    a = inp()
    for j in range(1, N+1):
        if j != a:
            S[j] -= 1
for s in S[1:]:
    if s > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int, input().split()) #a1 a2 a3
ans = [int(input()) for i in range(q)]

mem=[k]*n

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

for m in mem:
  print('Yes' if m>0 else 'No' )

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int, input().split()) #a1 a2 a3
ans = [int(input()) for i in range(q)]

mem=[k]*n

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

for m in mem:
  print('Yes' if m>0 else 'No' )

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
l=list()
for n in range(Q):
  A=int(input())
  l.append(A)
for n in range(N):
  key=l.count(n+1)
  ans=key+K-Q
  if ans<=0:
    print('No')
  else:
    print('Yes')

Submission status: Time Limit Exceeded

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

    # check
    points = list(map(lambda x: x - 1, points))
    points[A - 1] += 1

# output
for p in points:
    if p > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# input
N, K, Q = map(int, input().split())
points = [K] * N
for q in range(Q):
    A = int(input())
    
    # check
    for i, p in enumerate(points):
        if i + 1 == A:
            continue
        points[i] -= 1

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

point = [k] * n
for i in range(q):
    for j in range(n):
        if a[i]-1 != j:
            point[j] -= 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 _ in range(q)]
p=[k]*n

for i in range(q):
  seikai=a[i]-1
  for j in range(n):
    p[j]-=1
  p[seikai]+=1

for j in range(n):
  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(n):
    print('Yes' if k + a.count(i + 1) - q > 0 else 'No')

Submission status: Time Limit Exceeded

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

for _ in range(q):
    a = int(input())
    for i in range(lenP):
        if i != a-1:
            p[i] -= 1
        else:
            continue

[print("Yes" if j >= 1 else "No") for j in p]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
c=[K]*N
d=[0]*N
for i in range(Q):
  A=int(input())-1
  for j in range(N):
    if j!=A:
      c[j]-=1
      
for k in range(N):
  if c[k]<=0:
    d[k]='No'
  else:
    d[k]='Yes'
    
for r in range(N):
  print(d[r])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# C - Attack Survival

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

for p in P:
    if 0 < p:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

scores = np.array([k for _ in range(n)])

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

for s in scores:
  if s > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

import numpy as np



points=np.array([K]*N)

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

    points[a]+=1


for j in points:
    if j>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
C = list(int(input()) for i in range(Q))
D = [C.count(i) for i in range(1, N+1)]
for i in range(N):
  if K-Q+ D[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())
point = np.array([k]*n)
for i in range(q):
    A = np.array([1]*n)
    number = int(input())-1
    A[number] = 0
    point -= A

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())
C = list(int(input()) for i in range(Q))
print("\n".join(["Yes" if K-Q+ C.count(i) > 0 else "No" for i in range(1, N+1)]))

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
C = list(int(input()) for i in range(Q))
for i in range(1, N+1):
  if K-Q+ C.count(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 i in range(Q)]
B = np.array([K]*N)
C = np.count_nonzero(B == 0)
for i in A:
  B =  B - 1
  B[i-1] += 1
for i in B:
  if i > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

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

score = [k]*n

for i in A:
    score = list(map(lambda x:x-1,score) )
    score[i-1]+=1

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

Submission status: Time Limit Exceeded

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

la = list()
for i in range(Q):
    la.append(int(input()))

for i in range(1,N+1):
    if Q-la.count(i) < K:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

A=[k]*n
for i in range(q):
    a=int(input())
    for j in range(n):
        if j!=a:
            A[j-1]-=1

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

Submission status: Time Limit Exceeded

Solution code:
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
iix = lambda x:list(int(input()) for _ in range(x))
mix = lambda x:list(li() for _ in range(x))
##########
def main(n,k,q,a):
    point = [k]*n
    for ans in a:
        point = answer(ans-1, point)
    for i in range(len(point)):
        print(judge(point[i]))
    
def answer(n,point):
    for i in range(len(point)):
        if i != n : point[i] -= 1
    return point
 
def judge(p):
    return "Yes" if p > 0 else "No"
 
n,k,q = mi()
a = iix(q)
main(n,k,q,a)

Submission status: Time Limit Exceeded

Solution code:
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
iix = lambda x:list(int(input()) for _ in range(x))
mix = lambda x:list(li() for _ in range(x))
##########
def main(n,k,q,a):
    point = [k]*n
    for ans in a:
        point = answer(ans-1, point)
    for i in range(len(point)):
        print(judge(point[i]))
    
def answer(n,point):
    for i in range(len(point)):
        if i != n : point[i] -= 1
    return point

def judge(p):
    return "Yes" if p > 0 else "No"

n,k,q = mi()
a = iix(q)
main(n,k,q,a)