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 194 / 207 1100
Travelling Salesman Problem 2 166 / 205 1200
Brewing potion 5 130 / 138 1200
Subsequences counting 98 / 126 1400
Wooden house 77 / 79 1400
Xiangqi 31 / 34 1400
Packing 68 / 76 1500
Permutation counting 44 / 56 1500
Counting tilings 49 / 61 1600
Superstring 21 / 36 1600
Custom keyboard 48 / 58 1800
Mushroom harvesting III 7 / 8 2300