#include<bits/stdc++.h>
using namespace std;
int n, m, u, o;
int main(){
vector<int>a;
cin >> n;
for(int i = 0; i < n; i++){
cin >> m;
a.push_back(m);
}
cin >> u;
o = a[u - 1];
for(int i = u - 1;i < n - 1;i++){
a[i] = a[i + 1];
cout << a [i] << " ";
}
cout << o;
return 0;
}
数组元素的移动
最新推荐文章于 2024-07-25 14:57:10 发布