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.

24 lines
478 B

#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;
}