P26298 [AtCoder] Inscribed Bicycle
普及+
题目描述

Problem Description

Snuke received a triangle as a birthday present. The coordinates of the three vertices are \( (x_1, y_1) \), \( (x_2, y_2) \), and \( (x_3, y_3) \).

Snuke wants to draw two circles of equal radius inside the triangle such that they do not overlap (they may touch at a point). Find the maximum radius of these circles.

Input Format

The input is given from the standard input in the following format:

\( x_1 \) \( y_1 \) \( x_2 \) \( y_2 \) \( x_3 \) \( y_3 \)

Output Format

Output the maximum radius of the circles. The absolute or relative error must be no more than \( 10^{-9} \).

Sample Input and Output

Sample Input #1

0 0
1 1
2 0

Sample Output #1

0.292893218813

Sample Input #2

3 1
1 5
4 9

Sample Output #2

0.889055514217

Notes/Hints

Constraints

  • \( 0 \leq x_i, y_i \leq 1000 \)
  • The coordinates are integers.
  • The three points are not collinear.
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
0 0 1 1 2 0
样例输出
0.292893218813