import sequtils,strutils,algorithm,math,sugar,macros,strformat template get*():string = stdin.readLine().strip() template `min=`*(x,y) = x = min(x,y) let n = get().parseInt() let X = get().split().map(parseInt).sorted(cmp) var res = X[^1] - X[0] for i in 1..