随笔分类 - 菜鸡刷题笔记-状压dp
摘要:链接: https://codeforces.com/contest/1209/problem/E2 题意: This is a harder version of the problem. The difference is only in constraints. You are given a
阅读全文
摘要:链接:https://www.luogu.org/problemnew/show/P1896 题意: 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子。 思路: 状压dp,dp[i][j][k]。表示
阅读全文
摘要:链接:https://vjudge.net/problem/POJ-3254#author=freeloop 题意: 农场主John新买了一块长方形的新牧场,这块牧场被划分成M行N列(1 ≤ M ≤ 12; 1 ≤ N ≤ 12),每一格都是一块正方形的土地。John打算在牧场上的某几格里种上美味的
阅读全文