|
|
back to boardWhy Posted by Alel 15 May 2010 18:23 My Ac code,but I don't know why? #include<stdio.h> #include <iostream> using namespace std; int main() { unsigned long long int c[25][20],sum; int a,b,n,i,j; for(i=1;i<=20;i++) c[i][1]=i+1; for(i=1;i<=15;i++) c[1][i]=i+1; for(i=2;i<=20;i++) for(j=2;j<=15;j++) c[i][j]=c[i][j-1]+c[i-1][j]; for(i=1;i<=20;i++)c[i][0]=1; scanf("%d%d%d",&n,&a,&b); sum=c[n][a]*c[n][b]; cout<<sum; printf("\n"); return 0; } |
|
|