会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shuguangzw
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
11
12
13
14
15
16
17
18
19
···
30
下一页
2016年5月4日
FZU 2233 ~APTX4869 贪心+并查集
摘要: 分析:http://blog.csdn.net/chenzhenyu123456/article/details/51308460 #include <cstdio> #include <cstring> #include <queue> #include <set> #include <map>
阅读全文
posted @ 2016-05-04 14:03 shuguangzw
阅读(210)
评论(0)
推荐(0)
2016年5月3日
FZU2232 炉石传说 最大匹配
摘要: 思路:正好是二分图,自己敌人,符合条件的随从二人组建边,最大匹配为n是符合要求 #include <cstdio> #include <cstring> #include <queue> #include <set> #include <map> #include <stack> #include
阅读全文
posted @ 2016-05-03 23:05 shuguangzw
阅读(172)
评论(0)
推荐(0)
FZU 2237 中位数 主席树 树上k大
摘要: #include <cstdio> #include <cstring> #include <queue> #include <set> #include <stack> #include <cstdlib> #include <algorithm> #include <time.h> #inclu
阅读全文
posted @ 2016-05-03 18:06 shuguangzw
阅读(256)
评论(0)
推荐(0)
2016年5月2日
CodeForcesGym 100753B Bounty Hunter II 二分图最小路径覆盖
摘要: 关键在建图 题解:http://www.cnblogs.com/crackpotisback/p/4856159.html 学习:http://www.cnblogs.com/jackiesteed/articles/2043934.html
阅读全文
posted @ 2016-05-02 15:31 shuguangzw
阅读(128)
评论(0)
推荐(0)
2016年5月1日
NOIP2010关押罪犯 二分+二染色
摘要: 这个题一上来 没有思路,后来想没有思路就二分吧 那么我们来二分 首先,大于当前的mid值的关系,不能出现在一个集合里 (即关系形成的图是一个二分图,判定二分图可以二染色) 如果不能形成二分图,那么说明有些关系要在一个集合里,那就向上二分 否则向下二分 #include<cstdio> #includ
阅读全文
posted @ 2016-05-01 20:58 shuguangzw
阅读(155)
评论(0)
推荐(0)
POJ2236 Wireless Network 并查集
摘要: 水题 #include<cstdio> #include<cstring> #include<queue> #include<set> #include<cstdlib> #include<algorithm> #include<vector> #include<cmath> using names
阅读全文
posted @ 2016-05-01 17:40 shuguangzw
阅读(125)
评论(0)
推荐(0)
2016年4月27日
BZOJ2301: [HAOI2011]Problem b 莫比乌斯反演
摘要: 分析:对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。 然后对于求这样单个的gcd(x,y)=k的,我们通常采用莫比乌斯反演 但是,时间复杂度是O(n*(n/k))的,当复杂度很坏的时候,当k=1时,
阅读全文
posted @ 2016-04-27 21:42 shuguangzw
阅读(138)
评论(0)
推荐(0)
BZOJ2005: [Noi2010]能量采集 莫比乌斯反演的另一种方法——nlogn筛
摘要: 分析:http://www.cnblogs.com/huhuuu/archive/2011/11/25/2263803.html 注:从这个题收获了两点 1,第一象限(x,y)到(0,0)的线段上整点的个数是gcd(x,y) 2,新学了一发求gcd(x,y)=k有多少对的姿势,已知0<x<=n,0<
阅读全文
posted @ 2016-04-27 20:40 shuguangzw
阅读(253)
评论(0)
推荐(1)
BZOJ2818: Gcd 莫比乌斯反演
摘要: 分析:筛素数,然后枚举,莫比乌斯反演,然后关键就是分块加速(分块加速在上一篇文章) #include<cstdio> #include<cstring> #include<queue> #include<cstdlib> #include<algorithm> #include<vector> #i
阅读全文
posted @ 2016-04-27 19:18 shuguangzw
阅读(173)
评论(0)
推荐(0)
HDU 4746 Mophues 莫比乌斯反演
摘要: 分析: http://blog.csdn.net/acdreamers/article/details/12871643 分析参见这一篇 http://wenku.baidu.com/view/fbe263d384254b35eefd34eb.html 分块看这一篇 #include<cstdio>
阅读全文
posted @ 2016-04-27 18:42 shuguangzw
阅读(157)
评论(0)
推荐(0)
上一页
1
···
11
12
13
14
15
16
17
18
19
···
30
下一页
公告