随笔分类 -  图论---带花树算法

摘要:题:https://ac.nowcoder.com/acm/contest/5666/I 题意:挑选边,让点的度数满足d数组,1<=du[i]<=2 分析:di为1时就是普通的一般图匹配,而考虑di为2的情况,将度为2的点拆成2个点,同时将边也当作点来拆成2个点,连u-e,u‘-e,e-e’,v-e 阅读全文
posted @ 2020-07-16 11:34 starve_to_death 阅读(236) 评论(0) 推荐(0)
摘要:题:http://uoj.ac/problem/79 没什么好说的,只是区别于二分图 算法:带花树算法 #include<bits/stdc++.h> using namespace std; #define fo(i,a,b) for(int i=a;i<=b;i++) #define fod(i 阅读全文
posted @ 2019-10-21 22:00 starve_to_death 阅读(208) 评论(0) 推荐(0)