SEGMENT TREES HELP

I want help regarding implementation of all segment tree operations over a vector of pairs and maintain a count of required values which are within a range if antone have done it before or have code regarding it please help…

You can give this a try GitHub - kartik8800/segTree: General purpose segment tree library. .
SegmentTree<pair<int,int>> segtre();