传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1088 简单的状压dp(话说本题的编号减1,即1087,也是一道状压dp),不解释. #include <cstdio> const int maxn = 10005; int n, b[maxn]; long long f[maxn][8]; int main(void) { scanf("%d", &n); for (int i = 1; i <= n…
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1088 记录下每一个格子对应左边格子放的雷的情况,然后dp转移就好了. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; int inline readint(){ int Num;char ch; '; +ch-';…