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 numpy as np
#N人　参加者
#Kポイント持ってスタート
#正解者以外のポイントは1づつ減る
#Q回正解者がでる
#得点が0以下で敗退
lst = input().split()

N = int(lst[0])
K = int(lst[1])
Q = int(lst[2])

if N < 2 or N > 100000:
    print('参加人数エラー')
    exit()

if K < 1 or K > 1000000000:
    print('ポイントエラー')
    exit()

if Q < 1 or Q > 100000:
    print('正解数エラー')
    exit()

p_list = np.linspace(K,K,num=N)

#得点計算
for i in range(Q):
    #正解者の入力を受け取って1マイナス
    collect = int(input()) - 1
    p_list[collect] = p_list[collect] + 1
    p_list = p_list - 1

#勝敗出力
result = [ 'Yes' if p_list[l] > 0 else 'No' for l in range(N) ]
for m in range(N):
    print(result[m])
#for l in range(N):
#    if p_list[l] > 0:
#        print('Yes')
#    else:
#        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
#N人　参加者
#Kポイント持ってスタート
#正解者以外のポイントは1づつ減る
#Q回正解者がでる
#得点が0以下で敗退
lst = input().split()

N = int(lst[0])
K = int(lst[1])
Q = int(lst[2])

if N < 2 or N > 100000:
    print('参加人数エラー')
    exit()

if K < 1 or K > 1000000000:
    print('ポイントエラー')
    exit()

if Q < 1 or Q > 100000:
    print('正解数エラー')
    exit()

p_list = np.linspace(K,K,num=N)

#得点計算
for i in range(Q):
    #正解者の入力を受け取って1マイナス
    collect = int(input()) - 1
    p_list[collect] = p_list[collect] + 1
    p_list = p_list - 1

#勝敗出力
for l in range(N):
    if p_list[l] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
#N人　参加者
#Kポイント持ってスタート
#正解者以外のポイントは1づつ減る
#Q回正解者がでる
#得点が0以下で敗退
lst = input().split()

N = int(lst[0])
K = int(lst[1])
Q = int(lst[2])

if N < 2 or N > 100000:
    print('参加人数エラー')
    exit()

if K < 1 or K > 1000000000:
    print('ポイントエラー')
    exit()

if Q < 1 or Q > 100000:
    print('正解数エラー')
    exit()

p_list = np.linspace(K,K,num=N)

#得点計算
for i in range(Q):
    #正解者の入力を受け取って1マイナス
    collect = int(input()) - 1

    for j in range(N):
        if j == collect:
            p_list[j] = p_list[j] + 1
        p_list[j] = p_list[j] - 1

#勝敗出力
for l in range(N):
    if p_list[l] > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
#N人　参加者
#Kポイント持ってスタート
#正解者以外のポイントは1づつ減る
#Q回正解者がでる
#得点が0以下で敗退
lst = input().split()

N = int(lst[0])
K = int(lst[1])
Q = int(lst[2])

if N < 2 or N > 100000:
    print('参加人数エラー')
    exit()

if K < 1 or K > 1000000000:
    print('ポイントエラー')
    exit()

if Q < 1 or Q > 100000:
    print('正解数エラー')
    exit()

p_list = np.linspace(K,K,num=N)

#得点計算
for i in range(Q):
    #正解者の入力を受け取って1マイナス
    collect = int(input()) - 1

    j = 0
    for j in range(N):
        if not j  == collect:
            p_list[j] = int(p_list[j]) - 1


#勝敗出力
k = 0
for k in range(N):
    if p_list[k] > 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)]

result_list = []
for idx in range(N):
    result_list.append("Yes" if K - Q + A_list.count(idx+1) > 0 else "No")

for idx in range(N):
    print(result_list[idx])

Submission status: Time Limit Exceeded

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

lis_A = []
lis_K = [lis_NKQ[1] for i in range(lis_NKQ[0])]

for i in range(lis_NKQ[2]):
    lis_A.append(int(input()))

