Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1, n, 1):
        a = l[i]
        b = l[j]
        ab = a + b
        f = 0
        for k in range(j+1, n, 1):
            if l[k] < ab:
                res += 1
                f = 1
            else:
                break
        if f == 0:
            continue
print(res)

Fixed submission:
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1,n):
        ab = l[i] + l[j]
        c_index = bisect_left(l, ab)
        res += c_index - j - 1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1, n, 1):
        a = l[i]
        b = l[j]
        ab = a + b
        for k in range(j+1, n, 1):
            if l[k] < ab:
                res += 1
            else:
                break
print(res)

Fixed submission:
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1,n):
        ab = l[i] + l[j]
        c_index = bisect_left(l, ab)
        res += c_index - j - 1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
res = 0
for i in range(n):
    for j in range(i+1, n, 1):
        for k in range(j+1, n, 1):
            a = l[i]
            b = l[j]
            c = l[k]
            if a < b + c and b < a + c and c < a + b:
                res += 1
print(res)

Fixed submission:
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1,n):
        ab = l[i] + l[j]
        c_index = bisect_left(l, ab)
        res += c_index - j - 1
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
res = 0
for i in range(n):
    for j in range(i+1, n, 1):
        for k in range(j+1, n, 1):
            a = l[i]
            b = l[j]
            c = l[k]
            if a < b + c and b < a + c and c < a + b:
                res += 1
print(res)

Fixed submission:
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
res = 0
for i in range(n):
    for j in range(i+1,n):
        ab = l[i] + l[j]
        c_index = bisect_left(l, ab)
        res += c_index - j - 1
print(res)
Buggy python submission (verdict: Runtime Error):
import numpy as np
N, M = map(int, input().split())
A = np.array(np.log2(sorted(list(map(int, input().split())), reverse=True)).astype(np.float64))
#print(A)
while True:
    A_m = np.where(A >= int(A[0]))
    if len(A_m[0]) <= M:
        A[A_m] -= 1.
        A = np.sort(A)[::-1]
        M -= len(A_m[0])
        #print(A, M)
    else:
        A[:M] -= 1.
        break
    if A[0] < 0:
        break
#print(A)
A = (2 ** A).astype(np.int64)
#print(A)
print(np.sum(A))

Fixed submission:
import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]
heapq.heapify(A)
for i in range(M):
    a = -int(heapq.heappop(A) / 2)
    heapq.heappush(A, -a)
print(-sum(A))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
for i in range(M):
    A[0] = int(A[0] / 2)
    A = sorted(A, reverse=True)
print(sum(A))

Fixed submission:
import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]
heapq.heapify(A)
for i in range(M):
    a = -int(heapq.heappop(A) / 2)
    heapq.heappush(A, -a)
print(-sum(A))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
res = 0
for i in range(n):
    res += i
print(res)

