Need Help in COT from SPOJ

Revision en1, by Pie-Lie-Die, 2020-12-15 16:30:37

I am solving this problem from SPOJ : https://www.spoj.com/problems/COT/ I referred to the blog by Anudeep. Find it here : https://blog.anudeep2011.com/persistent-segment-trees-explained-with-spoj-problems/

What I don't understand is what the variable "count" stores for each node. Can someone explain what count refers to and how it helps in finding the ordered statistics? Thanks.

Tags #help, #segment tree, #persistence, #codeforces

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Pie-Lie-Die 2020-12-15 16:30:37 413 Initial revision (published)