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:
def point(m, list):
    for i in range(len(list)):
        if i+1 == m:
            pass
        else:
            list[i] -= 1
N, K, Q = map(int, input().split())
list = [int(input()) for i in range(Q)]
p_list = []
for i in range(N):
    p_list.append(K)
for i in list:
    point(i, p_list)
for i in p_list:
    if 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 _ in range(n)])

for _ in range(q):
    point = point -1    
    point[int(input()) -1] += 1
for i in range(len(point)):
    print('No' if point[i] <= 0 else 'Yes')

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = [int(input()) for _ in range(Q)]
Point_0 = [K for _ in range(N)]
for a in A:
    for i in range(N):
        if i != a-1:
            Point_0[i] -= 1
for p in Point_0:
    if p > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N, K, Q = list(map(int, input().strip().split()))
As = [int(input()) for _ in range(Q)]

points = np.asarray([K for _ in range(N)])
for A in As:
    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(s) for s in input().split(' ')]
A = [int(input()) for s in range(Q)]

# syoki_tokuten = [K for s in range(N)]
syoki_tokuten = [0 for s in range(N)]

for i in A:
  syoki_tokuten[i-1] += 1
  
for i in range(N):
  genten = sum(syoki_tokuten) - syoki_tokuten[i]

  if genten < K:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

a = [int(input()) for i in range(n[2])]
kk = n[1]-n[2]


for i in range(n[0]):
    if kk+a.count(i+1) <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N, K ,Q = list(map(int, input().split()))
Point = [K for n in range(N)]
for q in range(Q):
    A = int(input()) - 1
    for n in range(N):
        if n == A:
            Point[n] += 0
        else:
            Point[n] -= 1

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

Submission status: Time Limit Exceeded

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

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

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

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

big_prime = 1000000007

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

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
n,k,q =  map(int, sys.stdin.readline().split())
l=[k]*n
p=[1]*n
def penalty(b):
    return b - 1

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

for e in l:
    if e <=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

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

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

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
S = [K for _ in range(N)]
for n in range(Q):
    A = int(input())
    win = S[A-1]
    S = [s-1 for s in S]
    S[A-1] = win
for i in range(len(S)):
    ans = "Yes" if S[i] >0 else "No"
    print(ans)
print("")

Submission status: Time Limit Exceeded

Solution code:
input_line=list(map(int,input().split()))
N=input_line[0]
K=input_line[1]
Q=input_line[2]


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

point_lis=[]
for n in range(N):
    point_lis.append(K)

#q:ラウンド数
for q in range(Q):
    #参加者
    for n in range(N):
        if A_lis[q]-1==n:
            continue
        else:
            point_lis[n]-=1

for n in range(N):
    if point_lis[n]>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)]
Pt=[K]*N
for i in range(Q):
    Pt=[k-1 for k in Pt]
    Pt[A[i]-1]=Pt[A[i]-1]+1
for j in range(N):
    print("No" if Pt[j]<=0 else "Yes")

Submission status: Time Limit Exceeded

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

points = [K] * N

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

for k in range(len(points)) :
    if points[k] <= 0 :
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
import numpy as np
p_list = np.zeros(n) +  k

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

for i in range(n):
    if p_list[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())
i = np.array([k]*n)

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

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
point = {}
tmp = 0

for i in range(q):
    tmp = int(input())
    if tmp in point:
        point[tmp] += 1

    else:
        point[tmp] = 1

for b in range(1, n + 1):
    tmp = 0
    for c in point:
        if c == b:
            continue

        else:
            tmp += point[c]

    if tmp >= k:
        print("No")

    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
Ans = [int(input()) for i in range(q)]
for j in range(n):
	if k - q + Ans.count(j+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 i in range(Q)]
point=[K for i in range(N)]
for i in range(Q):
  for j in range(N):
    if not j==a[i]-1:
      point[j]=point[j]-1
re=[]
for j in range(N):
  if point[j]<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

ptsList = []
handy = Q - K
for i in range(N):
    ptsList.append(0)
if K - Q > 0:
    for i in range(N):
        print("Yes")
else:
    for i, Ai in enumerate(aList):
        AiPts = ptsList[Ai-1]
        AiPts += 1
        ptsList.pop(Ai-1)
        ptsList.insert(Ai-1, AiPts)

    for i, e in enumerate(ptsList):
        if e > handy:
            print("Yes")
        else:
            print("No")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = tuple(map(int, input().split()))
