P4406 [CQOI2005] Union Area of Triangles
Background
[Link to the enhanced version](https://www.luogu.com.cn/problem/P13338).
Description
Given $n$ triangles, compute the area of their union.
Input Format
The first line contains $n$ ($n \leq 100$), the number of triangles.
Each of the next $n$ lines contains $6$ real numbers $x_1$, $y_1$, $x_2$, $y_2$, $x_3$, $y_3$, representing the coordinates of the triangle's vertices. All coordinates are real numbers not exceeding $10^6$, and the input numbers are given with $1$ decimal place.
Output Format
Output the union area $u$, to two decimal places.
Explanation/Hint
Translated by ChatGPT 5