#D12906. A Polygon And Circles
A Polygon And Circles
A Polygon And Circles
Problem
Given a convex polygon consisting of vertices and the center coordinates of circles. The radius of all circles is .
I want to find the minimum real number that satisfies the following conditions.
Condition: Every point inside a convex polygon is contained in at least one circle.
Constraints
The input satisfies the following conditions.
- No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.
Input
All inputs are given as integers in the following format:
:: ::
The line is given an integer that represents the number of vertices of the convex polygon. Information on each vertex of the convex polygon is given in the counterclockwise order from the line to the line. The line is given , which represents the coordinates of the th vertex, separated by blanks. The line is given the integer , which represents the number of circles. Information on the center coordinates of the circle is given from the line to the line. On the line, representing the center coordinates of the th circle is given, separated by blanks.
Output
Outputs the radius of the smallest circle that satisfies the condition. However, absolute or relative errors up to are acceptable.
Examples
Input
4 2 3 1 2 2 1 3 2 4 1 3 1 1 3 3 3 1
Output
1.414213562373
Input
7 -96469 25422 -55204 -45592 -29140 -72981 98837 -86795 92303 63297 19059 96012 -67980 70342 17 -4265 -14331 33561 72343 52055 98952 -71189 60872 10459 -7512 -11981 57756 -78228 -28044 37397 -69980 -27527 -51966 22661 -16694 13759 -59976 86539 -47703 17098 31709 -62497 -70998 -57608 59799 -1904 -35574 -73860 121
Output
75307.220122044484
inputFormat
input satisfies the following conditions.
- No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.
Input
All inputs are given as integers in the following format:
:: ::
The line is given an integer that represents the number of vertices of the convex polygon. Information on each vertex of the convex polygon is given in the counterclockwise order from the line to the line. The line is given , which represents the coordinates of the th vertex, separated by blanks. The line is given the integer , which represents the number of circles. Information on the center coordinates of the circle is given from the line to the line. On the line, representing the center coordinates of the th circle is given, separated by blanks.
outputFormat
Output
Outputs the radius of the smallest circle that satisfies the condition. However, absolute or relative errors up to are acceptable.
Examples
Input
4 2 3 1 2 2 1 3 2 4 1 3 1 1 3 3 3 1
Output
1.414213562373
Input
7 -96469 25422 -55204 -45592 -29140 -72981 98837 -86795 92303 63297 19059 96012 -67980 70342 17 -4265 -14331 33561 72343 52055 98952 -71189 60872 10459 -7512 -11981 57756 -78228 -28044 37397 -69980 -27527 -51966 22661 -16694 13759 -59976 86539 -47703 17098 31709 -62497 -70998 -57608 59799 -1904 -35574 -73860 121
Output
75307.220122044484
样例
4
2 3
1 2
2 1
3 2
4
1 3
1 1
3 3
3 1
1.414213562373