Ticket 4531
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
13
0010101101110
0010001101110
0011000001000
5
4 12
6 9
8 9
8 11
2 13
Expected Output
4
1
1
2
4
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1