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 166 / 179 1100
Travelling Salesman Problem 2 145 / 182 1200
Brewing potion 5 116 / 124 1200
Subsequences counting 90 / 111 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 42 / 52 1800
Mushroom harvesting III 6 / 6 2300