Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  R[0]
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       min = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  R[0]
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  R[0]
maxv = (-1)*10**9

  for j in range(2, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv
print max

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv
print maxv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[j+1] - minv:
       maxv = R[j+1] - minv
print maxv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
R[0] = 0
maxv = (-1)*10**9

for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[j+1] - minv:
       maxv = R[j+1] - minv
print maxv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
minv =  10**9
R[0] = 0
maxv = (-1)*10**9

for j in range(n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[j+1] - minv:
       maxv = R[j+1] - minv
print maxv

Fixed submission:
n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv