![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Lucas定理
文章平均质量分 90
2020/3/16
这个作者很懒,什么都没留下…
展开
-
Lucas(卢卡斯)
首先,Lucas(卢卡斯)定理是什么?有什么用? Lucas定理是用来求 C(n,m) mod p,p为素数的值。(注意:p一定是素数) 有人会想,C(n,m)不能用C(n, m) = C(n - 1,m) + C(n - 1, m - 1)的公式来递推吗? ( 提示:C(n, m) mod p = n!/(m!(n - m)!) mod p ) 可以是可以。但当n,m,p都很大时,你递推...原创 2018-08-22 10:03:43 · 689 阅读 · 0 评论 -
Fence Building
传送门 题目描述 Farmer John owns a farm. He first builds a circle fence. Then, he will choose n points and build some straight fences connecting them. Next, he will feed a cow in each region so that cows...原创 2018-08-22 12:18:39 · 328 阅读 · 0 评论