亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? zz.h

?? 密碼大家Shoup寫的數論算法c語言實現
?? H
?? 第 1 頁 / 共 3 頁
字號:
inline long operator%(const ZZ& a, long b)   { return rem(a, b); }inline ZZ& operator/=(ZZ& x, const ZZ& b)   { div(x, x, b); return x; } inline ZZ& operator/=(ZZ& x, long b)   { div(x, x, b); return x; } inline ZZ& operator%=(ZZ& x, const ZZ& b)   { rem(x, x, b); return x; } /**********************************************************                        GCD's***********************************************************/inline void GCD(ZZ& d, const ZZ& a, const ZZ& b)// d = gcd(a, b)   { NTL_zgcd(a.rep, b.rep, &d.rep); }inline ZZ GCD(const ZZ& a, const ZZ& b)   { ZZ x; GCD(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline void XGCD(ZZ& d, ZZ& s, ZZ& t, const ZZ& a, const ZZ& b)//  d = gcd(a, b) = a*s + b*t;   { NTL_zexteucl(a.rep, &s.rep, b.rep, &t.rep, &d.rep); }// single-precision versionslong GCD(long a, long b);void XGCD(long& d, long& s, long& t, long a, long b);/************************************************************                      Bit Operations*************************************************************/inline void LeftShift(ZZ& x, const ZZ& a, long k)// x = (a << k), k < 0 => RightShift   { NTL_zlshift(a.rep, k, &x.rep); }inline ZZ LeftShift(const ZZ& a, long k)   { ZZ x; LeftShift(x, a, k); NTL_OPT_RETURN(ZZ, x); }inline void RightShift(ZZ& x, const ZZ& a, long k)// x = (a >> k), k < 0 => LeftShift   { NTL_zrshift(a.rep, k, &x.rep); }inline ZZ RightShift(const ZZ& a, long k)   { ZZ x; RightShift(x, a, k); NTL_OPT_RETURN(ZZ, x); }#ifndef NTL_TRANSITIONinline ZZ operator>>(const ZZ& a, long n)   { ZZ x; RightShift(x, a, n); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator<<(const ZZ& a, long n)   { ZZ x; LeftShift(x, a, n); NTL_OPT_RETURN(ZZ, x); }inline ZZ& operator<<=(ZZ& x, long n)   { LeftShift(x, x, n); return x; }inline ZZ& operator>>=(ZZ& x, long n)   { RightShift(x, x, n); return x; }#endifinline long MakeOdd(ZZ& x)// removes factors of 2 from x, returns the number of 2's removed// returns 0 if x == 0   { return NTL_zmakeodd(&x.rep); }inline long NumTwos(const ZZ& x)// returns max e such that 2^e divides x if x != 0, and returns 0 if x == 0.   { return NTL_znumtwos(x.rep); }inline long IsOdd(const ZZ& a)// returns 1 if a is odd, otherwise 0   { return NTL_zodd(a.rep); }inline long NumBits(const ZZ& a)// returns the number of bits in |a|; NumBits(0) = 0   { return NTL_z2log(a.rep); }inline long bit(const ZZ& a, long k)// returns bit k of a, 0 being the low-order bit   { return NTL_zbit(a.rep, k); }#ifndef NTL_GMP_LIP// only defined for the "classic" long integer package, for backward// compatability.inline long digit(const ZZ& a, long k)   { return NTL_zdigit(a.rep, k); }#endif// returns k-th digit of |a|, 0 being the low-order digit.inline void trunc(ZZ& x, const ZZ& a, long k)// puts k low order bits of |a| into x   { NTL_zlowbits(a.rep, k, &x.rep); }inline ZZ trunc_ZZ(const ZZ& a, long k)   { ZZ x; trunc(x, a, k); NTL_OPT_RETURN(ZZ, x); }inline long trunc_long(const ZZ& a, long k)// returns k low order bits of |a|   { return NTL_zslowbits(a.rep, k); }inline long SetBit(ZZ& x, long p)// returns original value of p-th bit of |a|, and replaces// p-th bit of a by 1 if it was zero;// error if p < 0    { return NTL_zsetbit(&x.rep, p); }inline long SwitchBit(ZZ& x, long p)// returns original value of p-th bit of |a|, and switches// the value of p-th bit of a;// p starts counting at 0;//   error if p < 0   { return NTL_zswitchbit(&x.rep, p); }inline long weight(long a)// returns Hamming weight of |a|   { return NTL_zweights(a); }inline long weight(const ZZ& a)// returns Hamming weight of |a|   { return NTL_zweight(a.rep); }inline void bit_and(ZZ& x, const ZZ& a, const ZZ& b)// x = |a| AND |b|   { NTL_zand(a.rep, b.rep, &x.rep); }void bit_and(ZZ& x, const ZZ& a, long b);inline void bit_and(ZZ& x, long a, const ZZ& b)   { bit_and(x, b, a); }inline void bit_or(ZZ& x, const ZZ& a, const ZZ& b)// x = |a| OR |b|   { NTL_zor(a.rep, b.rep, &x.rep); }void bit_or(ZZ& x, const ZZ& a, long b);inline void bit_or(ZZ& x, long a, const ZZ& b)   { bit_or(x, b, a); }inline void bit_xor(ZZ& x, const ZZ& a, const ZZ& b)// x = |a| XOR |b|   { NTL_zxor(a.rep, b.rep, &x.rep); }void bit_xor(ZZ& x, const ZZ& a, long b);inline void bit_xor(ZZ& x, long a, const ZZ& b)   { bit_xor(x, b, a); }inline ZZ operator&(const ZZ& a, const ZZ& b)   { ZZ x; bit_and(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator&(const ZZ& a, long b)   { ZZ x; bit_and(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator&(long a, const ZZ& b)   { ZZ x; bit_and(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator|(const ZZ& a, const ZZ& b)   { ZZ x; bit_or(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator|(const ZZ& a, long b)   { ZZ x; bit_or(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator|(long a, const ZZ& b)   { ZZ x; bit_or(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator^(const ZZ& a, const ZZ& b)   { ZZ x; bit_xor(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator^(const ZZ& a, long b)   { ZZ x; bit_xor(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator^(long a, const ZZ& b)   { ZZ x; bit_xor(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ& operator&=(ZZ& x, const ZZ& b)    { bit_and(x, x, b); return x; }inline ZZ& operator&=(ZZ& x, long b)    { bit_and(x, x, b); return x; }inline ZZ& operator|=(ZZ& x, const ZZ& b)    { bit_or(x, x, b); return x; }inline ZZ& operator|=(ZZ& x, long b)    { bit_or(x, x, b); return x; }inline ZZ& operator^=(ZZ& x, const ZZ& b)    { bit_xor(x, x, b); return x; }inline ZZ& operator^=(ZZ& x, long b)    { bit_xor(x, x, b); return x; }long NumBits(long a);long bit(long a, long k);long NextPowerOfTwo(long m);// returns least nonnegative k such that 2^k >= minlinelong NumBytes(const ZZ& a)   { return (NumBits(a)+7)/8; }inlinelong NumBytes(long a)   { return (NumBits(a)+7)/8; }/***********************************************************          Some specialized routines************************************************************/inline long ZZ_BlockConstructAlloc(ZZ& x, long d, long n)   { return NTL_zblock_construct_alloc(&x.rep, d, n); }inline void ZZ_BlockConstructSet(ZZ& x, ZZ& y, long i)   { NTL_zblock_construct_set(x.rep, &y.rep, i); }inline long ZZ_BlockDestroy(ZZ& x)   { return NTL_zblock_destroy(x.rep);  }inline long ZZ_storage(long d)   { return NTL_zblock_storage(d); }inline long ZZ_RoundCorrection(const ZZ& a, long k, long residual)   { return NTL_zround_correction(a.rep, k, residual); }/***********************************************************                  Psuedo-random Numbers************************************************************/void SetSeed(const ZZ& s);// initialize random number generatorvoid RandomBnd(ZZ& x, const ZZ& n);// x = "random number" in the range 0..n-1, or 0  if n <= 0inline ZZ RandomBnd(const ZZ& n)   { ZZ x; RandomBnd(x, n); NTL_OPT_RETURN(ZZ, x); }void RandomLen(ZZ& x, long NumBits);// x = "random number" with precisely NumBits bits.inline ZZ RandomLen_ZZ(long NumBits)   { ZZ x; RandomLen(x, NumBits); NTL_OPT_RETURN(ZZ, x); }void RandomBits(ZZ& x, long NumBits);// x = "random number", 0 <= x < 2^NumBits inline ZZ RandomBits_ZZ(long NumBits)   { ZZ x; RandomBits(x, NumBits); NTL_OPT_RETURN(ZZ, x); }// single-precision version of the abovelong RandomBnd(long n);long RandomLen_long(long l);long RandomBits_long(long l);unsigned long RandomWord();unsigned long RandomBits_ulong(long l);/**********************************************************             Incremental Chinese Remaindering***********************************************************/long CRT(ZZ& a, ZZ& p, const ZZ& A, const ZZ& P);long CRT(ZZ& a, ZZ& p, long A, long P);// 0 <= A < P, (p, P) = 1;// computes b such that b = a mod p, b = A mod p,//   and -p*P/2 < b <= p*P/2;// sets a = b, p = p*P, and returns 1 if a's value//   has changed, otherwise 0inline long CRTInRange(const ZZ& gg, const ZZ& aa)   { return NTL_zcrtinrange(gg.rep, aa.rep); }// an auxilliary routine used by newer CRT routines to maintain// backward compatability.// test if a > 0 and -a/2 < g <= a/2// this is "hand crafted" so as not too waste too much time// in the CRT routines./**********************************************************                  Rational Reconstruction***********************************************************/inlinelong ReconstructRational(ZZ& a, ZZ& b, const ZZ& u, const ZZ& m,                          const ZZ& a_bound, const ZZ& b_bound){   return NTL_zxxratrecon(u.rep, m.rep, a_bound.rep, b_bound.rep, &a.rep, &b.rep);}/************************************************************                      Primality Testing *************************************************************/void GenPrime(ZZ& n, long l, long err = 80);inline ZZ GenPrime_ZZ(long l, long err = 80) { ZZ x; GenPrime(x, l, err); NTL_OPT_RETURN(ZZ, x); }long GenPrime_long(long l, long err = 80);// This generates a random prime n of length l so that the// probability of erroneously returning a composite is bounded by 2^(-err).void GenGermainPrime(ZZ& n, long l, long err = 80);inline ZZ GenGermainPrime_ZZ(long l, long err = 80) { ZZ x; GenGermainPrime(x, l, err); NTL_OPT_RETURN(ZZ, x); }long GenGermainPrime_long(long l, long err = 80);// This generates a random prime n of length l so that thelong ProbPrime(const ZZ& n, long NumTrials = 10);// tests if n is prime;  performs a little trial division,// followed by a single-precision MillerWitness test, followed by// up to NumTrials general MillerWitness tests.long MillerWitness(const ZZ& n, const ZZ& w);// Tests if w is a witness to primality a la Miller.// Assumption: n is odd and positive, 0 <= w < n.void RandomPrime(ZZ& n, long l, long NumTrials=10);// n =  random l-bit primeinline ZZ RandomPrime_ZZ(long l, long NumTrials=10)   { ZZ x; RandomPrime(x, l, NumTrials); NTL_OPT_RETURN(ZZ, x); }void NextPrime(ZZ& n, const ZZ& m, long NumTrials=10);// n = smallest prime >= m.inline ZZ NextPrime(const ZZ& m, long NumTrials=10)   { ZZ x; NextPrime(x, m, NumTrials); NTL_OPT_RETURN(ZZ, x); }// single-precision versionslong ProbPrime(long n, long NumTrials = 10);long RandomPrime_long(long l, long NumTrials=10);long NextPrime(long l, long NumTrials=10);/************************************************************                      Exponentiation*************************************************************/inline void power(ZZ& x, const ZZ& a, long e)   { NTL_zexp(a.rep, e, &x.rep); }inline ZZ power(const ZZ& a, long e)   { ZZ x; power(x, a, e); NTL_OPT_RETURN(ZZ, x); }inline void power(ZZ& x, long a, long e)   {  NTL_zexps(a, e, &x.rep); }inline ZZ power_ZZ(long a, long e)   { ZZ x; power(x, a, e); NTL_OPT_RETURN(ZZ, x); }long power_long(long a, long e); void power2(ZZ& x, long e);inline ZZ power2_ZZ(long e)   { ZZ x; power2(x, e); NTL_OPT_RETURN(ZZ, x); }/*************************************************************                       Square Roots**************************************************************/inline void SqrRoot(ZZ& x, const ZZ& a)// x = [a^{1/2}], a >= 0{   NTL_zsqrt(a.rep, &x.rep);}inline ZZ SqrRoot(const ZZ& a)   { ZZ x; SqrRoot(x, a); NTL_OPT_RETURN(ZZ, x); }inline long SqrRoot(long a) { return NTL_zsqrts(a); }// single-precision version/***************************************************************                      Modular Arithmetic***************************************************************/// The following routines perform arithmetic mod n, n positive.// All args (other than exponents) are assumed to be in the range 0..n-1.inline void AddMod(ZZ& x, const ZZ& a, const ZZ& b, const ZZ& n)// x = (a+b)%n   { NTL_zaddmod(a.rep, b.rep, n.rep, &x.rep); }   inline ZZ AddMod(const ZZ& a, const ZZ& b, const ZZ& n)   { ZZ x; AddMod(x, a, b, n); NTL_OPT_RETURN(ZZ, x); }inline void SubMod(ZZ& x, const ZZ& a, const ZZ& b, const ZZ& n)// x = (a-b)%n   { NTL_zsubmod(a.rep, b.rep, n.rep, &x.rep); }inline ZZ SubMod(const ZZ& a, const ZZ& b, const ZZ& n)   { ZZ x; SubMod(x, a, b, n); NTL_OPT_RETURN(ZZ, x); }inline void NegateMod(ZZ& x, const ZZ& a, const ZZ& n)// x = -a % n   { NTL_zsubmod(0, a.rep, n.rep, &x.rep); }inline ZZ NegateMod(const ZZ& a, const ZZ& n)   { ZZ x; NegateMod(x, a, n); NTL_OPT_RETURN(ZZ, x); }void AddMod(ZZ& x, const ZZ& a, long b, const ZZ& n);inline ZZ AddMod(const ZZ& a, long b, const ZZ& n)   { ZZ x; AddMod(x, a, b, n); NTL_OPT_RETURN(ZZ, x); }inline void AddMod(ZZ& x, long a, const ZZ& b, const ZZ& n)   { AddMod(x, b, a, n); }inline ZZ AddMod(long a, const ZZ& b, const ZZ& n)   { ZZ x; AddMod(x, a, b, n); NTL_OPT_RETURN(ZZ, x); }void SubMod(ZZ& x, const ZZ& a, long b, const ZZ& n);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
经典三级在线一区| 日本最新不卡在线| 亚洲国产精品高清| 亚洲婷婷国产精品电影人久久| 久久久国产一区二区三区四区小说 | 久久精品国产**网站演员| 狠狠色狠狠色综合日日91app| 精品一区二区三区视频| 成人97人人超碰人人99| 91福利社在线观看| 日韩欧美色电影| 国产精品久久看| 狠狠v欧美v日韩v亚洲ⅴ| 在线免费不卡电影| 久久久久国产免费免费| 性做久久久久久| 韩国精品免费视频| 欧美精品欧美精品系列| 国产精品入口麻豆九色| 免费一级欧美片在线观看| a4yy欧美一区二区三区| 精品少妇一区二区三区在线播放| 亚洲成av人综合在线观看| 风间由美一区二区三区在线观看| 欧美日本在线一区| 亚洲午夜久久久久久久久电影网 | 国产精品久久久久影院亚瑟| 美女视频黄久久| 91麻豆精品国产| 奇米精品一区二区三区四区| 欧美日韩亚洲综合在线| 一区二区三区免费观看| 91麻豆精品在线观看| 老汉av免费一区二区三区| 91精品国产免费| 美国三级日本三级久久99| 宅男噜噜噜66一区二区66| 亚洲午夜三级在线| 日韩一级欧美一级| 久久精品72免费观看| 精品88久久久久88久久久| 六月丁香综合在线视频| 国产精品私人自拍| 在线免费精品视频| 日本不卡一区二区三区高清视频| 精品少妇一区二区三区日产乱码| 韩日av一区二区| 亚洲欧美一区二区不卡| 欧美精品乱人伦久久久久久| 精一区二区三区| 国产精品美女久久久久aⅴ| 一本色道综合亚洲| 黄色资源网久久资源365| 国产精品国产三级国产aⅴ无密码| 91蜜桃在线观看| 精品中文字幕一区二区| 136国产福利精品导航| 欧美一区二区三区精品| 99精品久久只有精品| 精品一区二区三区在线视频| 亚洲青青青在线视频| 2024国产精品| 欧美老肥妇做.爰bbww| 成人99免费视频| 久久精品国产色蜜蜜麻豆| 亚洲综合在线视频| 国产精品系列在线| 久久综合国产精品| 日韩一区二区三区观看| 91网站最新地址| kk眼镜猥琐国模调教系列一区二区| 日日夜夜精品视频天天综合网| 亚洲人被黑人高潮完整版| 国产精品欧美久久久久一区二区| 精品久久久影院| 欧美一区二区三区白人| 欧美大片在线观看一区二区| 欧美一二三四区在线| 91精品国产综合久久精品性色| 欧洲av在线精品| 欧美日韩一二三区| 日韩一二三区视频| 日韩欧美激情四射| 久久综合九色综合97_久久久| 欧美成va人片在线观看| 久久综合狠狠综合| 国产欧美视频在线观看| 国产精品久久久久久户外露出 | 国产一区亚洲一区| 成人白浆超碰人人人人| 色偷偷一区二区三区| 日韩一区二区精品在线观看| 久久久久久久精| 亚洲一区二区三区自拍| 婷婷中文字幕一区三区| 色偷偷88欧美精品久久久| 在线播放一区二区三区| 国产视频在线观看一区二区三区| 自拍偷拍亚洲欧美日韩| 香港成人在线视频| av在线播放一区二区三区| 欧美日韩国产123区| 国产午夜精品一区二区三区嫩草| 亚洲日本欧美天堂| 国产美女在线观看一区| 欧美日韩国产bt| 亚洲一二三区视频在线观看| 韩国中文字幕2020精品| 欧美视频一二三区| 亚洲欧美日韩人成在线播放| 国产最新精品免费| 欧美mv日韩mv国产网站| 亚洲成人激情综合网| 91小视频免费看| 国产精品毛片a∨一区二区三区| 美国毛片一区二区三区| 色婷婷一区二区| 中文字幕日本不卡| 99久久久国产精品| 中文字幕在线一区| 不卡的电影网站| 最新成人av在线| 一本到高清视频免费精品| 国产精品久久久久精k8| 99久久精品国产观看| 国产精品福利影院| 99这里只有久久精品视频| 中文字幕在线不卡一区| 91啦中文在线观看| 一区二区三区不卡在线观看| 91激情五月电影| 天天综合天天做天天综合| 欧美精品久久久久久久多人混战| 亚洲高清视频在线| 91精品啪在线观看国产60岁| 免费观看成人av| 国产精品视频看| 欧美日韩精品一区视频| 久久aⅴ国产欧美74aaa| 中文一区二区在线观看| 欧洲精品在线观看| 久久99久久久久| 自拍偷拍国产亚洲| 欧美电影在哪看比较好| 国产91丝袜在线播放九色| 亚洲一区二区成人在线观看| 精品久久久久久久人人人人传媒| 成av人片一区二区| 免费人成网站在线观看欧美高清| 中文子幕无线码一区tr| 欧美一二区视频| 在线观看视频欧美| 国产黄色成人av| 免费精品99久久国产综合精品| 综合电影一区二区三区| 国产欧美一区二区精品秋霞影院| 欧美美女一区二区在线观看| 波多野结衣中文字幕一区| 久久99蜜桃精品| 紧缚捆绑精品一区二区| 日本女人一区二区三区| 丝袜脚交一区二区| 性感美女久久精品| 亚洲成人免费视频| 亚洲一区二区三区视频在线 | 色综合久久综合网97色综合| 麻豆精品一区二区| 久久国产精品第一页| 美腿丝袜亚洲色图| 天天影视涩香欲综合网| 亚洲国产婷婷综合在线精品| 亚洲自拍欧美精品| 亚洲成人免费视频| 日本欧美肥老太交大片| 狠狠色伊人亚洲综合成人| 国内一区二区视频| 国产91对白在线观看九色| 9人人澡人人爽人人精品| 色播五月激情综合网| 欧美精品久久一区| 久久综合九色综合欧美就去吻 | 国产成人免费在线观看不卡| 国产一区二区0| 在线欧美小视频| 欧美成人免费网站| 中文字幕综合网| 午夜精品成人在线| 国产91精品露脸国语对白| 91在线观看高清| 欧美精品一区二区三区四区| 国产精品素人一区二区| 午夜精品久久久久久久| 国产91精品精华液一区二区三区| 色婷婷综合久久| 久久久99久久| 久久激情五月婷婷| 欧美午夜不卡在线观看免费| 久久综合久久99| 久久99精品国产| 欧美色精品在线视频|