Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03633 (python)

Fixed submission:
N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x3 = a % b
    if x3 == 0:
        return min(a,b)
    N = GCD(b,x3)
    return N

def lcm(a,b):
    return a*b // GCD(a,b)
        
ans = T[0]
for i in range(1,N):
    ans = lcm(ans,T[i]) 

print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x1 = max(a,b)
    x2 = min(a,b)
    x3 = x1 % x2
    if x3 == 0:
        return x2
    N = GCD(x2,x3)
    return N
        
ans = T[0]
tmp = ans
for i in range(1,N):
    ans = tmp * T[i] / GCD(tmp,T[i])
    tmp = ans

print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x1 = max(a,b)
    x2 = min(a,b)
    x3 = x1 % x2
    if x3 == 0:
        return x2
    else:
        return GCD(x2,x3)
        
ans = T[0]
tmp = ans
for i in range(1,N):
    ans = tmp * T[i] / GCD(tmp,T[i])
    tmp = ans

print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x1 = max(a,b)
    x2 = min(a,b)
    x3 = x1 % x2
    if x3 == 0:
        return x2
    else:
        return GCD(x2,x3)
        
ans = T[0]
for i in range(1,N):
    ans = ans * T[i] / GCD(ans,T[i])

print(int(ans))
Problem p03645 (python)

Fixed submission:
N,M = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(M)]

ab.sort(key = lambda x:x[0])

import queue
import sys
q = queue.Queue()
memo = [True] * (N+1)
memo[1] = False
cnt = 0
for i in range(M):
    if ab[i][0] == 1:
        q.put(ab[i][1])
        cnt += 1
    else :break
ab2 = [[0]] * (N+1)
for j in range(i,M):
    ab2[ab[j][0]] = ab2[ab[j][0]] + [ab[j][1]]
idx = 0
while not q.empty():
    s = q.get()
    memo[s] = False
    if s==N:
        print('POSSIBLE')
        sys.exit()
    if idx < cnt:
        for i in ab2[s][1:]:
            if memo[i]: q.put(i)
    idx += 1
print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(M)]


import queue
import sys
q = queue.Queue()
memo = [True] * (N+1)
memo[1] = False
cnt = 0
ab2 = [[0]] * (N+1)
for j in range(M):
    ab2[ab[j][0]] = ab2[ab[j][0]] + [ab[j][1]]
for i in ab[1][1:]:
    q.put(i)
    cnt += 1
idx = 0
while not q.empty():
    s = q.get()
    memo[s] = False
    if s==N:
        print('POSSIBLE')
        sys.exit()
    if idx < cnt:
        for i in ab2[s][1:]:
            if memo[i]: q.put(i)
    idx += 1
print('IMPOSSIBLE')
Problem p03702 (python)

Fixed submission:
N,A,B = map(int,input().split())
h = [int(input()) for _ in range(N)]

left = 1
right = max(h)
import math
def judge(x):
    cnt = 0
    tmp = 0
    for i in range(N):
        tmp = h[i] - B * x
        if tmp > 0:
            cnt += math.ceil(tmp/(A-B))
    if cnt <= x:
        return True
    else:
        return False
    
def binary(left,right):
    c = (left + right)//2
    if left >= right:
        for i in range(3):
            idx = left -1 + i
            if judge(idx):
                return (idx)
    if judge(c):
        right = c -1
        return binary(left,right)
    else:
        left = c + 1
        return binary(left,right)
    
    
ans = binary(left,right)
print(ans)

Buggy submission (verdict: Runtime Error):
N,A,B = map(int,input().split())
h = [int(input()) for _ in range(N)]

left = 1
right = max(h)//A + 1
import math
def judge(x):
    cnt = 0
    tmp = 0
    for i in range(N):
        tmp = h[i] - B * x
        if tmp > 0:
            cnt += math.ceil(tmp/(A-B))
    if cnt <= x:
        return True
    else:
        return False
    
def binary(left,right):
    c = (left + right)//2
    if left >= right:
        for i in range(3):
            idx = left -1 + i
            if judge(idx):
                return (idx)
    if judge(c):
        right = c -1
        return binary(left,right)
    else:
        left = c + 1
        return binary(left,right)
    
    
ans = binary(left,right)
print(ans)
Problem p03761 (python)

Fixed submission:

N = int(input())
S = [input() for _ in range(N)]
a2n = lambda c: ord(c) - ord('a')
n2a = lambda c: chr(c+97)

inf = 2 ** 30 - 1
idxs = [[0]*26 for _ in range(N)]
idx = [inf] * 26

