Ticket 4533
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
12
010111011010
101101100001
100110010111
4
6 8
7 11
5 12
1 5
Expected Output
3
5
6
3
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1