题目描述
The scoring system for this challenge is binary. Your score is zero unless you pass all tests.
Given $n$ strictly convex simple polygons and $m$ ellipses on a plane, find any point lying in their intersection. Then print two lines of output, where the first line contains the point's ${x}$ coordinate and the second line contains its $y$ coordinate. The point lying on the boundary of an ellipse or polygon is considered to be an inner point.
Input Format
The first line contains an integer, $n$, denoting the number of polygons.
The next set of lines defines $n$ polygons, where each polygon ${i}$ is described as follows:
The first line contains an integer, $v_i$, denoting the number of vertices in polygon ${i}$.
Each of the $v_i$ subsequent lines contains two space-separated integers denoting the respective ${x}$ and $y$ coordinates for one of polygon ${i}$'s vertices. The list of vertices is given in counterclockwise order.
The next line contains an integer, $m$, denoting the number of ellipses.
Each of the $m$ subsequent lines contains five space-separated integers denoting the respective values of $x_1$, ${y_1}$, $x_2$, $y_2$, and ${a}$, which are the coordinates of the two focal points and the semi-major-axis for an Ellipse.
Constraints
$1\leq n\leq500$
$3\leq v_i\leq1500$
$3\leq\sum\limits_{i=0}^{n-1}v_i\leq1500$
$1\leq m\leq1500$
The coordinates of points are integers in the inclusive range $[-10^4,10^4]$.
All semi-major-axes are integers $\leq10^4$.
It's guaranteed that a solution exists.
This challenge has binary scoring.
Output Format
Print two lines describing an $(x,y)$ point inside the intersection. The first line must be a real number denoting the point's ${x}$ coordinate, and the second line must be a real number denoting its $y$ coordinate. Your answer is considered to be correct if there is a point, $(x_0,y_0)$, inside the intersection such that the distance between $(x,y)$ and $(x_0,y_0)$ is at most $\mathbf{10^{-4}}$.
Sample Input
2
4
0 0
2 0
2 1
0 1
3
-1 -1
5 1
0 5
1
1 2 1 4 2
Sample Output
0.999998
1
Explanation
The intersection consists of only one point: $(1,1)$. As its distance to $(0.99998,1)$ is $\leq10^{-4}$, this is a correct answer. Thus, we print the ${x}$ coordinate, ${0.9999}$, on the first line and the $y$ coordinate, ${1}$, on the second line.
输入格式
见题面
输出格式
见题面