79748923

Date: 2025-08-28 10:13:49
Score: 0.5
Natty:
Report link
a = int(input())
q = a
b = []
fheight = []
j = 0
sheight = []
jkf = []

for i in range(a):
    c = int(input())
    b.append(c)

for p in range(a-1):    
    n=p
    k=p+1 
    q -= 1

    for i in range(q):
        d = (b[n]-b[k])
        if d < 0:
            k += 1
            fheight.append(d)
            jkf.append(p)

        else:   
            k += 1
m = min(fheight)*-1
h = fheight.index(min(fheight))
s = (jkf[h]) + 1
for p in range(s, a-1):    
    n=p
    k=p+1 
    q = (a-1) - p

    for i in range(q):
        d = (b[n]-b[k])
        if d > 0:
            k += 1
            sheight.append(d)

        else:
            
            k += 1
print(max(sheight) + m)




Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: masdfghjk