How to use segment tree in another tree

Revision en3, by PR_0202, 2020-07-13 08:18:53

I am confused about how to get sum from a node y to its ancestor x using a segment tree. there is query of 10^5 order consists of update and find sum of the nodes between them.!

Tags #segment tree, #segment-trees, #implementation, #fenwick tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English PR_0202 2020-07-13 08:18:53 65
en2 English PR_0202 2020-07-13 08:17:37 73 Tiny change: 'ween them.' -> 'ween them.!\n[ ](https://codeforces.me/7566bf/Capture.PNG)'
en1 English PR_0202 2020-07-13 08:15:05 215 Initial revision (published)