Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 1 addition & 4 deletions .verify-helper/timestamps.remote.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/.config/.cppcheck_suppression_list
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -18,8 +19,7 @@ int main() {
assert((eds[t][0] == eds[t][1]) == (joins[t] == -1));
vector<int> 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++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -16,8 +18,7 @@ int main() {
auto [num_sccs, scc_id] = sccs(adj);
cout << num_sccs << '\n';
vector<vector<int>> 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 << " ";
Expand Down
4 changes: 2 additions & 2 deletions tests/library_checker_aizu_tests/scc_asserts.hpp
Original file line number Diff line number Diff line change
@@ -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<vector<int>>& adj) {
int n = sz(adj);
auto [num_sccs, scc_id] = sccs(adj);
Expand Down
Loading