File tree Expand file tree Collapse file tree 2 files changed +2
-54
lines changed
Expand file tree Collapse file tree 2 files changed +2
-54
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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)
1010struct 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
You can’t perform that action at this time.
0 commit comments