Ticket 4385
Problem 1661 -e
Submission 153219999
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
13
1010001011011
0001010000111
1100101010011
6
3 7
7 13
1 9
7 8
1 12
7 7
Expected Output
6
5
10
2
11
2
Your Output

          
Difference
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1