poj 1328 Radar Installation】的更多相关文章

题目地址:http://poj.org/problem?id=1328 /* 贪心 (转载)题意:有一条海岸线,在海岸线上方是大海,海中有一些岛屿, 这些岛的位置已知,海岸线上有雷达,雷达的覆盖半径知道, 问最少需要多少个雷达覆盖所有的岛屿. (错误)思路:我开始是想从最左边的点雷达能探测的到的最右的位置出发,判断右边其余的点是否与该点距离小于d 是,岛屿数-1:不是,雷达数+1,继续... (正确)思路:每个岛屿的座标已知,以雷达半径为半径画圆,与x轴有两个交点. 也就是说,若要覆盖该岛,雷达…
POJ 1328 Radar Installation https://vjudge.net/problem/POJ-1328 题目: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation…
Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 42925   Accepted: 9485 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locat…
点击打开链接 Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 43490   Accepted: 9640 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a poin…
Radar Installation Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 20000/10000K (Java/Other) Total Submission(s) : 22   Accepted Submission(s) : 9 Problem Description Assume the coasting is an infinite straight line. Land is in one side of coa…
Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, s…
POJ 1328 题意: 将一条海岸线看成X轴,X轴上面是大海,海上有若干岛屿,给出雷达的覆盖半径和岛屿的位置,要求在海岸线上建雷达,在雷达能够覆盖全部岛屿情况下,求雷达的最少使用量. 分析: 贪心法,先研究一下每个岛屿,设岛屿到海岸线的垂直距离为d,雷达的覆盖半径为k,若d>k,直接输出-1,若d<=k,则雷达的建造有一个活动区间[x1,x2](用平面几何可以求得出来).因此,在可以覆盖的情况下每个岛屿都有一个相应的活动区间.该问题也就转变成了最少区间选择问题即: 在n个区间中选择一个区间集…
Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, s…
Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 56702   Accepted: 12792 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point loca…
Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 106491   Accepted: 23648 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point loc…