原文:POJ 1741 Tree (树分治入门)

Tree Time Limit: MS Memory Limit: K Total Submissions: Accepted: Description Give a tree with n vertices,each edge has a length positive integer less than . Define dist u,v The min distance between n ...

2013-12-02 23:26 5 4074 推荐指数:

查看详情

poj1741Tree 的点分治

题目描述 Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u ...

Thu Mar 30 04:56:00 CST 2017 0 2388
POJ 2808 校门外的(线段入门

题目描述 某校大门外长度为L的马路上有一排,每两棵相邻的之间的间隔都是1米。我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置;数轴上的每个整数点,即0,1,2,……,L,都种有一棵。 马路上有一些区域要用来建地铁,这些区域用它们在数 ...

Tue Sep 13 17:56:00 CST 2016 0 1978
【AtCoder3611】Tree MST(点分治,最小生成

【AtCoder3611】Tree MST(点分治,最小生成) 题面 AtCoder 洛谷 给定一棵\(n\)个节点的,现有有一张完全图,两点\(x,y\)之间的边长为\(w[x]+w[y]+dis(x,y)\),其中\(dis\)表示树上两点的距离。 求完全图的\(MST\)。 题解 ...

Fri Mar 01 23:16:00 CST 2019 8 469
POJ3714 Raid(最近点对、分治

题目链接:   http://poj.org/problem?id=3714 题目描述: Raid Description After successive failures in the battles against the Union, the Empire ...

Wed Jul 12 22:14:00 CST 2017 0 1931
线段分治

以时间为下标建线段,则持续[L, R]时间的一个事物就能被表示成logn段区间。 这样就避免删除只有插入。 例题: bzoj4644 经典傻逼题 每个点的点权为与它相连的边的权值异或和。求最大权点集即可。 线段分治 + 线性基 + bitset ...

Fri Feb 22 19:52:00 CST 2019 0 756
线段分治总结

目录 类型一 例题1:八纵八横 代码: 例题2:时空旅行 代码: 类型二 首先,要求可以离线。 线段分治有两种。 类型一 操作基于区间,单点询问 ...

Tue Oct 01 06:02:00 CST 2019 0 501
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM