Write a program to test their experimental drop-dodging strategy. Your program will read in successive positions of the `person', together with the positions (x-coordinates) of all the raindrops at a height of 5 metres above the ground at that time, and determine how many raindrops ultimately hit the person. Raindrops fall at a constant rate of 1 metre per second.
Input will consist of a series of scenarios, each scenario consisting of a series of lines. Each line will give the data at one second intervals. The first value on a line gives the position of the front of the `person' along the track, the remaining values give the positions (in increasing order) of the new raindrops which have been detected at the 5m height. Two drops will never have the same height and position. All positions are given to the nearest cm (0.01 m). Each line is terminated by the number -1.00. You can assume all drops are at the 5m height at the start of the second when they are first detected, and fall at 1m per second. Each scenario will be terminated by a line containing the single value 10.00, indicating that the `person' has reached the end of the track. The entire file will be terminated by -1.00.
Output will consist of a series of lines, one for each scenario, each containing the number of raindrops that hit the `person'.
0.00 1.05 3.06 5.81 7.93 9.91 -1.00 2.10 1.87 4.21 6.83 8.76 -1.00 1.63 2.44 6.17 8.13 9.45 -1.00 8.25 2.83 3.61 4.77 5.56 7.31 8.11 9.23 9.84 -1.00 10.00 -1.00