for i in range(N):
    for s in S[i]:
        idxs[i][a2n(s)] += 1

for i in range(26):
    for j in range(N):
        idx[i] = min(idx[i],idxs[j][i])
        
ans = ''
for i in range(26):
    for j in range(idx[i]):
        ans += n2a(i)
print(ans)

Buggy submission (verdict: Runtime Error):

N = int(input())
S = [input() for _ in range(N)]
a2n = lambda c: ord(c) - ord('a')
n2a = lambda c: chr(c+97)

inf = 2 ** 30 - 1
idxs = [[0]*26 for _ in range(26)]
idx = [inf] * 26

for i in range(N):
    for s in S[i]:
        idxs[i][a2n(s)] += 1

for i in range(26):
    for j in range(N):
        idx[i] = min(idx[i],idxs[j][i])
        
ans = ''
for i in range(26):
    for j in range(idx[i]):
        ans += n2a(i)
print(ans)
Problem p03846 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
mod = 10**9 + 7
import collections
import numpy as np
import sys
count = collections.Counter(A)
loops = np.arange(N-1,-1,-2)

for li in list(loops):
    if li == 0 :
        if count[li] != 1:break
    else:
        if count[li] != 2:break

else:
    b = N//2
    ans = 1
    for i in range(1,b+1):
        ans *= 2
        ans %= mod
    print(ans)   
    sys.exit()

print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
mod = 10**9 + 7
import collections
import numpy as np
import sys
count = collections.Counter(A)
loops = np.arange(N-1,-1,-2)

for li in list(loops):
    if li == 0 :
        if count[li] != 1:break
    else:
        if count[li] != 2:break

else:
    b = N//2
    ans = 1
    for i in range(1,b+1):
        ans *= 2
        ans %= mod
    print(ans)   
    sys.exit(1)

print(0)
Problem p02628 (python)

Fixed submission:
inputs = [input() for i in range(2)]

N = int(inputs[0].split()[0])
K = int(inputs[0].split()[1])
p = [int(pn) for pn in inputs[1].split()]

ans = sum(sorted(p)[0:K])
print(ans)

Buggy submission (verdict: Runtime Error):
inputs = [input() for i in range(2)]

N = inputs[0].split()[0]
K = inputs[0].split()[1]
p = [int(pn) for pn in inputs[1].split()]

ans = sum(p.sort()[0:K])
print(ans)
Problem p02642 (python)

Fixed submission:
# ABC170

n = int(input())
a = list(map(int, input().split()))

a.sort()
a_max = max(a)
dp = [True for _ in range(a_max+1)]

ans = 0
for i in range(n):
    if dp[a[i]]:
        for j in range(0, a_max+1, a[i]):
            dp[j] = False
        if i > 0:
            if a[i] == a[i-1]:
                continue
        if i < n-1:
            if a[i] == a[i+1]:
                continue
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
# ABC170

n = int(input())
a = list(map(int, input().split()))

a.sort()
a_max = max(a)
dp = [True for _ in range(a_max+1)]

ans = 0
for i in range(n):
    if dp[a[i]]:
        for j in range(0, a_max+1, a[i]):
            dp[j] = False
        if (a[i] != a[i-1]) and (a[i] != a[i+1]):
            ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(stdins) for stdins in input().split()]

a.sort()

ans = n
divisibles = []
for i in range(n):
    divisible = False
    for j in range(n):
        if i == j:
            continue
        elif a[i] < a[j]:
            break
        elif divisibles[j]:
            continue
        elif a[i] % a[j] == 0:
            ans -= 1
            divisible = True
            break
    divisibles.append(divisible)

print(ans)
Problem p02802 (python)

Fixed submission:
n, m = map(int, input().split())
if m > 0:
    p, s = zip(* [input().split() for _ in range(m)])
else:
    p = []
    s = []

ac_dict = {str(i): False for i in range(1, n + 1)}
wa_dict = {str(i): 0 for i in range(1, n + 1)}
ac_num = 0
wa_num = 0
for p_i, s_i in zip(p, s):
    if ac_dict[p_i] == False:
        if s_i == 'AC':
            ac_num += 1
            wa_num += wa_dict[p_i]
            ac_dict[p_i] = True
        elif s_i == 'WA':
            wa_dict[p_i] += 1
print('{} {}'.format(ac_num, wa_num))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
p, s = zip(* [input().split() for _ in range(m)])

