#P1033. [NOIP 2002 提高组] 自由落体
[NOIP 2002 提高组] 自由落体
Description
On a ceiling of height , there are balls with negligible size, located at positions . On the ground there is a cart (length , height ) at a distance from the origin. The falling distance of a ball is given by , where and is the falling time. The cart moves forward at speed .
As shown in the figure:

The cart and all balls start moving at the same time. When the distance between a ball and the cart is (thanks to Silver_N for the correction), the ball is considered caught by the cart. A ball cannot be caught after it has reached the ground.
Please compute how many balls the cart can catch.
Source: NOIP 2002 Senior, Problem 3.
Input Format
A single line contains six integers .
Constraints: .
Output Format
Output a single integer: the number of balls the cart can catch.
5.0 9.0 5.0 2.5 1.8 5
1
Hint
If a ball falls into the rear end of the cart, it is considered to have fallen into the cart.
Translated by ChatGPT 5
京公网安备 11011102002149号