| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 7 초 | 1024 MB | 25 | 2 | 2 | 40.000% |
There is a convex polygon with $n$ vertices on a plane. Let $V$ be the set of vertices of this convex polygon. After removing all the edges of the convex polygon, you will create a tree with $n$ vertices by repeating the following operation $n-1$ times:
Find the maximum possible total score obtained by $n-1$ operations.
The input file contains multiple test cases. The first line contains an integer $t$ representing the number of test cases. Following that, $t$ test cases are given. Each test case is given in the following format:
$n$
$x_1$ $y_1$
$\vdots$
$x_n$ $y_n$
Here, $n$ is an integer representing the number of vertices, where $3 \le n \le 120\,000$. The sum of all $n$ values in a single input file is guaranteed to be less than or equal to $120\,000$.
$x_i$ and $y_i$ represent the coordinates of the $i$-th vertex, where each coordinate is an integer between $-10^9$ to $10^9$. The vertices are given in counterclockwise order when viewed from the centroid of the convex polygon. Three different vertices of the convex polygon do not lie on a single line.
Output the maximum possible total score obtained by $n-1$ operations.
2 4 0 0 1 0 1 1 0 1 6 986288255 165031740 -353860917 -935298054 -173584601 -984818960 141060317 -990001002 341839727 -939758266 662792114 -748803453
5 10426936519662708146