Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a8eafec
rerun tests with lower time limit
lrvideckis Dec 9, 2024
da3e8da
[auto-verifier] verify commit a8eafeca112705e23f5d36f43148dea01538a1f7
web-flow Dec 9, 2024
cbf3416
split up rmq test
lrvideckis Dec 10, 2024
53332cc
fix this test
lrvideckis Dec 10, 2024
094a2c8
fix
lrvideckis Dec 10, 2024
b97c3f5
tiny speedup
lrvideckis Dec 10, 2024
530291c
remove cuz it's too slow
lrvideckis Dec 10, 2024
3b6a3ef
speed up test
lrvideckis Dec 10, 2024
f7a6ac2
also use std::midpoint
lrvideckis Dec 10, 2024
465ef0d
decrease
lrvideckis Dec 10, 2024
8c9b13a
decrease
lrvideckis Dec 10, 2024
22d826f
decrease bound
lrvideckis Dec 10, 2024
6056884
actually revert this
lrvideckis Dec 10, 2024
7b69b73
[auto-verifier] verify commit 60568843711b3b8a35923f04cad9a49c18d72ddd
web-flow Dec 10, 2024
b13b49c
fix
lrvideckis Dec 11, 2024
ddee6c9
fix
lrvideckis Dec 11, 2024
32cb033
[auto-verifier] verify commit ddee6c9cae8c476faa316c54cfe052c0848a6bcb
web-flow Dec 11, 2024
148b789
update
lrvideckis Dec 12, 2024
8b4c40f
remove test
lrvideckis Dec 12, 2024
7283c15
fix
lrvideckis Dec 12, 2024
a1b1a00
add justification
lrvideckis Dec 12, 2024
aef5803
actually 10 seconds
lrvideckis Dec 12, 2024
529e9b1
[auto-verifier] verify commit aef58036ef939ee4ad4406dbd9c88a2785d9a2b0
web-flow Dec 12, 2024
362ed04
split up tests
lrvideckis Dec 13, 2024
964097a
shorten other test
lrvideckis Dec 13, 2024
0c9455f
move speed test to edge CD
lrvideckis Dec 13, 2024
f5ff9d2
add assert for par of centroid tree
lrvideckis Dec 13, 2024
211497f
[auto-verifier] verify commit f5ff9d2f1bf1bf268d8a878b2d1924c653801eb7
web-flow Dec 13, 2024
9b39418
remove cd asserts
lrvideckis Dec 13, 2024
683703d
Merge branch 'ten_second_time_limit' of github.com:programming-team-c…
lrvideckis Dec 13, 2024
b67c8fd
add cd asserts here at least
lrvideckis Dec 13, 2024
eeb24af
speedup
lrvideckis Dec 13, 2024
2d56da5
[auto-verifier] verify commit eeb24afb4a6782a6c3f89f9916d007d391882748
web-flow Dec 13, 2024
c214314
remove var
lrvideckis Dec 13, 2024
5540481
trying some optimizations
lrvideckis Dec 13, 2024
4a69b08
Revert "trying some optimizations"
lrvideckis Dec 13, 2024
02d3bdb
[auto-verifier] verify commit 55404815e76c1d81d1bb1594a9f53d53413c5d23
web-flow Dec 13, 2024
0ed6e32
Merge branch 'ten_second_time_limit' of github.com:programming-team-c…
lrvideckis Dec 14, 2024
93b4a5b
[auto-verifier] verify commit 0ed6e32e528d6bbcb1ff488e5125540839ebb8b6
web-flow Dec 14, 2024
b461c40
seeing if iterative scc is any faster
lrvideckis Dec 14, 2024
83a7e02
Revert "seeing if iterative scc is any faster"
lrvideckis Dec 14, 2024
3fd132a
[auto-verifier] verify commit 83a7e027ee40437908443c5c7a3a244f21e22f48
web-flow Dec 14, 2024
8218b94
trying this speedup
lrvideckis Dec 14, 2024
6c08ade
[auto-verifier] verify commit 8218b942aa69563cd5e41d1601002e93dc30ef8d
web-flow Dec 14, 2024
fd72bf4
Merge branch 'dev' into ten_second_time_limit
lrvideckis Dec 15, 2024
dc48807
fix format
lrvideckis Dec 15, 2024
359e1a9
revert
lrvideckis Dec 15, 2024
6c4a76f
[auto-verifier] verify commit 359e1a9d4b460a511d096edbf1a80a07481eced3
web-flow Dec 15, 2024
cc684ec
format
lrvideckis Dec 15, 2024
941fa15
rename folder
lrvideckis Dec 15, 2024
080f66a
fail on path not found here
lrvideckis Dec 15, 2024
d948325
fix
lrvideckis Dec 15, 2024
399296e
remove slow test LOL
lrvideckis Dec 15, 2024
1aa118b
another fix
lrvideckis Dec 15, 2024
b27cc43
[auto-verifier] verify commit 1aa118bf6c5d37f7620cf5492933dc05ed74a05f
web-flow Dec 15, 2024
65b45ca
speedup
lrvideckis Dec 15, 2024
2ba1a33
[auto-verifier] verify commit 65b45caac28d56f2e658df44c98319b06e488fb8
web-flow Dec 15, 2024
f115892
trying this
lrvideckis Dec 15, 2024
b90fc79
actually it doesn't work now
lrvideckis Dec 15, 2024
c6ad231
fix
lrvideckis Dec 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/programming_team_code_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: oj-verify all --tle 35 --timeout 21600
run: oj-verify all --tle 10 --timeout 21600

check_format_lint:
runs-on: ubuntu-latest
Expand Down
55 changes: 27 additions & 28 deletions .verify-helper/timestamps.remote.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tests/library_checker_aizu_tests/data_structures/binary_trie.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/data_structures/bit.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_inc.test.cpp": "2024-11-18 09:44:22 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2024-11-18 09:44:22 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2024-12-10 11:52:04 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_rupq.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_rurq.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/bit_walk.test.cpp": "2024-12-14 19:50:29 -0600",
Expand All @@ -21,7 +21,7 @@
"tests/library_checker_aizu_tests/data_structures/dsu_bipartite.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/data_structures/dsu_restorable.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/data_structures/dsu_segtree_undo_trick.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2024-12-15 09:29:23 -0600",
"tests/library_checker_aizu_tests/data_structures/kruskal_tree_aizu.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/kth_smallest_wavelet_matrix.test.cpp": "2024-11-19 08:31:51 -0600",
Expand All @@ -38,40 +38,41 @@
"tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_with_dsu.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/data_structures/range_parallel_dsu.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_all_methods.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_inc.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/data_structures/range_parallel_dsu.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_disjoint_sparse_table.test.cpp": "2024-12-15 09:26:21 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2024-12-15 09:26:21 -0600",
"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/flow/dinic_aizu.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/flow/dinic_lib_checker.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2024-12-15 12:40:15 -0600",
"tests/library_checker_aizu_tests/graphs/enumerate_triangles.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_aizu.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_lib_checker.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2024-12-15 12:40:15 -0600",
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2024-12-15 12:40:15 -0600",
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2024-12-15 12:40:15 -0600",
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2024-12-15 09:01:54 -0600",
"tests/library_checker_aizu_tests/handmade_tests/count_paths_forest.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/count_paths_forest.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/handmade_tests/dsu_size.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/dynamic_bitset.test.cpp": "2024-11-22 10:47:44 -0600",
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/handmade_tests/lca_ladder_forest.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2024-12-10 12:31:07 -0600",
"tests/library_checker_aizu_tests/handmade_tests/mod_int.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/n_choose_k.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2024-12-14 15:47:13 -0600",
Expand All @@ -85,7 +86,7 @@
"tests/library_checker_aizu_tests/loops/supermasks.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/binary_exponentiation_mod.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/binary_matrix_mult.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/count_paths.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/count_paths.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/math/derangement.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/matrix_determinant.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/math/matrix_mult.test.cpp": "2024-11-17 14:04:03 -0600",
Expand All @@ -100,40 +101,38 @@
"tests/library_checker_aizu_tests/math/solve_linear_mod.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/math/tetration.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/totient.test.cpp": "2024-11-17 14:04:03 -0600",
"tests/library_checker_aizu_tests/math/xor_basis.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2024-12-14 15:47:13 -0600",
"tests/library_checker_aizu_tests/math/xor_basis.test.cpp": "2024-12-15 13:39:10 -0600",
"tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2024-12-15 13:39:10 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/strings/kmp.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/lcp_array.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/strings/longest_common_substring.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/manacher.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/prefix_function.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/strings/trie.test.cpp": "2024-12-05 10:41:42 -0600",
"tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/cd_jump_on_tree.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/cd_lca.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/count_paths_per_length.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/count_paths_per_length.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2024-12-14 18:43:21 -0600",
"tests/library_checker_aizu_tests/trees/kth_node_on_path.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/ladder_decomposition.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2024-12-15 09:26:21 -0600",
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2024-12-15 09:26:21 -0600",
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2024-12-15 12:37:34 -0600",
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2024-12-14 19:50:29 -0600",
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2024-12-14 19:50:29 -0600"
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2024-12-15 12:37:34 -0600"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
vi offline_incremental_scc(vector<array<int, 2>> eds,
int n) {
int m = sz(eds);
vi ids(n, -1), joins(m, m), idx(m);
vi ids(n, -1), joins(m, m), idx(m), vs(n), scc_id;
iota(all(idx), 0);
vector<basic_string<int>> adj;
auto divide_and_conquer = [&](auto&& self, auto el,
auto er, int tl, int tr) {
int mid = tl + (tr - tl) / 2;
vi vs;
vector<vi> adj;
adj.clear();
int mid = midpoint(tl, tr);
for (auto it = el; it != er; it++) {
auto& [u, v] = eds[*it];
for (int w : {u, v}) {
if (ids[w] != -1) continue;
ids[w] = sz(vs);
vs.push_back(w);
ids[w] = sz(adj);
vs[sz(adj)] = w;
adj.emplace_back();
}
u = ids[u], v = ids[v];
if (*it <= mid) adj[u].push_back(v);
}
for (int v : vs) ids[v] = -1;
auto scc_id = sccs(adj).second;
rep(i, 0, sz(adj)) ids[vs[i]] = -1;
scc_id = sccs(adj).second;
auto split = partition(el, er, [&](int i) {
return scc_id[eds[i][0]] == scc_id[eds[i][1]];
});
Expand All @@ -42,10 +42,6 @@ vi offline_incremental_scc(vector<array<int, 2>> eds,
auto& [u, v] = eds[*it];
u = scc_id[u], v = scc_id[v];
}
// deallocate to avoid O(m log m) memory
vi().swap(vs);
vector<vi>().swap(adj);
vi().swap(scc_id);
self(self, el, split, tl, mid);
self(self, split, er, mid, tr);
};
Expand Down
3 changes: 2 additions & 1 deletion library/math/count_paths/count_paths_triangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
vl divide_and_conquer(vl h, vl bottom) {
{
int start =
find_if(all(h), [](ll x) { return x; }) - begin(h);
ranges::find_if(h, [](ll x) { return x; }) -
begin(h);
h.erase(begin(h), begin(h) + start);
bottom.erase(begin(bottom), begin(bottom) + start);
}
Expand Down
3 changes: 1 addition & 2 deletions library/math/matrix_related/xor_basis_unordered.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
//! @code
//! basis<int> b1;
//! basis<ll> b2;
//! basis<dynamic_bitset<>> b3;
//! @endcode
//! b.shrink(v) == b.shrink(b.shrink(v))
//! for x in b.b: (bit_floor(x)&b.shrink(v))==0
//! for 0<=i<j<sz(b.b): (bit_floor(b[i])&b[j])==0
//! @time O(32) or O(64)
//! @space O(32) or O(64)
template<class T> struct basis {
vector<T> b;
basic_string<T> b;
T shrink(T v) {
for (T x : b) v = min(v, v ^ x);
return v;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
template<class T>
basis<T> intersection(const basis<T>& u,
const basis<T>& v) {
vector<array<T, 2>> w(sz(u.b));
rep(i, 0, sz(w)) w[i] = {u.b[i], u.b[i]};
basic_string<array<T, 2>> w;
for (T e : u.b) w.push_back({e, e});
basis<T> res;
for (T e : v.b) {
T s = 0;
Expand Down
2 changes: 1 addition & 1 deletion library/math/prime_sieve/mobius.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
//! @time O(mx log mx)
//! @space O(mx)
vi mobius(1'000'005);
vi mobius(100'005);
mobius[1] = 1;
rep(i, 1, sz(mobius)) for (int j = i + i; j < sz(mobius);
j += i) mobius[j] -= mobius[i];
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ vector<ll> count_paths_per_length(const vector<vi>& adj) {
swap(q, new_q);
}
}
ranges::sort(child_depths,
[&](auto& x, auto& y) { return sz(x) < sz(y); });
ranges::sort(child_depths, {},
[&](auto& x) { return sz(x); });
vector total_depth(1, 1.0);
for (auto& cnt_depth : child_depths) {
auto prod = conv(total_depth, cnt_depth);
Expand Down
39 changes: 0 additions & 39 deletions library/trees/centroid_decomp_uncommon/lca.hpp

This file was deleted.

7 changes: 4 additions & 3 deletions tests/.config/.cppcheck_suppression_list
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ unusedStructMember:../library/trees/ladder_decomposition/linear_kth_par.hpp:17
unusedStructMember:../library/data_structures/dsu/dsu_bipartite.hpp:9
unusedStructMember:../library/trees/linear_lca.hpp:15
unusedScopedObject:../library/trees/centroid_decomp_uncommon/count_paths_per_length.hpp:12
unusedScopedObject:library_checker_aizu_tests/cd_asserts.hpp:5
unusedScopedObject:library_checker_aizu_tests/cd_asserts.hpp:6
unusedScopedObject:../library/trees/centroid_decomp_uncommon/count_paths_per_node.hpp:14
unusedScopedObject:library_checker_aizu_tests/trees/centroid_path_dist.test.cpp:29
unusedScopedObject:../library/trees/edge_centroid_decomp_uncommon/count_paths_per_length.hpp:13
Expand All @@ -21,9 +21,10 @@ unusedScopedObject:library_checker_aizu_tests/trees/cd_jump_on_tree.test.cpp:58
arrayIndexOutOfBoundsCond:library_checker_aizu_tests/math/linear_prime_sieve.test.cpp:17
negativeContainerIndex:../library/strings/suffix_array/burrows_wheeler.hpp:50
useStlAlgorithm:../kactl/content/numerical/FastFourierTransform.h:53
useStlAlgorithm:../library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp:58
useStlAlgorithm:../library/graphs/scc/add_edges_strongly_connected.hpp:58
useStlAlgorithm:../library/math/matrix_related/row_reduce.hpp:28
useStlAlgorithm:../library/math/count_paths/count_paths_triangle.hpp:23
useStlAlgorithm:../library/math/count_paths/count_paths_triangle.hpp:24
useStlAlgorithm:../library/math/matrix_related/xor_basis_unordered_intersection.hpp:10
shadowFunction:../kactl/content/graph/BinaryLifting.h:17
unknownMacro:../kactl/content/graph/BinaryLifting.h:18
constParameter:../kactl/content/graph/BinaryLifting.h:29
Expand Down
3 changes: 3 additions & 0 deletions tests/library_checker_aizu_tests/cd_asserts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#include "../../library/trees/centroid_decomp.hpp"
void cd_asserts(const vector<vector<int>>& adj) {
vector<int> decomp_size(sz(adj), -1);
vector<int> naive_par_decomp(sz(adj), -1);
centroid(adj,
[&](const vector<vector<int>>& cd_adj, int cent,
int par_cent) -> void {
assert(naive_par_decomp[cent] == par_cent);
assert(decomp_size[cent] == -1);
auto dfs = [&](auto&& self, int u, int p) -> int {
naive_par_decomp[u] = cent;
int sub_size = 1;
for (int v : cd_adj[u])
if (v != p) sub_size += self(self, v, u);
Expand Down
Loading
Loading