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

The_Royalty's blog

By The_Royalty, history, 9 years ago, In English

Hi. I've been practicing DP problems but until now I'd just seen problems with states like dp[i][j] = best choice using i first elements and with cost j.

But when I've tried this problem 425C - Sereja and Two Sequences and after thinking a couple of days, I watched the tutorial and find a dp like dp[i][j] = best choice using "no more than" first i elements with j steps.

What call my attention was the part of the i parameter, because is not something fixed, if you could understand me. I know that maybe this could be some basic DP technique but I would like that you could suggest me problems with this type of dp.

Sorry for my english

  • Vote: I like it
  • +3
  • Vote: I do not like it