Ticket 13828
Problem 1679 -f
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
3 5
1 5
5 8
1 2
1 8
6 9
Expected Output
901
Generator Parameters
--m_high 5 --m_low 0 --n_high 3 --n_low 3