Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=input()
judge=True
if "W" in s:
    if "E" not in s: judge=False
if "E" in s:
    if "W" not in s: judge=False
if "S" in s:
    if "N" not in s: judge=False
if "N" in s:
    if "S" not in s: judge=False
print("Yes") if judge else prit("No")

Fixed submission:
s=input()
judge=True
if "W" in s:
    if "E" not in s: judge=False
if "E" in s:
    if "W" not in s: judge=False
if "S" in s:
    if "N" not in s: judge=False
if "N" in s:
    if "S" not in s: judge=False
print("Yes") if judge else print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

min_=100000

for i in range(1, N):
    for j in range(1, N):
        sum_i=0
        sum_j=0
        if i + j == N:
            tmp_i=i
            tmp_j=j
            while tmp_i > 0:
                sum_i += tmp_i % 10
                tmp_i = tmp_i // 10
            while tmp_j > 0:
                sum_j += tmp_j % 10
                tmp_j = tmp_j // 10
            min_=min(min_, sum_i+sum_j)



print(min_)

Fixed submission:
N=int(input())

min_=100000

for i in range(1, N//2+1):
    j=N-i
    sum_i=0
    sum_j=0
    tmp_i=i
    tmp_j=j
    while tmp_i  > 0:
        sum_i += tmp_i % 10
        tmp_i = tmp_i // 10
    while tmp_j > 0:
        sum_j += tmp_j % 10
        tmp_j = tmp_j // 10
    min_=min(min_, sum_i+sum_j)

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

Fixed submission:
a,b=map(int, input().split())
x=a*b
if x%2==0:
    print("Even")
else :
    print("Odd")
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, D, E, F = list(map(int, input().split()))
 

sugars = []
for i in range(0, F+1):
    for j in range(0, F+1):
        y = i*C + j*D
        if y <= F:
                
            sugars.append(y)
 
water = []
for i in range(0, F+1):
    for j in range(0, F+1):
        x = 100*A*i + 100*B*j
        if x <= F:
               
            water.append(x)
    
sugars.sort()
water.sort()
 

concent = 0
for x in water:
    for y in sugars:
         if x+y > F:
            break
         if x+y > 0 and y/(x+y) <= E/(100+E):
            if y/(x+y) >= concent:
                concent = y/(x+y)
                ans = "{} {}".format(x+y, y)
print(ans)

Fixed submission:
A,B,C,D,E,F = map(int,input().split())
 
use_water = [] 
for i in range(0,31):
  for j in range(0,31):
    tmp = A*i + B*j
    if((tmp != 0)and(tmp <= 30)): 
      if(tmp*100 <= F):
        use_water.append(tmp)
use_water = list(set(use_water))
use_water.sort()
 
Conc = [] 
for i in range(101):
  for j in range(51):
    for k in range(len(use_water)):
      sugar = C*i + D*j
      water = use_water[k]*100
      if(sugar + water <= F):
       if(sugar <= use_water[k]*E):
        conc = sugar/(sugar + water)
        Conc.append([conc,water+sugar,sugar])
 
Conc.sort(reverse = True)
ans_water,ans_sugar = Conc[0][1],Conc[0][2]
print(ans_water,ans_sugar)
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):
            z = S-x-y
            if 0<= z <=K:
                count+=1
        
print(count)
Buggy python submission (verdict: Runtime Error):
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[n].lower()
elif k == 1:
    r=s[0].lower() + s[1:n]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k:n]
print(r)

Fixed submission:
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[n-1].lower()
elif k == 1:
    r=s[0].lower() + s[1:n]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k:n]
print(r)

Buggy python submission (verdict: Runtime Error):
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[k].lower()
elif k == 0:
    r=s[0:(k-1)].lower() + s[k]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k]
print(r)

Fixed submission:
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[n-1].lower()
elif k == 1:
    r=s[0].lower() + s[1:n]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k:n]
print(r)

Buggy python submission (verdict: Runtime Error):
n=int(input())
k=int(input())
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[k].lower()
elif k == 0:
    r=s[0:(k-1)].lower() + s[k]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k]
print(r)

