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

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

In the official tutorial, we defined a dp[i][j] array which means that we consider 1~i and has j elements that haven't been deleted, I just want to ask if it is possible to solve it by redefined the dp: consider 1~i and has already use j moves. Could anyone tell me if my idea is possible to solve problem?

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

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Yes, my submission 123591691 does that.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

It's the same thing, because if $$$j$$$ moves have been used then $$$i - j$$$ elements haven't been deleted.