Ticket 4527
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
27
011011101111100000011100101
100111101010000001011000010
010111101011110100010110001
10
8 26
21 22
11 15
20 22
2 4
10 23
13 22
9 22
12 13
3 17
Expected Output
7
2
1
2
3
5
6
5
2
4
Generator Parameters
--n_high 30 --n_low 10 --q_high 10 --q_low 10