I'm looking for an algorithm or data structure to solve the following problem: You are given a set of points S. And you are given Q queries in form of another point. For every query, find the farthest point in the set from the given point.
There are at most 10^5 points in the set and 10^5 queries. All the coordinates for points are in range from 0 to 10^5.
I am wondering if there is a way to store the set of points such that we can answer the queries in O(log n) or O(log^2 n) if necessary.