Ticket 4529
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
15
010101011001011
101001101001111
100101011110110
6
10 14
12 15
11 14
2 4
2 3
8 12
Expected Output
2
1
2
4
2
2
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1