Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append()
B.append()
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)

Buggy python submission (verdict: Runtime Error):
C = list(map(int, input().split()))
A.append("")
B.append("")
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans=0
for i in range(N):
	ans+=B[A[i]]
	if A[i]==A[i-1]+1:
		ans+=C[A[i-1]]
print(ans)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
for i in range(N):
	ans+=B[A[i]]
	if A[i]==A[i-1]+1:
		ans+=C[A[i-1]]
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
i=1
sum = a
if sum<=b:
	while sum<=b:
		sum+=a-1
		i+=1
print(i)


Fixed submission:
s = input()
t = input()
ans  =0
for i in range(3):
	if s[i]==t[i]:
		ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a_b = list(map(int, input()))
i=1
sum = a_b[0]
if sum<=a_b[1]:
	for sum>=a_b[1]:
		sum+=a_b[0]-1
		i++
print(i)

Fixed submission:
a,b = map(int, input().split())
i=0
sum = 1

while sum<b:
	sum+=a-1
	i+=1
print(i)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(float ,input().split()))
sum=float(0)
for i in range(N)
	sum+=A[i]/(A[i]**2)
sum=sum**sum
print(sum)

Fixed submission:
N = int(input())
A = list(map(int ,input().split()))
sum=0
for i in range(N):
	sum+=A[i]/(A[i]**2)
sum=1/sum
print(sum)
Buggy python submission (verdict: Runtime Error):
n = int(input())
cnt=0
for i in range(1,n+1):
	if len(str(i))%2==1:
		cnt+=1
print(cnt)

Fixed submission:
a,b,c=map(int,input().split())
y1=a-b
y2=c-y1
if y2<0:
	print("0")
else:
	print(y2)
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b
	ans=tr
print(ans)

Fixed submission:
n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b:
	ans=tr
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()

s_l=s.sorted()
if s_l[0]!=s_l[1] or s_l[2]!=s_l[3] or s_l[0]==s[3]:
	print("No")
else :
	print("Yes")


Fixed submission:
s = sorted(input())


if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	print("No")
else :
	print("Yes")

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

s=s.sorted()
if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	Print("No")
elif :
	print("Yes")

Fixed submission:
s = sorted(input())


if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	print("No")
else :
	print("Yes")

Buggy python submission (verdict: Runtime Error):
s = list(input().split())
ans="No"
if s[0]==s[1] and s[2]==s[3] or s[0]==s[2] and s[1]==s[3] or s[0]==s[3] and s[1]==s[2]:
	ans="Yes"
print(ans)


Fixed submission:
s = sorted(input())


if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	print("No")
else :
	print("Yes")

Buggy python submission (verdict: Runtime Error):
s = list(input().split())
ans="No"
if s[0]==s[1] and s[2]==s[3] or s[0]==s[2] and s[1]==s[3] or s[0]==s[4] and s[1]==s[2]:
	ans="Yes"
print(ans)

Fixed submission:
s = sorted(input())


if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	print("No")
else :
	print("Yes")
Buggy python submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(4):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Fixed submission:
s = input()

ans="Good"
for i in range(3):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy python submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(len(s)):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Fixed submission:
s = input()

ans="Good"
for i in range(3):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy python submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(len(s))
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Fixed submission:
s = input()

ans="Good"
for i in range(3):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy python submission (verdict: Runtime Error):
s = int(input())
s_list = list(s)
ans="Good"
for i in range(len(s))
	if s_list[i]==s_list[i+1]:
		ans="Bad"
print(ans)

Fixed submission:
s = input()

ans="Good"
for i in range(3):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)
Buggy python submission (verdict: Runtime Error):

n=int(input())
for i in range(n):
	rest=list(input().split())
a=rest
rest.sort()
for i in range(n):
	print(rest.index(a[i]))
		


Fixed submission:
from collections import defaultdict
n=int(input())

rest=defaultdict(list)
for i in range(n):
	s,h=input().split()
	rest[s].append([int(h),i+1])
