Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

from collections import namedtuple

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def dist(pf, pt):
    return abs(pf[0]-pt[0]) + abs(pf[1]-pt[1])

def print_ans(sx, sy, ans):
    print(len(ans))
    for p in ans:
        print(sx*p[0], sy*p[1])

def move(k, pf, pt):
    assert(pt[1]>pf[1])
    d = min(pt[0]-pf[0], k)
    return [pf[0]+d,pf[1]+k-d]

def main():
    k = ri()
    x, y = rli()
    sx = 1 if x >= 0 else -1
    sy = 1 if y >= 0 else -1
    x = abs(x)
    y = abs(y)

    pf = [0, 0]
    pt = [x, y]
    if k % 2 == 0 and (x+y) % 2 == 1:
        print(-1)
        return
    d = dist(pf, pt)

    ans = []

    # 3回で到達
    if d < k and d % 2 == 1:
        ans.append(((x+y-k)//2, (k+x+y)//2))
        ans.append((x+y-k, 0))
        ans.append((x, y))
        print_ans(sx, sy, ans)
        return

    n = (x+y+k-1) // k
    d = (n*k-(x+y))//2
    if d > 0:
        pf = [k-d, -d]
        ans.append(tuple(pf))
    while dist(pf, pt) > 0:
        pf = move(k, pf, pt)
        ans.append(tuple(pf))
    print_ans(sx, sy, ans)
    assert(pf[0] == x and pf[1] == y)



if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, b = rli()
    if (a + b) % 2 == 1:
        print("IMPOSSIBLE")
    else:
        print((a+b) // 2)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

import math

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def calc(n, x):
    return n // x

def lcm(a, b):
    return (a * b) // math.gcd(a, b)

def main():
    a, b, c, d = rli()
    lcm_cd = lcm(c, d)
    n_a = a-1 - calc(a-1, c) - calc(a-1, d) + calc(a-1, lcm_cd)
    n_b = b - calc(b, c) - calc(b, d) + calc(b, lcm_cd)
    print(n_b-n_a)


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# coding: utf-8

import fractions

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def calc(n, x):
    return n // x

def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)

def main():
    a, b, c, d = rli()
    lcm_cd = lcm(c, d)
    n_a = a-1 - calc(a-1, c) - calc(a-1, d) + calc(a-1, lcm_cd)
    n_b = b - calc(b, c) - calc(b, d) + calc(b, lcm_cd)
    print(n_b-n_a)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

from collections import Counter

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n = ri()
    lx, ly = [], []
    for _ in range(n):
        x, y = rli()
        lx.append(x)
        ly.append(y)
    dd = {}
    dc = Counter()
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            d = (lx[i]-lx[j], ly[i]-ly[j])
            dd[(i, j)] = d
            dc[d] += 1
    v = dc.most_common()[0][1]
    print(n-v)


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# coding: utf-8

from collections import Counter

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n = ri()
    lx, ly = [], []
    for _ in range(n):
        x, y = rli()
        lx.append(x)
        ly.append(y)
    dd = {}
    dc = Counter()
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            d = (lx[i]-lx[j], ly[i]-ly[j])
            dd[(i, j)] = d
            dc[d] += 1
    if len(dc) == 0:
        print(n)
    else:
        v = dc.most_common()[0][1]
        print(n-v)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8


def main():
    n, k = list(map(int, input().split()))
    s = input()
    print(s[:k]+s[k].lower()+s[k+1:])


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# coding: utf-8


def main():
    n, k = list(map(int, input().split()))
    k -= 1
    s = input()
    print(s[:k]+s[k].lower()+s[k+1:])


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

def main():
    A, B, C, D, E, F = [int(x) for x in input().split()]
    max_rate = E / (100 + E)
    best_weight, best_suger, best_rate = A*100, 0, 0.0
    for a in range(F//100 +1):
        for b in range((F-a*A)//100 + 1):
            water = (a*A+b*B)*100
            if water > F:
                continue
            for c in range((F-water)//C + 1):
                d = min((F - water - c*C) // D, int((E*water-100*c*C) / (100*D)))
                if d < 0:
                    continue
                suger = c*C + d*D
                if water + suger > F:
                    continue
                if water + suger == 0:
                    rate = 0.0
                else:
                    rate = suger / (water + suger)
                if rate > max_rate:
                    continue
                if rate > best_rate:
                    best_weight = water + suger
                    best_suger = suger
                    best_rate = rate
    print(best_weight, best_suger)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# coding: utf-8


def main():
    n = int(input())
    a = int(input())
    print(n*n-a)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
Sli = list(S)
Tli = list(T)
cli = []

for i in range(len(Sli) - len(Tli)):
    c = len(Tli)
    for j in range(len(Tli)):
        if Sli[i + j] == Tli[j]:
            c -= 1
    cli.append(c)

print(min(cli))

Fixed submission:
S = input()
T = input()
Sli = list(S)
Tli = list(T)
cli = []

for i in range(len(Sli) - len(Tli) + 1):
    c = len(Tli)
    for j in range(len(Tli)):
        if Sli[i + j] == Tli[j]:
            c -= 1
    cli.append(c)

print(min(cli))
Buggy python submission (verdict: Time Limit Exceeded):
N = input()
li = list(map(int,input().split()))
n = 1

for i in li:
    n *= i

if n > 1000000000000000000:
    print("-1")
else:
	print(n)

Fixed submission:
N = input()
l = list(map(int,input().split()))
li = sorted(l)
n = 1

for i in li:
    n *= i
    if n > 1000000000000000000:
        break

if n > 1000000000000000000:
    print("-1")
else:
	print(n)
Buggy python submission (verdict: Runtime Error):
for i in range(int(intput())):
  print('ACL', end ='')
print()

Fixed submission:
for i in range(int(input())):
  print('ACL', end ='')
print()
Buggy python submission (verdict: Runtime Error):
num = int(input())
seven = 7
col = -1
cnt = 1

for i in range(0, 1000):
  if seven % num == 0:
    col = 1
    break
  else:
    seven = (seven*10) + 7
    cnt+=1

if col == 1:
  print(cnt)
else:
  print(col)

Fixed submission:
import numpy as np

N, D = list(map(int, input().split())) 
cnt = 0
for n in range(0, N):
  x, y = list(map(int, input().split())) 
  if  (x*x + y*y) <= D*D:
    cnt += 1

print(cnt)

Buggy python submission (verdict: Runtime Error):
import math
N, D = int(input())
cnt = 0

for n in range(0, N):
  x, y = int(input())
  if math.sqrt(x^2 + y^2) > D:
    cnt += 1

print(cnt)

Fixed submission:
import numpy as np

N, D = list(map(int, input().split())) 
cnt = 0
for n in range(0, N):
  x, y = list(map(int, input().split())) 
  if  (x*x + y*y) <= D*D:
    cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
def num2alpha(num):
    if num<=26:
        return chr(97+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(97+num%26)

if __name__ == '__main__':
  n = int(input())
  print(num2alpha(n))

Fixed submission:
no, sct = map(int, input().split(' '))
flut = list(map(int, input().split(' ')))
flut = sorted(flut, reverse=False)
sum_ = 0
for i in range(sct):
  sum_ += flut[i]
print(sum_)
Buggy python submission (verdict: Runtime Error):
n, legs= map(int, input().split(" "))

x = (legs - 2*n)/2
y = (4*n - legs)/2

if X%1==0 and y%1==0 and x>0 and y>0:
  print('Yes')
else:
  print('No')

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

x = (legs - 2*n)/2
y = (4*n - legs)/2

if x%1==0 and y%1==0 and (x>=0 and y>=0):
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
x, N = map(int, input().split(" "))
data = list(map(int, input().split(" ")))
point = 0
i = 0
while(1):
    if x not in data:
        print(x)
        break
    elif x+i not in data:
        print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
        i=i-1

Fixed submission:
x, N = map(int, input().split(" "))
try:
  data = list(map(int, input().split(" ")))
except:
  data = []
point = 0
i = 0
while(1):
    if x not in data:
        print(x)
        break
    elif x+i not in data:
        print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
        i=i-1

Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split(" "))
data = list(map(int, input().split(" ")))
point = 0
i = -1
while(1):
    if x not in data:
        print(x)
        break
    elif x+i not in data:
        print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
        i=i-1

Fixed submission:
x, N = map(int, input().split(" "))
try:
  data = list(map(int, input().split(" ")))
except:
  data = []
point = 0
i = 0
while(1):
    if x not in data:
        print(x)
        break
    elif x+i not in data:
        print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
        i=i-1

Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split(" "))
data = list(map(int, input().split(" ")))
point = 0
i = -1
while(1){
	if x not in data:
  		print(x)
  		break;
  	elif x+i not in data:
  		print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
  		i=i-1  
}

Fixed submission:
x, N = map(int, input().split(" "))
try:
  data = list(map(int, input().split(" ")))
except:
  data = []
point = 0
i = 0
while(1):
    if x not in data:
        print(x)
        break
    elif x+i not in data:
        print(x+i)
        break
    elif x+(-1*i) not in data:
        print(x+(-1*i))
        break
    else:
        i=i-1
Buggy python submission (verdict: Runtime Error):
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())

a_st = 0
a_ed = 0
if a < a_v*t:
  a_st = a
  a_ed = a+a_v*t
else:
  a_st = a+a_v*t
  a_ed = a

b_st = 0
b_ed = 0
if b < b_v*t:
  b_st = b
  b_ed = b+b_v*t
else:
  b_st = b+b_v*t
  b_ed = b

v=a_v-b_v
if (a_st-b_st)%v == 0 or (a_ed-b_ed)%v==0 or (a_st-b_ed)%v==0 or (b_st-a_ed):
  print('YES')
else:
  print('NO')

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

diff_x=abs(A-B)
diff_a=max(V-W,0)

if T*diff_a>=diff_x:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
flag=0
t_set = 0

if a-b==0 and a_v-b_v == 0:
  flag = 1
elif a-b==0 or a_v-b_v == 0:
  flag = 0
else:
  t_set = (a-b)/(b_v - a_v)

if t_set>0:
    if int(t_set)==0:
      	flag = 1
	elif 0<t_set and t_set<=t:
  		flag = 1
	else:
  		flag = 0
        
if flag == 0:
  print('No')
else:
  print('Yes')

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

diff_x=abs(A-B)
diff_a=max(V-W,0)

if T*diff_a>=diff_x:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n[-1] in [1, 4, 5, 7, 9] :
	print("hon")
elif n[-1] in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")
  

Fixed submission:
n = input()
if int(n[len(n)-1]) in [2, 4, 5, 7, 9] :
	print("hon")
elif int(n[len(n)-1]) in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")
Buggy python submission (verdict: Runtime Error):
N, M =map(int, input().split())
H_tree = map(int, input().split())
GOOD_Tree = [1 for n in range(len(H_tree))]

for n i in range(M):
  A, B =map(int, input().split())
  if H_tree[A-1]>=H_tree[B-1]:
    GOOD_tree[A-1] = 0
  else:
    GOOD_tree[B-1] = 0
print(GOOD_tree.count(1))

Fixed submission:
N, M =map(int, input().split())
H_tree =[0]+[int(n) for n in input().split()]
GOOD_Tree = [0]+[1 for n in range(N)]
 
for i in range(M):
  A, B = map(int, input().split())
  if H_tree[A]<=H_tree[B]:GOOD_Tree[A] = 0
  if H_tree[A]>=H_tree[B]:GOOD_Tree[B] = 0
print(sum(GOOD_Tree))
Buggy python submission (verdict: Runtime Error):
num = int(input())
year = 0
cash = 100
while(True){
	cash += int(cash/100)
  	year++
	if(num < cash):
  		print(year)
  		break
	}

Fixed submission:
num = int(input())
year = 0
cash = 100
while(True):
  cash += int(cash/100)
  year+=1
  if(num <= cash):
    print(year)
    break
Buggy python submission (verdict: Time Limit Exceeded):

K=int(input())

def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
    return x

ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        x=gcd(i,j)
        for k in range(1,K+1):
            ans+=gcd(x,k)
print(ans)


Fixed submission:
n = int(input())
 
from math import gcd
 
y = 0
for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            y += gcd(x,k)
 
print(y)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
K=int(input())
primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199]
yakusuu_array=[]
for i in range(200):
  i+=1
  tmp=[]
  while i!=1:
    for prime in primes:
      if i % prime ==0:
        tmp.append(prime)
        i//=prime
  yakusuu_array.append(tmp)


def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
    return x

ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        x=gcd(i,j)
        for k in range(1,K+1):
            ans+=gcd(x,k)
print(ans)


Fixed submission:
n = int(input())
 
from math import gcd
 
y = 0
for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            y += gcd(x,k)
 
print(y)

Buggy python submission (verdict: Runtime Error):
import copy
K=int(input)
primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199]
yakusuu_array=[]
for i in range(200):
  i+=1
  tmp=[]
  while i!=1:
    for prime in primes:
      if i % prime ==0:
        tmp.append(prime)
        i//=prime
  yakusuu_array.append(tmp)


def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
    return x

ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        x=gcd(i,j)
        for k in range(1,K+1):
            ans+=gcd(x,k)
print(ans)


Fixed submission:
n = int(input())
 
from math import gcd
 
y = 0
for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            y += gcd(x,k)
 
print(y)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
K=200
primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199]
yakusuu_array=[]
for i in range(200):
  i+=1
  tmp=[]
  while i!=1:
    for prime in primes:
      if i % prime ==0:
        tmp.append(prime)
        i//=prime
  yakusuu_array.append(tmp)


def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
    return x

ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        x=gcd(i,j)
        for k in range(1,K+1):
            ans+=gcd(x,k)
print(ans)


Fixed submission:
n = int(input())
 
from math import gcd
 
y = 0
for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            y += gcd(x,k)
 
print(y)
Buggy python submission (verdict: Runtime Error):
import itertools
num = int(input())
cmlist = input().split(' ')
count = 0
for i,j,k in itertools.combinations(cmlist, 3):
  if int(i)<int(j)+int(k) and int(j)<int(i)+int(k) and int(k)<int(i)+int(j):
    count+=1
print(count)

Fixed submission:
data = input()
print(max(int(data.split(' ')[0])-int(data.split(' ')[1])*2,0))

Buggy python submission (verdict: Runtime Error):
data = input()
if data.split(' ')[0] > data.split(' ')[1]*2:
	print(0)
else:
  print(int(data.split(' ')[0]-data.split(' ')[1]*2)

Fixed submission:
data = input()
print(max(int(data.split(' ')[0])-int(data.split(' ')[1])*2,0))
Buggy python submission (verdict: Runtime Error):
X, N = map(int,input().split())
L = list(map(int,input().split()))

NL = []
for i in range(100):
    NL.append(i+1)

for l in L:
    NL.remove(l)

NL.append(X)
NL.sort()

LR = NL.index(X)+1
LL = NL.index(X)-1


if (NL[LR]-X) < (X-NL[LL]):
    print(NL[LR])
else:
    print(NL[LL])

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

NL = []
for i in range(102):
    NL.append(i)

for l in L:
    NL.remove(l)

NL.append(X)
NL.sort()

LR = NL.index(X)+1
LL = NL.index(X)-1


if (NL[LR]-X) < (X-NL[LL]):
    print(NL[LR])
else:
    print(NL[LL])
Buggy python submission (verdict: Runtime Error):
N=int(input())
a=1
count=0
while a<N:
  b=1
  #print(a,b)
  for i in range(N//a+1):
    c=N-a*b
    if c>0:
      count+=1
      #print(a,b,c)
    b+=1
  a+=1
print(count)

Fixed submission:
moji=input()
c=len(moji)
if moji[c-1]=="s":
  print(moji+"es")
else:
  print(moji+"s")
Buggy python submission (verdict: Runtime Error):
import numpy
n=int(input())
l=list(map(int, input().split()))
res=0
l.append(0)
l.reverse()
cum=numpy.cumsum(l)
for i in range(n+1):
    res+=l[n-i]*cum[n-i-1]
print(res%(10**9+7))

Fixed submission:
d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import numpy
n=input()
l=list(map(int, input().split()))
res=0
#print(f"le{len(l)}")
l.append(0)
l.reverse()
for i in range(len(l)): 
    print(l[len(l)-1-i],numpy.cumsum(l)[len(l)-i-2])
    res+=l[len(l)-1-i]*numpy.cumsum(l)[len(l)-i-2]
    #print(f"{res}レス")
print(res%(10**9+7))
#print(res)

Fixed submission:
d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
n=input()
l=list(map(int, input().split()))
res=0
#print(f"le{len(l)}")
for i in range(len(l)):
    for j in range(i+1,len(l)):
        res+=l[i]*l[j]
        #print(res)
print(res%(10**9+7))

Fixed submission:
d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
elif:
  print("No")

Fixed submission:
d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import numpy
n=input()
l=list(map(int, input().split()))
res=0
#print(f"le{len(l)}")
l.append(0)
l.reverse()
for i in range(len(l)): 
    #print(l[len(l)-1-i],numpy.cumsum(l)[len(l)-i-2])
    res+=l[len(l)-1-i]*numpy.cumsum(l)[len(l)-i-2]
    #print(f"{res}レス")
print(res%(10**9+7))

Fixed submission:
import numpy
n=int(input())
l=list(map(int, input().split()))
res=0
mod=10**9+7
l.append(0)
l.reverse()
cum=numpy.cumsum(l)%mod
for i in range(n):
    res+=((l[n-i]%mod)*cum[n-i-1])%mod
print(res%mod)

Buggy python submission (verdict: Time Limit Exceeded):
n=input()
l=list(map(int, input().split()))
res=0
#print(f"le{len(l)}")
for i in range(len(l)):
    for j in range(i+1,len(l)):
        res+=l[i]*l[j]
        #print(res)
print(res%(10**9+7))

Fixed submission:
import numpy
n=int(input())
l=list(map(int, input().split()))
res=0
mod=10**9+7
l.append(0)
l.reverse()
cum=numpy.cumsum(l)%mod
for i in range(n):
    res+=((l[n-i]%mod)*cum[n-i-1])%mod
print(res%mod)
Buggy python submission (verdict: Time Limit Exceeded):
x,k,d=map(int, input().split())
for i in range(k):
  if x>=0:
    x=x-d
  else:
    x=x+d
print(abs(x))

Fixed submission:
x,k,d=map(int, input().split())
if abs(x)//d>=k:
    #print("ひ")
    print(abs(x)-d*k)
elif (k-abs(x)//d)%2==0:
    #print("fu")
    print(abs(x)%d)
else:
    #print("mi")
    print(d-abs(x)%d)
Buggy python submission (verdict: Runtime Error):
n,k=map(int, Input.split())
a=list(map(int, Input.split()))
for i in range(n-k):
    if a[i]<a[i+k]:
        print("Yes")
    else:
        print("No")
        

Fixed submission:
n,k=map(int, input().split())
a=list(map(int, input().split()))
for i in range(n-k):
    if a[i]<a[i+k]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n,m=map(int, input().split())
h=list(map(int, input().split()))
near=[[] for i in range(n)]
for i in range(m):
    a,b=map(int, input().split())
    near[a-1].append(h[b-1])
    near[b-1].append(h[a-1])
cnt=0
for i in range(n):
    if max(near[i])<=h[i]:
        cnt+=1
print(cnt)

Fixed submission:
n,m=map(int, input().split())
h=list(map(int, input().split()))
near=[[0] for i in h]
for i in range(m):
    a,b=map(int, input().split())
    near[a-1].append(h[b-1])
    near[b-1].append(h[a-1])
cnt=0
for i in range(n):
    if max(near[i])<h[i]:
        cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[input() for i in range(n)]
m=int(input())
t=[input() for i in range(n)]

print(max(0,max(s.count(i)-t.count(i) for i in set(s))))
    




Fixed submission:
n=int(input())
s=[input() for i in range(n)]
m=int(input())
t=[input() for i in range(m)]

print(max(0,max(s.count(i)-t.count(i) for i in set(s))))
Buggy python submission (verdict: Runtime Error):
o=input()
e=input()
for i in range(len(o)):
    print(o[i],end="")
    print(e[i],end="")


Fixed submission:
o=list(input())
e=input()
for i in range(len(e)):
    o.insert(2*i+1,e[i])
print(*o,sep="")
Buggy python submission (verdict: Runtime Error):
n,k,x,y=[int(input()) for i in range(n)]
if k<=x:
    print(n*k)
else:
    print(k*x+(n-k)*y)

Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
if n<=k:
    print(n*x)
else:
    print(k*x+(n-k)*y)