CF703C.Chris and Road

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

And while Mishka is enjoying her trip...

Chris is a little brown bear. No one knows, where and when he met Mishka, but for a long time they are together (excluding her current trip). However, best friends are important too. John is Chris' best friend.

Once walking with his friend, John gave Chris the following problem:

At the infinite horizontal road of width ww , bounded by lines y=0y=0 and y=wy=w , there is a bus moving, presented as a convex polygon of nn vertices. The bus moves continuously with a constant speed of vv in a straight OxOx line in direction of decreasing xx coordinates, thus in time only xx coordinates of its points are changing. Formally, after time tt each of xx coordinates of its points will be decreased by vtvt .

There is a pedestrian in the point (0,0)(0,0) , who can move only by a vertical pedestrian crossing, presented as a segment connecting points (0,0)(0,0) and (0,w)(0,w) with any speed not exceeding uu . Thus the pedestrian can move only in a straight line OyOy in any direction with any speed not exceeding uu and not leaving the road borders. The pedestrian can instantly change his speed, thus, for example, he can stop instantly.

Please look at the sample note picture for better understanding.

We consider the pedestrian is hit by the bus, if at any moment the point he is located in lies strictly inside the bus polygon (this means that if the point lies on the polygon vertex or on its edge, the pedestrian is not hit by the bus).

You are given the bus position at the moment 00 . Please help Chris determine minimum amount of time the pedestrian needs to cross the road and reach the point (0,w)(0,w) and not to be hit by the bus.

输入格式

The first line of the input contains four integers nn , ww , vv , uu ( 3<=n<=100003<=n<=10000 , 1<=w<=1091<=w<=10^{9} , 1<=v,u<=10001<=v,u<=1000 ) — the number of the bus polygon vertices, road width, bus speed and pedestrian speed respectively.

The next nn lines describes polygon vertices in counter-clockwise order. ii -th of them contains pair of integers xix_{i} and yiy_{i} ( 109<=xi<=109-10^{9}<=x_{i}<=10^{9} , 0<=yi<=w0<=y_{i}<=w ) — coordinates of ii -th polygon point. It is guaranteed that the polygon is non-degenerate.

输出格式

Print the single real tt — the time the pedestrian needs to croos the road and not to be hit by the bus. The answer is considered correct if its relative or absolute error doesn't exceed 10610^{-6} .

输入输出样例

  • 输入#1

    5 5 1 2
    1 2
    3 1
    4 3
    3 4
    1 4
    

    输出#1

    5.0000000000

说明/提示

Following image describes initial position in the first sample case:

首页