#include <stdio.h>
#include <algorithm>
using namespace std;
#define maxn 110
int arr[maxn];
int main() {
int t, n, i;
scanf("%d", &t);
while(t--) {
scanf("%d", &n);
for(i = 0; i < n; ++i)
scanf("%d", &arr[i]);
sort(arr, arr + n);
n = unique(arr, arr + n) - arr;
printf("%d\n",n);
for(i = 0; i < n; ++i)
if(i == n - 1) printf("%d\n", arr[i]);
else printf("%d ", arr[i]);
}
return 0;
}
1030873 | hpu_yw | C小加 之 随机数 | Accepted | 0 | 232 | C/C++ | 10-29 22:30:28 |