线段树
文章平均质量分 79
__1_1__
这个作者很懒,什么都没留下…
展开
-
图的生成树(数链剖分+线段树)
题目来源:TOJ 题目链接:http://www.tzcoder.cn/acmhome/problemdetail.do?method=showdetail&id=6200 描述 桃子现在有一张无向无自环无重边的图,图上有N个点和M条边,现在他想知道,如果固定一条边,再来求一个图上的最小生成树,并且在使得在最小生成树根为1的情况下,新的生成树移动的点数最多。 生成树:任意两个点连通,并且任意两个点之间有且仅有一条路径。 生成树权值和:生成树每一条边的权值w总和。 最小生成树:满足生成树的前提下,权原创 2020-12-06 10:34:53 · 425 阅读 · 0 评论 -
二分(可合并区间数量or可满足的区间数量的最大值)
链接:https://ac.nowcoder.com/acm/contest/5773/D 描述 我们刚刚学了二分查找——所谓二分查找就是在一堆有序数里找某个符合要求的数。在学完二分查找之后如果让你玩猜数游戏(裁判选定一个目标数字,你说一个数裁判告诉你是高了还是低了直到你猜到那个数)的话,显然你会用二分的方式去猜。 但是不是每一个玩猜数游戏的人都知道二分是最好,甚至一个健忘的玩家都有可能在得到裁判回答的下一个瞬间就忘了他之前问了什么以及裁判的回答),而现在更可怕的是,这个告诉你猜的数是高还是低的裁判他也很原创 2020-05-26 23:54:45 · 378 阅读 · 0 评论 -
POJ 2528:Mayor's posters
Problem Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city ...原创 2019-08-25 00:10:20 · 105 阅读 · 0 评论 -
POJ 2482:Stars inYour Window
Problem Description Here comes the problem: Assume the sky is a flat plane. All the stars lie on it with a location (x, y). for each star, there is a grade ranging from 1 to 100, representing its br...原创 2019-08-25 01:07:41 · 183 阅读 · 0 评论