dp,有点懂也有点不懂,晕.....
code:
/*
ID: yueqiq
LANG: C++
TASK: nocows
*/
#include <set>
#include <map>
#include <ctime>
#include <queue>
#include <cmath>
#include <stack>
#include <limits>
#include <vector>
#include <bitset>
#include <string>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <string.h>
#include <iostream>
#include <algorithm>
#define ls rt<<1
#define rs rt<<1|1
#define Si set<int>
#define LL long long
#define pb push_back
#define PS printf(" ")
#define Vi vector<int>
#define LN printf("\n")
#define SD(a) scanf("%d",&a)
#define PD(a) printf("%d",a)
#define SET(a,b) memset(a,b,sizeof(a))
#define FF(i,a) for(int i(0);i<(a);i++)
#define FD(i,a) for(int i(a);i>=(1);i--)
#define FOR(i,a,b) for(int i(a);i<=(b);i++)
#define FOD(i,a,b) for(int i(a);i>=(b);i--)
#define readf freopen("nocows.in","r",stdin)
#define writef freopen("nocows.out","w",stdout)
const double pi = acos(-1.0);
const int maxn = 50;
const int BigP = 99999999;
const int INF = 99999999;
const int dx[]={0,1,0,-1};
const int dy[]={1,0,-1,0};
using namespace std;
int N,K,dp[500][500];
int main (){
readf;
writef;
SD(N);SD(K);
FOR(i,1,K) dp[1][i]=1;
FOR(i,3,N) FOR(j,2,K) FOR(k,1,i-2){
dp[i][j]=(dp[i][j]+dp[k][j-1]*dp[i-k-1][j-1])%9901;
}
PD((dp[N][K]-dp[N][K-1]+9901)%9901);LN;
return 0;
}