Can somebody explain the dynamic programming approach in CIELRCPT?

Hi here’s the link could somebody please explain the dynamic programming approach for this question given in the editorial…here’s the link…

how to get eqn (2)…what does Ai actually represent,if L=F§,what does it signify…i didnt anything much in the whole thing…
could somebody please help…thanks

it has another easier way of solution. just check here: http://ideone.com/9pmILI

note on my code: initialize the array of power 2, starting from 0 goes to 11. after getting p, starting from the maximum value of array(here 2048, index is arr[11]=2048) and check if p is equal to or greater than that value. if so, p=p-arr[i], count++. i also increased i++ so that continues from the index last visited. thnx

also, if you have difficulty in understanding DP, check these: http://www.youtube.com/watch?v=6DINO7hsbW4

actually, mit dp is 3 section so here is query: http://www.youtube.com/results?search_query=mit+6.006+19.dp&sm=3

there is no need of dp here its a simple cakewalk approach