广为人知的范德蒙特卷积 (sum_{i=0}^k binom{n}{i} binom{m}{k-i}= binom{n+m}{k}) 如果要求 (forall d sum_{i=0}^j binom{d}{i} binom{n+m-d}{k-i}= binom{n+m}{k}) 其中 (j leq k)为给定值
考虑组合意义 即为确保前d个盒中放 (leq j)个球的方案数,枚举第j个球的位置组合数计算后前缀和就行。