Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  if need_a < 0:
    need_a = -need_a
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  cost3 = num_ab * cost_ab
  
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  if need_b < 0:
    need_b = -need_b
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  cost3 = num_ab * cost_ab
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab

cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2,cost3)
print(ans)



Fixed submission:
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab

cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2)
print(ans)

Buggy python submission (verdict: Runtime Error):
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  if need_a < 0:
    need_a = -need_a
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  cost3 = need_b * cost_b + num_ab * cost_ab
  
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  if need_b < 0:
    need_b = -need_b
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  need_a = num_b - (num_ab // 2)
  cost3 = need_a * cost_a + num_ab * cost_ab
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab
cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2,cost3)
print(ans)



Fixed submission:
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab

cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
hina = input().split()
flag = "syurui_3"
for i in hina:
  if i == "Y":
    flag = "syurui_4"
if flag == "syurui_3":
  print("Three")
else:
  print("Four")


Fixed submission:
a = int(input())
print(a//3)
Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())
count = 1
while(1):
    if count*x % y != 0:
        print(count*x)
        break
    if count+x > 10**18:
        print("-1")
        break

Fixed submission:
x,y = map(int,input().split())
if x % y == 0:
    print("-1")
else:
    print(x)

Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())
count = 1
while(1):
     if count*x % y != 0:
         print(count*x)
         break

Fixed submission:
x,y = map(int,input().split())
if x % y == 0:
    print("-1")
else:
    print(x)
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int().split())
print(min(n*a,b))

Fixed submission:
n,a,b = map(int,input().split())
print(min(n*a,b))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
d_li = list(map(int,input().split()))
m = int(input())
t_li = list(map(int,input().split()))

t_counter = Counter(t_li)
t_li = t_counter.most_common()
t_len = len(t_li)
for i in range(t_len):
    dum = t_li[i][0]
    if d_li.count(dum) >= t_li[i][1]:
        pass
    else:
        print("NO")
        exit()
print("YES")

Fixed submission:
from collections import Counter
n = int(input())
d_li = list(map(int,input().split()))
m = int(input())
t_li = list(map(int,input().split()))

d_counter = Counter(d_li)
t_counter = Counter(t_li)
t_most_counter = t_counter.most_common()
t_len = len(t_most_counter)
for i in range(t_len):
    dum = t_most_counter[i][0]
    if d_counter[dum] >= t_most_counter[i][1]:
        pass
    else:
        print("NO")
        exit()
print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
li = list(map(int,input().split()))
ans = 0
for i in range(1,10**5):
    dum = li.count(i-1) + li.count(i) + li.count(i+1)
    ans = max(dum,ans)
print(ans)

