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:29:27: error: could not convert '1' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
29 | if(sz(G[0]) >= 2)return 1 ;
| ^
| |
| int
islands.cpp:30:27: error: could not convert '0' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
30 | if(sz(G[0]) == 0)return 0 ;
| ^
| |
| int
islands.cpp:36:23: error: no match for 'operator[]' (operand types are 'std::vector<std::pair<int, int> > [1000010]' and 'std::vector<int>')
36 | for(auto [u,w] : G[V]){
| ^
islands.cpp:37:40: error: could not convert '1' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
37 | if(nx!=-1 && mark[u] == 0)return 1 ;
| ^
| |
| int
islands.cpp:41:24: error: could not convert '0' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
41 | if(nx == -1)return 0 ;
| ^
| |
| int
islands.cpp:43:10: error: could not convert '1' from 'int' to 'std::variant<bool, std::vector<int, std::allocator<int> > >'
43 | return 1;
| ^
| |
| int