#P4406. [CQOI2005] 三角形面积并

    ID: 3328 远端评测题 1000ms 128MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>2005重庆各省省选枚举,暴力排序概率论,统计

[CQOI2005] 三角形面积并

Description

Given nn triangles, compute the area of their union.

Input Format

The first line contains nn (n100n \leq 100), the number of triangles. Each of the next nn lines contains 66 real numbers x1x_1, y1y_1, x2x_2, y2y_2, x3x_3, y3y_3, representing the coordinates of the triangle's vertices. All coordinates are real numbers not exceeding 10610^6, and the input numbers are given with 11 decimal place.

Output Format

Output the union area uu, to two decimal places.

2
0.0 0.0 2.0 0.0 1.0 1.0
1.0 0.0 3.0 0.0 2.0 1.0
1.75

Hint

Translated by ChatGPT 5