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())
A = [int(input())-1 for _ in range(Q)]
Point = [K]*N
for i in range(Q):
    Point[A[i]] += 1
    for j in range(N):
        Point[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
import numpy as np


def main():
    N, K, Q = map(int, input().split())
    result = np.array([K] * N)
    for _ in range(Q):
        a = int(input())

        result[a - 1] += 1
        result -= 1

    for r in result:
        print('Yes'if r > 0 else 'No')


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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


def main():
    N, K, Q = map(int, input().split())
    # A = [int(input()) for _ in range(Q)]
    # print(N, K, Q, A)
    P = [K] * N
    for q in range(Q):
        a = int(input())
        P[a - 1] += 1
        for i in range(N):
            if P[i] < 0:
                continue
            else:
                P[i] -= 1

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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


def main():
    N, K, Q = map(int, input().split())
    # A = [int(input()) for _ in range(Q)]
    # print(N, K, Q, A)
    P = [K] * N
    for q in range(Q):
        a = int(input())
        P[a - 1] += 1
        for i in range(N):
            P[i] -= 1

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
import math
import collections
N,K,Q=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")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
n,k,q = map(int, stdin.readline().split())
a = [int(stdin.readline()) for _ in range(q)]
points = list(map(lambda x: x-q, [k for i in range(n)]))
for i in set(a):
    points[i-1] += a.count(i)
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)]
points = list(map(lambda x: x-q, [k for i in range(n)]))
for i in set(a):
    points[i-1] += a.count(i)
for i in points:
  if i <= 0:
    print('No')
  else:
    print('Yes')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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


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

Submission status: Time Limit Exceeded

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

for i in range(1,N+1):
    Players_Number.append(i)

for i in Players_Number:
    judge = ((K-Q) + (A.count(i)))
    if judge > 0 :
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

#参加者の持ちスコア
PlayersScore = []
for i in range(N):
    PlayersScore.append(K)

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

for k in PlayersScore:
    if k > 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 q in range(Q):
  A = int(input())
  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:
N,K,Q = [int(x) for x in input().rstrip().split()]
l = [K for x in range(N)]

for i in range(Q):
    a = int(input())
    for j in range(N):

        if a-1 != j:

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
lis = list()
A = K -Q
point = [A for i in range(N)]
for i in range(Q):
  lis.append(int(input()))
for i in range(Q):
  for j in range(N):
    if lis[i] == j:
      point[j-1] += 1
for i in range(N):
  if point[i] >= 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(q)]

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

for i in range(n):
    ret = sum(count) - count[i]
    if ret >= 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)]

point = [k] * n
for i in a:
    for j in range(n):
        if i-1 != j:
            point[j] -= 1

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

Submission status: Time Limit Exceeded

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

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

for i in range (N):
    c=A.count(str(i+1))
    if Q-c >= K:
        survive[i] = "No"
    else:
        survive[i] = "Yes"

ans = '\n'.join(survive)
print(ans)

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(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())
a = [int(input()) for i in range(q)]
p = {}
[p.update({i:k}) for i in range(1, n+1)]
for i in p:
    m = q - a.count(i)
    if p[i] - m > 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)]
p = {}
[p.update({i:k}) for i in range(1, n+1)]

for i in a:
    for j in p:
        if i != j:
            p.update({j:p[j] - 1})

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

Submission status: Time Limit Exceeded

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

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

for l in range(n):
    if i[l] <= 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_=int(input())
  A.append(A_)
for i in range(N):
  n=A.count(i+1)
  x=K-Q+n
  if  x>0:
    print("Yes")
  else:print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

A = []
for _ in range(Q):
  A.append(int(input()) - 1)

score = [K] * N

for a in range(len(A)):
  for i in range(len(score)):
    if i == A[a]:
      continue
    score[i] -= 1

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

Submission status: Time Limit Exceeded

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

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

for i in range(N):
    if pt[i] >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = list(int(input()) for _ in range(Q))
