Skip to content

Commit 2b4ed57

Browse files
committed
nits
1 parent 91061d3 commit 2b4ed57

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

library/graphs/bridges_cuts/bcc_callback.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
//! vector<vi> adj(n);
3333
//! vector<int> cc_id(n);
3434
//! bcc_callback(adj, [&](const vi& nodes) {
35-
//! if (ssize(nodes) == 2) {
35+
//! if (sz(nodes) == 2) {
3636
//! // nodes[0] <=> nodes[1] is a bridge
3737
//! return;
3838
//! }

tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,8 @@ int main() {
1515
adj[v] += u;
1616
}
1717
vector<pii> bridges;
18-
vector<bool> seen(n);
1918
bcc_callback(adj, [&](const vi& nodes) {
20-
int count_edges = 0;
21-
rep(i, 0, sz(nodes) - 1) {
22-
seen[nodes[i]] = 1;
23-
count_edges += ranges::count_if(adj[nodes[i]],
24-
[&](int v) -> bool { return !seen[v]; });
25-
}
26-
if (count_edges == 1) {
27-
assert(sz(nodes) == 2);
19+
if (sz(nodes) == 2) {
2820
pii bridge(nodes[0], nodes[1]);
2921
if (bridge.first > bridge.second)
3022
swap(bridge.first, bridge.second);

0 commit comments

Comments
 (0)