Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131335 王奕杰 22插入数据 C++ Wrong Answer 1 MS 276 KB 728 2025-09-22 20:00:09

Tests(4/10):


Code:

#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 n,m,a[101]; cin>>n; for(int i=0;i<=n-2;i++){ cin>>a[i]; } cin>>m; for(int i=0;i<=n-2;i++){ if(a[i]>m&&a[i+1]<m){ a[n+1]=a[i+1]; a[i+1]=m; for(int j=i+2;j<=n-1;j++){ a[n]=a[j]; a[j]=a[n+1]; a[n+1]=a[n]; } break; } } for(int i=0;i<=n-1;i++){ cout<<a[i]<<' '; } return 0; }


Run Info:

------Input------
13 530 525 520 515 510 505 500 495 490 485 480 480 67
------Answer-----
530 525 520 515 510 505 500 495 490 485 480 480 67
------Your output-----
530 525 520 515 510 505 500 495 490 485 480 480 8045728