//
// Created by ToroLHZ on 2022/3/20.
//
#include<bits/stdc++.h>
using namespace std;
//数转为8位2进制数
string dtox(int digital,int r) {string result="";const char s[37]="0123456789abcdefghijklmnopqrstuvwxyz";if(digital==0) {return "0";}while(digital!=0) {int tmp =digital%r;result+=s[tmp];digital/=r;}while(result.length()<8){result+=s[0];}reverse(result.begin(),result.end());return result;
}
typedef long long ll;
ll n, m, k;
const ll N = 105, M = 70, K = 25;
ll mod = 1e9 + 7;
ll dp[N][M][M][K];
ll ans;
//dp(i,a,b,c):已经放好i-1行,第i-2行的状态是a,第i-1行的状态是b,已经放了c个
ll get_count(ll b) {//b为二进制数中1的个数ll sum = 0;while (b) {sum++;b = b - b & -b;}return sum;
}
ll sove() {ll i, j;ll a, b, c, d;for (i = 1; i <= m; i++) {//将每一行看作一个二进制数,1表示有,0表示无for (a = 0; a < 1 << n; i++) {for (b = 0; b < 1 << n; b++) {//查看二进制表示的位置下a和b会不会互相攻击到if (b & (a << 2) || a & (b << 2)) continue;for (c = 0; c < 1 << n; c++) {if (c & (a << 2) || a & (c << 2))continue;if (c & (b << 1) || b & (c << 1))continue;
// i-2:c
// i-1:a
// i:b;t//i-1行棋子数量ll t = get_count(b);//第i行b状态t个棋子,i-1为a情况下,i-2为c状态;//i-1行使用j-t个棋子各种状态的数量总和for (j = t; j <= k; j++) {dp[i][a][b][j] = (dp[i][a][b][j] + dp[i - 1][c][a][j - t]) % mod;}}}}}
}int main() {ll i, j;ll a, b, c, d;cin >> n >> m >> k;//n行m列dp[0][0][0][0] = 1;//代码处理时将行列做了互换,行数较小,转二进制方便处理sove();for (a = 0; a < 1 << n; a++) {for (b = 0; b < 1 << n; b++) {ans = (ans + dp[m][a][b][k]) % mod;}}cout << ans << endl;return 0;
}
//链接:https://www.acwing.com/activity/content/code/content/1230867/
//来源:AcWing
//著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
内容为对别人代码的理解,