Ticket 4540
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
66
101001100101100011100100100100010111011010001111101011010101001111
110100010000010100110101101110001001011000100011100101001010100111
110100011111100011100110100101110001111100010110111001110101101011
10
9 19
33 55
5 60
27 56
31 61
18 46
29 35
57 62
35 60
32 43
Expected Output
6
9
28
13
18
13
5
6
15
6
Generator Parameters
--n_high 100 --n_low 1 --q_high 10 --q_low 10