Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
152357 王丞杰 打印每一趟选择排序 C++ Output Limit Exceeded 2 MS 264 KB 312 2026-04-25 15:35:14

Tests(0/4):


Code:

#include<bits/stdc++.h> using namespace std; int a[]={46,74,53,14,26,38,86,65,27,34}; int main(){ int n=10; for(int i=1;i<=n;i++){ int jb=a[i]; int j=i-1; while(j>=0 && a[j]>jb){ a[j+1]=a[j]; j--; } a[j-1]=jb; for(int k=0;k<n;k++){ cout<<a[k]<<" "; } cout<<endl; } }