Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
print([x+y+z == S for x in range(K+1) for y in range(K+1)
       for z in range(K+1)].count(True))


Fixed submission:
K, S = map(int, input().split())
print([0 <= S - x - y <= K for x in range(K+1)
       for y in range(K+1)].count(True))
Buggy python submission (verdict: Runtime Error):
S = input()

list = ["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"]

s_index = list.index(S)

print(list[s_index+1])

Fixed submission:
S = input()
 
list = ["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"]
 
s_index = list.index(S)
 
print(list[s_index+1])
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations,combinations_with_replacement

N = int(input())

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

comb_list = list(combinations(L,3))

ans = 0

for i in range(len(comb_list)):

	a, b, c = comb_list[i]
	if (a < b + c) and (b < a + c) and (c < a + b):
		ans += 1

print(ans)

Fixed submission:
def findnumberofTriangles(arr): 
  
    n = len(arr) 
    arr.sort() 
    count = 0
  
    for i in range(0,n-2): 
   
        k = i + 2
  
        for j in range(i+1,n): 
  
            while (k < n and arr[i] + arr[j] > arr[k]): 
                k += 1
            if(k>j): 
                count += k - j - 1
  
    return count 

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

print(findnumberofTriangles(L))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
S = input()
 
dp = [[0] * 5005 for _ in range(5005)]
 
for i in range(N-1, 0, -1):
  for j in range(N-1, 0, -1):
    if S[i] != S[j]:
      dp[i][j] = 0
    else:
      dp[i][j] = dp[i+1][j+1] + 1
      
ans = 0
for i in range(N):
  for j in range(N):
    if i >= j:
      continue
    now = min(dp[i][j], j-i)
    ans = max(ans, now)
    
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
N = int(input())
S = input()
 
dp = [[0] * 5005 for _ in range(5005)]
 
for i in range(N-1, -1, -1):
  for j in range(N-1, -1, -1):
    if S[i] != S[j]:
      dp[i][j] = 0
    else:
      dp[i][j] = dp[i+1][j+1] + 1
      
ans = 0
for i in range(N):
  for j in range(N):
    if i >= j:
      continue
    now = min(dp[i][j], j-i)
    ans = max(ans, now)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
S = input()

dp = [[0] * 5005 for _ in range(5005)]

for i in range(N-1, 0, -1):
  for j in range(N-1, 0, -1):
    if S[i] != S[j]:
      dp[i][j] = 0
    else:
      dp[i][j] = dp[i+1][j+1] + 1
      
ans = 0
for i in range(N):
  for j in range(N):
    if i >= j:
      continue
    now = min(dp[i][j], j-i)
    ans = max(ans, now)
    
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
N = int(input())
S = input()
 
dp = [[0] * 5005 for _ in range(5005)]
 
for i in range(N-1, -1, -1):
  for j in range(N-1, -1, -1):
    if S[i] != S[j]:
      dp[i][j] = 0
    else:
      dp[i][j] = dp[i+1][j+1] + 1
      
ans = 0
for i in range(N):
  for j in range(N):
    if i >= j:
      continue
    now = min(dp[i][j], j-i)
    ans = max(ans, now)
    
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()

print(n * n * n)

Fixed submission:
n = int(input())

print(n * n * n)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
import numpy as np

N, K = map(int, input().split())
S = np.array(list(input()), dtype='U1')

S_slide = S[1:]
S_2 = S[:-1]

happiness = np.count_nonzero(S_slide == S_2)
happiness += 2*K

happiness = min(happiness, N-1)

print(happiness)

Fixed submission:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
import numpy as np
 
N, K = map(int, input().split())
S = np.array(list(input()), dtype='U1')
 
S_slide = S[1:]
S_2 = S[:-1]
 
happiness = np.count_nonzero(S_slide == S_2)
happiness += 2*K
 
happiness = min(happiness, N-1)
 
print(happiness)
Buggy python submission (verdict: Runtime Error):
ans = 0

for i in range(len(s)):
    if s[i] == t[i]:
        ans+=1

print(ans)

Fixed submission:
s = input()
t = input()

ans = 0

for i in range(len(s)):
    if s[i] == t[i]:
        ans+=1

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

ans_tmp = (B-1)/(A-1)

if ans_tmp > 1 and ans_tmp < 2:
    print(int(ans_tmp) + 1)
