Integers are arrays of bits. Once you see them that way, subset enumeration, DP over masks, and a lot of “clever” tricks become routine.
- General — the operator zoo, two’s complement, common idioms
- Bit Operations — set/clear/toggle/test, lowbit, popcount
- Builtin Bit Functions —
__builtin_*and C++20<bit> - Enumerating Submasks
- Enumerating Supermasks
- Subset DP
- SOS DP (Sum over Subsets)
- Bitset Optimization
- XOR / Linear Basis
See also: Bitmask DP · FWHT · Binary Trie