-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.cpp
More file actions
34 lines (30 loc) · 770 Bytes
/
code.cpp
File metadata and controls
34 lines (30 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<bits/stdc++.h>
using namespace std;
# define ll long long
# define fl(i, start, end) for(ll i = start; i < end; i++)
# define flr(i, start, end) for(ll i = end - 1; i >= start; i--)
# define vll vector<ll>
# define vs vector<char>
# define vvll vector<vector<ll>>
# define iv(a) fl(i, 0, a.size()) cin >> a[i] // input vector
# define pv(a) fl(i, 0, a.size()) cout << a[i] << " " // print vector
# define sv(a) sort(a.begin(), a.end())
int mod = (int) 1e9 + 7;
void solve(){
long long n;
cin >> n;
vll b(2 * n);
iv(b);
sv(b);
long long fs = 0, ls = 0;
flr(i, 0, n) fs += b[i];
flr(i, n, 2 * n) ls += b[i];
if(ls - fs > b[n * n - 1])
}
int main(){
long long tt;
cin >> tt;
while(tt--){
solve();
}
}