File tree Expand file tree Collapse file tree
library/graphs/bridges_cuts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252"tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp" : " 2024-12-05 10:41:42 -0600" ,
5353"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp" : " 2025-02-10 23:30:47 -0700" ,
5454"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp" : " 2024-12-14 19:50:29 -0600" ,
55- "tests/library_checker_aizu_tests/graphs/cuts_callback.test.cpp" : " 2025-06-23 04:33:28 -0600" ,
55+ "tests/library_checker_aizu_tests/graphs/cuts_callback.test.cpp" : " 2025-06-23 18:22:23 -0600" ,
5656"tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp" : " 2024-12-14 19:50:29 -0600" ,
5757"tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp" : " 2024-12-14 19:50:29 -0600" ,
5858"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp" : " 2025-02-10 23:30:47 -0700" ,
Original file line number Diff line number Diff line change 33// ! @code
44// ! {
55// ! vector<vector<int>> adj(n);
6- // ! cuts_callback(adj, [&](const vi& nodes) {});
6+ // ! vector<pii> edges(m);
7+ // ! UF uf(n);
8+ // ! cuts_callback(adj, [&](const vi& nodes) {
9+ // ! if (sz(nodes) > 2)
10+ // ! for (int v : nodes) uf.join(v, nodes[0]);
11+ // ! });
12+ // ! vector<basic_string<int>> bridge_tree(n);
13+ // ! for (auto [u, v] : edges)
14+ // ! if (!uf.sameSet(u, v)) {
15+ // ! u = uf.find(u), v = uf.find(v);
16+ // ! bridge_tree[u] += v;
17+ // ! bridge_tree[v] += u;
18+ // ! }
719// ! }
20+ // !
821// ! vector<basic_string<int>> adj(n);
22+ // ! vector<basic_string<array<int, 2>>> adj_edge_ids(n);
23+ // ! vector<bool> seen(m);
924// ! cuts_callback(adj, [&](const vi& nodes) {
25+ // ! rep (i, 0, sz(nodes) - 1)
26+ // ! for (auto [u, e_id] : adj_edge_ids[nodes[i]])
27+ // ! if (!seen[e_id]) {
28+ // ! seen[e_id] = 1;
29+ // ! // this edge is in the current BCC
30+ // ! }
1031// ! });
1132// ! @endcode
1233// ! callback not called on components with a single node
You can’t perform that action at this time.
0 commit comments