Skip to content

Instantly share code, notes, and snippets.

@likecs
Created November 20, 2017 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save likecs/ea4301d697fdf608548a4bb13c3f0708 to your computer and use it in GitHub Desktop.
Save likecs/ea4301d697fdf608548a4bb13c3f0708 to your computer and use it in GitHub Desktop.
Model Solution 2 of GEEK03
#include <bits/stdc++.h>
using namespace std;
int main() {
int t, n;
string s;
cin >> t;
while(t--) {
cin >> n;
map<string, int> mp;
for(int i = 0; i < n; ++i) {
cin >> s;
mp[s] += 1;
}
int ans = 0;
for(auto it : mp) {
if (it.second % 2 == 1) {
ans += 1;
}
}
cout << ans << "\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment