Unofficial Editorials November Long Challenge (Part 2)

Great…

Its just that i haven’t worked with fenwick tree, because segtree usually serve the purpose.