Ticket 12438
Problem 1672 -h
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
7 6
0011110
1 5
2 6
4 4
1 4
4 7
6 7
Expected Output
3
4
1
2
3
1
Generator Parameters
--n_high 9 --n_low 1 --q_high 9 --q_low 1