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
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

points = np.array([K for i in range(N)])

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    points -= 1
    points[a - 1] += 1

survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Submission status: Time Limit Exceeded

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

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

for j in range(Q):
    ans = int(input())
    for k in range(N):
        if ans == k + 1:
            continue
        else:
            points[k] -= 1

for result in points:
    if result <= 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)]

list = [k]*n

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

for i in list:
    if i <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
test = input().split(" ")
chance = (int(test[2]) - int(test[1]))
#print(test)
box = []
if chance < 0:
    for i in range(int(test[0])):
        print("Yes")
elif chance >= 0:
    for i in range(int(test[2])):
        box.append(input())
    for l in range(int(test[0])):
        win = (box.count(str(int(l) + 1)))
        if int(win) > chance:
            print("Yes")
        else:
            print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np 
N, K, Q = map(int, input().split()) 
N_list = np.array([]) 
for n in range(N): 
  N_list = np.append( N_list, K )

for q in range(Q): 
  a = int(input()) 
  N_list -= 1 
  N_list[a-1] += 1
 
for x in N_list: 
  if x>0: 
    print("Yes")
  else: 
    print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n,k,q = map(int,input().split())
d = [int(input()) for i in range(q)]
 
p=np.full(n,k)
z=np.full(n,-1)
 
for a in range(0,q):
  p=p+z
  p[d[a]-1]+=1
 
for l in range(0,n):
  if p[l]>0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

for i in range(n):
  if not i+1 in idx:
    s_ = s[i] - q
    if s_ > 0:
      print("Yes")
    else:
      print("No")
  else:
    j = q - idx.count(i+1) 
    s_ = s[i] - j
    if s_ > 0:
      print("Yes")
    else:
      print("No")

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]

if k > q:
    for i in range(n):
        print('Yes')
else:
    for j in range(1, n+1):
        point = k - q + a.count(j)
        if point > 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 = [0 for _ in range(n)]
#print(p)

if k>q:
    for i in range(1,n+1):
        print('Yes')
    exit()
else:
    for i in range(n):
        #print(i)
        p[i]=a.count(i+1)

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
N,K,Q = map(int,input().split())
A_list = []
point_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:
# -*- coding: utf-8 -*-
import numpy as np
import sys
input = sys.stdin.readline

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


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


for SCORE in score:
    if SCORE <= 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 += [input()]
B = []
for i in range(N):
    B += [K]
    
for i in range(Q):
    for j in range (N):
        if j == int(A[i]) - 1:
            B[j] += 1
            
for i in range(N):
    B[i] -= Q
    
for i in range(N):
    if B[i] >= 1:
        print('Yes')
    if B[i] <= 0:
        print('No')

Submission status: Time Limit Exceeded

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

adict = {i + 1: k for i in range(n)}

answer = [int(input()) for _ in range(q)]

for k, v in adict.items():
    if k not in answer:
        adict[k] = v - q
    else:
        adict[k] = v - (q - answer.count(k))

for v in adict.values():
    if v > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

  for i in range(1,n+1):
    x = a_count(i)
    if k-q+x > 0:
      print('Yes')
    else:
      print('No')


if __name__ == '__main__':
  main()

Submission status: Time Limit Exceeded

Solution code:
import sys
input=sys.stdin.readline
z=list(map(int,input().split()))
a,b,c=[],[],z[2]-z[1]
for i in range(z[2]):
    a.append(int(input()))
for i in range(z[0]):
    b.append(a.count(i+1))
for i in range(z[0]):
    if c-b[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())

arr = np.array([k] * n)

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


arr_evaluate = arr > 0

for go_or_not in arr_evaluate:
    if go_or_not:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# python3
import numpy as np

def atack_survival(N, K, r_list):
	point_list= np.array([K] * N)
	genten = np.array([1] *N)
	for i in r_list:
		point_list= point_list - genten
		point_list[i-1]= point_list[i-1] + 1
		#print(i)
		#print(point_list)

	for i in point_list:
		if i <= 0:
			print ("No")
		else:
			print("Yes")


	

if __name__ == '__main__':
    l = list(map(int, input().split()))
    N=l[0]
    K=l[1]
    Q=l[2]
    result= [int(input()) for i in range(Q)]
    atack_survival(N,K,result)

