Skip to content

Commit a798d46

Browse files
committed
fix bipartite matching
1 parent 422c648 commit a798d46

File tree

2 files changed

+2
-54
lines changed

2 files changed

+2
-54
lines changed

graph/bipartite_matching(slow).hpp

Lines changed: 0 additions & 52 deletions
This file was deleted.

graph/bipartite_matching.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
// Bipartite matching of undirected bipartite graph (Hopcroft-Karp)
77
// https://ei1333.github.io/luzhiled/snippets/graph/hopcroft-karp.html
8-
// Comprexity: O((V + E)sqrtV)
8+
// Complexity: O((V + E)sqrtV)
99
// int solve(): enumerate maximum number of matching / return -1 (if graph is not bipartite)
1010
struct BipartiteMatching {
1111
int V;
1212
std::vector<std::vector<int>> to; // Adjacency list
1313
std::vector<int> dist; // dist[i] = (Distance from i'th node)
14-
std::vector<int> match; // match[i] = (Partner of i'th node) or -1 (No parter)
14+
std::vector<int> match; // match[i] = (Partner of i'th node) or -1 (No partner)
1515
std::vector<int> used, vv;
1616
std::vector<int> color; // color of each node(checking bipartition): 0/1/-1(not determined)
1717

0 commit comments

Comments
 (0)