'commit'
This commit is contained in:
27
TangDou/LuoGuBook/P4305_1.cpp
Normal file
27
TangDou/LuoGuBook/P4305_1.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
int t;//数据组数
|
||||
int n;//表示给定的数
|
||||
unordered_map<int, int> _map;
|
||||
int x;
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(0); //注意使用cin.tie(0);
|
||||
|
||||
cin >> t;
|
||||
while (t--) {
|
||||
cin >> n;
|
||||
_map.clear();
|
||||
for (int i = 1; i <= n; i++) {
|
||||
cin >> x;
|
||||
if (!_map[x]) {
|
||||
cout<<x<<" ";
|
||||
_map[x] = 1;
|
||||
}
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user