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

I am also getting WA on similar spoj problem
My spoj solution id
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?

1 Like


Can you please check my code? What’s wrong with it?

Very nice question to implement lazy propagation :slight_smile:

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

here is the solution :

Yes someone please explain