标签:des blog http io ar os sp java for
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3067 Accepted Submission(s): 1126
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<string> #include<algorithm> #include<queue> #include<vector> #include<set> using namespace std; int t,n,m; int c[2002][2002]; int cl() { for(int i=0;i<=2000;i++) for(int j=0;j<=i;j++) { if(i==j||j==0) c[i][j]=1; else c[i][j]=c[i-1][j]+c[i-1][j-1]; } } int main() { scanf("%d",&t); cl(); while(t--) { scanf("%d%d",&m,&n); printf("%d\n",c[n][m]); } return 0; }
标签:des blog http io ar os sp java for
原文地址:http://www.cnblogs.com/a972290869/p/4101129.html