容器.........
#include <iostream> #include<vector> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } vector<int> b(a,a+sizeof(a)/sizeof(int)); int x,y; cin>>x>>y; b.insert(b.begin()+x-1,y); b.erase(b.begin()+x); for(int i=0;i<b.size();i++){ cout<<b[i]<<endl; } return 0; }