Ticket 2038
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
5 7
35 54 42 20 43 38 1 
95 17 91 6 40 46 64 
51 46 40 31 10 11 42 
41 89 40 41 36 33 91 
88 7 90 76 33 74 82 
Expected Output
30
Generator Parameters
--col_cap 100 --col_high 10 --col_low 1 --row_cap 100 --row_high 10 --row_low 1 --val_cap 100000 --val_high 100 --val_low 1