hi guys i was trying to use multiset to reduce its complexity almost to n^2 but couldnt do so. what i was trying to do is checking the previous ones it was sorted in multiset then taking out left ones i need help!! here is my code->> https://codeforces.me/contest/1185/submission/55820062
Multiset solution shouldn't pass because of $$$O(n^2 \log n)$$$ worst case. Try to implement the solution described in the editorial, which is way simpler and way faster, and it runs in $$$O(nt)$$$