Problem in short:
We need to support 3 types of operations on an array a. Operation 1: Increment a[i] by 1.Operation 2: Find number of j such that a[j] ≥ x. Operation 3: For all j such that a[j] ≥ y, decrement a[j] by 1. N ≤ 100000, Q ≤ 1000000.
Check out the discussion responses for solution one hint at a time!