会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Cold_Chair的博客
天天被锤爆!怎么办?菜哭了啊o(╥﹏╥)o
博客园
首页
新随笔
联系
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
28
下一页
2020年8月9日
洛谷P3332 [ZJOI2013]K大数查询(整体二分板题)
摘要: https://www.luogu.com.cn/problem/P3332 Code: #include<bits/stdc++.h> #define fo(i, x, y) for(int i = x, _b = y; i <= _b; i ++) #define ff(i, x, y) for
阅读全文
posted @ 2020-08-09 16:42 Cold_Chair
阅读(267)
评论(0)
推荐(0)
2020年8月8日
dij费用流模板
摘要: 参考博客: https://www.luogu.com.cn/blog/Mogician/Network-Flow-Guide 可以先了解了解johnson全源最短路算法。 核心思想为给每个点一个顶标,改边权为$h[x]+w-h[y]$。 如果顶标设的好(设为最短路),就可以保证边权非负,然后跑di
阅读全文
posted @ 2020-08-08 21:28 Cold_Chair
阅读(507)
评论(0)
推荐(0)
KM求每个大小的匹配的最优解 模板
摘要: 参考cz_xuyixuan的营员交流。 #include<bits/stdc++.h> #define fo(i, x, y) for(int i = x, _b = y; i <= _b; i ++) #define ff(i, x, y) for(int i = x, _b = y; i < _
阅读全文
posted @ 2020-08-08 20:03 Cold_Chair
阅读(304)
评论(2)
推荐(0)
JZOJ 5067. 【GDOI2017第二轮模拟day2】有理有据题 (KD-tree+历史最值问题)
摘要: https://gmoj.net/senior/#main/show/5067 题解: 考虑$[l,r]∩[x,y] \ne ∅$的充要条件是$max(l,x)\le min(r,y)$ 即$l \le y且 x \le r$ 那么每次相当于修改矩形内的点。 套上一个K-D tree,问题变成了:
阅读全文
posted @ 2020-08-08 11:30 Cold_Chair
阅读(315)
评论(0)
推荐(0)
2020年8月7日
Codeforces 1186F. Vus the Cossack and a Graph(欧拉回路)
摘要: https://codeforces.com/contest/1186/problem/F 题解: 看到这样的限制不难联想到欧拉回路(一看就是倒着造的题)。 对每个联通块分开考虑。 考虑如果所有点都是偶数,那么随便找一个欧拉回路,交叉染色即可。 如果有奇点,建一个新点,奇点向新建中转点连虚边,然后跑
阅读全文
posted @ 2020-08-07 20:49 Cold_Chair
阅读(316)
评论(0)
推荐(0)
利用powerful number筛积性函数前缀和
摘要: 参考博客: https://www.cnblogs.com/zzqsblog/p/9904271.html powerful number: 每个质因子指数$\ge 2$的数。 可以被$a2 b3(\mu(b) \not= 0)$唯一表示。 也可以被$ab^2(a|b)$唯一表示。 题外(power
阅读全文
posted @ 2020-08-07 19:45 Cold_Chair
阅读(359)
评论(0)
推荐(0)
2020年8月6日
bzoj#2095. [Poi2010]Bridges(二分+混合图欧拉回路)
摘要: https://darkbzoj.tk/problem/2095 https://blog.csdn.net/commonc/article/details/52442882 题解: pty说做过,但我不知道什么做过。 考虑二分答案,问题转换这个: 有一些有向边和无向边,你要给无向边定向,使得每个点
阅读全文
posted @ 2020-08-06 22:20 Cold_Chair
阅读(228)
评论(0)
推荐(0)
2020年8月5日
二维最小乘积生成树模板
摘要: 曾经的博客: https://blog.csdn.net/cold_chair/article/details/77200459 板题: https://www.luogu.com.cn/problem/P5540 Code: #include<bits/stdc++.h> #define fo(i
阅读全文
posted @ 2020-08-05 16:34 Cold_Chair
阅读(244)
评论(0)
推荐(0)
2020年8月4日
图论:tarjan相关算法复习
摘要: 参考博客: https://blog.csdn.net/izumi_hanako/article/details/78082544 我以前的博客: https://blog.csdn.net/Cold_Chair/article/details/79918157 1.割点 对于一个无向连通图,如果有
阅读全文
posted @ 2020-08-04 11:52 Cold_Chair
阅读(224)
评论(0)
推荐(0)
Codeforces 321E. Ciel and Gondolas(凸优化+决策单调性)
摘要: http://codeforces.com/contest/321/problem/E 题解: 如标题。 Code: #include<bits/stdc++.h> #define fo(i, x, y) for(int i = x, _b = y; i <= _b; i ++) #define f
阅读全文
posted @ 2020-08-04 10:51 Cold_Chair
阅读(252)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
···
28
下一页
公告