Given a tree of $N$ vertices. Edges are $(u_ i, v_ i)$. Value $a_ i$ is written on the vertex $i$.
Process the following $Q$ queries in order:
0 p x: $a_ p \gets a_ p + x$1 u v: Print the sum of the values of vertices of the path between vertex $u$ and $v$ (inclusive).$N$ $Q$
$a_ 0$ $a_ 1$ ... $a_ {N - 1}$
$u_ 0$ $v_ 0$
$u_ 1$ $v_ 1$
:
$u_ {N - 2}$ $v_ {N - 2}$
$\textrm{Query}_ 0$
$\textrm{Query}_ 1$
:
$\textrm{Query}_ {Q - 1}$
5 5 1 10 100 1000 10000 0 1 1 2 2 3 1 4 1 0 3 1 2 4 0 1 100000 1 1 3 1 3 2
1111 10110 101110 1100
| No. | Testdata Range | Score |
|---|