
阿姆斯特朗算法
文章平均质量分 65
NOIAu
最后一天啦~
展开
-
PoJ 2417 Discrete Logging BSGS裸题
DescriptionGiven a prime P, 2 <= P < 2 31, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete logarithm of N, base B, modulo P. That is, find an integer L such that B^L == N原创 2017-09-20 14:45:36 · 619 阅读 · 0 评论 -
BZOJ 1467 1467: Pku3243 clever Y (exBSGS)
Time Limit: 4 Sec Memory Limit: 64 MB Submit: 310 Solved: 178Description小Y发现,数学中有一个很有趣的式子: X^Y mod Z = K 给出X、Y、Z,我们都知道如何很快的计算K。但是如果给出X、Z、K,你是否知道如何快速的计算Y呢? Input本题由多组数据(不超过20组),每组测试数据包含一行三个整数X、Z、K(0原创 2017-09-20 16:05:41 · 506 阅读 · 0 评论