Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
increments applied to that colour in chronological order. Each entry in these lists contains the time and value of the corresponding increment operation. In fact we store the prefix sum over values rather than the value itself. We use another data structure (BIT) to store the value at each index.