Ticket 4524
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
14
00110010000011
11001010111110
01100011001100
8
1 10
12 13
3 4
7 9
2 3
3 9
5 11
12 14
Expected Output
5
1
2
2
2
5
3
1
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1