fork download
  1. #include <vector>
  2. #include <algorithm>
  3. #include <iostream>
  4. #include <iterator>
  5.  
  6. int main() {
  7. std::vector<int> v = {5, 2, 7};
  8. sort(v.begin(), v.end());
  9. copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout, " "));
  10. return 0;
  11. }
Success #stdin #stdout 0s 2984KB
stdin
Standard input is empty
stdout
2 5 7