| TSEC Round 2 (Div. 3) |
|---|
| Закончено |
Dhrumil and Abhishek are playing a game on an array, Abhishek gives Dhrumil an array $$$a_1, a_2, \dots, a_n$$$ consisting of $$$n$$$ levels.
Abhishek provides Dhrumil with two types of operations:
Your task is to help Dhrumil to accurately find the points, else he will lose the game
The first line of input contains an integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases.
For each test case:
Then, the next $$$q$$$ lines contain the following types of queries:
It is guaranteed that the sum of all $$$n + q$$$ across all test cases does not exceed $$$10^6$$$.
For each query of Type 2, output the weighted sum $$$S(l, r)$$$.
3 5 3 1 2 4 1 5 2 1 5 1 3 10 2 1 5 5 1 1 2 3 4 5 2 1 5 10 8 1 3 2 7 9 6 9 2 6 7 1 1 9 2 1 7 2 1 6 2 3 7 1 6 3 2 3 8 2 4 6 2 1 10
46 64 55 193 130 112 112 34 315
| Название |
|---|


