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 236 / 249 1100
Travelling Salesman Problem 2 196 / 240 1200
Brewing potion 5 158 / 169 1200
Subsequences counting 128 / 157 1400
Wooden house 92 / 96 1400
Xiangqi 45 / 49 1400
Packing 86 / 94 1500
Permutation counting 63 / 77 1500
Counting tilings 64 / 75 1600
Superstring 32 / 52 1600
Custom keyboard 60 / 71 1800
Mushroom harvesting III 11 / 13 2300