Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Doubt in Persistent Segment trees
Difference between en2 and en3, changed 0 character(s)
Why do we always break down a query into prefix query when the problem involves Persistent Segment tree is it not possible to directly query a range [L,R]?↵
For example consider this problem and the editorial — http://www.codechef.com/SNCKEL16/problems/SEGSUMQ↵
↵
If we sort the vectors by the angle and then insert into the persistent segment tree in that order when we get a query <C,D> we can just query that segment tree in which all the vectors in it have lesser angle.↵
↵
Am i missing something here? Could use some help.↵
Thanks :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English bhargav104 2017-01-17 11:38:11 0 (published)
en2 English bhargav104 2017-01-17 11:37:37 9 (saved to drafts)
en1 English bhargav104 2017-01-17 11:36:59 568 Initial revision (published)