上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页
摘要: 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)
摘要: 参考博客: 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)
摘要: 参考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)
摘要: 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)
摘要: https://codeforces.com/contest/1186/problem/F 题解: 看到这样的限制不难联想到欧拉回路(一看就是倒着造的题)。 对每个联通块分开考虑。 考虑如果所有点都是偶数,那么随便找一个欧拉回路,交叉染色即可。 如果有奇点,建一个新点,奇点向新建中转点连虚边,然后跑 阅读全文
posted @ 2020-08-07 20:49 Cold_Chair 阅读(316) 评论(0) 推荐(0)
摘要: 参考博客: 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)
摘要: 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)
摘要: 曾经的博客: 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)
摘要: 参考博客: 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)
摘要: 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 下一页