随笔分类 -  *图论---网络流

摘要:Our Journey of Xian Ends 链接:here 参考http://blog.csdn.net/wangshuhe963/article/details/78516821 如果不理解为什么这么建模可以先做下面那道题 费用流~ 1 #include <bits/stdc++.h> 2 阅读全文
posted @ 2018-02-28 12:05 yijiull 阅读(305) 评论(0) 推荐(0)
摘要:Tour HDU - 3488 可以用费用流做 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int inf = 0x3f3f3f3f; 4 const int maxv = 410; 5 const int maxe = max 阅读全文
posted @ 2018-01-20 09:25 yijiull 阅读(182) 评论(0) 推荐(0)
摘要:Going Home HDU - 1533 1 //费用流初探 2 #include <iostream> 3 #include <queue> 4 #include <cstring> 5 #include <cstdio> 6 #include <algorithm> 7 using names 阅读全文
posted @ 2018-01-19 20:57 yijiull 阅读(143) 评论(0) 推荐(0)
摘要:上下界网络流 链接 转自:http://blog.csdn.net/leolin_/article/details/7208246 一、有源汇、无源汇的可行流。 求可行流,其实就是问是否存在一个方案可以使所有必须边都满流。对于有源汇的网络,我们可以添加一条边t->s,流量上限为INF,这样就变成了无 阅读全文
posted @ 2017-11-22 19:48 yijiull 阅读(135) 评论(0) 推荐(0)
摘要:No Smoking, Please Gym - 101518H 最小割~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 1000110; 4 const int maxe = 4000010; 5 cons 阅读全文
posted @ 2017-10-08 08:48 yijiull 阅读(144) 评论(0) 推荐(0)
摘要:网络流五·最大权闭合子图 HihoCoder - 1398 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 410; 4 const int maxe = 40210; 5 const int inf = 0x 阅读全文
posted @ 2017-10-06 16:39 yijiull 阅读(173) 评论(0) 推荐(0)
摘要:网络流三·二分图多重匹配 HihoCoder - 1393 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 210; 4 const int maxe = 10210; 5 const int inf = 0x 阅读全文
posted @ 2017-10-06 10:36 yijiull 阅读(250) 评论(0) 推荐(0)
摘要:网络流二·最大流最小割定理 HihoCoder - 1378 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 1010; 4 const int maxe = 20010; 5 const int inf = 阅读全文
posted @ 2017-10-06 10:21 yijiull 阅读(377) 评论(0) 推荐(0)
摘要:网络流四·最小路径覆盖 HihoCoder - 1394 每个点拆成两个点限流为1. 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 1010; 4 const int maxe = 20010; 5 cons 阅读全文
posted @ 2017-10-06 09:56 yijiull 阅读(165) 评论(0) 推荐(0)
摘要:飞行员配对(二分图最大匹配) 51Nod - 2006 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define CLR(m, a) memset(m, a, sizeof(m)) 4 5 const int maxn = 110; 6 阅读全文
posted @ 2017-10-06 09:38 yijiull 阅读(196) 评论(0) 推荐(0)
摘要:刚刚学了两个最大流算法Dinic和ISAP,很多地方不是很清楚=_=|| 先刷些题练练吧 Drainage Ditches HDU - 1532 题意:求1到n的最大流,裸题 Drainage Ditches HDU - 1532 Drainage Ditches 题意:求1到n的最大流,裸题 可以 阅读全文
posted @ 2017-07-24 21:49 yijiull 阅读(184) 评论(0) 推荐(0)