Looksery Cup 2015
H
Degenerate Matrix
Codeforces
2100
原题
← G→
翻译中…

The determinant of a matrix $2 × 2$ is defined as follows:

翻译中…

image

翻译中…

A matrix is called degenerate if its determinant is equal to zero.

翻译中…

The norm $||*A*||$ of a matrix $*A*$ is defined as a maximum of absolute values of its elements.

翻译中…

You are given a matrix image. Consider any degenerate matrix $*B*$ such that norm $||*A* - *B*||$ is minimum possible. Determine $||*A* - *B*||$.

翻译中…

Input

翻译中…

The first line contains two integers $*a*$ and $*b*$ ($|*a*|, |*b*| ≤ 10^{9}$), the elements of the first row of matrix $*A*$.

翻译中…

The second line contains two integers $*c*$ and $*d*$ ($|*c*|, |*d*| ≤ 10^{9}$) the elements of the second row of matrix $*A*$.

翻译中…

Output

翻译中…

Output a single real number, the minimum possible value of $||*A* - *B*||$. Your answer is considered to be correct if its absolute or relative error does not exceed $10^{ - 9}$.

翻译中…

Note

翻译中…

In the first sample matrix $*B*$ is image

翻译中…

In the second sample matrix $*B*$ is image

翻译中…

样例

Input #1
1 2
3 4
Output #1
0.2000000000
InputCopy OutputCopy
Input #2
1 0
0 1
Output #2
0.5000000000
InputCopy OutputCopy
题目信息
题号
549H
所属比赛
时间限制
1 s
内存限制
256 MB
标签
二分
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。