problem link: https://uva.onlinejudge.org/external/114/11402.pdf
I tried this problem with segment tree(I think its the best way to do so). There is a problem with the invert operation in my code.Probably the problem is in
up() . Can someone help me to find it out?
Thanks in advance.
code is too long and can be found here