ac_dict = {str(i): False for i in range(1, n + 1)}
wa_dict = {str(i): 0 for i in range(1, n + 1)}
ac_num = 0
wa_num = 0
for p_i, s_i in zip(p, s):
    if ac_dict[p_i] == False:
        if s_i == 'AC':
            ac_num += 1
            wa_num += wa_dict[p_i]
            ac_dict[p_i] = True
        elif s_i == 'WA':
            wa_dict[p_i] += 1
print('{} {}'.format(ac_num, wa_num))
Problem p03156 (python)

Fixed submission:
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))

cnt = [0, 0, 0]
for pi in p:
    if pi <= a:
        cnt[0] += 1
    elif pi <= b:
        cnt[1] += 1
    else:
        cnt[2] += 1
print(min(cnt))

Buggy submission (verdict: Runtime Error):
7
5 15
1 10 16 2 7 20 12
Problem p03282 (python)

Fixed submission:
s = input()
k = int(input())

ans = '1'
for i in range(k):
    if s[i] != '1':
        ans = s[i]
        break
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
k = input()

ans = '1'
for i in range(k):
    if k[i] != '1':
        ans = k[i]
        break
print(ans)
Problem p03324 (python)

Fixed submission:
d, n = map(int, input().split())
if n < 100:
    print(n * (100 ** d))
else:
    print(101 * (100 ** d))

Buggy submission (verdict: Runtime Error):
0 5
Problem p02618 (python)

Fixed submission:
import random
d=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for _ in range(d)]



for i in range(d):
    print(random.randrange(1,27))

Buggy submission (verdict: Runtime Error):
5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
Problem p02642 (python)

Fixed submission:
n=int(input())
a=sorted(list(map(int,input().split())))

l=[0]*(1000005)
for i in range(n):
    if l[a[i]]==1:
        l[a[i]]+=1

    if l[a[i]]==0:
        for j in range(1000000//a[i]+1):
            l[a[i]*j]+=1
    
cnt=0
for i in range(n):
    if l[a[i]]==1:
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))

l=[0]*(100005)
for i in range(n):
    if l[a[i]]==1:
        l[a[i]]+=1

    if l[a[i]]==0:
        for j in range(100000//a[i]+1):
            l[a[i]*j]+=1
    
cnt=0
for i in range(n):
    if l[a[i]]==1:
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))

l=[0]*(100005)
for i in range(n):
    if l[a[i]]==1:
        l[a[i]]+=1

    if l[a[i]]==0:
        for j in range(100000//a[i]):
            l[a[i]*j]+=1
    
cnt=0
for i in range(n):
    if l[a[i]]==1:
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))

l=[0]*100005
for i in range(n):
    if l[a[i]]==1:
        l[a[i]]+=1

    if l[a[i]]==0:
        for j in range(100005//a[i]):
            l[a[i]*j]+=1
    
cnt=0
for i in range(n):
    if l[a[i]]==1:
        cnt+=1
print(cnt)
Problem p02647 (python)

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))

def imo(a):
    imos=[0]*(n+1)

    for i in range(n):
        imos[max(0,i-a[i])]+=1
        imos[min(n,i+a[i]+1)]-=1
    
    immo=[0]*(n+1)
    immo[0]=imos[0]
    for i in range(n):
        immo[i+1]=immo[i]+imos[i+1]

    return immo[:n]

for i in range(min(k,41)):
    a=imo(a)
    
print(*a)

Buggy submission (verdict: Runtime Error):
import numpy as np 
from numba import jit
n,k=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a,np.int64)

@njit('(i8[::1],)', cache=True)
def imo(a):
    imos=np.zeros(n+1,np.int64)
    for i in range(n):
        imos[max(0,i-a[i])]+=1
        imos[min(n,i+a[i]+1)]-=1
    
    immo=np.zeros(n+1,np.int64)
    immo=np.cumsum(imos)
    return immo[:n]


for _ in range(min(k,41)):
    a=imo(a)
    
print(*a)

Buggy submission (verdict: Runtime Error):
import numpy as np 
#from numba import jit
n,k=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a,dtype="int64")

#@jit
def imo(a):
    imos=np.zeros(n+1,dtype="int64")
#print(arr[0])
    for i in range(n):
        imos[max(0,i-arr[i])]+=1
        imos[min(n,i+arr[i]+1)]-=1
    
    immo=np.zeros(n+1,dtype="int64")
    immo=np.cumsum(imos)
    return immo[:n]


for _ in range(min(k,41)):
    a=imo(a)
    
print(*a)
Problem p02660 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n=int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

if n==1:
	print(0)
else:
	print(cnt)

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n=int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

if n=1:
	print(0)
