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

19061번 - Polygon Rotation 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 256 MB911356.098%

문제

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

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2017 > Day 3: Ural Contest G번

Contest > Open Cup > 2017/2018 Season > Stage 2: Grand Prix of Ural G번

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

출처

대학교 대회

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

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