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