시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 (추가 시간 없음) | 1024 MB | 1 | 1 | 1 | 100.000% |
Given is a strictly convex polygon with $n$ vertices $p_1, p_2, \ldots, p_n$ in counterclockwise. Denote $C_i$ as the polygon with $i$ vertices $p_1, p_2, \ldots, p_i$. For each $i=3, 4, \ldots, n$, find the lines which $C_i$ is symmetric about.
There are multiple test cases. The first line of input contains an integer $T$ ($1\le T\le 10^5$), the number of test cases. For each test case:
The first line contains an integer $n$ ($3 \le n \le 3 \cdot 10^5$), the number of vertices.
The $i$-th of the following $n$ lines contains two integers $x_i$, $y_i$ ($-10^9 \le x_i, y_i\le 10^9$), the coordinates of $p_i$.
It is guaranteed that the vertices are given counterclockwise, and the polygon is strictly convex, that is, no three vertices are collinear.
It is guaranteed that the sum of $n$ in all test cases does not exceed $3 \cdot 10^5$.
For each test case:
For each $i=3, 4, \ldots, n$, on the first line, output an integer $k$: the number of lines which $C_i$ is symmetric about.
In each of the following $k$ lines, output three integers $a$, $b$, $c$ ($-2 \cdot 10^{18} \le a, b, c \le 2 \cdot 10^{18}$), denoting that $C_i$ is symmetric about the line $ax+by+c=0$.
If there are multiple answers, you can output any of them. For each $i$, you can output the lines in any order.
3 4 0 0 1 0 1 1 0 1 3 0 0 3 0 1 1 4 -1000000000 -1000000000 1000000000 -1000000000 1000000000 1000000000 -1000000000 1000000000
1 1 1 -1 4 1 -1 0 0 2 -1 2 0 -1 1 1 -1 0 1 1 1 0 4 1 -1 0 0 1 0 1 0 0 1 1 0