mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1433.cpp
This commit is contained in:
parent
54ad675a3b
commit
bdd6576996
27
QUSTOJ/1433.cpp
Normal file
27
QUSTOJ/1433.cpp
Normal 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
|
||||
*/
|
Loading…
Reference in New Issue
Block a user