TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P8912
  • Problem
  • P8912[CF1588E] Eligible Segments 合格线段
    Limits : Time Limit : - MS   Memory Limit : 262144 KB
    Judgment Tips : 3s,256MB
    Description

    平面上有 \(n\) 个互不相同的点 \(p_1,\cdots,p_n\) ,给定一个正数 \(R\)

    统计有多少整数对 \((i,j)\) ,满足 \(1\leq i\lt j\leq n\) ,且其他任何点到以 \(p_i\)\(p_j\) 为端点的线段的距离都不超过 \(R\)

    Input Format

    第一行 \(n,R\)
    接下来 \(n\) 行每行两个整数 \(x_i,y_i\)

    输入的所有数字都是整数,且保证 \(R\pm 10^{-2}\) 答案都不变。

    Output Format

    一个整数答案。

    Sample Input 1

    4 2
    0 1
    0 -1
    3 0
    -3 0

    Sample Output 1

    1

    Sample Input 2

    3 3
    1 -1
    -1 -1
    0 1

    Sample Output 2

    3

    Hint

    \(1 \leq n\leq 3000\)
    \(1\leq R\leq 10^5\)
    \(|x_i|,|y_i|\leq 10^5\)
    原题链接,nkoj的数据由CF的小数据和nodgd精心构造的大数据组成。