Hello all
I'm trying to solve the problem http://www.spoj.com/problems/HORRIBLE/ but getting WA again n again. I'm using segment trees with lazy propagation. Can somebody please help figure out my mistake.
Thanks in advance.
Code: http://pastebin.com/aT3pvi3K
-- Thanks to diego_v1