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

for i in range(n-1):
  maxv = max(maxv, R[i]-minv)
  minv = min(minv, R[i])

print maxv

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = R[]

for i in range(n-1):
 if max <= R[i] - min:
  max = R[i] - min
 if R[i] <= min:
  min = R[i]

print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = R[]

for i in range(0, n-1):
 if R[i] <= min:
   min = R[i]
 if max <= R[i] - min:
  max = R[i] - min

print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = R[]

for i in range(0, n-1):
 R[i] = input()
 if R[i] <= min:
   min = R[i]
 if max <= R[i] - min:
  max = R[i] - min

print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = 0
 
for i in range(0, n-1):
 R[i] = input()
 if R[i] <= min:
   min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = 0
 
for i in range(0, n-1):
 R[i] = input()
 if R[i] <= min:
   min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
 
for i in range(0, n-1):
 R[i] = input()
 min = R[0]

for i in range(0, n-1):
 if R[i] <= min:
   min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
min = input()
 
for i in range(n-1):
 if R[i] <= min:
  min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
 
for i in range(0, n-1):
 R[i] = input()

min = R[0]

for i in range(0, n-1):
 if R[i] <= min:
  min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
max = -10**9
 
for i in range(0, n-1):
 R[i] = input()

min = R[0]

for i in range(0, n-1):
 if R[i] <= min:
  min = R[i]
 if max <= R[i] - min:
  max = R[i] - min
 
print max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
n_max = -10**9
 
for i in range(0, n-1):
 R[i] = input()

n_min = R[0]

for i in range(0, n-1):
 if R[i] <= n_min:
  n_min = R[i]
 if max <= R[i] - n_min:
  n_max = R[i] - n_min
 
print n_max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max

Buggy python submission (verdict: Runtime Error):
n = input()
n_max = -10**9
 
for i in range(0, n-1):
 R[i] = input()

n_min = R[0]

for i in range(0, n-1):
 if R[i] <= n_min:
  n_min = R[i]
 if n_max <= R[i] - n_min:
  n_max = R[i] - n_min
 
print n_max

Fixed submission:
n = input()
n_max = -(10**9)
n_min = input() 

for i in range(0, n-1):
 R = input()
 if n_max < R - n_min:
  n_max = R - n_min
 if R < n_min:
  n_min = R
 
print n_max