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
Intended complexity for Queries on Grid? $$$O(Q*sqrt(Q))$$$ or $$$O(Q*log^{2}(nm))$$$
The author's solution has a complexity of O(Q*sqrt(N*M)*log(N))
Just doing as it was said in the statement using segtrees with lazy propagation?
Yeah. Although segment trees will give high constant factor so using root(N*M) fenwick trees with range updates and queries will perform better.
$$$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)})$$$.
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
just saw the mail in junk T_T
anubhavdhar please provide the link of editorial.