Task: Algorithm to Calculate Number of Intersecting Discs
Task: Algorithm to Calculate Number of Intersecting Discs: a task in Terminal-Lego-15k (Harbor dataset). Given an array A of N integers, we draw N discs in a 2D plane such that the i-th disc has its center at (0, i) and a radius of A i . Two discs k and j intersect if they have at least one common…
The task
Given an array `A` of `N` integers, we draw `N` discs in a 2D plane such that the i-th disc has its center at `(0, i)` and a radius of `A[i]`. Two discs `k` and `j` intersect if they have at least one common point (i.e., the distance between their centers is less than or equal to the sum of their radii).
Part of PrimeIntellect/Terminal-Lego-15k.