scores = [k]*n
for i in range(q):
    answered = int(input()) - 1
    scores[answered] += 1
    scores = [v - 1 for v in scores]
for i in range(n):
    result = "Yes" if scores[i] > 0 else "No"
    print(result)

Submission status: Time Limit Exceeded

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

P = [int(K) for i in range(N)]

for q in range(Q):
    P[int(input())-1] += 1
    for k in range(N):
        P[k] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

a = []

for i in range(n[2]):
    a.append(int(input()))

m = [n[1]]*n[0]

x = np.array(m)
for j in range(n[2]):
    x -= 1
    x[a[j]-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
import sys

N,K,Q = list(map(int,input().split()))
A = []
for i in range(Q):
  tmp = int(input())
  A.append(tmp)
  
if K > Q:
  for i in range(N):
    print('Yes')
  sys.exit()
K_Q = K-Q
A_set = set(A)
for i in range(N):
  if i + 1 in A_set:
    if K_Q + A.count(i+1) > 0:
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = [int(input()) for _ in range(Q)]
for i in range(N):
    katisuu = A.count(i+1)
    point = Q - katisuu

    if point < K:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:

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

ans = [K] * N

for i in range(Q):
    n = int(input())
    for j in range(len(ans)):
        if j != n - 1:
            ans[j] -= 1

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

Submission status: Time Limit Exceeded

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

# syoki_tokuten = [K for s in range(N)]
syoki_tokuten = [0 for s in range(N)]

for i in A:
  syoki_tokuten[i-1] += 1
  
for i in range(N):
  genten = sum(x for i_s,x in enumerate(syoki_tokuten) if i_s != i)

  if genten < K:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
Point_list = [K] * N
for i in range(Q):
    A = int(input())
    Point_list = list(map(lambda x: x - 1, Point_list))
    Point_list[A-1] += 1
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())
S = []
A = []

for a in range(q) :
    A.append(int(input()))

for i in range(n) :
    S.append(int(k))
    S[i] = S[i] - len(A) + A.count(i+1)
    if S[i] > 0 :
        print('Yes')
    else :
        print('No')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
P = [K]* N
def calc(n):
    return n - 1

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

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 = list(map(int, [K]*N))
s = [input() for i in range(Q)]

for i in s:
    A[int(i)-1] += 1
    num = 0
    for _ in A:
        A[num] -= 1
        num += 1

for i in A:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
anss = []
for i in range(q):
  anss.append(int(input()))
#N人、持ち点K、問題Q
atd = []
for i in range(n):
  atd.append(k)
  
for i in anss:
  atd = list(map(lambda x:x -1,atd))
  atd[i-1] += 1
  
for i in atd:
  if i >0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

score = [k]*n
for i in A:
    score = list(map(lambda x: x-1, score))
    score[i-1] = score[i-1]+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())

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

#print(N,K,Q)
#print(A)

P = [K for _ in range(N)]
#print(P)
for a in A:
    for n in range(N):
        if not(n==(a-1)):
            P[n] -= 1

#print(P)

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = input().split()
N = int(n)
K = int(k)
Q = int(q)
Q_list = []
for i in range(Q):
    Q_list.append(int(input()))

for i in range(N):
    p = K - (Q - Q_list.count(i + 1))
    if p <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,k,q =  list(map(int, input().split()))
a = [int(input()) for i in range(q)]
import numpy as np
p = np.ones(n) * k

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

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

Submission status: Time Limit Exceeded

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

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

for i in l:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

for i in range(Q):
    ans = int(input())
    score -= 1
    score[ans-1] += 1
for v in score:
    if v < 1:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int, input().split())
guys = n
def f(x):return x-1
m = [k]*n
for i in range(q):
  a = int(input())
  m[a-1] += 1
  n -= m.count(1)
  m = list(map(f, m))
