The distance between the segments#1830

The distance between the segments

1 Sekunde
256 Megabyte
Leicht

Given two segments in space (x_1, y_1, z_1)–(x_2, y_2, z_2) and (x_3, y_3, z_3)–(x_4, y_4, z_4). Find the distance between the segments.

Eingabe

The input contains integers x_1, y_1, z_1, x_2, y_2, z_2, x_3, y_3, z_3, x_4, y_4, z_4. Each coordinate does not exceed by absolute value.

Ausgabe

Print the distance between the segments with at least digits after the decimal point.

Beispiele

Beispiel 1

Loading
Loading