Ticket 999
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
4 5
2 4 5 8 5 
8 8 2 5 7 
3 6 5 8 7 
6 5 4 3 6 
Expected Output
69
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