summaryrefslogtreecommitdiff
path: root/content/graph/articulationPoints.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
commit1880ccb6d85c6eb79e724593457877bab431951c (patch)
tree23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /content/graph/articulationPoints.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'content/graph/articulationPoints.cpp')
-rw-r--r--content/graph/articulationPoints.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/content/graph/articulationPoints.cpp b/content/graph/articulationPoints.cpp
index 25ff67e..60970e6 100644
--- a/content/graph/articulationPoints.cpp
+++ b/content/graph/articulationPoints.cpp
@@ -14,14 +14,14 @@ int dfs(int v, int from = -1) {
if (num[e.to] < me) st.push_back(e);
} else {
if (v == root) rootCount++;
- int si = sz(st);
+ int si = ssize(st);
int up = dfs(e.to, e.id);
top = min(top, up);
if (up >= me) isArt[v] = true;
if (up > me) bridges.push_back(e);
if (up <= me) st.push_back(e);
if (up == me) {
- bcc.emplace_back(si + all(st));
+ bcc.emplace_back(begin(st) + si, end(st));
st.resize(si);
}}}
return top;
@@ -29,12 +29,12 @@ int dfs(int v, int from = -1) {
void find() {
counter = 0;
- num.assign(sz(adj), 0);
- isArt.assign(sz(adj), false);
+ num.assign(ssize(adj), 0);
+ isArt.assign(ssize(adj), false);
bridges.clear();
st.clear();
bcc.clear();
- for (int v = 0; v < sz(adj); v++) {
+ for (int v = 0; v < ssize(adj); v++) {
if (!num[v]) {
root = v;
rootCount = 0;