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 251 / 263 1100
Travelling Salesman Problem 2 206 / 254 1200
Brewing potion 5 168 / 180 1200
Subsequences counting 136 / 164 1400
Wooden house 97 / 103 1400
Xiangqi 47 / 52 1400
Packing 92 / 101 1500
Permutation counting 66 / 80 1500
Counting tilings 69 / 80 1600
Superstring 34 / 54 1600
Custom keyboard 64 / 75 1800
Mushroom harvesting III 12 / 14 2300