Recently, I've just encountered this problem: Given a tree with $$$n$$$ vertices and rooted at $$$1$$$. Each vertex has an initial value, and initially, all these values are $$$0$$$. [cut] There are $$$q$$$ queries of two types: [cut] - "1 u": Find the sum of values of vertices in the subtree rooted at u. [cut] - "2 u": Find the value at vertex u. [cut] - "3 u v x": Increase the values of vertices on the simple path from u to v by x. [cut] Answer the queries of type 1 and 2. [cut] Constraints