Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #define int long long int
- #define endl '\n'
- using namespace std;
- int a[200007];
- main()
- {
- ios::sync_with_stdio(0);cin.tie(0);
- int T;cin>>T;
- while(T--){
- int n;cin>>n;
- for(int i=1;i<=2*n;i++)cin>>a[i];
- sort(a+1,a+2*n+1);
- cout<<a[n+1]-a[n]<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement