Efficient and easy segment trees
So I was reading this blog and tried to modify the "Increment modifications, queries for maximum" for sum queries, but the query function isn't working. Here is my implementation :
What's the problem? How can I fix it?