cf/mirror

Island Puzzle

CF
634A1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
1 0 2
2 0 1
Output
YES
Sample 2of 3
Input
2
1 0
0 1
Output
YES
Sample 3of 3
Input
4
1 2 3 0
0 3 2 1
Output
NO
634A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)