二分图
文章平均质量分 51
自爄創煇熿
这个作者很懒,什么都没留下…
展开
-
hdu棋盘游戏二分图
先求出原图的最大匹配t1,在一次枚举每个map【】【】为1的点,看是否小于t1,如果小于则是重要点; #include #include #define maxn 102 int map[maxn][maxn]; int use[maxn],path[maxn]; bool dfs(int x,int m) { for(int i=1;i<=m;i++) { if原创 2012-08-02 15:24:45 · 769 阅读 · 0 评论 -
二分图最大匹配 。
用临街矩阵些超时,改用邻接表,结果对vector忘清零,错了好几次。 http://acm.nyist.net/JudgeOnline/problem.php?pid=239 #include #include #include using namespace std; #define maxn 502 vectorv[maxn]; int use[maxn],path[maxn]; bo原创 2012-07-30 14:07:19 · 537 阅读 · 0 评论 -
hdu2119二分图匹配
Problem Description Give you a matrix(only contains 0 or 1),every time you can select a row or a column and delete all the '1' in this row or this column . Your task is to give out the minimum t原创 2012-08-02 09:21:42 · 766 阅读 · 0 评论 -
hdu2444二分图判断+最大匹配
题目大意就是:有n个学生,分成两队,每对中没有相互认识的,否则输出no,如果可以再用最大匹配。 http://acm.hdu.edu.cn/showproblem.php?pid=2444 #include #include #include using namespace std; #define maxn 220 int map[maxn][maxn],use[maxn],path原创 2012-08-01 09:55:21 · 1210 阅读 · 1 评论