시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
3 초 256 MB 0 0 0 0.000%

문제

You are given a convex polygon which contains the origin strictly inside. The polygon is slowly rotated by angle $\alpha$ around the origin in counter-clockwise order. Calculate the swept area, that is, the area of the set of all points which were covered by the polygon at least once during its rotation.

입력

Each test consists of one or more test cases.

The first line contains a positive integer $T$, the number of test cases. Then $T$ test cases are given.

The first line of each test case contains an integer $n$, the number of vertices of the polygon ($3 \leq n \leq 10^5$), followed by a real number $\alpha$, the rotation angle in radians, given with exactly six digits after the decimal point ($0 < \alpha < 2 \pi$). The following $n$ lines contain the description of the vertices in counter-clockwise order. Each vertex is described by two integers $x_i$ and $y_i$ which are its coordinates ($-10^9 \leq x_i, y_i \leq 10^9$). It is guaranteed that the polygon has non-zero area, contains the origin strictly inside, and that no three vertices lie on the same line.

The sum of $n$ over all test cases does not exceed $10^5$.

출력

The output must contain $T$ lines, one for each test case.

Each line must contain the answer for the corresponding test case with absolute or relative error no more than $10^{-6}$.

예제 입력 1

1
4 0.785398
-1 -1
1 -1
1 1
-1 1

예제 출력 1

5.484738133371644