Due to the installation of a new fire alarm in ITMO server room, the system may be occasionally unavailable on the 27-th of May between 06:00 and 15:00 (UTC). ×

INCSEQ using segment trees

Revision en1, by Drom, 2019-03-20 13:38:15

We can solve the question using the recurrence $$$dp[i][j]=dp[i−1][j−1]+dp[i−2][j−1]+.....+dp[1][j−1]$$$ where i is the index and j is the length of the sequence and using K BITs to speed up the calculation of the sum.

Is there any way to solve it using segment tree as a different approach?

Tags #segment tree, #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Drom 2019-03-20 13:38:15 320 Initial revision (published)