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

a='Yes'
before=0
if N>1:
  for i in range(N-1):
    if l[i]=l[i+1]:
      before=l[i+1]
    elif l[i]<l[i+1]:
      before=l[i+1]-1
    else:
      a='No'
    
print(a)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

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

a='Yes'
if N>1:
  for i in range(N-1):
    if l[i]=l[i+1]:
      continue
    elif l[i]<l[i+1]:
      l[i+1]-=1
    else:
      a='No'
    
print(a)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

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

a='Yes'
for i in range(N-1):
  if l[i]=l[i+1]:
    continue
  elif l[i]<l[i+1]:
    l[i+1]-=1
  else:
    a='No'
    
print(a)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

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

a='Yes'
for i in range(N-1):
  if a[i]=a[i+1]:
    continue
  elif a[i]<a[i+1]:
    a[i+1]-=1
  else:
    a='No'
    
print(a)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

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

if N>=2:
  for i in range(N):
    if l[i]<=l[i+1]:
      continue
    elif l[i]==l[i+1]-1:
      l[i+1]=l[i+1]-1
    else:
      print('No')
        
print('Yes')

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

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

if N>=2:
  for i in range(N):
    if l[i]<=l[i+1]:
      continue
    elif l[i]+1==l[i+1]:
      l[i+1]-=1
    else:
      print('No')
        
print('Yes')

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
l=list[map(int,input().split())]

if N>=2:
  for i in range(N-1):
    if l[i]<=l[i+1]:
      continue
    elif l[i]==l[i+1]+1:
      l[i+1]=l[i+1]+1
    else:
        print('No')
        
print('Yes')

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
l=list[map(int,input().split())]

if N>=2:
  for i in range(N-1):
    if l[i]<=l[i+1]:
      continue
    elif l[i]==l[i+1]+1:
      l[i+1]=l[i+1]+1
    else:
        print('No')
        
print('Yes

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
l=list[map(int,input().split())]

if N>=2:
  for i in range(N):
    if l[i]<=l[i+1]:
      continue
    elif l[i]==l[i+1]+1:
      l[i+1]=l[i+1]+1
    else:
        print('No')
        
print('Yes

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
list=list[map(int,input().split())]

x='Yes'
if N>=2:
  for i in range(N):
    if list[i]<=list[i+1]:
      continue
    elif list[i]==list[i+1]+1:
      list[i+1]=list[i+1]+1
    else:
        x='No'
    
print(x)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
list=list[map(int,input().split())]

x='Yes'
for i in range(N):
  if list[i]<=list[i+1]:
    continue()
  elif list[i]==list[i+1]+1:
    list[i+1]=list[i+1]+1
  else:
    x='No'
    
print(x)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
list=[int(i) for i in str(input())]

x='Yes'
for i in range(N):
  if list[i]<=list[i+1]:
    continue()
  elif list[i]==list[i+1]+1:
    list[i+1]=list[i+1]+1
  else:
    x='No'
    
print(x)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)

Buggy python submission (verdict: Runtime Error):
N=int(input())
list=[int(i) for i in str(input())]

x='Yes'
for i in range(N):
  if list[i]==list[i+1]:
    continue()
  elif list[i]==list[i+1]+1:
    list[i+1]=list[i+1]+1
  else:
    x='No'
    
print(x)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
before = 0
result = 'Yes'
for i in range(len(h)):
    if i == 0:
        before = h[i] - 1
    else:
        if before < h[i]:
            before = h[i] - 1
        elif before == h[i]:
            before = h[i]
        else:
            result = 'No'
print(result)