| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157155 | 陈骏睿 | 插入排序 | C++ | Runtime Error | 1 MS | 276 KB | 550 | 2026-07-20 12:04:52 |
#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[51]; 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(i=0;i<n;i++)cout<<a[i]<<' '; return 0; }
*** stack smashing detected ***: ./Main terminated