Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [apuhach@latitude SegmentTree]$ git diff basic.h
- diff --git a/DataStructures/SegmentTree/basic.h b/DataStructures/SegmentTree/basic.h
- index 72d3f9e..cfd74c8 100644
- --- a/DataStructures/SegmentTree/basic.h
- +++ b/DataStructures/SegmentTree/basic.h
- @@ -1,12 +1,14 @@
- /*
- struct SegTreeOps {
- - T combine(T a, T b);
- - T update(T cur, UPD val);
- + static T combine(T a, T b);
- + static T update(T cur, UPD val);
- };
- */
- -template<typename OPS, typename T, typename UPD>
- +template<typename OPS, typename UPD>
- class SegTree {
- public:
- + using T = typename result_of<OPS::combine>::type;
- +
- SegTree(int n): data(4*n), n(n) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement