![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
mrkdian
这个作者很懒,什么都没留下…
展开
-
POJ 3057 二分图最大匹配
比较难想的一道二分图。 考虑这么建图。 时间和门的二元组为二分图的x集合的元素,每个人为y集合的元素,连边就表示,这段时间内此门能让此人过。 让时间从1开始递增,每次寻找x集合和y集合的最大匹配,当最大匹配等于人数时,此时间满足所有人都离开屋子。 每次找最大匹配可以在上一个时间的残余图上寻找增广路,速度还是挺快的。 #include #include #include #原创 2015-09-25 14:37:41 · 701 阅读 · 0 评论 -
hrbust 1494 tarjan算法求割点模版
#include #include #include #include using namespace std; struct arc { int to,val; int next; arc(int a=-1,int b=0):to(a),val(b) {} }; int head[150]; arc edge[40000]; int e_cnt=0; int low[1原创 2015-06-04 17:23:38 · 232 阅读 · 0 评论