直接动态规划o(nm)
f[i][j] = f[i - 1][j] + f[i][j - 1], 当i,j不同时为奇数时;
#include <iostream>
using namespace std;
int f[35][35];
int main(){
int n, m;
cin >> n >> m;
f[0][1] = 1;
for (int i = 1; i <= n; i ++){
for (int j = 1; j <= m; j++){
if (j & 1 | i & 1)
f[i][j] = f[i - 1][j] + f[i][j - 1];
}
}
cout << f[n][m] << endl;
return 0;
}