Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf861c8

Browse files
authored
Improved task 2895
1 parent7e7714a commitbf861c8

File tree

1 file changed

+8
-2
lines changed
  • src/main/java/g2801_2900/s2895_minimum_processing_time

1 file changed

+8
-2
lines changed

‎src/main/java/g2801_2900/s2895_minimum_processing_time/readme.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ Hence, it can be shown that the minimum time taken to execute all the tasks is 1
3232

3333
**Explanation:**
3434

35-
It's optimal to assign the tasks at indexes 1, 4, 5, 6 to the first processor which becomes available at time = 10, and the tasks at indexes 0, 2, 3, 7 to the second processor which becomes available at time = 20. Time taken by the first processor to finish execution of all tasks = max(10 + 3, 10 + 5, 10 + 8, 10 + 4) = 18. Time taken by the second processor to finish execution of all tasks = max(20 + 2, 20 + 1, 20 + 2, 20 + 3) = 23. Hence, it can be shown that the minimum time taken to execute all the tasks is 23.
35+
It's optimal to assign the tasks at indexes 1, 4, 5, 6 to the first processor which becomes available at time = 10, and the tasks at indexes 0, 2, 3, 7 to the second processor which becomes available at time = 20.
36+
37+
Time taken by the first processor to finish execution of all tasks = max(10 + 3, 10 + 5, 10 + 8, 10 + 4) = 18.
38+
39+
Time taken by the second processor to finish execution of all tasks = max(20 + 2, 20 + 1, 20 + 2, 20 + 3) = 23.
40+
41+
Hence, it can be shown that the minimum time taken to execute all the tasks is 23.
3642

3743
**Constraints:**
3844

3945
*`1 <= n == processorTime.length <= 25000`
4046
* <code>1 <= tasks.length <= 10<sup>5</sup></code>
4147
* <code>0 <= processorTime[i] <= 10<sup>9</sup></code>
4248
* <code>1 <= tasks[i] <= 10<sup>9</sup></code>
43-
*`tasks.length == 4 * n`
49+
*`tasks.length == 4 * n`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp