Skip to content

Commit b67c8fd

Browse files
committed
add cd asserts here at least
1 parent 683703d commit b67c8fd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/library_checker_aizu_tests/handmade_tests/count_paths_forest.test.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
#include "../../../library/data_structures/dsu/dsu_restorable.hpp"
77
#include "../../../library/trees/tree_lift/tree_lift.hpp"
88
#include "../../../library/trees/centroid_decomp_uncommon/count_paths_per_length.hpp"
9+
#include "../cd_asserts.hpp"
910
vector<vector<ll>> naive(const vector<vector<int>>& adj,
10-
dsu_restorable& dsu) {
11+
dsu_restorable& dsu) {
1112
tree_lift tl(adj);
1213
int n = sz(adj);
1314
vector<vector<ll>> cnts_naive(n + 1, vector<ll>(n, 0));
@@ -37,16 +38,17 @@ int main() {
3738
adj[v].push_back(u);
3839
}
3940
}
41+
cd_asserts(adj);
4042
vector<vector<ll>> cnts_naive = naive(adj, dsu);
4143
for (int k = 1; k <= n; k++)
4244
assert(
43-
count_paths_per_node(adj, k) == cnts_naive[k]);
45+
count_paths_per_node(adj, k) == cnts_naive[k]);
4446
vector<ll> num_paths_len = count_paths_per_length(adj);
4547
for (int k = 1; k < n; k++) {
4648
vector<ll> count_paths =
47-
count_paths_per_node(adj, k);
49+
count_paths_per_node(adj, k);
4850
ll total_paths = accumulate(begin(count_paths),
49-
end(count_paths), 0LL);
51+
end(count_paths), 0LL);
5052
assert(total_paths % (k + 1) == 0);
5153
total_paths /= k + 1;
5254
assert(num_paths_len[k] == total_paths);

0 commit comments

Comments
 (0)