Can anyone explain me how to solve this question using Square Root Decomposition
You have an array of N integers and Q queries on this array. There are two types of queries:
- 1 L R – count the numbers divisible by K in range [L, R].
- 2 L R Y – add Y to all numbers in range [L, R].
and is there any other technique to solve such queries??
Thanks in Advance