Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Number of Boomerangs

A boomerang is a tuple of points (i, j, k) where the distance from i to j equals the distance from i to k (order matters). Print the number of boomerangs.

Constraints

1 <= n <= 500 All points are distinct

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.