for i in range(guys):
  if m[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(list(map(int, input().split()))[0])
    
import numpy as np

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

for _a in a:
    player[_a-1] += 1
    player -= 1
           
for _p in player:
    if _p > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
points = [k for i in range(n)]
winner = [int(input()) for i in range(q)]
# print(points,winner)
for i in range(q):
    # print(i,'番目の問題')
    points = [j-1 for j in points]
    # print(winner[i])
    points[winner[i]-1] += 1
for i in points:
    if i <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
n,k,q=map(int,input().split())
A=[int(input()) for _ in range(q)]

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

Submission status: Time Limit Exceeded

Solution code:
i=input().split(" ")
N=int(i[0])
K=int(i[1])
Q=int(i[2])
A=[]
for i in range(Q):
  A.append(int(input())-1)
P=[]
for i in range(N):
  P.append(K)
for i in A:
  for i2 in range(len(P)):
    if i2 != i:
      P[i2]=P[i2]-1
for i in P:
  if i>0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

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

for i in range(n[0]):
    if n[1]-(n[2]-a.count(i+1)) <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

part = []
for _ in range(N):
    part.append(K)

for ans in A:
    for i in range(N):
        part[i] -= 1

    part[ans - 1] += 1

for x in part:
    if x <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

Answer_list = list()
point_list = [K] *N
for i in range(0,Q):
    Answer_list.append(int(input()))

for j in Answer_list:
    for k in range(0,N):
        if k != j-1:
            point_list[k] -= 1

for l in point_list:
    if l <= 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 hogehoge in range(q))
acount = []
for i in range(1,n+1):
         acount.append(a.count(i))
for j in range(n):
         if acount[j] >= (q-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())
point = np.array([k for _ in range(n)])


def judge(point):
    ans = []
    if k > q:
        return(['Yes' for _ in range(n)])
    for _ in range(q):
        a = int(input())
        point -= 1
        point[a-1] += 1
    for i in range(n):
        if point[i] > 0:
            ans.append('Yes')
        else:
            ans.append('No')
    return(ans)
            

ans = judge(point)
print(*ans)

Submission status: Time Limit Exceeded

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

P = [K] * N
for i in range(Q):
    tmp = int(input()) - 1
    for j in range(N):
        if j != tmp:
            P[j] -= 1
for n in range(N):
    ans = 'Yes'
    if P[n] <= 0:
        ans = 'No'
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
def A():
    w = ['Sunny', 'Cloudy', 'Rainy']
    today = input()
    index = w.index(today)
    if index == 2:
        index = -1
    print(w[index+1])

def B():
    odd = 'RUD'
    even = 'LUD'

    s = input()
    for i in range(len(s)):
        if (i+1)%2 == 0:
            if s[i] not in even:
                print('No')
                return
        else:
            if s[i] not in odd:
                print('No')
                return
        
    print('Yes')

def C():
    temp = [int(i) for i in input().split()]
    N = temp[0]
    K = temp[1]
    Q = temp[2]
    points = [0]*N
    # for i in range(N):
    #     points[i] = K

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

    for i, p in enumerate(points):
        if K-sum([x for j,x in enumerate(points) if j!=i]) > 0:
            print('Yes')
        else:
            print('No')
    
C()

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = (int(x) for x in 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')

Submission status: Time Limit Exceeded

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

all_result = []
for a_i in range(Q):
    all_result.append(int(input()))

for num in range(N):
    point = all_result.count(num + 1)
    if (K - Q + 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_point = np.full((N, 1), K)

for i in range(Q):

        Ai = int(input())

        A_point[0:Ai-1]   -= 1
        A_point[Ai:N] -= 1

for i in range(len(A_point)):

        print("Yes" if A_point[i][0]>=1 else "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()))

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


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

for i in range(N):
  if (P[i] < 1):
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
# C - Attack Survival
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')

Submission status: Time Limit Exceeded

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

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

point = [k]*n

for i in l:
    point = [j if idx +1 == i else j-1 for idx,j in enumerate(point)]


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

Submission status: Time Limit Exceeded

Solution code:
data = input()
l = data.split()
l = list(map(int, l))

points = [l[1] for i in range(l[0])]

for i in range(l[2]):
    a = int(input()) - 1
    for j in range(l[0]):
        if j != a:
            points[j] -= 1

for p in points:
    if p <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n) :
    S.append(int(k))

for a in range(q) :
    A.append(int(input()))

for i in range(n) :
    S[i] = S[i] - len(A) + A.count(i+1)

for i in range(n) :
    if S[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 _ in range(n)])


def judge(point):
    ans = []
    for _ in range(q):
        a = int(input())
        point -= 1
        point[a-1] += 1
    if k > q:
        return(['Yes' for _ in range(n)])
    for i in range(n):
        if point[i] > 0:
            ans.append('Yes')
        else:
            ans.append('No')
    return(ans)
            

ans = judge(point)
print(*ans)

Submission status: Time Limit Exceeded

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

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

#print(A)
#C=list()
 for j in range(N):
   if Q-A.count(j+1)<K:
     print('Yes')
   else:
     print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(0, N):
    LIST.append(K)

for i in range(0, Q):
    offset = int(input()) - 1
    for o in range(0, N):
        if o != offset:
            LIST[o] -= 1
        else:
            pass
        
for i in LIST:
    if i >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

points = [K for _ in range(N)]
for A in As:
    for i in range(len(points)):
        if not i == A:
            points[i - 1] -= 1

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

Submission status: Time Limit Exceeded

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


n, k, q = map(int, input().split())
points = []
for i in range(n):
    points.append(k)
for i in range(q):
    a = input()
    a = int(a)
    points = list(map(minus, points))
    points[a - 1] += 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())
