摘要:
1、当 $n,m\le1000$,$p$ 为任意数时 可以使用暴力($\text{O}(n^2)$)求解 杨辉三角 的方式,计算 $$ \binom{n}{m} = \binom{n-1}{m-1}\sdot\binom{n-1}{m} $$ 2、当 $n,m\le 10^6$,$p\approx 阅读全文
posted @ 2023-01-13 09:04
Ciaxin
阅读(46)
评论(0)
推荐(1)
摘要:
对于解决组合数取模求解时,可以使用 **卢卡斯(Lucas)定理** 的内容解决。 当数据范围不大时,我们可以使用 **1. 递推公式;2. 预处理阶乘 $\dots$** 的[许多方法](https://www.cnblogs.com/Cnghit/p/17048526.html)进行。 但当 $ 阅读全文
posted @ 2023-01-13 08:46
Ciaxin
阅读(190)
评论(0)
推荐(1)

浙公网安备 33010602011771号