teamnote history merge
This commit is contained in:
13
2025fall/source/Graph/BipartiteMatching.cpp
Normal file
13
2025fall/source/Graph/BipartiteMatching.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
vector<int> sideadj[N];
|
||||
int selby[M];
|
||||
int chk[M], c;
|
||||
bool matching(int s) {
|
||||
for(auto i : sideadj[s]) {
|
||||
if(chk[i] == c) continue;
|
||||
chk[i] = c;
|
||||
if(selby[i] and !matching(selby[i])) continue;
|
||||
selby[i] = s;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user