← 返回 akunacapital 的题目列表Earliest Completion Date
类型:online_judge
Given each task with two dates (planned, alternate), the tasks are released in the order of the planned dates. Calculate the earliest possible completion date of the tasks. Implement a greedy algorithm to choose the earliest feasible date at each step to complete the tasks.
Example Input
Task List = [(planned1, alternate1), (planned2, alternate2), ..., (plannedN, alternateN)]
Example Output
Earliest Completion Date
Example
Input
[(1, 3), (2, 3), (4, 6)]