Ticket 4265
Problem 1661 -d
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 1
119 870 604 772 116 532 717 
Expected Output
3730
Generator Parameters
--b_high 999 --b_low 1 --n_high 9 --n_low 1