Three Triangles
题号:NC226662
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Starting with a ABC with vertices A, B, C and sides a, b, c opposite A, B, C, respectively:
                       
Construct the altitudes ha, hb and hc to sides a, b, c respectively (red) and the perpendicular bisectors pa, pb and pc to sides a, b, c (green): 
                                                 
Let A’ = hc intersect pb, B’ = ha intersect pc and C’ = hb intersect pa yeilding a new A’B’C’ similar to ABC as shown on the next page.
                     
Finally, let A’’ = reflection of A’ in side b, B’’ = reflection of B’ in side c and C’’ = reflection of C’ in side a to obtain yet another similar triangle: 
                      
Write a program which takes as input the coordinates of the vertices A, B and C and outputs the areas of the three triangles. 

输入描述:

Input consists of a single line which contains three, space separated floating point values Bx, Cx, Cy in that order (-1.0 <= Bx, Cx, Cy <= 10.0). ABC will have area at least 1.0. The coordinates system is chosen so that A = (0, 0) is the origin and B = (Bx, 0) lies on the X-axis. C = (Cx, Cy) is arbitrary.

输出描述:

The output consists of a single line that contains three space separated floating point values to 4 decimal places. Area(ABC), Area(A’B’C’) and Area(A”B”C”) in that order.
示例1

输入

复制
4.0 5.00 3.000

输出

复制
6.0000 4.8750 10.8750

备注:

浮点误差精度为 4 位(1e-4),fabs(stdvalue - yourvalue) / max(1.0, fabs(stdvalue)) < 1e-4均正确