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

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
ans=0
tmp=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        tmp+=1
    else:
        tmp=0
    ans=max(ans,tmp)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(int(x) for x in input().split())
 
length=0
max_length=0
 
for i in range(n-1):
  if h[i]>=h[i+1]:
    length+=1
    if length>max_length:
      max_length=length
  else:
    length=0
print(max_length)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=[int(i) for i in input().split()]
c=0
l=[]
for i in range(n-1):  
    if h[i]>h[i+1]:
        c+=1
    else:
        c=0
    l.append(c)
print(max(l))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=[int(i) for i in input().split()]
c=0
l=[]
for i in range(n-1):  
    if h[i]>h[i+1]:
      c+=1
    else:
      c=0
    l.append(c)
print(max(l))
Problem p03067 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a<c<b:
  print("Yes")
elif b<c<a:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if b>a and c>a: 
  if c>b:
    print("No")
  else:
    print("Yes")
 
elif a>b and c>b:
  if a>c:
    print("Yes")
  else c<a:
    print("No)
          
 else:
   print("No")
Problem p02640 (python)

Fixed submission:
a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])
 
saisyo = 2 * animal
saidai = 4 * animal
 
if (foot % 2 == 0) and (saisyo <= foot <= saidai):
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])
 
saisyo = 2 * animal
saidai = 4 * animal
 
if (foot % 2 = 0) and (saisyo <= foot <= saidai):
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])

saisyo = 1 * animal
saidai = 2 * animal
b = foot / 2

if (foot % 2 = 0) and (saisyo <= b <= saidai):
	print("Yes")
else:
    print("No")
Problem p02641 (python)

Fixed submission:
kazulist = []
for i in range(-100,200):
    kazulist.append(i)
 
a = list(input().split(" "))
target = int(a[0])
syokyo = int(a[1])

if syokyo != 0:
    b = list(input().split(" "))
    for i in b:
        kazulist.remove(int(i))
 
saisyosa = 100
kotae = 0
for i in kazulist:
    sa = target - int(i)
    #print(sa)
    if sa < 0:
        sa *= -1
    if sa < saisyosa:
        saisyosa = sa
        kotae = i
 
print(kotae)

Buggy submission (verdict: Runtime Error):
kazulist = []
for i in range(100):
    kazulist.append(i+1)
 
a = list(input().split(" "))
target = int(a[0])
syokyo = int(a[1])
 
b = list(input().split(" "))
for i in b:
    kazulist.remove(int(i))
 
saisyosa = 100
kotae = 0
for i in kazulist:
    sa = target - int(i)
    if sa < 0:
        sa *= -1
    if sa < saisyosa:
        saisyosa = sa
        kotae = i
 
print(kotae)

Buggy submission (verdict: Runtime Error):
kazulist = []
for i in range(100):
    kazulist.append(i+1)
 
a = list(input().split(" "))
target = int(a[0])
syokyo = int(a[1])
 
b = list(input().split(" "))
for i in b:
    kazulist.pop(int(i))
 
saisyosa = 100
kotae = 0
for i in kazulist:
    sa = target - int(i)
    if sa < 0:
        sa *= -1
    if sa < saisyosa:
        saisyosa = 0
        kotae = i
 
print(kotae)

Buggy submission (verdict: Runtime Error):
kazulist = []
for i in range(100):
    kazulist.append(i+1)

a = list(input().split(" "))
target = int(a[0])
syokyo = int(a[1])

b = list(input().split(" "))
for i in b:
    kazulist.pop(int(i))

saisyosa = 100
kotae = 0
for i in kazulist:
    sa = target - int(i)
    if sa < 0:
        sa *= -1
    if sa < saisyosa:
        saisyosa = 0
        kotae = i

print(i)
Problem p02677 (python)

Fixed submission:
from math import cos, sin, sqrt, radians
short, long, hour,minit = map(int,input().split())

short_kaku = 90 - (30 * hour + 0.5 * minit)
short_x = short * cos(radians(short_kaku))
short_y = short * sin(radians(short_kaku))

long_kaku = 90 - 6 * minit
long_x = long * cos(radians(long_kaku))
long_y = long * sin(radians(long_kaku))

distance = sqrt((short_x - long_x) ** 2 + (short_y - long_y) ** 2)

print(distance)

Buggy submission (verdict: Runtime Error):
from math import cos, sin, sqrt, radians
short = int(input())
long = int(input())
hour = int(input())
minit = int(input())

