Skip to content

Commit 8454772

Browse files
committed
format and golf
1 parent c67f8d7 commit 8454772

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

library/graphs/bridges_cuts/cuts_callback.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
//! vector<pii> edges(m);
77
//! UF uf(n);
88
//! cuts_callback(adj, [&](const vi& nodes) {
9-
//! if(sz(nodes) > 2)
9+
//! if (sz(nodes) > 2)
1010
//! for (int v : nodes) uf.join(v, nodes[0]);
1111
//! });
1212
//! vector<basic_string<int>> bridge_tree(n);
1313
//! for (auto [u, v] : edges) {
14-
//! if(!uf.sameSet(u,v)) {
14+
//! if (!uf.sameSet(u,v)) {
1515
//! u = uf.find(u), v = uf.find(v);
1616
//! bridge_tree[u] += v;
1717
//! bridge_tree[v] += u;
@@ -23,15 +23,12 @@
2323
//! vector<basic_string<array<int, 2>>> adj_edge_ids(n);
2424
//! vector<bool> seen(m);
2525
//! cuts_callback(adj, [&](const vi& nodes) {
26-
//! rep (i, 0, sz(nodes) - 1) {
27-
//! int v = nodes[i];
28-
//! for (auto [u, e_id] : adj_edge_ids[v]){
29-
//! if(!seen[e_id]) {
26+
//! rep (i, 0, sz(nodes) - 1)
27+
//! for (auto [u, e_id] : adj_edge_ids[nodes[i]])
28+
//! if (!seen[e_id]) {
3029
//! seen[e_id] = 1;
3130
//! // this edge is in the current BCC
3231
//! }
33-
//! }
34-
//! }
3532
//! });
3633
//! @endcode
3734
//! callback not called on components with a single node

0 commit comments

Comments
 (0)