09 2021 档案
摘要:前置知识: 容斥原理(可参考https://www.cnblogs.com/komet/p/15156521.html), 互质概念, 基础数学。 欧拉函数 φ(n) 定义为对正整数n,小于n的正整数中与n互质的数的数目。 通项公式为: 公式1 先不考虑欧拉函数具体是什么,我们先考虑它的定义——小于
阅读全文
摘要:struct seg { int l, r; int flag; int id; }s[N]; int split(int x, int y) { int cnt = 0; int flag=0; int fx = top[x], fy = top[y]; while (fx != fy) { if
阅读全文