|
|
back to boardwho can tell me why i got WA?? Thanks. Posted by 55555 1 Aug 2003 14:49 #include <stdio.h> void main() { int n,a,b,i,j; double c=1; double p[36]; scanf("%d %d %d",&n,&a,&b); if(a>b) { i=a; a=b; b=i; } for(i=0;i<36;i++) p[i]=1; for(i=1;i<=n+b;i++) { for(j=i;j>1;j--) p[j]=p[j]+p[j-1]; if(i==n+a) c=p[a+1]; } printf("%.0lf",c*p[b+1]); } |
|
|