Mobius
yysys
yysys
展开
-
BZOJ 2440: [中山市选2011]完全平方数
二分,然后用莫比乌斯做就行了... #include using namespace std; typedef long long LL; const int maxn = 50005; int not_prime[maxn]; int prime[maxn]; int mu[maxn]; int K, p_cnt; void Init() { mu[1] = 1; p_cnt =原创 2015-09-30 15:06:24 · 602 阅读 · 0 评论 -
mobius HDOJ 5468 Puzzled Elena
dfs遍历树+莫比乌斯反演.. #include using namespace std; typedef long long LL; const int maxn = 100005; const int maxm = 200005; struct Edge { int v; Edge *next; }E[maxm], *H[maxn], *edges; int not_prime[原创 2015-10-02 19:37:12 · 475 阅读 · 0 评论