摘要: CRT+LUCAS+费马小定理+拓展欧拉定理 幂指数太大了怎么办?欧拉定理,n太大了怎么办?上lucas,模数太大了怎么办?上crt。然后就好了,唯一注意的是要用拓展欧拉定理,n%phi(p)+phi(p) #include<cstdio> #include<cstring> #include<cm 阅读全文
posted @ 2017-09-05 21:15 19992147 阅读(125) 评论(0) 推荐(0) 编辑
摘要: KMP 我似乎复杂度写的不对。。。 因为位置相同只算一次,后缀数组什么的都不管用了,我们就暴力kmp,但是我写的是暴力跳。。。竟然过了。。。我写bzoj3670才发现。。。 #include<cstdio> #include<cstring> #include<algorithm> using na 阅读全文
posted @ 2017-09-05 21:08 19992147 阅读(162) 评论(0) 推荐(0) 编辑