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

Fixed submission:
from operator import itemgetter

n = int(input())
r = []
b = []
c = 0
for i in range(n):
  r.append(list(map(int,input().split())))
for i in range(n):
  b.append(list(map(int,input().split())))
r.sort(key = itemgetter(1),reverse = True)
b.sort(key = itemgetter(0))
for i in range(n):
  for j in range(n):
    if b[i][0] > r[j][0] and b[i][1] > r[j][1]:
      r[j] = [10**6,10**6]
      c += 1
      break
print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
r = []
b = []
c = 0
for i in range(n):
  r.append(list(map(int,input().split())))
for i in range(n):
  b.append(list(map(int,input().split())))
r.sort(key = itemgetter(1),reverse = True)
b.sort(key = itemgetter(0))
for i in range(n):
  for j in range(n):
    if b[i][0] > r[j][0] and b[i][1] > r[j][1]:
      r[j] = [10**6,10**6]
      c += 1
      break
print(c)
Problem p03456 (python)

Fixed submission:
import math

a,b = map(int,input().split())
ans = math.sqrt(int(str(a) + str(b)))
if ans.is_integer() == True:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math 

a,b = map(int,input().split())
ans = math.sqrt(int(str(a) + str(b)))
if ans.isinteger() == True:
  print("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
s = input()
print(s[:3]+"8"+s[4:])

Buggy submission (verdict: Runtime Error):
s = input()
s[3] = 8
print(s)

Buggy submission (verdict: Runtime Error):
s = input()
s[3] = "8"
print(s)
Problem p03473 (python)

Fixed submission:
print(48-int(input()))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = input()
if s[a] == "-" and len(s) == a+b+1:
  if str.isdecimal(s[:a]) == True and str.isdecimal(s[:a+1]) == True:
    print("Yes")
else:
  print("No")
Problem p03474 (python)

Fixed submission:
a,b = map(int,input().split())
s = input()
if s[a] == "-" and len(s) == a+b+1 and str.isdecimal(s[:a]) == True and str.isdecimal(s[a+1:]) == True:
    print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = list(input())
if s[a] == "-" and len(s) == a+b+1:
  s.remove(s[a])
  for i in range(a+b):
    if i.is_integer() == False:
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a.b = map(int,input().split())
s = list(input())
if s[a] == "-" and len(s) == a+b+1:
  s.remove(s[a])
  for i in range(a+b):
    if i.is_integer() == False:
      print("No")
      break()
  else:
    print("Yes")
else:
  print("No")
Problem p03477 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
if a+b > c+d:
  print("Left")
elif a+b == c+d:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
if a+b > c+d:
  print("Left")
elif a+b = c+d:
  print("Balanced")
else:
  print("Right")
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
s = sorted(list(input()))
t = sorted(list(input()),reverse=True)
if s < t:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = sorted(list(input()))
t = sorted(list(input()),reverse=True)
if str(s) < str(t):
  print("Yes")
else:
  print("No")
Problem p03493 (python)

Fixed submission:
s = list(str(input()))
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
a = list(str(input()))
print(s.count("1"))
Problem p03494 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = []
c = 0
for i in range(n):
  while a[i] % 2 == 0:
    a[i] /= 2
    c += 1
  b.append(c)
  c = 0
print(min(b))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(mao(int,input().split()))
b = []
c = 0
for i in range(n):
  while a[i] % 2 == 0:
    a[i] /= 2
    c += 1
  b.append(c)
  c = 0
print(min(b))
Problem p03632 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a <= i < b and c <= i < d:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
if c < b < d:
  print(b-C)
elif a < d < b:
  print(d-a)
elif a < c < b and a< d < b:
  print(d-c)
elif c < a < d and c < b < d:
  print(b-a)
else:
  print(int(0))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
if c < b < d:
  print(b-C)
elif a < d < b:
  print(d-a)
elif a < c < b and a< d < b:
  print(d-c)
elif c < a < d and c < b < d:
  print(b-a)
else:
  print(0)
Problem p03672 (python)

Fixed submission:
s = input()
n = len(s)
while True:
  s = s[:-2]
  n -= 2
  if s[:n//2] == s[n//2:]:
    print(n)
    break

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(len(s),1,-2):
  if s[:i/2+1] == s[i/2+1:]:
    print(len(s[:i/2+1]))
    break
Problem p03697 (python)

Fixed submission:
a,b = map(int,input().split())
if a+b >= 10:
  print("error")
else:
  print(a+b)

Buggy submission (verdict: Runtime Error):
a,b = map(int(input().split()))
if a+b >= 10:
  print("error")
else:
  print(a+b)
Problem p03720 (python)

Fixed submission:
n,m = map(int,input().split())
a = []
ans = [0]*n
for i in range(m):
  a.append(list(map(int,input().split())))
for i in range(m):
  for j in range(n):
    ans[j] += a[i].count(j+1)
for i in range(n):
  print(ans[i])

Buggy submission (verdict: Runtime Error):
n.m = map(int,input().split())
ans = [0]*n
for i in range(m):
  a,b = map(int,input().split())
  ans[a-1] += 1
  ans[b-1] += 1
for i in range(n):
  print(ans[i])
Problem p03737 (python)

Fixed submission:
a = list(map(str,input().split()))
c = str()
for i in range(3):
  c += a[i][0].upper()
print(c)

Buggy submission (verdict: Runtime Error):
a = list(map(str,input().split()))
c = str()
for i in range(3):
  c += a[i]a[0].upper()
print(c)
Problem p03777 (python)

Fixed submission:
a = set(map(str,input().split()))
if len(a) == 1:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
a,b = map(str,input().split())
H = 1
D = 0
print(a^b)
Problem p03852 (python)

Fixed submission:
s = input()
a = {"a","e","u","i","o"}
if s in a:
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
s = input()
a = {a,e,u,i,o}
if s in a:
  print("vowel")
else:
  print("consonant")
Problem p03943 (python)

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] + a[1] == a[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
a.sort(reverse=True)
if a[0] = a[1] + a[2]:
  print("Yes")
else:
  print("No")
Problem p03192 (python)

Fixed submission:
n=list(input())
print(n.count('2'))

Buggy submission (verdict: Runtime Error):
n=list(input())
print(n.count('2))
Problem p03131 (python)

Fixed submission:
import sys

K, A, B = sys.stdin.readline().split(" ")
k = long(K)
a = long(A)
b = long(B)

if (b-a) >= 2:
	hitsteps = a - 1
	leftoversteps = k - hitsteps
	rem = (leftoversteps)%2
	swaps = (leftoversteps-rem)/2
	multbiscuits = swaps * (b-a)
	print(int(multbiscuits+rem+a))
else:
	print(int(k+1))

Buggy submission (verdict: Runtime Error):
import sys

K, A, B = sys.stdin.readline().split(" ")
k = long(K)
a = long(A)
b = long(B)

if (b-a) >= 2:
	hitsteps = a - 1
	leftoversteps = k - hitsteps
	rem = (leftoversteps)%2
	swaps = (leftoversteps-rem)/2
	multbiscuits = swaps * (b-a)
	print(int(multbiscuits+rem+a))
else:
	print(int(k+1))

Buggy submission (verdict: Runtime Error):
import sys

K, A, B = sys.stdin.readline().split(" ")
k = long(K)
a = long(A)
b = long(B)

if (b-a) >= 2:
	hitsteps = a - 1
	leftoversteps = k - hitsteps
	rem = (leftoversteps)%2
	swaps = (leftoversteps-rem)/2
	multbiscuits = swaps * (b-a)
	print(int(multbiscuits+rem+a))
else:
	print(int(k+1))

Buggy submission (verdict: Runtime Error):
import sys


K, A, B = sys.stdin.readline().split(" ")
k = long(K)
a = long(A)
b = long(B)

if (b-a) >= 2:
	hitsteps = a - 1
	leftoversteps = k - hitsteps
	rem = (leftoversteps)%2
	assert(rem==1 or rem == 0)
	swaps = (leftoversteps-rem)/2
	multbiscuits = swaps * (b-a)
	print(int(multbiscuits+rem+a))
else:
	print(int(k+1))
Problem p03139 (python)

Fixed submission:
n,x,y = map(int,input().split())
r = x+y-n
if r < 0:
  r = 0
print(min(x,y),r)

Buggy submission (verdict: Runtime Error):
list(n,x,y) = map(int,input().split(" "))
print(min(x,y),x+y-n)

Buggy submission (verdict: Runtime Error):
list(n,x,y) = input().split(" ")
print(min(x,y),x+y-n)
Problem p03130 (python)

Fixed submission:

from collections import *
import sys


def is_all_tarverse(start, mem, town_mem):

    if len(town_mem) == len(paths):
        return True

    for nxt in paths[start]:
        edge = frozenset((start, nxt))
        if edge in mem: continue
        if is_all_tarverse(nxt, mem | {edge}, town_mem | {nxt}):
            return True

    return False


paths = defaultdict(set)

for _ in range(3):
    a = input()
    st, dt = [int(x) for x in a.split()]
    paths[st].add(dt)
    paths[dt].add(st)


for start in paths:
    if is_all_tarverse(start, set(), {start}):
        print('YES')
        sys.exit()

print('NO')

Buggy submission (verdict: Runtime Error):

from collections import *
import sys


def is_all_tarverse(start, mem, town_mem):

    if len(town_mem) == len(paths):
        return True

    for nxt in paths[start]:
        edge = frozenset((start, nxt))
        if edge in mem: continue
        if is_all_tarverse(nxt, mem | {edge}, town_mem | {nxt}):
            return True

    return False


paths = defaultdict(set)

a = input()
while a:
    st, dt = [int(x) for x in a.split()]
    paths[st].add(dt)
    paths[dt].add(st)
    a = input()

for start in paths:
    if is_all_tarverse(start, set(), {start}):
        print('YES')
        sys.exit()

print('NO')
Problem p03246 (python)

Fixed submission:

import sys
from collections import *

n = int(input())
v = [int(x) for x in input().split()]

if not n:
    print(0)
    sys.exit()

n1 = Counter(v[::2])
n2 = Counter(v[1::2])

max1 = 0

n1 = sorted([(count, k) for k, count in n1.items()], reverse=True)
n2 = sorted([(count, k) for k, count in n2.items()], reverse=True)

if n1[0][1] == n2[0][1]:
    if len(n1) == 1 and len(n2) == 1:
        print(n//2)
        sys.exit()
    if len(n1) == 1 or n1[0][0] > n2[0][0]:
        print(n - n1[0][0] - n2[1][0])
        sys.exit()
    if len(n2) == 1 or n1[0][0] < n2[0][0]:
        print(n - n1[1][0] - n2[0][0])
        sys.exit()
    if n1[0][0] == n2[0][0]:
        if n1[1][0] >= n2[1][0]:
            print(n - n1[1][0] - n2[0][0])
        elif n1[1][0] < n2[1][0]:
            print(n - n1[0][0] - n2[1][0])
        sys.exit()

count = n - n1[0][0] - n2[0][0]
print(count)

Buggy submission (verdict: Runtime Error):

import sys
from collections import *

n = int(input())
v = [int(x) for x in input().split()]

if not n:
    print(0)
    sys.exit()

n1 = Counter(v[::2])
n2 = Counter(v[1::2])

max1 = 0

n1 = sorted([(count, k) for k, count in n1.items()], reverse=True)
n2 = sorted([(count, k) for k, count in n2.items()], reverse=True)

if n1[0][1] == n2[0][1]:
    if len(n1) == 1 and len(n2) == 1:
        print(n//2)
        sys.exit()
    if len(n1) == 1 or n1[0][0] > n2[0][0]:
        print(n - n1[0][0] - n2[1][0])
        sys.exit()
    if len(n2) == 1 or n1[0][0] < n2[0][0]:
        print(n - n1[1][0] - n2[0][0])
        sys.exit()
    if n1[0][0] == n2[0][0]:
        if n1[1][0] >= n2[1][0]:
            print(n - n1[1][0] - n2[0][0])
        elif n1[1][0] < n2[1][0]:
            print(n - n1[0][0] - n2[1][0])
        sys.exit()

count = n1 - n1[0][0] - n2[0][0]
print(count)
Problem p03129 (python)

Fixed submission:
a = list(map(int,input().split()))
N,K = a[0]-1,a[1]-1
 
if N/2 >= K:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
N,K = a[0]-1,a[1]-1
 
if N/2 >= K:
    print("YES")
else:
    print("NO")
Problem p03129 (python)

Fixed submission:
a,b = map(int, input().split(" "))
b = b -1
if b==0:
  print("YES")
elif (a-1)//b >=2:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split(" "))
b = b -1
if b==0:
  print("YES")
if (a-1)//b >=2:
  print("YES")
else:
  print("NO")
Problem p03399 (python)

Fixed submission:
from sys import stdin
a = int(stdin.readline())
b = int(stdin.readline())
c = int(stdin.readline())
d = int(stdin.readline())
print min(a,b) + min(c,d)

Buggy submission (verdict: Runtime Error):
from sys import stdin
n = int(stdin.readline())
d,s = map(int,stdin.readline().split())
for _ in xrange(n):
 x = int(stdin.readline())
 st = 1
 while st <= d:
  s+=1
  st += x
print s
Problem p03129 (python)

Fixed submission:
n,k = [int(i) for i in input().split()]

# n以下の奇数の数をカウント
cnt = 0
for i in range(1, n+1):
    if i % 2 == 1:
        cnt+=1

if cnt >= k:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    sum = 1 + (k - 2) + (b - a) 
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        # a,bに１施行ずつ使い、それ以外は叩く、という選択
        sum = 1 + (k - 2) + 1
    elif diff == 2:
        # a,bに１施行ずつ使い、それ以外は叩く、という選択(a,bで + 2 なのでall叩くと同じスコア)
        sum = 1 + k
    else:
        # a->bコンボが利潤を生み続けるパターン
        print("a")
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            # 最後1回はコンボができないので、叩くパターン
            print("b")
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)

Buggy submission (verdict: Runtime Error):
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    else:
        # a->bコンボが利潤を生み続けるパターン
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            # 最後1回はコンボができないので、叩くパターン
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)

Buggy submission (verdict: Runtime Error):
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    else:
        # a->bコンボが利潤を生み続けるパターン
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            # 最後1回はコンボができないので、叩くパターン
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)

Buggy submission (verdict: Runtime Error):
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    else:
        # a->bコンボが利潤を生み続けるパターン
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            # 最後1回はコンボができないので、叩くパターン
            print("b")
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)
Problem p03130 (python)

Fixed submission:
lst = [9, 9, 9, 9, 9, 9]
lst[0], lst[1] = [int(i) for i in input().split()]
lst[2], lst[3] = [int(i) for i in input().split()]
lst[4], lst[5]  = [int(i) for i in input().split()]
   
flag = [False, False, False, False]
 
f = 1
for i in range(1, 4+1):
    if (lst.count(i) == 0) or (lst.count(i) == 3):
        print("NO")
        f = 0
        break
 
if f == 1:
    print("YES")

Buggy submission (verdict: Runtime Error):
lst[0], lst[1] = [int(i) for i in input().split()]
lst[2], lst[3] = [int(i) for i in input().split()]
lst[4], lst[5]  = [int(i) for i in input().split()]

flag = [False, False, False, False]

f = 1
for i in range(1, 4+1):
    if (lst.count(i) == 0) or (lst.count(i) == 3):
        print("NO")
        f = 0
        break

if f == 1:
    print("YES")

Buggy submission (verdict: Runtime Error):
lst = [9, 9, 9, 9, 9, 9]
lst[0], lst[1] = [int(i) for i in input().split()]
lst[2], lst[3] = [int(i) for i in input().split()]
lst[4], lst[5]  = [int(i) for i in input().split()]

flag = [False, False, False, False]
lst = list(set(lst))

if i in range(4):
    if i not in lst:
        print("NO")
        exit()

print("YES")
Problem p03131 (python)

Fixed submission:
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    # a,bに１施行ずつ使い、それ以外は叩く、という選択
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    elif diff >= 3:
        # a->bコンボが利潤を生み続けるパターン
        rest = 1 + k - a
#         print("K:{}".format(rest))
        if rest >= 0:
            if rest % 2 == 0:
                sum = a + ((diff) * int(rest / 2))
#                 print("biscuits:{}".format(a))
#                 print("diff:{}, k/2:{}".format(diff, rest / 2))
            else:
                # 最後1回はコンボができないので、叩くパターン
                sum = a + ((diff) * int((rest - 1) / 2)) + 1
#                 print("biscuits:{}".format(a))
#                 print("diff:{}, k/2:{}".format(diff, (rest - 1) / 2))
        else:
            sum = k + 1
                
print(int(sum))

Buggy submission (verdict: Runtime Error):
 k, a, b = [int(i) for i in input().split()]
#k, a, b= 314159265, 35897932, 384626433

sum = 0
if a >= b:
    # A >= Bの場合
    # a,bに１施行ずつ使い、それ以外は叩く、という選択
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    elif diff >= 3:
        # a->bコンボが利潤を生み続けるパターン
        rest = 1 + k - a
#         print("K:{}".format(rest))
        if rest >= 0:
            if rest % 2 == 0:
                sum = a + ((diff) * int(rest / 2))
#                 print("biscuits:{}".format(a))
#                 print("diff:{}, k/2:{}".format(diff, rest / 2))
            else:
                # 最後1回はコンボができないので、叩くパターン
                sum = a + ((diff) * int((rest - 1) / 2)) + 1
#                 print("biscuits:{}".format(a))
#                 print("diff:{}, k/2:{}".format(diff, (rest - 1) / 2))
        else:
            sum = k + 1
                
print(int(sum))
Problem p03325 (python)

Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
        while ai%2==0:
            ai=ai/2
            count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
        while ai%2==0
            ai=ai/2
            count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for ai in a:
    if ai%2==0:
        while ai!=1:
            ai=ai/=2
            count+=1
print(count)
Problem p04030 (python)

Fixed submission:
s = list(map(str,input()))
l = []
for i in s:
    if i == '0':
       l.append(i)
    elif i == '1':
       l.append(i)
    elif  i == 'B' and len(l) != 0:
        l.pop(-1)
print(''.join(l))

Buggy submission (verdict: Runtime Error):
s = list(map(str,input().split()))
l = []
for i in s:
    if i == '0':
       l.append(i)
    elif i == '1':
       l.append(i)
    elif  i == 'B' and len(l) != 0:
        l.pop(-1)
print(int(''.join(l)))
Problem p04045 (python)

Fixed submission:
N,K = map(int,input().split())
D  = {int(n) for n in input().split()}
for j in range(N,N*10):
    if N <= j:
        L = {int(result) for result in str(j)}
        if D.isdisjoint(L):
            D_love = j
            break    
print(D_love)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
D  = {int(n) for n in input().split()}
for j in range(10000):
    if N <= j:
        L = {int(result) for result in str(j)}
        if D.isdisjoint(L):
            D_love = j
            break
print(D_love)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
D  = {int(n) for n in input().split()}
for j in range(10001):
    if N <= j:
        L = {int(result) for result in str(j)}
        if D.isdisjoint(L):
            D_love = j
            break
print(D_love)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
D  = {int(n) for n in input().split()}
a = {i for i in range(10)}
N_hate = a.difference(D)
for j in range(10001):
    if N <= j:
        L = {int(result) for result in str(j)}
        if N_hate == L:
            N_love = j
            break
print(N_love)
Problem p03136 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())
 
# n回ループして配列に入れる
max = 0
other = 0
l =　input().split()
for i in range(n):
 tmp = l[i]
 max = tmp if tmp > max else other = other +  l[i]
 
if max < tmp:
 print("Yes")
else: 
 print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())

