Problem:


Score: 300 points

Problem Statement

Takahashi has decided to hold fastest-finger-fast quiz games. Kizahashi, who is in charge of making the scoreboard, is struggling to write the program that manages the players' scores in a game, which proceeds as follows.

A game is played by N players, numbered 1 to N. At the beginning of a game, each player has K points.

When a player correctly answers a question, each of the other N-1 players receives minus one (-1) point. There is no other factor that affects the players' scores.

At the end of a game, the players with 0 points or lower are eliminated, and the remaining players survive.

In the last game, the players gave a total of Q correct answers, the i-th of which was given by Player A_i.
For Kizahashi, write a program that determines whether each of the N players survived this game.

Constraints

All values in input are integers.

2 \leq N \leq 10^5

1 \leq K \leq 10^9

1 \leq Q \leq 10^5

1 \leq A_i \leq N\ (1 \leq i \leq Q)

Input

Input is given from Standard Input in the following format:

N K Q
A_1
A_2
.
.
.
A_Q

Output

Print N lines. The i-th line should contain Yes if Player i survived the game, and No otherwise.

Sample Input 1

6 3 4
3
1
3
2

Sample Output 1

No
No
Yes
No
No
No

In the beginning, the players' scores are (3, 3, 3, 3, 3, 3).

Player 3 correctly answers a question. The players' scores are now (2, 2, 3, 2, 2, 2).

Player 1 correctly answers a question. The players' scores are now (2, 1, 2, 1, 1, 1).

Player 3 correctly answers a question. The players' scores are now (1, 0, 2, 0, 0, 0).

Player 2 correctly answers a question. The players' scores are now (0, 0, 1, -1, -1, -1).

Players 1, 2, 4, 5 and 6, who have 0 points or lower, are eliminated, and Player 3 survives this game.

Sample Input 2

6 5 4
3
1
3
2

Sample Output 2

Yes
Yes
Yes
Yes
Yes
Yes

Sample Input 3

10 13 15
3
1
4
1
5
9
2
6
5
3
5
8
9
7
9

Sample Output 3

No
No
No
No
Yes
No
No
No
Yes
No



Sample input:
6 3 4
3
1
3
2


Sample output:
No
No
Yes
No
No
No

Submission status: Time Limit Exceeded

Solution code:
#import heapq
#import itertools
#import math
#import numpy as np
#import sys

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

for i in range(1,N+1) :
    s = 0
    for a in A :
        if i == a :
            s += 1
    if s > Q - K :
        print('Yes')
    else :
        print('No')


#T = [list(map(int,input().split())) for _ in range(N)]
#H = [K] * N
#print(A)
#print(H)
#for a in A :
#    for i in range(N) :
#        if i == int(a) :
#            pass
#        else :
#            H[i -1] -= 1
#for h in H :
#    if h > 0 :
#        print('Yes')
#    else :
#        print('No')
#ans = ['Yes' if h > 0 else 'No' for h in H]
#for a
#print(ans)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N, K ,Q = map(int, input().split())
participant = np.full(N, K)
As = []
for i in range(Q):
    answer = int(input())
    participant[answer-1] +=1
    participant -= 1
for surviver in np.where(participant>0, "Yes", "No"):
    print(surviver)

Submission status: Time Limit Exceeded

Solution code:
# n: 参加者人数
# k: 初期ポイント
# q: ラウント回数
n, k, q = map(int, input().split())
data = [ int(input()) for _ in range(q) ]

table = [k] * n

for winnner in data:
    for j in range(n):
        table[j] -= 1
    
    table[winnner - 1] += 1

for k in range(n):
    if table[k] > 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 for _ in range(N)]

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

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

    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
  n,k,q = [int(x) for x in raw_input().split()]
  answers = [int(raw_input())-1 for x in xrange(q)]
  scores = [k,] * n
  
  for answer in answers:
    for i in xrange(n):
      if i != answer:
        scores[i] -= 1
  
  for score in scores:
    print("Yes" if score > 0 else "No")

main()

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 K-Q+A.count(i)>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

for a in range(q):
    j = int(input())
    for i in range(len(l)):
        if (j-1 != i):
            l[i] -=1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

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

for _ in range(Q):
  a = int(input())
  A_point[a-1] += 1
  A_point -= 1

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

Submission status: Time Limit Exceeded

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

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


for i in range(Q):
    k = int(input())
    for j in range(N):
        if j == k-1:
            continue
        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:
#!/usr/bin/env python
# coding: utf-8

