Ticket 4530
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
0110100010110
0001101010011
1010011100010
9
11 12
4 6
2 9
10 12
6 9
5 11
6 13
3 9
2 8
Expected Output
1
2
5
1
2
4
3
5
4
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1