#P5544. [JSOI2016] 炸弹攻击1
[JSOI2016] 炸弹攻击1
Description
The game map can be simply regarded as a two-dimensional plane. JYY has built buildings, and each building is a circle. The center of the -th building is at with radius . There are enemies on the map, and each enemy can be approximated as a point on the plane. The -th enemy is located at . JYY can use a bomb with an adjustable radius: he can set a radius not exceeding , then choose a point on the plane to detonate it, and all enemies within the range are eliminated.
Of course, because the bomb is very powerful, if the explosion range touches JYY's buildings, then JYY's buildings will be damaged. (Note: if the bomb's explosion range only touches the boundary of a building, it will not damage the building; if an enemy appears on the boundary of the explosion range, that enemy is eliminated.) JYY can freely control the detonation position and the explosion radius. As a cautious player, he wants to eliminate as many enemies as possible while ensuring that none of his buildings are damaged at all.
Input Format
The first line contains three non-negative integers: .
The next lines each contain three integers. The -th line gives , describing the position and radius of the -th building. The data guarantees that no buildings intersect (but their boundaries may touch).
The next lines each contain two integers. The -th line gives , describing the position of the -th enemy.
Output Format
Output one line with one integer, representing the maximum number of enemies that JYY can eliminate.
1 5 3
0 0 1
3 3
-3 3
3 -3
3 0
0 3
3
Hint
- For of the data, .
- For another of the data, .
- For another of the data, .
- For of the data, the Constraints are:
- .
- .
- .
- .
Translated by ChatGPT 5
京公网安备 11011102002149号