diff options
author | Ta180m | 2020-06-22 11:35:36 -0500 |
---|---|---|
committer | Ta180m | 2020-06-22 11:35:36 -0500 |
commit | b49b694fa8cd3d7bb271f6ac3fd58a3fad2ffa02 (patch) | |
tree | 0e1b7d008319dcf7f13e388d8cd401d94b875a53 | |
parent | 10ac6ca120cf467293420221f880d64caae88167 (diff) |
Update max_flow.cpp
-rw-r--r-- | Graph/max_flow.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Graph/max_flow.cpp b/Graph/max_flow.cpp index e4756df..a675659 100644 --- a/Graph/max_flow.cpp +++ b/Graph/max_flow.cpp @@ -1,8 +1,8 @@ /* Maximum-Flow solver using Dinic's Blocking Flow Algorithm. - * Time Complexity: - * - O(V^2 E) for general graphs, but in practice ~O(E^1.5) - * - O(V^(1/2) E) for bipartite matching - * - O(min(V^(2/3), E^(1/2)) E) for unit capacity graphs + Time Complexity: + - O(V^2 E) for general graphs, but in practice ~O(E^1.5) + - O(V^(1/2) E) for bipartite matching + - O(min(V^(2/3), E^(1/2)) E) for unit capacity graphs */ template<int V, class T = ll> @@ -65,7 +65,6 @@ public: }; int main() { - /* Example of usage */ max_flow<4> network; network.add(0, 1, 75); network.add(0, 2, 50); @@ -75,6 +74,5 @@ int main() { int flow = network.calc(0, 3); - /* Max-flow should be 80. */ - cout << flow << endl; + cout << flow << endl; // Should be 80 }
\ No newline at end of file |