We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c87cf8 commit 1296461Copy full SHA for 1296461
library/data_structures_[l,r]/seg_tree.hpp
@@ -19,7 +19,7 @@ template<class T, class F> struct tree {
19
int n;
20
F op;
21
vector<T> s;
22
- tree(int n, T, F op): n(n), op(op), s(2 * n) {}
+ tree(int n, T unit, F op): n(n), op(op), s(2 * n, unit) {}
23
void update(int i, T val) {
24
for (s[i += n] = val; i /= 2;)
25
s[i] = op(s[2 * i], s[2 * i + 1]);
0 commit comments