Replies: 13 comments
-
这个exlucas写得好简陋 |
Beta Was this translation helpful? Give feedback.
-
@guodong2005 欢迎参与贡献~ |
Beta Was this translation helpful? Give feedback.
-
这个exlucas写的稀烂 |
Beta Was this translation helpful? Give feedback.
-
私自更正了一下编主的板子,主要问题在循环变量要用ll,以及某处s * i % P的i要提前%P |
Beta Was this translation helpful? Give feedback.
-
@Mizuhara-yaguchi 你好,如果你有好的想法或者建议,欢迎开 pull request 帮助修复,或者开 issue 指出 |
Beta Was this translation helpful? Give feedback.
-
exLucas 的复杂度是什么? |
Beta Was this translation helpful? Give feedback.
-
oi wiki上给的写法实际上是单次询问O(plogp)的。而通过预处理(n!/(n以内的p的所有倍数的乘积))%p,可以使时间复杂度优化至单次O(p + logp)。而如果p是固定的,我们在一开始就可以对p进行分解,并进行预处理,可以达到总复杂度O(p + Tlogp)。以上所计算复杂度均没有考虑excrt的复杂度,需乘上。
…------------------ 原始邮件 ------------------
发件人: "OI-wiki/gitment" <[email protected]>;
发送时间: 2020年7月30日(星期四) 上午9:31
收件人: "OI-wiki/gitment"<[email protected]>;
抄送: "刘知源"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [OI-wiki/gitment] 卢卡斯定理 - OI Wiki (#375)
exLucas 的复杂度是什么?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
我算是知道扩展卢卡斯那里为什么要用例子了,自己尝试用公式总结的时候快把自己玩死了 |
Beta Was this translation helpful? Give feedback.
-
在分解模数$P=p_1^{a_1}*...*p_k^{a_k}$ 之后, 直接开 k 个 n大小的数组, |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
扩展 Lucas 的时间复杂度为啥用的是 log 而不是 \log,好丑 |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
这个a和$alpha$放一起。。。看了半天才看出来不一样 |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/math/lucas/
OI Wiki 是一个编程竞赛知识整合站点,提供有趣又实用的编程竞赛知识以及其他有帮助的内容,帮助广大编程竞赛爱好者更快更深入地学习编程竞赛
Beta Was this translation helpful? Give feedback.
All reactions