Help needed in the problem "Riding in a lift".

Revision en1, by daiict, 2016-06-27 06:19:34

Hello codeforces, I am not able to understand the solution of this problem. Problem link is [http://mirror.codeforces.com/contest/479/problem/E]. Solution is not very clear. In solution it is mentioned that dp[i][j] can be calculated in O(1) using famous technique called "partial sums". I googled it but I could not find anything. Please help me. Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English daiict 2016-06-27 06:20:40 51
en1 English daiict 2016-06-27 06:19:34 407 Initial revision (published)