else:
	print(cnt)
Problem p02696 (python)

Fixed submission:
import sys
import itertools
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b,n=map(int,input().split())
cnt=0

if n//b>0:
	print(a*(b-1)//b-a*((b-1)//b))
else:
	print(a*(n)//b-a*((n)//b))

Buggy submission (verdict: Runtime Error):
import sys
import itertools
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b,n=map(int,input().split())

cnt=0
if b>10**6:
	print(a*n//b-a*n//b)

else:
	for i in range(a):
	cnt=max(cnt,(a*(n-i)//b-a*((n-i)//b)))
	print(cnt)
Problem p02761 (python)

Fixed submission:
import sys
n,m=map(int,input().split())
l=[-1]*(n)
for i in range(m):
    s,c=map(int,input().split())
    if l[s-1]==-1 or l[s-1]==c:
        l[s-1]=c
    else:
        print(-1)
        sys.exit()
if l[0]==0 and len(l)!=1:
    print(-1)
    sys.exit()
for i in range(n):
    if l[i]==-1:
        l[i]=0
if l[0]==0 and len(l)!=1:
    l[0]=1

if l[0]==0 and len(l)==1:
    print(0)
else:
    for i in range(n):
        print(l[i],end="")

Buggy submission (verdict: Runtime Error):
import sys
n,m=map(int,input().split())
l=[-1]*(n)
for i in range(m):
    s,c=map(int,input().split())
    if l[s-1]==-1 or l[s-1]==c:
        l[s-1]=c
    else:
        print(-1)
        sys.exit()
if l[0]==0 and len(l)!=1:
    print(-1)
    sys.exit()
for i in range(n):
    if l[i]==-1:
        l[i]=0
if l[0]==0:
    l[0]=0

if l[0]==0 and len[l]==1:
    print(0)
else:
    for i in range(n):
        print(l[i],end="")

Buggy submission (verdict: Runtime Error):
import sys
n,m=map(int,input().split())
l=[-1]*(n)
for i in range(m):
    s,c=map(int,input().split())
    if l[s-1]==-1 or l[s-1]==c:
        l[s-1]=c
    else:
        print(-1)
        sys.exit()
if l[0]==0:
    print(-1)
    sys.exit()
for i in range(n):
    if l[i]==-1:
        l[i]=0
if l[0]==0 and len[l]==1:
    print(0)
elif l[0]==0:
    l[0]=1
else:
    for i in range(n):
        print(l[i],end="")
Problem p02780 (python)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))

lst=[0]
sum=0
for i in range(n):
    sum+=p[i]
    lst.append(sum)
    
ans=[]
for i in range(n-k+1):
    ans.append(lst[i+k]-lst[i])

print((max(ans)+k)/2)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))

lst=[]
sum=0
for i in range(n):
    sum+=p[i]
    lst.append(sum)
    
ans=[]
for i in range(n-k):
    ans.append(lst[i+k]-lst[i])

print((max(ans)+k)/2)
Problem p02802 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N,M=map(int,input().split())
a=0
b=0
AC=[0]*(N+1)
pen=[0]*(N+1)
p=0
l=[]
for i in range(M):
	j,r=input().split()
	if AC[int(j)]==0:
		if r=="WA":
			pen[int(j)]+=1
		else:
			AC[int(j)]+=1
for k in range(N+1):
	if AC[k]==1:
		p+=pen[k]

print(sum(AC),p)

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N,M=map(int,input().split())
a=0
b=0
AC=[0]*(M+1)
pen=0
l=[]
for i in range(M):
	j,r=input().split()
	if AC[int(j)]==0:
		if r=="WA":
			pen+=1
		else:
			AC[int(j)]+=1
print(sum(AC),pen)
Problem p02811 (python)

Fixed submission:
import sys
import numpy as np
 
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
 
k,x=map(int,input().split())

if k*500>=x:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
 
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
 
k,x=map(int,input(),.split())

if k*500>=x:
	print("Yes")
else:
	print("No")
Problem p02823 (python)

Fixed submission:
n,a,b=map(int,input().split())

if (b-a)%2==0:
    print((b-a)//2)
else:
    print(min((b+a-1)//2,(2*n-a-b+1)//2))

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())

if (b-a)%2==0:
    print((b-a)//2)
else:
    print(min((b+a-1)//2),(2*n-a-b+1)//2)
Problem p02882 (python)

Fixed submission:
import math
a,b,x=map(int,input().split())
if a*a*b==x:
    ans=90
elif x>((a**2)*b)/2:
    ans=math.degrees(math.atan(a/(2*(b-(x/(a**2))))))
else:
    ans=math.degrees(math.atan((2*x)/(a*(b**2))))
print(90-ans)

Buggy submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
if x>((a**2)*b)/2:
    ans=math.degrees(math.atan(a/(2*(b-(x/(a**2))))))
else:
    ans=math.degrees(math.atan((2*x)/(a*(b**2))))
print(90-ans)
Problem p02885 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

print(max(0,a-2*b))

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int(input().split()))

print(max(0,a-2*b))
Problem p02909 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()

if S=="Sunny":
	print("Cloudy")
if S=="Cloudy":
	print("Rainy")
if S=="Rainy":
	print("Sunny")

Buggy submission (verdict: Runtime Error):
import sys
from bisect import bisect_left,bisect

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
n,m=map(int,input().split())

A=list(map(int,input().split()))
A=sorted(A)

for i in range(m):
	A.insert(bisect_left(A,max(A)//2),max(A)//2)
	del A[n]
	
print(sum(A))
Problem p02911 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,K,Q=map(int,input().split())

A=[int(input()) for _ in range(Q)]
S=[K-Q]*N


for i in range(Q):
	S[A[i]-1]+=1	
	
for k in range(N):
	if S[k]>0:
		print("Yes")
	else:
		print("No")

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,K,Q=map(int,input().split())

A=[int(input()) for _ in range(Q)]
S=[K-Q]*N


for i in range(K):
	S[A[i]-1]+=1	
	
for k in range(N):
	if S[k]>0:
		print("Yes")
	else:
		print("No")

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,K,Q=map(int,input().split())

A=[int(input()) for _ in range(Q)]
S=[K-Q]*N


for i in range(K):
	S[A[i]-1]+=1	
	
print(S)
for k in range(N):
	if S[k]>0:
		print("Yes")
	else:
		print("No")
Problem p02921 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()
T=input()
cnt=0
l=len(S)

for i in range(l):
	if S[i]==T[i]:
		cnt+=1
	
print(cnt)

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N=int(input())
l=list(map(int,input().split()))
cnt=0
a=0
for i in range(N-1):
	if l[i]>=l[i+1]:
		cnt+=1
	else:
		if cnt>=a:
			a=cnt
			cnt=0
		else:
			cnt=0
	
if cnt>=a:
	a=cnt	
print(a)
Problem p02924 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())

print((N*(N-1))//2)

Buggy submission (verdict: Runtime Error):
import sys
import itertools

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
l=list(range(1,N+1))
m=list(itertools.permutations(range(1,N+1)))
le=len(m)
a=0
ans=0

for j in range(le):
	for i in range(N):
		a+=l[i]%m[j][i]
		
	if a>ans:
		ans=a
	a=0

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import itertools

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
l=list(range(1,N+1))
m=list(itertools.permutations(range(1,N+1)))
le=len(m)
a=0
ans=0

for j in range(le):
	for i in range(N):
		a+=l[i]%m[j][i]
		
	if a>ans:
		ans=a
	a=0

print(ans)
Problem p02952 (python)

Fixed submission:

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
n=int(input())

a=n//10000
b=(n-10000*a)//1000
c=(n-10000*a-1000*b)//100
d=(n-10000*a-1000*b-100*c)//10
e=(n-10000*a-1000*b-100*c-10*d)


if n==100000:
	print(90909)

elif a==0:
	if b==0:
		if c==0:
			if d==0:
				print(n)
			else:
				print(9)
		else:
		  print(n-90)
	else:
		print(909)
else:
	print(n-9090)

Buggy submission (verdict: Runtime Error):

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
n=int(input())

a=n//10000
b=(n-10000*a)//1000
c=(n-10000*a-1000*b)//100
d=(n-10000*a-1000*b-100*c)//10
e=(n-10000*a-1000*b-100*c-10*d)

if a=0:
	if b=0:
		if c=0:
			if d=0:
				print(n)
			else:
				print(9)
		else:
		 print(n-90)
	else:
		print(909)
else:
	print(n-9090)
	
print(90909)
Problem p02957 (python)

Fixed submission:

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
a, b=map(int,input().split())

if  (a+b)/2 == (a+b)//2:
	print((a+b)//2)
	
else:
	print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
a, b=map(int,imput().split()))

if a/b==a//b:
	print(a//b)
	
else:
	print("IMPOSSIBLE")
Problem p03029 (python)

Fixed submission:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

print((a*3+b)//2)

Buggy submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,p=map(int,input().split())

print((a*3+b)//2)