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 261 / 273 1100
Travelling Salesman Problem 2 217 / 267 1200
Brewing potion 5 178 / 190 1200
Subsequences counting 145 / 175 1400
Wooden house 102 / 109 1400
Xiangqi 51 / 57 1400
Packing 99 / 108 1500
Permutation counting 74 / 88 1500
Counting tilings 77 / 88 1600
Superstring 37 / 57 1600
Custom keyboard 68 / 79 1800
Mushroom harvesting III 13 / 16 2300