Skip to content

Commit

Permalink
[fix] test and assert
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo314 committed Jun 28, 2024
1 parent 14ba54f commit f7e0164
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion cpp/rerooting-dp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ std::vector<V> rerooting_dp(const Tree<Cost>& tree, E e, Merge merge, AddEdge ad
static_assert(std::is_invocable_r_v<E, Merge, E, E>);
static_assert(std::is_invocable_r_v<E, AddEdge, V, Cost, int>);
static_assert(std::is_invocable_r_v<V, AddNode, E, int>);
assert(tree.n > 0);
RootedTree<Cost> rooted(tree, 0);
std::vector<V> subdp(rooted.n);
for (int u : rooted.postorder) {
Expand Down
2 changes: 1 addition & 1 deletion test/aoj-1595.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "../cpp/rerooting-dp.hpp"

int main() {
int N, M;
int N;
std::cin >> N;
Tree<long long> tree(N);
tree.read();
Expand Down

0 comments on commit f7e0164

Please sign in to comment.