Fixed submission:
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[n-1].lower()
elif k == 1:
    r=s[0].lower() + s[1:n]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k:n]
print(r)
Buggy python submission (verdict: Runtime Error):
r=0
if n < k:
    for i in range(1, n+1):
        r=r+(1/n)*0.5**math.ceil(math.log2(k/i))
    print(r)
else:
    r=1-(k/n)
    for i in range(1, k+1):
        r=r+(1/n)*0.5**math.ceil(math.log2(k/i))
    print(r)

Fixed submission:
import math
n, k = map(int, input().split())
r=0
if n < k:
    for i in range(1, n+1):
        r=r+(1/n)*0.5**math.ceil(math.log2(k/i))
    print(r)
else:
    r=1-(k/n)
    for i in range(1, k+1):
        r=r+(1/n)*0.5**math.ceil(math.log2(k/i))
    print(r)
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=map(int, input().split())
c=map(int, input().split())

vc=[v[i]-c[i] for i in range(n) if (v[i]-c[i]) > 0]
print(sum(vc))

Fixed submission:
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
vc=[(v[i]-c[i]) for i in range(n) if (v[i]-c[i]) > 0]
print(sum(vc))
Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == '__main__':
    n, k = map(int, input().split())
    h = list(map(int, input().split()))

    dp = [float('inf') for _ in range(10**5 + 1000)]

    dp[0] = 0
    for i in range(n):
        for j in range(1, k + 1):
            if i + j < len(h):
                dp[i + j] = min(dp[i] + abs(h[i] - h[i + j]), dp[i + j])

    print(dp[n - 1])


Fixed submission:
if __name__ == '__main__':
    n, k = map(int, input().split())
    h = list(map(int, input().split()))

    dp = [float('inf') for _ in range(10**5 + 1000)]

    dp[0] = 0
    for i in range(n):
        for j in range(1, k + 1):
            if i + j < len(h):
                dp[i + j] = min(dp[i] + abs(h[i] - h[i + j]), dp[i + j])

    print(dp[n - 1])
Buggy python submission (verdict: Runtime Error):
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1]-1):
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Buggy python submission (verdict: Runtime Error):
miu = input().split()
sella = input()

