状压DP:超详细一道入门题详解,大家一同进步! [YbtOJ/USACO]
题目链接:
洛谷题目入口
/YbtOJ-高效进阶-状压dp-A.【例题1】 种植方案
解析在代码里:
#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e8;
int m, n, f[13][4097], F[13];
bool field[13][13];
bool state[4097];
// max state: (111111111111)2 =(2^12)10 = (4096)10
int main()
{
原创
2021-07-21 15:13:33 ·
265 阅读 ·
3 评论