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

for s in range(n):
  if a[s]>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(' '))
t = [int(input()) for i in range(q)] 
 
ans = [k] * n
 
for i in range(max(t)):
    score = i + 1
    ans[i] += t.count(score)
    
for i in ans:
  if i  - q > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(N):
    score = K - Q + A.count(i)
#    print(score)
    if score > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

point = np.array([A.count(i) for i in range(N)])

score = K - Q + point
result = ['Yes' if score[i] > 0 else 'No' for i in range(len(score))]
for i in range(len(result)):
    print(result[i])

Submission status: Time Limit Exceeded

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

score = K * np.ones(N)

point = np.array([A.count(i) for i in range(N)])
minus = Q - point

score = score - minus
result = ['Yes' if score[i] > 0 else 'No' for i in range(len(score))]
for i in range(len(result)):
    print(result[i])

Submission status: Time Limit Exceeded

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

score = [K] * N

point = [A.count(i) for i in range(N)]
minus = [Q - point[i] for i in range(len(point))]

score = [score[i] - minus[i] for i in range(len(score))]
result = ['Yes' if score[i] > 0 else 'No' for i in range(len(score))]
for i in range(len(result)):
    print(result[i])

Submission status: Time Limit Exceeded

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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


def calc_minus(n):
    return n - 1


for i in solved:
    ilst[i-1] += 1
    ilst = list(map(calc_minus, ilst))


for i in ilst:
    if 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 _ in range(q)]
if k-q>0:
  for _ in range(n):
    print("Yes")
else:
  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 = (int(_) for _ in input().split())
a = [int(input()) for _ in range(q)]

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

Submission status: Time Limit Exceeded

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

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

for i in a:
    nl = [j-1 for j in nl]
    nl[i] += 1

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

Submission status: Time Limit Exceeded

Solution code:
def minus(a):
  return a-1

a = input().split(" ")
mem = [int(a[1])] * int(a[0])
for i in range(int(a[2])):
  mem[int(input())-1] += 1
  mem = list(map(minus, mem))
for i in mem:
  if i < 1:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
people_num, first_point, correct = map(int,input().split())
who_correct = [input() for i in range(correct)]
points = [first_point for i in range(people_num)]

for i in range(correct):
  for j in range(people_num):
    if j != int(who_correct[i])-1:
      points[j] -= 1
      if points[j] == 0:
        points[j] = - 100000000

for i in range(people_num):
  if points[i] < 0:
  	print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
def judge(x):
    if x < 1:
        print('No')
    else:
        print('Yes')

n,k,q = map(int,input().split())
human_list = [k]*n
#print(human_list)
for i in range(q):
    a = int(input())
    human_list = list(map(lambda x: x-1,human_list))
    human_list[a-1] += 1
    #print(human_list)
for i in range(n):
    judge(human_list[i])

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
li = []
for i in range(q):
    li.append(int(input()))
for i in range(n):
    if k - q + li.count(i+1) > 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))

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

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

for p in P:
    if p > 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(N):
	if 0<K-Q+a.count(i+1):
	    print("Yes")
	else:
	    print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q = map(int,input().split())
point = np.array([K] * N)
minus = np.array([-1] * N)
for i in range(0,Q):
    A = int(input())
    point += minus
    point[A-1] += 1
for i in range(0,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())
point = np.array([K for i in range(0,N)])
minus = np.array([-1 for i in range(0,N)])
for i in range(0,Q):
    A = int(input())
    point += minus
    point[A-1] += 1
for i in range(0,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 = []
A = [int(input()) for i in range(Q)]

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

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

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(A.count(i+1))

for i in range(N):
    P = K - Q + p[i]
    if P > 0:
        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)]
for i in range(q):
  a = int(input())
  score[a - 1] += 1
  score = list(map(lambda x: x- 1, score))
for i in range(n):
  if score[i] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = input().split(' ')
n, k, q = int(N), int(K), int(Q)
a = []
for i in range(q):
    a.append(int(input()) - 1)
