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…
考试T2,随便推一推就好了~ code: #include <bits/stdc++.h> #define N 1015 #define mod 998244353 #define ll long long #define setIO(s) freopen(s".in","r",stdin) , freopen(s".out","w",stdout) using namespace std; ll f[N][N&l…
/* 给定一个二行n列的格子,在里面填黑白色,要求通过黑白色将格子分为k块 请问有多少种填色方式 dp[j][k][0,1,2,3] 填到第j列,有k块,第j列的颜色, */ #include<bits/stdc++.h> using namespace std; #define ll long long #define mod 998244353 //0全白,1黑白,2白黑,3黑黑 ll dp[][*][],n,k; int main(){ cin>>n>>k; me…