Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
x=k-q
if x>=1:
    for i in range(n):
        print("Yes")
elif x<1:
    bd=abs(x)+1
    for i in range(n):
        if l.count(i+1)>=bd:
            print("Yes")
        else:
            print("No") 

Fixed submission:
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
p=[0]*n
for i in l:
    p[i-1]=p[i-1]+1
for i in p:
    if i>=(q-k)+1:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
x=k-q
if x>=1:
    for i in range(n):
        print("Yes")
elif x<1:
    bd=abs(x)+1
    for i in range(n):
        if l.count(i+1)>=bd:
            print("Yes")
        else:
            print("No") 

Fixed submission:
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
p=[0]*n
for i in l:
    p[i-1]=p[i-1]+1
for i in p:
    if i>=(q-k)+1:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
pl=[k]*n
con=0
for j in range(q):
    for i in range(n):
        if i != l[con]-1:
            pl[i]=pl[i]-1
    con+=1
for k in range(n):
    if pl[k]>=1:
        print("Yes")
    else:
        print("No")

Fixed submission:
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
p=[0]*n
for i in l:
    p[i-1]=p[i-1]+1
for i in p:
    if i>=(q-k)+1:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
pl=[k]*n
con=0
for j in range(q):
    for i in range(n):
        if i != l[con]-1:
            pl[i]=pl[i]-1
    con+=1
for k in range(n):
    if pl[k]>=1:
        print("Yes")
    else:
        print("No")

Fixed submission:
n,k,q = map(int, input().split())
l=[int(input()) for x in range(q)]
p=[0]*n
for i in l:
    p[i-1]=p[i-1]+1
for i in p:
    if i>=(q-k)+1:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
l=list(map(int ,input().split()))
p=[]
ind=0
cont=0
while ind<a-1:
    if l[ind]>=l[ind+1]:
        cont+=1
        ind+=1
        p.append(cont)
    else:
        ind+=1
        cont=0
        p.append(cont)
        
print(max(p))

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
ans=[]
count=0
for i in range(n-1):
    if l[i]>=l[i+1]:
        count+=1
    else:
        ans.append(count)
        count=0
ans.append(count)
print(max(ans))
Buggy python submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=float(1/p)
print(y)

Fixed submission:
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a):
        j=1/l[i]
        ll.append(j)
k=sum(ll)
print(1/k)

Buggy python submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=int(1/p)
print(y)

Fixed submission:
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a):
        j=1/l[i]
        ll.append(j)
k=sum(ll)
print(1/k)

Buggy python submission (verdict: Runtime Error):
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=float(1/p)
print(y)

Fixed submission:
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a):
        j=1/l[i]
        ll.append(j)
k=sum(ll)
print(1/k)

Buggy python submission (verdict: Runtime Error):
from fractions import Fraction
N=int(input())
l=[]
for i in range(N):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)

p=sum(l)
y=float(1/p)
print(y)

Fixed submission:
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a):
        j=1/l[i]
        ll.append(j)
k=sum(ll)
print(1/k)
Buggy python submission (verdict: Runtime Error):
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a-2):
        k=(l[i]+l[i+1])/2+(l[i+2])
        ll.append(k/2)

print(max(ll))

Fixed submission:
a = int(input())
l=(list(map(int ,input().split())))
l.sort()
ll=[]
j=0
r=(l[0]+l[1])/2
ll.append(r)
for i in range(a-2):
        j=(ll[0]+l[i+2])/2
        ll.append(j)
        ll.remove(ll[0])
print((ll[0]))
Buggy python submission (verdict: Runtime Error):
a = int(input())
print(3*(a**2)

Fixed submission:
a = int(input())
print(3*(a*a))
Buggy python submission (verdict: Time Limit Exceeded):
import copy
n = int(input())
l=[int(input()) for x in range(n)]
for i in range(n):
    ll=[]
    ll=copy.copy(l)
    ll.remove(l[i])
    print(max(ll))

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
l=[int(input()) for x in range(n)]
ans=[]
for i in range(n):
    ans=copy.copy(l)
    ans.remove(l[i])
    print(max(ans))
    ans.clear()

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy python submission (verdict: Runtime Error):
import copy
n=int(input())
l=[int(input()) for x in range(n)]
ans=[]
for i in range(n):
    ans=copy.copy(l)
    ans.remove(l[i])
    print(max(ans))
    ans.clear()

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
l=[int(input()) for x in range(n)]
ans=[]
for i in range(n):
    ans=copy.copy(l)
    ans.remove(l[i])
    print(max(ans))
    ans.clear

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy python submission (verdict: Runtime Error):
n = int(input())
l=[int(input()) for x in range(n)]
ll=l
for i in range(n):
    l.pop(i)
    print(max(l))
    l.insert(i,ll[i])

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l=[int(input()) for x in range(n)]
ll=[]
for i in range(n):
    ll.append(l[i])
for i in range(n):
    l.pop(i)
    print(max(l))
    l.insert(i,ll[i])

Fixed submission:
import copy
n = int(input())
l=[int(input()) for x in range(n)]
ll=copy.copy(l)
ll.sort()
setl=list(set(l))
setl.sort()
m=max(l)

for i in range(n):
    if len(setl)==1:
        print(m)
    else:
        second=ll[-2]
        if l[i]==m:
            print(second)
        else:
            print(m)
Buggy python submission (verdict: Runtime Error):
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[1]==0: and s[0]>=13:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]==0 or  s[0]>=13 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0 or s[1]>=13:
  print("MMYY")

