Problem:


Score: 300 points

Problem Statement

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

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

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

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

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

Constraints

All values in input are integers.

2 \leq N \leq 10^5

1 \leq K \leq 10^9

1 \leq Q \leq 10^5

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

Input

Input is given from Standard Input in the following format:

N K Q
A_1
A_2
.
.
.
A_Q

Output

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

Sample Input 1

6 3 4
3
1
3
2

Sample Output 1

No
No
Yes
No
No
No

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

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

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

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

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

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

Sample Input 2

6 5 4
3
1
3
2

Sample Output 2

Yes
Yes
Yes
Yes
Yes
Yes

Sample Input 3

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

Sample Output 3

No
No
No
No
Yes
No
No
No
Yes
No



Sample input:
6 3 4
3
1
3
2


Sample output:
No
No
Yes
No
No
No

Submission status: Time Limit Exceeded

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

ns_points = [k] * n

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

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

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v >(Q - K):
            l.append(i-1)
    l.sort()
    for j in range(N):
        if j in l:
            print('Yes')
            l.pop(0)
#             if l == []:
#                 for _ in range(N-j-1):
#                     print('No')
#                 break
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v >(Q - K):
            l.append(i-1)
    l.sort()
    for j in range(N):
        if j in l:
            print('Yes')
            l.pop(0)
            if l == []:
                for _ in range(N-j-1):
                    print('No')
                break
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v >(Q - K):
            l.append(i-1)
    l.sort()
    for j in range(N):
        if j in l:
            print('Yes')
            l.pop(0)
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v >(Q - K):
            l.append(i-1)
    for j in range(N):
        if j in l:
            print('Yes')
#             l.pop()
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in sorted(dict(c).items(),reverse = True, key=lambda x:x[1]):
        if v >(Q - K):
            l.append(i-1)
        else:
            break
    for j in range(N):
        if j in l:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = [(i-1) for i,v in dict(c).items() if v >(Q - K)]
    for j in range(N):
        if j in l:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

x = K - Q
y = (-1) * x

if x > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v > y:
            l.append(i-1)
    for j in range(N):
        if j in l:
            print('Yes')
        else:
            print('No')

Submission status: Time Limit Exceeded

Solution code:
import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if K - Q > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in dict(c).items():
        if v > (Q-K):
            l.append(i-1)
    for j in range(N):
        if j in l:
            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)]

def convert(x):
    if x > 0:
        print('Yes')
    else:
        print('No')

if K - Q > 0:
    for _ in range(N):
        print('Yes')
else:
    l = [K] * N
    for i,v in enumerate(A):
        l = list(map(lambda x: x - 1, l))
        l[v-1] = l[v-1] + 1
    for i in l:
        convert(i)

Submission status: Time Limit Exceeded

Solution code:
# TLE実装　O(N^2)

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

scores = [K] * N

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

for s in scores:
  print(("No","Yes")[s > 0])

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
hp = Q - K
for i in range(N):
    if A.count(i+1) > hp:
        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)]

#正答数のカウント
correct = []
for i in range(N):
    correct.append(A.count(i+1))
hp = Q - K
for i in range(N):
    if correct[i] > hp:
        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)]

def print_ans(lst):
    for l in lst:
        if l:
            print("Yes")
        else:
            print("No")
    exit()

hp = K - Q

if hp > 0:
    #はじめから全員Yes
    tmp = [True] * N
    print_ans(tmp)
else:
    tmp = []
    for i in range(N):
        if hp + A.count(i+1) > 0:
            tmp.append(True)
        else:
            tmp.append(False)
    print_ans(tmp)

Submission status: Time Limit Exceeded

Solution code:

def resolve():
    import sys
    import string
    input = sys.stdin.readline
    # row = [int(x) for x in input().rstrip().split(" ")]
    # n = int(input().rstrip())
    n, k, q = [int(x) for x in input().rstrip().split(" ")]

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

    for i in range(q):
        a = int(input().rstrip())
        scores = [score - 1 if i != a-1 else score for i, score in enumerate(scores)]

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

if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(Q):
  A = int(input())
  for j in range(N):
    if j != A-1:
      L[j] -= 1
      
for j in range(N):
  if L[j] > 0:
    print("Yes")
  else: 
    print("No")

Submission status: Time Limit Exceeded

