可能是一篇(抄来的)min25学习笔记

一个要求很多的积性函数

我们考虑有一个积性函数,这个函数满足可以快速计算质数处的值

且质数可以写成一个多项式的形式……而且这个多项式如果强行套在合数上,满足积性,我也不知道有没有除了\(x^{k}\)别的多项式惹

假如\(F(x) = x^{k}\)吧

我们想要计算这个东西

\(g(n,j)\)表示前\(n\)个数里,质数的和,加上合数中最小质因子大于\(P_{j}\)的和

那么,怎么求呢

我们考虑已经求好\(g(n,j - 1)\)这个数组

那么如果\(P_{j}^{2} > n\)

那么很妙,就是\(g(n,j) = g(n,j - 1)\),因为没有以\(P_{j}\)为最小质因子的合数

如果\(P_{j}^{2} \leq N\)

那么考虑从\(g(n,j - 1)\)到\(g(n,j)\)减少了什么

例如,我显然减少了合数中最小质因子为\(P_{j}\)的值,因为定义里是大于,\(g(n,j)\)中的合数质因子至少是\(P_{j + 1}\)

那么最小质因子为\(P_{j}\)的值怎么算呢

我们先要提出一个\(P_{j}\)出来,然后在剩下的\(\lfloor \frac{n}{P_{j}} \rfloor\)中找出所有最小质因子大于等于\(P_{j}\)的个数

好像\(g(n,j - 1)\)就很不错!然而其中有一些小于\(P_{j}\)的质数,考虑把它们扣掉,这个可以预处理,因为\(P_{j}\)的范围在\(\sqrt{N}\)以内

记\(sum[j] = \sum_{i = 1}^{j} F(P_{i})\)

那么我们有

