标签:img ref source tar problem span XML int height
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1422 Accepted Submission(s):
684
#include<iostream> #include<cstdio> #include<cstring> #define N 200001 #define M 1000000007 #define ll long long using namespace std; ll fac[N]={1,1},inv[N]={1,1},f[N]={1,1}; int n,m; ll C(ll a,ll b) { return fac[a]*inv[b]%M*inv[a-b]%M; } int main() { for(int i=2;i<N;i++) { fac[i]=fac[i-1]*i%M; f[i]=(M-M/i)*f[M%i]%M; inv[i]=inv[i-1]*f[i]%M; } while(~scanf("%d%d",&n,&m)) printf("%lld\n",C(m+n-4,m-2)); return 0; }
标签:img ref source tar problem span XML int height
原文地址:http://www.cnblogs.com/L-Memory/p/7424092.html