You are given an array \(A\) of \(N\) integers.
Also, you are given \(Q\) queries of the following type:
Your task is to determine the sum of answers for queries of Type \(2\) over all \(Q\) queries.
Note
Input format
Output format
For each test case, print an integer denoting the sum of the answer for all the queries of Type \(2\) in a new line.
Constraints
\(1 \le T \le 10 \\ 1 \le N, Q \le 10^5 \\ 1 \le l < r \le N \\ 1 \le x \le N \\ 1 \le v, A[i] \le 10^6\)
For Query 1:
After Query 2:
For Query 3:
Hence, the required answer is 1 + 3 = 4.