Ticket 2053
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
4 5
9 5 7 2 4 
5 5 7 4 3 
6 9 8 6 5 
8 7 4 6 5 
Expected Output
68
Generator Parameters
--col_cap 100 --col_high 5 --col_low 1 --row_cap 100 --row_high 5 --row_low 1 --val_cap 100000 --val_high 9 --val_low 1