Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#ABC066C
import pprint
n = int(input())
ai = list(map(int, input().split()))
bi = []
for a in ai:
    bi.append(a)
    bi.reverse()
for b in bi:
    print(b, end=" ")

Fixed submission:
#ABC066C
import pprint
n = int(input())
ai = list(map(int, input().split()))
bi = []
ran = 0
if n%2==0:
    for i in range(n//2):
        bi.append(ai[i+i+1])
    bi.reverse()
    for i in range(n//2):
        bi.append(ai[i+i])
else:
    for i in range(n//2+1):
        bi.append(ai[i+i])
    bi.reverse()
    for i in range(n//2):
        bi.append(ai[i+i+1])
        
for b in bi:
    print(b, end=" ")
Buggy python submission (verdict: Runtime Error):
#ABC063B
S = input()
all_dif = True
for i in range(len(S)):
    for j in range(i+1, len(S)):
        if S[i] == S[i+j]:
            all_dif = False
if all_dif:
    print("yes")
else:
    print("no")

Fixed submission:
#ABC063B
S = input()
all_dif = True
for i in range(len(S)):
    if i == len(S)-1:
        break
    for j in range(1,len(S)-i):
        if S[i] == S[i+j]:
            all_dif = False
if all_dif:
    print("yes")
else:
    print("no")
Buggy python submission (verdict: Runtime Error):
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if (ans - s[0])%10 == 0 and (ans - s[i])%10 != 0:
                s.pop(i)
                del_ok = True
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)

Fixed submission:
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if s[0]%10 == 0 and s[i]%10 != 0:
                s.pop(i)
                del_ok = True
                break
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)

Buggy python submission (verdict: Runtime Error):
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        for i in range(1, len(s)):
            if (ans - s[0])%10 == 0 and (ans - s[i])%10 != 0:
                s.pop(i)
                del_ok = True
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)

Fixed submission:
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if s[0]%10 == 0 and s[i]%10 != 0:
                s.pop(i)
                del_ok = True
                break
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)

Buggy python submission (verdict: Runtime Error):
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        ans = max(ans, sum(s))
        break
    else:
        if (ans - s[0])%10 == 0:
            s.pop(1)
        else:
            s.pop(0)
        if len(s) == 0:
            ans = 0
            break
print(ans)

Fixed submission:
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if s[0]%10 == 0 and s[i]%10 != 0:
                s.pop(i)
                del_ok = True
                break
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)
Buggy python submission (verdict: Runtime Error):
#ABC061C
import sys
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
now = 0
ans = ""
for a, b in ab:
    for i in range(b):
        now += 1
        if now == K:
            print(a)
            sys.exit(0)

Fixed submission:
#ABC061A
A,B,C = map(int,input().split())
if C >= A and C <= B:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
#ABC061C
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]

cnt = 0
ans = ""
for a, b in ab:
    ans += str(a) * b
    cnt += b
    if cnt >= K:
        print(ans[-1])
        break

Fixed submission:
#ABC061C
import sys
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
now = 0
ab.sort()
for a, b in ab:
    now += b
    if now >= K:
            print(a)
            sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
#ABC061C
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
ans = []
for i in range(N):
    for _ in range(ab[i][1]):
        ans.append(ab[i][0])
ans.sort()
print(ans[K-1])

Fixed submission:
#ABC061C
import sys
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
now = 0
ab.sort()
for a, b in ab:
    now += b
    if now >= K:
            print(a)
            sys.exit()
