'commit'
This commit is contained in:
22
TangDou/XiTi/1369.cpp
Normal file
22
TangDou/XiTi/1369.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user