diff --git a/document_en/fenwicktree.md b/document_en/fenwicktree.md index 7539bfa..306353b 100644 --- a/document_en/fenwicktree.md +++ b/document_en/fenwicktree.md @@ -1,6 +1,6 @@ # Fenwick Tree -Given an array of length $N$, it processes the following queries in $O(\log N)$ time. +Given an array of length $n$, it processes the following queries in $O(\log n)$ time. - Updating an element - Calculating the sum of the elements of an interval diff --git a/document_en/mincostflow.md b/document_en/mincostflow.md index 95bb20e..49be78a 100644 --- a/document_en/mincostflow.md +++ b/document_en/mincostflow.md @@ -66,7 +66,7 @@ Let $g$ be a function such that $g(x)$ is the cost of the minimum cost $s-t$ flo It returns $g$ as the list of the changepoints, that satisfies the followings. - The first element of the list is $(0, 0)$. -- Both of `.first` and `.second` are strictly increasing. +- `.first` is strictly increasing and `.second` is non-decreasing. - No three changepoints are on the same line. - (1) The last element of the list is $(x, g(x))$, where $x$ is the maximum amount of the $s-t$ flow. - (2) The last element of the list is $(y, g(y))$, where $y = \min(x, \mathrm{flow\\_limit})$. diff --git a/document_en/segtree.md b/document_en/segtree.md index d9b8020..3a200cd 100644 --- a/document_en/segtree.md +++ b/document_en/segtree.md @@ -5,7 +5,7 @@ It is the data structure for [monoids](https://en.wikipedia.org/wiki/Monoid) $(S - associativity: $(a \cdot b) \cdot c$ = $a \cdot (b \cdot c)$ for all $a, b, c \in S$ - existence of the identity element: $a \cdot e$ = $e \cdot a$ = $a$ for all $a \in S$ -Given an array $S$ of length $N$, it processes the following queries in $O(\log N)$ time (see [Appendix](./appendix.html) for further details). +Given an array $S$ of length $n$, it processes the following queries in $O(\log n)$ time (see [Appendix](./appendix.html) for further details). - Updating an element - Calculating the product of the elements of an interval diff --git a/document_ja/fenwicktree.md b/document_ja/fenwicktree.md index 9206b59..251edb2 100644 --- a/document_ja/fenwicktree.md +++ b/document_ja/fenwicktree.md @@ -1,11 +1,11 @@ # Fenwick Tree -長さ $N$ の配列に対し、 +長さ $n$ の配列に対し、 - 要素の $1$ 点変更 - 区間の要素の総和 -を $O(\log N)$ で求めることが出来るデータ構造です。 +を $O(\log n)$ で求めることが出来るデータ構造です。 ## コンストラクタ diff --git a/document_ja/mincostflow.md b/document_ja/mincostflow.md index 0428b77..42aac65 100644 --- a/document_ja/mincostflow.md +++ b/document_ja/mincostflow.md @@ -66,7 +66,7 @@ vector> graph.slope(int s, int t, Cap flow_limit); 返り値に流量とコストの関係の折れ線が入る。全ての $x$ について、流量 $x$ の時の最小コストを $g(x)$ とすると、$(x, g(x))$ は返り値を折れ線として見たものに含まれる。 - 返り値の最初の要素は $(0, 0)$ -- 返り値の`.first`、`.second`は共に狭義単調増加 +- 返り値の`.first` は狭義単調増加、`.second`は広義単調増加 - 3点が同一線上にあることはない - (1) 返り値の最後の要素は最大流量 $x$ として $(x, g(x))$ - (2) 返り値の最後の要素は $y = \min(x, \mathrm{flow\\_limit})$ として $(y, g(y))$ diff --git a/document_ja/segtree.md b/document_ja/segtree.md index e989100..f1fdde7 100644 --- a/document_ja/segtree.md +++ b/document_ja/segtree.md @@ -7,12 +7,12 @@ を満たす代数構造に対し使用できるデータ構造です。 -長さ $N$ の $S$ の配列に対し、 +長さ $n$ の $S$ の配列に対し、 - 要素の $1$ 点変更 - 区間の要素の総積の取得 -を $O(\log N)$ で行うことが出来ます。詳細な要件は [Appendix](./appendix.html) を参照してください。 +を $O(\log n)$ で行うことが出来ます。詳細な要件は [Appendix](./appendix.html) を参照してください。 また、このライブラリはオラクルとして`op, e`の2種類を使用しますが、これらが定数時間で動くものと仮定したときの計算量を記述します。オラクル内部の計算量が $O(f(n))$ である場合はすべての計算量が $O(f(n))$ 倍となります。