Skip to content

Commit

Permalink
[update] delete unused i
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo314 committed Jun 28, 2024
1 parent 56170e0 commit 0e95013
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cpp/rerooting-dp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ inline std::vector<Cost> farthest_node_dist(const Tree<Cost>& tree) {
tree,
Cost{},
[](Cost a, Cost b) { return std::max<Cost>(a, b); },
[](Cost a, Cost c, int i) { return a + c; },
[](Cost a, int i) { return a; });
[](Cost a, Cost c, int) { return a + c; },
[](Cost a, int) { return a; });
}

/**
Expand All @@ -77,8 +77,8 @@ inline std::vector<Cost> distance_sums(const Tree<Cost>& tree) {
tree,
P{{}, 0},
[](P a, P b) { return P{a.first + b.first, a.second + b.second}; },
[](P a, Cost c, int i) { return P{a.first + a.second * c, a.second}; },
[](P a, int i) { return P{a.first, a.second + 1}; });
[](P a, Cost c, int) { return P{a.first + a.second * c, a.second}; },
[](P a, int) { return P{a.first, a.second + 1}; });
std::vector<Cost> res;
res.reserve(tree.n);
for (const P& s : tmp) res.push_back(s.first);
Expand All @@ -94,6 +94,6 @@ inline std::vector<V> connected_subgraph_count(const Tree<Cost>& tree) {
tree,
V(1),
[](V a, V b) { return a * b; },
[](V a, Cost c, int i) { return a + 1; },
[](V a, int i) { return a; });
[](V a, Cost c, int) { return a + 1; },
[](V a, int) { return a; });
}

0 comments on commit 0e95013

Please sign in to comment.