Buggy python submission (verdict: Runtime Error):
_temp = []
with open('_input_alds1', 'r') as f:
    for line in f.readlines():
        _temp.append(int(line.rstrip()))

_temp = _temp[1:]
my_max = []

for i, val in enumerate(_temp[:-1]):
    my = max(_temp[i + 1:]) - val
    if i == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)

Buggy python submission (verdict: Time Limit Exceeded):
_temp = []
my_max = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

for i, val in enumerate(_temp[:-1]):
    my = max(_temp[i + 1:]) - val
    if i == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)

Buggy python submission (verdict: Time Limit Exceeded):
_temp = []
my_max = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

for i, val in enumerate(_temp[:-1]):
    my = max(_temp[i + 1:]) - val
    if i == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)

Buggy python submission (verdict: Runtime Error):
from _collections import deque

_temp = deque([])
my_max = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

for val in _temp:
    v = _temp.popleft()
    my = max(_temp) - v
    if i == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)

Buggy python submission (verdict: Time Limit Exceeded):
from _collections import deque

_temp = deque([])
my_max = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue



for val in list(_temp)[:-1]:
    v = _temp.popleft()
    my = max(_temp) - v

    if len(my_max) == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)

Buggy python submission (verdict: Runtime Error):
from _collections import deque

_temp = deque([])
my_max = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue


for val in list(_temp)[:-1]:
    v = _temp.popleft()
    my = max(_temp) - v

    if len(my_max) == 0:
        my_max.append(my)
    else:
        if my > max(my_max):
            my_max.append(my)

print(max(my_max))

Fixed submission:
_temp = []

size = int(input().rstrip())
for i in range(size):
    try:
        _temp.append(int(input()))
    except EOFError:
        continue

my_max = -20000000000000
my_min = _temp.pop(0)


for val in _temp:
    my_max = max(my_max, (val - my_min))
    my_min = min(my_min, val)

print(my_max)