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

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

I just discovered a problem, https://qoj.ac/contest/1901/problem/8616, that the intended solution is https://mirror.codeforces.com/blog/entry/67001. Is there any sub $$$O(nq)$$$ solution for this problem?

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

»
5 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Removed

»
5 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Are you interested in $$$\mathcal{O}(q\cdot\sqrt{n}\log^2(n)\log(max))$$$ solution?

EDIT:
I made a blog about this over an array(just use hld and you will have array one $$$\cdot\log{n}$$$ in the complexity).