标签:
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3331 Accepted Submission(s):
1239
2 1 3 2 3
3 3
1 #include<stdio.h> 2 int biao[2010][2010]; 3 int main() 4 { 5 int t,i,j; 6 scanf("%d",&t); 7 for(i=0;i<2010;i++) 8 { 9 biao[i][i]=1; 10 biao[i][1]=i%1007; 11 } 12 for(i=2;i<2010;i++) 13 for(j=1;j<i;j++) 14 biao[i][j]=(biao[i-1][j-1]+biao[i-1][j])%1007; 15 while(t--) 16 { 17 int m,n; 18 scanf("%d %d",&m,&n); 19 printf("%d\n",biao[n+1][m+1]); 20 } 21 return 0; 22 }
标签:
原文地址:http://www.cnblogs.com/fengshun/p/4575603.html