indsonu's blog

By indsonu, history, 5 years ago, In English

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.com/contest/1185/submission/55820062

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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)$$$