Advertisement
Josif_tepe

Untitled

Feb 12th, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include<ctype.h>
  3. #include<cmath>
  4. #include<iomanip>
  5. #include <vector>
  6. #include <algorithm>
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     int n; // size of array
  12.     cin >> n;
  13.     vector<int> v(n);
  14.     for(int i = 0; i < n; i++) {
  15.         cin >> v[i];
  16.     }
  17.     int x;
  18.     cin >> x;
  19.     v.erase(v.begin() + x);
  20.     for(int i = 0; i < v.size(); i++) {
  21.         cout << v[i] << " " ;
  22.     }
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement