Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
(which appeared at time t’) to colour c at time t. We apply an interval increment operation to the BIT where we increment [l,r] by the sum of values of all updates applied to colour c after time t’ until time t. To obtain this sum, we binary search the list of increments applied to colour c’ for