fork download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <vector>
  4.  
  5.  
  6. int main()
  7. {
  8. std::vector<int> a = { 1, 2, 3 };
  9. std::vector<int> b = { 4, 5, 6 };
  10.  
  11. int max = std::max(*std::max_element(a.begin(), a.end()), *std::max_element(b.begin(), b.end()));
  12. std::cout << max;
  13. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
6