Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108919 | 高楷伦 | 19从小到大进行排序 | C++ | Wrong Answer | 1 MS | 660 KB | 454 | 2025-01-23 16:09:59 |
#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; cin>>s; for(int i=0;i<s;i++){ cin>>max; a[max]=max; } for(int i=0;i<100000;i++){ if(a[i]>=1){ cout<<a[i]<<" "; } } return 0; }
------Input------
84 35 82 92 33 82 13 5 59 39 89 67 56 72 48 94 16 52 91 6 63 12 77 73 76 25 59 87 23 70 53 63 80 23 27 85 20 60 89 29 71 44 80 43 21 80 46 64 69 45 44 75 8 73 10 39 76 72 74 4 40 21 69 60 73 22 38 85 6 78 80 100 20 29 55 64 77 5 49 11 10 80 79 100 22
------Answer-----
4 5 5 6 6 8 10 10 11 12 13 16 20 20 21 21 22 22 23 23 25 27 29 29 33 35 38 39 39 40 43 44 44 45 46 48 49 52 53 55 56 59 59 60 60 63 63 64 64 67 69 69 70 71 72 72 73 73 73 74 75 76 76 77 77 78 79 80 80 80 80 80 82 82 85 85 87 89 89 91 92 94 100 100
------Your output-----
4 5 6 8 10 11 12 13 16 20 21 22 23 25 27 29 33 35 38 39 40 43 44 45 46 48 49 52 53 55 56 59 60 63 64 67 69 70 71 72 73 74 75 76 77 78 79 80 82 85 87 89 91 92 94 100