Logo
(追記) (追記ここまで)

25725번 - Symmetry: Convex 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB111100.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.

제한

예제 입력 1

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 -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

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2022 > Day 6: Heltion Contest K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /