thezxtreme

Untitled

Dec 1st, 2020
836
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. using Data = std::vector<uint32_t>;
  6.  
  7. auto min(const Data& _data) -> Data::value_type
  8. {
  9.     return *std::min_element(_data.cbegin(), _data.cend());
  10. }
  11.  
  12. auto main() -> int
  13. {
  14.     Data data = { 2, 7, 3, 4 ,5 };
  15.     std::cout << min(data) << "\n";
  16.  
  17.     return EXIT_SUCCESS;
  18. }
RAW Paste Data