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 392 / 405 1100
Travelling Salesman Problem 2 327 / 387 1200
Brewing potion 5 271 / 288 1200
Subsequences counting 215 / 252 1400
Wooden house 172 / 179 1400
Xiangqi 72 / 80 1400
Packing 154 / 175 1500
Permutation counting 109 / 123 1500
Counting tilings 115 / 127 1600
Superstring 57 / 82 1600
Custom keyboard 97 / 107 1800
Mushroom harvesting III 21 / 28 2300