Buggy python submission (verdict: Runtime Error):
n = input()
a = []
a = [input() for i in range(n)]
i = 0
j = 1
max = a[j] - a[i]

while n > i:
  j = i+1
  while n > j:
    if max < a[j] - a[i]:
      max = a[j] - a[j]
    j += 1
  i += 1

print '{0}',format(max)

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

Buggy python submission (verdict: Runtime Error):
n = input()
a0 = input()
a1 = input()
maxv = a1 - a0
minv = a0

for j in range(n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

Buggy python submission (verdict: Runtime Error):
n = input()
a0 = input()
a1 = input()
maxv = a1 - a0
minv = a0

for j in range(1:n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

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

for j in range(1:n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

Buggy python submission (verdict: Runtime Error):
import math

n = input()
maxv = -1 * 10**9
minv = input()

for j in range(1:n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

Buggy python submission (verdict: Runtime Error):
import math

n = input()
maxv = -1 * 10**9
minv = input()

for j in range(1:n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print '{0}'.format(maxv)

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

Buggy python submission (verdict: Runtime Error):
import math

n = input()
maxv = -1 * 10**9
minv = input()

for i in range(1:n-1):
  v = input()
  maxv = max(maxv, v-minv)
  minv = min(v, minv)

print '{0}'.format(maxv)

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v
    minv = v

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

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

for j in range(1,n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v
    minv = v

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv

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

for j in range(1,n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v
    minv = v

print maxv

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

for j in range(n-1):
  v = input()
  if maxv < v - minv:
    maxv = v - minv
  if minv > v:
    minv = v

print maxv