Problem J
Yikes - Bikes!
In recent years the riders in the Tour de France bicycle race have been having problems with dogs running in the road, causing expensive damage to bicycles and serious injuries to riders. In this problem you will take the point of view of a dog named Max. Just as the peloton approaches, Max notices a juicy rabbit in the field on the opposite side of the road. He decides to make a dash across the road. Your task is to determine if Max will safely cross the road if he begins his dash at a given time.
The road is ten meters wide and straight in this part of the
country. Max’s dash will be in a straight line at ninety
degrees to the road’s center line. He will run at a constant
speed of
All the cyclists are in single file racing down the center
line of the road, all at the same speed,
Assume that at
![\includegraphics[width=0.8\textwidth ]{RabbitRacea}](/problems/yikes/file/statement/en/img-0001.png)
Input
Input begins with a positive integer
Then, follows four lines for each problem set, each line containing one value as follows:
-
a real number
( ) giving Max’s speed in meters per second, then -
a real number
( ) giving the speed of the cyclists in meters per second, then -
a real number
( ) giving the distance in meters between the front of the lead bicycle at and the line that Max will use to dash across the highway -
a real number
( ) giving the start time in seconds of Max’s dash
The real values are given with at most
Output
For each problem set output a single line giving one of the
phrases, “Max beats the first bicycle”, “Max crosses safely
after bicycle
You may assume that increasing or decreasing the value of
Sample Input 1 | Sample Output 1 |
---|---|
3 5.0 5.0 5.0 0.0 5.0 5.0 6.3 0.0 5.0 5.0 0.0 5.9 |
Collision with bicycle 1 Max beats the first bicycle Max crosses safely after bicycle 9 |