Skip to content

Commit 362ed04

Browse files
committed
split up tests
1 parent 529e9b1 commit 362ed04

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

tests/library_checker_aizu_tests/trees/ladder_decomposition.test.cpp renamed to tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp

File renamed without changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#define PROBLEM \
2+
"https://judge.yosupo.jp/problem/jump_on_tree"
3+
#include "../template.hpp"
4+
#include "../../../library/trees/linear_kth_path.hpp"
5+
int main() {
6+
cin.tie(0)->sync_with_stdio(0);
7+
int n, q;
8+
cin >> n >> q;
9+
vector<vector<int>> adj(n);
10+
for (int i = 0; i < n - 1; i++) {
11+
int u, v;
12+
cin >> u >> v;
13+
adj[u].push_back(v);
14+
adj[v].push_back(u);
15+
}
16+
linear_kth_path lin_kth_path(adj);
17+
while (q--) {
18+
int u, v, k;
19+
cin >> u >> v >> k;
20+
cout << lin_kth_path.kth_path(u, v, k) << '\n';
21+
}
22+
}

tests/library_checker_aizu_tests/trees/kth_node_on_path.test.cpp renamed to tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp

File renamed without changes.

0 commit comments

Comments
 (0)