suxxsfe

一言(ヒトコト)

随笔分类 -  数论数学-BSGS

摘要:BSGS BSGS,全称叫 BabyStepGiantStep,也就是大步小步 其实还是比较暴力的 它可以$O(\sqrt p)$的复杂度内解出: $$a^x\equiv n\pmod p,\gcd(a,p)=1$$ 中$x$的值 如果$\gcd(a,p)\neq 1$就要用到 exBSGS 了 我 阅读全文
posted @ 2020-04-09 14:31 suxxsfe 阅读(711) 评论(0) 推荐(3)
摘要:"洛谷" "bzoj" ~~特判+多测真恶心~~ 、 $0\le a\le P−1,0\le b\le P−1,2\le P\le 10^9$ Sample Input Sample Output 推一下前几项就能知道: $$x_n\equiv t\equiv a^{n 1}x_1+b\sum_{i 阅读全文
posted @ 2020-04-08 17:53 suxxsfe 阅读(152) 评论(0) 推荐(0)