File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,7 @@ vector<vector<int>> capacity, flow;
101
101
vector<int > height, excess, seen;
102
102
queue<int > excess_vertices;
103
103
104
- void push (int u, int v)
105
- {
104
+ void push (int u, int v) {
106
105
int d = min(excess[ u] , capacity[ u] [ v ] - flow[ u] [ v ] );
107
106
flow[ u] [ v ] += d;
108
107
flow[ v] [ u ] -= d;
@@ -112,8 +111,7 @@ void push(int u, int v)
112
111
excess_vertices.push(v);
113
112
}
114
113
115
- void relabel(int u)
116
- {
114
+ void relabel(int u) {
117
115
int d = inf;
118
116
for (int i = 0; i < n; i++) {
119
117
if (capacity[ u] [ i ] - flow[ u] [ i ] > 0)
@@ -123,8 +121,7 @@ void relabel(int u)
123
121
height[ u] = d + 1;
124
122
}
125
123
126
- void discharge(int u)
127
- {
124
+ void discharge(int u) {
128
125
while (excess[ u] > 0) {
129
126
if (seen[ u] < n) {
130
127
int v = seen[ u] ;
@@ -139,8 +136,7 @@ void discharge(int u)
139
136
}
140
137
}
141
138
142
- int max_flow(int s, int t)
143
- {
139
+ int max_flow(int s, int t) {
144
140
height.assign(n, 0);
145
141
height[ s] = n;
146
142
flow.assign(n, vector<int >(n, 0));
You can’t perform that action at this time.
0 commit comments