Puzzle
1700F2600· international gm1s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
50 1 0 1 01 1 0 0 11 0 1 0 10 0 1 1 0
Output
5
Sample 2of 2
Input
31 0 00 0 00 0 00 0 0
Output
-1
58%
1700F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
50 1 0 1 01 1 0 0 11 0 1 0 10 0 1 1 0
5
31 0 00 0 00 0 00 0 0
-1