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 141 / 149 1100
Travelling Salesman Problem 2 117 / 154 1200
Brewing potion 5 94 / 101 1200
Subsequences counting 71 / 88 1400
Wooden house 56 / 57 1400
Xiangqi 19 / 21 1400
Packing 48 / 55 1500
Permutation counting 28 / 33 1500
Counting tilings 35 / 42 1600
Superstring 11 / 22 1600
Custom keyboard 26 / 35 1800