#include #include void process(const std::vector& from, std::vector& into, int step) { auto iterf = from.begin(); auto itert = into.rbegin(); while (iterf < from.end() && itert != into.rend()) { *itert += *iterf; ++itert; iterf += step; } return; }