Help with dp

Revision en1, by naevis, 2019-02-25 11:35:25

https://codeforces.net/problemset/problem/38/E . I solve with dp with 2 dimension where the first one is index and the second is 2 which is pin it or let it drop.. I compute current index result with previous result in this case index — 1 only, but I got wrong answer. Did anyone know why? here is my submission https://codeforces.net/contest/38/submission/50412221

Tags #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English naevis 2019-02-25 11:35:25 383 Initial revision (published)