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:
import numpy as np
N, K, Q = map(int, input().split())
S = []
for _ in range(Q):
    S.append(int(input())) 
P=np.array([K]*N)
for i in range(Q):
  a=np.array([-1]*N)
  a[S[i]-1]=0
  P +=a
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(' '))
t = [int(input()) for i in range(q)] 

ans = [k for i in range(n)]

for i in range(max(t)):
    score = i + 1
    ans[i] += t.count(score)
    
res_list = [i - q for i in ans]


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

Submission status: Time Limit Exceeded

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

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

point = []
for i in range(N):
    point.append(K)
    
for i in range(Q):
    correct_player = int(input())
    for j in range(N):
        if j != correct_player - 1:
            point[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:
def calc_minas(n):
    return n - 1

a = list(map(int,input().split()))
n = a[0]
k = a[1]
q = a[2]
#print(n,k,q)
n_list = [k]*n
#print(n_list[0]+100)
#print(n_list)
for i in range(q):
  #print('Q',i)
  seikaisha = int(input())
  #print('seikaishaha',seikaisha)
  n_list = list(map(calc_minas,n_list))
  n_list[seikaisha-1] += 1
  #print(n_list)
for k in range(n):
  if n_list[k] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
NKQ = list(map(int, input().split()))
A = []
for i in range(NKQ[2]):
    A.append(int(input()))

#参加者
for j in range(NKQ[0]):
    point = NKQ[1]
    l = j+1
    #正解した問題ごとに点数を引く
    for k in range(NKQ[2]):

        if A[k] == l:
            point = point
        else:
            point = point - 1
    if point > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import sys

s=list(map(int,input().split()))
S=[]
for i in range(s[2]):
  S.append(int(input()))

P=np.array([s[1]]*s[0])
m=np.array([-1]*s[0])

for i in range(s[2]):
  P=P+m
  P[S[i]-1]+=1

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q= map(int,input().split()) # N人 が全員最初 K点, Q回 の正解者ガ出る
A = []
for _ in range(Q):
    A.append(int(input()) )  #正解した参加者

T = [K]*N  # init tokuten
# print(T)
for j in range(Q):
   for i in range(len(T)):
      if i == A[j]-1:
         pass
      else:
         T[i] =T[i]-1

   # print(T)
AN=["No"]*len(T)

for i in range(len(T)):
   if T[i]>0:
      AN[i]="Yes"
   print(AN[i])
   # print(AN)

Submission status: Time Limit Exceeded

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

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

for n in range(N):
    freq = A.count(n + 1)
    if K- Q + freq <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int,input().split())
scorelist = []
colcount = []
for i in range(N):
    scorelist.append(K)
    colcount.append(0)
for i in range(Q):
    colcount[int(input()) - 1] += 1
for i in range(len(colcount)):
    scorelist = list(map(lambda x:x - colcount[i - 1], scorelist))
    scorelist[i - 1] += colcount[i - 1]
for i in scorelist:
    if i <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np


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

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

for j in arr:
	if 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 = [int(input()) for _ in range(Q)]
 
member = np.ones(N) * K
 
for a in A:
    member -= 1
    member[a - 1] += 1
 
res = np.array(['No', 'Yes'])[(member > 0).astype('int')]
 
for r in res:
    print(r)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections

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

if K>Q:
  for j in range(N):
    print('Yes')
else:    
 A=list()
 for j in range(Q):
   A.append(int(input()))

 for k in range(N):
  score=K
  cond=0
  for j in range(Q):
   if k+1 != A[j]:
    score=score-1
   if score<=0:
      print('No')
      cond=1
      break
  if cond==0:
    print('Yes')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
if __name__ == '__main__':
    n, k, q = map(int, input().split())

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

    participants = []

    for i in range(n):
        participants.append(k)

    for ans in answers:
        for i in range(len(participants)):
            if ans - 1 != i:
                participants[i] -= 1

    for p in participants:
        if p <= 0:
            # print(p)
            print('No')
        else:
            # print(p)
            print('Yes')

Submission status: Time Limit Exceeded

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

if K > len(A):
  for _ in range(N):
    print("Yes")
  exit()

for _ in range(N):
  P.append(K)

for a in A:
  for i, p in enumerate(P):
    if i != (a - 1):
      P[i] -= 1

for p in P:
  if p <= 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)]
a=tuple(a)
for i in range(1,n+1):
  p=k-q+1*(a.count(i))
  if p>=1:
    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(int(q))]

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


for i in range(q):
    for j in range(len(point)):
        point[j] = point[j] - 1
        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 開始時のポイント
#
# 0以下で敗退



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

