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:
# coding: utf-8
# Your code here!

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

Submission status: Time Limit Exceeded

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


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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
from collections import Counter

lines = stdin.readlines()

N, K, Q = map(int, lines[0].split())
A = [int(i) - 1 for i in lines[1:]]
ans = [0] * N
for a in Counter(A):
    ans[a] += A.count(a)
print("\n".join(("Yes" if Q < K + a
                 else "No" for a in ans)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
point = []
yes_no = []
minus = []
output = []

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

A = [int(a) for a in A]

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

for _ in range(N):
    minus.append(Q)

for i in range(N):
    point[i] = point[i] - minus[i]

for j in range(N):
    point[j-1] = point[j-1] + A.count(j)

for p in point:
    if p >= 1:
        yes_no.append('Yes')
    else:
        yes_no.append('No')

for yn in yes_no:
    print(yn)

Submission status: Time Limit Exceeded

Solution code:
# 入力
data = input().split()
 
# プレイヤ人数
player = int(data[0])
# はじめのポイント
initPoint = int(data[1])
# 質問回数
question = int(data[2])
 
# はじめの各プレイヤのポイント
playerPoint = []
 
for i in range(player):
  playerPoint.append(initPoint)
 
# 問題解答
for i in range(question):
  # 全員のポイントを-1
  playerPoint = [i-1 for i in playerPoint]
  # 正解者
  corrPlayer = int(input())
  # 正解者のポイントを+1(減らさない)
  playerPoint[corrPlayer -1] = playerPoint[corrPlayer -1] + 1
  
# 解答
for i in range(player):
  if playerPoint[i] <= 0:
    print('No')
  else:
    print('Yes')

Submission status: Time Limit Exceeded

Solution code:

import numpy as np
def receive_round_setting():
    round_settings = input()
    N, K, Q = round_settings.split(' ')
    N, K, Q = int(N), int(K), int(Q)
    participants = np.full(N, K, dtype='i')
    round_settings = {'N':N, 'K':K, 'Q':Q,
                    'participants':participants}
    return round_settings

def answer_question(round_settings):
    for i in range(round_settings['Q']):
        answerer = int(input()) - 1
        round_settings['participants'] -= 1
        round_settings['participants'][answerer] += 1
    return round_settings
        
def announce_resutl(round_setting):

    [print('Yes') if participant > 0 else print('No')
    for participant in round_settings['participants']]

if __name__ == '__main__':
    round_settings = receive_round_setting()
    if round_settings['Q'] < round_settings['K']:
        announce_resutl(round_settings)
    else:
        round_settings = answer_question(round_settings)
        announce_resutl(round_settings)
    # round_settings = receive_round_setting()
    # round_settings = answer_question(round_settings)
    # announce_resutl(round_settings)

Submission status: Time Limit Exceeded

Solution code:

import numpy as np
def receive_round_setting():
    round_settings = input()
    N, K, Q = round_settings.split(' ')
    N, K, Q = int(N), int(K), int(Q)
    participants = np.full(N, K, dtype='i')
    round_settings = {'N':N, 'K':K, 'Q':Q,
                    'participants':participants}
    return round_settings

def answer_question(round_settings):
    for i in range(round_settings['Q']):
        answerer = int(input()) - 1
        round_settings['participants'] -= 1
        round_settings['participants'][answerer] += 1
    return round_settings
        
def announce_resutl(round_setting):

    [print('Yes') if participant > 0 else print('No')
    for participant in round_settings['participants']]

if __name__ == '__main__':
    round_settings = receive_round_setting()
    round_settings = answer_question(round_settings)
    announce_resutl(round_settings)

Submission status: Time Limit Exceeded

Solution code:
#%%
import numpy as np
#%%
def receive_round_setting():
    round_settings = input()
    N, K, Q = round_settings.split(' ')
    N, K, Q = int(N), int(K), int(Q)
    participants = np.full(N, K, dtype='i')
    round_settings = {'N':N, 'K':K, 'Q':Q,
                    'participants':participants}
    return round_settings

def answer_question(round_settings):
    for i in range(round_settings['Q']):
        answerer = int(input()) - 1
        round_settings['participants'] -= 1
        round_settings['participants'][answerer] += 1
    return round_settings
        
def announce_resutl(round_setting):
    for participant in round_settings['participants']:
        if participant > 0:
            print('Yes')
        else:
            print('No')

    return 

if __name__ == '__main__':
    round_settings = receive_round_setting()
    round_settings = answer_question(round_settings)
    announce_resutl(round_settings)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
INPUT = [int(i) for i in input().split(" ")]

N = INPUT[0]
K = INPUT[1]
Q = INPUT[2]
#print(INPUT)
A = []
for i in range(Q):
        A.append(int(input()))
#print(A)

P = [K]*N
#print(P)
for a in A:
    for i in range(len(P)):
        P[i] = P[i] - 1
    P[a-1] = P[a-1] + 1

#print(P)

for i in P:
    if(i >= 1):
        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))

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