a = list(set(A))
if Q >= K:
  ans = ["No"] * N
  for i in range(len(a)):
    if K - (Q - A.count(a[i])) > 0:
      ans[a[i]-1] = "Yes"
else:
  ans = ["Yes"] * N

for x in ans:
  print(x)

Submission status: Time Limit Exceeded

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

a = list(set(A))
ans = []
for i in range(N):
  if i + 1 in a:
    if Q - A.count(i + 1) < K:
      ans.append("Yes")
    else:
      ans.append("No")
  elif Q < K:
    ans.append("Yes")
  else:
    ans.append("No")

for x in ans:
  print(x)

Submission status: Time Limit Exceeded

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

def minus(n):
  return n - 1

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

ans = []
for j in range(N):
  if K - sum(score) + score[j] <= 0:
    ans.append("No")
  else:
    ans.append("Yes")

for a in ans:
  print(a)

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
hito=[]
points=[]
for _ in range(Q):
    hito.append(int(input()))
for _ in range(N):
    points.append(K)
for i in hito:
    for j in list(range(0,i-1))+list(range(i,N)):
        points[j]-=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())
a = [int(input()) for _ in range(q)]

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
    j = int(input())

    for k in range(N):

        if k+1 != j:
            A[k] -= 1
            if A[k] == 0:
                B[k] = 'No'

print(*B, sep='\n')

Submission status: Time Limit Exceeded

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

point = [k]*n

for i in a:
  # j+1が回答者a
  for j in range(n):
    if i != j+1:
      point[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
correct = []
score = []

for i in range(q):
    correct.append(int(input()))

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

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

import numpy as np

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K, Q = MAP()
A = np.array([INT() for _ in range(Q)])

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

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

a = point >= 1

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input=sys.stdin.readline
N,K,Q=map(int,input().split())
J=[int(input()) for _ in range(Q)]
for i in range(1,N+1):
    print("Yes" if K-Q+J.count(i)>0 else "No")

Submission status: Time Limit Exceeded

Solution code:
import sys
input=sys.stdin.readline
N,K,Q=map(int,input().split())
J=[int(input()) for _ in range(Q)]
for i in range(1,N+1):
    print("Yes" if K-Q+J.count(i)>0 else "No")

Submission status: Time Limit Exceeded

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

for s in a:
  for i in range(1, n+1):
    if i == s:
      continue
    
    sc[i] -= 1

del sc[0]
for s in sc.values():
  print("Yes" if s > 0 else "No")

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

for a in a_list:
    # for i in range(n):
    #     if i+1 == a:
    #         pass
    #     else:
    #         point_dic[i+1] -= 1
    point_dic = list(map(lambda x: x-1, point_dic))
    point_dic[a-1] = point_dic[a-1] + 1


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

Submission status: Time Limit Exceeded

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

point_dic = {}
for i in range(n):
    point_dic[i + 1] = k

for a in a_list:
    for i in range(n):
        if i+1 == a:
            pass
        else:
            point_dic[i+1] -= 1

for point in point_dic.values():
    if point > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

for i in range(Q):
    who_answered[i] = int(input()) - 1
    participants[who_answered[i]] += 1
    for j in range(N):
        participants[j] -= 1

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
    who_answered[i] = int(input()) - 1
    
for who in who_answered:
    for i in range(N):
        participants[i] -= 1
    participants[who] += 1

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

Submission status: Time Limit Exceeded

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

for _ in range(Q):
    ans = int(input())
    for i in range(1,N+1):
        if i != ans:
            score[i]-=1

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

Submission status: Time Limit Exceeded

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

    pts = [k] * n
    ans = []
    for i in range(q):
        answerer = int(input()) - 1
        pts = [x-1 for x in pts]
        pts[answerer] += 1

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
players=[K for _ in range(N)]
for _ in range(Q):
    i=int(input())-1
    players[i]+=1
    for i in range(len(players)):
        players[i]-=1
for num,p in enumerate(players):
    if p<=0:print('No')
    else: print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n,k,q = map(int,input().split())
ls = []
lp = []
def mai(n):
    return n-1

for i in range(q):
    ls.append(int(input()))

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


for i in range(len(ls)):
    for j in range(len(lp)):
        lp[j] = lp[j] - 1
    lp[ls[i]-1] = lp[ls[i]-1] + 1



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

Submission status: Time Limit Exceeded

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

for a in A:
    score_list = [-1] + [score_list[i]-1 if i != a else score_list[i] for i in range(1, N+1)]

for score in score_list[1:]:
    if score > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# 要復習
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    N, K, Q = MAP()
    A = [INT() for i in range(Q)]
    point = [K for i in range(N)]
    for q in range(Q):
        for j in range(N):
            if j != A[q] - 1:
                point[j] -= 1
    # print(point)
    ans = []
    for i in range(N):
        if point[i] > 0:
            ans.append("Yes")
        else:
            ans.append("No")
    print(*ans)



if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

    for i in range(q):
        maru = int(input())
        for j in range(n):
            if j != maru - 1:
                ls[j] -= 1

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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

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

t = [0] * (n+1)
for i in range(q):
    t[ a[i] ] += 1

p = [k] * (n+1)
for i in range(1, n+1):
    for j in range(1, n+1):
        if i != j:
            p[j] -= t[i]

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
l = [int(input())-1 for _ in range(q)]
l.sort()
 
for i in range(n):
  cnt = 0
  if l and l[0] == i:
    while l and l[0] == i:
      l.pop(0)
      cnt += 1
  print(('No','Yes')[k > q - cnt])

Submission status: Time Limit Exceeded

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

for i in range(n):
  print(('No','Yes')[k > q - l.count(i)])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [0] * n
#print(l)
katen = []
my_append = katen.append
for i in range(q):
    my_append(int(input()))
#print(katen)

my_pop = l.pop
my_insert = l.insert
for j in katen:
    x = my_pop(j-1)
    my_insert(j-1, x+1) 
#print(l)

for y in range(n):
    if l[y] > q-k:
        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)]
