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 209 / 256 1200
Brewing potion 5 170 / 182 1200
Subsequences counting 138 / 167 1400
Wooden house 97 / 103 1400
Xiangqi 47 / 52 1400
Packing 93 / 102 1500
Permutation counting 67 / 81 1500
Counting tilings 69 / 80 1600
Superstring 34 / 54 1600
Custom keyboard 64 / 75 1800
Mushroom harvesting III 12 / 14 2300