Submission status: Time Limit Exceeded

Solution code:
# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
# 1.配列[添字=人数、値=初期の点数]
points = [i[1]] * i[0]
# 2.正解数(引数の数)
correntCount = i[2]

# 正解数ループ
for i in range(correntCount):
    correcter = int(input()) - 1    
    #全てを1減算
    points = [ n - 1 for n in points]
    #正解者に1加算(正解者以外を減算するため)
    points[correcter] += 1

# 値が0以下の参加者は敗退(No)、1以上なら勝ち抜け(Yes)
for point in points:
    if point <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import array

# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
# 1.配列[添字=人数、値=初期の点数]
points = [i[1]] * i[0]
# 2.正解数(引数の数)
correntCount = i[2]

# 正解数ループ
for i in range(correntCount):
    correcter = int(input()) - 1    
    #全てを1減算
    points = [ n - 1 for n in points]
    #正解者に1加算(正解者以外を減算するため)
    points[correcter] += 1

# 値が0以下の参加者は敗退(No)、1以上なら勝ち抜け(Yes)
for point in points:
    if point <= 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)]
p = [k - q] * n
'''
p = []
for i in range(n):
    p.append(k)
for i in range(q):
    for j in range(n):
        if(j + 1 == a[i]):
            pass
        else:
            p[j] = p[j] - 1
#print(p)
for i in range(n):
    if(p[i] > 0):
        print('Yes')
    else:
        print('No')
'''
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('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

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

Submission status: Time Limit Exceeded

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

#initialize
score = []
for x in range(N):
	score.append(K)

#point
for x in range(Q):
	A = int(input())
	for y in range(N):
		if y+1 != A:
			score[y] -= 1;

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

Submission status: Time Limit Exceeded

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

A = [K] * N
answer_list = []

for q in range(Q):
    answer_list.append(int(input()))

for answer in answer_list:
    for n in range(N):
        if n != answer - 1:
            A[n] -= 1

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

for i in range(1, n+1):
    tmp = a.count(i)
    if k+tmp-q > 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(input())

points = [K] * N
for correct in A:
    for i in range(N):
        if i != int(correct) - 1:
            points[i] -= 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())
human = [K for i in range(N)]
for i in range(Q):
     p = int(input())
     human = [human[j]-1 if j != p-1 else human[j] for j in range(N)]
for i in range(N):
    if human[i] <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

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

for _ in range(Q):
	A = int(input())
	P = list(map(lambda x : x-1, P))
	P[A-1] += 1
for i in P:
	if i > 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())

A_list = [int(input()) for i in range(Q)]
Point_list = [K for i in range(N)]

for j in range(Q):
    Point_list = list(map(minus,Point_list))
    Point_list[A_list[j]-1] += 1

for j in range(N):
    if Point_list[j] <= 0:
        print("No")

    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
   
L=list(map(int,input().split()))
N=L[0]
K=L[1]
Q=L[2]
S=[]
for i in range(Q):
  S.append(int(input()))
S.sort()
for i in range(N):
  num_ans=S.count(i+1)
  point=K-Q+num_ans
  if point>0 :
    print("Yes")
  else:
    print("No")
  S=S[num_ans:]

Submission status: Time Limit Exceeded

Solution code:
L=list(map(int,input().split()))
N=L[0]
K=L[1]
Q=L[2]
S=[]
for i in range(Q):
  S.append(int(input()))
point=[0]*N
num_ans=[0]*N
for i in range(N):
  num_ans[i]=S.count(i+1)
  point[i]=K-Q+num_ans[i]
  if point[i]>0 :
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q = (int(x) for x in input().split())
p = [k]*n
for x in range(q):
  for y in range(len(p)):
    p[y] -= 1
  s = int(input())
  p[s-1] += 1
for z in range(len(p)):
  if p[z] > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
def update (winner):
    for i in range(len(points)):
        if i != winner-1:
            points[i]-=1
