Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
margin = max(a) - min(a)
print(margin)


Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
margin = max(a) - min(a)
print(min(a))



Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

min_value = -200000

for a in range(a)
    max_mergin = max(max_mergin,a - min_value)
    min_value = min(min_value,a)
print(max_mergin)




Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

min_value = -200000

for a in range(a)
    max_value = max(max_value,a - min_value)
    min_value = min(min_value,a)
print(max_value-min_value)



Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

min_value = -200000

for a in range(a)
    max_value = max(max_value,a - min_value)
    min_value = min(min_value,a)
print(max_value)



Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

max_mergin = -200000
min_value = a[0]
for abc in range(a):
    max_mergin = max(max_mergin,abc - min_value)
    min_value = min(min_value,abc)
    
print(max_mergin)



Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

max_mergin = -20000000000
min_value = a[0]
for abc in range(1,a):
    max_mergin = max(max_mergin, a[abc] - min_value)
    min_value = min(min_value,  a[abc])
    
print(max_mergin)


Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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

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

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


Fixed submission:
n = int(input())
R = [int(input()) for i in range(n)]

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