
数论
文章平均质量分 75
AlphaWA
这个作者很懒,什么都没留下…
展开
-
Miller_Rabin和Pollard_rho素数模板——POJ-2429的题解
网络上有很多讲解,不再赘述。此处记载此题题解以供复习之用。#include<cstdio> #include<iostream> #include<cstdlib> #include<cmath> #include<set> #include<algorithm> using namespace std; typedef l...原创 2018-03-14 16:38:02 · 307 阅读 · 0 评论 -
POJ-3641:Pseudoprime numbers
题目:Fermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but not very man...原创 2018-04-05 18:44:36 · 275 阅读 · 0 评论