for i in range(lis_NKQ[2]):
    lis_K = list(map(lambda x: x - 1,lis_K))

for i in lis_A:
    lis_K[i - 1] += 1

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

Submission status: Time Limit Exceeded

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

for _ in range(Q):
    a.append(int(input()))

for _ in range(N):
    A.append(int(K))

for n in range(Q):
    A[a[n]-1]+=1
    for m in range(N):
        A[m]-=1
    
for s in range(N):
    if A[s]<1:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

for _ in range(Q):
    a.append(int(input()))

for _ in range(N):
    A.append(int(K))

for n in range(Q):
    A[a[n]-1]+=1

for _ in range(Q):
    for m in range(N):
        A[m]-=1
    
for s in range(N):
    if A[s]<1:
        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)]


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

Submission status: Time Limit Exceeded

Solution code:
#N人　参加者
#Kポイント持ってスタート
#正解者以外のポイントは1づつ減る
#Q回正解者がでる
#得点が0以下で敗退
lst = input().split()

N = int(lst[0])
K = int(lst[1])
Q = int(lst[2])

if N < 2 or N > 100000:
    print('参加人数エラー')
    exit()

if K < 1 or K > 1000000000:
    print('ポイントエラー')
    exit()

if Q < 1 or Q > 100000:
    print('正解数エラー')
    exit()

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

#得点計算
for i in range(Q):
    #正解者の入力を受け取って1マイナス
    collect = int(input()) - 1

    j = 0
    for j in range(N):
        if not j  == collect:
            p_list[j] = int(p_list[j]) - 1
        j += 1
#勝敗出力
k = 0
for k in range(N):
    if p_list[k] > 0:
        print('Yes')
    else:
        print('No')
    k += 1

Submission status: Time Limit Exceeded

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

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 = list(map(int, input().split()))

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

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

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

Submission status: Time Limit Exceeded

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

right_answers = list(int(input()) for _ in list(range(Q)))
indexes = [v-1 for v in right_answers]

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

for i in indexes:
    scores[i] = scores[i]+1
    scores = [w-1 for w in scores]

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]

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

indexes = np.array(list(int(input()) for _ in range(Q)))-1

scores = np.array([K for _ in range(N)])

for i in indexes:
    scores[i] = scores[i]+1
    scores = scores-1

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

indexes = np.array(list(int(input()) for _ in range(Q)))-1

scores = np.array([K for _ in range(N)])

for i in indexes:
    scores[i] = scores[i]+1
    scores = scores-1

for j in scores:
    if j > 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()))
Ai = np.asarray([k for _ in range(n)])
for _ in range(q):
    A = int(input())
    Ai -= 1
    Ai[A-1] += 1
for i in Ai:
    if i <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
dic_p = {}
n, k, q = list(map(int,input().split()))
i = list(range(1,n+1))

for key in i:
    dic_p[key] = k

for j in range(q):
    A = int(input())
    for key in dic_p:
        if key!=A:
            dic_p[key] -= 1

point_list = dic_p.values()
is_list = []
for p in point_list:
    if p <= 0:
        is_list.append("No")
    else:
        is_list.append("Yes")

for i in is_list:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from numpy import array
n,k,q = map(int,input().split())
s = array([k]*n)
str = array([-1]*n)
for i in range(q):
  s+=str
  num = int(input())
  s[num-1]+=1  
for j in s:
  if j<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

A=list(map(int,input().split()))
B=np.array([])
#print(B)
N=A[0]

while A[0]>0:
    B=np.append(B,int(A[1]))
    A[0]-=1
#print(B)

while A[2]>0:
    a=int(input())
    A[2]-=1
    i=0
    while i<=N-1:
        if i+1!=a:
            B[i]-=1 
 #           print(B)
        i+=1

#print(B)

for b in B:
    if b<=0:
       # print(b)
        print('No')
    else:
        #print(b)
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
num, poi, ans = [int(x) for x in input().split()]

list01 = [poi for x in range(num)]

