P3091 [USACO13NOV] Line of Sight G
题目描述
Farmer John's N cows (1
输入格式
\* Line 1: Two integers: N and R.
\* Lines 2..1+N: Each line contains two integers specifying the (x,y) coordinates of a cow.
输出格式
\* Line 1: The number of pairs of cows who can see each-other.
说明/提示
There are 4 cows at positions (0,10), (0,-10), (10,0), and (-10,0). The silo is centered at (0,0) and has radius 5.
All 6 pairs of cows can see each-other, except for the pairs situated on opposite sides of the silo: the cows at (-10,0) and (10,0) cannot see each-other, and the cows at (0,-10) and (0,10) cannot see each-other.