← 返回 amazon 的题目列表Maximum Volume of Non-overlapping Tasks
类型:online_judge
You are given three arrays: S (start times), D (durations), and V (volumes). The i-th task starts at S[i], lasts for D[i] units of time, and gains a volume of V[i]. Find a way to select tasks such that the sum of the volumes V[i] is maximized, with the constraint that no two selected tasks overlap in time.
Example
Input
10 5 15 18 30
30 12 20 35 35
50 51 20 25 10