Adding geometric sequence to the segment

Revision en1, by Vasiljko, 2020-07-26 16:35:05

I was solving 446C - DZY Loves Fibonacci Numbers today where it's needed to add geometric sequence to the segment but the ratio is always the same. So I was wondering how to solve the problem where we are given queries of type $$$L,R,A,B$$$ and we need to add geometric sequence $$$A,AB,AB^2,AB^3,... AB^{R-L}$$$ to the segment $$$[L,R]$$$? There is also a sum query for some range.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Vasiljko 2020-07-26 16:35:05 390 Initial revision (published)