win = [0 for _ in range(n)]
p = np.array([k for _ in range(n)])
for ai in a:
  p -= 1
  p[ai-1] += 1
for pi in p:
  if pi<=0: print('No')
  else: print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [0] * n
#print(l)
katen = []
for i in range(q):
    katen.append(int(input()))
#print(katen)
for j in katen:
    x = l.pop(j-1)
    l.insert(j-1, x+1) 
#print(l)

for y in range(n):
    if l[y] > q-k:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [0] * n
#print(l)
katen = []
for i in range(q):
    katen.append(int(input()))
#print(katen)
for j in katen:
#    x = 
    l.insert(j-1, l.pop(j-1)+1)
#print(l)

for y in l:
    if y > q-k:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [0] * n
#print(l)
katen = []
for i in range(q):
    katen.append(int(input()))
#print(katen)
for j in katen:
    x = l.pop(j-1)
    l.insert(j-1, x+1)
#print(l)

for y in l:
    if y > q-k:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [0] * n
#print(l)
katen = []
for i in range(q):
    katen.append(int(input()))
#print(katen)
for j in katen:
    x = l.pop(j-1)
    l.insert(j-1, x+1)
#print(l)

for y in l:
    if y+k-q > 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)]
ans =[]
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 =[int(input()) for _ in range(Q)]
ans =[]
for i in range(N):
    ans.append(A.count(i+1))
for i in range(N):
    if K - (Q-ans[i]) > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
#print(n,k,q)
l = [k-q] * n
#print(l)
katen = []
for i in range(q):
    katen.append(int(input()))
#print(katen)
for j in katen:
    x = l.pop(j-1)
    l.insert(j-1, x+1)
#print(l)

for y in l:
    if y > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def LI():
  return [int(s) for s in input().split()]

N,K,Q = LI()
A_s = np.array([K]*N)

for i in range(Q):
  seikai = int(input())
  for j in range(N):
    if j != (seikai-1):
      A_s[j]-=1
      
