编程介的小学生 2017-08-23 02:27 采纳率: 20.5%
浏览 680
已采纳

Pie Bridge

It is the Valentine's day! Yue Lao decides to have a meeting for the magpies to construct the pie bridge(magpie bridge). There are N magpies in the sky. In order to hold a meeting, Yue Lao should make all the magpies at the same place in the same time.

A magpie can be consider as a dot in the 2d-plane. Initially, all the magpies stay still in some place. The only instruction Yue Lao can do is to push a magpie. Yue Lao can push a magpie in any direction. After Yue Lao pushs a magpie, the magpie starts moving in that direction with a constant speed. Yue Lao's power is limited, so there is a limit for the speed of the magpie: the horizontal speed can't exceed vx and the vertical speed can't exceed vy.

Yue Lao can push a magpie at most once. Besides, Yue Lao can't push magpies too often. After a push, he needs to rest at least t seconds for the next push. When two magpies meet at the same point, they will not collide with each other and will stay moving or stay still.

Now the question is, what is the minumum time it needs to take for Yue Lao to achieve his goal (make all the magpies moves to the same place at the same time)?

Input

There are multiple test cases. There are two parts for each case. The first part is one line with four integers N, vx, vy and t (2 <= N <= 9, 0 < vx, vy <= 100, 0 <= t <= 100), represent the number of magpies, the horizontal speed limit, the vertical speed limit, and the time interval Yue Lao needs to rest between two pushes. The second part consists with N lines. Each line consists of two integers xi and yi (-1000000 <= xi, yi <= 1000000), represent the coordinate for the ith magpie. There will not be two different magpies in the same point initially.

Output

The output of each test case should be a single line, the minimum time for Yue Lao to achieve his goal. All result that have relative or absolute error less than 1E-6 will be accepted.

Sample Input

2 1 1 1
0 0
0 7
Sample Output

4.000000000000000

  • 写回答

2条回答

  • threenewbee 2017-08-27 14:51
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件