22167_Searchlig

2022-5-16 18:21| 发布者: Hocassian| 查看: 19| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506168013100-Problem List-采集的数据-后羿采集器.html

Pro.ID

22167

Title

Searchlight

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22167

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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
    1 1
    1 0
    2 1
    4 10
    1 1
    1 0
    2 1
    3 1

    Sample Output

    2
    4

    Source

    样例输入

    3 10
    1 1
    1 0
    2 1
    4 10
    1 1
    1 0
    2 1
    3 1

    样例输出

    2
    4

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部