Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
4999 huangshengxuan 排序-难度系数2 C++ 运行超时 3000 MS 248 KB 339 2023-01-13 20:15:19

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int a[5]; for(int i=0;i<5;i++){ cin>>a[i]; } for(int j=0;j<5;j++){ for(int i=0;i<=4-j;i++) if(a[i]>a[i+1]){ int temp; temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; } } for(int i=0;i<6;i++){ cout<<a[i]<<","; } return 0; }


测评信息: