diff --git a/.verify-helper/timestamps.remote.json b/.verify-helper/timestamps.remote.json index 08803305..9d1398bc 100644 --- a/.verify-helper/timestamps.remote.json +++ b/.verify-helper/timestamps.remote.json @@ -54,14 +54,11 @@ "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 14:34:10 -0600", +"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2025-01-15 00:04:30 -0700", "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 14:34:10 -0600", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2024-12-15 14:34:10 -0600", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2024-12-15 14:34:10 -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-15 14:34:10 -0600", "tests/library_checker_aizu_tests/handmade_tests/dsu_size.test.cpp": "2024-12-14 19:50:29 -0600", diff --git a/library/graphs/scc/add_edges_strongly_connected.hpp b/library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp similarity index 100% rename from library/graphs/scc/add_edges_strongly_connected.hpp rename to library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp diff --git a/library/graphs/scc/offline_incremental_scc.hpp b/library/graphs/strongly_connected_components/offline_incremental_scc.hpp similarity index 100% rename from library/graphs/scc/offline_incremental_scc.hpp rename to library/graphs/strongly_connected_components/offline_incremental_scc.hpp diff --git a/library/graphs/scc/scc.hpp b/library/graphs/strongly_connected_components/scc.hpp similarity index 100% rename from library/graphs/scc/scc.hpp rename to library/graphs/strongly_connected_components/scc.hpp diff --git a/tests/.config/.cppcheck_suppression_list b/tests/.config/.cppcheck_suppression_list index 62357e93..b3abc40b 100644 --- a/tests/.config/.cppcheck_suppression_list +++ b/tests/.config/.cppcheck_suppression_list @@ -21,7 +21,7 @@ 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/scc/add_edges_strongly_connected.hpp:58 +useStlAlgorithm:../library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp:58 useStlAlgorithm:../library/math/matrix_related/row_reduce.hpp:28 useStlAlgorithm:../library/math/count_paths/count_paths_triangle.hpp:24 useStlAlgorithm:../library/math/matrix_related/xor_basis_unordered_intersection.hpp:10 diff --git a/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp b/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp index 603c7edd..d7fc10ce 100644 --- a/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp +++ b/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp @@ -1,9 +1,10 @@ -#define PROBLEM \ - "https://judge.yosupo.jp/problem/incremental_scc" +#define PROBLEM "https://judge.yosupo.jp/problem/incremental_scc" #include "../template.hpp" + +#include "../../../library/graphs/strongly_connected_components/offline_incremental_scc.hpp" #include "../../../kactl/content/data-structures/UnionFind.h" -#include "../../../library/graphs/scc/offline_incremental_scc.hpp" #include "../../../library/math/mod_int.hpp" + int main() { cin.tie(0)->sync_with_stdio(0); int n, m; @@ -18,8 +19,7 @@ int main() { assert((eds[t][0] == eds[t][1]) == (joins[t] == -1)); vector order(m); iota(all(order), 0); - ranges::sort(all(order), {}, - [&](int i) { return joins[i]; }); + ranges::sort(all(order), {}, [&](int i) { return joins[i]; }); UF uf(n); mint sum = 0; for (int t = 0, it = 0; t < m; t++) { diff --git a/tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp b/tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp index e9e42a8d..a919230a 100644 --- a/tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp +++ b/tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp @@ -1,8 +1,10 @@ #define PROBLEM \ "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_3_C" #include "../template.hpp" + +#include "../../../library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp" #include "../scc_asserts.hpp" -#include "../../../library/graphs/scc/add_edges_strongly_connected.hpp" + int main() { cin.tie(0)->sync_with_stdio(0); int n, m; diff --git a/tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp b/tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp index 08d7e4fa..68c3c4db 100644 --- a/tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp +++ b/tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp @@ -1,7 +1,9 @@ #define PROBLEM "https://judge.yosupo.jp/problem/scc" #include "../template.hpp" + +#include "../../../library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp" #include "../scc_asserts.hpp" -#include "../../../library/graphs/scc/add_edges_strongly_connected.hpp" + int main() { cin.tie(0)->sync_with_stdio(0); int n, m; @@ -16,8 +18,7 @@ int main() { auto [num_sccs, scc_id] = sccs(adj); cout << num_sccs << '\n'; vector> each_scc(num_sccs); - for (int i = 0; i < n; i++) - each_scc[scc_id[i]].push_back(i); + for (int i = 0; i < n; i++) each_scc[scc_id[i]].push_back(i); for (int i = num_sccs - 1; i >= 0; i--) { cout << sz(each_scc[i]) << " "; for (auto node : each_scc[i]) cout << node << " "; diff --git a/tests/library_checker_aizu_tests/scc_asserts.hpp b/tests/library_checker_aizu_tests/scc_asserts.hpp index b436c02a..48edbaae 100644 --- a/tests/library_checker_aizu_tests/scc_asserts.hpp +++ b/tests/library_checker_aizu_tests/scc_asserts.hpp @@ -1,7 +1,7 @@ #pragma once #include "../../library/contest/random.hpp" -#include "../../library/graphs/scc/add_edges_strongly_connected.hpp" -#include "../../library/graphs/scc/offline_incremental_scc.hpp" +#include "../../library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp" +#include "../../library/graphs/strongly_connected_components/offline_incremental_scc.hpp" void scc_asserts(const vector>& adj) { int n = sz(adj); auto [num_sccs, scc_id] = sccs(adj);