Find Nearest Point That Has the Same X or Y Coordinate

给一个点的数组和x,y, 求横坐标或者竖坐标相等的最小距离的点.