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 301 / 313 1100
Travelling Salesman Problem 2 256 / 309 1200
Brewing potion 5 211 / 223 1200
Subsequences counting 164 / 197 1400
Wooden house 121 / 129 1400
Xiangqi 57 / 63 1400
Packing 117 / 131 1500
Permutation counting 83 / 97 1500
Counting tilings 84 / 95 1600
Superstring 44 / 65 1600
Custom keyboard 77 / 87 1800
Mushroom harvesting III 13 / 16 2300