Hide

Problem L
PUBNite

Recently, Anthony has really gotten into the battle royale games. His favorite game is PUBNite.

In PUBNite, many players fight against each other and try to be the last one alive. One of the most well-known mechanics in PUBNite is the safety zone, which is a circular area. Players outside of the safety zone will take one damage per second continuously.

In PUBNite the safety zone is shrinking at the start of the game. The safety zone is centered at coordinate (xs,ys) and has an initial radius of ri meters. The radius is decreasing at a constant and continuous rate of ss m/s (meters per second) and will stop decreasing once it’s no more than rf meters. Anthony is initially located at coordinate (xa,ya) and can run at a maximum speed of sa m/s. What is the minimum amount of damage that Anthony will take assuming the safety zone never shrinks again after its radius is no more than rf?

Input

The first line of the input contains integers xs,ys,ss,ri,rf. You are guaranteed that |xs|,|ys|109, 0<ss109, and 0<rfri109.

The second line of the input contains integers xa,ya,sa. You are guaranteed that |xa|,|ya|109 and 0<sa109.

Output

A single number d denoting the minimum amount of damage Anthony will take. You are required to output d with absolute precision 106.

Sample Input 1 Sample Output 1
2 1 1 3 2
2 5 1
2.000000
Sample Input 2 Sample Output 2
2 1 1 3 2
2 4 1
0.000000
Hide

Please log in to submit a solution to this problem

Log in