
求原根
文章平均质量分 72
SIO__Five
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 1284 Primitive Roots (求原根个数)
Primitive Roots 题目链接:http://poj.org/problem?id=1284 利用定理:素数 P 的原根的个数为euler(p - 1) typedef long long ll; using namespace std; /* 求原根 g^d ≡ 1(mod p) 其中d最小为p-1,g 便是一个原根 复杂度:O(m)*lo原创 2014-07-30 20:33:18 · 927 阅读 · 0 评论 -
SGU 261. Discrete Roots (N次剩余)
N次剩余 题目:http://acm.sgu.ru/problem.php?contest=0&problem=261 题意:给定n,a,p 求出x^n ≡ a(mod p)在模p意义下的所有解,其中p是素数 说明: 代码: /* ID: wuqi9395@126.com PROG: LANG: C++ */ #include #include #include #inclu原创 2014-07-30 22:29:08 · 1063 阅读 · 0 评论