Fixed submission:
from collections import Counter
n = int(input())
li = list(map(int,input().split()))
counter_li = Counter(li)
ans = 0
for i in range(1,10**5):
    dum = counter_li[i-1] + counter_li[i] + counter_li[i+1]
    ans = max(dum,ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import gcd
n = int(input())
t_list = [int(input()) for i in range(n)]
ans = t_list[0]
for i in range(1,n):
    ans = ans * t_list[i] // gcd(ans,t_list[i])
print(ans)

Fixed submission:
from fractions import gcd
n = int(input())
t_list = [int(input()) for i in range(n)]
ans = t_list[0]
for i in range(1,n):
    ans = ans * t_list[i] // gcd(ans,t_list[i])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c = map(int,input().split())
#if a == b == c:
#    print(-1)
#    exit()
for i in range(10**8):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        break
    a_o,b_o,c_o = a,b,c
    a = b_o//2 + c_o//2
    b = a_o//2 + c_o//2
    c = a_o//2 + b_o//2
print(i)

Fixed submission:
a,b,c = map(int,input().split())
if a == b == c and a%2 == 0:
    print(-1)
    exit()
for i in range(10**8):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        break
    a_o,b_o,c_o = a,b,c
    a = b_o//2 + c_o//2
    b = a_o//2 + c_o//2
    c = a_o//2 + b_o//2
print(i)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a > b:
    print(GREATER)
elif a < b:
    print("LESS")
else:
    print("EQUAL")

Fixed submission:
a = int(input())
b = int(input())
if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 1
for i in range(1,n+1):
  ans *= i
print(ans%(10**9+7))

Fixed submission:
n = int(input())
ans = 1
dummy1,dummy2 = divmod(n,2)
for i in range(1,dummy1+1):
  ans *= i
  ans *= n+1-i
  ans = ans % (10**9+7)
if dummy2 == 1:
  ans = ((dummy1+1)*ans % (10**9+7))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
ans = 0
for i in range(k+1):
    for j in range(k+1):
        for l in range(k+1):
            if i+j+l == s:
                ans += 1
print(ans)

Fixed submission:
k,s = map(int,input().split())
ans = 0
for i in range(k+1):
    for j in range(k+1):
        dum = (s - (i + j))
        if dum < 0:
            continue
        if dum <= k:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == "RRS" or s=="SRR":
    print(2)
elif s == "SSR" or s == "SRS" or s == "RSS" s=="RSR":
    print(1)
elif s == "RRR":
    print(3)
else:
    print(0)


Fixed submission:
s = input()
if s == "RRS" or s=="SRR":
    print(2)
elif s == "SSR" or s == "SRS" or s == "RSS" or s=="RSR":
    print(1)
elif s == "RRR":
    print(3)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a = list(map(int, input().split()))

b = [0] * (n - k + 1)
b[0]+=a[0]
for i in range(k-1):
    b[0] *= a[i + 1]

for j in range(len(b) - 1):
    b[j + 1] = (b[j + 1] + b[j]) // a[j] * a[j + k]

for l in range(len(b)-1):
    if b[l] < b[l + 1]:
        print("Yes")
    else:
        print("No")

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

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

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a = list(map(int, input().split()))

b=[0]*(n-k+1)
for i in range(n-k+1):
    b[i] += a[i]
    for j in range(k - 1):
        b[i] *= a[i + j + 1]


for l in range(len(b)-1):
    if b[l] < b[l + 1]:
        print("Yes")
    else:
        print("No")

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

for i in range(n - k):
    if a[i] >= a[i + k]:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
mod=10**18

cnt=1
for i in range(n):
    cnt*=a[i]

if cnt>mod:
    print(-1)
else:
    print(cnt)

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

cnt=1
for i in range(n):
    cnt*=a[i]
    if cnt>mod:
        print(-1)
        exit()

print(cnt)
Buggy python submission (verdict: Runtime Error):
x=int(input())

x-=1
for i in range(x+1):
    if i**5==x:
        a=i
        break

print(a,-1)

Fixed submission:
x=int(input())

for i in range(-1*(10**3),10**3):
    for j in range(-1*(10**3),10**3):
        if i**5-j**5==x:
            print(i,j)
            exit()
Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())

