Skip to content

Commit 99f5ca3

Browse files
MarkMorettoadamant-pwn
authored andcommitted
Update push-relabel.md
Minor formatting corrections.
1 parent c3250a2 commit 99f5ca3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/graph/push-relabel.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ vector<vector<int>> capacity, flow;
101101
vector<int> height, excess, seen;
102102
queue<int> excess_vertices;
103103

104-
void push(int u, int v)
105-
{
104+
void push(int u, int v) {
106105
int d = min(excess[u], capacity[u][v] - flow[u][v]);
107106
flow[u][v] += d;
108107
flow[v][u] -= d;
@@ -112,8 +111,7 @@ void push(int u, int v)
112111
excess_vertices.push(v);
113112
}
114113

115-
void relabel(int u)
116-
{
114+
void relabel(int u) {
117115
int d = inf;
118116
for (int i = 0; i < n; i++) {
119117
if (capacity[u][i] - flow[u][i] > 0)
@@ -123,8 +121,7 @@ void relabel(int u)
123121
height[u] = d + 1;
124122
}
125123

126-
void discharge(int u)
127-
{
124+
void discharge(int u) {
128125
while (excess[u] > 0) {
129126
if (seen[u] < n) {
130127
int v = seen[u];
@@ -139,8 +136,7 @@ void discharge(int u)
139136
}
140137
}
141138

142-
int max_flow(int s, int t)
143-
{
139+
int max_flow(int s, int t) {
144140
height.assign(n, 0);
145141
height[s] = n;
146142
flow.assign(n, vector<int>(n, 0));

0 commit comments

Comments
 (0)