Groups
Category
Offline query processing means you collect all queries first and answer them later in a smart order that makes updates/queries cheap.
A Fenwick Tree (Binary Indexed Tree) can support range additions and range sum queries by maintaining two trees, often called B1 and B2.