Ticket 643
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
2 4
1 2 2 4 
1 2 2 4 
Expected Output
3
1 1 1
1 3 4
1 2 2
Generator Parameters
--answer_should_exist 1 --col_cap 1000 --col_high 5 --col_low 2 --row_cap 1000 --row_high 5 --row_low 2