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

Автор anubhavdhar, история, 2 года назад, По-английски

Hello all!

Thank you for participating in CodeNite 2021 round-2, hope you all had fun! We will release the results and the editorials in the coming week, and prize-winners will be contacted. Meanwhile feel free to discuss problems and ask doubts in this thread!

Regards, CodeClub, IIT Kharagpur

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

»
2 года назад, # |
Rev. 2   Проголосовать: нравится +30 Проголосовать: не нравится

Intended complexity for Queries on Grid? $$$O(Q*sqrt(Q))$$$ or $$$O(Q*log^{2}(nm))$$$

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +19 Проголосовать: не нравится

    The author's solution has a complexity of O(Q*sqrt(N*M)*log(N))

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      Just doing as it was said in the statement using segtrees with lazy propagation?

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

        Yeah. Although segment trees will give high constant factor so using root(N*M) fenwick trees with range updates and queries will perform better.

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится +16 Проголосовать: не нравится

      $$$O(N√N\log(n))$$$ Type complexity is very bad for $$$N \simeq 10^5$$$. It is almost same as $$$O(\frac{n^2}{log(n)})$$$.

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

        A Q*sqrt(Q) solution exists as well using prefix xors and square root decomposition. We kept the limits liberal to allow higher complexity solutions as well

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

just saw the mail in junk T_T

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

anubhavdhar please provide the link of editorial.