Ticket 11744
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
11
11011000111
11100010011
10100000110
3
11 11
1 10
3 8
Expected Output
1
4
3
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1