Rosetta Problems
← 問題一覧に戻る
動的木の部分木加算・部分木和
辺の削除・追加で形が変わる木に対し、部分木の頂点の値への加算と、部分木の値の和の問い合わせを処理する。
関連リンク
yosupo/dynamic_tree_subtree_add_subtree_sum