POJ 3020 Antenna Placement 解题报告】的更多相关文章

题意就不说了,求二部图最大匹配. 问题是怎么建图…… 给定的条件中,h<40,w<10,所以笔者直接默认所有情况的地图都是40*10,当然,超出范围的便是空城o. 然后给城市编号.一个城市只能和上下左右4个城市公用天线.换个换说就像国际象棋的棋盘一样,黑色格子与白色格子自然分成了二部图.黑色只能和白色匹配. 编号也很简单了.从第一行开始,第一格是黑色城市1,然后白色城市1,然后黑色城市2,白色城市2……因为所有的图都默认一样大小,所以编号可以重用. 为了方便知道(i,j)到底是黑色还是白色,我…
题目传送门 /* 题意:*的点占据后能顺带占据四个方向的一个*,问最少要占据多少个 匈牙利算法:按坐标奇偶性把*分为两个集合,那么除了匹配的其中一方是顺带占据外,其他都要占据 */ #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; ; const int INF = 0x3f3f3f3f; ][]; ][]; boo…
传送门:http://poj.org/problem?id=3020 Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11098   Accepted: 5464 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobi…
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…
链接: http://poj.org/problem?id=3020 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/M Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5500   Accepted: 2750 Description The Global Aerial Research Centr…
Antenna Placement Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5645 Accepted: 2825 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striki…
链接:poj 3020 题意:一个矩形中,有n个城市'*'.'o'表示空地,如今这n个城市都要覆盖无线,若放置一个基站, 那么它至多能够覆盖本身和相邻的一个城市,求至少放置多少个基站才干使得全部的城市都覆盖无线? 思路:求二分图的最小路径覆盖(无向图) 最小路径覆盖=点数-最大匹配数 注:由于为无向图,每一个顶点被算了两次,最大匹配为原本的两倍. 因此此时最小路径覆盖=点数-最大匹配数/2 #include<stdio.h> #include<string.h> int edge[…
Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6445   Accepted: 3182 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…
Antenna Placement Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6438   Accepted: 3176 看了别人的题解才过的... 渣啊.. 最基本的是构图 城市才是要构造的二分图的顶点! 构造方法例如以下: 比如输入: *oo *** O*o 时,能够抽象为一个数字地图: 100 234 050 数字就是依据输入的城市次序作为该城市的编号,0代表该位置没有城市. 然后依据题目的"范围"规…