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 182 / 196 1100
Travelling Salesman Problem 2 156 / 195 1200
Brewing potion 5 121 / 129 1200
Subsequences counting 92 / 115 1400
Wooden house 71 / 74 1400
Xiangqi 29 / 31 1400
Packing 63 / 70 1500
Permutation counting 38 / 45 1500
Counting tilings 47 / 58 1600
Superstring 20 / 35 1600
Custom keyboard 47 / 57 1800
Mushroom harvesting III 7 / 8 2300