摘要:
每次把gcd(a,c)提到前面,直到a,c互质,然后就是普通BSGS了#include#include#include#include#include#define LL long longusing namespace std;struct hashtable{ s... 阅读全文
posted @ 2017-08-14 21:18
Ren_Ivan
阅读(133)
评论(0)
推荐(0)
摘要:
BSGS算法,预处理出ϕ(c)−−−−√内的a的幂,每次再一块一块的往上找,转移时将b乘上逆元,哈希表里O(1)查询即可#include#include#include#include#include#include#define LL long longlong l... 阅读全文
posted @ 2017-08-14 10:43
Ren_Ivan
阅读(83)
评论(0)
推荐(0)
摘要:
%%% dalao Orz ,筛素数到sqrt(n),分解ϕ(p),依次枚举判断就好了#include#include#include#include#include#define N 100000#define LL long longusing namespace... 阅读全文
posted @ 2017-08-14 08:44
Ren_Ivan
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号