Skip to content

Commit

Permalink
Merge pull request OI-wiki#2984 from yyddm803/patch-3
Browse files Browse the repository at this point in the history
fix(mobius.md): 更改了“补充结论”中\iff和\implies的运用错误
  • Loading branch information
sshwy authored Feb 10, 2021
2 parents 211feb7 + 44281b8 commit 19d9309
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/dp/memo.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ emmmmmm……还是 ${30}$ 分。

然后?

开个数组 mem , 记录下来每个 dfs(pos,tleft) 的返回值。刚开始把 mem 中每个值都设成 $-1$(代表没访问过)。每次刚刚进入一个 dfs 前(我们的 dfs 是递归调用的嘛),都检测 mem\[pos]\[tleft]是否为 $-1$, 如果是就正常执行并把答案记录到 mem 中,否则?
开个数组 mem , 记录下来每个 dfs(pos,tleft) 的返回值。刚开始把 mem 中每个值都设成 $-1$(代表没访问过)。每次刚刚进入一个 dfs 前(我们的 dfs 是递归调用的嘛),都检测 mem\[pos]\[tleft] 是否为 $-1$, 如果是就正常执行并把答案记录到 mem 中,否则?

**直接返回 mem 中的值!**

Expand Down
2 changes: 1 addition & 1 deletion docs/math/bignum.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ $$
Big& operator=(const Big&);
Big operator+(const Big&) const;
Big operator-(const Big&) const;
Big operator*(const Big&)const;
Big operator*(const Big&) const;
Big operator/(const int&) const;
// TODO: Big / Big;
Big operator^(const int&) const;
Expand Down
4 changes: 2 additions & 2 deletions docs/math/mobius.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ $$

### 补充结论

反演结论:$\displaystyle [\gcd(i,j)=1] \iff\sum_{d\mid\gcd(i,j)}\mu(d)$
反演结论:$\displaystyle [\gcd(i,j)=1]=\sum_{d\mid\gcd(i,j)}\mu(d)$

**直接推导**:如果看懂了上一个结论,这个结论稍加思考便可以推出:如果 $\gcd(i,j)=1$ 的话,那么代表着我们按上个结论中枚举的那个 $n$ 是 $1$,也就是式子的值是 $1$,反之,有一个与 $[\gcd(i,j)=1]$ 相同的值:$0$

**利用 $\varepsilon$ 函数**:根据上一结论,$[\gcd(i,j)=1]\implies \varepsilon(\gcd(i,j))$,将 $\varepsilon$ 展开即可。
**利用 $\varepsilon$ 函数**:根据上一结论,$[\gcd(i,j)=1]=\varepsilon(\gcd(i,j))$,将 $\varepsilon$ 展开即可。

### 线性筛

Expand Down

0 comments on commit 19d9309

Please sign in to comment.