fork download
#include 
#include 
#include 

int main()
{
    std::vector elements {1, 3, 5, 2, 6, 4, 7, 0, 8, 9};
    std::vector> range {elements.begin()+2, elements.end()-2};
    for(int &v : range)
    {
        v += 5;
    }
    for(auto &v : elements)
    {
        std::cout << v << ' ' << std::flush;
    }
}
Success #stdin #stdout 0s 2984KB
stdin
Standard input is empty
stdout
1 3 10 7 11 9 12 5 8 9