Ticket 2181
Problem 1649 -c
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
5 5
6 7 4 5 4 
8 3 9 4 5 
7 6 2 8 6 
7 6 2 5 4 
6 1 5 3 7 
Expected Output
109
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