Problem 1779 · Easy
Find the nearest point sharing x or y with the reference point, breaking ties by input index.
Open the interactive visualisation