fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. vector<int>v = {1,2,3,2,4,43,3,2,34,3,4,44,3,2,3,4,4};
  6. auto max = max_element(v.begin(), v.end());
  7. cout << *max << endl;
  8. return 0;
  9. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
44