#includeusing namespace lastweapon; const int N = int(1e2) + 9; Int f[2][N][N][N]; int n, m; int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); #endif RD(n, m, MOD); int p = 0, q = 1; f[p][0][1][1] = 1; #define u f[q][kk][ii][jj] REP_1(a, n-1) { swap(p, q); RST(f[p]); REP(kk, min(a, m+1)) REP_1(ii, a) REP_1(jj, a) if (u) { REP_1(i, a+1) REP_1(j, a+1) { int k = kk + ((i > ii) && (j > jj) || (i <= ii) && (j <= jj)); f[p][k][i][j] += u; } } } Int z = 0; REP_1(i, n) REP_1(j, n) z += f[p][m][i][j]; cout << z << endl; }
月度归档:2022年12月
233
your code here
your code here
[code lang=”js”]your code here[/code]
[sourcecode language=”plain”]your code here[/sourcecode]