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
5 changes: 2 additions & 3 deletions library/trees/centroid_decomp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
//! @code
//! {
//! vector<vi> adj(n);
//! centroid(adj, [&](const vector<vi>& adj,
//! centroid(adj, [&](const auto& adj,
//! int cent, int par_cent) {
//! });
//! }
//! vector<basic_string<int>> adj(n);
//! centroid(adj,
//! [&](const vector<basic_string<int>>& adj,
//! centroid(adj, [&](const auto& adj,
//! int cent, int par_cent) {});
//! @endcode
//! @time O(n log n)
Expand Down
13 changes: 5 additions & 8 deletions library/trees/edge_cd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
//! @code
//! {
//! vector<vi> adj(n);
//! edge_cd(adj, [&](const vector<vi>& adj,
//! int cent, int split) {});
//! edge_cd(adj, [&](const auto& adj,
//! int cent, int m) {});
//! }
//! vector<basic_string<int>> adj(n);
//! edge_cd(adj, [&](const vector<basic_string<int>>&
//! adj, int cent, int split) {
//! // subtrees of prefix [0, split) of adj[cent]
//! // are the first edge-set
//! // subtrees of suffix [split, sz(adj[cent]))
//! // of adj[cent] are the second edge-set
//! edge_cd(adj, [&](const auto& adj, int cent, int m) {
//! // subtrees of [0, m) of adj[cent]: 1st edge-set
//! // subtrees of [m, sz(adj[cent])): 2nd edge-set
//! });
//! @endcode
//! handle single-edge-paths separately
Expand Down
Loading