fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4. #include <unordered_map>
  5. #include <algorithm>
  6. #include <vector>
  7. using namespace std;
  8.  
  9. int main() {
  10. // your code goes here
  11. vector<string> test;
  12. test.push_back("4");
  13. test.push_back("1");
  14. test.push_back("5");
  15. test.push_back("6");
  16.  
  17. sort(test.begin(), test.end(), std::greater<string>());
  18.  
  19. for(auto t : test)
  20. {
  21. cout << t << "\n";
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0s 4424KB
stdin
Standard input is empty
stdout
6
5
4
1