Buggy python submission (verdict: Runtime Error):
#ABC060B
A, B, C = map(int, input().split()
if A % 2 == (2 * B + 1) % 2:
    print("YES")
else:
    print("NO")

Fixed submission:
#ABC060B
A, B, C = map(int, input().split())
ok = False
for i in range(1,B+1):
    if i*A % B ==C:
        ok = True
if ok:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
count = 0
for i in range(a, b+1):
    if i % x ==0:
        count += 1
print(count)        

Fixed submission:
a, b, x = map(int, input().split())
ans = b//x - (a-1)//x
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from copy import deepcopy

N = int(input())

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors

n = prime_factors(N)

dicts = {}
for x in range(2**len(n)):
    flgs = bin(x)[2:]
    if len(flgs) < len(n):
        flgs = ''.join(['0' for _ in range(len(n)-len(flgs))]) + flgs
    flgs = flgs[::-1]
    
    a = 1
    b = 1
    for i in range(len(flgs)):
        if flgs[i] == '1':
            a *= n[i]
        else:
            b *= n[i]
    dicts[a+b] = {'a':deepcopy(a), 'b':deepcopy(b)}

            
min_ab = min(dicts.keys())
print(dicts[min_ab]['a'] + dicts[min_ab]['b'] - 2)

Fixed submission:
N = int(input())
 
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
 
    # divisors.sort()
    return divisors
 
n = sorted(make_divisors(N))

sum_yakusuu = N
for _n in n:
    if _n == 1:
        continue
    if _n+N/_n < sum_yakusuu:
        sum_yakusuu = int(_n+N/_n)
        bef_n = _n
    else:
        if len(n) == 2:
            print(int(_n-1))
        else:
            print(int(bef_n+N/bef_n-2))
        break
Buggy python submission (verdict: Runtime Error):
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b), 

Fixed submission:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b), b)))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    print(90-math.degrees(math.atan(   (a/(b-y))  )))
else:
    # 三角形
    print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))

Fixed submission:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b), b)))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = list(map(int, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    print(90-math.degrees(math.atan(   (a/(b-y))  )))
else:
    # 三角形
    print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))

Fixed submission:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b), b)))
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = list(map(int, input().split()))

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

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

ret = '\n'.join(['Yes' if x > 0 else 'No' for x in vec])
print(ret)

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

# vec = [K for _ in range(N)]

vec = [0 for _ in range(N)]

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

ret = '\n'.join(['Yes' if K-Q+x > 0 else 'No' for x in vec])
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, K, Q = list(map(int, input().split()))

vec = np.ones(N)*K

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

ret = '\n'.join(['Yes' if x > 0 else 'No' for x in vec])
print(ret)

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

# vec = [K for _ in range(N)]

vec = [0 for _ in range(N)]

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

ret = '\n'.join(['Yes' if K-Q+x > 0 else 'No' for x in vec])
print(ret)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N, K, Q = list(map(int, input().split()))

vec = np.ones(N)*K

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

ret = '\n'.join(['Yes' if x > 0 else 'No' for x in vec])
print(ret)

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

# vec = [K for _ in range(N)]

vec = [0 for _ in range(N)]

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

ret = '\n'.join(['Yes' if K-Q+x > 0 else 'No' for x in vec])
print(ret)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = list(map(int, input().split()))

A = list(map(lambda x: int(x), input().split(' ')))
A.sort(reverse=True)

for _ in range(M):
    A[0] = A[0] // 2
    for i in range(N-1):
        if A[i] < A[i+1]:
            A[i+1], A[i] = A[i:i+2]
        else:
            break

print('{}'.format(sum(A)))

Fixed submission:
import heapq
 
N, M = list(map(int, input().split()))
A = input().split(" ")
neg_A = [-int(a) for a in A]
 
heapq.heapify(neg_A)
 
