Amazing problem! I did it after reading the editorial. It took a while; but it really reinforced my understanding of segment trees. You can view my solution here if interested.
I am getting WA
I am also getting WA on similar spoj problem http://www.spoj.com/problems/HORRIBLE/
My spoj solution id http://www.spoj.com/submit/HORRIBLE/id=14688264
I am not able to figure out why i am getting WA in both problems. Please help me out?
Can someone tell me what is wrong with my solution.I did as told in the Editorial.
What’s wrong with my solution?
Can you please check my code? What’s wrong with it?
Very nice question to implement lazy propagation
can anybody tell me what’s wrong with my solution?
here is the solution :
Yes someone please explain