diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-01-11 11:15:50 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-01-11 11:15:50 +0100 |
| commit | 61cac9c0febbb5440b99e22770d917bf3a63c405 (patch) | |
| tree | 98b7dc3b77ada4cffe5b81daded5516b941f28ec /graph/pushRelabel2.cpp | |
| parent | fd1f2b36e95c03625297b7b8cba3b1a04a0cc0ed (diff) | |
dont use .size()
Diffstat (limited to 'graph/pushRelabel2.cpp')
| -rw-r--r-- | graph/pushRelabel2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graph/pushRelabel2.cpp b/graph/pushRelabel2.cpp index 8b5f0c6..343f71d 100644 --- a/graph/pushRelabel2.cpp +++ b/graph/pushRelabel2.cpp @@ -14,9 +14,9 @@ vector<list<int>::iterator> iter; int highest, highestActive; void addEdge(int from, int to, ll c) { - adjlist[from].push_back(edges.size()); + adjlist[from].push_back(sz(edges)); edges.push_back({from, to, 0, c}); - adjlist[to].push_back(edges.size()); + adjlist[to].push_back(sz(edges)); edges.push_back({to, from, 0, 0}); } @@ -79,7 +79,7 @@ void discharge(int n, int u) { }} ll maxFlow(int s, int t) { - int n = adjlist.size(); + int n = sz(adjlist); llist.assign(n + 1, {}); dlist.assign(n + 1, {}); highestActive = highest = 0; |
