#include <iostream>
#include <algorithm>
#include <vector>
int main()
{
std::vector<int> v = { 3, 5, 7, 9, 6, 12, 8, 99, 2, 1, 0 };
int first_4 = 4;
partial_sort(v.begin(), v.begin() + first_4, v.end(), std::greater<int>());
for(auto const& n : v)
std::cout << n << " ";
return 0;
}
/*
run:
99 12 9 8 3 5 6 7 2 1 0
*/