LightOj 1011

Revision en1, by joker70, 2017-05-31 18:50:01

I have learn DP recently. I am practicing DP in this OJ. Now, I am stuck on this problem.

In this problem I have to find the maximum summation of cells such that any two cells don't have the same row or column.

So, I will use recursion from top of the matrix. When using recursion I got to check if that cell is available or not, i.e. that cells row and column has not previously been used. How can I do that?

Tags #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English joker70 2017-05-31 18:50:01 494 Initial revision (published)