BZOJ 3239 Discrete Logging BSGS
题目大意:对于,给定a,b,p,求x,其中p为质数。裸Baby-step-Giant-step这里写的还不错#include <cstdio>
#include <algorithm>
#include <cmath>
#include <map>
using namespace std;
typedef long long LL;
LL f_pow(LL x,LL y,LL MOD) {
原创
2017-03-20 19:09:46 ·
356 阅读 ·
0 评论