<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      exgcd

      //給定 a 和 b,求出 x 和 y,使得 a * x + b * y = gcd(a, b)
      LL exgcd(LL a, LL b, LL &x, LL &y){
      	if (!b){
      	    x = 1, y = 0;
      	    return a;
      	}
      	LL d = exgcd(b, a % b, y, x);
      	y -= ( a / b ) * x;
      	return d;
      }
      

      gcd

      LL gcd(LL a, LL b){
      	return b ? gcd(b, a % b) : a;
      }
      

      逆元

      //1.快速冪求逆元
      LL inv(LL x){
      	return qp(x, mod - 2, mod);
      }
      //2.擴(kuò)展歐幾里得求逆元
      LL inv(LL a){
      	LL x, y;
      	exgcd(a, mod, x, y);
      	x = (x % mod + mod) % mod;
      	return x;
      }
      //3.線性遞推求逆元
      inv[1] = 1;
      for (int i = 2; i <= n; i ++ )
      	inv[i] = (p - p / i) * inv[p % i] % p;
      

      快輸

      void print(LL x){
      	if(x < 0) {putchar('-');x = -x;}
      	if(x / 10) print(x / 10);
      	putchar(x % 10 + '0');
      }
      

      lucas

      LL qp(LL a, LL k, LL p){
      	LL ans = 1;
      	while (k){
      		if (k & 1) ans = ans * a % p;
      		k >>= 1;
      		a = a * a % p;
      	}
      	return ans;
      }
      LL C(LL a, LL b, LL p){
      	if (a < b) return 0;
      	LL x = 1, y = 1;
      	for (LL i = a, j = 1; j <= b; i --, j ++ ){
      		x = x * i % p;
      		y = y * j % p;
      	}
      	return x * qp(y, p - 2, p) % p;
      }
      LL lucas(LL a, LL b, LL p){
      	if (a < p && b < p) return C(a, b, p);
      	return C(a % p, b % p, p) * lucas(a / p, b / p, p) % p;
      }
      

      sqrt

      LL mySqrt(LL x){
      	LL k = sqrt(x) - 1;
      	while ((k + 1) * (k + 1) <= x) k++;
      	return k;
      }
      

      快速冪

      LL qp(LL a, LL k, LL p){
      	LL ans = 1;
      	while (k){
      		if (k & 1) ans = ans * a % p;
      		k >>= 1;
      		a = a * a % p;
      	}
      	return ans;
      }
      

      快讀

      LL read(){
      	LL s = 0, w = 1;
      	char ch = getchar();
      	while ( ch < '0' || ch > '9') { if (ch == '-') w = -1; ch = getchar();}
      	while ( ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
      	return s * w;
      }
      

      unique

      vector <LL> :: iterator unique(vector <LL> &a){
      	LL j = 0;
      	for (LL i = 0; i < a.size(); i++)
      		if (!i || a[i] != a[i - 1])
      			a[j++] = a[i];
      	return a.begin() + j;
      }
      

      自動(dòng)取模整數(shù)型

      template<int mod>
      struct ModZ{
      	LL x;
      	constexpr ModZ() : x() {}
      	constexpr ModZ(LL x) : x(norm(x % mod)) {}
      	constexpr LL norm(LL x) {return (x % mod + mod) % mod;}
      	constexpr ModZ power(ModZ a, LL b) {ModZ res = 1; for (; b; b /= 2, a *= a) if (b & 1) res *= a; return res;}
      	constexpr ModZ inv() {return power(*this, mod - 2);}
      	constexpr ModZ &operator *= (ModZ rhs) & {x = norm(x * rhs.x); return *this;}
      	constexpr ModZ &operator += (ModZ rhs) & {x = norm(x + rhs.x); return *this;}
      	constexpr ModZ &operator -= (ModZ rhs) & {x = norm(x - rhs.x); return *this;}
      	constexpr ModZ &operator /= (ModZ rhs) & {return *this *= rhs.inv();}
      	friend constexpr ModZ operator * (ModZ lhs, ModZ rhs) {ModZ res = lhs; res *= rhs; return res;}
      	friend constexpr ModZ operator + (ModZ lhs, ModZ rhs) {ModZ res = lhs; res += rhs; return res;}
      	friend constexpr ModZ operator - (ModZ lhs, ModZ rhs) {ModZ res = lhs; res -= rhs; return res;}
      	friend constexpr ModZ operator / (ModZ lhs, ModZ rhs) {ModZ res = lhs; res /= rhs; return res;}
      	friend constexpr istream &operator >> (istream &is, ModZ &a) {LL v; is >> v; a = ModZ(v); return is;}
      	friend constexpr ostream &operator << (ostream &os, const ModZ &a) {return os << a.x;}
      	friend constexpr bool operator == (ModZ lhs, ModZ rhs) {return lhs.x == rhs.x;}
      	friend constexpr bool operator != (ModZ lhs, ModZ rhs) {return lhs.x != rhs.x;}
      };
      const int mod = 998244353;
      using Z = ModZ<mod>;
      
      posted on 2022-03-17 19:24  Hamine  閱讀(82)  評(píng)論(0)    收藏  舉報(bào)

      主站蜘蛛池模板: 亚洲av永久无码精品水牛影视| 少妇扒开双腿自慰出白浆| 国产对白老熟女正在播放| 丝袜老师办公室里做好紧好爽| 一本色道久久东京热| 强奷乱码中文字幕| 日韩精品成人一区二区三| 少妇人妻真实偷人精品| 我国产码在线观看av哈哈哈网站| 这里只有精品免费视频| 狠狠综合久久久久综| 久久这里都是精品一区| 日韩av天堂综合网久久| 国产成人高清亚洲综合| 蜜臀av性久久久久蜜臀aⅴ麻豆| 国产亚洲一二三区精品| 国语对白做受xxxxx在线中国| 她也色tayese在线视频| 午夜福利精品一区二区三区| 亚洲av片在线免费观看| 毛片内射久久久一区| 少妇精品亚洲一区二区成人| 国产男女猛烈无遮挡免费视频| 国产免费午夜福利在线播放| 亚洲性无码av在线| 亚洲一区二区三区色视频| 99热精品毛片全部国产无缓冲 | 亚洲精品www久久久久久| 日韩精品无遮挡在线观看| 亚洲一区二区三区日本久久| 麻豆精品久久久久久久99蜜桃| 国产区成人精品视频| 国产第一区二区三区精品| 亚洲综合网国产精品一区| 日本黄页网站免费观看| 亚洲国产精品嫩草影院久久| 中文字幕在线精品国产| 日韩一区二区三区女优丝袜| 2020精品自拍视频曝光| 乱码中文字幕| 久久精品第九区免费观看|