diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-02-15 16:35:20 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-02-15 16:35:20 +0100 |
| commit | 59269977e99fe0e2c140d24f14f4bdd7b9ec3195 (patch) | |
| tree | 9f22288e3294dff67ecc793e300729012680814f | |
| parent | a840b20ebb24217626d3aadb4ccdd04f265d210d (diff) | |
scc: slightly golf by replacing erase with resize
| -rw-r--r-- | content/graph/scc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/graph/scc.cpp b/content/graph/scc.cpp index 63b2757..9f8f850 100644 --- a/content/graph/scc.cpp +++ b/content/graph/scc.cpp @@ -14,7 +14,7 @@ void visit(int v) { if (old == low[v]) { sccs.emplace_back(begin(s) + old, end(s)); for (int u: sccs.back()) idx[u] = ssize(sccs)-1; - s.erase(begin(s) + old, end(s)); + s.resize(old); }} void scc() { |
