A triangle of maximal area
Hard
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
On the plane, given a circle of radius R. From it cut two circles of radii R_1 and R_2 such that R_1 + R_2 = R. Find the maximum area of a triangle that can fit into the resulting figure.
Input
The input data contain a variety of test cases (no more 100 000). Each test case is recorded in a separate row two numbers R_1 and R_2 (1 ≤ R_1, R_2 ≤ 10^6) – radii of circles. Numbers separated by a space. Input ends with EOF.
Output
For each pair of radii of the input data output to a row in the maximum area of the inscribed triangle with an absolute or relative error 10^{–8}.
Examples
Input #1
Answer #1
Submissions 119
Acceptance rate 4%