|
|
back to boardwhy wa#7, i think everything is right Posted by hhh 12 Mar 2009 01:23 #include <iostream> using namespace std; int main() { unsigned __int64 n,a,b,i,t=1,r=1,u=1,h=1,p=1,x,y; cin>>n>>a>>b; if((a==0)&&(b==0)) { cout<<1; return 0; } if(a>b) { x=a; y=b; } else { x=b; y=a; } if(y==0) { for(i=n+1; i<=n+x; i++) r*=i; for(i=2; i<=x; i++) t*=i; r/=t; cout<<r; return 0; } for(i=2; i<=y; i++) p*=i; for(i=y+1; i<=x; i++) h*=i; h*=p; for(i=n+1; i<=n+y; i++) t*=i; for(i=n+y+1; i<=n+x; i++) u*=i; u*=t; r=u*t/(h*p); cout<<r; return 0; } |
|
|