| Online MIPT programming contest | РУССКИЙ |
| <PREV Problem: | NEXT> |
< |
|---|
Time limit = 2 seconds
Memory limit = 8 Mb
Peter is at the point A of primeval forest. He wants to reach point B in the fastest way. There is a straight path in the forest. Peter can go through the forest with a speed of 5 km/h, and through the path with a speed of 5*sqrt(2) km/h. You are to calculate the time, it will take Peter to get the point B.Input
Input contains 8 numbers, separated with spaces and new lines. They are the co-ordinates of the points A и B
and the co-ordinates of the two different points of the path.
XA YA XB YB X1 Y1 X2 Y2All the numbers are not greater than 1000
Output The time in hours with two digits accuracy.
Input#10 1 0 -1 -1 0 1 0 |
Output#10.40 |
Author:
Barsky Eugene, IV MIPT Olympiad
11 april 2004
© acm.mipt DevGroup The page was generated in 370ms |