for i in range(n):
    res = 'No'
    if k - q + a.count(i) > 0:
        res = 'Yes'
    print(res)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = input().split(' ')
n, k, q = int(N), int(K), int(Q)
a = []
p = np.array([k] * n)
d = np.array([1] * n)
for i in range(q):
    a.append(int(input()) - 1)

for i in a:
    d[i] = 0
    p -= d
    d[i] = 1
for i in p:
    res = 'Yes'
    if i < 1:
        res = 'No'
    print(res)

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int, input().split())
correct_answers = [int(input()) for i in range(q)]
points = [k for i in range(n)]
for i in range(q):
    for m in range(len(points)):
        if m != correct_answers[i]-1:
            points[m] -= 1
for point in points:
    if point < 1:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
a = [int(input()) for i in range(q)]
a = sorted(a)
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:
Input = list(map(int,input().split()))

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

for i in range(Input[2]):
    aa = int(input())-1
    
    for k in range(Input[0]):
        point[k] -= 1
    
    point[aa] += 1
gouhi =[]
for i in range(Input[0]):
    bb = 0
    if point[i] > 0:
        bb = "Yes"
    else:
        bb = "No"
    gouhi.append(bb)
print("\n".join(gouhi))

Submission status: Time Limit Exceeded

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

n,k,q = map(int,input().split())
a = [0] * q
b = [0] * n

member = [k]*n

for i in range(q):
    a[i] = int(input())
    member[a[i]-1] = member[a[i]-1] + 1
    member = list(map(minus, member))

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

Submission status: Time Limit Exceeded

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

n,k,q = map(int,input().split())
a = [0] * q
b = [0] * n

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

member = [k]*n

for j in range(q):
    member[a[j]-1] = member[a[j]-1] + 1
    member = list(map(minus,member))

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
a=[]
for q in range(Q):
    a.append(int(input()))

cnt=0
for n in range(N):
    if K - (Q - a.count(n+1)) > 0:    
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split()) #Nは人の人数、Kはみなが最初に持っているポイント、Qはクイズの回数
L=[K]*N
for i in range(Q):
  m=int(input())-1
  for j in range(N):
    if j!=m:
      L[j]-=1
for k in range(N):
  if L[k]>0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
def minus_point(num,point,N):
    for i in range(N):
        if i != num-1:
            point[i] = point[i] - 1
        else:
            continue

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

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



for i in range(Q):
    minus_point(A[i], point, N)

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    n, k, q = map(int, args[0].split())
    A = list(map(int, args[1:]))
    ret = ''
    p = 0
    for a in sorted(set(A)):
        ret += ('Yes\n' if 0 < k-q else 'No\n')*(a-p-1)
        ret += ('Yes' if 0 < k - (q - A.count(a)) else 'No') + '\n'
        p = a

    ret += ('Yes\n' if 0 < k-q else 'No\n')*(n-p)
    return ret.rstrip('\n')


if __name__ == "__main__":
    nkq = input()
    _, _, q = map(int, nkq.split())
    print(solve(*([nkq]+[input() for _ in range(q)])))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n, k, q = map(int, input().split())
correct = []
orig = np.ones(n) * k
for i in range(q):
    tmp = int(input())
    orig -= 1
    orig[tmp-1] += 1
for i in orig:
    if 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())
correct = []
orig = np.ones(n) * k
for i in range(q):
    correct.append(int(input()))
for i in correct:
    orig -= 1
    orig[i-1] += 1
for i in orig:
    if i <=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for _,q in enumerate(A):
    for n,p in enumerate(point):
        if q == (n+1):
            continue
        else:
            point[n] = p-1

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = [int(i) for i in input().split()]
mem_point = [K for i in range(N)]
_points = [-1 for i in range(N)]


for rounds in range(Q):
  temp = _points.copy()
  anser = int(input())
  temp[anser-1] = 0
  mem_point = list(map(lambda x,y:x+y,mem_point,temp))
  
for point in mem_point:
  if 0 < point:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = [int(i) for i in input().split()]
