Running to the Bus

Problem #5

Tags: motion advanced

Who solved this?

No translations... yet

Little Zhores after spending few weeks at his Granny's village home, is now to return back to city. As we remember from the task #1 he need to travel by bus to the railway station first.

So he bid farewell to Grandma and cheerfully started over the large field towards the road. At some moment he noticed the bus, speeding along the road in the clouds of sunlit dust. He is curious whether he will catch this bus, running as swiftly as he can.

Regard the field as cartesian plane with the road on the X axis. The boy has spotted the bus when wehicle was at some point (P, 0) and travels with speed V. Boy's sprint-running speed is W. And we want to figure out the shape of the zone, from which he can reach the bus.

For this you need to create formula which, given values for P, V, W and also X, Y - boy's own position at the moment of spotting the bus, will result in positive value if the bus can be reached or negative if running is hopeless. X and Y are both non-negative to simplify the matter. And of course the bus is faster than the boy.

For numeric example:

V = 10 (meters per second)
W = 4
P = -50
X = 100
Y = 60

In this case it is obvious that Zhores can run straight perpendicularly to the road and he'll be just in time. As a sidenote - it is a village bus in the middle of 20s century, so it has no restriction of picking passengers only at stations. It actually has no closing doors, so anyone can jump in and out quite carelessly.

source: Savchenko

You need to login to get test data and submit solution.