for i in range(N):
    persons.append(K)

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

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = []
for q in range(Q):
    a = int(input())
    A.append(a)
import numpy as np
points = np.array([K for i in range(N)])
for a in A:
    points -= 1
    points[a-1] += 1
for p in points:
    if p > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
import numpy as np
n,k,q =  map(int, sys.stdin.readline().split())
l=[0]*n
l = np.array(l)
# def penalty(b):
#     return b + 1

for i in range(q):
    a =  int(sys.stdin.readline())
    l+=1
    # l=list(map(penalty, l))
    l[a-1]-=1



for e in l:
    if e >=k:
        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)]
B = [0]*N

S = K - Q
for i in range(N):
    B[i] += S + A.count(i+1)

#for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = [int(x) for x in input().split()]
a = [K]*N
for _ in range(Q):
    ai = int(input())
    for i,aa in enumerate(a):
        if i != ai-1:
            a[i] -= 1

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

Submission status: Time Limit Exceeded

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

acc_list = []
for i in range(Q):
    acc_list.append(int(input()))

point_dict = {}
for i in range(1, N+1):
    point_dict[i] = K

for a in acc_list:
    for key, valu in point_dict.items():
        if a != key:
            point_dict[key] = valu - 1

for key, valu in point_dict.items():
    if valu <= 0:
        print('No')
    elif valu > 0:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

ac = []
for i in range(Q):
    an = int(input())
    ps[an -1] += 1
    ps = ps - 1
    
for k in ps:
    if k > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
ss = input().split()
N = int(ss[0])
K = int(ss[1])
Q = int(ss[2])
As = []

SCORE = [K] * N

for i in range(Q):
  XX = map(lambda x: x - 1, SCORE)
  SCORE = list(XX)
  SCORE[int(input())-1] += 1
for i in range(N):
  if(SCORE[i]<1):
    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):
    temp = A.count(i+1)
    if K > Q-temp:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
Ans = [int(input()) for i in range(q)]
if k > q:
	for i in range(n):
		print("Yes")
else:	
	C = ["No"]*n
	for j in Ans:
		if Ans.count(j) > q - k:
			C[j-1] = "Yes"
		else:
			pass
	for l in range(n):
		print(C[l])

Submission status: Time Limit Exceeded

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

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

Count = []
for n in range(N):
    freq = A.count(n + 1)
    Count.append(freq)

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

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(N):
    P=K-Q+(A.count(i+1))
    if P<=0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
Q_list=[input() for i in range(Q)]  
#print(Q_list)
list_count=[]
for i in range(1,N+1):
  a=Q_list.count(str(i))
  list_count.append(a)
#print(list_count)

for j in range(0,N):
  y=list_count[j]
  d=K-Q+y
  if 0>=d:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:

import numpy as np
N , K ,Q = map(int, input().split())
s = sorted([int(input())-1 for _ in range(Q)])
initializer_list = np.full(N,K,dtype='float32')
for i in s:
    tmp = initializer_list[i]
    initializer_list -=1
    initializer_list[i] = tmp

[print('Yes') if i > 0 else print('No')  for i in initializer_list]

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
 
n, k, q = map(int, input().split())
 
members_p = np.array([k for _ in range(n)])
 
for _ in range(q):
  a = int(input()) 
  temp = np.zeros(n)
  temp[a-1] = 1
  members_p = members_p - 1 + temp
 
  # print(members_p)
 
res_list = ['Yes' if member_p > 0 else 'No' for member_p in members_p]
print(*res_list, sep = '\n')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
m = Q - K + 1
A = [input() for _ in range(Q)]
Ans = []
for i in range(N):
    if m <= 0:
        Ans.append("Yes")
    elif A.count(str(i+1)) < m:
        Ans.append("No")
    else:
        Ans.append("Yes")

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

Submission status: Time Limit Exceeded

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

# Aiの最終得点は　K+(正解数)-Q
for i in range(1,N+1):
    if K+Alist.count(i)-Q > 0 :
        print('Yes') 
    else :
        print('No')

Submission status: Time Limit Exceeded

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


a = [0] * Q
for i in range(Q):
    a[i] = int(input())

for i in range(N):
    if a.count(i+1) > border:
        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)]

lst = [K for _ in range(N)]

def calc_minus(n):
    return n - 1