x=(a*1)//b-a*(1//b)
for i in range(1,n+1):
    x=max(x,(a*i)//b-a*(i//b))

print(x)

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

if b>n:
    print((a*n)//b-a*(n//b))
else:
    print((a*(b-1)//b-a*((b-1)//b)))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

b=[0]*(n+1)
for i in range(1,n+1):
    b[i]=a.count(i)

for i in range(1,n+1):
    print(b[i])

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

b=[0]*n
for i in a:
    b[i-1]+=1

for i in b:
    print(i)

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

for i in range(1,n+1):
    x=0
    for j in range(n-1):
        if i==a[j]:
            x+=1
    print(x)

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

b=[0]*n
for i in a:
    b[i-1]+=1

for i in b:
    print(i)

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

for i in range(1,n+1):
    print(a.count(i))

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

b=[0]*n
for i in a:
    b[i-1]+=1

for i in b:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b,c):
    for i in range(1,10**5):
        if a%i==0 and b%i==0 and c%i==0:
            d=i
    return d
        
a=int(input())
x=0
for i in range(1,a+1):
    for j in range(1,a+1):
        for k in range(1,a+1):
            x+=gcd(i,j,k)

print(x)

Fixed submission:
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)

a=int(input())
x=0
for i in range(1,a+1):
    for j in range(1,a+1):
        for k in range(1,a+1):
            x+=gcd(i,j,k)

print(x)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=[]
if k==1:
    print(0)
else:
    while True:
        n=abs(n-k)
        a.append(n)
        if a[0]==abs(n-k):
            break
        elif abs(n-k)==0:
            a.append(0)
            break
    print(min(a))

Fixed submission:
n,k=map(int,input().split())
if k==1:
    print(0)
else:
    print(min(n%k,abs(n%k-k)))
Buggy python submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
flag=True
for i in range(10**6):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print(-1)

Fixed submission:
s=input()
if s[0]==s[1]==s[2]:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
if a==0:
    print(0)
elif len("b"*a+"r"*b)==n:
    print(a)
elif len("b"*a+"r"*b)<n:
    print((n-len("b"*a+"r"*b))+a)

Fixed submission:
n,a,b=map(int,input().split())
if a==0:
    print(0)
elif n%(a+b)<a:
    print((n//(a+b))*a+n%(a+b))
elif a<n%(a+b):
    print((n//(a+b))*a+a)
Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b=map(int,input().split())
flag=True
for i in range(10**7):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print(-1)

Fixed submission:
import math
a,b=map(int,input().split())
flag=True
for i in range(10**7):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print(-1)
Buggy python submission (verdict: Runtime Error):
a=[list(map(int,input().split())) for i in range(3)]
n=int(input())
for i in range(n):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k]==b:
                a[j][k]=0

for i in range(3):
    flag=True
    for j in range(3):
        if a[i][j]!=0:
            flag=False
    if flag:
        print("Yes")
        exit()

for i in range(3):
    flag=True
    for j in range(3):
        if a[j][i]!=0:
            flag=False
    if flag:
        print("Yes")
        exit()

for i in range(3):
    flag=True
    if a[i][i]!=0:
        flag=False
if flag:
    print("Yes")
    exit()

for i in range(3):
    if a[i][3-i]!=0:
        print("No")
        exit()
print("Yes")
exit()

Fixed submission:
a=[list(map(int,input().split())) for i in range(3)]
n=int(input())
for i in range(n):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k]==b:
                a[j][k]=0
 
for i in range(3):
    flag=True
    for j in range(3):
        if a[i][j]!=0:
            flag=False
    if flag:
        print("Yes")
        exit()
 
for i in range(3):
    flag=True
    for j in range(3):
        if a[j][i]!=0:
            flag=False
    if flag:
        print("Yes")
        exit()

flag=True
for i in range(3):
    if a[i][i]!=0:
        flag=False
if flag:
    print("Yes")
    exit()
 
for i in range(3):
    if a[i][2-i]!=0:
        print("No")
        exit()
print("Yes")
exit()
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[0]*n

for i in range(m):
    s,c=map(int,input().split())
    a[s-1]=c


if a[0]==0:
    print(-1)
else:
    b=""
    for i in range(3):
        b+=str(a[i])
    print(b)

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

a=["0"]*n

for i in range(m):
    s,c=map(int,input().split())
    if a[s-1]=="0":
        a[s-1]=c
    elif a[s-1]!=c:
        print(-1)
        exit()

if n>1 and a[0]==0:
    print(-1)
    exit()

if n>1 and a[0]=="0":
    a[0]=1

print(*a,sep="")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
cnt=0
while a>0:
  a//=b
  cnt+=1
print(x)

Fixed submission:
a,b=map(int,input().split())
cnt=0
while a>0:
  a//=b
  cnt+=1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

for i in range(n-1):
    for j in range(i+1,n):
        if a[i]==a[j]:
            print("NO")
            exit()
print("YES")

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

b=list(set(a))
if len(a)==len(b):
    print("YES")
else:
    print("NO")

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

for i in range(n-1):
    for j in range(i+1,n):
        if a[i]==a[j]:
            print("NO")
            exit()
print("YES")

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

b=list(set(a))
if len(a)==len(b):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))

a=[0]*n
for i in range(n):
    for j in range(p[i]+1):
        a[i]+=j*(1/p[i])

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

cnt=0
for i in range(len(b)-1):
    cnt=max(cnt,b[i+1]-b[i-k+1])

print(cnt)

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

a=[0]*(n+1)
for i in range(n):
    a[i+1]+=a[i]+(((1+p[i])*p[i])//2)/p[i]


cnt=0
for i in range(len(a)-1):
    cnt=max(cnt,a[i+1]-a[i-k+1])

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))

cnt=0
for i in range(1,n):
    if min(p[0:i])<p[i]:
            cnt+=1
print(n-cnt)

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

a=p[0]
cnt=1
for i in range(1,n):
    if a>=p[i]:
        cnt+=1
        a=p[i]

print(cnt)

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

cnt=0
for i in range(1,n):
    if min(p[0:i])<p[i]:
            cnt+=1
print(n-cnt)

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

a=p[0]
cnt=1
for i in range(1,n):
    if a>=p[i]:
        cnt+=1
        a=p[i]

print(cnt)

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

cnt=0
for i in range(n):
    for j in range(i):
        if p[j]<p[i]:
            cnt+=1
            break
print(n-cnt)

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

a=p[0]
cnt=1
for i in range(1,n):
    if a>=p[i]:
        cnt+=1
        a=p[i]

print(cnt)

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

cnt=0
for i in range(n):
    for j in range(i):
        if p[j]<p[i]:
            cnt+=1
            break
print(n-cnt)

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

a=p[0]
cnt=1
for i in range(1,n):
    if a>=p[i]:
        cnt+=1
        a=p[i]

print(cnt)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=[input() for i in range(m)]

S=list(dict.fromkeys(s))

for i in range(len(S)):
    S[i]=S[i].split()

x=0
y=0
for i in range(len(S)-1,-1,-1):
    if S[i][1]=="AC":
        a=S[i][0]
        x+=1
    elif S[i][0]==a and S[i][1]=="WA":
        y+=1

print(x,y)

Fixed submission:
n,m=map(int,input().split())
ac=0
ans=[True]*n
wa=[0]*n
for i in range(m):
    p,s=input().split()
    p=int(p)-1
    if s=="AC" and ans[p]:
        ans[p]=False
        ac+=1
    elif s=="WA" and ans[p]:
        wa[p]+=1

cnt=0
for i in range(n):
    if not ans[i]:
        cnt+=wa[i]

print(ac,cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))

