#include <iostream>
#include <map>
#include <unordered_map>
using namespace std;
int main() {
int n;
while (scanf("%d", &n) && n != 0) {
unordered_map<int, long> mp;
int num;
while (n--) {
scanf("%d", &num);
mp[num]++;
}
for (auto m : mp) {
if (m.second % 2 == 1)
cout << m.first << endl;
}
}
return 0;
}
杭电OJ 2095 find your present (2) C++ MAP的应用
最新推荐文章于 2024-05-09 13:07:10 发布