| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61224 | 游四鑫 | 处理随机数 | C++ | Wrong Answer | 0 MS | 272 KB | 331 | 2023-12-03 10:32:53 |
#include<iostream> using namespace std; int a[200001],b[100001]={0}; int main(){ int n,x=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(x<a[i])x=a[i]; b[a[i]]++; if(b[a[i]]>1)b[a[i]]--; } for(int i=0;i<=x;i++){ while(b[i]>0){ cout<<i<<' '; b[i]--; } } return 0; }
------Input------
9 10 29 39 67 58 48 29 57 23
------Answer-----
8 10 23 29 39 48 57 58 67
------Your output-----
10 23 29 39 48 57 58 67