Submission status: Time Limit Exceeded

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

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

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

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

Submission status: Time Limit Exceeded

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

point_list = [K]*N
d_point = [1]*N

for i in range(0,Q):
  t = input()
  d_point[int(t)-1] = 0
  point_list = list(map(lambda x,y :x-y, point_list, d_point))
  d_point = [1]*N

for i in point_list:
  if i <= 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)
def ans(j):
  y=list_count[j]
  d=K-Q+y
  if 0>=d:
    return "No"
  else:
    return "Yes"
for j in range(0,N):
  print(ans(j))
#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())
a = []
for _ in range(q):
    a.append(input())
b = [k]*n
for s in a:
 s = int(s)
 npdata = np.zeros(s-1)
 nk = [1]
 nadata = np.zeros(n-s)
 arrank = np.array(nk)
 merged = np.hstack((npdata,nk,nadata))
 merged = merged -1
 b = b + merged
#print(b)
for ao in b:
 if ao >0:
  print("Yes")
 else:
  print("No")

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
AN=["No"]*len(T)
for j in range(Q):  # 問題の数分実行

   A.append(int(input()) )  #正解した参加者のリスト

   for i in range(len(T)): #参加者の人数分実行
      if T[i]<=0:
         continue
      else:
         if i== A[j]-1:  # 正解した参加者
            pass
         else:  # 正解していない参加者　は点数を引く
            T[i] =T[i]-1

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

Submission status: Time Limit Exceeded

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

guests = [k] * n

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


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

Submission status: Time Limit Exceeded

Solution code:
def main():
    N,K,Q=map(int,input().split())
    score=[K]*N
    for _ in range(Q):
        num=int(input())
        for j in range(num-1):
            score[j]-=1
        for k in range(num,N):
            score[k]-=1
    for s in score:
        if s>0:
            print('Yes')
        else:
            print('No')

if __name__=='__main__':
    main()

Submission status: Time Limit Exceeded

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

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 = input().split()
CAList = []
AllP = []
for i in range(0,int(Q)):
    CAList.append(input())

for j in range(0,int(n)):
    AllP.append(int(K))

for k in range(0,int(Q)):
    box = AllP[int(CAList[k])-1]
    for l in range(0,int(n)):
        AllP[l] = AllP[l] - 1
    AllP[int(CAList[k])-1] = box
    
for m in range(0,int(n)):
    if AllP[m] >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

for i in range(len(a_i)):
    for j in range(len(score)):
        if(a_i[i] == j):
            score[j] += 0
        else:
            score[j] -= 1
    
for i in score:
    if(i > 0):
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n,k,q =map(int,input().split())
arr =[]#np.ones(n, dtype="int8")
for _ in range(q):
  s = int(input())
  arr.append(s)
#print(arr)
for i in range(n):
  #print(len(arr)- arr.count(i+1))
  if len(arr)- arr.count(int(i+1)) < 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(int(q))]

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


for i in range(q):
    for j in range(n):
        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:
import numpy as np

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

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

# 出力
[print('No') if i[m]<=0 else print('Yes') for m in range(n)]

Submission status: Time Limit Exceeded

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

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


def solve(N: int, K: int, Q: int, A: "List[int]"):
    human = np.full(N, K)

    for i in range(Q):

        ind = np.ones(N, dtype=bool)
        ind[A[i]-1] = False
        human[ind] = human[ind] - 1
        ind[A[i]-1] = True

    human2 = list(map(lambda x: YES if x > 0 else NO, human))
    print('\n'.join(human2))
  
    return
    

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:

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

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

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

for q in range(Q):
    A = int(input()) - 1
    points = [p if i == A else p-1 for i, p in enumerate(points)]
for n in range(N):
    if points[n] < 1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

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

for s in range(0,q):
  a = int(input()) - 1
  for l in range(0, len(points)):
    if l != a:
      points[l] = points[l]-1

for t in range(0, n):
  result = "Yes"
  if points[t] <= 0:
    result = "No"
  print(result)

Submission status: Time Limit Exceeded

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

sc = [K] * N

def m(x):
  return x - 1

for i in a:
  sc = list(map(m, sc))
  sc[i-1]=sc[i-1]+1

for i in sc:
  if i <=0:
     print("No")
  else:
     print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import sys

N,K,Q = map(int,input().split())
A_list = list()
for i in range(Q):
	A_list.append(int(input()))

if K - Q > 0 :
	for i in range(N):
		print('Yes')
	sys.exit()

else:
	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:
input_line=list(map(int,input().split()))
N=input_line[0]
K=input_line[1]
Q=input_line[2]


A_lis=[]
for q in range(Q):
    A_lis.append(int(input()))

for n in range(N):
    if K-(Q-A_lis.count(n+1))>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 i in range(Q)]
for n in range(N):
    if A.count(n+1)+K-Q > 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 = []
for _ in range(q):
    a.append(input())
b = [k]*n
arra = np.array(a)
for s in a:
 s = int(s)
 npdata = np.zeros(s-1)
 nk = [1]
 nadata = np.zeros(n-s)
 arrank = np.array(nk)
 merged = np.hstack((npdata,nk,nadata))
 merged = merged -1
 b = b + merged
#print(b)
for ao in b:
 if ao >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(int(input()))

A_count = [A.count(n+1) for n in range(N)]

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

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:
        print('Yes')
    elif K - Q + freq <= 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(0,Q):
    A.append(int(input()))
for i in range(0,N):
    if K+A.count(i+1)-Q>0:
        print("Yes")
    else:
        print("No")

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
AN=["No"]*len(T)
for j in range(Q):
   A.append(int(input()) )  #正解した参加者
   for i in range(len(T)):
      if i == A[j]-1:
         pass
      else:
         T[i] =T[i]-1
   #    if i = len(T)-1:
   #       if T[i]>0:
   #       AN[i]="Yes"
   # print(AN[i])




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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q=map(int,input().split())
l=np.ones(N)*K
for i in range(Q):
    a=int(input())-1
    one=np.ones(N)
    one[a]=0
    l=l-one
for i in range(N):
    if l[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())
list1 = np.zeros(N)
list1 += K


for i in range(Q):
  A = int(input().rstrip())
  B = list1[A-1]
  list1 -= 1
  list1[A-1] = B
  
for j in list1:
  if j > 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()))

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

Submission status: Time Limit Exceeded

Solution code:
def main():
    n, k, q, *al = map(int, open(0).read().split())
    gl = [k for _ in range(n)]
    for a in al:
        gl = [
            g if i == a-1
            else g-1
            for i, g in enumerate(gl)
        ]

    res = '\n'.join(
        'No' if g <= 0
        else 'Yes'
        for g in gl
    )
    print(res)

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) ]
a_count = a.count

for i in range(1,n+1):
    x = a_count(i)
    if k-q+x > 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)]

N_K = [K for i in range(N)]
for i, a in enumerate(A):
    for j, n_k in enumerate(N_K):
        if a-1 != j:
            N_K[j] = n_k - 1

for k, n_k in enumerate(N_K):
    if n_k <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
points=[k]*(n+1)
win=[]
for i in range(q):
  win.append(int(input()))
for j in range(1,n+1):
  if points[j]-(q-win.count(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())
S = []
for _ in range(Q):
    S.append(int(input())) 
P=np.array([K]*N)
b=np.array([0]*N)
for i in range(Q):
  a=np.array([-1]*N)
  a[S[i]-1]=0
  b +=a
P +=b
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, raw_input().split())
import numpy as np

vec = np.full(n, k, dtype=int)
for i in range(q):
  ind = np.full(n, 1, dtype=int)
  a = int(raw_input())
  ind[a-1] = 0
  vec = vec - ind
#print('Yes' if i > 0 in vec else 'No')
for i in range(n):
    if vec[i] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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 = list(map(lambda x: int(x), input().split()))
a = []
for i in range(q):
    a.append(int(input()))

guests = [k] * n

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


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

point = [K] * N

def mainasu(n):
    return n-1

for i in range(Q):
    point = list(map(mainasu, point))
    point[A[i] - 1] += 1

for j in range(N):
    if point[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 i in range(Q)] 

P = [K] * N

P = np.array(P)
k = 0

