Old Solution Methods
시간 제한1초메모리 제한2048 MB
고정된 점 A, B, C를 지나는 세 직선을 같은 각도만큼 회전시킬 때 세 교점이 이루는 삼각형 넓이의 최댓값을 구한다.
문제
There are distinct points , , , , , on the plane. Points , , and are not collinear.
Svetozar drew a line through points and , a line through points and , and a line through points and . It turned out that none of these lines are parallel. Now he wants to rotate line around point , line around point , and line around point counterclockwise by the same angle, then find the intersection points of the resulting lines, and then draw a triangle with vertices at the obtained three points (if they are not collinear).
Svetozar wants to obtain a triangle with the largest possible area. If it is not possible to form a triangle, Svetozar considers the area to be zero. Find this area.
입력
The first line contains a single integer (), denoting the number of test cases.
Then descriptions of test cases follow. Each description consists of lines, describing points , , , , , respectively. Each point description consists of two integers and (): the coordinates of the point.
It is guaranteed that in each test case all points are distinct, points , , and are not collinear, and the lines , , and are pairwise not parallel.
출력
For each test case, output a single real number with an absolute or relative error not exceeding : the largest possible area of the triangle. It is guaranteed that in none of the tests this area exceeds .
힌트
In the example, the maximum possible area is achieved by rotating the lines by an angle approximately equal to . The triangle with the largest area has sides equal to , , , and vertices at points , , and , where , .
In the illustration below, the original lines are marked with dashed lines, and the lines after rotation are marked with solid lines:
