#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 long long get(int ind,vector &S1,vector &S2){ int n = S1.size()-1; //cout<>_t; rep(_,_t){ int n; cin>>n; vector a(n); rep(i,n)cin>>a[i]; sort(a.begin(),a.end()); vector S1(n+1,0),S2(n+1,0); rep(i,n){ S1[i+1] = a[i]; S2[i+1] = a[i]; if((n-1)%2==i%2){ S2[i+1] *= -1; } else{ S1[i+1] *= -1; } if(i==n-1){ S2[i+1] = 0; } S1[i+1] += S1[i]; S2[i+1] += S2[i]; } cout<