elif ans_tmp < 1:
    print(1)
else:
    print(int(ans_tmp))

Fixed submission:
A, B = map(int, input().split())

ans = 0
outlet = 1

while outlet < B:
  outlet += A - 1
  ans += 1
  
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))

ans = [0] * (n-1)

for i in range(n-1):
    for j in range(i,n-1):
        if h[j] >= h[j+1]:
            ans[i] += 1
        else:
            break           

print(max(ans))

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
t = 0
result = 0
for i in range(n - 1):
  if h[i + 1] <= h[i]:
    t += 1
  else:
    result = max(t, result)
    t = 0
result = max(t, result)
print(result)
Buggy python submission (verdict: Runtime Error):
N = int(input())
list_a = [i for i in input()]
 
gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))

Fixed submission:
N = int(input())
list_a = list(map(int, input().split())) 
 
gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))

Buggy python submission (verdict: Runtime Error):
N = int(input())
list_a = [[i for i in input()] for _ in range(N)]

gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))

Fixed submission:
N = int(input())
list_a = list(map(int, input().split())) 
 
gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)
n, q = map(int, input().split())

trees = [[] for i in range(n)]
for i in range(n-1):
  a, b = map(int, input().split())
  trees[a-1].append(b-1)
  
values = [0 for i in range(n)]

for i in range(q):
  p, x = map(int, input().split())
  values[p-1] += x
  
def dfs(i):
  for j in trees[i]:
    values[j] += values[i]
    dfs(j)
    
dfs(0)
print(*values)

Fixed submission:
n,q=map(int,input().split())
T=[[] for _ in range(n)]
for i in range(n-1):
    a,b=map(int,input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)
C=[0]*n
for i in range(q):
    p,x=map(int,input().split())
    C[p-1]+=x
S=[0]
P=[0]*n
while S:
    s=S.pop()
    for t in T[s]:
        if t==P[s]:
            continue
        P[t]=s
        S.append(t)
        C[t]+=C[s]
print(' '.join(map(str,C)))

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

trees = [[] for i in range(n)]

for i in range(n-1):
    a, b = map(int, input().split())
    trees[a-1].append(b-1)

#print("trees: ", trees)    
    
values = [0 for i in range(n)]
for i in range(q):
    p, x = map(int, input().split())
    values[p-1] += x

#print("values: ", values)

def dfs(i):
    for j in trees[i]:
        values[j] += values[i]
        #print("values",i , j, values)
        dfs(j)

dfs(0)
print(*values)

Fixed submission:
n,q=map(int,input().split())
T=[[] for _ in range(n)]
for i in range(n-1):
    a,b=map(int,input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)
C=[0]*n
for i in range(q):
    p,x=map(int,input().split())
    C[p-1]+=x
S=[0]
P=[0]*n
while S:
    s=S.pop()
    for t in T[s]:
        if t==P[s]:
            continue
        P[t]=s
        S.append(t)
        C[t]+=C[s]
print(' '.join(map(str,C)))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
s = input()
t = input()
for c in set(t):
  if s.find(c) == -1:
    print(-1)
    sys.exit()
p = 0
slen = len(s)
for i in range(1, 10 ** 5 + 1):
  for j in range(slen):
    if s[j] == t[p]:
      p += 1
      if p == len(t):
        print((i - 1) * slen + j + 1)
        sys.exit()

Fixed submission:
s=input()
t=input()
ans=0
s1=s
ans=0
flag=1
for i in t:
    if i not in s1:
        flag=0
if flag==0:
    print(-1)
