#include using namespace std; int main(){ using ll=long long; int n; cin>>n; vector a(n); for (int i=0;i>a[i]; auto f=[&](ll x,ll y){ if (x<0&&y<0) return -(x+y); else return abs(x-y); }; ll ans=1e18; auto g=[&](){ ll s=0; for (int i=0;is) ans=s; }; sort(a.begin(),a.end()); g(); for (int i=1;i