Skip to content

Commit

Permalink
Update correct.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chai-hf committed Jan 27, 2025
1 parent e5610a0 commit d782eca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tree/vertex_add_path_sum/sol/correct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ template <class E> struct HLExec : HL {
V<int> tch;
int id = 0;
HLExec(const VV<E>& _g, int r) : HL(_g.size()), g(_g), tch(g.size(), -1) {
assert(dfs_sz(r, -1) == int(g.size()));
int size = dfs_sz(r, -1);
assert(size == int(g.size()));
dfs(r, -1);
init_extra();
}
Expand Down
3 changes: 2 additions & 1 deletion tree/vertex_set_path_composite/sol/correct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ template <class E> struct HLExec : HL {
V<int> tch;
int id = 0;
HLExec(const VV<E>& _g, int r) : HL(_g.size()), g(_g), tch(g.size(), -1) {
assert(dfs_sz(r, -1) == int(g.size()));
int size = dfs_sz(r, -1);
assert(size == int(g.size()));
dfs(r, -1);
init_extra();
}
Expand Down

0 comments on commit d782eca

Please sign in to comment.