Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120832 | 蒋骏逸 | 22插入数据 | C++ | Wrong Answer | 0 MS | 272 KB | 355 | 2025-06-01 09:59:43 |
#include<bits/stdc++.h> using namespace std; int main() { int m,a[101],n,xb=0; cin>>m; for(int i=1;i<m-1;i++) cin>>a[i]; cin>>n; for(int i=1;i<m-1;i++) { if(a[i]>=n && a[i]<=n) xb=i+1; if(a[m-2]>=n) xb=n-1; } for(int i=m-2;i>=xb;i--) a[i+1]=a[i]; a[xb]=m; for(int i=0;i<=m;i++) cout<<a[i]<<" "; return 0; }
------Input------
25 566 561 556 551 546 541 536 531 526 521 516 511 506 501 496 491 486 481 476 471 466 461 456 456 210
------Answer-----
566 561 556 551 546 541 536 531 526 521 516 511 506 501 496 491 486 481 476 471 466 461 456 456 210
------Your output-----
8014944 566 561 556 551 546 541 536 531 526 521 516 511 506 501 496 491 486 481 476 471 466 461 456 0 0