Hi Everyone, I have been practicing Segment trees and there's a very straightforward problem on SPOJ. Link:http://www.spoj.com/problems/CDC12_H/
I have used Lazy Propagation by I am getting WA. And I don't know why. Here's my code. Link: http://ideone.com/gAx34B
Its pretty much understandable. Please tell me as to where I am wrong . Thanks, Maulik
Lines 34-35 and 66-67 Replace
By:
wow it was the easier way :D... always an easier way exists :D
I have read your code and changed it and it got AC! here is your code: http://ideone.com/emLhch