mem_point = [K for i in range(N)]
for rounds in range(Q):
  anser = int(input())
  for i in range(len(mem_point)):
    if anser == (i+1):
      pass
    else:
      mem_point[i] -= 1
      
for point in mem_point:
  if point > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

for i in range(q):
    ans = int(input())
    point=list(map(lambda x:x-1,point))
    point[ans-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
nkq = list(map(int, input().split()))

n = nkq[0]
k = nkq[1]
q = nkq[2]
aes = []
for _ in range(q):
    aes.append(int(input()))
    
    
points = np.ones(n) * k
for a in aes:
    points = points -1
    points[a-1] = points[a-1] + 1
    
    
for p in points:
    if p > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

points = [k] * n
for a in aes:
    points =list(map(lambda p: p-1, points))
    points[a-1] = points[a-1] + 1
    
answer = [ "Yes" if p >0  else "No" for p in points]
for ans in answer:
    print(ans)

Submission status: Time Limit Exceeded

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

points = [k] * n
for a in aes:
    for i in range(n):
        if (a-1) == i:
            points[i] = points[i]
        else:
            points[i] = points[i] -1
for i in range(n):
    if points[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int, input().split())
A=[int(input()) for i in range(0,Q)]
k=[K for i in range(0,N)]
for i in A:
    t=k[i-1]
    for n in range(0,N):
        k[n]-=1
    k[i-1]=t
for r in k:
    if r>=1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

# N:人数 K:初期ポイント Q:ラウンド内回数 A:正解者ID
N,K,Q = map(int, input().split())
A = []
for i in range(Q):
  A.append(int(input()))

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

score = np.full(N, K)
for rd in range(Q):
  score = score - 1
  score[A[rd]-1] = score[A[rd]-1] + 1
  
for ID in range(N):
  if score[ID] <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

score = [K]*N
for A in A_lis:
    for i in range(len(score)):
        if i!=A-1:
            score[i]-=1
for i in range(len(score)):
    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)]

point = [k - q] * (n + 1)

for x in range(q):
    for y in range(n) :
        if y + 1 == a[x] :
            point[y] += 1

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

Submission status: Time Limit Exceeded

Solution code:
# n人がkポイント持っていてq回正解が出る
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]

point =[k for j in range(n)]

# q回続ける
# listのn番目の数字は-1しない

for x in range(q):
    for y in range(n) :
        if y + 1 != a[x] :
            point[y] += -1

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

Submission status: Time Limit Exceeded

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

for i in range(q):
  s.append(int(input()))
for i in range(q):
  for j in range(n):
    if s[i]!=(j+1):
      d[j]-=1
for i in range(n):
  if d[i]<=0:
    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):
    Ax = int(input())
    for j in range(N):
        if (j+1) != Ax:
            A[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
x = input().split()
member = [int(x[1])] * int(x[0])

for l in range(int(x[2])):
  y = input()
  for i,point in enumerate(member):
    if (int(y)-1) != i:
      member[i] = (point -1)
      
for z in member:
  if z > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
x = input().split()
y = [int(input()) for i in range(int(x[2]))]
member = [int(x[1])] * int(x[0])

for l in y:
  for i,point in enumerate(member):
    if (l-1) != i:
      member[i] = (point -1)
      
for z in member:
  if z > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
x = input().split()
y = []
member = [int(x[1])] * int(x[0])
for i in range(int(x[2])):
  tmp = input()
  y.append(int(tmp))

for l in y:
  for i,point in enumerate(member):
    if (l-1) != i:
      member[i] = (point -1)
      
for z in member:
  if z > 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()))
B = []
for j in range(N):
  B.append(K-Q+A.count(j+1))
  
for k in range(N):
  if B[k] > 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()))
B = []
for j in range(N):
  B.append(K-Q+A.count(j+1))
  if B[len(B)-1] > 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()))
B = []
for j in range(N):
  B.append(K-Q+A.count(j+1))
  
for k in range(N):
  if B[k] > 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()))
#print(A)
B = [K for i in range(N)]
#print(B)
for i in range(Q):
  for j in range(N):
    if j+1 != A[i]:
      B[j] -= 1
