Ticket 2752
Problem 1646 -a
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
10
2 8
1 1
1 0
2 4
1 1
2 4
1 0
2 8
1 0
1 0
Expected Output
2
1
0
1
1
1
0
2
0
0
Generator Parameters
--n_cap 999999 --n_high 2 --n_low 1 --t_cap 20000 --t_high 10 --t_low 10