The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of a new, highly noise resistant, antenna. It is called 4D…
<题目链接> 题目大意:一个矩形中,有N个城市’*’,现在这n个城市都要覆盖无线,每放置一个基站,至多可以覆盖相邻的两个城市.问至少放置多少个基站才能使得所有的城市都覆盖无线? 解题分析:将这n个城市看成二分图中的点集,基站匹配的圆圈看成两个点集之间的连线,要使圆圈圈住所有的点,即该二分图中所有的点都必须有线连接,并且使连接的线段条数最少.自然而然,本题就转化为了二分图的最小路径覆盖问题,用最少的边数,去覆盖所有的点. 二分图的最小路径覆盖 = 顶点数 – 最大匹配数(因为本题是无向的,所以最…
http://poj.org/problem?id=3020 Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7565   Accepted: 3758 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile ph…
Antenna Placement Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3020 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone n…
二分图题目 当时看到网上有人的博客写着最小边覆盖,也有人写最小路径覆盖,我就有点方了,斌哥(kuangbin)的博客上只给了代码,没有解释,但是现在我还是明白了,这是个最小路径覆盖(因为我现在还不知道啥叫最小边覆盖). 有一篇博客如下写道:最小路径覆盖只对有向无环图而言,且并不要求原图是二分图,给所有点一个分身,让他们分别处于两个集合就可以,求出的最小路径覆盖 = n - 最大匹配值. 证明:假设最大匹配值是0,那原先一共有n个路径,每次多一个匹配,这样的路径就减少1,证明完毕. 那么回到这个题…
部落战争 bzoj-2150 题目大意:题目链接. 注释:略. 想法: 显然是最小路径覆盖,我们知道:二分图最小路径覆盖等于节点总数-最大匹配. 所以我们用匈牙利或者dinic跑出最大匹配,然后用总结点数相减即可. 最后,附上丑陋的代码... ... #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define N 3000 using namesp…
Running a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers calling to get a cab as soon as possible,there is also a need to schedule all the taxi rides whi…
Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7788   Accepted: 3880 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most st…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3861 题目大意:一个有向图,让你按规则划分区域,要求划分的区域数最少. 规则如下:1.有边u到v以及有边v到u,则u,v必须划分到同一个区域内.2.一个区域内的两点至少要有一方能到达另一方.3.一个点只能划分到一个区域内. 解题思路:根据规则1可知必然要对强连通分量进行缩点,缩点后变成了一个弱连通图.根据规则2.3可知即是要求图的最小路径覆盖. 定义: 最小路径覆盖:在图中找一些路径(路径数最少),…
http://acm.hdu.edu.cn/showproblem.php?pid=1151 Air Raid Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7469   Accepted: 4451 Description Consider a town where all the streets are one-way and each street leads from one intersection to an…