islands.cpp: In function 'std::variant<bool, std::vector<int, std::allocator<int> > > find_journey(int, int, std::vector<int>, std::vector<int>)':
islands.cpp:12:17: error: break statement not within loop or switch
12 | if (m<3)break;
| ^~~~~
islands.cpp:18:41: error: could not convert '0' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
18 | if (a.empty()||b.empty())return 0;
| ^
| |
| int
islands.cpp:19:67: error: could not convert '{a.std::vector<int>::operator[](0), b.std::vector<int>::operator[](0), a.std::vector<int>::operator[](1), a.std::vector<int>::operator[](0), b.std::vector<int>::operator[](0), a.std::vector<int>::operator[](1)}' from '<brace-enclosed initializer list>' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
19 | if (a.size()>=2)return {a[0], b[0], a[1], a[0], b[0], a[1]};
| ^
| |
| <brace-enclosed initializer list>
islands.cpp:20:16: error: could not convert '0' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
20 | return 0;
| ^
| |
| int