for x in range(0, int(miu[0]):
	if x == int(miu[1]):
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Buggy python submission (verdict: Runtime Error):
miu = input().split()
sella = input()

for x in sella:
	if x == int(miu[1]):
		print(x.lower(), end='')
    else:
		print(x, end='')

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Buggy python submission (verdict: Runtime Error):
miu = input().split()
sella = input()
 
for x in sella:
	if x == int(miu[1]):
		print(x.lower(), end='')
    else:
		print(x, end='')

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Buggy python submission (verdict: Runtime Error):
miu = input().split()[1]
sella = input()
 
sella[int(miu)-1] = sella[int(miu)-1].lower()
 
print(sella)

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Buggy python submission (verdict: Runtime Error):
miu = input().split()[1]
sella = input()

sella[int(miu)+1].lower()

print(sella)

Fixed submission:
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')
Buggy python submission (verdict: Runtime Error):
import math

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

gcd_l = [0]
gcd_r = [0]

for i in range(N):
    gcd_l.append(math.gcd(gcd_l[i], A[i]))
    gcd_r.append(math.gcd(gcd_r[i], A[-(i+1)]))
gcd_r = gcd_r[::-1]

ans = []
for i in range(N):
    ans.append(math.gcd(gcd_l[i], gcd_r[i+1]))
print(ans)

Fixed submission:
A, B, T = map(int, input().split())
ans = 0
t = 0
while t <= T - A:
    ans += B
    t += A
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

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

gcd_l = [0]
gcd_r = [0]

for i in range(N):
    gcd_l.append(math.gcd(gcd_l[i], A[i]))
    gcd_r.append(math.gcd(gcd_r[i], A[-(i+1)]))
gcd_r = gcd_r[::-1]

ans = []
for i in range(N):
    ans.append(math.gcd(gcd_l[i], gcd_r[i+1]))
print(max(ans))

Fixed submission:
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
#print(N, V, C)
ans = 0
for i in range(N):
    if V[i] - C[i] > 0:
        ans += V[i] - C[i]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = (int(i) for i in input().split())
S = input()
l = []
r = []
for i in range(Q):
    a, b = (int(i) for i in input().split())
    l.append(a)
    r.append(b)

#print(N, Q, l, r)
#print(S)

for i in range(Q):
    pre_str = S[l[i]-1:r[i]]
    print(pre_str.count('AC'))

Fixed submission:
N, Q = (int(i) for i in input().split())
S = input()
l = []
r = []
for i in range(Q):
    a, b = (int(i) for i in input().split())
    l.append(a)
    r.append(b)

t = [0] * (N+1)
for i in range(N):
    #pre_str = S[l[i]-1:r[i]]
    #print(pre_str.count('AC'))
    t[i+1] = t[i] + (1 if S[i:i+2] == 'AC' else 0)

for i in range(Q):
    print(t[r[i]-1] - t[l[i]-1])
Buggy python submission (verdict: Runtime Error):
edu
cat
ion

Fixed submission:
A = input()
B = input()
C = input()

print(A[0] + B[1] + C[2])
Buggy python submission (verdict: Runtime Error):
K = int(input())
A = [int(i) for i in input().split()]

Max, Min = 0, 0
error = -1

def N_max(a, Max, Min):
    if Max > a and Min%a != 0:
        return a*(Min//a + 2) - 1
    elif Max > a and Min%a == 0:
        return a*(Min//a + 1) - 1
    else:
        return a*2 -1
        
def N_min(a, m):
    if m > a:
        return a*(m//a + 1)
    else:
        return a

for i in range(K)[::-1]:

    if A[-1] == 2:
        if i == 0:                      #最後の処理
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)
            print(Min, Max)
            break
        
        elif A[i-1]/A[i] < 2:          #次の値が2倍以下（最後以外）
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)

        else:
            print(error)
            break
 
    else:
        print(error)
        break


Fixed submission:
N, A, B = [int(i) for i in input().split()]
print("Alice") if (A-B)%2 == 0 else print("Borys")
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())
a, b, c = -1, -1, -1

if Y >= 2000 * 10000:
    ZN = 1
    YN = 1
    XN = 2000
else:
    ZN = min(N, Y//1000)
    YN = min(N, Y//5000)
    XN = min(N, Y//10000)
    
for z in range(ZN + 1):
    for y in range(YN + 1):
        for x in range(XN + 1):
            if x + y + z == N and 1000*z + 5000*y + 10000*x == Y:
                a, b, c = x, y, z
                break

print(a, b, c)


Fixed submission:
S = input()

ans = "2018" + S[4:]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, Y = map(int, input().split())
a, b, c = -1, -1, -1

if Y >= 2000 * 10000:
    ZN = 1
    YN = 1
    XN = 2000
else:
    ZN = min(N, Y//1000)
    YN = min(N, Y//5000)
    XN = min(N, Y//10000)
    
for z in range(ZN + 1):
    for y in range(YN + 1):
        for x in range(XN + 1):
            if x + y + z == N and 1000*z + 5000*y + 10000*x == Y:
                a, b, c = x, y, z
                break

print(a, b, c)


Fixed submission:
N, Y = map(int, input().split())
ans = []
for x in range(N+1):
    for y in range(N+1):
        z = N - x - y
        if (x * 10000) + (y * 5000) + (z * 1000) == Y and x + y + z == N and z >= 0:
            ans.append([x, y, z])

if len(ans) == 0:
    print(-1, -1, -1)
else:
    print(ans[0][0], ans[0][1],ans[0][2])
Buggy python submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())

tmp_c = 0

for a in range(0, F+1, A*100):
    for b in range(0, F+1, B*100):
        for c in range(0, int(F/100 * E) + 1, C):
            for d in range(0, int(F/100 * E) + 1, D):
                w = a + b
                s = c + d
                if s == 0:
                    concentration = 0
                else:
                    concentration = s / (w + s)
                    
                if concentration <= E / (100 + E) and concentration > tmp_c and w + s <= F:
                    ans_sw = s+w
                    ans_s = s
                    tmp_c = concentration

print(ans_sw, ans_s)                


Fixed submission:
A, B, C, D, E, F = map(int, input().split())

max_c = 0
ans_sw = A*100
ans_s = 0

water = set()
for a in range(0, F + 1, A * 100):
    for b in range(0, F - a + 1, B * 100):
        water.add(a + b)

suger = set()
for c in range(0, F + 1, C):
    for d in range(0, F - c + 1, D):
        suger.add(c + d)

for w in water:
    for s in suger:
        
        if s <= E * w // 100 and 0 < w + s <= F:
            c = s / (w + s)
            if max_c < c:
                max_c = c
                ans_sw = s + w
                ans_s = s

print(ans_sw, ans_s)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
ans = []

def digits(n):
    count = 1
    while n // 10 != 0:
        n = n // 10
        count += 1
    return count

for a in range(1, int(math.sqrt(N))):
    if N % a == 0:
        b = N // a
        ans.append(max(digits(a), digits(b)))

print(min(ans))

Fixed submission:
import math
N = int(input())
ans = []

def digits(n):
    count = 1
    while n // 10 != 0:
        n = n // 10
        count += 1
    return count

for a in range(1, int(math.sqrt(N)) + 1):
    if N % a == 0:
        b = N // a
        ans.append(max(digits(a), digits(b)))

print(min(ans))
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):
        z = S - x - y
        if 0 <= z and z <= K:
            count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split(" "))     # マス数、呪文回数
s = input()   # マス文字
g_list = []
for i in range(len(s)):
    g_list.append([s[i], 1])
s_list = {}
for i in range(len(s)):
    s_list.setdefault(s[i], []).append(i)
sum = len(s)

# 動かす
def move(d, str):
    i = g_list[str][1]
    g_list[str][1] = 0
    if d == "L":
        if str == 0:
            sum -= i
            return
        g_list[str-1][1] += i
    else:
        if str == N-1:
            sum -= i
            return
        g_list[str+1][1] += i
    # print(g_list)


for i in range(Q):
    t, d = list(input().split(" "))
    for str in s_list[t]:
        print(str)
        if g_list[str][0] == t:
            move(d, str)
        else:
            continue



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

if a == b and c == a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for _ in range(n)]

start = 0
end = 0
flg = False
c = 0
for x in s:
    if 'AB' in x:
        c += 1
    if x.startswith('B'):
        start += 1
        if x.endswith('A'):
            flg = True
    if x.endswith('A'):
        end += 1
if start = end:
    c += start
    if flg:
        c  -= 1
else if start > end:
    c += end
else:
    c += start
print(c)

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]

start = 0
end = 0
same = 0
c = 0
for x in s:
    c = c + len(x.split('AB')) - 1
    if x.startswith('B'):
        start += 1
        if x.endswith('A'):
            same += 1
    if x.endswith('A'):
        end += 1

if start == end:
    c += start
    if same > 0 and same == start:
        c  -= 1
elif start > end:
    c += end
else:
    c += start
print(c)
Buggy python submission (verdict: Runtime Error):
i = int(input())
str = input()
r_count = 0

for color in str:
    if color == 'R':
        r_count+=1

if r_count * 2 > i:
    print('Yes')
else:
    print('No')

Fixed submission:
print('Yes') if len(set(input().split(' '))) == 1 else print('No')
Buggy python submission (verdict: Runtime Error):
ls = input().split()
s = list(input())

n = int(ls[0])
k = int(ls[1])

if s[k] == 'A':
  s[k] == 'a'
elif s[k] == 'B':
  s[k] == 'b'
elif s[k] == 'C':
  s[k] == 'c'
  
print(''.join(s))

Fixed submission:
ls = input().split()
s = list(input())
 
n = int(ls[0])
k = int(ls[1]) - 1
 
if s[k] == 'A':
  s[k] = 'a'
elif s[k] == 'B':
  s[k] = 'b'
elif s[k] == 'C':
  s[k] = 'c'
  
print(''.join(s))
Buggy python submission (verdict: Runtime Error):
 n = input()
  
if n == 'A':
  print('T')
elif n == 'T':
  print('A')
elif n == 'G':
  print('C')
else:
  print('G')

Fixed submission:
n = input()
  
if n == 'A':
  print('T')
elif n == 'T':
  print('A')
elif n == 'G':
  print('C')
else:
  print('G')
Buggy python submission (verdict: Runtime Error):
n = input()

ls = []
isnAGCT = False
cnt = 0
for i in range(len(n)):
  if n[i] == 'A' or n[i] == 'G' or n[i] == 'C' or n[i] == 'T':
    cnt += 1
    ls.append(cnt)
  else:
    cnt = 0
    
print(max(ls))

Fixed submission:
n = input()

ls = []
cnt = 0
for i in range(len(n)):
  if n[i] == 'A' or n[i] == 'G' or n[i] == 'C' or n[i] == 'T':
    cnt += 1
    ls.append(cnt)
  else:
    cnt = 0
    ls.append(cnt)
    
print(max(ls))
Buggy python submission (verdict: Runtime Error):
T, X = map(int, input().split(''))

print(T/X)

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

print(T/X)

Buggy python submission (verdict: Runtime Error):
T, X = map(input().split(''))

print(T/X)

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

print(T/X)

Buggy python submission (verdict: Runtime Error):
X, T = map(input().split())

R = X/T

print(R)

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

print(T/X)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(input().split()))

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if lm < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if lm < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if lm < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

l.sort(reverse = True)

lm = l[0]

del l[0]

if lm < sum(l):
  print('Yes')
else:
  print('No')

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

l.sort(reverse=true)

lm = l[0]
del l[0]

if lm < sum(l):
  print('Yes')
else:
  print('No')

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import math
n, k = map(int, input().split())
data = list(map(int, input().split()))
print(math.ceil((n-1)/(k-1)))


Fixed submission:
s = input()
ans = 0
for i in s:
    if i == '+':
        ans += 1
    else:
        ans -= 1
print(ans)
Buggy python submission (verdict: Runtime Error):
tower = [0]

for i in range(1, 15):
    tower.append(tower[i-1]+i)
a, b = map(int, input().split())
t = tower[b - a]
print(t - b)


Fixed submission:
tower = [0]

for i in range(1, 1000):
    tower.append(tower[i-1]+i)

a, b = map(int, input().split())
t = tower[b - a]
print(t - b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().split()))
sx = sorted(x)