short_kaku = 90 - (30 * hour + 0.5 * minit)
short_x = short * cos(radians(short_kaku))
short_y = short * sin(radians(short_kaku))

long_kaku = 90 - 6 * minit
long_x = long * cos(radians(long_kaku))
long_y = long * sin(radians(long_kaku))

distance = sqrt((short_x - long_x) ** 2 + (short_y - long_y) ** 2)

print('{:.20f}'.format(distance))

Buggy submission (verdict: Runtime Error):
from math import cos, sin, sqrt, radians
short = int(input())
long = int(input())
hour = int(input())
minit = int(input())

short_kaku = 90 - (30 * hour + 0.5 * minit)
short_x = short * cos(radians(short_kaku))
short_y = short * sin(radians(short_kaku))

long_kaku = 90 - 6 * minit
long_x = long * cos(radians(long_kaku))
long_y = long * sin(radians(long_kaku))

distance = sqrt((short_x - long_x) ** 2 + (short_y - long_y) ** 2)

print(distance)
Problem p02602 (python)

Fixed submission:
def ip():
  	return list(map(int, input().split()))
[n,k]=ip()
arr=ip()
s=0
e=k
u=n-k
while u:
  if arr[s]<arr[e]:
      print("Yes")
  else:
      print("No")
  s+=1
  u-=1
  e+=1

Buggy submission (verdict: Runtime Error):
def ip():
  	return list(map(int, input().split()))
[n,k]=ip()
arr=ip()
s=0
e=k
u=k-1
while u:
  if arr[s]<arr[e]:
      print("Yes")
  else:
      print("No")
  s+=1
  u-=1
  e+=1
Problem p02584 (python)

Fixed submission:
X,K,D = map(int,input().split())

X = abs(X)
q = X // D
mod = X % D

if q > K:
    ans = abs(abs(X)-K*D)
elif q==K:
    ans = mod
else:
    ans1 = D-mod
    ans2 = mod

    if ans1<ans2:
        if (K-q-1)%2==1:
            ans = ans2
        else:
            ans = ans1
    else:
        if (K-q)%2==1:
            ans = ans1
        else:
            ans = ans2



print(ans)

Buggy submission (verdict: Runtime Error):
X,K,D = map(int,input().split())

q = X // D
mod = X % D

if q > K:
    ans = abs(abs(X)-K*D)
elif q==K:
    ans = mod
else:
    if abs(mod) <= abs(amod):
        if (K-q)%2 == 1:
            ans = D - mod
        else:
            ans = mod



print(ans)
Problem p02683 (python)

Fixed submission:
import itertools
import numpy as np
N,M,X=map(int,input().split())
lista=[]
for i in range(N):
    lista.append(list(map(int,input().split())))
lista=np.array(lista)
cost=1000000000000000
judge=[X]*M
data=[k for k in range(1,N+1)]
for i in range(1,N+1):
    a=list(itertools.combinations(data,i))
    for j in a:
        clist=np.array([0]*(M+1))
        for k in j:
            clist=clist+lista[k-1]
        if all(clist[1:]>=judge):
            if clist[0]<cost:
                cost=clist[0]
                m=j
c=0
try:
    for i in m:
        c+=lista[i-1][0]

    print(c)
except:
    print(-1)

Buggy submission (verdict: Runtime Error):
import itertools
import numpy as np
N,M,X=map(int,input().split())
lista=[]
for i in range(N):
    lista.append(list(map(int,input().split())))
lista=np.array(lista)
cost=1000000000000000
judge=[X]*M
data=[k for k in range(1,N+1)]
for i in range(1,N+1):
    a=list(itertools.combinations(data,i))
    for j in a:
        clist=np.array([0]*(M+1))
        for k in j:
            clist=clist+lista[k-1]
        if all(clist[1:]>=judge):
            if clist[0]<cost:
                cost=clist[0]
                m=j
c=0
for i in m:
    c+=lista[i][0]

print(c)
Problem p02702 (python)

Fixed submission:
s = input()
p = 2019
n = 0
ans = 0
mods = [0]*p
mods[0] = 1
for i, j in enumerate(reversed(s)):
  n += int(j)*pow(10, i, p)
  n %= p
  mods[n] += 1
for i in mods:
  ans += i*(i-1)//2
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2019
s[0]=1
for j in range(1,n+1):
    m=T(j)%2019
    s[m]+=1

c=0

for m in s:
    c += m*(m-1)/2

print(int(c))

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2019
for j in range(1,n+1):
    print(T(j))
    m=T(j)%2019
    s[m]+=1

