Generation

generate functionSat, 24 Dec 2022

find maximum vertex matching

BipartiteMatcher bm(2, n, m); int res = bm.matching(); vector<vi> g; for(i=0; i<m; i++){ int u, v; scanf("%d %d", &u, &v); g[u].pb(v); g[v].pb(u); } REP(i, n){ for(auto &x : g[i]) bm.addEdge(i, x); } int res = bm.matching();

Want to kickstart your project?Use the new AI Studio to create your code