Skip to content

Commit 4e14e89

Browse files
committed
update docs
1 parent 9f5eb56 commit 4e14e89

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
//! https://codeforces.com/blog/entry/118682
33
//! @code
44
//! {
5-
//! tree st(n, 0LL, [&](ll l, ll r) {
6-
//! return l + r;
5+
//! tree st(a, [&](int vl, int vr) {
6+
//! return vl & vr;
77
//! });
88
//! }
9-
//! tree st(n, INT_MAX, ranges::min);
9+
//! {
10+
//! tree st(n, 0LL, plus<ll>{});
11+
//! }
12+
//! {
13+
//! tree st(n, INT_MAX, ranges::min);
14+
//! int idx = st.walk(l, r, [&](int value) {
15+
//! return value <= x;
16+
//! }); // smallest index in [l, r] s.t. f is true
17+
//! }
1018
//! @endcode
1119
//! @time O(n + q log n)
1220
//! @space O(n)

0 commit comments

Comments
 (0)