标签:ane 条件 des space title ebe class == code
#include<cstdio> #include<cstring> #include<algorithm> #define LL long long using namespace std; const int mod=1000000007; int T,n,m,ans; LL c[1005][1005]; LL C(int x,int y) { if(y==x||y==0)return 1; if(y==1)return x; if(c[x][y])return c[x][y]%mod; c[x][y]=(C(x-1,y-1)+C(x-1,y))%mod; return c[x][y]; } int main() { scanf("%d",&T); while(T--){ scanf("%d %d",&n,&m); printf("%I64d\n",C(max(n,m),min(n,m))); } return 0; }
标签:ane 条件 des space title ebe class == code
原文地址:http://www.cnblogs.com/lyzuikeai/p/7354359.html