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()) for i in range(Q)]
for i in range(1,N+1):
    if len(A) - A.count(i) >= K:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

for i in range(Q):
    a=list(map(lambda x: x-1, a))
    a[int(input())-1]+=1
for i in range(N):
    if a[i]>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for x in win_list:
    for a, b in enumerate(score):
        if not a == x-1:
            score[a] = b-1

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

Submission status: Time Limit Exceeded

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

score = [0] * N
for x in win_list:
    for a, b in enumerate(score):
        if not a == x-1:
            score[a] = b-1

final_score = [a+b for a, b in zip(first_score, score)]

for s in final_score:
    if s > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k ,q = list(map(int, input().split()))
li = [input() for i in range(q)]
list = []
for j in range(1,n+1):
    L = str(j)
    if li.count(L) > q - k:
        list.append('Yes')
    else:
        list.append('No')
[print(x) for x in list]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for l in range(1,n+1):
    b = 0
    for m in range(q):
        if l == a[m]:
            b += 1
    if k-(q-b) > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split(' '))
score_list = [k for i in range(n)]
def minus(x):
    return x - 1
seikaisya_list = [int(input()) for i in range(q)]
for i in seikaisya_list:
    score_list = list(map(minus,score_list))
    score_list[i-1] = score_list[i-1] + 1
for i in score_list:
    if i > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = list(map(int,input().split(' ')))
import numpy as np
point =np.full(n,k)
for i in range(q):
  point-=1
  point[int(input())-1]+=1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


for i in range(q): # q = 正解者のかず
	correctAnswer[i] = int(input())

for correct in correctAnswer:
	for i in range(n):# n = 参加者の人数
		participant[i] -= 1 
	participant[correct-1] += 1



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

Submission status: Time Limit Exceeded

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

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

for i in A:
    answers[i] += 1

for i, val in enumerate(answers):
    result = list(map(lambda x: x-val, result))
    result[i] += val

for i in list(map(lambda x: "Yes" if x > 0 else "No", result)):
    print(i)

Submission status: Time Limit Exceeded

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

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

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

for i in list(map(lambda x: "Yes" if x > 0 else "No", result)):
    print(i)

Submission status: Time Limit Exceeded

Solution code:

import numpy as np

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

A = list()
while True:
    try:
        A.append(int(input()))
    except EOFError:
        break

scores = np.zeros((N), dtype=np.int32)

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

scores = scores + K

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

Submission status: Time Limit Exceeded

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

n, k, q = map(int, input().split())
a_list = []
for _ in range(n):
    a_list.append(k)
#print(a_list)
for _ in range(q):
    a = int(input())
    a_list = list(map(calc_minus, a_list))
    #print(a_list)
    a_list[a-1] = a_list[a-1] + 1
    #print(a_list)

#print(a_list)
for j in a_list:
    if int(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=np.array([int(input())-1 for i in range(Q)])

for j in range(N):
    if K+np.count_nonzero(A==j)>Q:
        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)]
P = [K for i in range(N)]
for i in range(Q):
        for j in range(N):
                if j==A[i]-1:
                        continue
                else:
                        P[j] -= 1
for i in range(N):
        if P[i] <= 0:
                print("No")
        else:
                print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def t(n, k, q, a):
    for i in range(n):
        print("Yes" if (-q + k + a.count(i + 1)) > 0 else "No")

if __name__ == "__main__":
    n, k, q = map(int, input().split())
    a = [int(input()) for i in range(q)]
    r = t(n, k, q, a)

Submission status: Time Limit Exceeded

Solution code:
def t(n, k, q, a):
    p = [-q + k] * n
    for i in range(n):
        p[i] += a.count(i + 1)
    return ["Yes" if i > 0 else "No" for i in p]


if __name__ == "__main__":
    n, k, q = map(int, input().split())
    a = [int(input()) for i in range(q)]
    r = t(n, k, q, a)
    for i in r:
        print(i)

Submission status: Time Limit Exceeded

Solution code:
def t(n, k, q, a):
    p = [k] * n
    for i in range(q):
        for j in range(n):
            if a[i]-1 != j:
                p[j] -= 1
    return ['Yes' if i > 0 else 'No' for i in p]


