You are viewing a single comment's thread. Return to all comments →
using namespace std;
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; cin>>n; vector v(n);
for(int i=0; i<n; i++){ cin>> v[i]; } int s; cin>> s ; v.erase(v.begin() + (s-1)); int a,b; cin>> a >> b; v.erase(v.begin() + (a-1), v.begin()+(b-1)); cout<<v.size()<<endl; for(int i=0; i<v.size(); i++){ cout<<v[i]<<" "; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Vector-Erase
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
include
using namespace std;
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; cin>>n;
vector v(n);
}