//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64
#include
#include
int main()
{
std::array mas = { 1, 5, -4, 9, -6, -2, 7, 8, -5, 0 };
auto it = std::partition(mas.begin(), mas.end(), [](const int& i) { return i < 0; });
std::sort(mas.begin(), it, [](const int& x, const int& y) { return x > y; });
std::sort(it, mas.end(), [](const int& x, const int& y) { return x > y; });
std::copy(mas.begin(), mas.end(), std::ostream_iterator(std::cout, " "));
}