#include using namespace std; // OM NAMAH SHIVAY #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl "\n" #define int long long #define F first #define S second #define all(x) (x).begin(), (x).end() const int inf = 1e18; // int dx[4]={-1,0,1,0}; // int dy[4]={0,1,0,-1}; // int dx[8]={0,-1,-1,-1,0,1,1,1}; // int dy[8]={1,1,0,-1,-1,-1,0,1}; const int N = 200200; const int mod = 1e9+7; using ii = pair; void solver(){ int n;cin>>n; priority_queues; for(int i=0;i>x; s.push(x); } int a = 0, b = 0, turn = 0; while(!s.empty()) { if(turn%2==0) { a+=s.top();s.pop(); } else { b+=s.top();s.pop(); } } cout<<(a+b)<>_t;while(_t--) solver(); return 0; } #undef int