File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
library/data_structures_[l,r)/seg_tree_uncommon Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ template<int K> struct KD_SEG {
1111 s[i += n].update (a...);
1212 while (i /= 2 ) s[i].pull (s[2 * i], s[2 * i + 1 ], a...);
1313 }
14+ void pull (const KD_SEG<K>& l, const KD_SEG<K>& r, int i,
15+ auto ... a) {
16+ s[i += n].pull (l.s [i], r.s [i], a...);
17+ while (i /= 2 ) s[i].pull (s[2 * i], s[2 * i + 1 ], a...);
18+ }
1419 T query (int l, int r, auto ... a) {
1520 T x = unit, y = unit;
1621 for (l += n, r += n; l < r; l /= 2 , r /= 2 ) {
@@ -19,11 +24,6 @@ template<int K> struct KD_SEG {
1924 }
2025 return op (x, y);
2126 }
22- void pull (const KD_SEG<K>& l, const KD_SEG<K>& r, int i,
23- auto ... a) {
24- s[i += n].pull (l.s [i], r.s [i], a...);
25- while (i /= 2 ) s[i].pull (s[2 * i], s[2 * i + 1 ], a...);
26- }
2727};
2828template <> struct KD_SEG <0 > {
2929 T val = unit;
You can’t perform that action at this time.
0 commit comments