I was looking at solution 810236 from hpfdf and also other users, who only for every query "add l r d" do a for loop from l to r and make at most two update operations in a BIT.
Why does this work? I think something like this would do more than 109 operations.
I think that because of this condition:
The operations are such that after all additions the array won't have numbers that would exceed 104