Help needed in Subtree Queries CSES

Revision en2, by rengokudied, 2023-07-28 15:57:16

I have been trying to flatten the tree using euler tour and then making a segment tree on the value array for point update and range query . I cant seem to understand the logical error i am doing . Please someone guide.

Code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rengokudied 2023-07-28 15:57:16 23
en1 English rengokudied 2023-07-28 15:41:59 3567 Initial revision (published)