generated from Tiphereth-A/TINplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4669c0d
commit 10c45fb
Showing
5 changed files
with
61 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test_cpverifier/library-checker-graph/two_edge_connected_components.test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#define PROBLEM "https://judge.yosupo.jp/problem/two_edge_connected_components" | ||
|
||
#include "../../code/graph/e_bcc.hpp" | ||
|
||
int main() { | ||
std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); | ||
u32 n, m; | ||
std::cin >> n >> m; | ||
tifa_libs::graph::eog g(n); | ||
for (u32 i = 0, u, v; i < m; ++i) { | ||
std::cin >> u >> v; | ||
g.add_edge(u, v); | ||
} | ||
tifa_libs::graph::e_bcc bcc(g); | ||
std::cout << bcc.belongs.size() << '\n'; | ||
for (auto&& b : bcc.belongs) { | ||
for (std::cout << b.size(); auto x : b) | ||
std::cout << ' ' << x; | ||
std::cout << '\n'; | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters