/
Ikocs
/
cpp-tasks
Обзор
Документация
Войти
/
Ikocs
/
cpp-tasks
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
23_sort_lines/main.cpp
23 строки
371 B
Alexey Elfimov
Init commit
16 сен 2024, 14:45
16 сен 2024, 14:45
08b7ab0
Код
Авторство
О чём код?
#include <iostream> #include <string> #include <vector> #include <algorithm> int main() { std::vector<std::string> strings; std::string line; while (std::getline(std::cin, line)) { strings.push_back(line); } std::sort(strings.rbegin(), strings.rend()); for (const auto & str : strings) std::cout << str << std::endl; return 0; }