有一个长度为 NNN 的序列 a1,a2,…,ana_1,a_2,\dots,a_na1,a2,…,an。
现在你需要把他切成四段,每段不能为空。
记四段和为 p,q,r,sp,q,r,sp,q,r,s,求 p,q,r,sp,q,r,sp,q,r,s 中最大值与最小值的差的最小值。
样例:
5 3 2 4 1 2
2
4≤N≤2×1054 \le N \le 2 \times 10^54≤N≤2×105,1≤ai≤1091 \le a_i \le 10^91≤ai≤109。