for t in range(M):
    heapq.heappush(neg_A, -(-heapq.heappop(neg_A)//2))
print(-sum(neg_A))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = list(map(int, input().split()))

A = list(map(lambda x: int(x), input().split(' ')))
A.sort(reverse=True)

for _ in range(M):
    A[0] = A[0] // 2
    A.sort(reverse=True)

print('{}'.format(sum(A)))

Fixed submission:
import heapq
 
N, M = list(map(int, input().split()))
A = input().split(" ")
neg_A = [-int(a) for a in A]
 
heapq.heapify(neg_A)
 
for t in range(M):
    heapq.heappush(neg_A, -(-heapq.heappop(neg_A)//2))
print(-sum(neg_A))

Buggy python submission (verdict: Runtime Error):
# %%
N, M = list(map(int, input().split()))

# %%
A = list(map(lambda x: int(x), input().split(' ')))
A.sort()
A = A[::-1]

for _ in range(M):
    A[0] = A[0] // 2
    for i in range(N):
        if A[i+1] > A[i]:
            A[i+1], A[i] = A[i:i+2]
        else:
            break
    
print('{}'.format(sum(A)))

Fixed submission:
import heapq
 
N, M = list(map(int, input().split()))
A = input().split(" ")
neg_A = [-int(a) for a in A]
 
heapq.heapify(neg_A)
 
for t in range(M):
    heapq.heappush(neg_A, -(-heapq.heappop(neg_A)//2))
print(-sum(neg_A))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = list(map(int, input().split()))
A = list(map(lambda x: int(x), input().split(' ')))

for _ in range(M):
    diff = 0
    idx = 0
    for i in range(N):
        if (A[i] - A[i]//2) > diff:
            diff = A[i] - A[i]//2
            idx = i
    A[idx] = A[idx] // 2
    
print('{}'.format(sum(A)))

Fixed submission:
import heapq
 
N, M = list(map(int, input().split()))
A = input().split(" ")
neg_A = [-int(a) for a in A]
 
heapq.heapify(neg_A)
 
for t in range(M):
    heapq.heappush(neg_A, -(-heapq.heappop(neg_A)//2))
print(-sum(neg_A))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]

cnt = 0
for i, x in enumerate(s[:-1]):
    for y in s[i+1:]:
        if x == y:
            cnt += 1
print(cnt)

Fixed submission:
from collections import Counter

N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]
c = Counter(sorted(s))
ret = int(sum([x * (x-1) / 2 for x in c.values()]))
print(ret)
Buggy python submission (verdict: Runtime Error):
import numpy as np

N = int(input)

digit = int(np.log10(N).round()+1)
cnt = 0

for x in range(digit):
    x += 1
    if x % 2 != 0:
        if x < digit:
            cnt += (10**x) - (10**(x-1))
        else:
            cnt += N - (10**(x-1)) + 1
print('{}'.format(cnt))

Fixed submission:
N = int(input())
# %%

digit = len(str(N))
cnt = 0

for x in range(digit):
    x += 1
    if x % 2 != 0:
        if x < digit:
            cnt += (10**x) - (10**(x-1))
        else:
            cnt += N - (10**(x-1)) + 1

print('{}'.format(cnt))
Buggy python submission (verdict: Runtime Error):
import numpy as np
L, R= list(map(int, input().split()))
array = np.arange(L, R+1)

div_3 = array / 3
np.mod(div_3,1,div_3)
flg_3 = np.any(div_3 == 0)

div_673 = array / 673
np.mod(div_673,1,div_673)
flg_673 = np.any(div_673 == 0)

print('{}'.format(0 if flg_3 & flg_673 else L*(L+1)%2019))


Fixed submission:
L, R= list(map(int, input().split()))
# array = np.arange(L, R+1)


# flg = True

def get_amari():
    min_ = 2019
    for i in range(L,R):
        for j in range(i+1, R+1):
            # if (i*j)%2019==0:
            #     print(0)
            #     flg = False
            #     break
            # elif (i*j)%2019 < min_:
            #     min_ = (i*j)%2019
            if (i*j)%2019 < min_:
                min_ = (i*j)%2019
    return min_
#     if flg:
        # print(min_)
                
def get_flg3():
    if R-L >= 3:
        return True
    elif R//3 != L//3:
        return True
    else:
        return False
    

def get_flg673():
    if R-L >= 673:
        return True
    elif R//673 != L//673:
        return True
    else:
        return False

def mataganai_2019():
    return (L*(L+1))//2019 == ((R-1)*R)//2019
        
if get_flg3() & get_flg673():
    print(0)
else:
    print(get_amari())
Buggy python submission (verdict: Runtime Error):

import math
import numpy as np

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

# %%
A, B, C, D = list(map(int, input().split()))
    
CD = lcm(C, D) 

n_C = int(np.floor(B/C) - np.floor((A-1)/C))
n_D = int(np.floor(B/D) - np.floor((A-1)/D))

n_CD = int(np.floor(B/CD) - np.floor((A-1)/CD))

print('{}'.format(B-A+1-(n_C+n_D-n_CD)))


Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 22 21:34:54 2019

@author: owner
"""
import numpy as np

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

def lcm(x, y):
    return (x * y) // gcd(x, y) #math.gcd(x, y)

# %%
A, B, C, D = list(map(int, input().split()))
    
CD = lcm(C, D) 

n_C = np.int(np.floor(B/C) - np.floor((A-1)/C))
n_D = np.int(np.floor(B/D) - np.floor((A-1)/D))

# n_CD = np.int(np.floor(B/CD) - np.floor((A-1)/CD))

Cdiv = B // C - (A-1) // C
Ddiv = B // D - (A-1) // D
import fractions
cddiv = (C*D)//fractions.gcd(C,D)
CDdiv = B // (cddiv) - (A-1) // (cddiv)
    
ans = B - A + 1 -Cdiv - Ddiv + CDdiv#- n_C - n_D + CDdiv#n_CD
print('{}'.format(ans))
Buggy python submission (verdict: Runtime Error):

N = int(input())
if N == 2:
    print(1)
else:
    xy = []
    for _ in range(N):
        xy.append(list(map(int, input().split())))

    diff = []
    for i in range(N):
        if i == 0:
            continue
        curr = [xy[i][0]-xy[i-1][0],
                xy[i][1]-xy[i-1][1]]
        diff.append(str(curr[0])+','+str(curr[1]))

    diff_uniq = list(set(diff))
    num = {}
    for curr_target_xy in diff_uniq:
        cnt = 0
        for curr_xy_in_raw_xy in diff:
            if curr_xy_in_raw_xy == curr_target_xy:
                cnt += 1
        num[curr_target_xy] = cnt
    print('{}'.format(N-max(list(num.values()))))


Fixed submission:
N = int(input())
if N <= 2:
    print(1)
else:
    xy = []
    for _ in range(N):
        xy.append(list(map(int, input().split())))
    
    xy.sort()

    max_dup = 0
    for i in range(N-1):
        curr_i = xy[i]
        for j in range(i+1, N):
            curr_j =xy[j]
            p, q = curr_j[0] - curr_i[0], curr_j[1] - curr_i[1]
            
            cnt = 0
            for n in range(N):
                if n == 0:
                    continue
                if [xy[n][0]-p, xy[n][1]-q] in xy:
                # (xy[n][0]-xy[n-1][0] == p) and (xy[n][1]-xy[n-1][1] == q):
                
                    cnt += 1
            max_dup = max(max_dup, cnt)
    print('{}'.format(N-max_dup))
Buggy python submission (verdict: Runtime Error):
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()
if n < 10:
  	print('Yes')
    sys.exit()

for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()


for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')

Buggy python submission (verdict: Runtime Error):
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()
if n < 10:
  	print('Yes')
    sys.exit()

for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()


for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')

Buggy python submission (verdict: Runtime Error):
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()
if n < 10:
  	print('Yes')
    sys.exit()

for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()


for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            sys.exit()

print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

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

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    points -= 1
    points[a - 1] += 1

survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Fixed submission:
# import math
# import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

points = [K - Q] * N

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    # points -= 1
    # points[a - 1] += 1
    points[a-1] += 1
survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

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

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    points = [point - 1 for point in points]
    points[a - 1] += 1

survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Fixed submission:
# import math
# import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

points = [K - Q] * N

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    # points -= 1
    # points[a - 1] += 1
    points[a-1] += 1
survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

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

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    points = [point - 1 for point in points]
    points[a - 1] += 1

survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")

Fixed submission:
# import math
# import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]
# input
N, K, Q = map(int, input().split())
As = [int(input()) for i in range(Q)]

points = [K - Q] * N

for a in As:
    # points = [0 if point == 0 for point in points else point - 1]
    # points -= 1
    # points[a - 1] += 1
    points[a-1] += 1
survive = ['Yes' if point >= 1 else 'No' for point in points]

print(*survive, sep="\n")