Ivan’s disqualification (1)

Ivan is participating in the ACM-ICPC World Finals in Ekaterinburg. As
usual, Ivan is trolling, so he is going to be disqualified. However, the
guys of the organization must first reach him. Ivan is trying to escape
in the spectators zone, which for simplicity we consider a
circumference. Ivan is located at an angle of α degrees with respect to
the center of the circunference, while the n guys are located at angles
α₁, …, α_(n). Ivan has a maximum angular speed of i degrees per second,
while the n guys have all a maximum angular speed g.

How many second will it take any of the guys of the organization to
reach Ivan? Suppose that Ivan tries to maximize this time, while the
guys coordinate to try to minimize it. At every moment, everyone can
move in any direction (left or right), but never exceding his maximum
speed. When calculating, treat averybody as a point.

Input

Input consists of several cases, each with i, g, α, n, α₁, …, α_(n). All
numbers are integers. The speeds are between 1 and 1000, the angles
between 0 and 359, and n between 1 and 1000.

Output

For every case, print the time of Ivan’s disqualification with four
digits after the decimal point. Print “never” if this will never happen.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T11:41:00.276Z

© Jutge.org, 2006–2026.
https://jutge.org
