Grand Finale: Circles

Geometric feasibility problem (repository label: "Grand Finale: Circles"; exact external contest/source identity is not established in this repository text).

Input arg1 is a flat array encoding n circles as triples [x1, y1, r1, x2, y2, r2, ...] in order. Each triple (xi, yi, ri) is a circle with center (xi, yi) and radius ri.

Return the maximum radius r (a real number) of a circle that can be placed entirely inside the intersection of all given circles. Equivalently, there exists a point P with dist(P, (xi, yi)) <= ri - r for every circle.

Contract

  • Output is a number. Absolute or relative tolerance of 1e-7 class is appropriate for floating-point comparison when the platform applies numeric tolerance.
  • The intersection is feasible for the intended inputs; answers should reflect the true maximum feasible radius.
Examples
Input: [1,2,3]
Output: 3
Hints

Grand Finale: Circles

Geometric feasibility problem (repository label: "Grand Finale: Circles"; exact external contest/source identity is not established in this repository text).