Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())


def answer():
    digs = [-1] * N
    for _ in range(M):
        s, c = map(int, input().split())
        s -= 1
        if s == 0 and c == 0:
            return -1
        if digs[s] not in {c, -1}:
            return -1
        digs[s] = c
    if digs[0] == -1:
        digs[0] = 1
    if digs[1] == -1:
        digs[1] = 0
    if digs[2] == -1:
        digs[2] = 0
    return "".join(map(str, digs))


print(answer())


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


def answer():
    digs = [-1] * N
    for _ in range(M):
        s, c = map(int, input().split())
        s -= 1
        if digs[s] not in {c, -1}:
            return -1
        digs[s] = c
    if digs[0] == -1:
        digs[0] = int(N > 1)
    elif digs[0] == 0 and N > 1:
        return -1
    for i in range(1, N):
        if digs[i] == -1:
            digs[i] = 0
    return "".join(map(str, digs))


print(answer())
Buggy python submission (verdict: Runtime Error):

def tramp(gen):
    stack = [gen]
    val = None
    while stack:
        try:
            stack.append(stack[-1].send(val))
            val = None
        except StopIteration as e:
            stack.pop()
            val = e.value # e.args
    return val
    
N, M, K = map(int, input().split())
adj = [[] for _ in range(N)]
blks = [set() for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    adj[a - 1].append(b - 1)
    adj[b - 1].append(a - 1)
for _ in range(K):
    a, b = map(int, input().split())
    blks[a - 1].add(b - 1)
    blks[b - 1].add(a - 1)
vis = [False] * N
def go(curr):
    if vis[curr]:
        return
    vis[curr] = True
    comp.add(curr)
    for n in adj[curr]:
        yield go(n)
ans = [0] * N
for i in range(N):
    comp = set()
    if vis[i]:
        continue
    tramp(go(i))
    for i in comp:
        x = len(comp) - 1 - len(adj[i])
        for k in blks[i]:
            if k in comp:
                x -= 1
        ans[i] = x
print(*ans)


Fixed submission:

def tramp(gen):
    stack = [gen]
    val = None
    while stack:
        try:
            stack.append(stack[-1].send(val))
            val = None
        except StopIteration as e:
            stack.pop()
            val = e.args
    return val
    
N, M, K = map(int, input().split())
adj = [[] for _ in range(N)]
blks = [set() for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    adj[a - 1].append(b - 1)
    adj[b - 1].append(a - 1)
for _ in range(K):
    a, b = map(int, input().split())
    blks[a - 1].add(b - 1)
    blks[b - 1].add(a - 1)
vis = [False] * N
def go(curr):
    if vis[curr]:
        return
    vis[curr] = True
    comp.add(curr)
    for n in adj[curr]:
        yield go(n)
ans = [0] * N
for i in range(N):
    comp = set()
    if vis[i]:
        continue
    tramp(go(i))
    for i in comp:
        x = len(comp) - 1 - len(adj[i])
        for k in blks[i]:
            if k in comp:
                x -= 1
        ans[i] = x
print(*ans)
Buggy python submission (verdict: Runtime Error):
H, N = map(int, input().split())
attacks = [*map(int, input().split())]
if sum(attacks) >= H:
    print("Yes")
else:
    print("No")


Fixed submission:
H, N = map(int, input().split())
attacks = list(map(int, input().split()))
if sum(attacks) >= H:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
H, N = map(int, input().split())
dp = [10 ** 100] * H
for _ in range(N):
    A, B = map(int, input().split())
    for i in range(H - 1, -1, -1):
        if A + i >= H:
            dp[i] = min(dp[i], B)
        else:
            dp[i] = min(dp[i], dp[A + i] + B)
print(dp[0])


Fixed submission:
H, N = map(int, input().split())
dp = [10 ** 100] * H
for _ in range(N):
    A, B = map(int, input().split())
    for i in range(H - 1, -1, -1):
        if A + i >= H:
            dp[i] = min(dp[i], B)
        else:
            dp[i] = min(dp[i], dp[A + i] + B)
print(dp[0])
Buggy python submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = input()

a = A #+ (int(V) * int(T))
b = B #+ (int(W) * int(T))

for i in range(1, T + 1, 1):
    a += V
    b += W

    if a == b:
        print("YES")
        break

if (a != b):
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if abs(a-b) <= t* (v-w):
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Time Limit Exceeded):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = input()

a = int(A) #+ (int(V) * int(T))
b = int(B) #+ (int(W) * int(T))

count = int(T)
while count > 0:
    a += (int(V) * int(T))
    b += (int(W) * int(T))
    count -= 1

if a >= b:
    print("YES")

else:
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if abs(a-b) <= t* (v-w):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
temp = list(map(int, input().split()))
a = 1
for i in range(n):
  a=a*temp[i]
if a>10**18:
  print(-1)
else:
  print(a)

Fixed submission:
n =int(input())
temp = list(map(int, input().split()))
temp = sorted(temp)
a = 1
for i in range(n):
  a=a*temp[i]
  if a>10**18:
    print(-1)
    break
else:
  print(a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n[-1] == 3:
  print('bon')
elif n[-1] ==2 or 4 or 5 or 7 or 9:
  print('hon')
else:
  print('pon')

Fixed submission:
n = input()
s = int(n[-1])
if s == 3:
  print('bon')
elif s == 2 or s == 4 or s == 5 or s== 7 or s== 9:
  print('hon')
else:
  print('pon')
Buggy python submission (verdict: Runtime Error):
s = input()
a = ord(s)
b = ord('ABC')
r = ord('ARC')
if a == b:
  print('ARC')
elif a == b:
  print('ABC')

Fixed submission:
s = list(input())
if s[1] == 'B':
  print('ARC')
elif s[1] == 'R':
  print('ABC')

Buggy python submission (verdict: Runtime Error):
s = map(list,input())
b = [ABC]
r = [ARC]
if s == b:
  print('ARC')
elif r == b:
  print('ABC')
 

Fixed submission:
s = list(input())
if s[1] == 'B':
  print('ARC')
elif s[1] == 'R':
  print('ABC')
Buggy python submission (verdict: Runtime Error):
import math
a,b,n = map(int,input().split())
kk = []
for i in range(n):
  kk.append(math.floor(a*n/b)-a*math.floor(n/b))
  n -= 1
print(max(kk))


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

for i in range(b-a+1):
  if a % k != 0:
    a += 1
  else:
    print('OK')
    break
if a == b+1 and b%k != 0:
  print('NG')
Buggy python submission (verdict: Runtime Error):
a,b,c = mac(int,input().split())

if a+b+c > 21:
    print('bust')
else:
    print('win')

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

if a+b+c > 21:
    print('bust')
else:
    print('win')
Buggy python submission (verdict: Runtime Error):
s = str(input())

print(s[1]+s[2]+s[3])

Fixed submission:
s = str(input())

print(s[0]+s[1]+s[2])

Buggy python submission (verdict: Runtime Error):
s = str(input())

print(s[1]+s[2]+s[3])


Fixed submission:
s = str(input())

print(s[0]+s[1]+s[2])
Buggy python submission (verdict: Runtime Error):
ca = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

if (a[0]<b[0]) & (b[1]*t + (b[0]-a[0]) - a[1]*t) < 0:
    print("YES")
elif (a[0]>b[0]) & (b[1]*t + (a[0]-b[0]) - a[1]*t) < 0:
    print("YES")
else:
    print("NO")


Fixed submission:
a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

dis = abs(a[0]-b[0])

if (b[1]*t+dis) <= a[1]*t:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

if (a[0]<b[0]) .and. (b[1]*t + (b[0]-a[0]) - a[1]*t) < 0:
    print("YES")
elif:if (a[0]>b[0]) .and. (b[1]*t + (b[0]-a[0]) - a[1]*t) > 0:
    print("YES")
else:
    print("NO")


Fixed submission:
a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

dis = abs(a[0]-b[0])

if (b[1]*t+dis) <= a[1]*t:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lst = [int(i) for i in input().split()]
ans = 1
for i in lst:
    ans *=  i#input().split()
if(ans > 1.0e+18):
    print(-1)
    exit()

print(ans)


Fixed submission:
n = int(input())
lst = [int(i) for i in input().split()]
if(lst.count(0) > 0):
    print(0)
    exit()

ans = 1
for i in lst:
    ans *=  i#input().split()
    if(ans > 1.0e+18):
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a, b = [int(i) for i in input().split()]

kk = k

while(k <= 1000):
    kk = kk + k
    if(kk <= b and kk >= a):
        print("OK")
        exit()
    #print(kk)

    #j = j + 1

print("NG")


Fixed submission:
k = int(input())
a, b = [int(i) for i in input().split()]

kk = a // k
kk = k*kk

while(kk <= 1000):
    if(kk <= b and kk >= a):
        print("OK")
        exit()
    #print(kk)
    kk = kk + k
    #j = j + 1

print("NG")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]

tmp = ""

for i in range(n):
    tmp = a[i]
    for j in range (i+1, n):
        if (tmp ==  a[j]):
            print("NO")
            exit()
        else:
            continue

print("YES")


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

a = sorted(a)
tmp = ""

for i in range(n-1):
    if (a[i] == a[i+1]):
        print("NO")
        exit()
    else:
        continue

print("YES")
Buggy python submission (verdict: Runtime Error):
N, M = [int(i) for i in input().split()]

if (N == M):
    print(Yes)
else:
    print(No)

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

if (N == M):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
N, M = [int(i) for i in input().split()]

if (N == M):
    print(Yes)
else:
    print(No)

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

if (N == M):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

n=int(input())

m=list(map(int,input().split()))
result = functools.reduce(operator.mul, m)

if result<=pow(10,18):
  print(result)
else:
  print(-1)

Fixed submission:
import sys

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

ans=1
if 0 in m:
  print(0)
  sys.exit()

for i in range(n):
  ans=ans*m[i]
  if ans>pow(10,18):
    print(-1)
    sys.exit()

if ans<=pow(10,18):
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=1
m=list(map(int,input().split()))
for i in range(n):
  ans=ans*m[i]
if ans<=pow(10,18):
  print(ans)
else:
  print(-1)



Fixed submission:
import sys

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

ans=1
if 0 in m:
  print(0)
  sys.exit()

for i in range(n):
  ans=ans*m[i]
  if ans>pow(10,18):
    print(-1)
    sys.exit()

if ans<=pow(10,18):
  print(ans)
Buggy python submission (verdict: Runtime Error):
t=input()

def score(t):
  count=0
  for i in range(len(t)-1):
    if t[i]=='D':
      count+=1
    if t[i]=='P'and t[i+1]=='D':
      count+=1
  return count

hold=0
for i in range(t.count('?')):
  t_tr=t.replace('?','D',i+1)
  t_tr=t_tr.replace('?','P')
  if hold<=score(t_tr):
    hold=score(t_tr)
    t_hold=t_tr

print(t_hold)

Fixed submission:
t=input()

def score(t):
  count=0
  for i in range(len(t)-1):
    if t[i]=='D':
      count+=1
    if t[i]=='P'and t[i+1]=='D':
      count+=1
  return count

hold=0

t_tr=t.replace('?','D')
#if hold<=score(t_tr):
#  hold=score(t_tr)
#  t_hold=t_tr

print(t_tr)
Buggy python submission (verdict: Runtime Error):
a = input("Enter word:")
if a == 'redcoder':
  printf("1")
elif a == 'vvvvv':
  print("0")
elif a == "abcdabc":
  print("2")

Fixed submission:
s = input()
count = 0
first_half, second_half = s[:len(s)//2], s[(len(s)+1)//2:]
if first_half == reversed(second_half):
    print(count)
else:
    for x in range(len(first_half)):
        if first_half[x] != second_half[len(second_half)-x-1]:
            count += 1
    print(count)

Buggy python submission (verdict: Runtime Error):
a = input("Enter word:")

b = a[::-1]
print(b)

Fixed submission:
s = input()
count = 0
first_half, second_half = s[:len(s)//2], s[(len(s)+1)//2:]
if first_half == reversed(second_half):
    print(count)
else:
    for x in range(len(first_half)):
        if first_half[x] != second_half[len(second_half)-x-1]:
            count += 1
    print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ans = 1

for i in range(N):
  if Ai[0] == 0:
    Ans = 0
    break
    
  Ans = Ans * Ai[i]
  
if Ans <= 10**18:
  print(Ans)
else:
  print('-1')

Fixed submission:
N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ai.sort()
Ans = 1

for i in range(N):
  if Ai[i] == 0:
    Ans = 0
    break
    
  Ans = Ans * Ai[i]

  if Ans > 10 ** 18:
    Ans = -1
    break
  
if Ans <= 10**18:
  print(Ans)
else:
  print('-1')

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ans = 1

for i in range(N):
  Ans = Ans * Ai[i]
  
if Ans <= 10**18:
  print(Ans)
else:
  print('-1')

Fixed submission:
N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ai.sort()
Ans = 1

for i in range(N):
  if Ai[i] == 0:
    Ans = 0
    break
    
  Ans = Ans * Ai[i]

  if Ans > 10 ** 18:
    Ans = -1
    break
  
if Ans <= 10**18:
  print(Ans)
else:
  print('-1')
Buggy python submission (verdict: Runtime Error):
inputs = input().split(' ')

N = int(inputs[0])
M = int(inputs[1])

pattern_N = 0
paattern_M = 0

if N > 0:
  pattern_N = N * (N - 1) // 2 
  
if M > 0:
  pattern_M = M * (M - 1) // 2 
  
print(pattern_N + pattern_M)

Fixed submission:
inputs = input().split(' ')
 
N = int(inputs[0])
M = int(inputs[1])
 
pattern_N = 0
pattern_M = 0
 
if N > 0:
  pattern_N = N * (N - 1) // 2 
  
if M > 0:
  pattern_M = M * (M - 1) // 2 
  
print(pattern_N + pattern_M)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    strings = input().split(' ')
    N = int(strings[0])
    K = int(strings[1])
    p_raw = input().split(' ')
    exp = []
    for i in p_raw:
        exp.append((int(i)+1)/2.)
    max = 0
    for i in range(N-K+1):
        
        sum_exp = sum(exp[i:i+K])
        if sum_exp > max:
            max = sum_exp
            
    
    print(max)
    return 0

main()

Fixed submission:
def main():
    strings = input().split(' ')
    N = int(strings[0])
    K = int(strings[1])
    p_raw = input().split(' ')
    exp = []
    for i in p_raw:
        exp.append((int(i)+1)/2.)
    max = 0
    exp_prev = sum(exp[0:0 + K -1])
    for i in range(N-K+1):
        
        sum_exp = exp_prev + exp[i + K-1]
        exp_prev = sum_exp - exp[i]
        if sum_exp > max:
            max = sum_exp
            
    
    print(max)
    return 0

main()
Buggy python submission (verdict: Runtime Error):
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while m % n != 0:
    mt = m // n
    nt = m % n
    m = mt
    n = nt
    gmc = m // n
if gmc != 0:
    print(A*B//gmc)
else:
    print(A*B)
    

Fixed submission:
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while 1:
    mt = n
    n = m % n
    m = mt
    if n == 0:
        break
if m != 0:
    print(A*B//m)
else:
    print(A*B)

Buggy python submission (verdict: Runtime Error):
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = A
n = B
while max(m,n) % min(n,m) != 0:
    mt = max(m,n) // min(m,n)
    nt = max(m,n) % min(m,n)
    m = mt
    n = nt
    gmc = max(m,n) // min(n,m)

At = A // gmc
Bt = B // gmc
print(gmc * At * Bt)
    

Fixed submission:
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while 1:
    mt = n
    n = m % n
    m = mt
    if n == 0:
        break
if m != 0:
    print(A*B//m)
else:
    print(A*B)

Buggy python submission (verdict: Time Limit Exceeded):
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
while 1:
    if i % A ==0 and i % B == 0:
        print(i)
        break
    else:
        i = i + 1


Fixed submission:
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while 1:
    mt = n
    n = m % n
    m = mt
    if n == 0:
        break
if m != 0:
    print(A*B//m)
else:
    print(A*B)
Buggy python submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=[]
b.append(a[2])
b.append(a[0])
b.append(a[1])                                                                     for i in range(len(b)):
    print(str(b[i])+' ',end='')
print()

Fixed submission:
a=list(map(int,input().split()))
b=[]
b.append(a[2])
b.append(a[0])
b.append(a[1])
for i in range(len(b)):
    print(str(b[i])+' ',end='')
print()
Buggy python submission (verdict: Runtime Error):
s=input()
if(len(s)<=1):                                                                                            print('No')                                                                                           exit()
                                                                                                      for i in range(len(s)-1):                                                                                 if(s[i]=='h'):
        if(s[i+1]=='i'):
            continue
        else:
            print('No')
            exit()
    elif(s[i]=='i'):
        if(s[i+1]=='h'):
            if(i+2<len(s) and s[i+2]=='i'):
                continue
            else:
                print('No')
                exit()
        else:
            print('No')
            exit()
    else:
        print('No')                                                                                           exit()
print('Yes')

Fixed submission:
s=input()
if(len(s)<=1):
    print('No')
    exit()

for i in range(len(s)-1):
    if(s[i]=='h'):
        if(s[i+1]=='i'):
            continue
        else:
            print('No')
            exit()
    elif(0<i and s[i]=='i'):
        if(s[i+1]=='h'):
            if(i+2<len(s) and s[i+2]=='i'):
                continue
            else:
                print('No')
                exit()
        else:
            print('No')
            exit()
    else:
        print('No')
        exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)-1):
    if(s[i]=='h'):
        if(s[i+1]=='i'):
            continue
        else:
            print('No')
            exit()
    elif(s[i]=='i'):
        if(s[i+1]=='h'):
            if(s[i+2]=='i'):
                continue
            else:
                print('No')
                exit()
        else:
            print('No')
            exit()
    else:
        print('No')
        exit()
print('Yes')

Fixed submission:
s=input()
if(len(s)<=1):
    print('No')
    exit()

for i in range(len(s)-1):
    if(s[i]=='h'):
        if(s[i+1]=='i'):
            continue
        else:
            print('No')
            exit()
    elif(0<i and s[i]=='i'):
        if(s[i+1]=='h'):
            if(i+2<len(s) and s[i+2]=='i'):
                continue
            else:
                print('No')
                exit()
        else:
            print('No')
            exit()
    else:
        print('No')
        exit()
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int,input().split())
k=[]
ans=0
count=(n//(a+b))
bb=[]
aa=[]
for j in range(a):
    k.append('b')
for t in range(b):
    k.append('r')
kk=k
for i in range(count):
    for y in range(len(k)):
        kk.append(k[y])
print(kk[:n].count('b'))

Fixed submission:
n,a,b=map(int,input().split())
t=n//(a+b)
j=n%(a+b)
ans=0
q=t*a
if(j<=a):
    p=j
else:
    p=a
ans=p+q
print(ans)
Buggy python submission (verdict: Runtime Error):
A1=[int(e) for e in input().split()]
A2=[int(f) for f in input().split()]
A3=[int(g) for g in input().split()]
N=int(input())
for i in range(N):
    b=int(input())
    for j in range(3):
        if b==A1[j]:
            A1[j]= -1
        elif b==A2[j]:
            A2[j]= -1
        elif b==A3[j]:
            A3[j]= -1
if A1[0]==-1 and A2[0]==-1 and A3[0]==-1:
    print('Yes')
elif A1[1]==-1 and A2[1]==-1 and A3[1]==-1:
    print('Yes')
elif A1[2]==-1 and A2[2]==-1 and A3[2]==-1:
    print('Yes')
elif A1[0]==-1 and A1[1]==-1 and A1[2]==-1:
    print('Yes')
elif A2[0]==-1 and A2[1]==-1 and A2[2]==-1:
    print('Yes')
elif A3[0]==-1 and A3[1]==-1 and A3[2]==-1:
    print('Yes')
elif A1[0]==-1 and A2[1]==-1 and A3[2]==-1:
    print('Yes')
elif A3[0]==-1 and A2[1]==-1 and A1[2]==-1:
    print('Yes')
else:
    print('No')

Fixed submission:
n=int(input())
print(n//2+n%2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[input() for _ in range(n)]
ans={}
for i in range(len(s)):
    if(s[i] not in ans):
        ans[s[i]] = 1
    else:
        ans[s[i]] += 1
ans=sorted(ans.items(), key = lambda x:x[1], reverse = True)
anss=[]
anss.append(ans[0][0])
for j in range(1,len(ans)):
    if(ans[j][1] == ans[0][1]):
        anss.append(ans[j][0])
    else:
        break
for t in sorted(anss):
    print(t)

Fixed submission:
a=len(set(list(map(int,input().split()))))
if(a==2):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
if(n==m)
	print('Yes')
else:
  print('No')


Fixed submission:
n,m=map(int,input().split())
if(n==m):
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
b=list(map(int,input().split()))
a=[]
ans=b[0]
a.append(ans)
for i in range(1,n-1):
    if(b[i] < ans):
        a.append(b[i])
    else:
        a.append(ans)
    ans=b[i]
a.append(b[i])
print(sum(a))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=0
count=-1
acount=0
for i in a:
    ans+=b[i-1]
    if(acount <= len(a)-2):
        if(a[acount+1]==i+1):
            #print('cappned')
            ans+=c[i-1]
    count=i
    acount+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
b=list(map(int,input().split()))
a=[]
ans=b[0]
a.append(ans)
for i in range(1,n-1):
    if(b[i] < ans):
        a.append(b[i])
    else:
        a.append(ans)
    ans=b[i]
a.append(b[i])
print(sum(a))

Fixed submission:
n=int(input())
b=list(map(int,input().split()))
a=[]
ans=b[0]
a.append(ans)
#print(n-2)
#exit()
if(n-2==0):
    print(b[0]*2)
    exit()
for i in range(1,n-1):
    if(b[i] < ans):
        a.append(b[i])
    else:
        a.append(ans)
    ans=b[i]
a.append(b[i])
print(sum(a))

Buggy python submission (verdict: Runtime Error):
n=int(input())
b=list(map(int,input().split()))
a=[]
ans=b[0]
a.append(ans)
for i in range(1,n-1):
    #print('i=',i)
    if(b[i] < ans):
        a.append(b[i])
    else:
        a.append(ans)
    ans=b[i]
a.append(b[i])
print(sum(a))

Fixed submission:
n=int(input())
b=list(map(int,input().split()))
a=[]
ans=b[0]
a.append(ans)
#print(n-2)
#exit()
if(n-2==0):
    print(b[0]*2)
    exit()
for i in range(1,n-1):
    if(b[i] < ans):
        a.append(b[i])
    else:
        a.append(ans)
    ans=b[i]
a.append(b[i])
print(sum(a))
Buggy python submission (verdict: Runtime Error):
print(3*(int(input())**2)

Fixed submission:
print(3*(int(input()))**2)