n,k,q=map(int,input().split())
points=[k]*n

for i in range(q):
    a=int(input())
    update(a)
for i in range(len(points)):
    if points[i]<=0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
def update (winner):
    for i in range(len(points)):
        if i != winner-1:
            points[i]-=1
n,k,q=map(int,input().split())
points=[k]*n
winners=[]
for i in range(q):
    a=int(input())
    winners.append(a)
for i in winners:
    update(i)
for i in range(len(points)):
    if points[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(0, Q):
    A.append(int(input()))
a = np.array([K] * N)
for i in A:
    a[i-1] += 1
    a = a - 1

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
m = [k]*n
for i in range(q):
  a = int(input())-1
  m[a]+=1
  for j in range(n):
    m[j]-=1

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = []
m = [k]*n
for i in range(q):
  a = int(input())
  m[a-1]+=1
  for j in range(n):
    m[j]-=1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split(" "))
a=[]
a2={}

for i in range(Q):
  a.append(input())
  
for i in range(N):
  a2[i+1] = a.count(str(i+1))

for i in range(N):
  if a2[i+1] >= Q-K+1:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split(" "))
#正解者のリスト、正解順
a=[]
#番号：正解数
a2={}

for i in range(Q):
  a.append(input())
  
#参加者の得点リスト、順番に並んでる
b = []

for i in range(N):
  b.append(0)

  
for i in range(N):
  a2[i+1] = a.count(str(i+1))

for i in range(N):
  if a2[i+1] >= Q-K+1:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
import numpy as np

N, point, correct = [int(x) for x in input().split()]
r_list = [int(1) for x in range(1, N + 1)]
p_list = [point for x in range(1, N + 1)]
range_list = np.array(r_list)
points_list = np.array(p_list)

for i in range(correct):
    answer = int(input()) - 1
    points_list = points_list - range_list
    points_list[answer] += 1
#    print(points_list)

for p in points_list:
    if p <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

for i in range(N):
    v = Q - A.count(i)
    if v < K:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

U = []
for i in range(N):
    U.append(Q-A.count(i))
# print(U)

R=[]
for i in U:
    if i < K:
        # R.append("Yes")
        print("Yes")
    else:
        # R.append("No")
        print("No")
# print(R)

Submission status: Time Limit Exceeded

Solution code:
def solve():
    N, K, Q = map(int, input().split())
    point = [K for _ in range(N)]
    
    for _ in range(Q):
        answer = int(input()) - 1
        for i in range(N):
            if answer == i:
                continue
            else:
                point[i] -= 1
    
    for i in range(N):
        if point[i] > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    solve()

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
#Nは参加人数,Kは初期ポイント、Qはクイズ回数
N ,K ,Q = map(int,input().split())

N_case =[]
i =0
while i <N :
  N_case.append(K)
  i+=1

j =0
while j <Q :
  k =0
  a = int(input())
  while k <N:
    N_case[k] -=1
    k+=1
  N_case[a-1] +=1
  j +=1


for n in N_case:
  if n>0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
x = input().split()
plist = [int(x[1]) for i in range(int(x[0]))]
y = []
l = 0
while l < int(x[2]):
    ans = input()
    y.append(int(ans))
    l += 1

for i in y:
    for n in range(len(plist)):
        if n != i-1:
            plist[n] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
x = input().split()
plist = list(range(1, int(x[0])+1))
pointdict = {}
y = []
i = 1
while i < int(x[0]) + 1:
    pointdict[i] = int(x[1])
    i += 1

l = 0
while l < int(x[2]):
    ans = input()
    y.append(ans)
    l += 1

for i in y:
    for e in plist:
        if e != int(i):
            pointdict[e] -= 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
pl=[k]*n
con=0
for j in range(q):
    for i in range(n):
        if i != l[con]-1:
            pl[i]=pl[i]-1
    con+=1
for k in range(n):
    if pl[k]>=1:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# ABC141 C - Attack Survival

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

P = []

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

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


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

Submission status: Time Limit Exceeded

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

for i in range(q):
    line = input()
    a.append(line)

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

point = [k] * n

for _ in range(q):
    answer = int(input()) - 1
    for i in range(n):
        if i != answer:
            point[i] -= 1

for j in point:
    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 _ in range(q)]
m = [k]*n 
for i in range(q):
  m = list(map(lambda x: x-1,m))
  m[a[i]-1] += 1
