0070. Triangle

Input file name: triangle.in
Output file name: triangle.out
Time limit: 1 s
Memory limit: 64 megabytes

Consider the triangle ABC on the plane. Let points A', B' and C' be orthogonal projections of points A, B and C to lines containing segments BC, AC and AB respectively. You are given A'B', B'C' and A'C'. Find the largest possible area of the original triangle ABC.

Input file

The first line of the input file contains N – the number of test cases (1 ≤ N ≤ 10,000). Next N lines contain three positive integer numbers each – A'B', B'C' and A'C'. All numbers do not exceed 10000.

Output file

For each test case print one line of output – the area requested with the accuracy of at least eight digits after the decimal point.

Examples:

triangle.intriangle.out
1 3 4 530.00000000


Source: Petrozavodsk Winter 2003. St. Petersburg Contest I

Discuss       Submit a solution



Printable version