# In[20]:


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

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


# In[21]:


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


# In[ ]:

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
n, k, q= map(int, input().split())
a=[k]*n
for i in range(q):
    p = int(input())
    for j in range(n):
        if (p-1) != j:
            a[j]-=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())
PO = [K]*N
while Q:
  c = int(input())
  for i in range(N):
    if i==(c-1):
      pass
    else:
      PO[i]-=1
  Q-=1
for i in range(N):
  if PO[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)]

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

for i in range(Q):
    for j in range(N):
        if j+1 != a[i]:
            count[j] = count[j] - 1
for i in range(N):
    if count[i] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

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

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

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

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

Submission status: Time Limit Exceeded

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


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

winner_list = []
for _ in range(Q):
    A_i = int(input().strip())
    winner_list.append(A_i)

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

for A_i in winner_list:
    for i in range(1, N + 1):
        if i != A_i:
            point_list[i - 1] -= 1

is_win = [True if point_list[i] > 0 else False for i in range(N) ]

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

Submission status: Time Limit Exceeded

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

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

B = [K]*N

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


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

Submission status: Time Limit Exceeded

Solution code:
import copy
a, b, n = list(map(int, input().split()))
m = [int(input()) for _ in range(n)]

def dec1(n):
    return n - 1

p = [b for _ in range(a)]
p1 = copy.deepcopy(p)
for i, name in enumerate(m):
    p1 = list(map(dec1, p1))
    p1[name-1] += 1

for i, name in enumerate(p1):
    if name <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,K,Q=map(int,input().split())

A=[int(input()) for _ in range(Q)]
S=[K]*N

for i in range(Q):
	S[A[i]-1]+=1
	for j in range(N):
		S[j]-=1
		if S[j]<=0:
			S[j]=-10000000000
		
for k in range(N):
	if S[k]>0:
		print("Yes")
	else:
		print("No")

Submission status: Time Limit Exceeded

Solution code:
#import heapq
#import itertools
#import math
#import numpy as np
#import sys

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

for i in range(1,N+1) :
    s = 0
    for a in A :
        if i == int(a) :
            s += 1
    if s > Q - K :
        print('Yes')
    else :
        print('No')


#T = [list(map(int,input().split())) for _ in range(N)]
#H = [K] * N
#print(A)
#print(H)
#for a in A :
#    for i in range(N) :
#        if i == int(a) :
#            pass
#        else :
#            H[i -1] -= 1
#for h in H :
#    if h > 0 :
#        print('Yes')
#    else :
#        print('No')
#ans = ['Yes' if h > 0 else 'No' for h in H]
#for a
#print(ans)

Submission status: Time Limit Exceeded

Solution code:
list1=input().split(' ')
N=int(list1[0])
K=int(list1[1])
Q=int(list1[2])
listQ=[]
for i in range(Q):
    listQ.append(int(input()))
listScores=[K for i in range(N)]
for i in listQ:
    listScores=[x-1 for x in listScores]
    listScores[i-1]=listScores[i-1]+1
for i in listScores:
    if i>0:
        print('Yes')
    elif i<=0:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
point = [k for _ in range(n)]
for i in range(q):
    point = list(map(lambda x:x-1,point))
    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())
Point_list = [K] * N
for i in range(Q):
    A = int(input())
    for j in range(N):
        if j+1 != A:
            Point_list[j] -= 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())
person = [K] * N

for i in range(Q):
    ok_person = int(input()) - 1
    for j in range(N):
        if j != ok_person:
            person[j] -= 1

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

d = [k] * n
for i in a:
    tmp = d[i-1]
    d = [x-1 for x in d]
    d[i-1] = tmp

for x in d:
    if x > 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())

a=[]

for i in range(q):
    a.append(int(input()))
    
b=[k]*n

def calc(n):
    return n-1

for j in a:
    b=list(map(calc,b))
    b[j-1]+=1

for k in b:
    if k<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

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

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

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

Submission status: Time Limit Exceeded

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

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

A = [0 for i in range(Q)]

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

Submission status: Time Limit Exceeded

Solution code:

import numpy as np
N , K ,Q = map(int, input().split())
s = []
for i in range(Q):
    s.append(int(input())-1)
initializer_list = np.full(N,K)
for i in range(len(s)):
    for j in range(len(initializer_list)):
        if j == s[i]:
            pass
        else:
            initializer_list[j] -= 1
for i in range(len(initializer_list)):
    if initializer_list[i] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
