Module Bitmask DP

Bitmask DP

**Frequency: 5/10** Use a bitmask to represent DP state. One helpful clue to recognize problems suitable for this approach is to look for suspiciously small problem constraints.

Resources

- [USACO: Bitmask DP](https://usaco.guide/gold/dp-bitmasks?lang=cpp)

Problems

Binary board 307 / 319 1100
Travelling Salesman Problem 2 263 / 317 1200
Brewing potion 5 220 / 233 1200
Subsequences counting 171 / 205 1400
Wooden house 129 / 136 1400
Xiangqi 58 / 65 1400
Packing 120 / 135 1500
Permutation counting 85 / 99 1500
Counting tilings 87 / 98 1600
Superstring 44 / 65 1600
Custom keyboard 79 / 89 1800
Mushroom harvesting III 13 / 16 2300