else:
    for i in t:
        if i in s1:
            ans+=s1.index(i)+1
            s1=s1[s1.index(i)+1:]
        else:
            ans = ((ans+len(s)-1)//len(s))*len(s) 
            ans+=s.index(i)+1   
            s1=s[s.index(i)+1:]
    print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

print(np.max(A-B, A+B, A*B)

Fixed submission:
A, B = map(int, input().split())

print(max(A-B, A+B, A*B))
Buggy python submission (verdict: Runtime Error):
N = int(input())
 
ans = 0
 
for i in range(1,N+1):
    if len(str(i)) % 2 == 1:
        ans += 1

print(ans)

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

aa = C - (A - B)

if aa > 0:
  print(aa)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
res = 0
a_sort = sorted(a)
 
for i in range(n):
    if a_sort[i] == a[i]:
        res += 1
 
if res >= n - 2:
    print("YES")
else:
    print("NO")

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

cnt = 0
for i in range(N):
    if i + 1 == p[i]:
        cnt += 1

if cnt >= N - 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
res = 0
a_sort = sorted(a)

for i in range(n):
    if a_sort[i] != a[i]:
        res += 1

if res > 2:
    print("NO")
else:
    print("YES")


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

cnt = 0
for i in range(N):
    if i + 1 == p[i]:
        cnt += 1

if cnt >= N - 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a

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

cnt = 0
for i in range(N):
    if i + 1 == p[i]:
        cnt += 1

if cnt >= N - 2:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
 
INF = 10 ** 9 + 7
 
dp = [[0] * 13 for _ in range(len(S) + 1)]
dp[0][0] = 1 # 後ろからi文字目までで、13で割った余りがjであるものの個数 0 → 3 → 43 → 543
# 実際にはjの部分に0 → 3 → 43 → 543が入るイメージだが、13で割って入れている
mul = 1 # 桁の部分を示す
 
for i in range(len(S)):
    x = S[-(i+1)] 
    if x == "?":
        for k in range(10): # ?の場合は、?の部分を0から9まで埋めた上で、余りが0から12のケースの個数を数える
            for j in range(13):
                dp[i+1][(mul * k + j) % 13] += dp[i][j] # 例えば43の時の個数は、3の時の個数に40の時の個数を加えたもの
                dp[i+1][(mul * k + j) % 13] %= INF
                
    else:
        k = int(x)
        for j in range(13):
            dp[i+1][(mul * k + j) % 13] += dp[i][j]
            dp[i+1][(mul * k + j) % 13] %= INF
    mul = mul * 10 % 13
    
print(dp[len(S)][5])

Fixed submission:
INF = 10 ** 9 + 7

S = input()
# dp[i][j]はうしろからi桁を13で割った余りがjであるものの個数
dp = [[0] * 13 for _ in range(len(S) + 1)]
dp[0][0] = 1
mul = 1

for i in range(len(S)):
    x = S[-(i + 1)]
    if x == "?":
        for k in range(10):
            for j in range(13):
                dp[i + 1][(mul * k + j) % 13] += dp[i][j]
                dp[i + 1][(mul * k + j) % 13] %= INF
    else:
        k = int(x)
        for j in range(13):
            dp[i + 1][(mul * k + j) % 13] += dp[i][j]
            dp[i + 1][(mul * k + j) % 13] %= INF
    mul = mul * 10 % 13  # 計算量削減のためここで13で割っている

print(dp[len(S)][5])
Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int, input().split())

delim_list = [x % 2019 for x in range(L, R+1)]

if len(delim_list) >= 2019:
  print(0)
  exit()

ans_list = []

for x in range(L, R):
  for y in range(x+1, R+1):   
    ans_list.append((x * y) % 2019)
    
print(min(ans_list))

Fixed submission:
l, r= map(int, input().split())
if r - l >2017:
    print(0)
else:
    ij = []
    for i in range(l, r):
        for j in range(i+1, r+1):
            ij.append((i*j)%2019)
    print(min(ij))
Buggy python submission (verdict: Runtime Error):
from collections import Counter
 
n, m = map(int, input().split())
A = list(map(int, input().split()))
 
B = [0] * (n + 1)
 
for i in range(n):
  B[i + 1] = accr[i] + A[i] # BはAの累積和

li = [i % m for i in B] # それをMで割った余りがli

C = Counter(li) # 余りが同じものの個数が2つ以上ある際、その2つの組み合わせによって、割り切れる和の組み合わせ個数が求まる

ans = 0
for v in C.values():
  if v > 1:
    ans += v * (v - 1) // 2
 
print(ans)

Fixed submission:
from collections import Counter
 
n, m = map(int, input().split())
A = list(map(int, input().split()))
 
B = [0] * (n + 1)
 
for i in range(n):
  B[i + 1] = B[i] + A[i] # BはAの累積和

li = [i % m for i in B] # それをMで割った余りがli

C = Counter(li) # 余りが同じものの個数が2つ以上ある際、その2つの組み合わせによって、割り切れる和の組み合わせ個数が求まる

ans = 0
for v in C.values():
  if v > 1:
    ans += v * (v - 1) // 2
 
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

a=input().split(" ")
N=int(a[0])
K=int(a[1])
line=input().split(" ")
dp=[]
for i in range(N):
    line[i]=int(line[i])
    dp.append(sys.maxsize)
dp[0]=0
dp[1]=abs(line[1]-line[0])
for j in range(2,N):
    for p in range(1,K+1):
        dp[j]=min(dp[j], dp[j-p]+abs(line[j]-line[j-p]))
print(dp[N-1])

Fixed submission:
import sys

a=input().split(" ")
N=int(a[0])
K=int(a[1])
line=input().split(" ")
dp=[]
for i in range(N):
    line[i]=int(line[i])
    dp.append(sys.maxsize)
dp[0]=0
dp[1]=abs(line[1]-line[0])
for j in range(2,N):
    for p in range(1,K+1):
        dp[j]=min(dp[j], dp[j-p]+abs(line[j]-line[j-p]))
print(dp[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
nw=list(map(int, input().split(" ")))
dp=[[0]*(nw[1]+1) for _ in range(nw[0]+1)]
w=[]
v=[]
i=0
ww=0
for _ in range(nw[0]):
    wv=list(map(int, input().split(" ")))
    w.append(wv[0])
    v.append(wv[1])
for i in range(nw[0]):
    for ww in range(nw[1]+1):
        if w[i] <= ww:
            dp[i+1][ww]=max(dp[i+1][ww], dp[i][ww-w[i]]+v[i])
        dp[i+1][ww]=max(dp[i+1][ww], dp[i][ww])
print(dp[nw[0]][nw[1]])

Fixed submission:
nw=list(map(int, input().split(" ")))
dp=[[0]*(nw[1]+1) for _ in range(nw[0]+1)]
w=[]
v=[]
i=0
ww=0
for _ in range(nw[0]):
    wv=list(map(int, input().split(" ")))
    w.append(wv[0])
    v.append(wv[1])
for i in range(nw[0]):
    for ww in range(nw[1]+1):
        if w[i] <= ww:
            dp[i+1][ww]=max(dp[i+1][ww], dp[i][ww-w[i]]+v[i])
        dp[i+1][ww]=max(dp[i+1][ww], dp[i][ww])
print(dp[nw[0]][nw[1]])
Buggy python submission (verdict: Runtime Error):
a=list(input())
x=int(a[1])
y=int(a[2])

if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")

Fixed submission:
a=list(input().split(" "))
x=int(a[1])
y=int(a[2])
 
if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")
Buggy python submission (verdict: Runtime Error):
n=int(input())
A = [int(x) for x in input().split()]
list=[]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(n+1):
  print(list[i])

Fixed submission:
n=int(input())
A = list(map(int, input().split()))
list=[0]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(1,n+1):
  print(list[i])

Buggy python submission (verdict: Runtime Error):
n=int(input())
A = [int(x) for x in input().split()]
list=[]
for i in range(n):
  list.append(0)
for i in range(n-1):
  list[A(i)]+=1
for i in range(n):
  print(list[i])

Fixed submission:
n=int(input())
A = list(map(int, input().split()))
list=[0]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(1,n+1):
  print(list[i])

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A = list(map(int, input().strip().split()))
for i in range(1,N+1):
  print(A.count(i))

Fixed submission:
n=int(input())
A = list(map(int, input().split()))
list=[0]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(1,n+1):
  print(list[i])

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A = list(map(int, input().strip().split()))
for i in range(1,N+1):
  c=0
  for j in range(len(A)):
    if A[j]==i:
      c+=1
  print(c)    



Fixed submission:
n=int(input())
A = list(map(int, input().split()))
list=[0]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(1,n+1):
  print(list[i])

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A = list(map(int, input().strip().split()))
for i in range(1,N+1):
  c=0
  for j in range(len(A)):
    if A[j]==i:
      c+=1
  print(c)    



Fixed submission:
n=int(input())
A = list(map(int, input().split()))
list=[0]*(n+2)

for i in range(n-1):
  list[A[i]]+=1
for i in range(1,n+1):
  print(list[i])
Buggy python submission (verdict: Time Limit Exceeded):
import math
k=int(input())
s=0

for i in range(k):
  for j in range(k):
    for l in range(k):
      c=math.gcd(i+1,j+1)
      s+=math.gcd(c,l+1)
      
print(s)      
     



Fixed submission:
import math
k=int(input())
s=0

for i in range(k):
  for j in range(k):
    for l in range(k):
      c=math.gcd(i+1,j+1)
      s+=math.gcd(c,l+1)
      
print(s)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,j):
    k=2*j-i
    if k<n and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)      

Fixed submission:
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,N):
    k=2*j-i
    if k<N and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,j):
    k=2*j-1
    if k<n and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)      

