D. Bicolorings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a grid, consisting of $$$2$$$ rows and $$$n$$$ columns. Each cell of this grid should be colored either black o…
[链接] 我是链接,点我呀:) [题意] 题意 [题解] dp[i][j][k]表示前i列,有j个联通块下,最后一列的状态为k的方案数 k如果为1的话,表示最后一列两个块不一样,k如果为0表示一样 枚举最后一列的情况转移就好 [代码] #include <bits/stdc++.h> using namespace std; const int maxn=1100; const long long mod=998244353; #define ll long long #define mem(…