Fixed submission:
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[0]>=13 and s[1]==0:
  print("NA")
elif s[0]==0 and s[1]==0:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]>=13 and 1<=s[1]<=12:  
  print("YYMM")
elif s[0]==0 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0:
  print("MMYY")
elif 1<=s[0]<=12 and s[1]>=13:
  print("MMYY")
Buggy python submission (verdict: Runtime Error):
b=input()
if b=='A':
	print('T')
if b=='T':
	print('A')
if b=='C':
	print('G'):
if b=='G':
	print('C')

Fixed submission:
b=input()
if b=='A':
	print('T')
if b=='T':
	print('A')
if b=='C':
	print('G')
if b=='G':
	print('C')
Buggy python submission (verdict: Runtime Error):
n = input()
l=[]
count=0
for i in range(len(n)):
    if n[i]=="A" or n[i]=="C" or n[i]=="G" or n[i]=="T":
        count+=1
    else:
        l.append(count)
        count=0
print(max(l))   

Fixed submission:
n=list(input())
count=0
ans=[]
for i in range(len(n)):
    if n[i]=="A" or n[i]=="C" or n[i]=="G" or n[i]=="T":
        count+=1
    else:
        ans.append(count)
        count=0
ans.append(count)
print(max(ans))
Buggy python submission (verdict: Runtime Error):
a,b=int(input())
print(a/b)

Fixed submission:
a,b = map(int ,input().split())
print(a/b)
Buggy python submission (verdict: Runtime Error):
k=0
ind=0
l=[]
i=int(input())
l.append(i)
def guusuu():
    k=l[ind]/2
    return int(k)
    
def kisuu():
    k=l[ind]*3+1
    return int(k)

while ind<500:
    if l[ind]%2==0:
        l.append(guusuu())
    else:
        l.append(kisuu())
    ind+=1       

print((l.index(4))+4)

Fixed submission:
a,b,c =map(int, input().split())
print(int(a*b/2))

Buggy python submission (verdict: Runtime Error):
k=0
ind=0
l=[]
i=int(input())
l.append(i)
def guusuu():
    k=l[ind]/2
    return int(k)
    
def kisuu():
    k=l[ind]*3+1
    return int(k)

while ind<1000:
    if l[ind]%2==0:
        l.append(guusuu())
    else:
        l.append(kisuu())
    ind+=1       

print((l.index(4))+4)

Fixed submission:
a,b,c =map(int, input().split())
print(int(a*b/2))
Buggy python submission (verdict: Time Limit Exceeded):
n, k= map(int, input().split())
l = list(map(int, input().split()))
dp = [float("inf")]*n
dp[0] = 0
for i in range(n-1):
    for j in range(1,min(k+1,(n-i))):
        dp[i+j]=min(dp[i]+(abs(l[i]-l[i+j])),dp[i+j])
print(dp[-1])

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

dp=[float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,min(k+1,abs(n-i))):
        dp[i+j]=min(dp[i]+abs(l[i]-l[i+j]),dp[i+j])
print(dp[-1])

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

dp=[float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,min(k+1,abs(n-i))):
        dp[i+j]=min(dp[i]+abs(l[i]-l[i+j]),dp[i+j])
print(dp-1)

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

dp=[float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,min(k+1,abs(n-i))):
        dp[i+j]=min(dp[i]+abs(l[i]-l[i+j]),dp[i+j])
