cf/mirror

Binary Deque

CF
1692E1200· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
3 1
1 0 0
3 1
1 1 0
9 3
0 1 0 1 1 1 0 0 1
6 4
1 1 1 1 1 1
5 1
0 0 1 1 0
16 2
1 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1
6 3
1 0 1 0 0 0
Output
0
1
3
2
2
7
-1
1692E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)