Union of circles#4385

Union of circles

1 segundo
256 megabytes
Muy difícil

Find the area of the union of circles.

Entrada

The first line contains the number of test cases (1 \leq K \leq 10).

The first line of each test case contains the number of circles (1 \leq N \leq 100). The following lines each contain the center's coordinates and the radius of a circle, as x_i y_i r_i. All coordinates are integers not exceeding in absolute value. The radius is a positive integer no greater than .

Salida

For each test case, output the area of the union of the circles, with digits after the decimal point.

Ejemplos

Ejemplo 1

Loading
Loading