help in dp state of zuma , 607b codeforces !

Правка en1, от atlasworld, 2019-01-01 20:24:25

in problem zuma , why do we need a dp state like : as mentioned in tutorial

if(arr[i] == arr[i+1]) dp[i][j] = 1+dp[i+2][j]

i checked by removing this state and it gave WA .

why only these 2 dp states are not enough ! #@

dp[i][j] = 1+dp[i+1][j] and

dp[i][j] = dp[i+1][k-1] + dp[k+1][j]

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский atlasworld 2019-01-01 20:25:23 37 Tiny change: '+1][j]\n\n\n\n\n' -> '+1][j]\n\nCAN anyone clarify it more ? ! @ \n\n\n\n\n'
en1 Английский atlasworld 2019-01-01 20:24:25 445 Initial revision (published)