#include "bits/stdc++.h" using namespace std; typedef long long ll; #define rep(i,l,r) for(int i=l;i inline void in(Head&& head,Tail&&... tail){ cin>>head; in(move(tail)...); } template inline void out(T t) { cout< inline void out(Head head,Tail... tail){ cout<0;i--)a[i]-=a[i-1]; out(*min_element(a+1, a+n),max); }