Ticket 479
Problem 1638 -d
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 3
1 1 1 
12 12 1 
12 12 11 
7 11 11 
Expected Output
6
3 1 7
2 2 1
1 2 1
1 1 1
3 2 11
2 1 12
Generator Parameters
--answer_should_exist 1 --col_cap 1000 --col_high 5 --col_low 2 --row_cap 1000 --row_high 5 --row_low 2