# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

# Archers and the Monster

By Hasinur_ · Limits 1s, 512 MB

A monster is trapped in a triangle in a 2D coordinate system. Three archers are waiting to kill him. Each of the archers is waiting for the right moment standing on the sides of the triangle. No two archers will stand on the same side of the triangle. They can move along the sides they are standing on. The monster can not escape the triangle. It can only move within the area of the triangle.

The right moment is when the monster and the archers have moved to positions such that the shortest Euclidean distance between each of the archers and monster is the same. You will be given the length of the sides. You have to calculate the shortest possible Euclidean distance.

## Input

The first line of the test case contains a single integer $T$ which denotes the number of test cases. Each of the next $T$ lines will contain three space-separated integers $a$, $b$ and $c$ which denote the length of the sides of the triangle. It is guaranteed that the triangle is a non-degenerated triangle.

$\textbf{Constraints:}$

For 10 points:

• $1 \leq T \leq 100$

• $1 \leq a, b,c \leq 100$

• $a = b = c$

For 90 points:

• $1\leq T \leq 500050$

• $1 \leq a,b,c \leq 100$

## Output

For each case, print the shortest distance. Errors less than $10^{-4}$ will be ignored.

## Sample

InputOutput
3
1 1 1
9 8 4
16 14 22

0.288675
1.523624
4.296689


### Statistics

88% Solution Ratio

silenced.VOICEEarliest, 1M ago

salman.exeFastest, 0.2s

Mestu_PaulLightest, 3.9 MB

fragilisticShortest, 261B