Solution code:
N,point,answer=list(map(int,input().split()))
W=[point]*N
for i in range(answer):
  U=int(input())
  W=[n-1 for n in W]
  W[U-1]+=1
for k in range(N):
  if W[k]<=0:
    print("No")
  else:
    print("Yes")

Submission status: Time Limit Exceeded

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

for i in a:
    for j in range(1,N + 1):
        if i == j:
            b[j - 1] += 1
for i in b:
    if i > Q - K:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

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

for i in range(q):
    ans = int(input())
    scores[:ans-1] = scores[:ans-1] - 1
    scores[ans:] = scores[ans:] - 1

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

Submission status: Time Limit Exceeded

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

a=[]
for i in range(q):
    
    a.append(int(input()))
             
for i in range(1,n+1):
    
             
             
    if q-a.count(i)<k:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q= list(map(int, input().strip().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:
n,k,q = list(map(int, input().strip().split()))
point=[k-q]*n
a=[0]*q
for i in range(q):
    a[i]=int(input())
for i in range(n):
    point[i]+=a.count(i+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)]

p=[K]*N

for a in A:
    p = list(map(lambda x:x-1, p))
    p[a-1]+=1
for i in p:
    print('Yes' if 0<i else 'No')

Submission status: Time Limit Exceeded

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

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

point_l = [k] * n

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

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

Submission status: Time Limit Exceeded

Solution code:
def calc_sub(m):
  return m-1

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

point_l = [k] * n

for _ in range(q):
  point_l = list(map(calc_sub, point_l))
  ans = int(input())
  point_l[ans-1] += 1

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

if K > Q:
    for i in range(N):
        print('Yes')
    exit()

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# abc141_c.py
# https://atcoder.jp/contests/abc141/tasks/abc141_c

# C - Attack Survival /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 300点

# 問題文
# 高橋君は早押しクイズの大会を開くことにしました。
# スコアボードの作成を任されたキザハシ君は、次のルールを持つラウンドのポイントを管理するプログラムを書くのに苦戦しています。
# このラウンドの参加者は N人であり、1 から N までの番号がついています。ラウンド開始時点では全員が Kポイントを持っています。
# 誰かが問題に正解すると、その人以外の N−1人のポイントが 1減ります。これ以外によるポイントの変動はありません。
# ラウンド終了時にポイントが 0以下の参加者は敗退し、残りの参加者が勝ち抜けます。
# このラウンドでは Q回の正解が出て、i 番目に正解したのは参加者 Ai でした。 
# キザハシ君の代わりに、N人の参加者のそれぞれが勝ち抜けたか敗退したかを求めるプログラムを作成してください。

# 制約
#     入力はすべて整数
#     2≤N≤105
#     1≤K≤109
#     1≤Q≤105
#     1≤Ai≤N (1≤i≤Q)

# 入力
# 入力は以下の形式で標準入力から与えられます。
# N K Q
# A1
# A2
# .
# .
# .
# AQ

# 出力
# N行出力してください。i 行目には、参加者 iが勝ち抜けたなら Yes を、敗退したなら No を出力してください。

# 入力例 1
# 6 3 4
# 3
# 1
# 3
# 2

# 出力例 1
# No
# No
# Yes
# No
# No
# No

# はじめ、各参加者の持つポイントは (3,3,3,3,3,3)です。
#     参加者 3が正解し、各参加者のポイントは (2,2,3,2,2,2)になります。
#     参加者 1が正解し、各参加者のポイントは (2,1,2,1,1,1)になります。
#     参加者 3が正解し、各参加者のポイントは (1,0,2,0,0,0)になります。
#     参加者 2が正解し、各参加者のポイントは (0,0,1,−1,−1,−1)になります。

# 得点が 0以下になった参加者 1,2,4,5,6 は敗退し、残った参加者 3が勝ち抜けます。

# 入力例 2
# 6 5 4
# 3
# 1
# 3
# 2

# 出力例 2
# Yes
# Yes
# Yes
# Yes
# Yes
# Yes

# 入力例 3
# 10 13 15
# 3
# 1
# 4
# 1
# 5
# 9
# 2
# 6
# 5
# 3
# 5
# 8
# 9
# 7
# 9

# 出力例 3
# No
# No
# No
# No
# Yes
# No
# No
# No
# Yes
# No


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    N, K, Q = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    values = list()
    for i in range(Q):
        log(f'i=[{i}]')
        values.append(int(lines[i+1]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    lst = [K] * N

    for q in range(Q):
        for n in range(N):
            if n != values[q]-1:
                lst[n] -= 1

    results = list()
    for item in lst:
        if item <= 0:
            result = 'No'
        else:
            result = 'Yes'
        results.append(result)

    return results


# 引数を取得
def get_input_lines():
    line = input()
    N, K, Q = list(map(int, line.split()))
    lines = list()
    lines.append(line)
    for _ in range(Q):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['6 3 4', '3', '1', '3', '2']
        lines_export = ['No', 'No', 'Yes', 'No', 'No', 'No']
    if pattern == 2:
        lines_input = ['6 5 4', '3', '1', '3', '2']
        lines_export = ['Yes', 'Yes', 'Yes', 'Yes', 'Yes', 'Yes']
    if pattern == 3:
        lines_input = ['10 13 15', '3', '1', '4', '1', '5', '9', '2', '6', '5', '3', '5', '8', '9', '7', '9']
        lines_export = ['No', 'No', 'No', 'No', 'Yes', 'No', 'No', 'No', 'Yes', 'No']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n,k,q=map(int,input().split());a={i+1:k for i in range(n)}
for _ in range(q):
  m=int(input())
  for i in range(1,n+1):
    if i==m: continue
    a[i]-=1
print(*['Yes' if a[i]>0 else 'No' for i in range(1,n+1)],sep='\n')

Submission status: Time Limit Exceeded

Solution code:
N, K, Q = map(int,input().split())
a = [K] * N
for i in range(Q):
    A = int(input())
    for j in range(N):
        if j != A - 1:
            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())
a=[]
for _ in range(q):
  a.append(int(input()))

def minus(data):
  return data - 1

points = [k]*(n+1)
for i in range(q):
  points = list(map(minus, points))
  points[a[i]] += 1

for i in range(1,n+1):
  if points[i] >= 1:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

for po in point:
  if po > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

for a in A:
  for index,p in enumerate(point):
    if index+1 != a:
      point[index] -= 1

for po in point:
  if po > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
point = [K]*N
def calc(num):
  return num-1
for a in A:
  for index,p in enumerate(point):
    if index+1 != a:
      point[index] -= 1
     

for po in point:
  if po > 0:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

Solution code:
n,k,q,*a=map(int,open(0).read().split())
points=[k]*n
for i in range(q):
    for j in range(n):
        if a[i]-1!=j:
            points[j]-=1
for i in range(n):
    print('NYoe s'[points[i]>0::2])

Submission status: Time Limit Exceeded

Solution code:
N,K,Q,*A = map(int, open(0).read().split())
ans = [K] * N

for a in A:
    ans[a-1] += 1
    ans = [x-1 for x in ans]

for x in ans:
    print('Yes' if x > 0 else 'No')

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
n, k, q = map(int, input().split())
a = [int(input()) for _ in range(q)]
count_a = Counter(a)

for i in range(1, n+1):
    point = k
    for key, value in count_a.items():
        if key != i:
            point -= value
    if point <= 0:
        print("No")
    else:
        print("Yes")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A_list = []
for _ in range(Q):
  A = int(input())
  A_list.append(A)
for i in range(1,N+1):
  print("Yes" if K + A_list.count(i) - Q > 0 else "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 A.count(i) > Q - K:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

Solution code:
n, k, q = map(int, input().split())
point = [k] * n
for i in range(q) :
    a = int(input())
    for j in range(n) :
        if j != a - 1 :
            point[j] -= 1
for _ in range(n) :
    if point[_] <= 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()))
B = []
C = []
for j in range(N):
    B.append(K)
    C.append(-1)

for k in range(Q):
    B[A[k]-1] += 1
    for l in range(N):
        B[l] = B[l]+C[l]

for i in range(N):
    if B[i] >= 1:
        print('Yes')
    else:
        print('No')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np 


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

for i in range(Q):
    A = int(input())
    arr[:]-=1
    arr[A-1]+=1
    
for i in range(N):
    if arr[i]>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))

