#P6160. Destruction Limit Index

    ID: 19380 Type: Default 1000ms 256MiB

Destruction Limit Index

Destruction Limit Index

Consider three vectors \(\vec{a}\), \(\vec{b}\), and \(\vec{c}\) emanating from a common origin. Their magnitudes are given by \(|\vec{a}|=r_1\), \(|\vec{b}|=r_2\), and \(|\vec{c}|=r_3\) respectively. The task is to compute the Destruction Limit Index \(\sigma\), defined as:

$$\sigma = \min\{\vec{a}\cdot\vec{b} + \vec{b}\cdot\vec{c} + \vec{c}\cdot\vec{a}\} $$

where \(\cdot\) denotes the vector dot product. It can be shown that the minimum value under the constraint of fixed magnitudes is achieved when the vectors are separated by an angle of \(120^\circ\) (i.e. the directions differ by \(\frac{2\pi}{3}\)), making the expression reach its minimum value of:

σ=12(r1r2+r2r3+r3r1).\sigma = -\frac{1}{2}(r_1r_2 + r_2r_3 + r_3r_1).

Your task is to read the values of \(r_1\), \(r_2\), \(r_3\) and output the corresponding minimum \(\sigma\) as computed by the formula above.

inputFormat

The input consists of a single line with three space-separated numbers (r_1), (r_2), (r_3), where each (r_i) represents the magnitude of vector (\vec{a}), (\vec{b}), and (\vec{c}) respectively.

outputFormat

Output the minimum value of (\sigma) computed using the formula:

σ=12(r1r2+r2r3+r3r1).\sigma = -\frac{1}{2}(r_1r_2 + r_2r_3 + r_3r_1).

The answer should be printed as a number. (If needed, you may output a floating-point number.)

sample

1 1 1
-1.5