Skip to content

Commit c3e8273

Browse files
authored
Update minimum-number-of-work-sessions-to-finish-the-tasks.cpp
1 parent f2836b4 commit c3e8273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-number-of-work-sessions-to-finish-the-tasks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Solution2 {
3333
// dp[mask][0]: min number of sessions by choosing tasks in mask bitset
3434
// dp[mask][1]: min used time of last session by choosing tasks in mask bitset
3535
vector<pair<int, int>> dp(1 << size(tasks), pair(numeric_limits<int>::max(), numeric_limits<int>::max()));
36-
dp[0] = {1, 0};
36+
dp[0] = {0, sessionTime};
3737
for (int mask = 0; mask < size(dp) - 1; ++mask) {
3838
int basis = 1;
3939
for (const auto& task : tasks) {

0 commit comments

Comments
 (0)