2 人解决,9 人已尝试。
3 份提交通过,共有 35 份提交。
9.6 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
You are asked to find a polygon that satisfies all the following conditions, given two integers, $x_b$ and $y_b$.
The polygon may be non-convex.
The input consists of multiple test cases. The first line of the input contains an integer $n$, which is the number of the test cases $(1 \leq n \leq 10^5 )$. Each of the following $n$ lines contains a test case formatted as follows.
$x_b$ $y_b$
$x_b$ and $y_b$ $(2 \leq x_b \leq 10^9 , 2 \leq y_b \leq 10^9)$ are integers stated above.
For each test case, output description of one polygon satisfying the conditions stated above, in the following format.
$v$
$x_1$ $y_1$
.
.
.
$x_v$ $y_v$
Here, $v$ is the number of vertices, and each pair of $x_i$ and $y_i$ gives the coordinates of the i-th vertex, $(x_i, y_i)$. The first vertex $(x_1, y_1)$ can be chosen arbitrarily, and the rest should be listed either in clockwise or in counterclockwise order.
When more than one polygon satisfies the conditions, any one of them is acceptable. You can prove that, with the input values ranging as stated above, there is at least one polygon satisfying the conditions.
2 5 6 1000000000 2
4 5 6 0 6 0 0 5 0 3 1000000000 0 0 2 999999999 0
2 人解决,9 人已尝试。
3 份提交通过,共有 35 份提交。
9.6 EMB 奖励。