| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140915 | 杜禹轩 | 19从小到大进行排序 | C++ | Accepted | 0 MS | 276 KB | 331 | 2025-12-20 14:31:43 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[1000],o; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int o=1;o<n;o++){ for(int i=1;i<n;i++){ if(a[i]>a[i+1]){ int t=a[i]; a[i]=a[i+1]; a[i+1]=t; } }} for(int i=1;i<=n;i++){ cout<<a[i]<<" "; } return 0; }