Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
colour (initially 1). We need to support q total operations of three types: Update: Repaint a specified segment ([l,r]) with a given colour (c). Update: Increment all cells of a given colour (c) by a given value (v). Query: Report the value at a given index (i). 2.1 Using the solved subproblem What