| 比赛 | 小练习赛:A组 | 评测结果 | WWWWWWWWWW |
|---|---|---|---|
| 题目名称 | 明明的随机数 | 最终得分 | 0 |
| 用户昵称 | 奶猹 | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.30 MiB |
| 提交时间 | 2014-10-21 18:39:15 | ||
#include<cstdio>
#include<algorithm>
int n;
int a[101];
int c[1001];
int main()
{
freopen("random.in","r",stdin);
freopen("random.out","w",stdout);
scanf("%d",&n);
int tot=0;
for(int i=1;i<=n;i++)
{
int x;
scanf("%d",&x);
if(!c[x])
{
c[x]++;
tot++;
a[tot]=x;
}
}
std::sort(a+1,a+tot+1);
for(int i=1;i<=tot;i++)printf("%d ",a[i]);
}