Position Zero
InterviewTime limit1sMemory limit1024 MB
Count the vertical lines x = T_i that pass strictly inside a circle with center (X, Y) and radius R, and count those that only touch its boundary.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Banana is a stage girl. She wants to stand at the "Position Zero" of the stage. In this problem, the stage is a two-dimensional coordinate plane, and "Position Zero" is expressed as a circle on this plane.
The center of "Position Zero" is , and its radius is .
However, the range where Banana can move is limited. Banana chooses one of straight lines and can move only along it.
Each line is expressed as .
Given , the number of lines Banana can move along, the center coordinates , and radius of "Position Zero", and the information of each line, output , the number of lines along which Banana can enter the inside of "Position Zero", and , the number of lines along which Banana can enter only the boundary of "Position Zero".
Input
The first line contains the number of lines along which Banana can move.
The second line contains three integers , , and , separated by spaces.
From the third line to the -th line, the value is given in order on the -th line .
All numbers given in the input are integers.
Output
Print and , separated by a space, where is the number of lines along which Banana can enter the inside of "Position Zero", and is the number of lines along which Banana can enter only the boundary of "Position Zero".