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 401 / 414 1100
Travelling Salesman Problem 2 336 / 396 1200
Brewing potion 5 279 / 296 1200
Subsequences counting 221 / 258 1400
Wooden house 178 / 185 1400
Xiangqi 72 / 80 1400
Packing 158 / 178 1500
Permutation counting 114 / 127 1500
Counting tilings 118 / 130 1600
Superstring 58 / 83 1600
Custom keyboard 97 / 108 1800
Mushroom harvesting III 21 / 28 2300