for i in range(len(A)):
  lst = list(map(calc_minus, lst))
  lst[A[i]-1] = lst[A[i]-1]+1

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
N,K,Q=map(int,input().split())
A=[int(input()) for _ in range(Q)]
l = list(map(lambda x:'Yes' if K-Q+A.count(x)>0 else 'No',list(range(1,N+1))))
for i in l:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    NKQ = list(map(int, input().split()))
    N = NKQ[0]
    K = NKQ[1]
    Q = NKQ[2]
    As = [int(input()) for _ in range(Q)]
    #print(As)
    points = np.ones(N) * K
    for i in range(Q):
        a = As[i]
        #print(a)
        points[np.delete(np.arange(start=0,step=1,stop=N), a-1)] -= 1
        #print(points)
    #print(points)
    res = points
    ans = np.array(['Yes' for _ in range(N)])
    #print(ans)
    #print(res)
    #ans[res<=0] = "Yes"
    ans[res<=0] = "No"
    #print(ans)
    print("\n".join(list(ans)))
if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
(N,K,Q) = map(int,list(input().split()))
points = []
for x in range(0,N):
    points.append(K)
for y in range(0,Q):
    seikaisha = int(input()) - 1
    for z in range(0,N):
            if z == seikaisha:
                continue
            else:
                points[z] -= 1        
for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

for j in range(1,n+1):
    if cnt+a.count(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 i in range(Q)]
B = [0]*N

for i in range(N):
    B[i] += K - Q + A.count(i+1)

#for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

for i in range(0, Q):
    n = int(input())

    for j in range(0, N):
        member[j] = member[j] - 1
    member[n-1] = member[n-1] + 1

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
l = [int(input()) for _ in range(q)]
l.sort()
ll = set(l)
l2 = []

for _ in ll:
	l2.append(l.count(_))

lll = list(ll)

for _ in range(1,n+1):
	if _ in lll:
		if k - q + l2[lll.index(_)] > 0:
			print('Yes')
		else:
			print('No')
	else:
		if k - q > 0:
			print('Yes')
		else:
			print('No')

Submission status: Time Limit Exceeded

Solution code:
ss = input().split()
N = int(ss[0])
K = int(ss[1])
Q = int(ss[2])
As = []
for i in range(Q):
  As.append(int(input()))
SCORE = [K] * N
for i in range(Q):
  XX = map(lambda x: x - 1, SCORE)
  SCORE = list(XX)
  SCORE[As[i]-1] += 1
for i in range(N):
  if(SCORE[i]<1):
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

points = [K] * N

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

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

Submission status: Time Limit Exceeded

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

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

for i in range(N):
    if K + A.count(str(i+1)) <= Q:
        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)]
yon = 0
for i in range(N):
    yon = K + A.count(i+1) - Q
    if yon > 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)]
ans = np.array([K]*N)
minus = np.array([-1]*N)
for i in range(1, Q+1): # round
    minus[A[i-1]-1] = 0
    ans += minus
    minus = np.array([-1]*N)    
for k in ans:
    if k <= 0:
        print('No')
    else:
         print('Yes')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N , K ,Q = map(int, input().split())
s = sorted([int(input())-1 for _ in range(Q)])
initializer_list = np.full(N,K,dtype='int')
for i in s:
    tmp = initializer_list[i]
    initializer_list -=1
    initializer_list[i] = tmp
[print('Yes') if i > 0 else print('No')  for i in initializer_list]

Submission status: Time Limit Exceeded

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


def showoutput(p_list):
    for i in p_list:
        if i <= 0:
            print("No")
        else:
            print("Yes")


if __name__ == "__main__":
    for i in A:
        players = [
            val - 1 if (loc + 1) != int(i) else val for loc, val in enumerate(players)
        ]
    showoutput(players)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import math
import subprocess
import random
import os
import sys

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

N=int(N)
K=int(K)
Q=int(Q)
A = [int(input()) for i in range(Q)]
arr=np.full(N, K)
for i in A:
	arr-=1
	arr[i-1]+=1
	
for j in arr:
	if 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)]
score = [int(K) for __ in range(N)]

for i in range(Q):
    for m in range(N):
        score[m] = score[m]-1
    score[A[i]-1] = score[A[i]-1]+1
for k in range(N):
    if score[k] <= 0:
        print("No")
    else:
        print("Yes")

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(N):
    temp = A.count(i+1)
    if K > Q-temp:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
nkq = input()
NKQ =nkq.split(" ")
point = []
for j in range(int(NKQ[0])): #各参加者の初期ポイント
  point.append(int(NKQ[1]))
for i in range(int(NKQ[2])):
  Ai = int(input()) - 1 #正解した参加者の番号(配列で)
  for k in range(int(NKQ[0])): #正解した参加者以外-1
    if k != Ai:
      point[k] = point[k] -1
for l in range(int(NKQ[0])):
  if point[l] <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# coding:utf-8
N, K, Q = map(int, input().split())
player = {i+1: K for i in range(N)}

