版本比较
[RCOI] 集合的数 #1 题解
正文
增加 1 行删除 1 行
45 行未改动4647484950505152535477 行未改动45 行未改动
2. `tag`:对每个 $d \le B$,答案很显然为为 $\text{tag}[d] \times \left( \left\lfloor \frac{k}{d} \right\rfloor - \left\lfloor \frac{x}{d} \right\rfloor \right)$
- 总复杂度:$O(m (\sqrt{k}+\log{k})) \approx 9 \times 10^7。- 总复杂度:$O(m \sqrt{k}\log{k})$,能过。
## 代码```cpp#include<bits/stdc++.h>77 行未改动