This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/6_Plat/DP_Bitmasks.mdx
2020-06-26 17:12:04 -04:00

47 lines
No EOL
1.7 KiB
Text

---
id: dp-bitmasks
title: "Dynamic Programming on Bitmasks"
author: Michael Cao
prerequisites:
- Bit Operations
- Gold - Introduction to Dynamic Programming
description: DP problems that require iterating over subsets.
frequency: 2
---
import { Problem } from "../models";
export const metadata = {
problems: {
general: [
new Problem("CSES", "Hamiltonian Flights", "1690", "Easy", false, ["Bitmasks"], ""),
new Problem("CSES", "Elevator Rides", "1653", "Normal", false, ["Bitmasks"], ""),
new Problem("ojuz", "IZhO Bank", "IZhO14_bank", "Normal", false, ["Bitmasks"], ""),
new Problem("YS", "Max Indep Set", "maximum_independent_set", "Hard", false, ["Bitmasks", "Meet in Middle"], ""),
],
}
};
<info-block title="Pro Tip">
Although this has not been the solution to any platinum problem, you can frequently use this for subtasks.
</info-block>
## Tutorial
- [PAPS 9.4](https://www.csc.kth.se/~jsannemo/slask/main.pdf)
- CPH 10 (Bit manipulation), 19.2 (Hamiltonian Paths)
- [Dynamic Programming Over Subsets (Codeforces)](https://codeforces.com/blog/entry/337)
- [Dynamic Programming and Bit Masking (HackerEarth)](https://www.hackerearth.com/practice/algorithms/dynamic-programming/bit-masking/tutorial/)
## Problems
<problems-list problems={metadata.problems.general} />
- [Old Gold - Moovie Mooving](http://www.usaco.org/index.php?page=viewproblem2&cpid=515)
- [AC Matching](https://atcoder.jp/contests/dp/tasks/dp_o)
- [CF Square Subsets](https://codeforces.com/contest/895/problem/C)
- [CF Guards in the Storehouse](https://codeforces.com/problemset/problem/845/F)
- [Kattis Cat & Mice](https://open.kattis.com/problems/catandmice) [](66)
- plus a bit of geometry