Skip to content

Commit c29f02d

Browse files
committed
fix
1 parent 73a2e2c commit c29f02d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

library/trees/shallowest_decomp_tree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void shallowest(auto& adj, auto f) {
2121
return dp;
2222
};
2323
dfs(dfs, 0, 0);
24-
for (vi vec : order | views::reverse)
24+
for (const vi& vec : order | views::reverse)
2525
for (int v : vec) {
2626
f(v);
2727
for (int u : adj[v])

tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define PROBLEM \
22
"https://judge.yosupo.jp/problem/tree_path_composite_sum"
3+
#undef _GLIBCXX_DEBUG
34
#include "../template.hpp"
45
#include "../../../library/trees/shallowest_decomp_tree.hpp"
56
#include "../../../library/math/mod_int.hpp"
@@ -30,8 +31,8 @@ int main() {
3031
assert(ssize(adj[cent]) == ssize(weight[cent]));
3132
mint total_sum_evaluated = 0;
3233
int total_cnt_nodes = 0;
33-
mint curr_sum_evaluated;
34-
int curr_cnt_nodes;
34+
mint curr_sum_evaluated = 0;
35+
int curr_cnt_nodes = 0;
3536
auto dfs = [&](auto&& self, int v, int p,
3637
line downwards, line upwards,
3738
bool forwards) -> void {

0 commit comments

Comments
 (0)