Hide

Problem G
Missile Defense

You’ve been asked to write software to help launch anti-missile rockets in order to defend from the impending nuclear missiles coming from North Korea. You’ve decided to use a simple 2-dimensional model, with the launch site of the missile located on the $x$ axis at $(x_ m, 0)$ and your anti-missile launch site at $(x_ a,0)$ (all values in feet). You also know the initial $x$ and $y$ velocities of the missile at the moment of launch: $v_ x$ and $v_ y$ (in feet per second). Given this information, you know that if the missile is launched at time $0$ then the location of the missile at any later time $t$ is given by

\[ (x_ m + v_ xt, v_ yt - 16t^2) \]

The image below shows one possible trajectory for the missile and the anti-missile. Note that the missile’s trajectory is a parabola while the anti-missile’s trajectory is a straight line. Also note in this scenario that $v_ x$ is negative ($v_ y$ will always be positive).

\includegraphics[width=0.9\textwidth ]{missile.png}

President Donald Trump wants to be able to destroy the missile at a specific time $t_ K$. Your job is to decide when to shoot your anti-missle and at what angle $\alpha $ so that you intercept the enemy’s missile at that time. To aid in your calculations you also know the velocity of your anti-missile along its trajectory, $v_ a$. Note that it might be impossible to destroy the missile at time $t_ K$, either because you would have had to shoot your anti-missile before the North Koreans’ missile is launched, or because the missile would have already landed (and blown up) prior to or at time $t_ K$. If that’s the case, your software should sound an alarm so that everyone can start running.

Input

Input consists of a single line containing six integers: $x_ m$ $v_ x$ $v_ y$ $x_ a$ $v_ a$ $t_ K$, where $0 < v_ y, v_ a, t_ K \leq 10\, 000$, $-10\, 000\leq x_ m, v_ x, x_ a \leq 10\, 000$ and $x_ m \neq x_ a$.

Output

If it is impossible to destroy the missile at the requested time, display the phrase start running. Otherwise, display two values $t_ L$ $\alpha $, where $t_ L$ is the time to launch your anti-missile and $\alpha $ is the launch angle (in degrees). Both values should have a maximum relative or absolute error of $10^{-4}$.

Sample Input 1 Sample Output 1
5000 -100 400 1000 500 20
14.87750061 38.65980825
Sample Input 2 Sample Output 2
5000 -100 400 1000 500 30
start running

Please log in to submit a solution to this problem

Log in