|
|
If you have WA4, try a 100x100 matrix with all 1 or with all 0. Edited by author 12.05.2019 20:53 it's just about implementation, the complexity is too high for these problem, imho So try below test. It helped me: 6 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Correct answer (and similar): 6 1 2 What is the criterion of optimality of the partition ? Minimum of maximum of 4 numbers, read problem Also, instead of «The i-th number in the j-th row» there should be «The j-th number in the i-th row» (unless, judging by the title, this is intended, haha) |
|
|