Create 1433.cpp

pull/22/head
Kirigaya Kazuto 2016-06-16 11:52:41 +08:00 committed by GitHub
parent 54ad675a3b
commit bdd6576996
1 changed files with 27 additions and 0 deletions

27
QUSTOJ/1433.cpp Normal file
View File

@ -0,0 +1,27 @@
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main()
{
int a[1001],n,m,i;
memset(a,0,sizeof(a));
cin>>n;
int count=0;
for(i=1;i<=n;i++)
{
cin>>m;
a[m]++;
}
for(i=1;i<=1000;i++)
if(a[i]!=0) count++;
cout<<count<<endl;
for(i=1;i<=1000;i++)
if(a[i]!=0) cout<<i<<' ';
return 0;
}
/**
100 765
19485
*/