![](https://img-blog.csdnimg.cn/2019092715111047.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
二分图匹配
River_____________
这个作者很懒,什么都没留下…
展开
-
ZJOI2007&BZOJ1059 矩阵变换
比较明显的二分图匹配一行内如果没有被染色格子的话怎样变换都是不行的一列内也是这样所以以行和列建二分图,能完美匹配就是YES ,否则就是NO#include <bits/stdc++.h> using namespace std; const int maxn = 200+10; int T, n; int g[maxn][maxn]; int used[maxn]; int line[...原创 2018-05-10 22:27:47 · 154 阅读 · 0 评论 -
[BZOJ1059&ZJOI2007] 矩阵游戏 (二分图匹配)
一行内如果没有被染色的块,那么就不可能通过行列变换使得满足结果一列也是如此那么只需要在每一行和每一列都有被染色的就可以了,这样就转换成了二分图完美匹配的问题#include <bits/stdc++.h> using namespace std; const int maxn = 200+10; int T, n; int g[maxn][maxn]; int used[maxn]; ...原创 2018-05-10 22:41:53 · 418 阅读 · 0 评论