문제
Problem 2: Line of Sight [Brian Dean and Chad Waters, 2013]
Farmer John's N cows
The grain silo is centered at the origin
PROBLEM NAME: sight
입력
* Line 1: Two integers: N and R.
* Lines
출력
* Line 1: The number of pairs of cows who can see each-other.
예제1
45
0 10
0 -10
10 0
-10 0
4
INPUT DETAILS:
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.
OUTPUT DETAILS:
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.