Note: This article is available in Chinese only. 本文暂无英文版本。
View original
cf #320 B. Finding Team Member(优先队列)
Related
poj 3481 double queues
http://acm.hdu.edu.cn/showproblem.php?pid=1908
看到有两个优先级,然后题目中又有queue。。。就想到了优先队列。。。
但是优先队列的cmp函数没搞懂,因为比较的是结构体,好像要重载< 什么的。
然而并不会。
其实用map就可以做。。。
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.