Buggy python submission (verdict: Runtime Error):
import numpy as np
 
n = int(input())
hh = np.array([])
for i in range(n):
    hh.append(input())
 
for i in range(len(hh)-1):
   if hh[i] < hh[i+1]:
       hh[i+1] -= 1
np.diff(hh-1, n=1)
 
minus = [i for i in np.diff(hh-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:


Fixed submission:
import numpy as np
 
n = int(input())
h = list(map(int, input().split()))
 
h = np.array(h)
 
for i in range(len(h)-1):
   if h[i] < h[i+1]:
       h[i+1] -= 1
np.diff(h-1, n=1)
 
minus = [i for i in np.diff(h-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
h = []
for i in range(n):
    h.append(input())

for i in range(len(hh)-1):
   if hh[i] < hh[i+1]:
       hh[i+1] -= 1
np.diff(hh-1, n=1)

minus = [i for i in np.diff(hh-1, n=1) if i < 0]

if len(minus) > 0:
    print('No')
else:
    print('Yes')

Fixed submission:
import numpy as np
 
n = int(input())
h = list(map(int, input().split()))
 
h = np.array(h)
 
for i in range(len(h)-1):
   if h[i] < h[i+1]:
       h[i+1] -= 1
np.diff(h-1, n=1)
 
minus = [i for i in np.diff(h-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = []
for i in range(n):
    h.append(input())
 
# 単調非減少：x2がx1より小さくならない
flag = 'Yes'
for i in range(len(h)-1):
    # 次のほうが大きかったら、小さくしておく
    if h[i] <= h[i+1]:
        h[i+1] -= 1
        # 小さくして、次が小さくなったらOK
        if h[i] > h[i+1]:
            if n == i+1:
                break
            flag = 'No'
            break
print(flag)

Fixed submission:
import numpy as np
 
n = int(input())
h = list(map(int, input().split()))
 
h = np.array(h)
 
for i in range(len(h)-1):
   if h[i] < h[i+1]:
       h[i+1] -= 1
np.diff(h-1, n=1)
 
minus = [i for i in np.diff(h-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = []
for i in range(n):
    h.append(input())

# 単調非減少：x2がx1より小さくならない
flag = 'Yes'
for i in range(len(h)-1):
    # 次のほうが大きかったら、小さくしておく
    if h[i] < h[i+1]:
        h[i+1] -= 1
        # 小さくして、次が小さくなったらOK
        if h[i] > h[i+1]:
            if n == i+1:
                break
            flag = 'No'
            break
print(flag)

Fixed submission:
import numpy as np
 
n = int(input())
h = list(map(int, input().split()))
 
h = np.array(h)
 
for i in range(len(h)-1):
   if h[i] < h[i+1]:
       h[i+1] -= 1
np.diff(h-1, n=1)
 
minus = [i for i in np.diff(h-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = []
for i in range(n):
    h.append(input())

# 単調非減少：x2がx1より小さくならない
flag = 'Yes'
for i in range(len(h)-1):
    if h[i] < h[i+1]:
        h[i+1] -= 1
        if h[i] < h[i+1]:

            if n == i+1:
                break
            flag = 'No'
            break
print(flag)

Fixed submission:
import numpy as np
 
n = int(input())
h = list(map(int, input().split()))
 
h = np.array(h)
 
for i in range(len(h)-1):
   if h[i] < h[i+1]:
       h[i+1] -= 1
np.diff(h-1, n=1)
 
minus = [i for i in np.diff(h-1, n=1) if i < 0]
 
if len(minus) > 0:
    print('No')
else:
    print('Yes')