Pro.ID22167 TitleSearchlight Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22167 AC0 Submit0 Ratio- 时间&空间限制描述There are n points in the plane. The points are given by their coordinates. You have a searchlight and you can place it at one of the n points as you like. The area the searchlight lightened is a sector with the chosen point as the center. And the central angle is π/6 (30 degrees), the radius is d. Now you can choose any point and any direction to make the number of points lightened by the searchlight (including the chosen point) maximum. 输入For each test case, the first line contains two integer n and d, which are described above. Then the following n lines each contains two integer x and y, describing one point. ( 1 ≤ n ≤ 1000, 0 < d < 40000, -10000 ≤ x, y ≤ 10000 ). 输出Description There are n points in the plane. The points are given by their coordinates. You have a searchlight and you can place it at one of the n points as you like. The area the searchlight lightened is a sector with the chosen point as the center. And the central angle is π/6 (30 degrees), the radius is d. Now you can choose any point and any direction to make the number of points lightened by the searchlight (including the chosen point) maximum. Input For each test case, the first line contains two integer n and d, which are described above. Then the following n lines each contains two integer x and y, describing one point. ( 1 ≤ n ≤ 1000, 0 < d < 40000, -10000 ≤ x, y ≤ 10000 ). Output For each test case, print the maximum number in a single line. Sample Input 3 10 Sample Output 2 Source 样例输入3 10 样例输出2 作者 |