https://ide.codingblocks.com/s/70998
can you please help me further optimize this code?
Hi
hint : use segment tree