差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン両方とも次のリビジョン
programming_algorithm:data_structure:balancing_binary_search_tree:tree_free [2020/06/29] – [配列・特殊アイデア系①] ikatakosprogramming_algorithm:data_structure:balancing_binary_search_tree:tree_free [2020/09/03] – [Binary Indexed Tree] ikatakos
行 50: 行 50:
   * 値 $x$ を追加 → $bit.add(x, 1)$   * 値 $x$ を追加 → $bit.add(x, 1)$
   * 値 $x$ を削除 → $bit.add(x, -1)$   * 値 $x$ を削除 → $bit.add(x, -1)$
-  * $k$ 番目の値を取得 → 累積和が $k$ 以上になる最小のindexを取得+  * $k$ 番目の値を取得 → $bit.lower_bound(k)$(累積和が $k$ 以上になる最小のindexを取得) 
 +  * $x$ 以上の最小の値を取得 $bit.lower_bound(bit.sum(x - 1) + 1)$
  
 ^機能  ^計算量      ^ ^機能  ^計算量      ^
programming_algorithm/data_structure/balancing_binary_search_tree/tree_free.txt · 最終更新: 2024/04/30 by ikatakos
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0