| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157162 | 陈骏睿 | 打印每一趟插入排序 | C++ | Output Limit Exceeded | 1 MS | 348 KB | 588 | 2026-07-20 12:10:18 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[20001]={}; int t,i,j,n; cin>>n; for(i=0;i<n;i++)cin>>a[i]; for(i=1;i<n;i++){ t=a[i]; for(j=i;i>0;j--){ if(a[j-1]>t)a[j]=a[j-1]; else break; } a[j]=t; for(int k=0;i<n;k++)cout<<a[k]<<' '; cout<<a[n-1]<<endl; } return 0; }