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

Автор __abs, история, 17 месяцев назад, По-английски

Problem statement here. I understood the solution for this.

How to compute the minimum number of rounds required? (this is not asked in that question)

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

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

Basically what you are asking is the minimum number of chains required to cover the whole array (a chain is an increasing sequence of numbers), which, by dilworth's theorem is equal to the length of the longest decreasing subsequence of the array. Finding the LDS, is just the opposite of finding the LIS (a standard DP problem).