Ticket 3173
Problem 1633 -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
1
3 498097
377 882 656 
804682 898780 973510 
Expected Output
2676972
Generator Parameters
--b_cap 1000 --b_high 1000 --b_low 1 --c_cap 1000000 --c_high 1000000 --c_low 1 --k_cap 1000000 --k_high 1000000 --k_low 1 --n_cap 1000 --n_high 10 --n_low 1 --t_cap 100 --t_high 1 --t_low 1