Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108929 | 高楷伦 | 19从小到大进行排序 | C++ | Accepted | 1 MS | 1056 KB | 512 | 2025-01-23 16:31:26 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[100001]={0},s,max,b[100001]={0}; cin>>s; for(int i=0;i<s;i++){ cin>>max; a[max]=max; b[max]++; } for(int i=0;i<100000;i++){ if(a[i]>=1){ for(int j=0;j<b[i];j++){ cout<<a[i]<<" "; } } } return 0; }