#P9081. [PA 2018] Magiczne wieże
[PA 2018] Magiczne wieże
Problem Description
Translated from PA 2018 Round 3 Magiczne wieże.
In a kingdom, there are wizards. Each wizard has two magic towers. A wizard can teleport freely between their two towers.
For some reason, the residents of the kingdom only want to live in areas surrounded by wizards. Specifically, if a resident moves from their home in any direction, they will get closer to at least one wizard (at either of that wizard's towers), then their home is considered safe.
If we connect all safe homes in order, they form a safe region. Please find the area of this region.
Input Format
The first line contains an integer , which represents the number of wizards.
The next lines each contain integers , describing the two magic towers owned by the -th wizard.
It is guaranteed that no two towers are at the same position.
Output Format
Output the area of the safe region. In particular, if there are no safe points, the area of the region is .
Your output must have relative error at most compared with the standard answer.
4
0 0 0 -1
-1 5 -2 2
4 0 4 1
2 2 6 6
4.8000000000
Hint
Explanation for Sample 1

As shown in the figure, the black line segments are the two towers of a wizard, and the gray area is the safe region.
Constraints
This problem uses bundled testdata.
For of the testdata, , .
There are subtasks. Among them, for each of the following conditions, there is at least one subtask that satisfies it (each line is one condition):
- , .
- .
- .
Translated by ChatGPT 5