【CF559C】 Gerald and Giant Chess(计数,方案数DP,数论)
摘要:题意:给出一个棋盘为h*w,现在要从(1,1)到(h,w),其中有n个黑点不能走,问有多少种可能从左上到右下 (1 ≤ h, w ≤ 105, 1 ≤ n ≤ 2000),答案模10^9+7 思路:从(1,1)到(n,m)的方案数是c(n+m-2,n-1) 考虑不能走黑点 设dp[i]为从(1,1)
阅读全文
posted @ 2016-11-04 14:23
浙公网安备 33010602011771号