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 298 / 310 1100
Travelling Salesman Problem 2 253 / 307 1200
Brewing potion 5 206 / 218 1200
Subsequences counting 163 / 196 1400
Wooden house 119 / 127 1400
Xiangqi 57 / 63 1400
Packing 116 / 130 1500
Permutation counting 83 / 97 1500
Counting tilings 84 / 95 1600
Superstring 44 / 65 1600
Custom keyboard 77 / 87 1800
Mushroom harvesting III 13 / 16 2300