CF73F Plane of Tanks
Description
Vasya plays the Plane of Tanks. The tanks in this game keep trying to finish each other off. But your "Pedalny" is not like that... He just needs to drive in a straight line from point $ A $ to point B on the plane. Unfortunately, on the same plane are $ n $ enemy tanks. We shall regard all the tanks as points. At the initial moment of time Pedalny is at the point $ A $ . Enemy tanks would be happy to destroy it immediately, but initially their turrets are tuned in other directions. Specifically, for each tank we know the initial rotation of the turret $ a_{i} $ (the angle in radians relative to the $ OX $ axis in the counterclockwise direction) and the maximum speed of rotation of the turret $ w_{i} $ (radians per second). If at any point of time a tank turret will be aimed precisely at the tank Pedalny, then the enemy fires and it never misses. Pedalny can endure no more than $ k $ shots. Gun reloading takes very much time, so we can assume that every enemy will produce no more than one shot. Your task is to determine what minimum speed of $ v $ Pedalny must have to get to the point $ B $ . It is believed that Pedalny is able to instantly develop the speed of $ v $ , and the first $ k $ shots at him do not reduce the speed and do not change the coordinates of the tank.
Input Format
The first line contains 4 numbers – the coordinates of points $ A $ and $ B $ (in meters), the points do not coincide. On the second line number $ n $ is given ( $ 1
Output Format
Print a single number with absolute or relative error no more than $ 10^{-4} $ — the minimum required speed of Pedalny in meters per second.