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 389 / 402 1100
Travelling Salesman Problem 2 326 / 385 1200
Brewing potion 5 270 / 287 1200
Subsequences counting 214 / 251 1400
Wooden house 169 / 176 1400
Xiangqi 71 / 79 1400
Packing 152 / 172 1500
Permutation counting 109 / 123 1500
Counting tilings 114 / 126 1600
Superstring 57 / 82 1600
Custom keyboard 97 / 107 1800
Mushroom harvesting III 21 / 28 2300