Advertisement
Zuneve

e

Nov 18th, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main() {
  7. int n, max=-10e6;
  8. cin >> n;
  9. vector <int> a(n);
  10. for (int i = 0; i<n; i++) {
  11. cin >> a[i];
  12. }
  13. sort(a.begin(), a.end());
  14. cout << a[n-1];
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement