Ticket 12968
Problem 1695 -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
1
3 3
-26 12 13 
16 1 11 
-3 -4 22 
Expected Output
9
Generator Parameters
--row_or_col_high 5 --row_or_col_low 1 --t_high 2 --t_low 1 --val_high 30 --val_low -30