cf/mirror

Zero-One (Hard Version)

CF
1733D22000· candidate master3s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
5 8 9
01001
00101
6 2 11
000001
100000
5 7 2
01000
11011
7 8 3
0111001
0100001
6 3 4
010001
101000
5 10 1
01100
01100
Output
8
10
-1
6
7
0
1733D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)