上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 问题描述 "CF915E" "LG CF915E" 题解 $n \le 10^9$ 看上去非常唬人。 但是这种区间操作的题,珂朵莉树随便跑啊。 $\mathrm{Code}$ 阅读全文
posted @ 2019-11-03 21:57 览遍千秋 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "LG CF343D" 题解 树剖,线段树维护0 1序列 yzhang:用珂朵莉树维护多好 $\mathrm{Code}$ cpp include using namespace std; template void read(Tp &x){ x=0;char ch=1;int fh; w 阅读全文
posted @ 2019-11-03 21:20 览遍千秋 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "CF896C" "LG CF896C" 题解 我expect就是T飞,从这里跳下去,也不碰和珂朵莉相关的任何东西。 珂朵莉树真好使。 珂朵莉树模板。 $\mathrm{Code}$ cpp include using namespace std; define int long long 阅读全文
posted @ 2019-11-03 17:45 览遍千秋 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "LG2495" 题解 虚树 $\mathrm{Code}$ 阅读全文
posted @ 2019-11-02 21:29 览遍千秋 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 先开坑。 md原题写挂我也真是。。。 100+20+10 白夜 打表大法吼 显然,不在环上的点对答案的贡献是 $(k cycle)^{k 1}$ 。 打表得到环上的递推式,矩阵一下乘起来就好了。 cpp include using namespace std; define int long lon 阅读全文
posted @ 2019-11-02 11:01 览遍千秋 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "LG1345" 题解 点边转化,最小割,完事。 $\mathrm{Code}$ cpp include using namespace std; template void read(Tp &x){ x=0;char ch=1;int fh; while(ch!=' '&&(ch '9' 阅读全文
posted @ 2019-11-01 21:55 览遍千秋 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "LG1344" 题解 我太菜了,我一开始竟然没有看出这是个最小割裸题。。。 两个询问。 第一个询问,直接跑最小割就好了。 第二个询问,建图的时候边权建 $1$ ,代表割掉这条边需要 $1$ 的代价。 $\mathrm{Code}$ cpp include using namespace 阅读全文
posted @ 2019-11-01 21:35 览遍千秋 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 问题描述 "POJ1741" 题解 题意是求树上满足两点之间距离 $dis \le k$ 的点对 $(x,y)$ 的数目。 点分治。 $\mathrm{Code}$ cpp include include include include using namespace std; template v 阅读全文
posted @ 2019-11-01 15:12 览遍千秋 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 写在前面 先开个坑... 之前学过点分治,但是总是感觉打的时候内心莫名的慌,敲完几个函数的定义就开始脑袋一片空白。 所以重学了一下点分治,并写了这篇博客。 看看什么时候把它补完吧。 \(\mathrm{1}\) 参考资料 找了两篇还不错的博客 https://www.cnblogs.com/bztM 阅读全文
posted @ 2019-11-01 15:04 览遍千秋 阅读(303) 评论(2) 推荐(2) 编辑
摘要: 问题描述 "LG SP2713" 题解 分块,区间开根。 如果一块的最大值是 $1$ ,那么这个块就不用开根了。 如果最大值不是 $1$ ,直接暴力开就好了。 $\mathrm{Code}$ cpp include using namespace std; define int long long 阅读全文
posted @ 2019-11-01 10:19 览遍千秋 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页