Fixed submission:
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,N):
    k=2*j-i
    if k<N and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,j):
    k=2*j-1
    if k<n and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)      

Fixed submission:
N=int(input())
S=input()
s=0
s+=S.count('R')*S.count('G')*S.count('B')
for i in range(N):
  for j in range(i+1,N):
    k=2*j-i
    if k<N and S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      s-=1
print(s)
Buggy python submission (verdict: Runtime Error):
K=int(input())
if K=32:
  print(51)
elif K=24:
  print(15)
elif K=16:
  print(14)
elif K=8 or K=12 or K=18 or K=20 or K=27:
  print(5)
elif K=28 or K=30:
  print(4)
elif K=4 or K=6 or K=9 or K=10 or K=14 or K=21 or K=22 or K=25 or K=26:
  print(2)

Fixed submission:
K=int(input())
if K==32:
  print(51)
elif K==24:
  print(15)
elif K==16:
  print(14)
elif K==8 or K==12 or K==18 or K==20 or K==27:
  print(5)
elif K==28 or K==30:
  print(4)
elif K==4 or K==6 or K==9 or K==10 or K==14 or K==21 or K==22 or K==25 or K==26:
  print(2)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
c=input()
print(c+1)

Fixed submission:
print(chr(ord(input())+1))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input
c=0
for i in range(0,N-2):
  if S[i:i+2]="ABC":
    c+=1
