| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149648 | 吴雨卓 | 初级冒泡排序 | C++ | Accepted | 8 MS | 280 KB | 319 | 2026-03-15 15:02:09 |
#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-i;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; }