Fixed submission:
n = int(input())
print((n*(n-1)//2))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
res = 0
for i in range(1, n, 1):
    res += i
print(res)

Fixed submission:
n = int(input())
print((n*(n-1)//2))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
res = 0
for i in range(1, n, 1):
    res += i
print(res)

Fixed submission:
n = int(input())
print((n*(n-1)//2))
Buggy python submission (verdict: Runtime Error):
#B
import numpy as np
import sys

n = int(input())
p = np.array(list(map(int, input().split())))
p_s = np.array(sort(p))

if all(p==p_s):
    print("YES")
else:
    diff = p_s - p
    diff_index = np.where(diff!=0)
    #print(diff_index[0][1])
    if len(diff_index[0]) != 2:
        print("NO")
    else:
        p0 = p[diff_index[0][0]]
        p[diff_index[0][0]] = p[diff_index[0][1]]
        p[diff_index[0][1]] = p0
        if all(p == p_s):
            print("YES")
        else:
            print("NO")  

Fixed submission:
import numpy as np
import sys

n = int(input())
p = np.array(list(map(int, input().split())))
p_s = np.array(sorted(p))

if all(p==p_s):
    print("YES")
else:
    diff = p_s - p
    diff_index = np.where(diff!=0)
    #print(diff_index[0][1])
    if len(diff_index[0]) != 2:
        print("NO")
    else:
        p0 = p[diff_index[0][0]]
        p[diff_index[0][0]] = p[diff_index[0][1]]
        p[diff_index[0][1]] = p0
        if all(p == p_s):
            print("YES")
        else:
            print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
l, r = map(int, input().split())

m = 2019
mod_min = m

for j in range(l,r+1,1):
    #j_ = j % m
    #if j_ == 0:
        #break
    for i in range(l,j,1):
        #i_ = i % m
        i_j = (i * j) % m
        
        if i_j < mod_min:
            mod_min = i_j
            
        if i_j == 0:
            break
            
print(mod_min)

Fixed submission:
l, r = map(int, input().split())

m = 2019
mod_min = m

is_return = False

for j in range(l,r+1,1):
    #j_ = j % m
    #if j_ == 0:
        #break
        
    if is_return:
        break
    for i in range(l,j,1):
        #i_ = i % m
        i_j = (i * j) % m
        
        if i_j < mod_min:
            mod_min = i_j
            
        if i_j == 0:
            is_return = True
            break
            
print(mod_min)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

l, r = map(int, input().split())

m = 2019
mod_min = []

input_list = [i for i in range(l,r+1,1)]
input_list = np.asarray(input_list)

input_list = input_list % 2019
#print(input_list)

for i in range(len(input_list)):
    for j in range(len(input_list)-1, i, -1):
        mod_min.append((input_list[i] * input_list[j]) % m)

#print(mod_min)
print(np.asarray(mod_min).min())

Fixed submission:
l, r = map(int, input().split())

m = 2019
mod_min = m

is_return = False

for j in range(l,r+1,1):
    #j_ = j % m
    #if j_ == 0:
        #break
        
    if is_return:
        break
    for i in range(l,j,1):
        #i_ = i % m
        i_j = (i * j) % m
        
        if i_j < mod_min:
            mod_min = i_j
            
        if i_j == 0:
            is_return = True
            break
            
print(mod_min)

Buggy python submission (verdict: Time Limit Exceeded):

l, r = map(int, input().split())

m = 2019
mod_min = m

for j in range(l,r+1,1):
    j_ = j % m
    for i in range(l,j,1):
        i_ = i % m
        i_j = (i_ * j_) % m
        
        if i_j < mod_min:
            mod_min = i_j
            
print(mod_min)

Fixed submission:
l, r = map(int, input().split())

m = 2019
mod_min = m

is_return = False

for j in range(l,r+1,1):
    #j_ = j % m
    #if j_ == 0:
        #break
        
    if is_return:
        break
    for i in range(l,j,1):
        #i_ = i % m
        i_j = (i * j) % m
        
        if i_j < mod_min:
            mod_min = i_j
            
        if i_j == 0:
            is_return = True
            break
            
print(mod_min)
Buggy python submission (verdict: Runtime Error):
import numpy as np
from numpy.linalg import solve

n = int(input())
a = list(map(int, input().split()))

right = np.asarray(a)*2
left = np.zeros([n,n])
for i in range(n):
    if i != n-1:
        left[i,i:i+2] = 1
    else:
        left[i,0] = 1
        left[i,i] = 1
        
out = list(map(int, solve(left, right)))
print(" ".join(map(str, out)))

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

s = sum(a)
b = [a[i] for i in range(n) if i % 2 == 1]
x1 = s - 2 * sum(b)
x = []
x.append(x1)
xi = x1
for i in range(0, n-1, 1):
    #print(a[i])
    xi_1 = 2 * a[i] - xi
    x.append(xi_1)
    #print(xi_1)
    xi = xi_1
    
print(" ".join(map(str, x)))

Buggy python submission (verdict: Runtime Error):
import numpy as np
from numpy.linalg import solve

n = int(input())
a = list(map(int, input().split()))

right = np.asarray(a)*2
left = np.zeros([n,n])
for i,_ in enumerate(a):
    if i != n-1:
        left[i,i:i+2] = 1
    else:
        left[i,0] = 1
        left[i,i] = 1
        
out = list(map(int, solve(left, right)))
print(" ".join(map(str, out)))

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

s = sum(a)
b = [a[i] for i in range(n) if i % 2 == 1]
x1 = s - 2 * sum(b)
x = []
x.append(x1)
xi = x1
for i in range(0, n-1, 1):
    #print(a[i])
    xi_1 = 2 * a[i] - xi
    x.append(xi_1)
    #print(xi_1)
    xi = xi_1
    
print(" ".join(map(str, x)))

Buggy python submission (verdict: Runtime Error):

n = int(input())
a = list(map(int, input().split()))

right = np.asarray(a)*2
left = np.zeros([n,n])
for i,_ in enumerate(a):
    if i != n-1:
        left[i,i:i+2] = 1
    else:
        left[i,0] = 1
        left[i,i] = 1
        
out = list(map(int, solve(left, right)))
print(" ".join(map(str, out)))

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

s = sum(a)
b = [a[i] for i in range(n) if i % 2 == 1]
x1 = s - 2 * sum(b)
x = []
x.append(x1)
xi = x1
for i in range(0, n-1, 1):
    #print(a[i])
    xi_1 = 2 * a[i] - xi
    x.append(xi_1)
    #print(xi_1)
    xi = xi_1
    
print(" ".join(map(str, x)))
Buggy python submission (verdict: Runtime Error):
str = input()

char_count = 1
for i in range(3):
    if str[0] == str[i+1]:
        char_count += 1
    else:
        char2 = i+1
        char2_count = 0
        
if char_count == 2:
    for char in str:
        if str[char2] == char:
            char2_count += 1
            
    if char2_count == 2:
        print("Yes")
        
    else:
        print("No")
        
else:
    ("No")
    
    
print(char_count, char2_count)

Fixed submission:
str = input()

chars = {}
for char in str:
    if char in chars:
        chars[char] += 1
    else:
        chars[char] = 1
        
if len(chars) == 2 and chars[str[0]] == 2:
    print("Yes")
    
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
from collections import deque
 
qx = deque([])
qy = deque([])
 
nowx = 0
nowy = 0
tmpx = 0
tmpy = 0
 
ans = -1
cnt = 1
m = []
 
sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]
 
qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0
 
while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)
 
ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)
 
from collections import deque

qx = deque([])
qy = deque([])

nowx = 0
nowy = 0
tmpx = 0
tmpy = 0

ans = 0
cnt = 1
m = []

sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]

qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0

while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)

if(ans == -1):
    ans2 = -1
else:
    ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)


