Ticket 11748
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
011010101011001
000011101100010
011001010000011
9
11 14
5 12
2 6
5 9
12 15
5 8
5 7
1 14
1 15
Expected Output
2
4
3
3
3
2
1
7
8
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1