#P2928. [USACO09HOL] Cattle Bruisers G
[USACO09HOL] Cattle Bruisers G
Description
Canmuu is out for revenge after being utterly defeated by Bessie in paintball and has challenged Bessie to a video game.
In this game, Bessie starts at point in the coordinate grid (; ) at time . She moves continuously with velocity units per second (; ). Thus, at time she will be at point ; at time she will be at .
Unfortunately, Canmuu has sent () cattle bruisers to pursue Bessie. At time , cattle bruiser is at position (; ) with velocity units per second (; ).
Each cattle bruiser carries a "proximity" weapon that can hurt Bessie when the cattle bruiser is no farther than () units from her.
Bessie has a shield to protect herself from these attacks. However, she does not want to waste any of her shield’s power, so she would like to know the maximum number of cattle bruisers within firing range at any (possibly non-integer) time.
To avoid precision errors with real numbers, it is guaranteed that the answer remains the same whether the attack range is decreased to or increased to .
Input Format
- Line : Six space-separated integers: , , , , , .
- Lines to : Line contains four space-separated integers: , , , .
Output Format
- Line : Print a single integer denoting the maximum number of cattle bruisers within attack range at any point in time.
3 1 0 0 0 2
0 -3 0 4
1 2 -1 1
1 -2 2 -1
2
Hint
Bessie starts at point and is moving at units per second in the positive y-direction. There are cattle bruisers; the first starts at point and travels units per second in the y-direction. The maximum distance for a cattle bruiser to be in range of Bessie is unit.
At time , Bessie is at point , and the three bruisers are at points , , and . The first two cattle bruisers are within unit of Bessie, while the third will never be within unit of Bessie, so the maximum achievable number is .
Translated by ChatGPT 5
京公网安备 11011102002149号