Loading docs/math/mobius.md +6 −11 Original line number Diff line number Diff line Loading @@ -185,7 +185,6 @@ $$ 由于 $\mu$ 函数为积性函数,因此可以线性筛莫比乌斯函数(线性筛基本可以求所有的积性函数,尽管方法不尽相同)。 ???+ note "线性筛实现" ```cpp void getMu() { mu[1] = 1; Loading Loading @@ -321,7 +320,6 @@ $$ **时间复杂度 $\Theta(N+T\sqrt{n})$ ** ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -419,7 +417,6 @@ $$ **时间复杂度** : $\Theta(n\log n)$ ??? note "代码实现" ```cpp #include <cstdio> const int N = 1000000; Loading Loading @@ -528,7 +525,6 @@ $$ 时间复杂度: $\Theta(n+m)$ (两次数论分块) ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -641,7 +637,6 @@ $$ 那么 $O(n)$ 预处理 $\mu,d$ 的前缀和, $O(\sqrt{n})$ 分块处理询问,总复杂度 $O(n\sqrt{n})$ . ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -735,7 +730,6 @@ $$ 分块递归求解即可,复杂度 $O(n^{\frac{2}{3}})$ . ??? note "代码实现" ```cpp #include <cmath> #include <cstdio> Loading Loading @@ -802,6 +796,7 @@ $$ return 0; } //不要为了省什么内存把数组开小。。。卡了好几次80 ``` **解法二** 转化一下,可以将式子写成 Loading docs/misc/gray-code.md +1 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ int rev_g(int g) { ## 习题 - [CSP S2 2019 D1T1](https://www.luogu.org/problem/P5657) Difficulty: easy - [SGU #249 Matrix](http://codeforces.com/problemsets/acmsguru/problem/99999/249) Difficulty: medium - 2019 CSP-S D1T1 Loading Loading
docs/math/mobius.md +6 −11 Original line number Diff line number Diff line Loading @@ -185,7 +185,6 @@ $$ 由于 $\mu$ 函数为积性函数,因此可以线性筛莫比乌斯函数(线性筛基本可以求所有的积性函数,尽管方法不尽相同)。 ???+ note "线性筛实现" ```cpp void getMu() { mu[1] = 1; Loading Loading @@ -321,7 +320,6 @@ $$ **时间复杂度 $\Theta(N+T\sqrt{n})$ ** ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -419,7 +417,6 @@ $$ **时间复杂度** : $\Theta(n\log n)$ ??? note "代码实现" ```cpp #include <cstdio> const int N = 1000000; Loading Loading @@ -528,7 +525,6 @@ $$ 时间复杂度: $\Theta(n+m)$ (两次数论分块) ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -641,7 +637,6 @@ $$ 那么 $O(n)$ 预处理 $\mu,d$ 的前缀和, $O(\sqrt{n})$ 分块处理询问,总复杂度 $O(n\sqrt{n})$ . ??? note "代码实现" ```cpp #include <algorithm> #include <cstdio> Loading Loading @@ -735,7 +730,6 @@ $$ 分块递归求解即可,复杂度 $O(n^{\frac{2}{3}})$ . ??? note "代码实现" ```cpp #include <cmath> #include <cstdio> Loading Loading @@ -802,6 +796,7 @@ $$ return 0; } //不要为了省什么内存把数组开小。。。卡了好几次80 ``` **解法二** 转化一下,可以将式子写成 Loading
docs/misc/gray-code.md +1 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ int rev_g(int g) { ## 习题 - [CSP S2 2019 D1T1](https://www.luogu.org/problem/P5657) Difficulty: easy - [SGU #249 Matrix](http://codeforces.com/problemsets/acmsguru/problem/99999/249) Difficulty: medium - 2019 CSP-S D1T1 Loading