#include <vector>
#include <iostream>
int main() {
std::vector<int> testVec{1, 2, 3, 4, 5};
testVec.erase(testVec.begin() + 4, testVec.end());
testVec.erase(testVec.begin(), testVec.begin() + 1);
for (auto i : testVec) std::cout << i << ' ';
return 0;
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKSB7CglzdGQ6OnZlY3RvcjxpbnQ+IHRlc3RWZWN7MSwgMiwgMywgNCwgNX07Cgl0ZXN0VmVjLmVyYXNlKHRlc3RWZWMuYmVnaW4oKSArIDQsIHRlc3RWZWMuZW5kKCkpOwoJdGVzdFZlYy5lcmFzZSh0ZXN0VmVjLmJlZ2luKCksIHRlc3RWZWMuYmVnaW4oKSArIDEpOwoJZm9yIChhdXRvIGkgOiB0ZXN0VmVjKSBzdGQ6OmNvdXQgPDwgaSA8PCAnICc7CglyZXR1cm4gMDsKfQ==