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 365 / 377 1100
Travelling Salesman Problem 2 303 / 357 1200
Brewing potion 5 254 / 269 1200
Subsequences counting 201 / 237 1400
Wooden house 157 / 165 1400
Xiangqi 68 / 76 1400
Packing 145 / 164 1500
Permutation counting 105 / 118 1500
Counting tilings 107 / 119 1600
Superstring 56 / 80 1600
Custom keyboard 95 / 105 1800
Mushroom harvesting III 18 / 24 2300