Ticket 3174
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
33 412454
787 217 641 675 73 585 545 820 135 627 542 939 675 830 903 171 525 5 935 431 813 303 471 473 868 334 945 525 206 792 790 171 7 
233065 881057 791472 572162 752447 233306 851565 860443 504333 749125 689951 58743 24008 855560 81413 622999 465117 383648 180886 924625 154537 18140 127672 42959 967615 925409 55498 925773 6886 924772 12955 635551 537625 
Expected Output
16051317
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 100 --n_low 1 --t_cap 100 --t_high 1 --t_low 1