# n回ループして配列に入れる
max = 0
other = 0
for i in range(n):
  tmp = input()
  max = tmp if tmp > max else other = other +  tmp

 if max < tmp  :
   print("Yes")
else : 
print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())

# n回ループして配列に入れる
max = 0
other = 0
for i in range(n):
  tmp = input()
  max = tmp if tmp > max else other = other +  tmp

print("Yes") if max < tmp else print("No")
Problem p03129 (python)

Fixed submission:
import math
import copy
import bisect








def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l

n=nCast(input().split())

def func():
    if n[1]==1:
        return "YES"
    if n[0]%2!=0:
        n[0]=n[0]+1
    if n[1]*2<=n[0]:
        return "YES"
    else:
        return "NO"
    
print(func())

Buggy submission (verdict: Runtime Error):
import math
import copy
import bisect








def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l

n=nCast(input().split())

def func():
    if n[2]-n[1]<2:
        return 1+n[0]
    if n[1]-1>=n[0]:
        return 1+n[0]

    result=n[1]
    ret=n[0]+1-n[1]
    if ret%2==0:
        return result+ret/2*(n[2]-n[1])
    return 1+result+(ret-1)/2*(n[2]-n[1])
    
print(int(func()))
Problem p03129 (python)

Fixed submission:
n,k =list(map(int,input().split()))
if k*2-1 > n:
    print("NO") 
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
n,k =list(map(int,input().split())
if k*2-1 > n:
    print("NO")
else:
    print("YES")
Problem p03463 (python)

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

if (N_A_B[2] - N_A_B[1]) %2 == 0:
    print("Alice")
elif (N_A_B[2] - N_A_B[1]) %2 == 1:
    print("Borys")

Buggy submission (verdict: Runtime Error):
N_A_B = list(map(int, input()))

if N_A_B[2] - N_A_B[1] %2 == 0:
    print("Borys")
elif N_A_B[2] - N_A_B[1] %2 == 1:
    print("Alice")