
二分图
文章平均质量分 70
DQSSS
蒟蒻
展开
-
【棋盘覆盖】【模板】二分图匹配
直接扔代码吧……裸题……存个模板而已。代码:#include<cstdio>#include<iostream>#include<algorithm>#include<cstring>using namespace std;const int SIZE=1010;int match1[SIZE][SIZE],match2[SIZE][SIZE];bool maps[SIZE][SIZE],原创 2015-11-05 08:41:52 · 1234 阅读 · 0 评论 -
【poj2226】Muddy Fields 二分图
DescriptionRain has pummeled the cows’ field, a rectangular grid of R rows and C columns (1 <= R <= 50, 1 <= C <= 50). While good for the grass, the rain makes some patches of bare earth quite muddy. T原创 2016-03-02 09:26:24 · 1046 阅读 · 0 评论 -
【bzoj3035】【codevs2490】导弹防御塔 二分+匈牙利 || 二分+dinic
题目描述 Description Freda的城堡—— “Freda,城堡外发现了一些入侵者!” “喵…刚刚探究完了城堡建设的方案数,我要歇一会儿嘛lala~” “可是入侵者已经接近城堡了呀!” “别担心,rainbow,你看呢,这是我刚设计的导弹防御系统的说~” “喂…别卖萌啊……” Freda控制着N座可以发射导弹的防御塔。每座塔都有足够数量的导弹,但是每座塔每原创 2016-03-02 11:20:48 · 1271 阅读 · 0 评论 -
【poj2125】Destroying The Graph 二分图最小点权覆盖集
DescriptionAlice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that Bob tries to destroy it. In a move he may take any vertex of the graph an原创 2016-03-09 17:14:10 · 657 阅读 · 0 评论 -
【笔记】二分图、网络流相关
二分图这里的证明都是大概只有我能看懂的不严密证明…最小点覆盖=最大匹配概念:二分图中选最少得点,使其覆盖所有的边。可以贪心地去选点,使点出现在最大匹配上。最小边覆盖=顶点数-最小点覆盖概念:二分图中选最少的边,使其覆盖所有点。首先可以贪心地选最大匹配上的边,因为这样可以一条边覆盖两个点。剩下的点只能由其他边一条边覆盖一个点了。设最大匹配数为m,选的其他边的数量是a,满足2m+a=n,答案是m+a=n原创 2016-03-07 10:21:40 · 986 阅读 · 0 评论