import numpy as np


def main():
    N, K, Q = [int(x) for x in stdin.readline().rstrip().split()]
    As = [int(stdin.readline().rstrip()) for _ in range(Q)]
    score = np.asarray([K] * N)
    for A in As:
        score -= 1
        score[A - 1] += 1
    for s in score:
        print('Yes' if 0 < s else 'No')


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

for i in range(1, n+1):
    damage = q - qlist.count(i)
    if damage < k:
        print('Yes')
    elif damage >= k:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
#S = list(input())

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


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

for n in range(N):
    AC = A.count(n+1)
    score = K - Q + AC
#    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(a) for a in input().split()]

score = np.full(N, K, dtype=int)

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

is_win = score > 0

for res in is_win:
    if res:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

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

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

for n in range(N):
    if points[n] < 1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
h,s,q=map(int,input().split())
l=[int(input()) for i in range(q)]
for d in range(h+1)[1:]:
  print("Yes") if s-q+l.count(d)>0 else print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy

N, K, Q = map(int, input().split())
P = numpy.array([K for i in range(N)])
M = numpy.array([1 for i in range(N)])

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

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

Submission status: Time Limit Exceeded

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

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 = {}
    for i in range(N):
        points[i] = K

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

    for i in points.keys():
        if points[i] > 0:
            print('Yes')
        else:
            print('No')
    
C()

Submission status: Time Limit Exceeded

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

An = [K] * N

for _ in range(Q):
    A = int(input()) 
    for i in range(N):
        An[i] -= 1
    An[A-1] += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split())
a=[(input()) for l in range(q)]
import collections
c = collections.Counter(a)
l=([int(i[0]) for i in c.items() if i[1] > q-k])
#print(l)
for i in range(n):
    if l.count(i+1)>0:
        print('Yes')
    elif q-k<0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

points = [K for x in range(N)]
for i in A:
    points = list(map(lambda x: x-1, points))
    points[i-1] += 1

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
li = [K]*N
for i in range(Q):
    a = int(input())
    li = list(map(lambda x: x-1, li))
    li[a-1] += 1

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

Submission status: Time Limit Exceeded

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

Answers = np.zeros(int(N))
ones = np.ones(int(N))
if int(K) > int(Q):
  for i in range(int(N)):
    print("Yes")
else:
  for i in A:
    ones[i-1] = 0
    Answers += ones
    ones[i-1] = 1
  for i in Answers:
    if i < int(K):
      print("Yes")
    else:
      print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q=map(int, input().split())
A=np.array([int(input()) for _ in range(Q)])
P=np.array([K]*N)
for a in A:
    p=np.array([1]*N)
    p[a-1]=0
    P-=p
for x in P:
    if x>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()))
  
count_list = []
for n in range(N):
  count_list.append(seikai_list.count(n+1))

count_list2 = map(lambda x: x + K - Q, count_list)

for count in count_list2:
  if count > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

points = np.asarray([k for i in range(n)])

for i in A:
		points = points -1
		points[i-1] += 1


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

Submission status: Time Limit Exceeded

Solution code:
#N人の参加者 全員がＫポイント持っている 
#Q回の正解
#Aは誰が正解したか
N,K,Q=map(int,input().split())
Ans=[]
for _ in range(Q):
    hoge=int(input())
    Ans.append(hoge-1)
# print(Ans) 
person=N*[K]
# print(person)

#問題
for i in range(Q):
    #人
    for j in range(N):
        if Ans[i]==j:
            pass
        else:
            person[j]-=1
    # print(person)
# print(person)

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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:
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:
n, k, q = map(int,input().split())
winner = [int(input()) -1 for i in range(q)]
winnerpoint = [winner.count(i) for i in range(n)]

point = [k - (q - winnerpoint[i]) for i in range(n)]

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
a = [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 = map(int, input().split())
A = [int(input()) for i in range(Q)]
score = [K]*N

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

point = [K] * N
A = []
for q in range(Q):
    A.append(int(input()) - 1)

for a in A:
    point = list(map(lambda x: x - 1, point))
    point[a] += 1

for ans in point:
    if ans < 1:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
def calc_point(points, n):
    for i in range(len(points)):
        if i != n:
            points[i] -= 1


n, k, q = list(map(int, input().split(" ")))

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

for i in range(q):
    a = int(input())
    calc_point(points, a-1)


for i in range(len(points)):
    if points[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])
    
player = [k] * n
for _a in a:
    for _i in range(n):
        if (_i != (_a-1)):
            player[_i] -= 1
            
