上一页 1 2 3 4 5 6 7 8 9 ··· 24 下一页
摘要: 参考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 阅读(273) 评论(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 阅读(283) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1186/problem/F 题解: 看到这样的限制不难联想到欧拉回路(一看就是倒着造的题)。 对每个联通块分开考虑。 考虑如果所有点都是偶数,那么随便找一个欧拉回路,交叉染色即可。 如果有奇点,建一个新点,奇点向新建中转点连虚边,然后跑 阅读全文
posted @ 2020-08-07 20:49 Cold_Chair 阅读(281) 评论(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 阅读(333) 评论(0) 推荐(0) 编辑
摘要: https://darkbzoj.tk/problem/2095 https://blog.csdn.net/commonc/article/details/52442882 题解: pty说做过,但我不知道什么做过。 考虑二分答案,问题转换这个: 有一些有向边和无向边,你要给无向边定向,使得每个点 阅读全文
posted @ 2020-08-06 22:20 Cold_Chair 阅读(208) 评论(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 阅读(221) 评论(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 阅读(184) 评论(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 阅读(219) 评论(0) 推荐(0) 编辑
摘要: https://gmoj.net/senior/#main/show/5031 题解: 只是做这题当然是不用DGF的,可以直接上组合数。 定义$f$函数的导为$f(n)'=f(n)\times \omega(n)$ 其中$\omega(n)$为$n$分解质因数后指数和。 那么就可以得出$ln(F)$ 阅读全文
posted @ 2020-08-03 15:37 Cold_Chair 阅读(222) 评论(0) 推荐(0) 编辑
摘要: https://csacademy.com/contest/archive/task/yurys-tree https://csacademy.com/submission/2761667/ 题解: kruskal重构树的$log^2$做法非常显然,这里就不讲了。 这里讲讲有根树的点分治做法。 依旧 阅读全文
posted @ 2020-08-02 22:48 Cold_Chair 阅读(274) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 24 下一页