eolymp
bolt
Try our new interface for solving problems
Problems

Biggest Inscribed Ellipse

Biggest Inscribed Ellipse

\textbf{Definition}. If \textbf{F_1}, \textbf{F_2} are two points and \textbf{R }is a positive number such that \textbf{2R }> \textbf{|F_1F_2|}, then an ellipse can be defined as a set of all points \textbf{M }such that \textbf{|F_1M| + |F_2M|} ≤ \textbf{2R}. Your task is to inscribe an ellipse of the biggest possible area into the given triangle. \InputFile The input contains three integers \textbf{a}, \textbf{b}, \textbf{c}: lengths of the triangle’s sides (\textbf{1 }≤ \textbf{a }≤ \textbf{b }≤ \textbf{c }≤ \textbf{1000}; \textbf{c }< \textbf{a + b}). \OutputFile Output numbers \textbf{|F_1F_2|} and \textbf{R}, which describe the requested ellipse. The answer must be given with absolute or relative error not exceeding \textbf{10^\{−6\}}. It is guaranteed that the answer is unique.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1 1 1
Output example #1
0.0000000000 0.2886751346
Author M.Rubinchik, P.Ageev
Source 2013 Petrozavodsk, Winter, Ural FU contest, Kontur Cup, Problem C