Island Puzzle
634A1300· pupil2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
31 0 22 0 1
Output
YES
Sample 2of 3
Input
21 00 1
Output
YES
Sample 3of 3
Input
41 2 3 00 3 2 1
Output
NO
58%
634A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
31 0 22 0 1
YES
21 00 1
YES
41 2 3 00 3 2 1
NO