Practice · 1 of 3
Subtree Add, Point Get
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** Rooted tree (root 1), initial zeros. q ops: SA v x
adds x to subtree(v); GET v prints value(v).
**Constraints:** 1 ≤ n, q ≤ 200 000; |x| ≤ 10^9.
Press Submit to check your solution.
Back to lesson: Practice: Euler Query Trio