1265: Triangle Centers

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:0 解决:0

题目描述

Given the lengths of three sides of a triangle △ABC, you are asked to find the following four distances. (1) FA + FB + FC. F is the point X which minimizes the sum of distances from A, B, and C in XA+ XB +XC. (2) IA + IB + IC. I is the intersection of Angle Bisectors, and it is the interior point for which distances to the sidelines are equal. (3) GA + GB + GC. G is the intersection of Medians, and it is the centroid of △ABC. (4) OA + OB + OC. O is the intersection of Perpendicular Bisectors, and it is the point for which distances to A, B, C are equal.

输入

The input consists of T test cases. The number of test cases (T ) is given in the first line of the input file. Each of the next T lines contains one test case. Each case contains three integer numbers a, b, c where a is the distance between B and C, b is the distance between C and A and c is the distance between A and B. The important condition is 0 < a,b,c <= 1000, and it is guaranteed that the triangle is non-degenerate.

输出

For each set of input you should output four floating-point numbers DF , DI , DG, DO, all of which have exactly three digits after the decimal point. Here DF = FA + FB + FC DI = IA + IB + IC DG = GA + GB + GC DO = OA + OB + OC

样例输入 复制

3
3 4 5
10 10 10
4 5 8

样例输出 复制

6.766 6.813 6.918 7.500
17.321 17.321 17.321 17.321
9.000 9.316 9.530 14.667