Skip to content

Commit 1296461

Browse files
authored
Update seg_tree.hpp
1 parent 8c87cf8 commit 1296461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/data_structures_[l,r]/seg_tree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ template<class T, class F> struct tree {
1919
int n;
2020
F op;
2121
vector<T> s;
22-
tree(int n, T, F op): n(n), op(op), s(2 * n) {}
22+
tree(int n, T unit, F op): n(n), op(op), s(2 * n, unit) {}
2323
void update(int i, T val) {
2424
for (s[i += n] = val; i /= 2;)
2525
s[i] = op(s[2 * i], s[2 * i + 1]);

0 commit comments

Comments
 (0)