for i in range(Q):
    # P = [x - y for (x, y) in zip(P, M)]
    P = P - 1
    P[A[i]-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = input().split()
A = np.array([int(input()) for i in range(int(Q))])
T = np.full(int(N), int(K))
for i in A:
    T[0:(i-1)] -= 1
    T[i:len(T)] -= 1

for i in T:
    if i <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

if __name__=='__main__':
    main()

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]
    #正解した問題ごとに点数を引く
    for k in range(NKQ[2]):

        if A[k] != j+1:
            point = point - 1
    if point > 0:
        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:
        p_count = 0
        for i in range(len(participants)):
            if ans - 1 != i:
                participants[i] -= 1

        for p in participants:
            if p > 0:
                p_count += 1

        if p_count == 1:
            break

    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  = [int(input()) for i in range(q)]
t = [k]*n
t = [n-1*q for n in t]

for i in range(q):
    for j in range(n):
        if a[i] == j:
            t[j-1] += 1
            break

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

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)
def ans(j):
  y=list_count[j]
  d=K-Q+y
  if 0>=d:
    return "No"
  else:
    return "Yes"
for j in range(0,N):
  print(ans(j))

Submission status: Time Limit Exceeded

Solution code:
nkq = list(map(int, (input().split())))
ans = [int(input()) for i in range(nkq[2])]
hold_point = []
[hold_point.append(nkq[1]) for i in range(nkq[0])]
for i in range(nkq[2]):
    for v in range(nkq[0]):
        hold_point[v] -= 1
for i in ans:
    hold_point[i - 1] += 1
for i in hold_point:
    if i > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

point=[N[1] for i in range(N[0])]
def down(y):
	return y-1
for i in ans:
	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:
N, K, Q = map(int, input().split())

# N人の持ち点arrayの初期値を作成する
points = [K]*N

for i in range(Q):
    win = int(input())
    points  = list(map(lambda x: x-1, points))
    points[win-1] += 1

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

Submission status: Time Limit Exceeded

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

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


def solve(N: int, K: int, Q: int, A: "List[int]"):
    human = np.full(N, K)

    for i in range(Q):
        ind = np.ones(N, dtype=bool)
        ind[A[i]-1] = False
        human[ind] = human[ind] - 1
        ind[A[i]-1] = True
        
    for j in range(N):
   
        if human[j] > 0:
            print(YES)
        else:
            print(NO)
    return


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:
# -*- coding:utf8 -*-

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def echo(x):
    if x < 1:
        print("No")
    else:
        print("Yes")

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

for i in range(Q):
    ans = int(input())
    score -= 1
    score[ans-1] += 1
f = np.frompyfunc(echo, 1, 1)
f(score)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
N, K, Q = map(int, input().split())
score = np.array([K]*N)


for i in range(Q):
    answer = int(input())
    score[answer - 1] += 1
    score = score - 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())


pointlist = [K for i in range(N)]
 
for i in range(Q):
  Aperson = int(input())
  for j in range(N):
    if j+1 != Aperson:
      pointlist[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

points = [K for i in range(N)]

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    points = [point - 1 for point in points]
    points[a - 1] += 1

survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

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

Submission status: Time Limit Exceeded

Solution code:
def maina(n):
    return n-1

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):
    score = list(map(maina, score))
    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:
# -*- coding: utf-8 -*-
import numpy as np
N,K,Q = map(int,input().split())
A_list = []
point_list = []

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

for i in range(N):
    point_list.append(Q-A_list.count(i+1))

np_point_list = np.array(point_list)

last = K - np_point_list
for i in range(len(last)):
    if last[i] > 0:
        print("Yes")
    elif last[i] <= 0:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
A = list(map(int, input().split())) 
N = A[0]
K = A[1]
Q = A[2]
n = [K for _ in range(N)]
for _ in range(Q):
    answer = int(input()) - 1
    for i in range(N):
        if(i != answer):
            n[i] -= 1

for i in range(N):
    if(n[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 = [0]*N

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

#    if B[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 q in range(Q):
  win=int(input())
  for i,j in enumerate(A):
    if i!=win-1:
      A[i]-=1
for i,j in enumerate(A):
    if j >0:
        print('Yes')
    else:
        print('No')