C题
#include <bits/stdc++.h>

using namespace std;
int t, n;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    cin >> t;
    while (t--) {
        cin >> n;
        map<int, int> mp;
        for (int i = 0; i < n; i++) {
            int x;
            cin >> x;
            mp[x]++;
        }
        int ans = 0;
        for (auto it : mp) {
            int t = it.second;
            if (t % 2 == 0) ans += 2;
            else ans += 1;
        }
        cout << ans << endl;
    }
    return 0;
}