if __name__ == "__main__":
    n, k, q = map(int, input().split())
    a = [int(input()) for i in range(q)]
    r = t(n, k, q, a)
    for i in r:
        print(i)

Submission status: Time Limit Exceeded

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

list_seikaisha =[]

for i in range(Q):
    list_seikaisha.append(int(input())-1)

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

for seikaisha in list_seikaisha:
    list_pt=[x-1 for x in list_pt]
    list_pt[seikaisha]=list_pt[seikaisha]+1

list_YN=[]
f=lambda pt:"Yes" if pt>=1 else "No"
for pt in list_pt:
    print(f(pt))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

list_seikaisha =[]

for i in range(Q):
    list_seikaisha.append(int(input())-1)

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

for seikaisha in list_seikaisha:
    arr_pt=arr_pt-1
    arr_pt[seikaisha]=arr_pt[seikaisha]+1

list_YN=[]
f=lambda pt:"Yes" if pt>=1 else "No"
for pt in arr_pt:
    print(f(pt))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

points = [K] * N

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

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

Submission status: Time Limit Exceeded

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

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

for ans in A:
    for i in range(len(points)):
        if ans - 1 == i:
            continue
        points[i] -= 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())
Q=[]
for j in range(q):
    Q.append(input())
for l in range(1,n+1):
    a=Q.count(str(l))
    if k>(q-a):
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

A = [K]*N

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

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

Submission status: Time Limit Exceeded

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

j = 0
c = 0
 
def calc_de(n):
    return n - 1
 

A = [int(input()) for index in range(Q)]
 
S = [k]*N
 
for j in A:
    S = list(map(calc_de, S))
    S[j-1] += 1
 
for c in range(N):
    if S[c] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N, k, Q = map(int, input().split())
A =[]
i = 0
j = 0
c = 0
 
def calc_de(n):
    return n - 1
 
for i in range(Q):
  A.append(int(input()))
 
S = [k]*N
 
for j in A:
    S = list(map(calc_de, S))
    S[j-1] += 1
 
for c in range(N):
    if S[c] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int, input().split(" ")) #N:参加者 K:ポイント Q:正解数
A = [K]*N

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

for point in A:
    if point<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
#N:人数、K:初期ポイント、Q：正解者が出た回数、A:誰が正解したかを示すリスト
N,K,Q=map(int,input().split())
A=[]
for i in range(Q):
    Ai=int(input())
    A.append(Ai)

#参加者の初期ポイントの定義
Point=[K for i in range(N)]

#ポイント操作
for i in range(len(A)):
    Point=list(map(lambda x:x-1,Point))
    Point[A[i]-1]+=1

#ポイント評価
for i in Point:
    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 i in range(Q)]
P = [K for i in range(N)]


for ans in A:
    for index in range(N):
        if (ans-1)==index:
            continue
        P[index]-=1

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
    A.append(int(input()))
for i in range(N):
    P.append(K)

for ans in A:
    for index,value in enumerate(P):
        if (ans-1)==index:
            continue
        P[index]-=1

for value in P:
    if value<=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)]
b=[k]*n
c=[0]*n

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

for i in range(n):
    if b[i]<=0:
        c[i]='No'
    else:
        c[i]='Yes'

for i in range(n):
    print(c[i])

Submission status: Time Limit Exceeded

Solution code:
#C
#モジュール
import numpy as np
#入力
N,K,Q=map(int,input().split())
A=[int(input()) for i in range(Q)]
pt=np.array([K for i in range(N)])

#処理
#点数の算出
for i in A:
    pt[:i-1]=pt[:i-1]-1
    pt[i:]=pt[i:]-1
#敗退か否かの出力
for i in pt:
    if i>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

lis = []
for _ in range(Q):
    lis.append(int(input()))

point = [K] * N

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

    for j in range(N):
        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

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

point = numpy.full(N, K)
lose_point = numpy.ones(N)
for _ in range(Q):
    winnner = int(input())
    point -= lose_point
    point[winnner-1] += 1

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

Submission status: Time Limit Exceeded

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

point = [K] * N
for _ in range(Q):
    winnner = int(input())
    for idx in range(N):
        point[idx] -= 1
    point[winnner-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:


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

point = [K] * N
for _ in range(Q):
    winnner = int(input())
    lose_point = [1] * N
    lose_point[winnner-1] = 0
    point = [x-y for (x,y) in zip(point,lose_point)]

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
mem = [i+1 for i in range(n)]
correct = []
for j in range(q):
    correct.append(int(input()))
score = [k]*n
for h in range(len(correct)):
    score = list(map(lambda x: x-1, score))
    score[correct[h]-1] += 1
for i in range(len(mem)):
    if score[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)]
class Member:
    def __init__(self, answer):
        self.answer = answer
    def judge(self):
        if self.answer <= q-k:
            return 'No'
        else:
            return 'Yes'
for i in range(n):
    member_i = Member(a.count(i+1))
    print(member_i.judge())

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]
class Member:
    def __init__(self, answer):
        self.answer = answer
    def judge(self):
        if self.answer <= q-k:
            return 'No'
        else:
            return 'Yes'  
members = [Member(a.count(i+1)) for i in range(n)]
for member in members:
    print(member.judge())

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]
class Member:
    def __init__(self, answer, point):
        self.answer = answer
        self.point = point
    def judge(self):
        if self.point <= 0:
            return 'No'
        else:
            return 'Yes' 
members = [Member(a.count(i+1), k)
                  for i in range(n)]
for member in members:
    member.point = member.point - q + member.answer
    print(member.judge())

Submission status: Time Limit Exceeded

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

class Member:
    def __init__(self, answer, point):
        self.answer = answer
        self.point = point
    def judge(self):
        if self.point <= 0:
            return 'No'
        else:
            return 'Yes'
        
members = [Member(a.count(i+1), k)
                  for i in range(n)]


for member in members:
    member.point = member.point - q + member.answer
    print(member.judge())

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = map(int, input().split(" "))
point_list = np.array([K]*N)

change = np.array([0]*N)
cnt = 1

ans_num_list = [int(input()) for _ in range(Q)]
#print(ans_num_list)

for i in ans_num_list:
  change[i-1] += 1
  change = change - 1

output = point_list + change
# print(output)

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = map(int, input().split(" "))
point_list = np.array([K]*N)

cnt = 1
while Q >= cnt:
  ans = int(input()) -1 
  point_list[ans] = point_list[ans] + 1
  point_list = point_list - 1
  cnt = cnt + 1

# print(point_list)
for i in range(N):
  if point_list[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 = [k for i in range(n)]
def judge(x):
    if p[x] <= 0:
        return 'No'
    else:
        return 'Yes'
for j in range(q):
    for i in range(n):
     if i + 1 == a[j]:
        continue
     else:
        p[i] -= 1
b = [judge(i) for i in range(n)]
print('\n'.join(b))

Submission status: Time Limit Exceeded

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

score = [K for i in range(N)]
S = []
for _ in range(Q):
    S.append(int(input())-1)

for i in S:
    for j in range(len(score)):
        if i != j:
            score[j]=score[j]-1

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

Submission status: Time Limit Exceeded

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

al=[int(input()) for i in range(q)]
pointl=[k for i in range(n)]

for i in range(q):
  pointl=[point-1 for point in pointl]
  pointl[al[i]-1]+=1
  #print(pointl)
#print(pointl)
for p in pointl:
  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)]
pt = [K - Q]*(N + 1)

for i in range(Q):
  for n in range(len(pt)):
    if n == A[i]:
      pt[n] += 1

for n in range(1, len(pt)):
  if pt[n] > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
import sys

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

    A = [int(input()) for _ in range(Q)]
#   print(A)

    pt = [K]*(N + 1)
#   print(pt)

    for i in range(Q):
        for n in range(len(pt)):
            pt[n] -= 1
            if n == A[i]:
                pt[n] += 1
#       print("{0}: {1}".format(i, pt[1:]))

#   print(pt)
    for n in range(1, len(pt)):
        if pt[n] > 0:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
data = input().split()
tab = [int(data[1])]*int(data[0])
n = int(data[2])
    
