Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
74484 刘轻松 19从小到大进行排序 C++ Accepted 1 MS 660 KB 251 2024-05-25 14:18:23

Tests(10/10):


Code:

#include<iostream> using namespace std; int a[100000]; int main(){ int n,k; cin>>n; for(int i=1;i<=n;i++){ cin>>k; a[k]++; } for(int j=0;j<=100000;j++){ while(a[j]>0){ cout<<j<<' '; a[j]--; } } return 0; }