QOJ.ac

QOJ

Type: Editorial

Status: Open

Posted by: jiangly

Posted at:

Last updated:

Back to Problem

题解

对任意的 $i,j$ 可以在 $O(S)$ 的时间内模拟。模拟的过程实际上只需要两个 bit,所以我们可以用 bitset 加速所有 $n$ 个集合的模拟,时间复杂度 $O(n^2 S/w)$。

Comments

No comments yet.