print(dp[-1])
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
cl=[]
tl=[]
for i in range(a):
    c,t = map(int, input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Fixed submission:
n,t = map(int, input().split())
lst_c = []
lst_t = []
a = 0
b = 0
for i in range(n):
    a,b = map(int, input().split())
    if b <= t:
        lst_c.append(a)
if lst_c == []:
    print("TLE")
else:
    print(min(lst_c))

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
cl=[]
tl=[]
for i in range(a):
    c,t = map(int, input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Fixed submission:
n,t = map(int, input().split())
lst_c = []
lst_t = []
a = 0
b = 0
for i in range(n):
    a,b = map(int, input().split())
    if b <= t:
        lst_c.append(a)
if lst_c == []:
    print("TLE")
else:
    print(min(lst_c))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
cl=[]
tl=[]
for i in range(a):
    c,t=map(int,input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))


Fixed submission:
n,t = map(int, input().split())
lst_c = []
lst_t = []
a = 0
b = 0
for i in range(n):
    a,b = map(int, input().split())
    if b <= t:
        lst_c.append(a)
if lst_c == []:
    print("TLE")
else:
    print(min(lst_c))
Buggy python submission (verdict: Runtime Error):
n = int(input())
l=list(map(int ,input().split()))
print((max(l)-min(l))

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
print(max(l)-min(l))
Buggy python submission (verdict: Runtime Error):
s=input()
l=soted(s)
if l[0]=='a' and l[1]=='b' and l[2]=='c':
  print('Yes')
else:
  print('No')

Fixed submission:
s=list(input())
s.sort()
if s[0]=='a' and s[1]=='b' and s[2]=='c':
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k = map(int, input().split())
for i in range(a,b+1):
    if i<a+k or b-k<i:
        print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
c=b-k
l=list(range(a,b+1))

for i in l[:k]:
    print(i)

if len(l)<=k:
    exit()

if (b-a+1)/2<=k:
    for i in l[k:]:
        print(i)
else:    
    for i in l[c:]:
        print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
c=b-k
l=list(range(a,b+1))

for i in l[:k]:
    print(i)

if len(l)<=k:
    exit()

if (b-a+1)/2<k:
    for i in l[k:]:
        print(i)
else:    
    for i in l[c:]:
        print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,k=map(int, input().split())
for i in range(a,b+1):
	if i<(a+k) or i>(b-k):
		print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,k=map(int, input().split())
for i in range(a,b+1):
	if i<(a+k) or i>(b-k):
		print(i)


Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
c=a+k
d=b-k
for i in l:
	if i<(c) or i>(d):
		print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
for i in l:
	if i<(a+k) or i>(b-k):
		print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int, input().split())
l=list(range(a,b+1))
for i in l:
	if i<(a+k) or i>(b-k):
		print(i)

Fixed submission:
a,b,k = map(int, input().split())
for i in range(a,min(b+1,a+k)):
    print(i)
for i in range(max(b-k+1,(a+k)),b+1):
    print(i)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
print(min(a,b)+min(c,d))

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(min(a,b)+min(c,d))
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().input())
if (a*b)%2==0:
    print("Even")
else:
    print("Odd")

Fixed submission:
a,b= map(int, input().split())
if a*b%2==0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
s=list(input())

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

for i in range(b):
  if s[((a+b)-a-1)+i]=="-":
    print("No")
    exit()

print("Yes")


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

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

for i in range(b):
  if s[a+1+i]=="-":
    print("No")
    exit()

print("Yes")

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

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

for i in range(b):
  if s[b+i]=="-":
    print("No")
    exit()

print("Yes")

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

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

for i in range(b):
  if s[a+1+i]=="-":
    print("No")
    exit()

print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l=list(map(int ,input().split()))
cnt=0
while True:
    for i in range(n):
        if l[i]%2==0:
            l[i]==l[i]//2
        else:
            print(cnt)
            exit()     
    cnt+=1

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
count=0
k=1
while k==1:
    for i in range(n):
        if l[i]%2==0:
            l[i]=l[i]/2
        else:
            print(count)
            k=2
            break
    count+=1
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
print((a*a)-b)


Fixed submission:
a=int(input())
b=int(input())
print((a*a)-b)

Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
print(a*a-b)

Fixed submission:
a=int(input())
b=int(input())
print((a*a)-b)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int, input().split())
print(sum(a,b,c)-max(a,b,c))

Fixed submission:
l=list(map(int, input().split()))
print(sum(l)-max(l))
Buggy python submission (verdict: Runtime Error):
o=input()
e=input()
if len(o)!=len(e):
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")
  print(o[-1])  
else:
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")

Fixed submission:
o=input()
e=input()
if len(o)!=len(e):
  for i in range(len(o)-1):
    print(o[i],end="")
    print(e[i],end="")
  print(o[-1])  
else:
  for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")
Buggy python submission (verdict: Runtime Error):
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b:
    print(b-(a+w))
elif b+w<a:
    print(a(-b+w))    

Fixed submission:
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b:
    print(b-(a+w))
elif b+w<=a:
    print(a-(b+w))

Buggy python submission (verdict: Runtime Error):
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b
    print(b-(a+w))
