Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions document_en/lazysegtree.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ It returns an index `r` that satisfies both of the followings.
- `r = l` or `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`
- `r = n` or `g(op(a[l], a[l + 1], ..., a[r])) = false`

If `f` is monotone, this is the maximum `r` that satisfies `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`.
If `g` is monotone, this is the maximum `r` that satisfies `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`.

**@{keyword.constraints}**

- if `f` is called with the same argument, it returns the same value, i.e., `f` has no side effect.
- `f(e_s()) = true`
- if `g` is called with the same argument, it returns the same value, i.e., `g` has no side effect.
- `g(e()) = true`
- $0 \leq l \leq n$

**@{keyword.complexity}**
Expand All @@ -164,12 +164,12 @@ It returns an index `l` that satisfies both of the following.
- `l = r` or `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`
- `l = 0` or `g(op(a[l - 1], a[l], ..., a[r - 1])) = false`

If `f` is monotone, this is the minimum `l` that satisfies `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`.
If `g` is monotone, this is the minimum `l` that satisfies `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`.

**@{keyword.constraints}**

- if `f` is called with the same argument, it returns the same value, i.e., `f` has no side effect.
- `f(e_s()) = true`
- if `g` is called with the same argument, it returns the same value, i.e., `g` has no side effect.
- `g(e()) = true`
- $0 \leq r \leq n$

**@{keyword.complexity}**
Expand Down
12 changes: 6 additions & 6 deletions document_ja/lazysegtree.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ S seg.all_prod()
- `r = l` もしくは `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`
- `r = n` もしくは `g(op(a[l], a[l + 1], ..., a[r])) = false`

`f`が単調だとすれば、`g(op(a[l], a[l + 1], ..., a[r - 1])) = true` となる最大の `r`、と解釈することが可能です。
`g`が単調だとすれば、`g(op(a[l], a[l + 1], ..., a[r - 1])) = true` となる最大の `r`、と解釈することが可能です。

**@{keyword.constraints}**

- `f`を同じ引数で呼んだ時、返り値は等しい(=副作用はない)
- `f(e_s()) = true`
- `g`を同じ引数で呼んだ時、返り値は等しい(=副作用はない)
- `g(e()) = true`
- $0 \leq l \leq n$

**@{keyword.complexity}**
Expand All @@ -165,12 +165,12 @@ S seg.all_prod()
- `l = r` もしくは `g(op(a[l], a[l + 1], ..., a[r - 1])) = true`
- `l = 0` もしくは `g(op(a[l - 1], a[l], ..., a[r - 1])) = false`

`f`が単調だとすれば、`g(op(a[l], a[l + 1], ..., a[r - 1])) = true` となる最小の `l`、と解釈することが可能です。
`g`が単調だとすれば、`g(op(a[l], a[l + 1], ..., a[r - 1])) = true` となる最小の `l`、と解釈することが可能です。

**@{keyword.constraints}**

- `f`を同じ引数で呼んだ時、返り値は等しい(=副作用はない)
- `f(e_s()) = true`
- `g`を同じ引数で呼んだ時、返り値は等しい(=副作用はない)
- `g(e()) = true`
- $0 \leq r \leq n$

**@{keyword.complexity}**
Expand Down