对任意的 $i,j$ 可以在 $O(S)$ 的时间内模拟。模拟的过程实际上只需要两个 bit,所以我们可以用 bitset 加速所有 $n$ 个集合的模拟,时间复杂度 $O(n^2 S/w)$。
QOJ.ac
QOJ
As we are currently experiencing an overwhelming number of web requests for fetching user submissions, we have temporarily disabled the full submissions list. You must now be logged in to view submissions.
Discussion #170 for Problem #4276. Balls and Holes
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2025-12-12 23:48:07
Last updated: 2025-12-12 23:48:11
题解
Comments
No comments yet.