Hi here's the link could somebody please explain the dynamic programming approach for this question given in the editorial..here's the link.. http://discuss.codechef.com/problems/CIELRCPT
how to get eqn (2)...what does Ai actually represent,if L=F(p),,what does it signify..i didnt anything much in the whole thing.. could somebody please help..thanks