Advertisement
Infiniti_Inter

90 2 (7)

May 14th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main()
  10. {
  11.     int n;
  12.     cin >> n;
  13.     vector<int> a(n);
  14.     for (int i = 0; i < n; ++i)
  15.     {
  16.         cin >> a[i];
  17.     }
  18.     reverse(a.begin(), a.end());
  19.     a.erase(min_element(a.begin(), a.end()));
  20.     reverse(a.begin(), a.end());
  21.     for (int i = 0; i < (int)a.size(); ++i)
  22.     {
  23.         cout << a[i] << ' ';
  24.     }
  25.     cout << '\n';
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement