Draw the minimum number of lines to cover all the ones of the ma-trix. If the number of drawn lines less than n, then the complete assignment is not possible, while if the number of lines is exactly equal to n, then the complete assignment is obtained.