So far you've seen point updates. What about range updates? For "add to all elements in ", use lazy blocks:
For complete blocks in : add to a array
For partial blocks (tails): update individual elements Queries now add to each accessed element. You get for both range updates and point queries. The technique is called "sqrt decomposition with lazy propagation."