2012年3月19日

Poj 2417 baby-step 素数

摘要: 解方程 a^x=b(mod c) c为素数,用算法babystep,水过的,4s多#include <iostream>#include <stdio.h>#include <cmath>using namespace std;typedef long long ll;const ll maxn=65535;struct Hashh{ll a,b,next;}Hash[maxn<<1];ll flag[maxn+100];//注意要赋初值0ll top,idx;//注意要赋初值maxnvoid ins(ll a,ll b){ll k=b& 阅读全文

posted @ 2012-03-19 19:46 Inpeace7 阅读(426) 评论(0) 推荐(0) 编辑

导航