
Lucas定理
Eiffel灬
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LightOJ - 1067 Combinations
Combinations Given n different objects, you want to take k of them. How many ways to can do it? For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways. Take 1,原创 2017-07-05 23:48:19 · 536 阅读 · 0 评论 -
Lucas定理模板
Lucas定理是用来求解C(m,n)mod p的值的。其中m和n的值可以很大,p一定是素数。 对阶乘打表的模板 LL quick_mod(LL a, LL b, LL c)//费马小定理+快速幂求逆元 { LL ans = 1; while (b) { if (b%2==1) ans = (ans*a) %原创 2017-09-06 18:59:47 · 398 阅读 · 0 评论 -
codeforces 451E Devu and Flowers(容斥原理,Lucas,dfs,隔板法)
E. Devu and Flowers time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Devu wants to decorate his garden with原创 2017-09-06 19:46:19 · 461 阅读 · 0 评论