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 405 / 418 1100
Travelling Salesman Problem 2 340 / 400 1200
Brewing potion 5 281 / 298 1200
Subsequences counting 222 / 260 1400
Wooden house 181 / 188 1400
Xiangqi 73 / 81 1400
Packing 158 / 178 1500
Permutation counting 115 / 128 1500
Counting tilings 118 / 130 1600
Superstring 58 / 83 1600
Custom keyboard 98 / 109 1800
Mushroom harvesting III 21 / 28 2300