Geometry of Triangles
시간 제한1초메모리 제한1024 MB
여러 삼각형이 변을 공유하며 주어질 때 모든 변을 덮는 최소 넓이의 부분집합을 고르고, 그 넓이를 소수 첫째 자리까지 출력한다.
문제
Every polygon can be constructed by joining triangles. In particular, we can do this iteratively: we start with a triangle, we add a second triangle identifying one of its sides to one of the sides of the initial triangle, we add a third triangle identifying one of its sides to one of the free sides of one of the original triangles, and so on. We will only consider polygons that can be constructed in this way, where each added triangle touches (and is identified with) exactly one side of a previously positioned triangle.
Given a polygon , let be the set of triangles used to form it. The sides of each triangle are line segments. Let be the set of segments that are sides of some triangle in . Note that each element of is one side of one or two elements of .
Once we have a polygon positioned in the plane, in some cases we can remove some of the triangles that compose it, without changing the set . We want to remove triangles so that the set is maintained and the total area of the remaining triangles is minimal. Equivalently, we want to select a subset of triangles from such that:
- Every element of is the side of at least one triangle in ; and
- 2. The sum of the areas of the elements of is as small as possible.
입력
The first line of the input contains an integer , corresponding to the number of triangles in the triangulation of . Each of the following lines contains numbers, , , , , and , indicating the existence of a triangle with coordinates , and . The triangles are given in arbitrary order. All coordinates will be integers with absolute value at most .
출력
Print the minimum area possible, respecting the conditions of the problem, with exactly one decimal place.
힌트

In the figure above , the triangulations and represent, respectively, the first and second examples. Note how is a valid subset for the first case. Triangle is left out, but all of its sides are present in the selected triangles.