308. Hyperboloid Distance
Time limit per test: 0.5
Memory limit: 65536
You are given two points A and B on the surface of the hyperboloid x2
=1. Find the shortest distance between them along the surface.
The input file contains six real numbers: xA
(coordinates of A and B), separated by spaces and/or line breaks (-1 ≤ zA
Output the shortest distance between A and B along the surface of the hyperboloid. Your answer should be accurate within +-0.1.
1 0 0
0 1 0