아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Interested in Skiing

시간 제한1초메모리 제한512 MB

요약
고정된 수직 속도로 위로 이동하는 스키어가 폭이 제한된 띠 안에서 서로 교차하지 않는 선분 장애물을 통과할 수 있게 하는 최소 수평 속도를 구한다.
난이도

보통10점 중 7점

유형
기하, 이분 탐색, 시뮬레이션
정답자
아직 제출이 없습니다

문제

Kotori is interested in skiing. The skiing field is an infinite strip going along yy-axis on the 2-dimensional plane where all points (x,y)(x, y) in the field satisfies −m≤x≤m-m \le x \le m. When skiing, Kotori cannot move out of the field, which means that the absolute value of his xx-coordinate should always be no more than mm. There are also nn segments on the ground which are the obstacles and Kotori cannot move across the obstacles either.

Kotori will start skiing from (0,−1010101010)(0, -10^{10^{10^{10^{10}}}}) (you can regard this yy-coordinate as a negative infinity) and moves towards the positive direction of the yy-axis. Her vertical (parallel to the yy-axis) speed is always v_yv\_y which cannot be changed, however she can control her horizontal (parallel to the xx-axis) speed in the interval of \[−v_x,v_x]\[-v\_x, v\_x]. The time that Kotori changes her velocity can be neglected.

Your task is to help Kotori calculate the minimum value of v_x\*v\_x^\* that once v_x>v_x\*v\_x>v\_x^\* she can safely ski through the skiing field without running into the obstacles.

입력

There is only one test case in each test file.

The first line of the input contains three positive integers nn, mm and v_yv\_y (1≤n≤1001 \le n \le 100, 1≤m≤1041 \le m \le 10^4, 1≤v_y≤101 \le v\_y \le 10), indicating the number of obstacles, the half width of the skiing field and the vertical speed.

For the following nn lines, the ii-th line contains four integers x_1x\_1, y_1y\_1, x_2x\_2 and y_2y\_2 (−m≤x_1,x_2≤m-m \le x\_1, x\_2 \le m, −104≤y_1,y_2≤104-10^4 \le y\_1, y\_2 \le 10^4, x_1≠x_2x\_1 \ne x\_2 or y_1≠y_2y\_1 \ne y\_2) indicating the ii-th obstacle which is a segment connecting point (x_1,y_1)(x\_1, y\_1) and (x_2,y_2)(x\_2, y\_2), both inclusive (that is to say, these two points are also parts of the obstacle and cannot be touched). It's guaranteed that no two obstacles intersect with each other.

출력

Output one line containing one number indicating the minimum value of v_x\*v\_x^\*. If it is impossible for Kotori to pass through the skiing field, output "-1" (without quotes) instead.

Your answer will be considered correct if and only if its absolute or relative error does not exceed 10−610^{-6}.

예제4

  1. 예제 1

    입력
    3 2 1
    -2 0 1 0
    -1 4 2 4
    0 1 0 3
    
    예상 출력
    1.000000000000000
    
  2. 예제 2

    입력
    2 1 2
    -1 0 1 0
    1 1 0 1
    
    예상 출력
    -1
    
  3. 예제 3

    입력
    2 3 7
    -3 0 2 2
    3 1 -2 17
    
    예상 출력
    1.866666666666666
    
  4. 예제 4

    입력
    1 100 1
    -100 0 99 0
    
    예상 출력
    0.000000000000000