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 215 / 228 1100
Travelling Salesman Problem 2 179 / 219 1200
Brewing potion 5 141 / 150 1200
Subsequences counting 109 / 138 1400
Wooden house 81 / 84 1400
Xiangqi 39 / 43 1400
Packing 75 / 83 1500
Permutation counting 50 / 64 1500
Counting tilings 54 / 66 1600
Superstring 26 / 44 1600
Custom keyboard 52 / 64 1800
Mushroom harvesting III 7 / 9 2300