https://mirror.codeforces.com/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://mirror.codeforces.com/contest/38/submission/50412221