Fixed submission:
from collections import deque

qx = deque([])
qy = deque([])

nowx = 0
nowy = 0
tmpx = 0
tmpy = 0

ans = -1
ans2 = 0
cnt = 1
m = []

sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]

qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0

while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)

if(ans == -1):
    ans2 = -1
else:
    ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)
Buggy python submission (verdict: Runtime Error):
NMXY =  list(int(i) for i in input().split())
xy =  [[int(i) for i in input().split()] for i in range(NMAB[1])]

x = xy[0]
x.append(NMXY[2])
y = xy[1]
y.append(NMXY[3])
print(max(x))
print(min(y))
if max(x) < min(y):
    print('No War')
else:
    print('War')


Fixed submission:

NMXY =  list(int(i) for i in input().split())
x =  list(int(i) for i in input().split())
y =  list(int(i) for i in input().split())

x.append(NMXY[2])

y.append(NMXY[3])

if max(x) < min(y):
    print('No War')
else:
    print('War')

Buggy python submission (verdict: Runtime Error):

NMAB =  list(int(i) for i in input().split())
xy =  [[int(i) for i in input().split()] for i in range(NMAB[1])]

x = xy[0]
x.append(NMXY[2])
y = xy[1]
y.append(NMXY[3])
print(max(x))
print(min(y))
if max(x) < min(y):
    print('No War')
else:
    print('War')


Fixed submission:

NMXY =  list(int(i) for i in input().split())
x =  list(int(i) for i in input().split())
y =  list(int(i) for i in input().split())

x.append(NMXY[2])

y.append(NMXY[3])

if max(x) < min(y):
    print('No War')
else:
    print('War')
Buggy python submission (verdict: Runtime Error):

A = int(input())
B = int(input())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Fixed submission:

