2537. Minimum Time to Kill All Monsters

Hard
Array
Dynamic Programming
Bit Manipulation
Bitmask

Description

Hints

Hint 1
Each monster can only have two states. They are either alive or dead.
Hint 2
We can use bitmasks to represent every possible combination of alive and dead monsters.
Hint 3
Let dp[mask] represent the minimum number of days needed to reach the state mask.

Statistics

Acceptance
56.9%
Submissions
3,189
Accepted
1,814