Ticket 12246
Problem 1661 -e
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
10
0001010001
0111111011
1111001101
4
1 9
5 9
2 10
1 9
Expected Output
2
2
2
2
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1