Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81128 刘宇轩 19从小到大进行排序 C++ Accepted 1 MS 1052 KB 279 2024-07-12 10:27:42

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,m,x=0,a[200000]={0}; bool b=0; cin>>n; for(int i=1;i<=n;i++){ cin>>m; a[m]++; } for(int i=0;i<=100000;i++){ while(a[i]>0){ cout<<i<<' '; a[i]--; } } return 0; }