Has anyone solved the maximum power problem from the traveloka hiring challenge completely (not partial)? My solution shows WA.

Problem:

Number of testcases: T <= 10

Number of Queries: Q <= 100000

Type of Queries:

- A X(Add a number X into array)
- I X(Increment all the value of array by X)
- D X(Decrement all the value of array by X)
- P X(Find the Xth largest value in array)

Initially the array is empty.