island.cpp: In function 'std::pair<int, bool> findd(int)':
island.cpp:16:12: error: cannot convert 'std::pair<int, bool>' to 'int' in assignment
16 | x = findd( parent[x] );
| ~~~~~^~~~~~~~~~~~~
| |
| std::pair<int, bool>
island.cpp:17:14: error: request for member 'first' in 'x', which is of non-class type 'int'
17 | return { x.first, x.second | marked[x.first] };
| ^~~~~
island.cpp:17:23: error: request for member 'second' in 'x', which is of non-class type 'int'
17 | return { x.first, x.second | marked[x.first] };
| ^~~~~~
island.cpp:17:41: error: request for member 'first' in 'x', which is of non-class type 'int'
17 | return { x.first, x.second | marked[x.first] };
| ^~~~~
island.cpp:17:48: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<int, bool>'
17 | return { x.first, x.second | marked[x.first] };
| ^
| |
| <brace-enclosed initializer list>
island.cpp: In function 'void unite(int, int, int)':
island.cpp:21:16: error: cannot convert 'std::pair<int, bool>' to 'int' in initialization
21 | int x = findd( a );
| ~~~~~^~~~~
| |
| std::pair<int, bool>
island.cpp:22:16: error: cannot convert 'std::pair<int, bool>' to 'int' in initialization
22 | int y = findd( b );
| ~~~~~^~~~~
| |
| std::pair<int, bool>
island.cpp: In function 'void solve()':
island.cpp:61:14: error: cannot convert 'std::pair<int, bool>' to 'int' in assignment
61 | a = findd( i );
| ~~~~~^~~~~
| |
| std::pair<int, bool>