cf/mirror

Island Puzzle

CF
627F3400· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
1 0 2
2 0 1
1 2
2 3
Output
1 3 3
Sample 2of 3
Input
2
1 0
0 1
1 2
Output
0 1
Sample 3of 3
Input
4
0 1 2 3
0 2 3 1
1 2
1 3
1 4
Output
-1
627F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…