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 158 / 170 1100
Travelling Salesman Problem 2 134 / 172 1200
Brewing potion 5 109 / 117 1200
Subsequences counting 83 / 103 1400
Wooden house 66 / 68 1400
Xiangqi 27 / 29 1400
Packing 55 / 63 1500
Permutation counting 30 / 36 1500
Counting tilings 44 / 55 1600
Superstring 14 / 28 1600
Custom keyboard 38 / 48 1800
Mushroom harvesting III 4 / 4 2300