Why this isn't 1-D dp ?

Правка en2, от kaiyu, 2020-05-10 18:13:26

Problem Link:

https://www.codechef.com/problems/GRHARSH

I see all the solutions have 2D dp solution.

I was thinking dp[i] = max gold at the time i.

Is this correct?How to solve it using 1-D dp?

Теги #2d-dp, #dp, 1d-dp, #dynamic programing

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский kaiyu 2020-05-10 18:13:26 130
en1 Английский kaiyu 2020-05-10 17:39:30 339 Initial revision (published)