A857.Running Student

普及/提高-

通过率:0%

AC君温馨提醒

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

题目描述

And again a misfortune fell on Poor Student. He is being late for an exam.

Having rushed to a bus stop that is in point (0,0)(0,0) , he got on a minibus and they drove along a straight line, parallel to axis OXOX , in the direction of increasing xx .

Poor Student knows the following:

  • during one run the minibus makes nn stops, the ii -th stop is in point (xi,0)(x_{i},0)
  • coordinates of all the stops are different
  • the minibus drives at a constant speed, equal to vbv_{b}
  • it can be assumed the passengers get on and off the minibus at a bus stop momentarily
  • Student can get off the minibus only at a bus stop
  • Student will have to get off the minibus at a terminal stop, if he does not get off earlier
  • the University, where the exam will be held, is in point (xu,yu)(x_{u},y_{u})
  • Student can run from a bus stop to the University at a constant speed vsv_{s} as long as needed
  • a distance between two points can be calculated according to the following formula:
  • Student is already on the minibus, so, he cannot get off at the first bus stop

Poor Student wants to get to the University as soon as possible. Help him to choose the bus stop, where he should get off. If such bus stops are multiple, choose the bus stop closest to the University.

输入格式

The first line contains three integer numbers: 2<=n<=1002<=n<=100 , 1<=vb,vs<=10001<=v_{b},v_{s}<=1000 . The second line contains nn non-negative integers in ascending order: coordinates xix_{i} of the bus stop with index ii . It is guaranteed that x1x_{1} equals to zero, and xn<=105x_{n}<=10^{5} . The third line contains the coordinates of the University, integers xux_{u} and yuy_{u} , not exceeding 10510^{5} in absolute value.

输出格式

In the only line output the answer to the problem — index of the optimum bus stop.

输入输出样例

  • 输入#1

    4 5 2
    0 2 4 6
    4 1
    

    输出#1

    3
  • 输入#2

    2 1 1
    0 100000
    100000 100000
    

    输出#2

    2

说明/提示

As you know, students are a special sort of people, and minibuses usually do not hurry. That's why you should not be surprised, if Student's speed is higher than the speed of the minibus.
CF9B

首页