自顶向下的递归方式
int TopDownBinomial(int n,int k,int C[0..n][0..n])
{
fori=0 to n do
for j=0 to min(i,k) do
if(j==0||i==j) C[i][j]=1;
else C[i][j]=0;
return Biomial(n,k,c)
}
int Binomial (int n,int k,int C[0..n][0..n])
{
if(C[n][k]>0) return C[n][k];
int result=Binomial(n-1,k,c)+Binomial(n-1,k-1,C);
C[n][k]=result;
return C[n][k];
}