题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1101 直接莫比乌斯反演. 代码如下: #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; ; int pri[xn],cnt,mu[xn]; bool vis[xn]; int rd() { ,f=; char ch=ge…
反演套 DP 的好题(不用反演貌似也能做 Description Vivek initially has an empty array \(a\) and some integer constant \(m\). He performs the following algorithm: Select a random integer \(x\) uniformly in range from \(1\) to \(m\) and append it to the end of \(a\). Co…