for i in range(ans):
  list01 = [x -1 for x in list01]
  j = int(input())
  list01[j -1] += 1
  
for k in list01:
  if k <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
num, poi, ans = [int(x) for x in input().split()]

list01 = [poi for x in range(num)]

i = 1
while i <= ans:
  list01 = [x -1 for x in list01]
  j = int(input())
  list01[j -1] += 1
  i += 1
  
for k in list01:
  if k <= 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
num, poi, ans = [int(x) for x in input().split()]
"""
print(num)
print(poi)
print(ans)
"""

list01 = []
while num > 0:
  list01.append(poi)
  num -= 1

i = 1
while i <= ans:
  list01 = [x -1 for x in list01]
  #print("i=",i)
  j = int(input())
  #print("j=",j)
  list01[j -1] += 1
  i += 1

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

Submission status: Time Limit Exceeded

Solution code:
num, poi, ans = [int(x) for x in input().split()]

list01 = []
while num > 0:
  list01.append(poi)
  num -= 1

i = 1
while i <= ans:
  j = int(input())
  for n, v in enumerate(list01):
    if n != j -1:
      list01[n] -= 1
  i += 1

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

Submission status: Time Limit Exceeded

Solution code:
num, poi, ans = [int(x) for x in input().split()]
"""
print(num)
print(poi)
print(ans)
"""

list01 = []
while num > 0:
  list01.append(poi)
  num -= 1

i = 1
while i <= ans:
  #print("i=",i)
  j = int(input())
  #print("j=",j)
  for n, v in enumerate(list01):
    if n != j -1:
      list01[n] -= 1
      #print(list01)
  i += 1

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

Submission status: Time Limit Exceeded

Solution code:
# C - Attack Survival
n,k,q= map(int, input().split())

list = [k] * n

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#入力
N, K, Q = map(int, input().split()) #参加者,初期ポイント,回数
A = []
for _ in range(Q) :
    A.append(int(input()))

#処理、出力
for i in range(int(N)) :
    point = K - (Q - A.count(i+1))
    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)]

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

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

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

Submission status: Time Limit Exceeded

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

point = np.zeros(n+1)
for i in range(len(point)):
    point[i] = k

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

for i in range(1,len(point),1):
    if point[i] > 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())
  for j in range(N):
    score[j]-=1
  score[A-1]+=1
