记录一些经常被忽略的结论

  • \(n\) 个数的 \(mex\) 不会超过 \(n\)

  • \(n\) 个数的序列,任意长度为 \(k\) 的子段和都相同 \(to\) 序列循环,且循环节为 \(k\)

  • if a tree has a perfect matching, then this matching unique.

  • 遇到比较诡异的矩阵点之间的计数,可以考虑插多项式


记得 1ll<<x

倍增 LCA 记得设 dep[rot] = 1 否则 lca 的时候,如果一个点是rot,有可能另一个点会直接跳到0导致永远找不到LCA(或者把根的父亲设成自己)

posted @ 2021-03-12 17:54  SGCollin  阅读(88)  评论(0编辑  收藏  举报