Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2506 | 吴奕希 | 19从小到大进行排序 | C++ | Accepted | 0 MS | 652 KB | 380 | 2024-01-06 18:38:43 |
#include<iostream> using namespace std; int main() { int n, m, temp[100001]={}, _max=0; cin>>n; for(int i = 0; i < n; i++) { cin>>m; if(m>_max)_max=m; temp[m-1]++; } for(int i = 0; i < _max; i++) { for(int a = 0; a < temp[i]; a++) { cout<<i+1<<" "; } } return 0; }