![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分图
文章平均质量分 81
nka_kun
ACMer
展开
-
POJ1325Machine Schedule(二分图最小点覆盖)
Machine ScheduleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16318 Accepted: 6961DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been...原创 2018-04-11 22:32:03 · 150 阅读 · 0 评论 -
HDU - 2444The Accomodation of Students(二分图)
The Accomodation of StudentsProblem DescriptionThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But t...原创 2018-04-11 22:38:11 · 136 阅读 · 0 评论 -
HDU1281棋盘游戏(建二分图)
棋盘游戏Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子...原创 2018-04-11 22:45:10 · 134 阅读 · 0 评论 -
HDU1045Fire Net (二分图|DFS)
题意:一行一列本来只能放一个炸弹,除非有X隔开就可以放多个.问最多可以多少个.思路:跟一行一列只能一个一样,可以用二分图解决.我们先给每行的X隔开的每一段编号,再给列上X隔开的每一段编号,建立二分图即可.代码:#include<bits/stdc++.h>#define mem(a,b) memset(a,b,sizeof(a))#define mod 1000000007usi...原创 2018-04-12 10:01:55 · 122 阅读 · 0 评论 -
UVALive - 3126 Taxi Cab Scheme(二分图最小路径覆盖)
Running a taxi station is not all that simple. Apart from the obvious demand for a centralised coordinationof the cabs in order to pick up the customers calling to get a cab as soon as possible, t...原创 2018-04-12 15:12:15 · 159 阅读 · 0 评论 -
二分图结论+板子
结论:建图一般都是分为两部分建立二分图,混杂着不分部分会出现各种错误.①最小点覆盖数 = 最大匹配数②二分图中最大独立集+最小顶点覆盖(最大匹配)=顶点数③最小边覆盖 = 最大独立集 = n - 最大匹配数证明:设最大匹配数为m,总顶点数为n。为了使边数最少,又因为一条边最多能干掉两个点,所以尽量用边干掉两个点。也就是取有匹配的那些边,当然这些边是越多越好,那就是最大匹配了,所以先用最大匹配数目的...原创 2018-04-11 22:47:06 · 199 阅读 · 0 评论 -
UVALive - 3415Guardian of Decency(二分图最大独立点集)
Frank N. Stein is a very conservative high-school teacher. He wants to take some of his students on anexcursion, but he is afraid that some of them might become couples. While you can never exclud...原创 2018-04-12 17:41:59 · 160 阅读 · 0 评论