给定n个数字,判断哪个数字出现次数是奇数次
# include<iostream>
# include<cstring>
# include<map>
using namespace std;
map<string, bool> hash_map;
int n;
int main()
{
cin>>n;
while(n--)
{
string str;
cin>>str;
if(hash_map.find(str)!=hash_map.end())
hash_map[str] = !hash_map[str];
else
hash_map[str] = false;
}
for(auto t:hash_map)
if(!t.second) cout<<t.first<<endl;
}