会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
_年少有为
因为CSDN编辑博客比较方便,所以日常博客在CSDN,链接:https://blog.csdn.net/Dch19990825
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
18
下一页
2018年12月26日
欧拉,素数,莫比乌斯反演函数筛法
摘要: 欧拉,素数,莫比乌斯反演函数筛法此筛法依据原理:每个合数肯定能被自己的最小素因子筛到,即val=素数*数。若没被筛到则为素数#include#include#include#include#include#include#include#include#de...
阅读全文
posted @ 2018-12-26 15:55 _年少有为
阅读(212)
评论(0)
推荐(0)
2018年12月19日
W - Blocks(POJ3734 矩阵快速幂)
摘要: W - BlocksPanda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to thi...
阅读全文
posted @ 2018-12-19 21:16 _年少有为
阅读(172)
评论(0)
推荐(0)
U - The Balance(动态规划,HDU(1709))
摘要: U - The BalanceNow you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always...
阅读全文
posted @ 2018-12-19 20:52 _年少有为
阅读(214)
评论(0)
推荐(0)
I - GCD(莫比乌斯反演欧拉函数,HDU1695)
摘要: I - GCD(莫比乌斯反演/欧拉函数,HDU1695)Given 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) mean...
阅读全文
posted @ 2018-12-19 20:50 _年少有为
阅读(286)
评论(1)
推荐(0)
2018年12月16日
V - 排列组合 HDU(1521)
摘要: V - 排列组合 HDU(1521)有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有"AB","BA"两种。Input每组输入数据有两行,第一行是二个数n,m(1#inclu...
阅读全文
posted @ 2018-12-16 21:42 _年少有为
阅读(193)
评论(0)
推荐(0)
2018年12月13日
归并排序求逆序数
摘要: 归并排序求逆序数例题:nyoj117117-求逆序数内存限制:64MB 时间限制:2000ms 特判: No通过数:33 提交数:90 难度:5题目描述:在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排...
阅读全文
posted @ 2018-12-13 21:31 _年少有为
阅读(505)
评论(0)
推荐(0)
牛客网第十五届浙江大学宁波理工学院程序设计大赛(同步赛)L题The Last Stand
摘要: 牛客网第十五届浙江大学宁波理工学院程序设计大赛(同步赛)The Last Stand题意不在描述分析:简单dp dp[i]表示经过第i个点时候的最大能量(不选)那么dp[i]=max(dp[j]+val[j]+(pos[i]−pos[j])∗delta[j...
阅读全文
posted @ 2018-12-13 12:32 _年少有为
阅读(177)
评论(0)
推荐(0)
Codeforces Round #525 (Div2)D. Ehab and another another xor problem
摘要: Codeforces Round #525 (Div. 2) D. Ehab and another another xor problem链接:https://codeforces.com/contest/1088/problem/D题意:让你猜两个整数a...
阅读全文
posted @ 2018-12-13 12:23 _年少有为
阅读(147)
评论(0)
推荐(0)
2018年12月12日
容斥的几种写法
摘要: 容斥的几种写法容斥公式本身就是 枚举出状态的组合,算其乘积,奇数个值为负,偶数个值为正原理:对于组合中每个状态有 在或不在两种,求其组合,可以用二进制枚举,也可以用递归二进制两层for循环递归#include#include#include#include#...
阅读全文
posted @ 2018-12-12 21:34 _年少有为
阅读(450)
评论(0)
推荐(0)
欧拉函数的求法
摘要: 欧拉函数的求法证明过程暂不讨论单个求欧拉函数long long eular(long long n){ long long ans=n; for(int i=2;i*i1) ans-=ans/n; return ans;}筛法...
阅读全文
posted @ 2018-12-12 19:52 _年少有为
阅读(799)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
18
下一页
公告