Ticket 4535
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
99
101001100010101011011101101010001110110001100001111101001010111001000001101000100001110000000101110
010100000001000010011001010101100001111101001011000111010000101001010010101111011110101001000110100
001110110010101011011101100101000000110111010110011101110111010010100000010001011111100100100000001
10
25 97
83 89
83 90
39 90
2 73
2 17
17 68
60 63
18 60
1 79
Expected Output
33
3
4
22
36
13
22
3
17
40
Generator Parameters
--n_high 100 --n_low 1 --q_high 10 --q_low 10