fork download
  1. //
  2. // main.cpp
  3. // Virgin
  4. //
  5. // Created by Steven Wiseman on 28/06/2025.
  6. //
  7.  
  8. #include <iostream>
  9. #include <vector>
  10. #include <algorithm>
  11. void biggies (std::vector <int> holidays) {
  12.  
  13. std::sort(holidays.begin(), holidays.end(), [] (int a, int b) {return a > 2;});
  14.  
  15. for (auto i : holidays) {
  16.  
  17. std::cout << i << std::endl;
  18.  
  19. }
  20.  
  21. }
  22.  
  23. int main(int argc, const char * argv[]) {
  24.  
  25. std::vector <int> Branson {1, 2, 3, 2, 3, 2, 1, 2, 1, 3, 1, 4, 1};
  26.  
  27. biggies (Branson);
  28.  
  29. return 0;
  30. }
  31.  
Success #stdin #stdout 0.01s 5332KB
stdin
Standard input is empty
stdout
4
3
3
3
1
2
2
2
1
2
1
1
1