return c    

Fixed submission:
N=int(input())
S=input()
c=0
for i in range(N-2):
  if S[i:i+3]=="ABC":
    c+=1
print(c)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input
c=0
for i in range(0,N-2):
  if S[i;i+2]="ABC":
    c+=1
return c    

Fixed submission:
N=int(input())
S=input()
c=0
for i in range(N-2):
  if S[i:i+3]=="ABC":
    c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
X,A=map(int,input().split)
if(X<A):
  print("0")
else:
  print("10")

Fixed submission:
X,A=map(int,input().split())
if(X<A):
  print("0")
else:
  print("10")
Buggy python submission (verdict: Runtime Error):
a=[]
a=input().split()
a.sort()
if a[2]-a[1]==a[1]-a[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
a=[]
for i in range(3):
	a.append(int(input()))
a.sort()
if a[2]-a[1]==a[1]-a[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
a[]
for i in range(3):
	a.append(input())
a.sort()
if a[2]-a[1]==a[1]-a[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
a=[]
a.append(input())
a.sort()
if a[2]-a[1]==a[1]-a[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
a=[]
a.append(input())
a.sort()
if a[2]-a[1]==a[1]-a[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
a=[]
a.append(input())
a.sort()
if l[2]-l[1]==l[1]-l[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')

Buggy python submission (verdict: Runtime Error):
l=map(int,raw_input().split())
l.sort()
if l[2]-l[1]==l[1]-l[0]:
	print('YES')
else:
	print('NO')

Fixed submission:
a,b,c=input().split()
d=[]
d.append(int(a))
d.append(int(b))
d.append(int(c))
if d[2]-d[1]==d[1]-d[0]:
	print('YES')
else:
	print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
t = 0
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            t += gcd(i,j,l)
print(t)

Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
t = 0
for i in range(1,k+1):
    for j in range(1,k+1):
        if math.gcd(i,j) ==1:
            t += 1*len(list(range(1,k+1)))
        else:
            for l in range(1,k+1):
                    t += gcd(i,j,l)
print(t)
Buggy python submission (verdict: Runtime Error):
X,Y,A,B,C = map(int,input().split())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))

P_up = P[-X:]
Q_up = Q[-Y:]

P_up.append(Q_up)
P_up.extend(R)

P_up.sort()
a=-(X+Y)
print(sum(P_up[a:]))

Fixed submission:
X,Y,A,B,C = map(int,input().split())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))

R+=sorted(P)[-X:]
R+=sorted(Q)[-Y:]

a=-(X+Y)
print(sum(sorted(R)[a:]))