Data Structure¶
Range-query structures, persistent structures, and union-find variants.
| Header | Summary |
|---|---|
cartesian_tree.hpp |
Cartesian tree where each node is the minimum of its subtree. Equal values prefer the leftmost. |
consecutive_segment.hpp |
Interval assignment container maintaining consecutive segments of equal values. |
double_ended_heap.hpp |
Priority queue supporting lazy deletion of arbitrary elements. |
fastset.hpp |
Find max element <= x, or -1 if none. |
hashmap.hpp |
Randomized splitmix64 hash to prevent hash collision attacks. |
persistent_segtree.hpp |
Persistent segment tree supporting 2D rectangle sum and k-th queries. |
point_add_range_sum.hpp |
Sum of [l, r). |
point_add_rec_sum.hpp |
Dynamic point-add rectangle-sum with semi-offline rebuilds. |
point_set_range_freq.hpp |
Count occurrences of x in [l, r). |
range_add_point_get.hpp |
Add v to [l, r). |
rec_add_point_get.hpp |
Offline rectangle-add point-get: add weight w to all points in [l, r) x [d, u). |
rectangle_sum.hpp |
Offline rectangle sum. Points (x, y, weight), queries [l, r) x [d, u). |
segtree.hpp |
Segment tree for a monoid type. |
sliding_window_aggregation.hpp |
Sliding window aggregation (SWAG) supporting push_back, pop_front, and monoid product queries. |
sparse_table.hpp |
Query op over [l, r). |
tag_container.hpp |
HashMap with a global additive tag, supporting mergeable insert and bulk offset. |