This page is still under construction.

Parts of this page are still being built. What you see may change.

Aquarium Tank

Time limit1sMemory limit256 MB

Summary
A convex polygon tank of depth D holds L litres of water, and the task asks for the height of the water surface.
Level

Medium6 of 10

Topics
Geometry, Binary search
Solved
No attempts yet

Problem

You bought an aquarium tank with an unusual shape and poured LL litres of water into it. How high does the water stand in the tank?

Seen from one side, the tank is a convex polygon. Exactly two vertices of that polygon rest on the table, so their yy coordinates are 0, and every other vertex has a positive yy coordinate. Exactly two vertices have the maximum yy coordinate, and the water is poured through the opening between those two vertices. The tank is DD centimetres deep. It is glued to the table, so whatever its shape is, it keeps its position and does not tip over.

All coordinates and lengths in this problem are given in centimetres. One cubic metre is 1000 litres.

Input

The input is a single test case. The first line contains an integer NN (4≤N≤1004 \le N \le 100), the number of vertices of the polygon. The second line contains two integers DD and LL, where 1≤D≤10001 \le D \le 1000 is the depth of the tank and 0≤L≤20000 \le L \le 2000 is the number of litres of water poured into it. Each of the next NN lines contains two integers, the xx and yy coordinates of one vertex of the convex polygon, in counterclockwise order. The absolute values of xx and yy are at most 1000. The tank has a positive capacity, and the water poured in never exceeds it.

Output

Print the height of the water in the tank, in centimetres, rounded to 2 decimal places, on one line.

Examples2

  1. Example 1

    Input
    4
    30 50
    20 0
    100 0
    100 40
    20 40
    
    Expected output
    20.83
    
  2. Example 2

    Input
    9
    30 70
    110 70
    100 80
    80 80
    -10 60
    -40 30
    -40 25
    20 0
    100 0
    120 10
    
    Expected output
    19.74