#P10913. [蓝桥杯 2024 国 B] 套手镯
[蓝桥杯 2024 国 B] 套手镯
Problem Description
Xiaolan discovered a bracelet nesting game at the LQ market. On a rectangular plane of size , there are circular bracelets placed. The player can place a rectangular frame of size on this plane (the player may only place the frame horizontally/vertically, meaning the frame can be rotated by degrees, but cannot be rotated to any other angle). The bracelets located inside this rectangular frame are the player’s reward.
You can view this rectangular plane as a 2D coordinate system, with the bottom-left corner at . The thickness of the bracelets and the frame can be ignored, and multiple bracelets are allowed to overlap.
Xiaolan wants to try once. What is the maximum number of bracelets he can obtain?
Input Format
The first line contains three integers , , and .
Then follow lines, each containing three integers , representing the center coordinates and radius of the -th bracelet.
Output Format
Output one integer representing the answer.
8 12 9
18 22 1
3 17 2
21 28 1
7 18 2
10 2 2
4 24 2
19 13 1
14 15 1
3
Hint
Sample Explanation

The figure above shows one possible answer.
Test Case Size and Constraints
For of the testdata: , .
For of the testdata: , , . It is guaranteed that all bracelets are inside the plane.
Translated by ChatGPT 5