
BSGS
文章平均质量分 76
DQSSS
蒟蒻
展开
-
【bzoj3239】Discrete Logging BSGS
DescriptionGiven a prime P, 2 <= P < 231, an integer B, 2 <= B < P, and an integer N, 2 <= N < P, compute the discrete logarithm of N, base B, modulo P. That is, find an integer L such thatBL == N (mod原创 2016-01-15 21:36:53 · 674 阅读 · 0 评论 -
【bzoj2242】[SDOI2011]计算器 快速幂+exgcd+BSGS
Description你被要求设计一个计算器完成以下三项任务: 1、给定y,z,p,计算Y^Z Mod P 的值; 2、给定y,z,p,计算满足xy≡ Z ( mod P )的最小非负整数; 3、给定y,z,p,计算满足Y^x ≡ Z ( mod P)的最小非负整数。Input输入包含多组数据。第一行包含两个正整数T,K分别表示数据组数和询问类型(对于一个测试点内的所有数据,询问类型相同)。原创 2016-01-15 21:02:28 · 639 阅读 · 0 评论