Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use the Lazy Segment Tree to process the queries quickly.
Solve with full IDE support and test cases