Woburn Challenge 2016-17 Round 4 - Senior Division

"Parking duty? You probably forgot, but I was top of my class at the
academy."
"Well then, writing one hundred tickets a day should be easy."
"A hundred tickets… I'm not gonna write a hundred tickets. I'm gonna
write two hundred tickets! Before noon!"
Judy Hopps is not pleased about being assigned to parking duty on her first day as an officer of the Zootopia Police Department, but she's still going to give the task her all in order to prove herself.
There are
parking meters within Judy's
assigned area. Representing the area as a Cartesian plane, the
-th
meter is located at coordinates
, and is going to expire
seconds after the start of Judy's shift. No two meters are
at the same location, and the meters are given in strictly increasing
order of expiration time
.
Judy suspects that none of the parked cars' owners will arrive before
their meters expire, but they may move their cars shortly afterwards. As
such, if she can be at a meter's location exactly when it expires,
she'll be able to write a parking ticket for it! Writing a ticket can be
done instantly, so if she's got a fast enough vehicle, she could drive
around to visit all meters at the appropriate points in time, and
end up writing
parking tickets. However, she's going to take it a
little bit easy on her first day – her goal is to write just
parking tickets, meaning that she may skip visiting any single meter of
her choice.
At the start of the day, Judy can request a vehicle of her choice from
the police department to use throughout the day. There are a variety of
vehicles to choose from, with various top speeds, and Judy doesn't want
to take a faster vehicle than she needs to get her job done. As such,
she'd like to determine the minimum possible top speed of a vehicle
which she'd need to be able to write parking tickets throughout
the day. Note that she'll have time before her shift starts to drive to
any initial location of her choice.
In test cases worth of the points,
.
Input Specification
The first line of input consists of a single integer .
lines follow, the
-th of which consists of three space-separated
integers
,
, and
(for
).
Output Specification
Output one line consisting of a single real number, the minimum possible
top speed (in units/second) which would allow Judy to write
parking tickets.
Your answer must have no more than absolute or relative error.
Sample Input
5
10 4 16
14 7 13
20 11 8
23 11 10
24 10 10
Sample Output
1.060660172
Sample Explanation
Using a vehicle with a top speed of units/second,
Judy can drive from the first meter to the second one in exactly
seconds, allowing her to be present for each of their expiration times
and write two parking tickets. She should then proceed directly to the
fourth meter, and then to the fifth one, each with some time to spare.
Using this strategy, she'll be able to write
parking tickets.
Comments