Advertisement
OMEGAHEAD_MonkoX

Nothing New

Dec 16th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4. #include <sstream>
  5. #include <algorithm>
  6. #include <vector>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. #include <fstream>
  10. #include <stack>
  11. #include <map>
  12. #include <cstring>
  13. #include <cmath>
  14. #include <set>
  15. #include <iterator>
  16. #include <cmath>
  17.  
  18. using namespace std;
  19.  
  20. ostream & operator << (ostream & out, vector<int> const & v)
  21. {
  22.     for(int el: v)
  23.         out << el << ' ';
  24.     return out;
  25. }
  26.  
  27. ostream & operator << (ostream & out, const pair<pair<int, int>, string> & p)
  28. {
  29.     out << '(' << (p.first).first << ',' << (p.first).second << ',' << p.second << ')';
  30.     return out;
  31. }
  32.  
  33. ostream & operator << (ostream & out, const pair<int, int> & p)
  34. {
  35.     out << '(' << p.first << ',' << p.second << ')';
  36.     return out;
  37. }
  38.  
  39. ostream & operator << (ostream & out, vector<string> const & v)
  40. {
  41.     for(string el: v)
  42.         out << el;
  43.     return out;
  44. }
  45.  
  46. int main()
  47. {
  48.     vector<string> a;
  49.     string k;
  50.     while(getline(cin, k))
  51.         a.push_back(k);
  52.     sort(a.begin(),a.end(), [](string a, string b) {return a+b > b+a;});
  53.     cout << a;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement