A tree rooted at 1 is given , we have to perform two type of queries .↵
- type 1 (u,x): update value of node node u to x.↵
- type 2 (u,x): count the number of node having value less than x in path from u to 1. ↵
n<=100000↵
q<=100000
- type 1 (u,x): update value of node node u to x.↵
- type 2 (u,x): count the number of node having value less than x in path from u to 1. ↵
n<=100000↵
q<=100000