标签:
Description
Input
Output
Sample Input
Sample Output
# include<cstdio> using namespace std; int c[2005][2005]; void in() { int n, m; c[0][0] = 1; for(n = 1; n <= 2000; n++) { c[n][0] = 1; for(m = 1; m <= 2000; m++) c[n][m] = (c[n - 1][m] + c[n - 1][m - 1]) % 1007; } } int main() { int t, n, m; in(); scanf("%d", &t); while(t--) { scanf("%d%d", &m, &n); printf("%d\n", c[n][m]); } return 0; }
标签:
原文地址:http://www.cnblogs.com/www-cnxcy-com/p/4690351.html