KQUERY-SEGMENT TREE

the same code is accepted on spoj but it does not get accpeted in challenge here
ide: https://ide.codingblocks.com/s/237012

@Vishal123
Max segtree size using segment tree for size N is 4*N
You’re using size N only
Please look into it

still giving error ide: https://ide.codingblocks.com/s/241266

@Vishal123
Please verify your approach with this