#P6160. [Cnoi2020] 向量
[Cnoi2020] 向量
Description
Take the ice house as the origin. The positions of the Sangetsusei are denoted by vectors , , .

By definition, , , .
Now Cirno assigns you the task of computing the destruction limit index .
$$\sigma=\min\{\vec{a}\cdot\vec{b}+\vec{b}\cdot\vec{c}+\vec{c}\cdot\vec{a}\}$$Here, “” denotes the vector dot product.
Input Format
One line with three integers , , , guaranteed that .
Output Format
One line with one real number . (Keep one digit after the decimal point.)
3 4 5
-25.0
159 473 824
-445561.0
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:
Constraints
This problem uses bundled testdata.
- Subtask 1 ():
- Subtask 2 ():
- Subtask 3 ():
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号