会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Canopus_wym
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
2019年1月7日
Luogu P4844 LJJ爱数数
摘要: 题目链接https://www.luogu.org/problemnew/show/P4844题解1a+1b=1c\frac{1}{a}+\frac{1}{b}=\frac{1}{c}a1+b1=c1即bc+ac=(a+b)c=abbc+ac=(a+b...
阅读全文
posted @ 2019-01-07 11:45 Canopus_wym
阅读(226)
评论(0)
推荐(0)
编辑
Luogu P4240 毒瘤之神的考验
摘要: 题目链接https://www.luogu.org/problemnew/show/P4240题解容易发现φ(ij)=φ(i)φ(j)gcd(i,j)φ(gcd(i,j))\varphi(ij)=\frac{\varphi(i)\varphi(j)\gc...
阅读全文
posted @ 2019-01-07 11:29 Canopus_wym
阅读(195)
评论(0)
推荐(0)
编辑
Luogu P3768 简单的数学题
摘要: 题目链接https://www.luogu.org/problemnew/show/P3768题解反演一发得到∑T=1n(∑i=1⌊n/T⌋i)2T2φ(T)\sum_{T=1}^n (\sum_{i=1}^{\lfloor n/T\rfloor}i)^2T...
阅读全文
posted @ 2019-01-07 11:14 Canopus_wym
阅读(145)
评论(0)
推荐(0)
编辑
Luogu P4450 双亲数
摘要: 题目链接https://www.luogu.org/problemnew/show/P4450题解直接反演一下就好了,甚至都不用整除分块……代码#include #include int read(){ int x=0,f=1; char ch=getc...
阅读全文
posted @ 2019-01-07 11:07 Canopus_wym
阅读(143)
评论(0)
推荐(0)
编辑
Luogu P3935 Calculating
摘要: 题目链接https://www.luogu.org/problemnew/show/P3935题解可以看出fff函数就是约数个数。直接O(n)O(\sqrt{n})O(n)求约数个数函数的前缀和即可。代码#include templateT read(){...
阅读全文
posted @ 2019-01-07 11:04 Canopus_wym
阅读(108)
评论(0)
推荐(0)
编辑
BZOJ 4805 欧拉函数求和
摘要: 题目链接https://lydsy.com/JudgeOnline/problem.php?id=4805题解直接杜教筛筛φ\varphiφ函数即可。代码#include #include #include int read(){ int x=0,f=1;...
阅读全文
posted @ 2019-01-07 11:01 Canopus_wym
阅读(142)
评论(0)
推荐(0)
编辑
BZOJ 4407 于神之怒加强版
摘要: 题目链接https://lydsy.com/JudgeOnline/problem.php?id=4407题解反演∑T=1min(n,m)⌊nT⌋⌊mT⌋∑d∣Tdkμ(Td)\sum_{T=1}^{\min(n,m)}\lfloor\frac{n}{T}...
阅读全文
posted @ 2019-01-07 10:59 Canopus_wym
阅读(147)
评论(0)
推荐(0)
编辑
BZOJ 3930 [CQOI2015]选数
摘要: 题目链接https://lydsy.com/JudgeOnline/problem.php?id=3930题解反演得到∑i=1⌊h/k⌋μ(i)(⌊hki⌋−⌊l−1ki⌋)n\sum_{i=1}^{\lfloor h/k\rfloor} \mu(i) (\...
阅读全文
posted @ 2019-01-07 10:52 Canopus_wym
阅读(220)
评论(0)
推荐(0)
编辑
BZOJ 3994 [SDOI2015]约数个数和
摘要: 题目链接https://lydsy.com/JudgeOnline/problem.php?id=3994题解莫比乌斯反演得到∑k=1nμ(k)∑i=1⌊n/k⌋σ0(i)∑i=1⌊n/k⌋σ0(i)\sum_{k=1}^{n} \mu(k)\sum_{i=...
阅读全文
posted @ 2019-01-07 10:46 Canopus_wym
阅读(150)
评论(0)
推荐(0)
编辑
BZOJ 4176 Lucas的数论
摘要: 题目链接https://lydsy.com/JudgeOnline/problem.php?id=4176题解莫比乌斯反演得到∑k=1nμ(k)∑i=1⌊n/k⌋σ0(i)∑i=1⌊n/k⌋σ0(i)\sum_{k=1}^{n} \mu(k)\sum_{i=...
阅读全文
posted @ 2019-01-07 10:43 Canopus_wym
阅读(154)
评论(0)
推荐(0)
编辑
公告