树上启发式合并
文章平均质量分 56
czdb
这个作者很懒,什么都没留下…
展开
-
树上启发式合并 E. Lomsat gelral Educational Codeforces Round 2
E. Lomsat gelral time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputYou are given a rooted tree with root in vertex 1. Each vertex i...原创 2018-07-18 15:52:19 · 209 阅读 · 0 评论 -
F. Dominant Indices Educational Codeforces Round 47 (Rated for Div. 2)(树上启发式合并)
F. Dominant Indices time limit per test 4.5 seconds memory limit per test 512 megabytes input standard input output standard outputYou are given a rooted undirected tree consisting of n ver...原创 2018-07-18 17:29:04 · 226 阅读 · 0 评论 -
2019西安邀请赛 J and and and(树上启发式合并)
链接 https://nanti.jisuanke.com/t/39277分两种情况讨论即可,路径为一条链和不为一条链的即可启发式合并维护 olognac代码`#include#include#include#include#include#define fi first#define se second#define lson l,mid,rt<<1#def...原创 2019-05-27 19:29:00 · 462 阅读 · 0 评论