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

Commit 3e4893b

Browse files
Update 1723.find-minimum-time-to-finish-all-jobs.md
1 parent 28629f3 commit 3e4893b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎problems/1723.find-minimum-time-to-finish-all-jobs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ class Solution:
8484
workloads[i] += jobs[pos]
8585
if backtrack(pos + 1, workloads, limit): return True
8686
workloads[i] -= jobs[pos]
87+
# 剪枝
8788
if workload == 0:
8889
return False
8990
return False
9091
def possible(limit):
9192
return backtrack(0, [0] * k, limit)
93+
# 剪枝
9294
jobs.sort(reverse=True)
9395
l, r = jobs[0], sum(jobs)
9496
while l <= r:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /