Ticket 8609
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
12
010000101101
001001110000
011100001110
6
4 7
5 6
3 7
1 6
7 12
3 5
Expected Output
2
1
2
3
4
1
Generator Parameters
--n_high 15 --n_low 1 --q_high 9 --q_low 1