| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149604 | 陈棋 | 插入排序 | C++ | Accepted | 6 MS | 284 KB | 343 | 2026-03-14 16:55:45 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[2001],temp; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n-1;i++){ for(int j=0;j<n-1;j++){ if(a[j]>a[j+1]){ temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } for(int i=0;i<n;i++){ cout<<a[i]<<" "; } return 0; }