Buggy python submission (verdict: Runtime Error):
def main(){
 
    int n, max, min, i;
    int R[200000];
 
    n = input()
    for i in n-1:
        R[i] = input()
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min
            min = R[i]
 
    print "%d" % max
 
    return 0

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    for i in n-1:
        R[i] = input()
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min
            min = R[i]
 
    print max
 
    return 0

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    for i in n-1:
        R[i] = input()
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max
 
    return 0

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    for i in n-1:
        R[i] = input()
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    for i in n-1:
        R[i] = input()
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    R = []

    for i in n-1:
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in n-1:
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    R = []

    for i in range(n-1):
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in range(n-1):
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
def main(){
 

    n = input()
    R = []

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

}
 

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
    n = input()
    R = []

    for i in range(n-1):
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in range(n-1):
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
    n = input()
    R = []

    for i in range(n):
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in range(n):
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
    n = input()
    R = []

    for i in range(n):
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in range(n):
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
    n = input()
    R = []

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

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
n = input()
R = []

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

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
n = input()
R = []

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

Fixed submission:
n = input()

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

Buggy python submission (verdict: Runtime Error):
n = input()
R = []

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

Fixed submission:
n = input()

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