M=[0 for n in range(N)]
for q in range(Q):
    a=int(input())
    a-=1
    M[a]+=1
for n in range(N):
    if K-sum(M)+M[n]>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
s = [k for i in range(n)]
for i in range(q):
    z = int(input())
    for j in range(n):
        if j != z - 1:
            s[j] -= 1
        
for i in range(n):
    if s[i] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = input().split()
N = int(n)
K = int(k)
Q = int(q)
Q_list = []
for i in range(Q):
    Q_list.append(int(input()))

for i in range(N):
    p = K - len([a for a in Q_list if not a == i + 1])
    if p <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

array = []
for i in range(Q):
    array.append(int(input()))
#print(N, K, Q)
#print(array)

point_array = [K for i in range(N)]
#print(point_array)

for i in range(Q):
    winner = array[i] - 1
    #print("winner: ", winner)
    for player in range(N):
        #print("player: ", player)
        if player == winner:
            pass
        else:
            point_array[player] -= 1
#print(point_array)

for i in point_array:
    if i > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

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

for n in range(N):
  point = seikai_list.count(n+1) + K - Q
  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)]

w=k-q

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

Submission status: Time Limit Exceeded

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

# In[8]:


import numpy as np


# In[ ]:


N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]
"""
6 3 4
3
1
3
2
"""


# In[11]:


points = np.array([K]*N)
args = np.arange(1, N+1)


# In[13]:


for i in range(Q):
    #points[args!= int(input())] -= 1
    points[args != As[i]] -= 1


# In[14]:


#print(points)


# In[16]:


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


# In[ ]:

Submission status: Time Limit Exceeded

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

dp = [K] * N
for a in A:
  a -= 1
  for n in range(N):
    if n != a:
      dp[n] -=1
for s in dp:
  if s > 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(1,n+1):
  p=k-q+1*(a.count(i))
  if p>=1:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

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

c = collections.Counter(A)
cnt = [0] * N
for i in range(len(c.most_common())):
    cnt[c.most_common()[i][0]-1] = c.most_common()[i][1]

if K > Q:
    for i in range(N):
        print('Yes')
elif K <= Q:
    for i in cnt:
        if i >= Q-K+1:
            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(1, N+1):
  sj = 0
  for k in range(Q):
    if j != A[k]:
      sj += 1
    if sj >= K:
      break
  if sj < K:
    B.append('Yes')
  else:
    B.append('No')

for l in range(len(B)):
  print(B[l])

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
a = []
for i in range(q):
    t = int(input())
    a.append(t)
m = [k] * n
for i in a:
    for j in range(n):
        if j != i - 1:
            m[j] -= 1
for i in m:
    print("Yes" if i>0 else "No")

Submission status: Time Limit Exceeded

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def calc_(n):
    return n - 1

def main():
    N, K, Q = map(int, input().split())
    L_2 = [int(input()) for _ in range(Q)]

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

    for i in L_2:
        N_points = list(map(calc_, N_points))
        logging.info(N_points)
        N_points[i - 1] += 1

    for i in N_points:
        if i > 0:
            print("Yes")
        else:
            print("No")

            
    
if __name__ == "__main__":
    main()