elif b+w<a:
    print(a(-b+w))  

Fixed submission:
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b:
    print(b-(a+w))
elif b+w<=a:
    print(a-(b+w))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=1
for i in range(1,n+1):
    ans=ans*i
print(ans%(10**9+7)) 

Fixed submission:
import math
x = int(input())
i=math.factorial(x)
print(i%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=1
for i in range(1,n+1):
    ans=ans*i
print(ans%(10**9+7)) 

Fixed submission:
import math
x = int(input())
i=math.factorial(x)
print(i%(10**9+7))
Buggy python submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A==1:
  A=14
if B==1:
  B=14

if a>b:
  print('Alice')
elif b>a:
  print('Bob')
else:
  print('Draw')

Fixed submission:
A,B = map(int, input().split())
if A==1:
  A=14
if B==1:
  B=14

if A>B:
  print('Alice')
elif B>A:
  print('Bob')
else:
  print('Draw')

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input())
if a==1:
  print('Alice')
if b==1:
  print('Bob')
if a==b:
  print("Draw")
if a>b:
  print("Alice")
else:
  print("Bob")

Fixed submission:
A,B = map(int, input().split())
if A==1:
  A=14
if B==1:
  B=14

if A>B:
  print('Alice')
elif B>A:
  print('Bob')
else:
  print('Draw')
Buggy python submission (verdict: Runtime Error):
l=list(map(int, input().split()))
print(max(l[0]*l[1],l[2]*l[3])


Fixed submission:
l=list(map(int, input().split()))
print(max(l[0]*l[1],l[2]*l[3]))

Buggy python submission (verdict: Runtime Error):
l=list(map(int, input().split())
print(max(l[0]*l[1],l[2]*l[3])

Fixed submission:
l=list(map(int, input().split()))
print(max(l[0]*l[1],l[2]*l[3]))
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int ,input().split())
count=0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z==s:
                count+=1
print(count)      

Fixed submission:
k,s = map(int ,input().split())
count=0
for x in range(k+1):
    for y in range(k+1):
        if 0<=s-(x+y)<=k:
            count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
a=input().split()
if a[1]=="+":
        print(a[0]+a[2])
else:
        print(a[0]-a[2])        


Fixed submission:
a,b,c=list(input().split())
if b=="+":
        print(int(a)+int(c))
else:
        print(int(a)-int(c))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
print(int(((a+b)*c)/2)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
print(int(((a+b)*c)/2))
Buggy python submission (verdict: Time Limit Exceeded):
input()
l=list(map(int,input().split()))
ret=1
for i in l:
  ret*=i
print(ret if ret <= 10**18 else -1)

Fixed submission:
input()
l=list(map(int,input().split()))
if 0 in l:
  ret = 0
else:
  ret = 1
  for i in l:
    ret *= i
    if ret > 10**18:
      ret = -1
      break
print(ret)
Buggy python submission (verdict: Runtime Error):
a=int(input())
h=list(map(int,input().split()))
m=0
r=True
for i in h:
  m=max(m,i)
  if m!=i:
    r=i+1=<m
print("NYoe s"[r::2])


Fixed submission:
input()
h=list(map(int,input().split()))
m=0
r=True
for i in h:
  r=i>=m-1
  if not(r):
    break
  m=max(m,i)
print("NYoe s"[r::2])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
r=a//(2*b+1)
r+=1 if a%(2*b+1)>0
print(r)

Fixed submission:
a,b=map(int,input().split())
r=a//(2*b+1)
r+=1 if a%(2*b+1)>0 else 0
print(r)
Buggy python submission (verdict: Time Limit Exceeded):
q=int(input().split()[1])
b=input()
ac=[0]*(len(b)-1)
for i in range(len(b)-1):
  ac[i] = 1 if b[i:i+2] == 'AC' else 0
for i in range(q):
  l,r = list(map(int,input().split()))
  print(sum(ac[l-1:r-1]))

Fixed submission:
n,q=list(map(int,input().split()))
b=input()
k=[0]*n
ac=0
for i in range(n-1):
  ac += 1 if b[i:i+2] == 'AC' else 0
  k[i]=ac
for i in range(q):
  l,r = list(map(int,input().split()))
  print(k[r-2]-k[l-2])
Buggy python submission (verdict: Time Limit Exceeded):
n,m=list(map(int,input().split()))
ret=1
for i in range(2,int(m/n)+1):
  if m%i == 0:
    ret = i
print(ret)

Fixed submission:
n,m=list(map(int,input().split()))
d=[i for i in range(1,int(m**0.5)+1) if m%i==0]
d.extend([m//i for i in d])
print(max([i for i in d if m//i >= n]))