delete pics to save space
This commit is contained in:
15
1.1059.cpp
Normal file
15
1.1059.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int n,a[1001],res,t;
|
||||
int main()
|
||||
{
|
||||
scanf("%d",&n);
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
scanf("%d",&t);
|
||||
if(a[t]==0) a[t]=t,res++;
|
||||
}
|
||||
printf("%d\n",res);
|
||||
for(int i=0;i<1001;i++) if(a[i]!=0) printf("%d ",a[i]);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user