for i in range(n):
    ans = "Yes" if q - a.count(i+1) < k else "No"
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    n, k, q = map(int, input().split())
    score = [k for _ in range(n)]
    for _ in range(q):
        a = int(input())
        stay = score[a-1]
        score = list(map(lambda x:x-1, score))
        score[a-1] = stay
    for i in range(n):
        if score[i] > 0:
            print("Yes")
        else:
            print("No")
resolve()

Submission status: Time Limit Exceeded

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

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

for i in range(n) :
    if sum(c)-c[i] >= k :
        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)]

point = [k]*n

for i in range(q):
    solver = a[i]-1

    for j in range(0,solver):
        point[j] -= 1

    for j in range(solver+1,n):
        point[j] -= 1

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline

n, k, q = [int(w) for w in input().split()]

score = [k] * n

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

for s in score:
    cond = s > 0
    print("Yes" if cond else "No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N,K,Q=map(int,input().split())
A=[int(input()) for i in range(Q)]
C=np.ones(N)
B=np.zeros(N)+K
for i in range(Q):
  B=B-C
  B[A[i]-1]=B[A[i]-1]+1
for i in range(N):
  if B[i]>0:
    print('Yes')
  else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

N, K, Q = map(int, input().split())
list_A = [int(input()) for i in range(Q)]
list_P = [K] * N

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

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

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

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = (int(x) for x in input().split())
Win = ['No']*N
A = [int(input()) for I in range(Q)]
    
for TT in range(0,N):
    if K-Q+A.count(TT+1)>0:
        Win[TT] = 'Yes'
print('\n'.join(Win))

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = (int(x) for x in input().split())
Win = ['No']*N
A = [0]*Q
for T in range(0,Q):
    A[T] = int(input())
    
for TT in range(0,N):
    if K-Q+A.count(TT+1)>0:
        Win[TT] = 'Yes'
print('\n'.join(Win))

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter, defaultdict

n, k, q = map(int, input().split())
A = [int(input()) for _ in range(q)]
C = Counter(A)
d = defaultdict(int)
for key, val in C.items():
    d[key] = k + val - q
for i in range(1, n+1):
    if i not in A:
        d[i] = k-q
for i in range(1, n+1):
    if d[i] <= 0:
        print('No')
    else:
        print('Yes')

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
import numpy as np
n,k,q=map(int,input().split())
a=[]
for i in range(q):
  a_=int(input())
  a.append(a_)


listn_=[]
for i in range(n):
  listn_.append(k)
listn=np.array(listn_)

s=Counter(a)
for i in s.keys():
  lists_=[-1*s[i]]*n
  lists_[i-1]=0
  lists=np.array(lists_)
  listn=listn+lists

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

Submission status: Time Limit Exceeded

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

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

for i in range(Q):
    temp=int(input())
    points=[j-1 for j in points]
    points[temp-1]+=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())
