
启发式合并
csu_xiji
这个作者很懒,什么都没留下…
展开
-
CSU 1811Intersection 线段树+启发式合并
http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1811 Bobo has a tree with n vertices numbered by 1,2,…,n and (n-1) edges. The i-th vertex has color c i, and the i-th edge connects vertices a i and ...原创 2020-01-11 18:52:23 · 157 阅读 · 0 评论 -
codeforces 1009F Dominant Indices Dsu on tree
https://codeforces.com/problemset/problem/1009/F You are given a rooted undirected tree consisting of n vertices. Vertex 1 is the root. Let’s denote a depth array of vertex x as an infinite sequence [...原创 2020-01-11 10:24:50 · 209 阅读 · 0 评论 -
codeforces 600E Lomsat gelral Dsu on tree
https://codeforces.com/problemset/problem/600/E You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour. Let’s call colour c dominating in the subtree of vertex v if ...原创 2020-01-11 10:01:59 · 209 阅读 · 0 评论 -
dsu on tree 入门
参考 https://www.cnblogs.com/zwfymqz/p/9683124.html 作者:自为风月马前卒 个人博客:http://attack204.com// 出处:http://zwfymqz.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任 感觉这个博主写的还是很好的,比较容...转载 2020-01-11 09:15:43 · 177 阅读 · 0 评论 -
HDU 6109 数据分割 set、并查集+启发式合并
http://acm.hdu.edu.cn/showproblem.php?pid=6109 Problem Description 小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统。 这个程序接受一些形如xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。 输入包含多组数据。 然而粗心的小w不幸地把每组数据之间的分隔符删掉了...原创 2020-01-10 17:59:31 · 275 阅读 · 0 评论 -
BZOJ 2809 [Apio2012]dispatching 贪心+启发式合并
https://www.lydsy.com/JudgeOnline/problem.php?id=2809 Description 在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿。在这个帮派里,有一名忍者被称之为 Master。除了 Master以外,每名忍者都有且仅有一个上级。为保密,同时增强忍者们的领导力,所有与他们工作相关的指令总是由上级发送给他的直接下属,而不允...原创 2020-01-10 12:19:50 · 162 阅读 · 0 评论