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

Автор stupidaftowin, история, 3 года назад, По-английски

How to solve 1437D - Minimal Height Tree if the question asked to count the number of valid trees?

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

This could have been solved using a dp state (i,curr_parent), if the constraints were a bit less. (n<=3000)

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    That's actually pretty much good. I got it too. I was thinking if it's possible to solve with original constraints of the problem.