You are given a polyline through . Compute the minimum length of a vertical segment (parallel to the -axis) with its bottom endpoint somewhere on the polyline such that from every point on the polyline, the segment is at least partially visible.
The first line contains a single integer, .
The next line contains space-separated integers, the th being . These will be presented in increasing order
The next line contains space-separated integers, the th being .
Output the desired length to exactly three decimal places.
6 1 2 4 5 6 7 1 2 2 4 2 1