x=0
for i in range(n):
    if a[i]!=0:
        x+=1
a=sum(a)

print(a//x if a%x==0 else a//x+1)

Fixed submission:
def prime(n):
    for i in range(2,n):
        if n%i==0:
            False
            return
    return True

n=int(input())

i=0
while True:
    if prime(n+i):
        print(n+i)
        exit()
    else:
        i+=1

Buggy python submission (verdict: Runtime Error):
import fractions

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

a,b=map(int,input().split())
print(lcm(a,b))

Fixed submission:
def prime(n):
    for i in range(2,n):
        if n%i==0:
            False
            return
    return True

n=int(input())

i=0
while True:
    if prime(n+i):
        print(n+i)
        exit()
    else:
        i+=1
Buggy python submission (verdict: Runtime Error):
import math

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

a,b=map(int,input().split())
print(lcm(a,b))

Fixed submission:
import fractions

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

a,b=map(int,input().split())
print(lcm(a,b))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

a,b=map(int,input().split())
print(lcm(a,b))

Fixed submission:
import fractions

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

a,b=map(int,input().split())
print(lcm(a,b))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

a,b=map(int,input().split())
print(lcm(a,b))

Fixed submission:
import fractions

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

a,b=map(int,input().split())
print(lcm(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
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:
            A[j-1]-=1

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

Fixed submission:
n,m,q=map(int,input().split())

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

for i in range(n):
    if A[i]<=0:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
d=list(map(int,input().split()))
d=sorted(d)

ans=0
for i in range(1,d[-1]+1):
    cnt=0
    for j in range(n):
        if i>d[j]:
            cnt+=1
        else:
            break
    if n-cnt==cnt:
        ans+=1
print(ans)

Fixed submission:
import bisect

n=int(input())
d=list(map(int,input().split()))
d=sorted(d)

ans=0
for i in range(1,d[-1]+1):
    if bisect.bisect_left(d,i)==n-bisect.bisect_left(d,i):
        ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())

import math
m=(c*d)//math.gcd(c,d)

A=b//c-(a-1)//c # a-bのうち、cの倍数のもの
B=b//d-(a-1)//d # a-bのうち、dの倍数のもの
C=b//m-(a-1)//m # a-bのうち、cとdの最小公倍数の倍数のもの
ans=(b-a+1)-(A+B-C)
print(ans)

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

from fractions import gcd
m=(c*d)//gcd(c,d)

A=b//c-(a-1)//c # a-bのうち、cの倍数のもの
B=b//d-(a-1)//d # a-bのうち、dの倍数のもの
C=b//m-(a-1)//m # a-bのうち、cとdの最小公倍数の倍数のもの
ans=(b-a+1)-(A+B-C)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=map(int,input().split())

cnt=0
for i in range(n+1):
    for j in range(n+1):
        if (n-r*i-g*j)>=0 and (n-r*i-g*j)%b==0:
            cnt+=1
print(cnt)

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

cnt=0
for i in range(n+1):
    for j in range(n+1):
        if (n-r*i-g*j)>=0 and (n-r*i-g*j)%b==0:
            cnt+=1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())

for i in range(a,b+1):
    if i>=a+x and i<=b-x:
        continue
    else:
        print(i)


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

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
    exit()

else:
    for i in range(a,a+k):
        print(i)
    for j in range(b-k+1,b+1):
        print(j)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())

for i in range(a,b+1):
    if i>=a+x and i<=b-x:
        continue
    else:
        print(i)

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

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
    exit()

else:
    for i in range(a,a+k):
        print(i)
    for j in range(b-k+1,b+1):
        print(j)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())

for i in range(a,b+1):
    if i<a+x or i>b-x:
        print(i)

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

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
    exit()

else:
    for i in range(a,a+k):
        print(i)
    for j in range(b-k+1,b+1):
        print(j)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())

for i in range(a,b+1):
    if i<a+x or i>b-x:
        print(i)

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

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
    exit()

else:
    for i in range(a,a+k):
        print(i)
    for j in range(b-k+1,b+1):
        print(j)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())
n=[]
for i in range(a,b+1):
    n.append(i)

for j in range(len(n)):
    if n.index(n[j])<x or abs(len(n)-x)<=n.index(n[j]):
        print(n[j])

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

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
    exit()

else:
    for i in range(a,a+k):
        print(i)
    for j in range(b-k+1,b+1):
        print(j)