Codeforces DIV3 Question

I’m Getting TLE on this problem, The Time complexity of the solution is around NlogN which should fit perfectly as per the constraints but it’s giving TLE.

Solution Link:
https://codeforces.com/contest/1506/submission/111074084

hello @rishit517

a) pls explain what u trying.
b) while calling erase function make sure the key is available,otherwise sometimes this also cause tle