I don't known how to soloving this arthmetic ! pls give me alrorithm.

title :

For the matrix A size mxn. Allow change the marks in the same row or column of A. Algorithms to set up following a number of changes allowed to be the matrix A satisfying nature: Total number of

rank of each row and each column is greater than 0.