• + 0 comments

    This can be done (at least in C) with sqrt(n) decomposition instead of HLD, but it's close and micro-optimizations count.