24 lines
478 B
C++
24 lines
478 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int t;//数据组数
|
|
int n;//表示给定的数
|
|
unordered_map<int, int> _map;
|
|
int x;
|
|
|
|
int main() {
|
|
scanf("%d",&t);
|
|
while (t--) {
|
|
scanf("%d",&n);
|
|
_map.clear();
|
|
for (int i = 1; i <= n; i++) {
|
|
scanf("%d",&x);
|
|
if (!_map[x]) {
|
|
printf("%d ", x);
|
|
_map[x] = 1;
|
|
}
|
|
}
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
} |