Ticket 15767
Problem 1705 -d
Submission 164397133
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
8
14
10111111111111
11101111111111
10
1010000100
0011001000
10
1001110100
1001111000
18
110001101111011011
011010111001110111
8
01000111
00101101
5
00000
00000
8
00010000
01000000
10
1101110111
1111110101
Expected Output
4
-1
-1
-1
-1
0
4
12
Your Output
4
-1
-1
-1
-1
0
4
-1
Difference
Generator Parameters
--n_high 20 --n_low 4 --q_high 10 --q_low 1