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≤T≤101≤N,Q≤1051≤l<r≤N1≤x≤N1≤v,A[i]≤106
For Query 1:
After Query 2:
For Query 3:
Hence, the required answer is 1 + 3 = 4.