Huawei OD machine test real questions] Maximize control of resource costs (python) 100% pass rate super detailed code comment code interpretation

[Huawei OD machine test real questions 2022&2023] real test catalog @click here @
[Huawei OD machine test real questions] signal transmission and reception & trial reading & @click here @
[Huawei OD machine real test questions] rent a car to ride the greenway & trial reading & @点here@

Maximize resource cost control

topic description

The company's innovation laboratory is studying how to minimize resource costs and maximize resource utilization. Please design an algorithm to help them solve a task mix problem: there are taskNum tasks, and each task has a start time (startTime) and an end time (endTime) ), parallelism (parallelism) three attributes, parallelism refers to the number of servers that will be occupied when the task is running, a server can be used by any task at each moment but is occupied by one task at most, and the task will be released immediately after running ( The end time is not occupied). The task mixing problem refers to given a batch of tasks, let this batch of tasks be assigned by

Guess you like

Origin blog.csdn.net/weixin_45541762/article/details/130914748