#print(B)
for k in range(N):
  if B[k] > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
ini_point = [k] * n
dec_point = [-q] * n
answerer = []
count_ans = []
for i in range(q):
    answerer.append(int(input()))
for i in range(1,n+1):
    count_ans.append(answerer.count(i))
for i in range(n):
    last_point = dec_point[i] + count_ans[i] + ini_point[i]
    if last_point > 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()]
    a = []
    for i in range(q):
        a.append(int(input()))

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

    life = np.array(life)
    for i in range(q):
        temp = [1]*n
        temp[a[i]-1] = 0
        life -= temp

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

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

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))
    result = ['Yes']*n
    for i in range(q):
        for j in range(n):
            if result[j] == 'No':
                continue
            if a[i] != j+1:
                life[j] -= 1
                if life[j] <= 0:
                    result[j] = 'No'
    for i in range(n):
        print(result[i])

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

    result = ['Yes']*n
    for i in range(q):
        for j in range(n):
            if a[i] == j+1:
                continue
            life[j] -= 1
            if life[j] <= 0:
                result[j] = 'No'
    for i in range(n):
        print(result[i])

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

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

for i in range(N):
  print('Yes' if result[i]>0 else '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)]
x = np.array([K]*N)
x_1 = np.array([-1]*N)
for j in range(Q):
    answer = A[j]-1
    x = x+x_1
    x[answer] =x[answer]+1
for k in range(N):
    if x[k]>=1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K, Q = map(int, input().split())
p = [K] * N
m = [1] * N
for i in range(Q):
  A = int(input())
  p = [p[i] - m[i] for i in range(len(p))]
  #p = p - m
  p[A-1] = p[A-1] + 1
  if sum(p) == 0:
    break
for s in p:
  if s > 0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


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

score_l = [K] * N

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


for score in score_l:
        if score <= 0:
                print("No")
        else:
                print("Yes")

Submission status: Time Limit Exceeded

Solution code:
def participants_maker(number_of_participates,point):
    return [point]*number_of_participates



def point_getter(participates,respondents):
    for i in range(len(respondents)):
        participates = list(map(lambda x : x-1, participates))
        participates[respondents[i]-1] += 1
    return participates

def discriminate_serviver(result_score):
    result_list = []
    for i in range(len(result_score)):
        if result_score[i] <= 0:
            result_list.append("No")
            print("No")
        else:
            result_list.append("Yes")
            print("Yes")
    return result_list

def main():
    li = list(map(int,input().split()))
    respondents = [int(input()) for i in range(li[2])]
    participates = participants_maker(li[0],li[1])
    result_score = point_getter(participates,respondents)
    discriminate_serviver(result_score)


# if __name__ == "__main__":
#     main()

main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for j in range(0,N):
    score[j]=score[j]-(Q-A.count(j+1))
    if(score[j]>0):
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

n, k, q = map(int, input().split())
a_list = [k] * n
# 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:
from collections import Counter
N, K, Q = map(int, input().strip().split())
ansl = [int(input().strip()) for _ in range(Q)]
countl = Counter(ansl)
for i in range(N):
    pid = i+1
    if sum([v for k,v in countl.items() if k != pid]) < K:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split(' '))
p_list = [int(input()) for _ in range(q)]
scores = [k for _ in range(n)]
for p in p_list:
    for i in range(len(scores)):
        if i+1 != p:
            scores[i] -= 1
        else:
            pass

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a_list = [int(input()) for _ in range(q)]
if k > q:
    for _ in range(n):
        print('Yes')
else:
    point_list = [k for _ in range(n)]
    for a in a_list:
        one_list = [1 for _ in range(n)]
        one_list[a-1] = 0
        point_list = [point - one_list[i] for i, point in enumerate(point_list)]
    for point in point_list:
        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 i in range(q)]
a_set=set(a)
b=q-k+1
san=list(range(1,n+1))
for i in san:
    if i in a_set and b>0:
        if a.count(i)>=b:
            print('Yes')
        else:
            print('No')
    elif b<=0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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