随笔分类 - *数学---BSGS
摘要:Mod Tree HDU - 2815 题意:a^x≡n(mod p),求x。 BSGS模板题~ 需要注意的是n>p时显然无解 Mod Tree HDU - 2815 Mod Tree 题意:a^x≡n(mod p),求x。 BSGS模板题~ 需要注意的是n>p时显然无解 1 #include <b
阅读全文
摘要:Clever Y POJ - 3243 题意:给a,c,b,求最小的x使得 ax≡b (mod c)。 扩展BSGS算法~ 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <cmath> 5 #def
阅读全文
摘要:Discrete Logging POJ - 2417 题意:给P,B,N,求最小的L使得 BL≡N (mod P),其中P是素数。 Baby Step Giant Step 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream>
阅读全文

浙公网安备 33010602011771号