There are N points and M segments, the ith point is located at p[i] and the ith segment's size is s[i]. What is the maximum number of points that can be covered by these segments?
My current solution is O(N * 2^M * logN). Is there any better solution?