for i in range(N):
  if A_s[i] > 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)]
#print(a)

pts = [k for _ in range(n)]

for i in range(q):
    for j in range(n):
        if j != a[i]-1:
            pts[j] -= 1
        else:
            pass
#print(pts)

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

Submission status: Time Limit Exceeded

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

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

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

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):
    point = list(map(lambda x: x-1, point))
    idx = int(input()) - 1
    point[idx] += 1
for j in range(n):
    if point[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)]

if k - q > 0:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = tuple(set(a))
  for i in ans:
    if k - q + a.count(i) > 0:
      res[i-1] = 'Yes'
print('\n'.join(map(str, res)))

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 > 0:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = set(a)
  for i in ans:
    if k - q + a.count(i) > 0:
      res[i-1] = 'Yes'
print('\n'.join(map(str, res)))

Submission status: Time Limit Exceeded

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

res = ['No'] * n
for i in range(n):
  if k - q + a.count(i+1) > 0:
    res[i] = 'Yes'
print('\n'.join(map(str, res)))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N, K, Q = map(int, input().split())
A = np.array([int(input()) for i in range(Q)])
  
points = K - Q
for i in range(1, N+1):
  correct_num = len(np.where(A==i)[0])
  fin_point = points + correct_num
  
  if fin_point > 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([int(input()) for i in range(Q)])
  
points = np.full(N, K) - Q

correct_num = []
for i in range(1, N+1):
  correct_num = len(np.where(A==i)[0])
  fin_point = points[i-1] + correct_num
  
  if fin_point > 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([int(input()) for i in range(Q)])
  
points = np.full(N, K) - Q

correct_num = []
for i in range(1, N+1):
  correct_num.append(len(np.where(A==i)[0]))

correct_num = np.array(correct_num)
fin_points = points + correct_num

ans = np.where(fin_points > 0, "Yes", "No")

for i in ans:
  print(i)

Submission status: Time Limit Exceeded

Solution code:
nkq = list(map(int, input().split()))
n, k, q = nkq[0], nkq[1], nkq[2]
attendees = dict()
for i in range(n):
    attendees[i] = k

attendees = [(i, k) for i in range(n)]

respondents = [int(input()) for i in range(q)]

for r in respondents:
    r_index = r - 1
    for a in attendees:
        i, p = a
        if i != r_index:
            attendees[i] = (i, p - 1)

for a in attendees:
    i, p = a
    if p > 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)]
point_list  = np.array([k] * n)

for i in a:
    point_list -= 1
    point_list[i-1] += 1

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

Submission status: Time Limit Exceeded

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

bi = [int(k) for _ in range(n)]

for i in range(q):
    for s in range(n):
        if ai[i]-1 != s:
            bi[s] -= 1
        
for i in range(n):
    if bi[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

res = [k] * n
for i in range(q):
  a = int(input())
  res = [(elem - 1) for elem in res]
  res[a - 1] += 1

for elem in res:
  if elem > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

def minus(ans_i):
    for i in range(N):
        scores[i] -= 1
    scores[ans_i-1] += 1

for i in range(Q):
    ans_i = int(input())
    minus(ans_i)    

for player in scores:
    if player <= 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=[]
ones=np.ones((1,n,))
point=k*ones
de_point=ones
for i in range(q):
    num=int(input())
    de_point[0,num-1]=0
    point=point-de_point
    de_point[0,num-1]=1
for i in range(n):
    if point[0,i]>0:
        print("Yes")
    elif point[0,i]<=0:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
attend = [K for i in range(N)]
A = 0
for i in range(Q):
	A = int(input())
	for j in range(N):
		if not(j == A-1):
			attend[j]-=1
for i in range(N):
	if(attend[i] <= 0):
		print("No")
	else:
		print("Yes")

Submission status: Time Limit Exceeded

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

for num in A:
    for j in range(1,N+1):
        if not j == num:
            point[j-1] -= 1

for num in point:
    if num > 0:
        print('Yes')
        continue
    print('No')