2011-12-27 15:02:12
地址:
题意:中文。刚开始没看懂,注意“总”字。
代码:
# includelong long dp[21][21] ; int main () { int i, j, m, n ; for (i = 0 ; i <= 20 ; i++) dp[0][i] = 1 ; for (i = 1 ; i <= 20 ; i++) for (j = i ; j <= 20 ; j++) dp[i][j] = dp[i-1][j] + dp[i][j-1] ; while (~scanf ("%d%d", &m, &n)) printf ("%I64d\n", dp[n][m]) ; return 0 ; }