for i in range(n):
    value =int(input())
    tab[value - 1] += 1
    j =0
    while (j < len(tab)):
        tab[j] -= 1
        j += 1
        
for i in tab:
    if (i > 0):
        print ("Yes")
    else:
        print ("No")

Submission status: Time Limit Exceeded

Solution code:
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))

import numpy as np
n,k,q = mi()
a=np.array([int(input()) for i in range(q)])

point = np.array([k for i in range(n)])

for i in range(q):
    point -= 1
    b = a[i]-1
    point[b] += 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())
points = [k] * n

mi = lambda x: x - 1

for _ in range(q):
    win = int(input())
    #points = [p-1 for p in points]
    points = list(map(mi, points))
    points[win-1] += 1

for i in points:
    if i >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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


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

for i in points:
    if i >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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


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

winner_point = max(points)
winners = [i for i in range(n) if points[i] == winner_point]
for i in range(n):
    if i in winners or points[i] >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

N,K,Q=(int(a) for a in input().split())



i=0

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

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
def di(n):
    return n-1

N,K,Q=(int(a) for a in input().split())



i=0

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys

N,K,Q=(int(x) for x in input().split())
#Ai=[]
par=[]
for i in range(N):
	par.append(K)


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


#Ai.append(a)
#print(par)
for i in range(N):
	if par[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)]

point = []

for i in range(N):
    point.append(K)
    
for i in range(Q):
    for j in range(N):
        if j == A[i]-1:
            pass
        else:
            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 sys
input = sys.stdin.readline

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

import numpy as np
p=np.zeros(N).astype(int)+K

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

Submission status: Time Limit Exceeded

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

import numpy as np
p=np.zeros(N).astype(int)+K

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

Submission status: Time Limit Exceeded

Solution code:
NKQ = list(map(int,input().split()))
point = [NKQ[1]]*NKQ[0]

for i in range(NKQ[2]):
    A = int(input())
    for j in range(NKQ[0]):
        if j != A-1:
            point[j] -= 1

for k in range(NKQ[0]):
    if point[k] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

final = [K-Q for i in range(N)]
add = [Ai.count(i+1) for i in range(N)]

scores = list(map(lambda x, y: x+y, final, add))

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

Submission status: Time Limit Exceeded

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

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

for j in range(Q):
    scores = list(map(lambda x: x - 1, scores)) 
    scores[Ai[j] - 1] += 1
    scores = scores

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

Submission status: Time Limit Exceeded

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

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

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

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = (int(x) for x in input().split())
#参加者全員分の残りポイントが入ったリスト[3,3,3,3,3,3]を作る
point = []
for i in range(N):
    point.append(K)
#正解者の入力に応じてpointを減らしていく[3,3,3,3,3,3]→[2,2,3,2,2,2]
for i in range(Q):
    currect_person = int(input())
    for j in range(N):
        if j != currect_person-1:
            point[j] -= 1
    #print(point)

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())
alist = [int(input()) for i in range(q)]

for i in range(1, n + 1):
    if k + (-1)*(q - alist.count(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)]

for i in range(1, n + 1):
    if q - a.count(i) >= k:
        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(input())
i=1
while i<n+1:
  i=str(i)
  x=A.count(i)
  if k>q-x:
    print("Yes")
  else:
    print("No")
  i=int(i)
  i=i+1

Submission status: Time Limit Exceeded

Solution code:
def main():
    N, K, Q, *A = map(int, open(0).read().split())
    A = [K + A.count(i) for i in range(1, N + 1)]
    print("\n".join(["Yes" if Q < a else "No" for a in A]))
    return


main()

Submission status: Time Limit Exceeded

Solution code:
def main():
    N, K, Q, *A = map(int, open(0).read().split())
    print("\n".join(["Yes" if Q < K + A.count(i)
                     else "No" for i in range(1, N + 1)]))
    return


main()

Submission status: Time Limit Exceeded

Solution code:
import sys

N,K,Q=map(int,sys.stdin.readline().split())
A=[int(sys.stdin.readline())-1 for i in range(Q)]

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

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
import sys
input = sys.stdin.readline

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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