Ticket 15365
Problem 1648 -a
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
3 5
3 3 5 4 8 
2 6 4 1 3 
3 7 8 7 4 
Expected Output
34
Generator Parameters
--col_high 5 --col_low 1 --row_high 5 --row_low 1 --val_high 9 --val_low 1