for _ in range(Q):
    ansplayer = int(input())
    for i in player.keys():
        if i == ansplayer:
            pass
        elif player[i] >= 0:
            player[i] -= 1
        else:
            pass

for i in player.keys():
    if player[i] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

for i in range(N):
    persons.append(K)

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

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = map(int, input().split())
winner = [int(input()) for i in range(Q)]
PointBord = np.array([K]*N)
for i in range(Q):
    delta = np.array([1]*N)
    delta[winner[i]-1] = 0
    PointBord = PointBord - delta
for i in range(N):
    if PointBord[i] < 1:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:

import numpy as np

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

ac = []
for i in range(Q):
    an = int(input())
    ac.append(an)

for j in ac:
    ps = ps - 1
    ps[j-1] += 1
    
for k in ps:
    if k > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
N, K, Q = map(int, input().split())
score = []
for i in range(N):
    score.append(K)

for i in range(Q):
    answer = int(input())
    score[answer - 1] += 1
    for idx in range(N):
        score[idx] -= 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())
A=[]
for i in range(Q):
    A.append(int(input()))
A_point=[]
for i in range(1,N+1):
    A_point.append(A.count(i))
for i in range(N):
    P=K-Q+A_point[i]
    if P<=0:
        print('No')
    else:
        print('Yes')

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(N):
    ans = K - Q + A.count(i+1)
    # print(ans)
    if ans > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
size,init,query= list(map(int,input().split()))
health = []
ans = []
for i in range(size):
    health.append(init)
for i in range(query):
    attack = int(input())
    for i in range(0,len(health)):
        health[i] -= 1
    health[attack-1] += 1
for i in health:
    if i<1:
        ans.append('No')
    else:
        ans.append('Yes')
for i in ans:
    print(i)

Submission status: Time Limit Exceeded

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

vec = [K for _ in range(N)]

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

ret = '\n'.join(['Yes' if x > 0 else 'No' for x in vec])
print(ret)

Submission status: Time Limit Exceeded

Solution code:
i = input()
d = i.split()
N, K, Q = int(d[0]), int(d[1]), int(d[2])

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

p = [K]*N

for i in a:
    for n in range(N):
        if n != i-1:
            p[n] = p[n] - 1

for n in range(N):
    if p[n] > 0:
        print('Yes', end='')
    else:
        print('No', end='')
    if n != N-1:
        print()

Submission status: Time Limit Exceeded

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

C = [0] * n

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

for i in range(n) :
    minus = sum(C) - C[i]
    if minus < k :
        print('Yes')
    else :
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=list(map(int,input().split(" ")))
answer=[input() for i in range(N[2])]	
X=list(map(int,answer))
#print(X)

point=[]
for i in range(N[0]):
	point.append(N[1])

def down(y):
	return y-1

for i in X:
	point=list(map(down,point))
	point[i-1]+=1
#print(point)
for i in range(N[0]):
	if point[i]>0:
		print("Yes")
	else:
		print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

NKQ = list(map(int, input().split()))

N = NKQ[0]
K = NKQ[1]
Q = NKQ[2]

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

points = K*np.ones(N, dtype="int")
for i in range(Q):
    points = points - 1
    points[A[i]-1] = points[A[i]-1] + 1

for i in range(len(points)):
    if points[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)]
points=[k for i in range(n)]
for j in a:
    points[j-1]=points[j-1]+1
    for k in range(n):
        points[k]-=1
        
for ans in points:
    if ans>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

score = [k]*n

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

for x in score:
    if x > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=[(input()) for l in range(q)]
if q-k<0:
    for i in range(n):
        print('Yes')
else:
    import collections
    c = collections.Counter(a)
    if c.most_common()[0][1]>=k and q-c.most_common()[0][1]<=k:
        a=int(c.most_common()[0][0])
        for i in range(n):
            if i+1==a:
                print('Yes')
            else:
                print('No')
    else:
        l=([int(i[0]) for i in c.items() if i[1] > q-k])
        #print(l)
        for i in range(n):
            if l.count(i+1)>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 = np.array([K]*N)

for i in range(Q):
  a = int(input())-1
  correct = A[a]
  A = A-1
  A[a] = correct
for ans in A:
  if ans < 1:
    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)]
B = [K-Q]*N

for i in range(N):
    B[i] += A.count(i+1)

#for i in range(N):
    if B[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(N):
    p[i] += A.count(i+1) - Q
    if p[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())
points = np.full(n, k)
for i in range(q):
    a = int(input())
    points = points - 1
    points[a - 1] += 1
for point in points:
    if point > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

points = np.full(N, K)

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

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