Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <vector>
  4. #include <cstring>
  5. #include <algorithm>
  6. using namespace std;
  7. int main()
  8. {
  9.     int n;
  10.     cin >> n;
  11.     vector <int> Vector_aleshe_ban(n);
  12.     int number;
  13.     for (int i = 0; i < (int)Vector_aleshe_ban.size(); i++)
  14.     {
  15.         cin >> Vector_aleshe_ban[i];
  16.     }
  17.     sort(Vector_aleshe_ban.begin(), Vector_aleshe_ban.end());
  18.     reverse(Vector_aleshe_ban.begin(), Vector_aleshe_ban.end());
  19.     for (int i = 0; i < (int)Vector_aleshe_ban.size(); i++)
  20.     {
  21.         cout << Vector_aleshe_ban[i] << " ";
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement