This is an unusual problem in an unusual contest, here is the announcement: http://cf.m27.workers.dev/blog/entry/73543
You are given an array \(A\) of length \(n\), initially filled with zeros. You need to process \(q\) queries to the array, each of one of the following types:
- 1 x y: you need to assign \(A_x=y\);
- 2 l r: you need to print \(\sum\limits_{i=l}^r A_i\).
Furthermore, there are
\(T\) independent tests you need to process.
Output
For each query of the second type print its result on a separate line.
| № | Входные данные | Выходные данные |
|
1
|
2
6 5
2 1 6
1 3 2
2 2 4
1 6 3
2 1 6
5 3
1 3 7
1 1 4
2 1 5
|
0
2
5
11
|