Ticket 1477
Problem 1648 -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
6 2
-17 -19 -6 -15 -29 0 
40 -23 -16 37 -4 -20 
33 4 -20 26 -25 -16 
2 3 5
2 5 7
Expected Output
-42
Generator Parameters
--k_cap 1000000000 --k_high 9 --k_low 1 --n_cap 500000 --n_high 7 --n_low 1 --q_cap 500000 --q_high 7 --q_low 1 --val_cap 1000000000 --val_floor -1000000000 --val_high 40 --val_low -40