Блог пользователя joker70

Автор joker70, история, 7 лет назад, По-английски

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?

Полный текст и комментарии »

Теги #dp
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится