Skip to content

Commit a7b7c0f

Browse files
committed
speed up test
1 parent 693e470 commit a7b7c0f

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ int main() {
1616
}
1717
ladder ld(adj);
1818
assert(sz(ld.l_tbl) <= 2 * n - ld.d[0]);
19-
vector<vector<int>> adj_rooted(n + n);
20-
for (int i = 0; i < n; i++)
21-
if (ld.p[i] != i) {
22-
adj_rooted[ld.p[i]].push_back(i);
23-
adj_rooted[ld.p[i] + n].push_back(i + n);
24-
}
25-
ladder ld_rooted(adj_rooted);
26-
linear_kth_par lin_ld_rooted(adj_rooted);
2719
while (q--) {
2820
int u, v, k;
2921
cin >> u >> v >> k;
@@ -34,23 +26,10 @@ int main() {
3426
else if (k <= u_lca) {
3527
int res = ld.kth_par(u, k);
3628
assert(res == jmp(ld.b_tbl, u, k));
37-
assert(res == ld_rooted.kth_par(u, k));
38-
assert(res == ld_rooted.kth_par(u + n, k) - n);
39-
assert(res == lin_ld_rooted.kth_par(u, k));
40-
assert(res == lin_ld_rooted.kth_par(u + n, k) - n);
4129
cout << res << '\n';
4230
} else {
4331
int res = ld.kth_par(v, u_lca + v_lca - k);
4432
assert(res == jmp(ld.b_tbl, v, u_lca + v_lca - k));
45-
assert(
46-
res == ld_rooted.kth_par(v, u_lca + v_lca - k));
47-
assert(res ==
48-
ld_rooted.kth_par(v + n, u_lca + v_lca - k) - n);
49-
assert(res ==
50-
lin_ld_rooted.kth_par(v, u_lca + v_lca - k));
51-
assert(res ==
52-
lin_ld_rooted.kth_par(v + n, u_lca + v_lca - k) -
53-
n);
5433
cout << res << '\n';
5534
}
5635
}

0 commit comments

Comments
 (0)