← 返回 uber 的题目列表Lamp Control Points
类型:online_judge
uber
Given lamps located on a number line, the task is to find the points which cover the maximum number of segments for each lamp and simultaneously record the index of segments listed by control points that are exhausted. Return an array of results for each point on the number line where the index corresponds to the number of covered segments.
Example
Input: Lamps: [3, 5, 7] Control Points: [10, 12, 15]
Output: [1, 0, 3]
Example
Input
lamps=[1, 3, 5]
points=[2, 4, 6]