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 98 / 105 1100
Travelling Salesman Problem 2 89 / 116 1200
Brewing potion 5 67 / 71 1200
Subsequences counting 48 / 57 1400
Wooden house 37 / 38 1400
Xiangqi 9 / 12 1400
Packing 33 / 38 1500
Permutation counting 21 / 25 1500
Counting tilings 28 / 34 1600
Superstring 8 / 18 1600
Custom keyboard 18 / 27 1800