Предмет:
ИнформатикаАвтор:
cometreidАвтор:
lynnАвтор:
cookie doughАвтор:
arielleaswvАвтор:
mikaylaАвтор:
pecan//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64#include <iostream>#include <array>int main(){std::array<int, 10> 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<int>(std::cout, " "));}
Автор:
snufflesferrellДобавить свой ответ
Предмет:
ГеографияАвтор:
zanderljt8Ответов:
Смотреть