二分图完美匹配模板
二分图完美匹配模板
这里讲的都是最大权完美匹配。如果求最小权只需把边权改成负数即可
dfs版(慢,代码简单)
#include<bits/stdc++.h>
using namespace std;
const int M=405;
int n,mat[M];
long long Lx[M],Ly[M],A[M][M];
long long slack;
bool S...
原创
2018-08-21 10:32:19 ·
421 阅读 ·
0 评论