c=s[0]

for m in s:
    c += m*(m-1)/2

print(int(c))

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2018
for j in range(1,n+1):
    print(T(j))
    m=T(j)%2019
    s[m]+=1

c=s[0]

for m in s:
    c += m*(m-1)/2

print(int(c))

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2018
for j in range(1,n+1):
    print(T(j))
    m=T(j)%2019
    s[m]+=1

c=s[0]

for m in s:
    c += m*(m-1)/2

print(int(c))

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2019
for j in range(1,n+1):
    m=T(j)%2019
    s[m]+=1

c=s[0]

for m in s:
    c += m*(m-1)/2

print(int(c))

Buggy submission (verdict: Runtime Error):
S=input()
n=len(S)
def T(i):
    if i == 0:
        return 0
    else:
        i-=1
        return T(i)+(10**i)*int(S[n-1-i])
s=[0]*2019
for j in range(1,n+1):

    m=T(j)%2019

    s[m]+=1

c=s[0]

for m in s:
    c += m*(m-1)/2

print(int(c))
Problem p02742 (python)

Fixed submission:
H,W=map(int,input().split())
S=H*W

while True:
    if H==1 or W==1:
        print(1)
        break

    if S%2==0:
        print(int(S/2))
        break
    elif S%2==1:
        print(int(S//2+1))
        break

Buggy submission (verdict: Runtime Error):
,W=map(int,input().split())
S=H*W
if S%2==0:
    print(int(S/2))
else:
    print(int(S//2+1))
Problem p02911 (python)

Fixed submission:
inp_list = list(map(int, input().split()))
n = inp_list[0]
k = inp_list[1]
q = inp_list[2]
ans_list = [k-q]*n
for i in range(q):
    ans_list[int(input())-1] += 1

for ans in ans_list:
    if ans > 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split))
list = [-i[1]]*i[0]
for j in range(i[2]):
    list[int(input())-1] += 1

for ans in list:
    if ans > 0:
        print("Yes")
    else:
        print("No")
Problem p02945 (python)

Fixed submission:
list = input().split()
a = int(list[0])
b = int(list[1])
ans = a+b
ans_2 = a-b
ans_3 = a*b
if ans_2>ans:
    ans = ans_2
if ans_3>ans:
    ans = ans_3
print(ans)

Buggy submission (verdict: Runtime Error):
list = input().split()
a = int(list[0])
b = int(list[1])
ans = a+b
ans_2 = a-b
ans_3 = a*b
if ans_2>ans:
    ans = ans_
if ans_3>ans:
    ans = ans_3
print(ans)
Problem p02885 (python)

Fixed submission:
A,B = map(int,input().split())
if A-(2*B) > 0:
  print(A-(2*B))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input())
if A-(2*B) > 0:
  print(A-(2*B))
else:
  print(0)
Problem p02886 (python)

Fixed submission:
N = int(input())
ans = 0
tako = list(map(int, input().split()))
for j in range(len(tako)-1):
  for k in range(j+1, len(tako)):
      ans += tako[j] * tako[k]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
tako = []
ans = 0
for i in N:
  tako.append(int(input()))
for j in range(len(tako)-1):
  ans += tako[j]*tako[j+1]
ans += tako[1] * tako[-1]
print(ans)
Problem p02909 (python)

Fixed submission:
S = input()
weather = ["Sunny", "Cloudy", "Rainy"]
if weather.index(S) < 2:
	print(weather[weather.index(S)+1])
else:
    print(weather[0])

Buggy submission (verdict: Runtime Error):
S = input()
weather = ["Sunny", "Cloudy", "Rainy"]
if weather.index(S) < 2:
	print(weather[weather.index(S)+1]
else:
    print(weather[0])
Problem p02952 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(1,N+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1,N+1):
  if len(i) % 2 == 1:
    ans += 1
print(ans)
Problem p02993 (python)

Fixed submission:
password = list(input())
if password[0] == password[1] or password[1] == password[2] or password[2] == password[3]:
  print("Bad")
else:
  print("Good")

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

Buggy submission (verdict: Runtime Error):
n = int(input())
new = set(n)
if len(new) != 4:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
password = list(input())
for i in range(len(password)):
  for j in range(i+1, len(password)):
    if password[i] == password[j]:
      print("Bad")
      exit(1)
print("Good")

Buggy submission (verdict: Runtime Error):
password = list(input())
pw = set(password)
if len(pw) != 4:
  print("Bad")
  break
print("Good")

Buggy submission (verdict: Runtime Error):
password = input().split()
pw = set(password)
if len(password) != len(pw):
  print("Bad")
  break
print("Good")

Buggy submission (verdict: Runtime Error):
password = set(input().split())
if len(password) != 4:
  print("Bad")
  break
print("Good")

Buggy submission (verdict: Runtime Error):
password = list(input())
for i in range(len(password)):
  for j in range(i+1, len(password)):
    if i != j and password[i] == password[j]:
      print("Bad")
      exit(1)
print("Good")
Problem p02994 (python)

Fixed submission:
num, t = map(int, input().split())
taste = []
findmin = []

sum= 0
for i in range(1,num + 1):
  taste.append(t+i-1)
  sum += t+i-1
for j in range(len(taste)):
  findmin.append(taste[j]*taste[j])
m = findmin.index(min(findmin))
print(sum - taste[m])

Buggy submission (verdict: Runtime Error):
num, t = map(int, input().split())
taste = []
findmin = []

sum= 0
for i in range(1,len(num)+1):
  taste.append(t+i-1)
  sum += t+i-1
for j in range(len(taste)):
  findmin.append(j*j)
m = findmin.index(min(findmin))
print(sum - taste[m])

Buggy submission (verdict: Runtime Error):
num, t = map(int, input().split())
taste = []
findmin = []

sum= 0
for i in range(len(num)):
  taste.append(t+i-1)
  sum += t+i-1
for j in range(len(taste)):
  findmin.append(j*j)
m = findmin.index(min(findmin))
print(sum - taste[m])
Problem p03000 (python)

Fixed submission:
N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+int(bounce[i]))
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N, limit = map(int, input().split())
bounce = int(input().split())
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+bounce[i])
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(b[i]+bounce[i])
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N, limit = map(int, input().split())
bounce = input().split()
b = [0]
count = 0
for i in range(len(bounce)):
  b.append(bounce[i]+i)
  
