Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя indsonu

Автор indsonu, история, 5 лет назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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