MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / dfs

Function dfs

code/graph/bipartite_mvc.cpp:3–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "hopcroft_karp.cpp"
2vector<bool> alt;
3void dfs(bipartite_graph &g, int at) {
4 alt[at] = true;
5 iter(it,g.adj[at]) {
6 alt[*it + g.N] = true;
7 if (g.R[*it] != -1 && !alt[g.R[*it]]) dfs(g, g.R[*it]); } }
8vi mvc_bipartite(bipartite_graph &g) {
9 vi res; g.maximum_matching();
10 alt.assign(g.N + g.M,false);

Callers 1

mvc_bipartiteFunction · 0.70

Calls 1

iterFunction · 0.70

Tested by

no test coverage detected