Ticket 5726
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
001111101101
110110011000
001101001001
7
7 11
2 5
8 9
2 7
1 8
5 11
4 8
Expected Output
2
2
1
3
4
3
3
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1