\[g(n,j) =\left\{\begin{matrix}
g(n,j - 1) & P_{j}^{2} > n\\
g(n,j - 1) - F(P_{j})(g(\lfloor \frac{n}{P_{j}} \rfloor,j - 1) - sum(j - 1)) & P_{j}^{2} \leq n
\end{matrix}\right.
\]

同时我们发现,我们只需要用到\(\lfloor \frac{n}{i} \rfloor\)的取值,一共\(2\sqrt{N}\)个位置,而且质数的话也只需要前\(\sqrt{N}\)个

初始化的话,对于\(g(n,0)\),我们把这个\(F(x)\)多项式套在每个数上面,求一个\(\sum_{i = 2}^{n} x^{i}\)这个在k固定的时候有k + 1次多项式的公式可以快速计算

一般不会太大吧,如果拉格朗日插值的话可能和\(\sqrt{n}\)相乘会有点凉


g的用处

求完\(g\)就有很神奇的事情发生了!如果你认为\(F(x) = 1\)的话,我们甚至可以求出\(n\)以内质数的个数!在我不知道这些质数是什么的情况下!这简直是我这个菜鸡以前想都不敢想的事

不过,我们的征途是星辰大海1到n的前缀和

那么我们类似的定义一个\(S(n,j)\)表示前\(n\)个数里,所有数的最小的质因子大于等于\(P_{j}\)的方案数(注意这里就不包括小于\(P_{j}\)的质数了)

我们先搞定\(S(n,j)\)里的所有质数的\(F(x)\)的和

方法是\(g(n,|P|) - sum[j - 1]\)

那么我们枚举每个数的最小质因子

直接列个式子就是

\[S(n,j) = g(n,|P|) - sum[j - 1] + \sum_{k = j}^{P_{k}^{2} \leq n}\sum_{e = 1}^{P_{k}^{e + 1} \leq n} [F(P_{k}^{e}) S(\lfloor \frac{n}{P_{k}^{e}}\rfloor,j + 1) + F(P_{k}^{e + 1})]
\]

意义就是我们枚举一个数的最小质因子是\(P_{k}^{e}\),然后乘上\(\lfloor\frac{n}{P_{k}^{e}}\rfloor\)中最小质因子大于\(P_{j + 1}\)的

但是所有的\(F(P_{k}^{e}),e\geq 2\)都会漏掉,所以要重算一下

这样的话复杂度就是……我抄的那个人没写……好像是\(O(\frac{n^{3/4}}{\log n})\)

好吧,这不重要……毕竟我……也不会证复杂度

这么看起来仿佛挺简单的好难


几道例题

LOJ#6053. 简单的函数

恍然觉得WC好像见过这道题……咋就变成板子了……板子都不会我也要废了qwq

考虑质数的函数值怎么表示,由于只有2是偶数,除了2以外剩下的质数值都是\(f(p) = p - 1\),然后\(f(2) = 3\)

这个时候我们要大胆想象,我们就认为所有质数都是\(f(p) = p - 1\),遇到2和1这个难受位置特判一下就好了

但是这样不满足积性

不过一个多项式嘛,我把每一块都拆开不就满足积性了吗

设\(F(x) = x\),统计一个\(g(n,|P|)\)

再来一个\(F(x) = 1\),统计一个\(h(n,|P|)\)

可以同时进行,方法都是一样的

于是我们的\(S(n,j)\)初始的时候统计质数要加上\(g(n,|P|) - h(n,|P|) - \sum_{i = 1}^{j - 1}(P_{i} - 1)\)

如果\(j = 1\)的话,我们把2算成了1,那就再加上2

于是照着刚才的讨论,问题就完美解决了

最后加上1处的函数值是1

  1. #include <bits/stdc++.h>
  2. #define fi first
  3. #define se second
  4. #define pii pair<int,int>
  5. #define mp make_pair
  6. #define pb push_back
  7. #define space putchar(' ')
  8. #define enter putchar('\n')
  9. #define eps 1e-10
  10. #define ba 47
  11. #define MAXN 200005
  12. //#define ivorysi
  13. using namespace std;
  14. typedef long long int64;
  15. typedef unsigned int u32;
  16. typedef double db;
  17. template<class T>
  18. void read(T &res) {
  19. res = 0;T f = 1;char c = getchar();
  20. while(c < '0' || c > '9') {
  21. if(c == '-') f = -1;
  22. c = getchar();
  23. }
  24. while(c >= '0' && c <= '9') {
  25. res = res * 10 +c - '0';
  26. c = getchar();
  27. }
  28. res *= f;
  29. }
  30. template<class T>
  31. void out(T x) {
  32. if(x < 0) {x = -x;putchar('-');}
  33. if(x >= 10) {
  34. out(x / 10);
  35. }
  36. putchar('0' + x % 10);
  37. }
  38. const int MOD = 1000000007;
  39. int inc(int a,int b) {
  40. return a + b >= MOD ? a + b - MOD : a + b;
  41. }
  42. int mul(int a,int b) {
  43. return 1LL * a * b % MOD;
  44. }
  45. int fpow(int x,int c) {
  46. int res = 1,t = x;
  47. while(c) {
  48. if(c & 1) res = mul(res,t);
  49. t = mul(t,t);
  50. c >>= 1;
  51. }
  52. return res;
  53. }
  54. void update(int &x,int y) {
  55. x = inc(x,y);
  56. }
  57. int64 N,pos[MAXN],sqr;
  58. int prime[MAXN],tot,sum[MAXN];
  59. bool nonprime[MAXN];
  60. int cnt,g[MAXN],h[MAXN];
  61. int id[2][MAXN];
  62. int getsum(int64 x) {
  63. int u = x % MOD;
  64. int res = 1LL * u * (u + 1) % MOD;
  65. res = mul(res,(MOD + 1) / 2);
  66. return res;
  67. }
  68. void process(int64 S) {
  69. for(int i = 2 ; i <= S ; ++i) {
  70. if(!nonprime[i]) {
  71. prime[++tot] = i;
  72. sum[tot] = sum[tot - 1];
  73. update(sum[tot],i);
  74. }
  75. for(int j = 1 ; j <= tot ; ++j) {
  76. if(prime[j] > S / i) break;
  77. nonprime[i * prime[j]] = 1;
  78. if(i % prime[j] == 0) break;
  79. }
  80. }
  81. }
  82. int S(int64 x,int y) {
  83. if(x <= 1 || prime[y] > x) return 0;
  84. int res = 0;
  85. if(y == 1) res += 2;
  86. int k = x <= sqr ? id[0][x] : id[1][N / x];
  87. update(res,inc(g[k],MOD - inc(inc(sum[y - 1],MOD - y + 1),h[k])));
  88. for(int j = y ; j <= tot ; ++j) {
  89. int64 t1 = prime[j],t2 = 1LL * prime[j] * prime[j];
  90. if(t2 > x) break;
  91. for(int e = 1 ; t2 <= x ; t1 = t2,t2 = t2 * prime[j],++e) {
  92. int t = inc(mul(prime[j] ^ e,S(x / t1,j + 1)),prime[j] ^ (e + 1));
  93. update(res,t);
  94. }
  95. }
  96. return res;
  97. }
  98. int main(){
  99. #ifdef ivorysi
  100. freopen("f1.in","r",stdin);
  101. #endif
  102. read(N);
  103. sqr = sqrt(N);
  104. process(sqr);
  105. for(int64 i = 1 ; i <= N ; ++i) {
  106. int64 r = N / (N / i);
  107. pos[++cnt] = N / i;
  108. h[cnt] = (N / i - 1) % MOD;
  109. g[cnt] = getsum(N / i);update(g[cnt],MOD - 1);
  110. if(N / i <= sqr) id[0][N / i] = cnt;
  111. else id[1][N / (N / i)] = cnt;
  112. i = r;
  113. }
  114. for(int j = 1 ; j <= tot ; ++j) {
  115. for(int i = 1 ; i <= cnt && 1LL * prime[j] * prime[j] <= pos[i] ; ++i) {
  116. int k = (pos[i] / prime[j]) <= sqr ? id[0][pos[i] / prime[j]] : id[1][N / (pos[i] / prime[j])];
  117. int t = inc(g[k],MOD - sum[j - 1]);
  118. t = mul(t,prime[j]);
  119. update(g[i],MOD - t);
  120. update(h[i],MOD - inc(h[k],MOD - (j - 1)));
  121. }
  122. }
  123. int ans = inc(S(N,1),1);
  124. out(ans);enter;
  125. return 0;
  126. }

LOJ#572. 「LibreOJ Round #11」Misaka Network 与求和

当时我打的时候不会min25

一年过去了

我竟然现在才学min25?!

这个,好像是类似min25的一种求和方法

首先我们熟练的把gcd转换成互质数对

\[ans = \sum_{d = 1}^{n} f(d)^{k} \sum_{i = 1}^{\lfloor \frac{n}{d} \rfloor}\sum_{j = 1}^{\lfloor \frac{n}{d} \rfloor}\sum_{t|i,j}\mu(t) \\
\sum_{d = 1}^{n}f(d)^{k} \sum_{t = 1}^{\lfloor \frac{n}{d} \rfloor}\mu(t) \lfloor \frac{n}{dt} \rfloor^{2} \\
\sum_{T = 1}^{n} \lfloor \frac{n}{T} \rfloor^{2} \sum_{d | T}f(d)\mu(\frac{T}{d})
\]

这个时候我们发现要求的就是\(f * \mu(T)\)

然而……

回忆起学过的杜教筛,我们可以卷上一个\(I(x) = 1\)

\(f * \mu * I = f * \varepsilon = f\)

然后套到杜教筛里

可以得到

\[S(n) = \sum_{i = 1}^{n}f(n) - \sum_{t = 2}^{n}S(\lfloor \frac{n}{t}\rfloor)
\]

然后我们要做的就是求\(f(n)\)的前缀和了

用一种类似min25的方法

设\(s(n,j)\)为\([1,n]\)里面,质数大于等于\(j - 1\)的和,\(f(n) = S(n,1)\),默认\(prime[0] = 1\)

再枚举第二大的质数的时候才统计贡献

考虑min25的时候,我们分了质数,和合数两部分统计

如果是质数的部分,统计了\([1,\lfloor \frac{n}{prime[j - 1]} \rfloor]\)中,大于\(prime[j - 1]\)的一个质数,我们用\(prime[j - 1]\)乘上这个质数,这个数第二大的质因子即为\(prime[j - 1]\)

如果是合数的部分,从\(j\)到\(tot\)枚举最小质数的时候,显然前面加的是已经统计完次大质因子贡献的合数,所以系数是1,唯一漏掉的是\(prime[j]^{e + 1}\),加上即可

列一个式子就是

\[s(n,j) = prime[j - 1]^{k} * (g(n,j) - j + 1)\\+\sum_{j = 1}^{prime[j]^{2} \leq n} \sum_{e = 1}^{prime[j]^{e + 1} \leq n}s(\lfloor \frac{n}{prime[j]^{e}}\rfloor,j + 1) + prime[j]^{k}
\]

unordered_map比手写哈希慢了两倍不止……感觉不行……

  1. #include <bits/stdc++.h>
  2. #define fi first
  3. #define se second
  4. #define pii pair<int, int>
  5. #define mp make_pair
  6. #define pb push_back
  7. #define space putchar(' ')
  8. #define enter putchar('\n')
  9. #define eps 1e-10
  10. #define ba 47
  11. #define MAXN 200005
  12. //#define ivorysi
  13. using namespace std;
  14. typedef long long int64;
  15. typedef unsigned int u32;
  16. typedef double db;
  17. template <class T>
  18. void read(T &res) {
  19. res = 0;
  20. T f = 1;
  21. char c = getchar();
  22. while (c < '0' || c > '9') {
  23. if (c == '-')
  24. f = -1;
  25. c = getchar();
  26. }
  27. while (c >= '0' && c <= '9') {
  28. res = res * 10 + c - '0';
  29. c = getchar();
  30. }
  31. res *= f;
  32. }
  33. template <class T>
  34. void out(T x) {
  35. if (x < 0) {
  36. x = -x;
  37. putchar('-');
  38. }
  39. if (x >= 10) {
  40. out(x / 10);
  41. }
  42. putchar('0' + x % 10);
  43. }
  44. u32 N, sqr, K;
  45. u32 prime[MAXN], tot, h[MAXN], pos[MAXN];
  46. u32 id[2][MAXN], cnt, pw[MAXN], rec;
  47. bool nonprime[MAXN];
  48. int c[10000005];
  49. u32 getpos(u32 x) { return x <= sqr ? id[0][x] : id[1][N / x]; }
  50. struct HASH {
  51. int sumE,head[974711 + 5];u32 mo = 974711;
  52. struct node {
  53. pair<u32,u32> x;u32 val;int next;
  54. }E[10000005];
  55. u32 hash_key(pair<u32,u32> t) {
  56. return t.fi << 16 | t.se;
  57. }
  58. void add(pair<u32,u32> x,u32 v) {
  59. u32 u = hash_key(x) % mo;
  60. E[++sumE].x = x;E[sumE].val = v;
  61. E[sumE].next = head[u];head[u] = sumE;
  62. }
  63. bool count(pair<u32,u32> x) {
  64. u32 u = hash_key(x) % mo;
  65. for(int i = head[u] ; i ; i = E[i].next) {
  66. if(E[i].x == x) return true;
  67. }
  68. return false;
  69. }
  70. u32 query(pair<u32,u32> x) {
  71. u32 u = hash_key(x) % mo;
  72. for(int i = head[u] ; i ; i = E[i].next) {
  73. if(E[i].x == x) return E[i].val;
  74. }
  75. return 0;
  76. }
  77. }hsh;
  78. u32 rf[MAXN];
  79. bool vis[MAXN];
  80. u32 fpow(u32 x, u32 c) {
  81. u32 res = 1, t = x;
  82. while (c) {
  83. if (c & 1)
  84. res = res * t;
  85. t = t * t;
  86. c >>= 1;
  87. }
  88. return res;
  89. }
  90. void Process() {
  91. prime[0] = 1;
  92. pw[0] = 1;
  93. for (u32 i = 2; i <= sqr; ++i) {
  94. if (!nonprime[i]) {
  95. prime[++tot] = i;
  96. pw[tot] = fpow(i, K);
  97. }
  98. for (int j = 1; j <= tot; ++j) {
  99. if (prime[j] > sqr / i)
  100. break;
  101. nonprime[i * prime[j]] = 1;
  102. if (i % prime[j] == 0)
  103. break;
  104. }
  105. }
  106. for (u32 i = 1; i <= N; ++i) {
  107. u32 r = N / (N / i);
  108. pos[++cnt] = N / i;
  109. h[cnt] = N / i - 1;
  110. if (N / i <= sqr)
  111. id[0][N / i] = cnt;
  112. else
  113. id[1][N / (N / i)] = cnt;
  114. i = r;
  115. }
  116. for (int j = 1; j <= tot; ++j) {
  117. for (int i = 1; i <= cnt && 1LL * prime[j] * prime[j] <= pos[i]; ++i) {
  118. int k = getpos(pos[i] / prime[j]);
  119. h[i] = h[i] - (h[k] - (j - 1));
  120. }
  121. }
  122. }
  123. u32 SF(u32 x, u32 y) {
  124. if (x <= 1 || prime[y] > x)
  125. return 0;
  126. if (hsh.count(mp(x, y)))
  127. return hsh.query(mp(x, y));
  128. ++rec;
  129. u32 res = pw[y - 1] * (h[getpos(x)] - (y - 1));
  130. for (u32 j = y; j <= tot && 1LL * prime[j] * prime[j] <= x; ++j) {
  131. int64 t1 = prime[j], t2 = 1LL * prime[j] * prime[j];
  132. for (int e = 1; t2 <= x; t1 = t2, t2 *= prime[j], ++e) {
  133. res += SF(x / t1, j + 1) + pw[j];
  134. }
  135. }
  136. // out(x);space;out(y);enter;
  137. // printf("%.3lf\n",(db)clock() / CLOCKS_PER_SEC);
  138. hsh.add(mp(x,y),res);
  139. return res;
  140. }
  141. u32 FF(u32 x) {
  142. if (vis[getpos(x)])
  143. return rf[getpos(x)];
  144. u32 res = SF(x, 1);
  145. for (u32 i = 2; i <= x; ++i) {
  146. u32 r = x / (x / i);
  147. res -= (r - i + 1) * FF(x / i);
  148. i = r;
  149. }
  150. vis[getpos(x)] = 1;
  151. rf[getpos(x)] = res;
  152. return res;
  153. }
  154. int main() {
  155. #ifdef ivorysi
  156. freopen("f1.in", "r", stdin);
  157. #endif
  158. read(N);
  159. read(K);
  160. sqr = sqrt(N);
  161. Process();
  162. u32 ans = 0;
  163. u32 pre = 0;
  164. for (u32 T = 1; T <= N; ++T) {
  165. u32 r = N / (N / T);
  166. u32 nw = FF(r);
  167. ans += (N / T) * (N / T) * (nw - pre);
  168. pre = nw;
  169. T = r;
  170. }
  171. out(ans);
  172. enter;
  173. // out(rec);enter;
  174. // printf("%.3lf\n",(db)clock() / CLOCKS_PER_SEC);
  175. return 0;
  176. }

【51nod】1847 奇怪的数学题

这个怎么跟上面那个题好像啊!

所以直接给出杜教筛的部分

\[S(n) = \sum_{i = 1}^{n} sgcd(n)^{k} - \sum_{i = 1}^{n}S(\lfloor \frac{n}{i} \rfloor)
\]

em……完全一样好吧

发现\(sgcd(n) = \frac{n}{min_{p}(n)}\),就是n除以最小质数

这个和g函数就已经很类似了……

考虑到\(g(n,j)\)求的是\([1,n]\)中的质数和最小质因子大于\(p_{j}\)的\(x^{k}\)和

然后只要枚举一个质数\(p_{i} * g(\lfloor \frac{n}{p_{i}}\rfloor,i - 1)\)就搞定了,最后再统计一遍纯质数的答案

不需要后面的那部分了

至于自然数幂和的那部分可以用乘方转斯特林数推一个公式出来

(还傻乎乎求了一遍后面的我真是zz)

  1. #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
  2. #include <bits/stdc++.h>
  3. #define fi first
  4. #define se second
  5. #define pii pair<int,int>
  6. #define mp make_pair
  7. #define pb push_back
  8. #define space putchar(' ')
  9. #define enter putchar('\n')
  10. #define eps 1e-10
  11. #define ba 47
  12. #define MAXN 100005
  13. //#define ivorysi
  14. using namespace std;
  15. typedef long long int64;
  16. typedef unsigned int u32;
  17. typedef double db;
  18. template<class T>
  19. void read(T &res) {
  20. res = 0;T f = 1;char c = getchar();
  21. while(c < '0' || c > '9') {
  22. if(c == '-') f = -1;
  23. c = getchar();
  24. }
  25. while(c >= '0' && c <= '9') {
  26. res = res * 10 +c - '0';
  27. c = getchar();
  28. }
  29. res *= f;
  30. }
  31. template<class T>
  32. void out(T x) {
  33. if(x < 0) {x = -x;putchar('-');}
  34. if(x >= 10) {
  35. out(x / 10);
  36. }
  37. putchar('0' + x % 10);
  38. }
  39. u32 N,sqr,K;
  40. u32 h[MAXN],g[MAXN],f[MAXN],pos[MAXN],id[2][MAXN],sum[MAXN],cnt;
  41. u32 prime[MAXN],tot,S[55][55],rec[55];
  42. bool nonprime[MAXN];
  43. u32 getpos(u32 x) {
  44. return x <= sqr ? id[0][x] : id[1][N / x];
  45. }
  46. u32 getsum(u32 x) {
  47. u32 res = 0;
  48. for(u32 j = 0 ; j <= K ; ++j) {
  49. if(x < j) break;
  50. u32 t = S[K][j];
  51. bool f = 0;
  52. for(u32 h = 0 ; h < j + 1 ; ++h) {
  53. u32 p = (x + 1 - h);
  54. if(!f && p % (j + 1) == 0) {f = 1;p /= j + 1;}
  55. t = t * p;
  56. }
  57. res += t;
  58. }
  59. return res;
  60. }
  61. u32 fpow(u32 x,u32 c) {
  62. u32 res = 1,t = x;
  63. while(c) {
  64. if(c & 1) res = res * t;
  65. t = t * t;
  66. c >>= 1;
  67. }
  68. return res;
  69. }
  70. void Process() {
  71. for(u32 i = 2 ; i <= sqr ; ++i) {
  72. if(!nonprime[i]) {
  73. prime[++tot] = i;
  74. sum[tot] = sum[tot - 1] + fpow(i,K);
  75. }
  76. for(int j = 1 ; j <= tot ; ++j) {
  77. if(prime[j] > sqr / i) break;
  78. nonprime[prime[j] * i] = 1;
  79. if(i % prime[j] == 0) break;
  80. }
  81. }
  82. S[0][0] = 1;
  83. for(int i = 1 ; i <= K ; ++i) {
  84. for(int j = 1 ; j <= i ; ++j) {
  85. S[i][j] = S[i - 1][j - 1] + j * S[i - 1][j];
  86. }
  87. }
  88. for(u32 i = 1 ; i <= N ; ++i) {
  89. u32 r = N / (N / i);
  90. pos[++cnt] = N / i;
  91. if(N / i <= sqr) id[0][N / i] = cnt;
  92. else id[1][N / (N / i)] = cnt;
  93. h[cnt] = N / i - 1;
  94. g[cnt] = getsum(N / i) - 1;
  95. i = r;
  96. }
  97. for(u32 j = 1 ; j <= tot ; ++j) {
  98. for(u32 i = 1 ; i <= cnt && 1LL * prime[j] * prime[j] <= pos[i] ; ++i) {
  99. u32 k = getpos(pos[i] / prime[j]);
  100. g[i] -= (sum[j] - sum[j - 1]) * (g[k] - sum[j - 1]);
  101. h[i] -= h[k] - (j - 1);
  102. f[i] += g[k] - sum[j - 1];
  103. }
  104. }
  105. for(int i = 1 ; i <= cnt ; ++i) f[i] += h[i];
  106. }
  107. bool vis[MAXN];
  108. u32 rs[MAXN];
  109. u32 UT(u32 n) {
  110. if(vis[getpos(n)]) return rs[getpos(n)];
  111. u32 res = f[getpos(n)];
  112. for(u32 i = 2 ; i <= n ; ++i) {
  113. u32 r = n / (n / i);
  114. res -= (r - i + 1) * UT(n / i);
  115. i = r;
  116. }
  117. vis[getpos(n)] = 1;rs[getpos(n)] = res;
  118. return res;
  119. }
  120. void Solve() {
  121. read(N);read(K);sqr = sqrt(N);
  122. Process();
  123. u32 ans = 0,pre = 0,nw;
  124. for(u32 i = 1 ; i <= N ; ++i) {
  125. u32 r = N / (N / i);
  126. nw = UT(r);
  127. ans += (N / i) * (N / i) * (nw - pre);
  128. pre = nw;
  129. i = r;
  130. }
  131. out(ans);enter;
  132. }
  133. int main(){
  134. #ifdef ivorysi
  135. freopen("f1.in","r",stdin);
  136. #endif
  137. Solve();
  138. return 0;
  139. }

可能是一篇(抄来的)min25学习笔记的更多相关文章

  1. 第三篇 功能实现(3) (Android学习笔记)

    第三篇 功能实现(3) ●发一个广播和启动一个隐式的Intent非常像,那么它们之间有什么区别呢? Implicit Intents (sent via startActivity( )) and B ...

  2. 第三篇 功能实现(2) (Android学习笔记)

    第三篇 功能实现(2) ●Activity的四种启动模式 Activity的启动模式有四种,分别是standard.singleTop.singleTask和singleInstance. 在Andr ...

  3. 第三篇 功能实现(1) (Android学习笔记)

    第三篇 功能实现(1) 第8章 Android应用程序组成 ●Android的一些中.底层基础知识 ※ Android Framework 启动过程 Android手机系统本质上是一个基于Linux的 ...

  4. 我的第一篇博客:requestAnimationFrame学习笔记

    通常,我们在浏览器中写动画会用到哪些技术呢? flash 可以实现一些非常复杂的动画,但随着HTML5的成熟,个人感觉flash终究会成为明日黄花. css3 当前大部分现代浏览器已经对css3支持的 ...

  5. Git-第五篇廖雪峰Git教程学习笔记(4)分支

    1.一开始,只有一个主分支(master),HEAD指向Master,而Master指向主分支.现在我们创建dev分支. lfy@lfy-PC MINGW64 /c/fyliu/lfyTemp/git ...

  6. Git-第四篇廖雪峰Git教程学习笔记(3)远程仓库,克隆远端库

    1.本次连接的是gitHub仓库. 1>创建SSH Key. ssh-keygen -t rsa -C "youremail@example.com" lfy@lfy-PC ...

  7. Git-第三篇廖雪峰Git教程学习笔记(2)回退修改,恢复文件

    1.工作区 C:\fyliu\lfyTemp\gitLocalRepository\yangjie 2.版本库 我们使用git init命令创建的.git就是我们的版本库.Git的版本库里存了很多东西 ...

  8. Git-第二篇廖雪峰Git教程学习笔记(1)基本命令,版本回退

    1.安装Git-2.16.2-64-bit.exe后,设置用户名,用户邮箱 #--global参数,表示你这台机器上所有的Git仓库都会使用这个配置,当然也可以对某个仓库指定不同的用户名和Email地 ...

  9. 这篇SpringBoot整合JSON的学习笔记,建议收藏起来,写的太细了

    前言 JSON(JavaScript Object Notation, JS 对象标记) 是一种轻量级的数据交换格式,目前使用特别广泛. 采用完全独立于编程语言的文本格式来存储和表示数据. 简洁和清晰 ...

随机推荐

  1. maven管理的jsp-web应用如何添加servlet、jsp相关依赖(org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp)

    明明tomcat下面就有这些包,然而还需要在maven依赖里面加上这个依赖 <!--引入Servlet开始--> <dependency> <groupId>jav ...

  2. ELK系列(7) - 测试环境下Logstash异常退出:block in multi_receive_encoded

    问题与分析 在本地测试无误后将ELK部署到了测试环境,结果第二天发现Logstash挂掉了,一开始以为是自动部署之类导致的问题.之后几天时间里Logstash总是会down掉,查看了下日志文件,发现报 ...

  3. WPF_AutoCompleteBox智能提示_Xml读写

    效果图 1.需要引用的DLL 2. Window.xaml <Window x:Class="自己的命名空间" xmlns="http://schemas.micr ...

  4. phpmyadmin个版本漏洞

    phpMyadmin各版本漏洞 一: 影响版本:3.5.x < 3.5.8.1 and 4.0.0 < 4.0.0-rc3 ANYUN.ORG 概述:PhpMyAdmin存在PREGREP ...

  5. Python 自学笔记(八)

    import math def A(a,b): print("第一个参数的值为"+str(a)) print("第一个参数的值为"+str(b)) a = 1 ...

  6. socket.io 消息发送

    socket.io学习笔记 1.服务器信息传输: 2.不分组,数据传输: 3.分组数据传输: 4.Socket.io难点大放送(暂时没有搞定): 服务器信息传输 1. // 发送到当前请求套接字客户端 ...

  7. ElasticSearch 6 安装、下载

    1,安装配置JDK 8 参考:官方文档 #为什么是JDK1.8?在ElasticSearch6.2.4中提到:JDK版本必须为:1.8.0_131 以上 > 1,安装JDK1.8-161 #解压 ...

  8. angular 中的dom操作(原生JS)

    <h2>这是一个home组件--DOM操作演示</h2> <div id="box"> this is box </div> < ...

  9. python开发-实现redis中的发布订阅功能

    Python3学习(二十七):python实现Redis的订阅与发布(sub-pub机制) 先介绍一下redis的pub/sub功能: Pub/Sub功能(means Publish, Subscri ...

  10. QML发布程序

    如果是在windows系统下,则最终打包成exe windeployqt  xxx.exe  -qmldir  C:\Qt\Qt5.9.6\5.9.6\mingw53_32\qml 注意使用Qt自己的 ...