for k in sorted(list(rest.keys())):
	for p,i in sorted(list(rest[k]),key=lambda x:x[0])[::-1]:
		print(i)

Buggy python submission (verdict: Runtime Error):

n=int(input())
for i in range(n):
	rest=list(input().split())
a=rest
rest.sort()
for i in range(n):
	print(rest.index(a[i])
		

Fixed submission:
from collections import defaultdict
n=int(input())

rest=defaultdict(list)
for i in range(n):
	s,h=input().split()
	rest[s].append([int(h),i+1])
for k in sorted(list(rest.keys())):
	for p,i in sorted(list(rest[k]),key=lambda x:x[0])[::-1]:
		print(i)
Buggy python submission (verdict: Runtime Error):
s=input()
s1=int(s[0]+s[1])
s2=int(s[2]+s[3])
if 1 <= s1 <= 12 and 1 <= s2 <= 12:
    print("AMBIGUOUS")
elif 1 <= s1 <= 12:
    print("MMYY")
elif 1 <= s2 <= 12:
    print("YYMM")
else:
    print("NA")

Fixed submission:
N,K = map(int, input().split())
S = input()
S_list =list(S)
l ={"A":"a","B":"b","C":"c"}
ans=S_list[K-1]
S_list[K-1]=l[ans]
print("".join(S_list))
Buggy python submission (verdict: Runtime Error):
a,b,t = map(int, input().split())
sum = a//t
print(b*ans)


Fixed submission:
a,b,t = map(int, input().split())
sum = t//a
print(b*sum)
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
for i in range(2**n):
	sum_v=0
	sum_c=0
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append[sum_v-sum_c]
print(max(ans))

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
sum_v=0
sum_c=0
for i in range(n):
	if v[i]-c[i]>=0:
		sum_v+=v[i]
		sum_c+=c[i]
		ans.append(sum_v-sum_c)
try:
	print(max(ans))
except ValueError:
	print("0")

Buggy python submission (verdict: Runtime Error):
n=int(input())
v=[int(i) for i in range(n)]
c=[int(i) for i in range(n)]
ans=[]
for i in range(2**n):
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append(sum_c-sum_v)
print(max(ans))

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
sum_v=0
sum_c=0
for i in range(n):
	if v[i]-c[i]>=0:
		sum_v+=v[i]
		sum_c+=c[i]
		ans.append(sum_v-sum_c)
try:
	print(max(ans))
except ValueError:
	print("0")
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
sum=0
for i in range(2):
	if a>b:
		sum+=a
		a--
	else:
		sum+=b
		b--
print(sum)


Fixed submission:
a,b = map(int, input().split())
sum=0
for i in range(2):
	if a>b:
		sum+=a
		a-=1
	else:
		sum+=b
		b-=1
print(sum)

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
sum=0
for i in range(2)
	if a>b:
		sum+=a
		a--
	else:
		sum+=b
		b--
print(sum)

Fixed submission:
a,b = map(int, input().split())
sum=0
for i in range(2):
	if a>b:
		sum+=a
		a-=1
	else:
		sum+=b
		b-=1
print(sum)
Buggy python submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
cnt=1
for i in range(1,n+1):
	if h[i]>=h[0]:
		cnt+=1
print(cnt)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
cnt=1
maxh=h[0]
for i in range(1,n):
	if maxh<=h[i]:
		maxh=h[i]
		cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
a = ([map(int, input())for _ in range[5]])
k = int(input())
ans="Yay!"
for i in range(1,4):
	if k < a[i]-a[0]:
		ans=":("
print(ans)


Fixed submission:
a = ([int(input())for _ in range(5)])
k = int(input())
ans="Yay!"
for i in range(1,5):
	if k < a[i]-a[0]:
		ans=":("
print(ans)
Buggy python submission (verdict: Runtime Error):
enki_dict={"A":"T","C":"G"}
b = input()
ans = enki_dict[b]
print(ans)


Fixed submission:
enki_dict={"A":"T","C":"G","T":"A","G":"C"}
b = input()
ans = enki_dict[b]
print(ans)

Buggy python submission (verdict: Runtime Error):
enki_dict={"A":"T","C":"G"}
b = input()
ans = enki_dict["b"]
print(ans)


Fixed submission:
enki_dict={"A":"T","C":"G","T":"A","G":"C"}
b = input()
ans = enki_dict[b]
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
s = B//A
if C<=s:
	print(C)
else
	print(s)

Fixed submission:
A,B,C = map(int, input().split())
s = B//A
if C<=s:
	print(C)
else:
	print(s)
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
else:
	for i in range(1,(min(a,b))+1):
		if a%i==0 and b%i==0:
			l.append(i)
l.sort(reverse=True)
print(l[k-1])


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

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
else:
	for i in range(1,min(a,b)):
		if a%i==0 and b%i==0:
			l.append(i)
	
	print(l[k-1])

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

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
	break
else:
	for i in range(1,min(a,b)):
		if a%i==0 and b%i==0:
			l.append(i)
	
	print(l[k-1])

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

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1:
	print("1")
	break
for i in range(1,min(a,b)):
	if a%i==0 and b%i==0:
		l.append(i)

print(l[k-1])

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

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
for i in range(1,max(a,b)):
	if a%i==0 and b%i==0:
		l.append(i)
print(l[k-1])

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

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])
Buggy python submission (verdict: Runtime Error):
y,m,d = map(int, input()split(/))
if y > 2018:
    if m > 4:
        print("TBD")
