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 165 / 178 1100
Travelling Salesman Problem 2 140 / 178 1200
Brewing potion 5 114 / 122 1200
Subsequences counting 89 / 110 1400
Wooden house 68 / 71 1400
Xiangqi 28 / 30 1400
Packing 60 / 67 1500
Permutation counting 34 / 40 1500
Counting tilings 45 / 56 1600
Superstring 18 / 32 1600
Custom keyboard 41 / 52 1800
Mushroom harvesting III 4 / 4 2300