poj 1113 Wall (凸包模板题)
相关文章
hdu 3532 Max Angle(atan2的使用)
Max Angle # **Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 678 Accepted Submission(s): 238 **
Problem Description
Given many points in a plane, two players are playing an interesting game.
Player1 selects one point A as the vertex of an angle. Then player2 selects other two points B and C. A, B and C are different with each other. Now they get an angle B-A-C.
poj 1106 Transmitters (计算几何,叉积||极角排序)
Transmitters
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 4817
Accepted: 2576
Description
In a wireless network with multiple transmitters sending on the same frequencies, it is often a requirement that signals don’t overlap, or at least that they don’t conflict. One way of accomplishing this is to restrict a transmitter’s coverage area. This problem uses a shielded transmitter that only broadcasts in a semicircle.
A transmitter T is located somewhere on a 1,000 square meter grid. It broadcasts in a semicircular area of radius r. The transmitter may be rotated any amount, but not moved. Given N points anywhere on the grid, compute the maximum number of points that can be simultaneously reached by the transmitter’s signal. Figure 1 shows the same data points with two different transmitter rotations.
极角排序的几种常见的方式
20190211update:工作的时候看同事ocr的代码,发现有一段就是极角排序orz…所以说算法还是有用的…
先介绍几种极角排序:
1.利用叉积的正负来作cmp.(即是按逆时针排序).此题就是用这种方法