Data Structure IV: Persistent Segment Trees
Data Structure IV: Persistent Segment Trees
Introduction
Distinct Sum1
http://acm.hdu.edu.cn/showproblem.php?pid=3333
Discretize A
Observation
Proprocessing
Query
http://poj.org/problem?id=2104
Auxiliary Question
Auxiliary Array
Some Details