You have an array of integers, initialized all to zero to begin with. Support two operations.
INCREMENT l r a - For each index between and , increase the th element of the array by .
SUM l r - Compute the sum of the integers between indices and , inclusive.
The first line contains two positive integers, and .
The next lines each contain a sequence of positive integers. If the first integer in the line is , then three integers follow, , , and , indicating an
Otherwise, the first integer in the line is , and then two integers follow, and , indicating a
SUM operation, output on its own line the result of the query.
3 4 1 2 3 2 2 1 1 2 2 2 2 3 3
0 2 4