Please read the new rule regarding the restriction on the use of AI tools. ×

__abs's blog

By __abs, history, 21 month(s) ago, In English

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)

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

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).