Rescuer
Tag(s):

Algorithms, Easy-Medium

Problem
Editorial
Analytics

Today is a very hot day for rescuer Bob. And right now he's just noticed new sinking drunk man in the sea! Let's assume that resort is Euclidean plane and the shoreline is y=0 line. The sea is everything above y=0. And respectively everything below y=0 is a beach. The Bob's speed on the land equals to v1, and his speed while swimming equals to v2.

Now Bob is at point (x1, y1) and the sinking man is at point (x2, y2). What is the minimum time Bob need to get to the poor fellow and rescue his life?

In one test file you have to handle T test cases.

Constraints

T <= 100
-109 <= x1, x2, y1, y2, v1, v2 <= 109
y1 < 0
y2, v1, v2 > 0

Input

The first line contains one integer T denoting the number of test cases. The following T lines describe test cases.

The first and the only line of each test case contains 6 space-separated integers: x1, y1, x2, y2, v1, v2

Output

Output the minimum required time with exactly 5 digits after decimal point.

SAMPLE INPUT
1
3 -20 3 25 40 5

SAMPLE OUTPUT
5.50000

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, Visual Basic

CODE EDITOR

Initializing Code Editor...

Contributor

Challenge Name

September Circuits

OTHER PROBLEMS OF THIS CHALLENGE
• Basic Programming > Implementation
• Basic Programming > Implementation
• Data Structures > Arrays
• Algorithms > String Algorithms
• Math > Number Theory