Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
152355 王丞杰 打印每一趟插入排序 C++ Wrong Answer 1 MS 264 KB 316 2026-04-25 15:33:24

Tests(0/4):


Code:

#include<bits/stdc++.h> using namespace std; int a[2001]={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; } }


Run Info:

------Input------
5 5 2 7 9 1
------Answer-----
2 5 7 9 1 2 5 7 9 1 2 5 7 9 1 1 2 5 7 9
------Your output-----
46 74 53 14 26 38 86 65 27 34 46 74 74 14 26 38 86 65 27 34 46 46 74 74 26 38 86 65 27 34 46 46 46 74 74 38 86 65 27 34 46 46 46 46 74 74 86 65 27 34 46 46 46 46 86 74 86 65 27 34 46 46 65 46 86 86 74 86 27 34 46 46 46 65 46 86 86 74 86 34 46 46 46 46 65 46 86 86 74 86 46 46 46 46 46 65 46 86 86 74