Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
354778 耿家钧 【C4-3】 数组插入元素 C++ Accepted 100 3 MS 240 KB 269 2025-10-06 15:57:46

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int n,a[120],x,y; int main(){ cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; cin>>x>>y; for(int i=n;i>=x;i--){ a[i+1]=a[i]; } a[x]=y; for(int i=1;i<=n+1;i++){ cout<<a[i]<<" "; } return 0; }


Judgement Protocol: