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 209 / 222 1100
Travelling Salesman Problem 2 176 / 215 1200
Brewing potion 5 138 / 147 1200
Subsequences counting 106 / 136 1400
Wooden house 80 / 82 1400
Xiangqi 37 / 41 1400
Packing 73 / 81 1500
Permutation counting 49 / 63 1500
Counting tilings 52 / 64 1600
Superstring 26 / 43 1600
Custom keyboard 52 / 64 1800
Mushroom harvesting III 7 / 9 2300