Ticket 5094
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
001000111011110
110000010111001
101010100110110
16
1 7
3 5
10 11
5 14
4 8
6 14
8 8
1 8
1 7
5 11
1 10
13 15
3 11
13 13
3 10
8 15
Expected Output
6
3
1
5
3
4
1
6
6
4
7
3
6
2
6
4
Generator Parameters
--n_high 30 --n_low 15 --q_high 20 --q_low 15