Ticket 3181
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
18 112
694 645 620 920 518 366 881 783 19 320 292 917 580 738 293 114 595 919 
737 212 670 577 33 950 593 945 657 219 274 792 265 855 548 762 143 334 
Expected Output
8086
Generator Parameters
--b_cap 1000 --b_high 1000 --b_low 1 --c_cap 1000000 --c_high 1000 --c_low 1 --k_cap 1000000 --k_high 600 --k_low 1 --n_cap 1000 --n_high 50 --n_low 1 --t_cap 100 --t_high 1 --t_low 1