P = [K]*N

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

for j in P:
    if j > 0:
        print("Yes")
    else:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
N,K,Q = map(int,input().split())
A = []
L = []
for i in range(N):
    A.append(K - Q)
for i in range(Q):
    L.append(int(input()))
for i in range(Q):
    for j in range(N):
        if j == L[i] - 1:
            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())
A = []
L = []
for i in range(N):
    A.append(K)
for i in range(Q):
    L.append(int(input()))
for i in range(Q):
    for j in range(N):
        if j == L[i] - 1:
            pass
        else:
            A[j] -= 1

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

Submission status: Time Limit Exceeded

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

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(n):
    num = 0
    for  cp in a:
        if cp == i + 1:
            num += 1
    if k <= q - num:
        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):
  tmp = int(input())
  A.append(tmp)

count_A = np.zeros(N)
for i in range(Q):
  count_A[A[i]-1] += 1

point_all = [K]*N
for i in range(N):
  if point_all[i]-(sum(count_A)-count_A[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)]

ANS = [k - q] * n

for i in range(n):
  if ANS[i] + 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)]
ANS = [k] * n

for i in range(q):
  for j in range(n):
    ANS[j] += -1
  ANS[A[i]-1] += 1

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

def calc_sum(n):
    return n-1

points = [K] * N
for i in range(Q):
    A = int(input())
    points = list(map(calc_sum, points))
    points[A-1] += 1
    
for i in range(N):
    if points[i] <= 0:
        print("No")
    else:
        print("Yes")