Ticket 1625
Problem 1651 -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
6
3 10
5 8
3 9
1 11
6 7
1 12
2 12
5 11
6 7
2 9
4 10
4 8
Expected Output
660
Generator Parameters
--n_cap 1500 --n_high 7 --n_low 2