for _p in player:
    if _p > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# ABC141c
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]

sanka = [k]*n

for i in a:
    sanka[i-1] += 1
    for j in range(n):
        sanka[j] -= 1
# print(sanka)

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int, raw_input().split())
P = [K]*N
for i in range(Q):
    A = int(raw_input())
    P[A-1] += 1
    P = [p-1 for p in P]
    #print P

for p in P:
    if p > 0:
        print "Yes"
    else:
        print "No"

Submission status: Time Limit Exceeded

Solution code:
import numpy as np


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

initial_arr = np.ones(N) * K

for i in range(Q):
    tmp = np.ones(N)
    tmp[A[i]-1] = 0
    initial_arr = initial_arr - tmp

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

Submission status: Time Limit Exceeded

Solution code:
h,s,q=map(int,input().split())
l=[int(input()) for i in range(q)]
g=[s-q+l.count(i) for i in range(h+1)[1:]]
for d in range(h):
  print("Yes") if g[d]>0 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)]
h = [k]*n

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

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q=map(int,input().split())
L = [K for n in range(N)]
for q in range(Q):
    a=int(input())
    a-=1
    for n in range(N):
        if n==a:
            continue
        else:
            L[n]-=1
for l in L:
    if l<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import sys


def input(): return sys.stdin.readline().strip()


def main():
    N, K, Q = map(int, input().split())
    points = [K] * N

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

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


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 = [K for _ in range(N)]
for i in range(Q):
  point = [point[j]-1 for j in range(A[i]-1)] + [point[A[i]-1]] + [point[j]-1 for j in range(A[i], N)]
for i in range(N):
  if point[i]>0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

scores = [K]*N
for i in range(Q):
  for j in range(N):
    if j == A[i] - 1:
      continue
    scores[j] -= 1
  
for a in scores:
  if a > 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)]

pnt = [q*(-1)+k for _ in range(n)]
for i in range(n):
    pnt[i] += a.count(i+1)
    if pnt[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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


n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]
nList = [k] * n
for i in range(q):
    nList = list(map(calc, nList))
    nList[a[i]-1] += 1

for i in range(n):
    print("Yes" if nList[i] > 0 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()))
# n, k, q = 6, 3, 4
# a = [3, 1, 3, 2]
ans = []
s = []
for i in range(n):
    ans.append('Yes')
    s.append(k)
# print(s, ans)
for i in range(q):
    s[a[i] - 1] += 1
    for j in range(n):
        s[j] -= 1
        if s[j] <= 0:
            ans[j] = 'No'
print('\n'.join(ans))

Submission status: Time Limit Exceeded

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

b = ["No"]*n

for i in range(n):
    if k - q + a.count(i+1) > 0 :
        b[i] = "Yes"

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q = map(int, input().split())

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

for i in range(Q):
  ans = int(input())
  points -= 1
  points[ans-1] += 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())
point = [K] * N
for _ in range(Q):
    answer = int(input())
    point = list(map(lambda x : x - 1 , point))
    point[answer - 1] += 1
for i in range(N):
    if point[i] > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
points = [None for _ in range(n + 1)]
for i in range(1, n+1):
    points[i] = k
for j in range(q):
    answer = int(input())
    for i in range(1, n + 1):
        if i == answer:
            continue
        else:
            points[i] -= 1
for i in range(1, n+1):
    if points[i] > 0:
        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()))

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

for i in range(len(a)):
    clear_num = a[i]-1
    for j in range(n):
        if j != clear_num:
             score[j] += -1

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int,input().split())
Ans = []
for i in range(q):
	Ans.append(int(input()))
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())
i=0
a=[]
while i!=q:
    a.append(int(input()))
    i+=1
a.sort()
if k>q:
    i=0
    while i!=n:
        print("Yes")
        i+=1
else:
    i=0
    while i!=n:
        if q-a.count(i+1)<k:
            print ("Yes")
        else:
            print("No")
        i+=1

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 k-(q-a.count(i+1))>0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int,input().split())
winner = [int(input()) for i in range(Q)]
PointBord = []
for i in range(N):
    PointBord.append(K)
for i in range(len(winner)):
    winManIndex = winner[i]-1
    for j in range(len(PointBord)):
        if j != winManIndex:
            PointBord[j] = PointBord[j]-1
for i in range(len(PointBord)):
    point = PointBord[i]
    if point < 1:
        print("No")
    else:
        print("Yes")