上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 27 下一页
摘要: 曾经的博客: 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 阅读(225) 评论(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 阅读(191) 评论(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 阅读(229) 评论(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 阅读(223) 评论(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 阅读(314) 评论(0) 推荐(0)
摘要: https://loj.ac/problem/576 题解: 考虑询问了区间$[l,r]$,就知道了和,也就知道了$s[r]$和$s[l-1]$的差。 那么给$r$和$l-1$连一条边,我们相当于要搞出点为$0..n$的最小生成树。 运用kruskal的想法,每次找最小的连接不同联通块的边,发现一定 阅读全文
posted @ 2020-08-01 10:59 Cold_Chair 阅读(408) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P4707 题解: 扩展min-max容斥见: https://www.cnblogs.com/coldchair/p/13404911.html 一开始使$k=n-k+1$,意义转为第$k$大。 然后套容斥: \(\sum_{T} 阅读全文
posted @ 2020-07-30 20:34 Cold_Chair 阅读(161) 评论(0) 推荐(0)
摘要: http://uoj.ac/problem/193 题解: 考虑先求出$f[S]$表示$S$这个点集的基环树个数。 可以先求$f_[S]$表示$S$点集成环的方案数: $dp[S][i]$表示已选$S$中的点,最后一个是$i$,的方案数,每次只能新加一个比$S$最小大的点,这样每个$\ge 3$环会 阅读全文
posted @ 2020-07-30 19:30 Cold_Chair 阅读(325) 评论(0) 推荐(0)
摘要: \(n^m=e^{nx}[x^m] \times m!\),这么做的好处是指数固定。 \(=\sum_{i=0}^n e^{ix} [x^m] \times m!\) \(=\frac{e^{(n+1)x} - 1}{e^x-1} [x^m] \times m!\) 上下同除一个$x$先,多项式求逆 阅读全文
posted @ 2020-07-29 20:24 Cold_Chair 阅读(196) 评论(0) 推荐(0)
摘要: http://uoj.ac/problem/217 题解: 考虑查询一个区间,遍历到的叶子一定是右儿子、右儿子、……、左儿子、左儿子。 反过来,值域连续的这样的若干节点也唯一对应一个区间。 所以右儿子给值域相邻的右、左儿子连边,左儿子只给左儿子连边,问题相当于最小路径覆盖(每个点可以被覆盖无限次,有 阅读全文
posted @ 2020-07-29 20:13 Cold_Chair 阅读(260) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 27 下一页