for i in range(N):
  if(score[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())
score=np.ones(N,dtype=int)*K
loss=np.ones(N,dtype=int)
for i in range(Q):
  A=int(input())
  score=score-loss
  score[A-1]+=1
for i in range(N):
  if(score[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())
score=np.array([K for i in range(N)])
loss=np.array([1 for i in range(N)])
for i in range(Q):
  A=int(input())
  score=score-loss
  score[A-1]+=1
for i in range(N):
  if(score[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 = []
for i in range(q):
    a.append(int(input()))

players_score = np.array([k for i in range(n)])
for item in a:
    players_score -= 1
    players_score[item-1] += 1

indict = ['No' if i <= 0 else 'Yes' for i in players_score ]

for i in indict:
    print(i)

Submission status: Time Limit Exceeded

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

# 正答者を記録
for i in range(Q):
	answer_list.append(int(input()) - 1)

# 点数計算
for answer in answer_list:
	charanger_list = [ charanger-1 for charanger in charanger_list]
	charanger_list[answer] += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# N:人数, K:初期ポイント, Q:クイズ数
N, K, Q = map(int,input().split())
points = [K] * N

def not_ans(li):
    return li -1

for i in range(Q):
    anser = int(input())-1
    points = list(map(not_ans,points))
    points[anser] += 1
    
for y in range(N):
    if points[y] < 1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
s = input()

def get_integers(whitespaced_string):
    cleaned_string = whitespaced_string.split(" ")

    formatted_numbers = []
    for number in cleaned_string:
        formatted_numbers.append(int(number))
    
    return tuple(formatted_numbers)

input_arg = get_integers(s)

def get_answers(index = 2):

    answers = []
    for i in range(input_arg[index]):
        answers.append(int(input()))

    return answers

score_card = [input_arg[1] for i in range(input_arg[0])]
answers = get_answers()

for answer in answers:
    for i in range(1, len(score_card) + 1):
        if answer != i:
            score_card[i-1] -= 1

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

Submission status: Time Limit Exceeded

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

p = [k]*n

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int, raw_input().split())
A = []
 
for i in range(0,Q):
  A.append(int(raw_input()))
for i in range(1,N+1):
  con = A.count(i)
  if K - (Q - con) > 0:
    print "Yes"
  elif K - (Q - con) <= 0:
    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())
for i in range(n):
  if a.count(i+1) > q-k :
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
s = input()

def get_integers(whitespaced_string):
    cleaned_string = whitespaced_string.split(" ")

    formatted_numbers = []
    for number in cleaned_string:
        formatted_numbers.append(int(number))
    
    return tuple(formatted_numbers)

input_arg = get_integers(s)

def get_answers(index = 2):

    answers = []
    for i in range(input_arg[index]):
        answers.append(int(input()))

    return answers

def compute_score(index = 0):
    answers = get_answers()

    for i in range(1, input_arg[index] + 1):
        initial_score = input_arg[index + 1]
        for j in answers:
            if j != i:
                initial_score -= 1
        if initial_score <= 0:
            print("No")
        else:
            print("Yes")

compute_score()

Submission status: Time Limit Exceeded

Solution code:
V = input().split()
N = int(V[0])
K = int(V[1])
Q = int(V[2])
A = [0 for i in range(Q)]
P = [K for i in range(N)]
for i in range(Q):
    A[i] = int(input())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for j in range(n):
  point.append(k)
  one.append(1)
  
for x in range(q):
  point = [p-o for (p,o) in zip(point, one)] 
  point[int(a[x])-1] += 1
  
for y in range(n):
  if point[y] <= 0:
    ans.append('No')
  else:
    ans.append('Yes')
  print(ans[y])

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = [int(input()) for x in range(Q)]
for i in range(N):
  z = 0
  for j in range(Q):
    if A[j] == i + 1:
      z += 1
  if z > Q - K:
    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_list = [None]*q
for i in range(q):
    a_list[i] = int(input())
for i in range(n):
    if q - a_list.count(i+1) < k:
        print("Yes") 
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n,k,q = map(int,input().split())
data = np.array([k for i in range(n)])

  
for i in range(q):
  answer = int(input()) - 1
  data -= 1
  data[answer] += 1
  
for i in data:
  print('Yes' if i > 0 else 'No')

Submission status: Time Limit Exceeded

Solution code:
import sys 
input = sys.stdin.readline
n, k, q = map(int, input().split())
a_list = [None]*q
for i in range(q):
    a_list[i] = int(input())
for i in range(n):
    if q - a_list.count(i+1) < k:
        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_list = []
for i in range(q):
    a_list.append(int(input()))
for i in range(n):
    if q - a_list.count(i+1) < k:
        print("Yes") 
    else:
        print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q = map(int,input().split())
ans_list=[int(input()) for _ in range(Q)]
points=np.full((N,), K)
for ans_person in ans_list:
    points[:ans_person-1] -= 1
    points[ans_person:] -= 1

winner = points>0
for person in winner:
    if person==True:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n, k, q = map(int, input().split())
A = [int(input())-1 for i in range(q)]
P = np.ones(n) * k

for a in A:
    P[:a] -= 1
    P[a+1:] -= 1

P = np.where(P > 0, 'Yes', 'No')
for p in P:
    print(p)

Submission status: Time Limit Exceeded

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

scores = [a_list.count(i+1) for i in range(n)]


for i,score in enumerate(scores):
    if k-q+score > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split(' '))
score = [K for player in range(N)]
answers = [int(input()) - 1 for q in range(Q)]

for answer in answers:
    for i in range(N):
        if i != answer:
            score[i] = score[i] - 1

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

Submission status: Time Limit Exceeded

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

P = [K for _ in range(N)]
D = []
for _ in range(Q):
    A = int(input()) - 1
    for i, p in enumerate(P):
        if A != i:
            P[i] -= 1

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

Submission status: Time Limit Exceeded

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

for question in range(Q):
    index = int(input())
    for i in range(N):
        if i != index - 1:
            score[i] = score[i] - 1

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

Submission status: Time Limit Exceeded

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

for question in range(Q):
    index = int(input())
    for i in range(N):
        if i != index - 1:
            score[i] = score[i] - 1

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

Submission status: Time Limit Exceeded

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

P = [K for _ in range(N)]
for _ in range(Q):
    A = int(input()) - 1
    P = [p - 1 if A != i  else p for i, p in enumerate(P)]

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

for q in range(Q):
    A = int(input()) - 1
    points -= 1
    points[A] +=1
    # points = [p if i == A else p-1 for i, p in enumerate(points)]

for p in points:
    if p < 1:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
lista = [int(x) for x in input().split()]
playAns = []
n = lista[2]
while n > 0:
    playAns.append(int(input()))
    n-=1

playerPoints = []
for i in range(0,lista[0]):
    playerPoints.append(lista[1])

for ans in playAns:
    for i in range(0,lista[0]):
        if i+1 != ans:
            playerPoints[i]-=1

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

Submission status: Time Limit Exceeded

Solution code:
# import collections

# print('input >>')
N, K, Q = map(int, (input().split()))
points = [K] * N
A = []
for _ in range(Q):
    A.append(int(input()))

# Acount = collections.Counter(A)

for answer in A:
    points = [p - 1 for p in points]
    points[answer - 1] += 1

# print('----------output----------')

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

Submission status: Time Limit Exceeded

Solution code:
def get_answer(input_list):
    c_list = [int(v) for v in input_list[0].split(" ")]
    n = c_list[0]
    k = c_list[1]
    q = c_list[2]
    a = [int(v) for v in input_list[1:]]
    ns = [k] * n
    for aa in a:
        index = aa - 1
        for i in range(len(ns)):
            if i != index:
                ns[i] -= 1

    nr = [""] * n
    for i in range(len(ns)):
        if ns[i] <= 0:
            nr[i] = "No"
        else:
            nr[i] = "Yes"

    return nr



if __name__ == "__main__":
    input_list = []
    while True:
        try:
            input1 = input()
            if not input1:
                break
            if len(input1) == 0:
                break
            input_list.append(input1)
        except EOFError:
            break
    for a in get_answer(input_list):
        print(a)

Submission status: Time Limit Exceeded

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

for k in b:
    if k > 0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
t = [k]*n
s = [1]*n
for i in range(q):
  point = int(input())
  t = [t - s for (t, s) in zip(t, s)]
  t[point-1] = t[point-1]+1
for i in range(n):
  if t[i]<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

n = [0] * m[0]

b=list(set(a))
for i in range(len(b)):
    n[b[i]-1] = a.count(b[i])

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
 
n_member, init_point, n_correct = map(int,input().split())
answerer = [int(input())-1 for i in range(n_correct)]
 
point = np.array([init_point for i in range(n_member)])
 
for i in range(n_correct):
  point -= 1
  point[answerer[i]] += 1
  
win = point>0
 
for i in range(n_member):
  if win[i]:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

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

for i in range(m[2]):
    n = [i-1 for i in n]
    n[a[i]-1] +=1
for i in range(m[0]):
    if n[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())
A = [int(input()) for _ in range(Q)]
pnts = np.array([K] * N) - np.ones(N, int) * Q

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
str=input()
N, K, Q=[int(v) for v in str.split()]
li=np.full(N, K)
for i in range(Q):
    A=int(input())-1
    li[A]+=1
    li-=1
#    print(li)
for i in range(N):
    if li[i]>0:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

n=[]
for i in range(m[0]):
    n.append(m[1])

for i in range(m[2]):
    n[a[i]-1] +=1
    n = [i-1 for i in n]

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