#include <stdio.h>
int main ()
{
int a[9999] = {0};
int n, x, sum = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
scanf("%d", &x);
a[x]++;
}
for (int i = 0; i < 9999; i++)
{
if (a[i] > 0)
{
sum++;
}
}
printf("%d\n", sum);
for (int i = 0; i < 9999; i++)
{
if (a[i] > 0)
printf("%d ", i);
}
return 0;
}
洛谷-明明的随机数
最新推荐文章于 2024-07-02 09:05:01 发布