fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. auto func()
  6. {
  7. return std::vector<std::vector<int>>{{1, 3, 5, 2, 4, 6}, {2, 4, 6, 1, 3, 5}};
  8. }
  9.  
  10. int main()
  11. {
  12. std::vector<std::vector<std::vector<int>>> a{{{1, 3, 5, 2, 4, 6}, {2, 4, 6, 1, 3, 5}}, {{}, {100, 200}}};
  13. std::cout << std::boolalpha << std::any_of(std::begin(a), std::end(a), [](const auto &x) noexcept {
  14. return (x == func());
  15. }) << std::endl;
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5512KB
stdin
Standard input is empty
stdout
true