Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = [int(input()) for i in range(q)]

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>k-q:
    print("Yes")
  else:
    print("No")

# -*- 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 range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[i]>0:
    print("Yes")
  else:
    print("No")

# -*- 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 range(len(a)):
  for j in range(n):
    m[j]-=1
    m[i-1]+=1
  
for i in range(n):
  if m[i]>0:
    print("Yes")
  else:
    print("No")

# -*- 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")

# -*- coding: utf-8 -*-

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

a =[]

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

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

# -*- coding: utf-8 -*-

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

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

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

# -*- coding: utf-8 -*-

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

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

# -*- 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")

# -*- 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")
  else:
    print("No")

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

p = [0]*n

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

for i in range(n):
  if p[n]>k-q:
    print("Yes")
  else:
    print("No")

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

p = [0]*n

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

for i in range(n):
  if p[n]>k-q:
    print("Yes")
  else:
    print("No")
  

# -*- 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 range(a):
  for j in range(n):
    m[j]-=1
    m[i-1]+=1
  
for i in range(n):
  if m[i]>0:
    print("Yes")
  else:
    print("No")

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

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")

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

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>k-q:
    print("Yes")
  else:
    print("No")

# -*- coding: utf-8 -*-

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

m = [k]*n

for i in range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

# -*- coding: utf-8 -*-

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

m = [k]*n

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


# -*- 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 range(a):
  for j in range(n):
    m[j]=m[j]-1
    m[a-1]=m[a-1]+1
  
for i in range(n):
  if m[n]>0:
    print("Yes")
  else:
    print("No")

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

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>q-k:
    print("Yes")
  else:
    print("No")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Time Limit Exceeded

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted