ADDMUL - Editorial

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
https://www.codechef.com/viewsolution/7492057

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.

https://www.codechef.com/viewsolution/7492127

What’s wrong with my solution?
https://www.codechef.com/viewsolution/7919583

1 Like

[http://ideone.com/JBAB5E][1]

Can you please check my code? What’s wrong with it?
[1]: http://ideone.com/JBAB5E

Very nice question to implement lazy propagation :slight_smile:

can anybody tell me what’s wrong with my solution?

here is the solution :
[solution][1]
[1]: https://www.codechef.com/viewsolution/14270746

Yes someone please explain