You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
400 B
23 lines
400 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int a[20000] = {0};
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
unordered_map<int, int> _map;
|
|
for (int i = 0; i < n; ++i) {
|
|
cin >> a[i];
|
|
}
|
|
for (int i = 0; i < n; ++i) {
|
|
if (_map.count(a[i]) == 0) {
|
|
cout << a[i] << " ";
|
|
}
|
|
_map[a[i]]++;
|
|
}
|
|
cout << endl;
|
|
return 0;
|
|
}
|