#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    std::vector<int> arr;
    int n;
    
    // Read the number of elements
    std::cin >> n;
    arr.resize(n); // Resize the vector to hold n elements
    
    // Read the elements into the array
    for (int i = 0; i < n; i++) {
        std::cin >> arr[i];
    }
    
    int j,k,s;
    std::cin >> s;
    std::cin >> j;
    std::cin >> k;
    
    arr.erase(arr.begin()+j-1, arr.begin()+k);
    
    // Print the size of the resulting array
    std::cout << arr.size() << std::endl;
    
    // Print the resulting array
    for (int i = 0; i < arr.size(); i++) {
        std::cout << arr[i] << ' ';
    }
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: