#include<bits/stdc++.h>   using namespace std;   #pragma GCC target ( avx2 )   #pragma GCC optimize ( Ofast )   #pragma GCC optimize ( unroll-loops )   #pragma GCC target( avx,avx2,fma )   #pragma GCC optimize( O3 )   #define F first   #define S second   #define sz size()   #define pb push_back   #define int long long   #define all(x) (x).begin(),(x).end()   #define NFS ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0) ;   #define file(s) if (fopen(s .in ,  r )) freopen(s .in ,  r , stdin), freopen(s .out ,  w , stdout);   template <class T> inline T pw(T a, int n,  T res = 1){while (n) {if (n & 1) res *= a;a *= a;n >>= 1;}return res;}   template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; }   template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os <<  { ; for (auto v : vec) os << v <<  , ; os <<  } ; return os; }   const int E = 1e6+777;   const int inf = 1e18+777;   const int N = 1e5+777;   const bool O = 0;   const bool I = 1;   signed main(){auto solve=[&](){    int n;    cin >> n;    map<int,int>mp;    for(int i = 1, x; i <= n; i++){     cin >> x;     mp[x]++;    }    int ans = n & 1;    for(auto i : mp){     if(i.S > n / 2){      ans = i.S - (n - i.S);     }    }    cout << ans <<   n ;   };if(O)NFS;if(I){int T;cin>>T;while(T--)solve();exit(0);}solve();}               