else:
    print("Heisei")


Fixed submission:
y,m,d = map(int, input().split("/"))
if y > 2018 and m > 4 :
    print("TBD")
else:
    print("Heisei")

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

S = input()
ans = "TBD"
datetime.datetime.strptime(S, '%Y/%M/%d')
tbd=datetime(2019/4/30)
if S <= tbd:
    ans="Heisei"
print("ans")


Fixed submission:
y,m,d = map(int, input().split("/"))
if y > 2018 and m > 4 :
    print("TBD")
else:
    print("Heisei")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
print(a*b//2)


Fixed submission:
t,x = map(int, input().split())
print(t/x)
Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(abs(abs(a)-abs(t−h[i]×0.006)))
print(ans.index(min(ans)+1)

Fixed submission:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(abs(t-h[i]*0.006-a))
print(ans.index(min(ans))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(a-abs(t−h[i]×0.006))
print(min(ans))

Fixed submission:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(abs(t-h[i]*0.006-a))
print(ans.index(min(ans))+1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n in 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)


Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
Buggy python submission (verdict: Runtime Error):
n,t=map(int,input().split())
l=[]
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
print(min(l))

Fixed submission:
n,t=map(int,input().split())
l=[]
ans="TLE"
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
		ans=str(min(l))
print(ans)
Buggy python submission (verdict: Runtime Error):
108proA
k = int(input())
ans = (k//2) * ((k+1)//2)
print(ans)

Fixed submission:
k = int(input())
ans = (k//2) * ((k+1)//2)
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
cnt = 0
for i in s:
    if i == o:
        cnt+=100
print(700+cnt)


Fixed submission:
s = input()
cnt = 0
for i in s:
    if i == "o":
        cnt+=100
print(700+cnt)
Buggy python submission (verdict: Runtime Error):
n = int(input())
n_list = []
for i in n:
    n_list.append(i)
print(n_list)
if n_list[1]==n_list[2]==n_list[0]:
    print("Yes")
elif n_list[2]==n_list[3]==n_list[1]:
    print("Yes")
elif n_list[0]==n_list[1]==n_list[2]==n_list[3]:
    print("Yes")
else:
    print("No")


Fixed submission:
n = input()
n_list = []
for i in n:
    n_list.append(i)
if n_list[1]==n_list[2]==n_list[0]:
    print("Yes")
elif n_list[2]==n_list[3]==n_list[1]:
    print("Yes")
elif n_list[0]==n_list[1]==n_list[2]==n_list[3]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
r = list(map(str,input().split()))
s = "".join(r)
if s%4==0:
	print("YES")
else:
	print("NO")


Fixed submission:
r = list(map(str,input().split()))
s = "".join(r)
if int(s)%4==0:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
r = list(map(int,input().split()))
s = "".join(r)
if s%4==0:
	print("Yes")
else:
	print("No")

Fixed submission:
r = list(map(str,input().split()))
s = "".join(r)
if int(s)%4==0:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c = input().split()
str.capitalize(a,b,c)
print(a[0]+b[0]+c[0])


Fixed submission:
a,b,c = input().split()
a_d=a.capitalize()
b_d=b.capitalize()
c_d=c.capitalize()
print(a_d[0]+b_d[0]+c_d[0])
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if a == b:
	print("H"):
else:
	print("D")
	

Fixed submission:
a,b = input().split()
if a == b:
	print("H")
else:
	print("D")
Buggy python submission (verdict: Runtime Error):
a,b = int(input())
if a>b:
	print("Alice")
elif a<b:
	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 a<b:
	print("Bob")
else:
	print("Draw")
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
cnt=0
while b-a<k:
	b-=k
	cnt+=1
print(cnt)

Fixed submission:
a,b,x=map(int,input().split())
ans_a=(a-1)//x
ans_b=b//x
print(ans_b-ans_a)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N = int(input())

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

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

print(mul)

Fixed submission:
# -*- coding: utf-8 -*-

input_list = input().split(" ")
print(int(input_list[0]) * int(input_list[1]))
Buggy python submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[1,1,1,1,1]
a[0]=input()
a[1]=input()
a[2]=input()
a[3]=input()
a[4]=input()
a=[int(x) for x in a] 
t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))


Fixed submission:
from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy python submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(5)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))


Fixed submission:
from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy python submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(5)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(ans)


Fixed submission:
from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy python submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(4)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(ans)


Fixed submission:
from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ls = list(map(int, input().split()))
i = 0
while i < n:
    if ls.count(ls[i]) == 1:
        i += 1
    else:
        print("NO")
        break

if i == n:
    print("YES")

    


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

def merge_sort(arr):
    if len(arr) <= 1:
        return arr

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]

    # 再帰的に分割を行う
    left = merge_sort(left)
    right = merge_sort(right)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right)


