class Solution: def getDis(self , A: List[int], n: int) -> int: # write code here pos = A[0] # 标记最小值 res = 0 # 标记结果 for i in A: if i < pos: pos = i if i - pos > res: res = i - pos return res