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 137 / 144 1100
Travelling Salesman Problem 2 115 / 151 1200
Brewing potion 5 92 / 99 1200
Subsequences counting 69 / 86 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