Ticket 1480
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
8 5
-77 -7 -29 -33 90 83 13 5 
85 37 51 -27 99 -38 -93 -100 
-36 89 91 -47 54 -76 81 -52 
2 6 71
4 7 38
5 7 38
2 8 33
3 8 15
Expected Output
60
Generator Parameters
--k_cap 1000000000 --k_high 100 --k_low 1 --n_cap 500000 --n_high 10 --n_low 1 --q_cap 500000 --q_high 10 --q_low 1 --val_cap 1000000000 --val_floor -1000000000 --val_high 100 --val_low -100