min_mid = sx[int(n/2-1)]
max_mid = sx[int(n/2)]

for i in x:
    if i <= min_mid:    # 左半分から取られてる時
        print(max_mid)
    else:               # 右半分から取られてる時
        print(min_mid)


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

if x >= a and x <= a+b:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(str, input().split()))
sx = sorted(x)

max_mid = sx[int(n/2)]
min_mid = sx[int(n/2-1)]

for i in x:
    if i <= min_mid:    # 左半分から取られてる時
        print(max_mid)
    else:               # 右半分から取られてる時
        print(min_mid)


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

if x >= a and x <= a+b:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(str, input().split()))
sx = sorted(x)

max_mid = sx[int(n/2)+1]
min_mid = sx[int(n/2)]

for i in x:
    if i <= min_mid:    # 左半分から取られてる時
        print(max_mid)
    else:               # 右半分から取られてる時
        print(min_mid)


Fixed submission:
n = int(input())
x = list(map(int, input().split()))
sx = sorted(x)

min_mid = sx[int(n/2-1)]
max_mid = sx[int(n/2)]

for i in x:
    if i <= min_mid:    # 左半分から取られてる時
        print(max_mid)
    else:               # 右半分から取られてる時
        print(min_mid)

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

for i in range(len(x)):
    tmp_list = x.copy()
    tmp_list.pop(i)
    tmp_list.sort()
    print(tmp_list[int(n/2-1)])


Fixed submission:
n = int(input())
x = list(map(int, input().split()))
sx = sorted(x)

min_mid = sx[int(n/2-1)]
max_mid = sx[int(n/2)]

for i in x:
    if i <= min_mid:    # 左半分から取られてる時
        print(max_mid)
    else:               # 右半分から取られてる時
        print(min_mid)