## A Geometry Problem

View as PDF

Points: 12 (partial)
Time limit: 1.0s
Memory limit: 162M

Problem type

You are given a polyline through . Compute the minimum height of a tower that is built vertically on the polyline such that the tower is visible from every point on the polyline.

#### Input Specification

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 Specification

Output the desired height to exactly three decimal places.

#### Sample Input

6
1 2 4 5 6 7
1 2 2 4 2 1

#### Sample Output

1.000