def merge(left, right):
    merged = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
    return merged

a = merge_sort(ls)
i = 0
while i < n-1:
    if a[i] == a[i+1]:
        print("NO")
        break
    else:
        i += 1

if i == n-1:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ls = list(map(int, input().split()))
i = 0
while i < n:
    if ls.count(ls[i]) == 1:
        i += 1
    else:
        print("NO")
        break

if i == n:
    print("YES")

    

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

def merge_sort(arr):
    if len(arr) <= 1:
        return arr

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]

    # 再帰的に分割を行う
    left = merge_sort(left)
    right = merge_sort(right)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right)


def merge(left, right):
    merged = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
    return merged

a = merge_sort(ls)
i = 0
while i < n-1:
    if a[i] == a[i+1]:
        print("NO")
        break
    else:
        i += 1

if i == n-1:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
ls = list(map(int, input().split()))
m = [0 for l in range(0, k)]
for i in range(0,len(ls)):
    for j in range(0,len(m)):
        if m[j]<ls[i]:
            c = m[j:]
            m[j] = ls[i]
            m[j+1:] = c[:-1]
            break
print(sum(ls)-sum(m))

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

def merge_sort(arr):
    if len(arr) <= 1:
        return arr

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]

    # 再帰的に分割を行う
    left = merge_sort(left)
    right = merge_sort(right)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right)


def merge(left, right):
    merged = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
    return merged

ll = merge_sort(ls)
if n <= k:
    print(0)
else:
    print(sum(ll[:n-k]))
Buggy python submission (verdict: Runtime Error):
x = input().split()
n = 0
for i in range(1,int(x[0])+1):
    l = 0
    for j in range(1,i+1):
               if x[i] <= x[j]:
                    l += 1
    if l == i:
        n += 1
print(n)

Fixed submission:
x = input().split()
if x[0] == x[1]:
    print("Yes")
else :
    print("No")