P6160 [Cnoi2020] Vectors

Background

> A vector refers to a quantity that has both magnitude (Magnitude) and direction (Direction). > The quantity corresponding to a vector is called a scalar (Scalar), which has only magnitude and no direction. For Cirno, the Sangetsusei who keep rotating around the ice house all day are vectors, not scalars. - Sunny Milk performs uniform circular motion with radius $r_1$. - Luna Child performs uniformly accelerated circular motion with radius $r_2$. - Star Sapphire performs variably accelerated circular motion with radius $r_3$. To reduce the impact of the Sangetsusei as much as possible, some important parameters must be computed.

Description

Take the ice house as the origin. The positions of the Sangetsusei are denoted by vectors $\vec{a}$, $\vec{b}$, $\vec{c}$. ![](https://cdn.luogu.com.cn/upload/image_hosting/j3u0l3no.png) By definition, $|\vec{a}|=r_1$, $|\vec{b}|=r_2$, $|\vec{c}|=r_3$. Now Cirno assigns you the task of computing the **destruction limit index** $\sigma$. $$\sigma=\min\{\vec{a}\cdot\vec{b}+\vec{b}\cdot\vec{c}+\vec{c}\cdot\vec{a}\}$$ Here, “$\cdot$” denotes the **vector dot product**.

Input Format

One line with three integers $r_1$, $r_2$, $r_3$, guaranteed that $r_1 \le r_2 \le r_3$.

Output Format

One line with one **real number** $\sigma$. (**Keep one digit after the decimal point**.)

Explanation/Hint

### Sample1 Explanation The answer is minimized when $\cos\langle\vec{a},\vec{b}\rangle=0,\cos\langle\vec{b},\vec{c}\rangle=-\frac{4}{5},\cos\langle\vec{c},\vec{a}\rangle=-\frac{3}{5}$. ### Required Math Knowledge - **Definition of dot product**: $\vec{a}\cdot\vec{b}=|\vec{a}||\vec{b}|\times \cos\langle\vec{a},\vec{b}\rangle$ - **Coordinate form of dot product**: $(x_1,y_1)\cdot(x_2,y_2)=x_1x_2+y_1y_2$ ### Constraints **This problem uses bundled testdata.** - Subtask 1 ($20\%$): $r_1=r_2=r_3$ - Subtask 2 ($40\%$): $r_1,r_2,r_3 \le 10$ - Subtask 3 ($40\%$): $r_1,r_2,r_3 \le 10^9$ For $100\%$ of the testdata, $0 < r_1 \le r_2 \le r_3 \le 10^9$. Translated by ChatGPT 5