
点分治
zsyz_ZZY
Be the stronger one!
展开
-
点分治学习笔记 & luogu P3806 【模板】点分治1
背景:好久没看。忘记了。题目传送门:https://www.luogu.org/problemnew/show/P3806思路:点分治模板。留下一个模板。代码:#include<cstdio>#include<cstring>#include<algorithm>#define INF 2147483647using name...原创 2019-04-11 09:46:18 · 352 阅读 · 0 评论 -
luogu P2634 [国家集训队]聪聪可可
背景:hehe...hehe...hehe...题目传送门:https://www.luogu.org/problemnew/show/P2634题意:在树上选两个点权值和是333的倍数的概率。思路:点分治模板。这一就不用两重循环暴力了,因为mod  3=0\mod 3=0mod3=0就两种情况:0+0,1+20+...原创 2019-04-11 11:50:36 · 310 阅读 · 0 评论 -
luogu P2664 树上游戏
背景:hehe...hehe...hehe...题目传送门:https://www.luogu.org/problemnew/show/P2664题意:一棵树,每一个点有一个颜色,定义si,js_{i,j}si,j为iii到jjj的颜色数量,求所有sumi=∑j=1nsi,jsum_i=\sum_{j=1}^{n}{s_{i,j}}sumi=∑j=1nsi,j。思路...原创 2019-04-12 13:33:14 · 377 阅读 · 0 评论 -
luogu P4178 Tree
背景:hehe...hehe...hehe...题目传送门:https://www.luogu.org/problemnew/show/P4178题意:一棵树,问树上最短距离不大于kkk的点对数。思路:原创 2019-04-12 15:01:14 · 253 阅读 · 0 评论 -
luogu P4149 [IOI2011]Race
背景:物理竞赛强势看错∞∞∞道题。这么水的题目,可是还是太粗心了(毒奶一口,没奖)。要被班主任骂死了。数理化信竞赛均爆炸(不过也不重要了)。题目传送门:https://www.luogu.org/problemnew/show/P4149题意:一棵树,选出尽量少的边使全值和为mmm。思路:坑。。。...原创 2019-04-14 15:02:07 · 288 阅读 · 0 评论 -
(坑)动态点分治学习笔记 & luogu P2056 [ZJOI2007]捉迷藏 & P4115 Qtree4 & SP2666 QTREE4 - Query on a tree IV
坑…原创 2019-04-14 21:00:12 · 171 阅读 · 0 评论