Covering Points with Circles
From Codeforces. Geometry. Solve the geometry problem "Covering Points with Circles".
Examples
Input: [1,0,0,2,3,4,6,6,9,8,12]
Output: 5
Input: [2,3,5,5,8,7,11,9,14,11,17,13,20]
Output: 6
Hints
Circles cannot overlap (but may touch), centers must be integer, radius fixed at r. Only need ≥89% coverage, not all points. Points are uniformly random in a rectangle.
Use honeycomb (hexagonal) grid packing — the densest circle packing in plane. Map each point to nearest integer grid center as lattice point. Collect unique centers and output them.
Since circle area ≤ 1/10 of rectangle area, hex packing covers ~90.7% of plane. Integer rounding of centers is fine due to loose tolerance. No need to minimize circle count.
Covering Points with Circles
**From Codeforces.** Geometry. Solve the geometry problem "Covering Points with Circles".