Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
gzshawnliang committed Apr 5, 2019
1 parent 8062620 commit 7c51caf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions myCpps/internetBandwidth_UVA820.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ int solve(int start, int end, vector<bool> & visit, vector<vector<int>> & a, vec
int now = end;
while (now != start)
{
_min = min(_min, a[now][f[now]]);
_min = min(_min, a[f[now]][now]);

now = f[now];
}

now = end;
while (now != start)
{
a[now][f[now]] -= _min;
a[now][f[now]] += _min;
a[f[now]][now] -= _min;

now = f[now];
Expand Down
4 changes: 2 additions & 2 deletions myCpps/internetBandwidth_UVA820OJ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ int solve(int start, int end, vector<bool> & visit, vector<vector<int>> & a, vec
int now = end;
while (now != start)
{
_min = min(_min, a[now][f[now]]);
_min = min(_min, a[f[now]][now]);

now = f[now];
}

now = end;
while (now != start)
{
a[now][f[now]] -= _min;
a[now][f[now]] += _min;
a[f[now]][now] -= _min;

now = f[now];
Expand Down

0 comments on commit 7c51caf

Please sign in to comment.