laser
A military research lab has designed a new weapon that can destroy an objective by using a high power laser. In the last mission in which the weapon was used, the military attempted to destroy with it an objective in the shape of a convex polygon with n vertices. The weapons target radius is circular. The objective is destroyed if at least one point on the contour or from inside the polygon enters the weapon's target radius.
Task
Knowing the coordinates of the center and the weapon's target radius, as well as the coordinates of the n vertices of the objective, determine how many centimeters longer would the weapon's target radius need to have been in order for it to be able to destroy the objective.
Input Data
Input file laser.in contains on the first line the number n, and on the following n lines the abscise and the ordinate of each of the vertices of the objective, and on the last line it contains three numbers, the first two representing the abscise and the ordinate of the center of the weapon's target radius, and the third representing the weapon's target radius. The coordinates of the objective's vertices are given in clockwise order.
Output Data
Output file laser.out will contain a single line with the requested number, with 3 decimal precision.
Restrictions
Example
laser.in |
laser.out |
6 |
1.121
|
Time limit: 0.1 seconds/test
lect. drd. Radu Boriga
"Titu Maiorescu" University - Bucharest
contact:r_boriga@yahoo.com