Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121217 龚睿晨 18插队喝水 C++ Accepted 1 MS 272 KB 279 2025-06-07 09:41:38

Tests(10/10):


Code:

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