Circular Sectors

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

Bobo has drawn nn circular sectors on the plane. He would like to know the area of the union of all the circular sectors.

입력

The input contains zero or more test cases, and is terminated by end-of-file. For each test case:

The first line contains an integer nn, the number of circular sectors (1n5001 \leq n \leq 500).

Each of the next nn lines contains five numbers x_ix\_i, y_iy\_i, r_ir\_i, s_is\_i and θ_i\theta\_i (100x_i,y_i100-100 \le x\_i, y\_i \le 100, 1r_i1001 \le r\_i \le 100, 0s_i60 \le s\_i \le 6, 0.1θ_i60.1 \le \theta\_i \le 6). Here, (x_i,y_ix\_i, y\_i) is the coordinate of the circle center, r_ir\_i is the radius of the circle, s_is\_i is the starting angle in radians (counter-clockwise from the positive direction of the xx axis) and θ_i\theta\_i is the central angle in radians (this means that the sector arc goes from angle s_is\_i to angle s_i+θ_is\_i + \theta\_i where the angle is measured counter-clockwise from the positive direction of the xx axis). Also, x_ix\_i, y_iy\_i and r_ir\_i are integers, and s_is\_i and θ_i\theta\_i are real numbers with exactly 33 digits after the decimal point.

It is guaranteed that the sum of nn does not exceed 500500.

출력

For each test case, output a real number denoting the answer. Your answer will be considered correct if its relative or absolute error doesn't exceed 10610^{-6}.

힌트

The image below shows the third test case.