for j in range(len(b)):
  if b[j] <= limit:
    count += 1
print(count)
Problem p03085 (python)

Fixed submission:
v = input()
if v == "A":
  print("T")
elif v == "T":
  print("A")
elif v == "C":
  print("G")
elif v == "G":
  print("C")

Buggy submission (verdict: Runtime Error):
v = input()
if v = "A":
  print("T")
elif v = "T":
  print("A")
elif v = "C":
  print("G")
elif v = "G":
  print("C")
Problem p03086 (python)

Fixed submission:
count = 0
MAX = 0
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    count += 1
    if MAX < count:
        MAX = count
  else:
    count = 0

print(MAX)

Buggy submission (verdict: Runtime Error):
count = 0
c = []
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    count += 1
  else:
    c.append(count)
    count = 0

print(max(c))

Buggy submission (verdict: Runtime Error):
#HATAGAYA
count = 0
c = []
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    count += 1
  else:
    c.append(count)
    count = 0
print(max(c))

Buggy submission (verdict: Runtime Error):
#HATAGAYA
words = ''
w = []
flag = []
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    flag.append('True')
  else:
    flag.append('False')

for j in range(len(S)):
  if flag[j] == 'True':
  	words += S[j]
  elif flag[j] == 'False':
    w.append(words)
    words = ''

print(len(max(w)))

Buggy submission (verdict: Runtime Error):
words = ''
w = []
flag = []
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    flag.append('True')
  else:
    flag.append('False')

for j in range(len(S)):
  if flag[j] == 'True':
  	words += S[j]
  elif flag[j] == 'False':
    w.append(words)
    words = ''

print(len(max(w)))

Buggy submission (verdict: Runtime Error):
words = ''
w = []
flag = []
S = list(input())
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
    flag.append('True')
  else:
    flag.append('False')
print(S)
print(flag)

for j in range(len(S)):
  if flag[j] == 'True':
  	words += S[j]
  elif flag[j] == 'False':
    w.append(words)
    words = ''

print(len(max(w)))
Problem p03106 (python)

Fixed submission:
A,B,K = map(int,input().split())
ans =[]
for i in range(1, min(A,B)+1):
    if A%i == 0 and B%i == 0:
        ans.append(i)
    

print(ans[-K])

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input().split())
ans =[]
for i in range(1, min(A,B)+1):
    if A%i == 0 and B%i == 0:
        ans.append(i)
    
    if len(ans) == K:
        print(ans[len(ans)-1])
        exit(1)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input.split())
ans =[]
for i in range(1, min(A,B)+1):
  if A%i == 0 and B%i == 0:
    ans.append(i)
  if len(ans) == K:
    print(ans[len(ans)-1])
    exit(1)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input.split())
