← 返回 microsoft 的题目列表Delivery Completion Time Calculation
类型:online_judge
microsoft
Given several delivery guys and their available time intervals, along with employee working hours. A delivery guy can only deliver gifts when employees are in the office and each delivery guy can deliver one gift per hour. Calculate the minimum time required to complete all deliveries. If it cannot be completed in a single day, it can be continued on the next day. Implement a function to solve this problem. Input: available time intervals for delivery guys, employee working hours, and n representing the number of delivery guys. Output: the earliest time by which all deliveries are completed.
Example:
Input:
intervals = [[9,10], [11,15], [9,17]]
n = 2
Output:
12
Example
Input
9 10
11 15
9 17
2