Buggy python submission (verdict: Runtime Error):

N = int(input())
H = []
H = input().split(" ")
for i in range(N):
    H[i] = int(H[i])

ochinchin = True
for i in range(1, N):
    if H[i]<H[i-1]:
        H[i-1] -= 1
        if H[i]<H[i-1]:
            ochinchin = False
            break
        elif i >= 2:
            if H[i-1]<H[i-2]:
                ochinchin = False
                break

if ochinchin:
    print("Yes")
else:
    print("No")


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N:
    print("Yes")
else:
    print("No")

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-2):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-1):
    if A[i] >> A[i+1]:
        A[i] -= 1
    if A[i+1] >= A[i]:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")



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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a = int(input())
unchi = 0
for i in range(1,a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a = int(input())
unchi = 0
for i in range(a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a = int(input())
unchi = 0
while a>=1:
    a -= 1
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
from sys import stdin
a = stdin.readline().rstrip()
b = stdin.readline().rstrip()
c = stdin.readline().rstrip()

A = int(a)
B = int(b)
C = int(c)


X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
from sys import stdin
A = stdin.readline()
B = stdin.readline()
C = stdin.readline()

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

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

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)


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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)