📅  最后修改于: 2022-03-11 14:44:47.981000             🧑  作者: Mango
std::vector vec = {89, 15, 51, 27, 98};
std::size_t const half_size = vec.size() / 2;
std::vector half1(vec.begin(), vec.begin() + half_size);
std::vector half2(vec.begin() + half_size, vec.end());