아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Polygon Rotation

시간 제한3초메모리 제한256 MB

요약
원점을 내부에 포함하는 볼록 다각형을 각도 알파만큼 회전시킬 때 지나간 영역의 넓이를 구한다.
난이도

보통10점 중 7점

유형
기하, 수학
정답자
아직 제출이 없습니다

문제

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 TT, the number of test cases. Then TT test cases are given.

The first line of each test case contains an integer nn, the number of vertices of the polygon (3≤n≤1053 \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<α<2π0 < \alpha < 2 \pi). The following nn lines contain the description of the vertices in counter-clockwise order. Each vertex is described by two integers x_ix\_i and y_iy\_i which are its coordinates (−109≤x_i,y_i≤109-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 nn over all test cases does not exceed 10510^5.

출력

The output must contain TT 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−610^{-6}.

예제1

  1. 예제 1

    입력
    1
    4 0.785398
    -1 -1
    1 -1
    1 1
    -1 1
    
    예상 출력
    5.484738133371644