eolymp
bolt
Try our new interface for solving problems
Problems

The distance between the segments

The distance between the segments

Find distance between two segments. \InputFile Eight of integers - the coordinates of the four ends of two segments. All input data are integers not exceeding modulo \textbf{10000}. \OutputFile One number - the distance between the segments with an accuracy of less than \textbf{10^\{-6\}}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1 1 2 2 2 1 3 0
Output example #1
0.70710678118654752