ans =[]
for i in range(1, min(A,B)+1):
  if A%i == 0 and B%i == 0:
    ans.append(i)
  if len(ans) == K:
    print(ans[len(ans)])
    exit(1)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input.split())
ans =[]
for i in range(1, min(A,B)+1):
  if A%i == 0 and B%i == 0:
    ans.append(i)
  if len(ans) == K:
    print(len(ans))
    exit(1)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input.split())
ans =[]
for i in range(1, min(A,B)):
  if A%i == 0 and B%i == 0:
    ans.append(i)
  if len(ans) == K:
    print(len(ans))
    exit(1)
Problem p03126 (python)

Fixed submission:
N, M = map(int, input().split())
erase = set()
for i in range(N):
    a = list(map(int, input().split())) 
    
    if i == 0:
        food = a[1:]
    for j in range(len(food)): 
        
        if food[j] not in a[1:]:
            erase.add(j)

print(len(food)-len(erase))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
erase = {}
for i in range(N):
    a = list(map(int, input().split()))
    
    if i == 0:
        food = a[1:]
    else:
        for j in range(len(food)): 
            if food[j] not in a[1:]:
                erase.add(food[j])
print(len(food)-len(erase))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
erase = {}
for i in range(N):
    a = list(map(int, input().split())) #a = [2,1,3] -> a = [3,1,2,3]
    
    if i == 0:
        food = a[1:] #food = [1] -> food = [1,3]
    else:
        for j in range(len(food)): 
            if food[j] not in a[1:]:
                erase.add(food[j])
print(len(food)-len(erase))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
erase = {}
for i in range(N):
    a = list(map(int, input().split())) #a = [2,1,3] -> a = [3,1,2,3]
    
    if i == 0:
        food = a[1:] #food = [1] -> food = [1,3]
    else:
        for j in range(len(food)): 
            if food[j] not in a[1:]:
                erase.add(j)
print(len(food)-len(erase))
Problem p03136 (python)

Fixed submission:
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
edges.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
m.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
m.pop(m.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")
Problem p03211 (python)

Fixed submission:
S = list(input())
words = []
remain = []
for i in range(len(S)-2):
    words.append(S[i] + S[i+1] + S[i+2])
for j in range(len(words)):
    if int(words[j]) >= 753:
        remain.append(int(words[j]) - 753)
    else:
        remain.append(753 - int(words[j]))
ans = remain.index(min(remain))
print(remain[ans])

Buggy submission (verdict: Runtime Error):
S = input().split()
words = []
remain = []
for i in range(len(S)-2):
  words.append(S[i] + S[i+1] + S[i+2])
for j in range(len(words)):
  remain.append(753 - int(words[j]))
ans = remain.index(min(remain))
print(words[ans])
Problem p03220 (python)

Fixed submission:
candidates = input()
T, A = map(int, input().split())
heights = input().split()
ans = []
for i in range(len(heights)):
    if T - int(heights[i])*0.006 >= A:
        ans.append((T - int(heights[i])*0.006) - A)
    else:
        ans.append(A - (T - int(heights[i])*0.006))
answer = ans.index(min(ans))
print(answer + 1)

Buggy submission (verdict: Runtime Error):
candidates = input()
T, A = map(int, input().split())
heights = int(input().split())
ans = []
for i in range(len(heights)):
  ans.append(A - (T - heights[i]*0.006))
answer = ans.index(min(ans))
print(answer + 1)
Problem p03238 (python)

Fixed submission:
N = int(input())
if N == 1:
  print("Hello World")
else:
  A = int(input())
  B = int(input())
  print(A+B)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N == 1:
	print("Hello World")
else:
	A = int(input())
    B = int(input())
    print(A+B)
Problem p03239 (python)

Fixed submission:
N,T = map(int,input().split())
paths = []
for i in range(N):
  cost, time = map(int,input().split())
  if time <= T:
    paths.append(cost)
if len(paths) == 0:
  print("TLE")
else:
  print(min(paths))

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
paths = []
for i in range(N):
  cost, time = map(int,input().split())
  if time < T:
    paths.append(cost)
print(min(paths))

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
paths = []
for i in range(N):
	cost, time = map(int, input().split())
   	if time < T: 
	  	paths.append(cost)
print(min(paths))

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
paths = []
for i in range(N):
	cost, time = map(int,input().split())
   	if time < T: 
	  	paths.append(cost)
print(min(paths))