版本比较
?
正文
增加 15 行删除 2 行
12345615 行未改动22232425不定期整理神秘公式## $\mu^2(n)$ 前缀和先来证一个神秘的东西:15 行未改动$$S(n) = \sum_{i = 1}^n \sum_{d^2 \mid i} \mu (d) \\ = \sum_{d=1}^{\lfloor \sqrt n \rfloor} \mu (d) \lfloor \dfrac{n}{d^2} \rfloor$$我们可以 $O(\sqrt n)$ 实现这玩意了。123415 行未改动20212223242526272829303132333435363738## $\mu^2(n)$ 前缀和先来证一个神秘的东西:15 行未改动$$S(n) = \sum_{i = 1}^n \sum_{d^2 \mid i} \mu (d) \\ = \sum_{d=1}^{\lfloor \sqrt n \rfloor} \mu (d) \lfloor \dfrac{n}{d^2} \rfloor$$我们可以 $O(\sqrt n)$ 实现这玩意了。关联题目:P4318## 广义矩阵乘法这里列举几个,形式如 $C_{i,j} = \bigoplus _k ({A_{i,k} \bigotimes B_{k,j}})$。满足条件当且仅当 $\oplus$ 满足交换律和结合律,且 $\otimes$ 对 $\oplus$ 满足左右分配律。* $\oplus$ 为 $\min / \max$,$\otimes$ 为 $+$;* $\oplus$ 为逻辑或,$\otimes$ 为逻辑与;* $\oplus$ 为 $\min$,$\otimes$ 为 $\max$;* $\oplus$ 为 $\max$,$\otimes$ 为 $\min$;* $\oplus$ 为 $\max$,$\otimes$ 为 $\times$;* $\oplus$ 为集合并,$\otimes$ 为字符串连接;