for j in range(n):
  if m[j] > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
players, point, round = [int(i) for i in input().split()]
scores = [point for i in range(players)]

for i in range(round):
    game = int(input())
    for i in range(players):
    	if i != game:
    		scores[i-1] -= 1

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

Submission status: Time Limit Exceeded

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

    for player_answer in A_list:
        # 正解者スコア+1して, その後全体-1
        player_score[player_answer - 1] = player_score[player_answer - 1] + 1
        player_score = list(map(lambda i: i - 1, player_score))
    
    for score in player_score:
        print("Yes" if score > 0 else "No")
    
if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
C = [int(input()) - 1 for _ in range(Q)]
S = [K] * N
for c in C:
    for i in range(len(S)):
        S[i] -= 1
    S[c] += 1

for j in S:
    if j <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
cp = [int(input())-1 for _ in range(Q)]
sp = [K] * N
for c in cp:
    for i in range(len(sp)):
        sp[i] -= 1
    sp[c] += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# get initial input parameter
n, k, q = map(int, input().split())

# get answer list
answer_list = [ int(input()) for _ in range(q) ]

# init correct num list
correct_num_list = [ answer_list.count(answer + 1) for answer in range(n) ]

for answer in range(n):
    if (0 < (k - (q - correct_num_list[answer]))):
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
# get initial input parameter
n, k, q = map(int, input().split())

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

for round in range(q):
    # get correct answer persion
    person_index = int(input()) - 1
    
    # point decrement
    point_list = [ point_list[i] - 1 if i != person_index else point_list[i] for i in range(n) ]

for item in point_list:
    if (0 < item):
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

# 参加者の得点一覧を作成
point_dic = {}
for i in range(1, n + 1):
    point_dic[i] = k
#print(point_dic)


for i in range(1, q + 1):
    ans = int(input())
    for j in range(1, n + 1):
        if ans == j:
            pass
        else:
            point_dic[j] -= 1

for i, j in point_dic.items():
    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(" "))

score_list = np.ones(N) * K

for q in range(Q):
    i = int(input())

    subtract = np.ones(N) * -1
    subtract[i - 1] += 1

    score_list = score_list + subtract

for s in score_list:
    if s > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

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

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

for q in range(Q):
    i = int(input())

    subtract = np.array([-1] * N)
    subtract[i - 1] += 1

    score_list = score_list + subtract

for cond in (score_list > 0):
    print("Yes" if cond else "No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

n, k, q = [int(nkq) for nkq in input().split()]
sys.stderr.write(str(n)+' '+str(k)+' '+str(q)+'\n')

arr = np.full(n, k-q, dtype=np.int64)

for i in range(q):
  a_i = int(input())
  
  for j in range(n):
    if j+1 == a_i:
      arr[j] += 1

  sys.stderr.write(str(i+1)+': ')
  for j in range(n):
    sys.stderr.write(str(arr[j])+' ')
  sys.stderr.write('\n')

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

n, k, q = [int(nkq) for nkq in input().split()]
arr = np.full(n, k, dtype=np.int64)

for i in range(q):
  a_i = int(input())
  
  for j in range(n):
    if arr[j] > 0 and j+1 != a_i:
      arr[j] -= 1

for j in range(n):
  if arr[j] == 0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

n, k, q = [int(nkq) for nkq in input().split()]
sys.stderr.write(str(n)+' '+str(k)+' '+str(q)+'\n')

arr = np.full(n, k, dtype=np.int64)

for i in range(q):
  a_i = int(input())
  
  for j in range(n):
    if j+1 != a_i:
      arr[j] -= 1

#  sys.stderr.write(str(i+1)+': ')
#  for j in range(n):
#    sys.stderr.write(str(arr[j])+' ')
#  sys.stderr.write('\n')

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

n, k, q = [int(nkq) for nkq in input().split()]
sys.stderr.write(str(n)+' '+str(k)+' '+str(q)+'\n')

#canTravel = True
#t_pre, x_pre, y_pre = 0,0,0

arr = np.full(n, k, dtype=np.int64)

for i in range(q):
  a_i = int(input())
  
  for j in range(n):
    if j+1 != a_i:
      arr[j] -= 1

  sys.stderr.write(str(i+1)+': ')
  for j in range(n):
    sys.stderr.write(str(arr[j])+' ')
  sys.stderr.write('\n')

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

#if canTravel:
#  print("Yes")
#else:
#  print("No")

sys.stderr.write('\n')