Segment Tree with Composite Lazy Tags: Handling Range Add, Multiply and Assign Operations
Given an array of $n$ integers $a_1, a_2, \ldots, a_n$, process $q$ range operations: Type 1 l r d: add $d$ to all elements in $[l, r]$ Type 2 l r d: multiply all elements in $[l, r]$ by $d$ Type 3 l r d: assign all elements in $[l, r]$ to $d$ Type 4 l r: query the sum of elements in $[l, r]$ modulo...