Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = not True
def ddprint(x):
  if DBG:
    print(x)

n,q = inm()
s = input()
a = [0] * (n+1)
cnt = 0
prevA = False
for i in range(n):
    if s[i] == 'A':
        prevA = True
    elif s[i] == 'C':
        if prevA:
            cnt += 1
        prevA = False
    else:
        prevA = False
    a[i] = cnt

ddprint(a)

for j in range(q):
    l,r = inm()
    ddprint(str(l) + ' ' + str(r))
    print(a[r-1] - a[l-1])


Fixed submission:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = not True
def ddprint(x):
  if DBG:
    print(x)

n,q = inm()
s = input()
a = [0] * (n+1)
cnt = 0
prevA = False
for i in range(n):
    if s[i] == 'A':
        prevA = True
    elif s[i] == 'C':
        if prevA:
            cnt += 1
        prevA = False
    else:
        prevA = False
    a[i] = cnt

ddprint(a)

for j in range(q):
    l,r = inm()
    ddprint(str(l) + ' ' + str(r))
    print(a[r-1] - a[l-1])
Buggy python submission (verdict: Runtime Error):
import sys
DBG =  not True
R = 1000000007
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * (n+1)
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)


Fixed submission:
import sys
DBG =  not True
R = 1000000007
MAXN = 200000
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * (MAXN+1)
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)

Buggy python submission (verdict: Runtime Error):
import sys
DBG =  not True
R = 1000000007
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * n
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)


Fixed submission:
import sys
DBG =  not True
R = 1000000007
MAXN = 200000
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * (MAXN+1)
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)
Buggy python submission (verdict: Time Limit Exceeded):
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
R = 1000000007
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)

def dfs(x,y):
    if x == n:
        return 1
    if dp[y] > -1:
        return dp[y]
    sum = 0
    for j in range(n):
        if a[x][j] == 1 and (y>>j)%2 == 0:
            sum = (sum + dfs(x+1, y|(1<<j))) % R
    dp[y] = sum
    return sum

n = inn()
a = [ 0 for i in range(n) ]
for i in range(n):
    a[i] = inl()
dp = [-1] * (2**n)
print(dfs(0,0))


Fixed submission:
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
R = 1000000007

def dfs(x,y):
    if x == n:
        return 1
    if dp[y] > -1:
        return dp[y]
    sum = 0
    for j in range(n):
        b = 1 << j
        if a[x][j] == 1 and (y&b) == 0:
            sum += dfs(x+1, y|b)
            if sum > R:
                sum -= R
    dp[y] = sum
    return sum

n = inn()
a = [ 0 for i in range(n) ]
for i in range(n):
    a[i] = inl()
dp = [-1] * (2**n)
print(dfs(0,0))
Buggy python submission (verdict: Runtime Error):
import sys
import fraction
DBG = True
a,b,c =      map(int, input().split())
g = math.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')


Fixed submission:
import sys
import fractions
DBG = True
a,b,c =      map(int, input().split())
g = fractions.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')

Buggy python submission (verdict: Runtime Error):
import sys
import math
DBG = True
a,b,c =      map(int, input().split())
g = math.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')


Fixed submission:
import sys
import fractions
DBG = True
a,b,c =      map(int, input().split())
g = fractions.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')
Buggy python submission (verdict: Runtime Error):
n = input()

