编程介的小学生 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条)

报告相同问题?

悬赏问题

  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)