sort不好吗~
by _Felix @ 2018-10-28 18:35:53
优先队列/堆 了解一下
by 求败 @ 2018-10-28 18:39:24
这题桶排不好吗。。。
by Ophelia @ 2018-10-28 18:41:14
双端队列了解一下?
by _Felix @ 2018-10-28 18:41:35
N<=100......
by King_of_gamers @ 2018-10-28 18:43:03
@[紫阳花](/space/show?uid=88216) set了解一下
```cpp
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
using namespace std;
set<int> st2;
set<int> ::iterator it;
int main()
{
register int n,a[110];
scanf("%d",&n);
for(register int i=0;i<n;i++)
{
scanf("%d",&a[i]);
st2.insert(a[i]);
}
printf("%d\n",st2.size());
for(it=st2.begin();it!=st2.end();it++)
printf("%d ",*it);
return 0;
}
```
by durbin中将 @ 2018-11-01 20:21:18