if n % 2 == 0:
  print(n // 2)
else:
  print(n // 2 + 1)

Fixed submission:
n = int(input())

if n % 2 == 0:
  print(n // 2)
else:
  print(n // 2 + 1)
Buggy python submission (verdict: Runtime Error):
n,m=map(s,input().split())
if(len(n)<=1 and len(m)<=1):
	print(int(n)*int(m))
else:
	print(-1)

Fixed submission:
n,m=map(str,input().split())
if(len(n)<=1 and len(m)<=1):
	print(int(n)*int(m))
else:
	print(-1)
Buggy python submission (verdict: Runtime Error):
n = int(input())

d = [0 for i in range(n+1)]
adj = [[] for i in range(n+1)]

def dfs(u, par):
    for p in adj[u]:
        v, w = map(int, p)
        # print(v, w)
        if v != par:
            d[v] = d[u]+w
            dfs(v, u)

edge = [list(map(int, input().split())) for i in range(n-1)]
q, k = map(int, input().split())
query = [list(map(int, input().split())) for i in range(q)]

for e in edge:
    adj[e[0]].append([e[1], e[2]])
    adj[e[1]].append([e[0], e[2]])
    
dfs(k, -1)

for p in query:
    print(d[p[0]]+d[p[1]])

Fixed submission:
n = int(input())
edge = [list(map(int, input().split())) for i in range(n-1)]
q, k = map(int, input().split())
query = [list(map(int, input().split())) for i in range(q)]

d = [0 for i in range(n+1)]
visited = [False for i in range(n+1)]
adj = [[] for i in range(n+1)]

for e in edge:
    adj[e[0]].append([e[1], e[2]])
    adj[e[1]].append([e[0], e[2]])
    
st = [k]
visited[k] = True
while st:
    u = st.pop()
    for p in adj[u]:
        v, w = map(int, p)
        if not visited[v]:
            visited[v] = True
            d[v] = d[u]+w
            st.append(v)

for p in query:
    print(d[p[0]]+d[p[1]])
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
a.sort(reverse=True)

print(sum(a[::2] - sum(a[1::2])))

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

for i, j in enumerate(a):
    if i % 2 == 0:
        ans += j
    else:
        ans -= j

print(abs(ans))
Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    if 500 * i == x:
        count += 1
        break
    else if 500 * i > x:
        break
    else:
        for j in range(b + 1):
            if 500 * i + 100 * j == x:
                count += 1
                break
            else if 500 * i + 100 * j > x:
                break
            else:
                for k in range(c + 1):
                    if 500 * i + 100 * j + 50 * k == x:
                        count += 1
                        break
print(count)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 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:
                count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    for j in (b + 1):
        for k in (c + 1):
            if 500 * i + 100 * j + 50 * k == x:
                count += 1
print(count)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 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:
                count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in a:
    for j in b:
        for k in c:
            if 500*i + 100*j + 50*k == x:
                count += 1
print(count)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 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:
                count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in a:
    for j in b:
        for k in c:
            if 500*i + 100*j + 50*k == x:
                count += 1

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 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:
                count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
n = input()
a = [bin(int(x))[2:] for x in input().split()]
a = [len(x) - (x.rfind('1') + 1) for x in a]
print(min(a))

Fixed submission:
print(input().count('1'))
Buggy python submission (verdict: Runtime Error):
N,A,B=list(map(lambda i:int(i),input().split()))

answer =0

if A==0:
    answer = 0
elif b==0:
    answer = N
else:
    tail=0
    if N%(A+B) > B:
        tail = B
    else:
        tail = N%(A+B)
    answer = A * (N//(A+B)) + tail

print(answer)


Fixed submission:
N,A,B=list(map(lambda i:int(i),input().split()))

answer =0

if A==0:
    answer = 0
elif B==0:
    answer = N
else:
    tail=0
    if N%(A+B) > A:
        tail = A
    else:
        tail = N%(A+B)
    answer = A * (N//(A+B)) + tail

print(answer)

Buggy python submission (verdict: Runtime Error):
N,A,B=list(map(lambda i:int(i),input().split()))

answer =0

if A==0:
    answer = 0
if b==0:
    answer = N
else:
    tail=0
    if N%(A+B) > B:
        tail = B
    else:
        tail = N%(A+B)
    answer = A * (N//(A+B)) + tail

print(answer)


Fixed submission:
N,A,B=list(map(lambda i:int(i),input().split()))

answer =0

if A==0:
    answer = 0
elif B==0:
    answer = N
else:
    tail=0
    if N%(A+B) > A:
        tail = A
    else:
        tail = N%(A+B)
    answer = A * (N//(A+B)) + tail

print(answer)
Buggy python submission (verdict: Runtime Error):
from collections import deque
true_letter = input()
Q= int(input())
letter = deque(['*'])
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.insert(0,query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.insert(0,query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
output = output.replace('*',true_letter)
print(output)


Fixed submission:
from collections import deque
letter = deque(input())
Q= int(input())
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.appendleft(query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.appendleft(query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
print(output)
Buggy python submission (verdict: Runtime Error):
S,T=input().split()
A,B=map(int,input().split())
U = input()
if U == S:
    print (f"{A-1} {B}")
else:
    print(f"{A} {B-1}")


Fixed submission:
S,T=input().split()
A,B=map(int,input().split())
U = input()
if U == S:
    print('{} {}'.format(A-1, B))
else:
    print('{} {}'.format(A, B-1))

Buggy python submission (verdict: Runtime Error):
s, t = input().split()
a,b = map(int,input().split())
u = input()
if u == s:
     print (f"{a-1} {b}")
else:
    print(f"{a} {b-1}")


Fixed submission:
S,T=input().split()
A,B=map(int,input().split())
U = input()
if U == S:
    print('{} {}'.format(A-1, B))
else:
    print('{} {}'.format(A, B-1))

Buggy python submission (verdict: Runtime Error):
#Stringの場合
s, t = input().split()
a,b = map(int,input().split())
u = input()

if u == s:
     print (f"{a-1} {b}")
else:
    print(f"{a} {b-1}") 


Fixed submission:
S,T=input().split()
A,B=map(int,input().split())
U = input()
if U == S:
    print('{} {}'.format(A-1, B))
else:
    print('{} {}'.format(A, B-1))
Buggy python submission (verdict: Runtime Error):
x = input()

d1 = int(x[:-2])
d2 = int(x[-2:])
n = -(-d2//5)

print('1' if d1-n>=0 else '0')

Fixed submission:
x = input()

if int(x)<100:
  print('0')
  exit()

d1 = int(x[:-2])
d2 = int(x[-2:])
n = -(-d2//5)

print('1' if d1-n>=0 else '0')
Buggy python submission (verdict: Runtime Error):
a,b,x = map(int, input().split())

s = int(x/a)
X = x - b*len(str(s))
if X < 0:
  print(0)
  exit()

for i in range(s,-1,-1):
  if a*i+b*len(str(i)) <= x:
    if i >= 10**9:
      print(10**9)
      exit()
    print(i)
    exit()
print(0)

Fixed submission:
week = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
s = input()
print(week[s])

Buggy python submission (verdict: Runtime Error):
a,b,x = map(int, input().split())

s = int(x/a)

for i in range(s,-1,-1):
  if a*i+b*len(str(i)) <= x:
    if i >= 10**9:
      print(10**9)
      exit()
    print(i)
    exit()
print(0)

Fixed submission:
week = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
s = input()
print(week[s])
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
for i in range(int(math.sqrt(N)), 0, -1):
  if N / i == int(N / i):
      print(int(N / i + i - 2))
      sys.exit()

Fixed submission:
import sys
import numpy as np
N = int(input())
for i in range(int(np.sqrt(N)), 0, -1):
  if N / i == int(N / i):
      print(int(N / i + i - 2))
      sys.exit()
print(N - 1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n-2):
  a = l[i]
  for j in range(i+1,n-1):
    b = l[j]
    for k in range(n-1,j,-1):
      c = l[k]
      if(a+b>c):
        s += k-j
        break
print(s)

Fixed submission:
import bisect
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n-2):
  a = l[i]
  for j in range(i+1,n-1):
    b = l[j]
    s += bisect.bisect_left(l,a+b,j+1)-j-1
print(s)

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

Fixed submission:
import bisect
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n-2):
  a = l[i]
  for j in range(i+1,n-1):
    b = l[j]
    s += bisect.bisect_left(l,a+b,j+1)-j-1
print(s)

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

Fixed submission:
import bisect
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n-2):
  a = l[i]
  for j in range(i+1,n-1):
    b = l[j]
    s += bisect.bisect_left(l,a+b,j+1)-j-1
print(s)

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

Fixed submission:
import bisect
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n-2):
  a = l[i]
  for j in range(i+1,n-1):
    b = l[j]
    s += bisect.bisect_left(l,a+b,j+1)-j-1
print(s)
Buggy python submission (verdict: Runtime Error):
import math
L = [input() for _ in range(5)]
lm = 10
v = 0
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)

Fixed submission:
import math
L = [input() for _ in range(5)]
lm = int(L[0][-1])
v = int(L[0])
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)

Buggy python submission (verdict: Runtime Error):
import math
L = [input() for _ in range(5)]
lm = 9
v = 0
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)

Fixed submission:
import math
L = [input() for _ in range(5)]
lm = int(L[0][-1])
v = int(L[0])
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)
Buggy python submission (verdict: Time Limit Exceeded):
n,a,b,c,d,e = [int(input()) for _ in range(6)]

s = [n,0,0,0,0,0]
cnt = 0
while 1:
  A = min(a,s[0])
  s[0] = s[0] - A
  B = min(b,s[1])
  s[1] = s[1] + A - B
  C = min(c,s[2])
  s[2] = s[2] + B - C
  D = min(d,s[3])
  s[3] = s[3] + C - D
  E = min(e,s[4])
  s[4] = s[4] + D - E
  s[5] = s[5] + E
  cnt += 1
  if s[5]==n:
    break
print(cnt)

Fixed submission:
n = int(input())
l = [int(input()) for _ in range(5)]
print(-(-n//min(l))+4)
Buggy python submission (verdict: Time Limit Exceeded):
n,q = map(int, input().split())
s = input()
for _ in range(q):
  l,r = map(int, input().split())
  print(s[l-1:r].count('AC'))

Fixed submission:
n,q = map(int, input().split())
s = input()
c = [0]*n
for i in range(1,n):
  c[i] += c[i-1]
  if s[i-1:i+1]=='AC': c[i] += 1

for _ in range(q):
  l,r = map(int, input().split())
  print(c[r-1]-c[l-1])
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

print("Yes" if t in s*2 else "No")

Fixed submission:
a,b,c = sorted(map(int, input().split()))
print(c-a)
Buggy python submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())
c = math.ceil(a*b/2)
if a = b = 1:
    print(1)
else:
    print(c)


Fixed submission:
import math

a,b = map(int,input().split())

if a == 1 or b == 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Buggy python submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())

if a = b = 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Fixed submission:
import math

a,b = map(int,input().split())

if a == 1 or b == 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Buggy python submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())

c = a*b/2
print(c)
~                                                                               
~           

Fixed submission:
import math

a,b = map(int,input().split())

if a == 1 or b == 1:
    print(1)
else:
    print(math.ceil(a*b/2))
Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
a = float(a) 
b = float(b)
c = float(c) 
if  a*b < ((c-a-b)/2)*((c-a-b)/):
  print("Yes")
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if float(a) + 2*math.sqrt(float(a)) * math.sqrt(float(b)) + float(b) < c:
  print("Yes")
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
  print("Yes")
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if math.sqrt(int(a)) + math.sqrt(int(b)) < math.sqrt(int(c)):
  print("Yes)
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
  print("Yes)
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
  print("Yes)
else:
  print("No")

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")

return math.sqrt(a) + math.sqrt(b) < math.sqrt(c)

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

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import itertools

n,k=map(int,input().split())
s=map(int,input().split())

t=[]

for a,b in itertools.combinations(s,2):
  t.append(a*b)

t.sort()

print(t[k-1])


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

n=set([a,b,c])

if len(n)==2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
s=list(map(int,input().split()))

b=0

def f(n):
  return n*(1+n)/2/n

for i in range(n-k+1):
  t=sum(s[i:i+k])
  if t>b:
    b=t
print((b+k)/2)






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

m=sum(s[0:k])
r=[m,]
b=m

for i in range(n-k):
  b=b-s[i]+s[i+k]
  r.append(b)
r.sort()
print((r[-1]+k)/2)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p =list(map(int,input().split()))

c=0
for i in range(n):
  s=p[0:i+1]
  s.sort()
  if s[0]==p[i]:
    c=c+1
    
print(c)

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

c=0
mini=p[0]
for i in range(n):
  if mini>=p[i]:
    c=c+1
    mini=p[i]
    
print(c)
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
s=[0,]
d={
  1:30000,
  2:20000,
  3,10000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(40000)
  
print(sum(s))

Fixed submission:
x,y = map(int,input().split())
s=[0,]
d={
  1:300000,
  2:200000,
  3:100000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(400000)
  
print(sum(s))
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
x=0
def f():
  if A>B:
    x=x+A
    A=A-1
  else:
    x=x+B
    B=B-1
    
f()
f()
print(x)



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

if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
  
if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
   
print(x)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())

if int((n+1)/2)=>k:
  print("YES")
else:
  print("NO")


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

if int((n+1)/2)>=k:
  print("YES")
else:
  print("NO")