AB =  list(int(i) for i in input().split())

if AB[0] <= 8 and AB[1] <= 8:
    print("Yay!")
else:
    print(":(")

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")


Fixed submission:

AB =  list(int(i) for i in input().split())

if AB[0] <= 8 and AB[1] <= 8:
    print("Yay!")
else:
    print(":(")

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")


Fixed submission:

AB =  list(int(i) for i in input().split())

if AB[0] <= 8 and AB[1] <= 8:
    print("Yay!")
else:
    print(":(")
Buggy python submission (verdict: Runtime Error):

NX = list(int(i) for i in input().split())
for i in range(NX[0]):
     m.append(int(input()))

weight0 = 0
for i in range(NX[0]):
    weight0 += m[i]
rest = NX[1] - weight0
minimumfood = min(m)
ans = int(rest/minimumfood) + NX[0]
print(ans)


Fixed submission:

m = []
NX = list(int(i) for i in input().split())
for i in range(NX[0]):
     m.append(int(input()))

weight0 = 0
for i in range(NX[0]):
    weight0 += m[i]
rest = NX[1] - weight0
minimumfood = min(m)
ans = int(rest/minimumfood) + NX[0]
print(ans)
Buggy python submission (verdict: Runtime Error):
SS = int(input())
S = (list(SS))
if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")

Fixed submission:
SS = input()
S = (list(SS))
if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")

Buggy python submission (verdict: Runtime Error):
SS = int(input())
"""
SS= "cba"
"""
print(list(S))

if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")

Fixed submission:
SS = input()
S = (list(SS))
if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(input())
    
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)


Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
train = [A,  B]
bus = [C, D]
ans = min(train) + min(bus)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(input())


ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)


Fixed submission:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.apend(input())
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)


Fixed submission:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     a.apend(input())
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)


Fixed submission:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(int(i) for i input().split())
b = list(int(i) for i input().split())

ans = 0
for n in range(N+1):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())

ans = 0
for i in range (a+1):
    for j in range (b+1):
        for k in range (c+1):
            if 500*i+100*j+50*k == x:
                ans += 1
print(ans)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)

Buggy python submission (verdict: Runtime Error):
x = input()
a = input()
b = input()

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(int(i) for i input().split())
b = list(int(i) for i input().split())

ans = 0
for n in range(N):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

Fixed submission:
N = int(input())
a = list(int(i) for i in input().split())
b = list(int(i) for i in input().split())

ans = 0
for n in range(N+1):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(input().space())
b = list(input.space())

ans = 0
for n in range(N):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)


Fixed submission:
N = int(input())
a = list(int(i) for i in input().split())
b = list(int(i) for i in input().split())

ans = 0
for n in range(N+1):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)
Buggy python submission (verdict: Runtime Error):
alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
nalp = []
n = int(input())
str = input()
chars = list(str)

for i in range(len(chars)):
  num = alp.index(chars[i])
  if n+num>26:
      num -= 26
  nalp.append(alp[n+num])

mojiretu = ' '
 
for x in nalp:
    mojiretu += x
print(mojiretu)


Fixed submission:
alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
nalp = []
n = int(input())
str = input()
chars = list(str)

for i in range(len(chars)):
  num = alp.index(chars[i])
  if n+num>=26:
      num -= 26
  nalp.append(alp[n+num])

mojiretu = ''
 
for x in nalp:
    mojiretu += x
print(mojiretu)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = [int(i) for i in input().split()]
num = []
for i in range(len(h)):
  num += [h.index(i+1)+1]
print(*num, sep=" ")

Fixed submission:
n = int(input())
h = [int(i) for i in input().split()]
num = [0 for i in range(n)]
for i in range(len(h)):
  num[h[i]-1] = i+1
print(' '.join(map(str, num)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = [int(i) for i in input().split()]
num = []
for i in range(len(h)):
  num.append(h.index(i+1)+1)
print(*num, sep=" ")


Fixed submission:
n = int(input())
h = [int(i) for i in input().split()]
num = [0 for i in range(n)]
for i in range(len(h)):
  num[h[i]-1] = i+1
print(' '.join(map(str, num)))