并查集
文章平均质量分 81
KetchupZ
退役acmer一名,CCPC银+ICPC铜(欢迎大家访问我的Github地址:https://github.com/LieLieLiekey)
展开
-
Supermarket (贪心 并查集)
先放题目A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the mom...原创 2018-01-23 16:00:55 · 700 阅读 · 0 评论 -
H - Parity game (离散化 并查集)
题目Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence fro...原创 2018-01-23 22:00:42 · 392 阅读 · 0 评论 -
HDU 3038 - How Many Answers Are Wrong(带权的并查集,其实俺真不知道为啥带权,俺只知道多了个父子关系)
昨天做了个POJ-食物链的带权并查集,那可把我难为死了,看了几个博客,都是一个公式解决,并没有详细解说为什么这样做,所以喜欢寻根问底的我(●'◡'●)苦思冥想,终于从中得到了启发,这个题的解题思路也相似。解决这种带权并查集问题,与并查集问题(father[N])只是多加了个关系,这个关系表示与他父亲的关系,我把他记作relat[N],关键就是怎样通过关系,来构建一个关系表达式,使得求...原创 2018-01-10 10:07:47 · 469 阅读 · 0 评论