
并查集
Dust_Heart
这个作者很懒,什么都没留下…
展开
-
并查集+二分 福州大学第十三届程序设计竞赛 E题
Problem 2233 ~APTX4869 Accept: 75 Submit: 239Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description为了帮助柯南回到一米七四,阿笠博士夜以继日地研究APTX4869的解药。他得出了如下结果:1.解药由n种原料构成;2.对于两种不同的的原料a原创 2016-12-23 20:45:07 · 418 阅读 · 0 评论 -
Codeforces 892E - Envy 【最小生成树】
Codeforces 892E - Envy 【最小生成树】For a connected undirected weighted graph G, MST (minimumspanning tree) is a subgraph of G that contains all of G's vertices, isa tree, and sum of its edges is minimum possible.You are given agraph G. If you run a MST algor原创 2017-12-19 21:13:41 · 968 阅读 · 0 评论 -
Codeforces 466E - Information Graph 【DFS+并查集+预处理】
Codeforces 466E - Information Graph 【DFS+并查集+预处理】 There are n employees working in company "X" (let's number them from 1 to n for convenience). Initially the employees didn't have any relationships among each other. On each of m next days one of the foll原创 2017-08-02 17:05:47 · 577 阅读 · 0 评论 -
CF Round #218 (Div. 2) && CF 371D Vessels【并查集】
CF Round #218 (Div. 2)&& 371D VesselsThere is a system of n vessels arranged one above the otheras shown in the figure below. Assume that the vessels are numbered from 1 to n, in the order from the highest to the lowest, the volume of the i-th vessel is a原创 2017-07-11 16:16:57 · 619 阅读 · 0 评论 -
HDOJ 2818 Building Block (带权并查集)
BuildingBlockTime Limit: 2000/1000 MS(Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5537 Accepted Submission(s): 1707Problem DescriptionJohn are playing原创 2017-04-12 20:27:46 · 326 阅读 · 0 评论 -
HDOJ 4496 D-City(并查集 逆序 + 删边)
D-CityTime Limit: 2000/1000 MS(Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 4383 Accepted Submission(s): 1547Problem DescriptionLuxer is a really bad gu原创 2017-04-12 20:22:47 · 310 阅读 · 0 评论 -
HDOJ 1856 More is better (带权并查集)
More is betterTime Limit: 5000/1000 MS(Java/Others) Memory Limit: 327680/102400 K(Java/Others)Total Submission(s): 26824 Accepted Submission(s): 9607Problem DescriptionMr Wang wants原创 2017-04-12 20:19:33 · 226 阅读 · 0 评论 -
HDOJ 1102 Constructing Roads(并查集入门)
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22447 Accepted Submission(s): 8634Problem DescriptionThere ar原创 2017-04-12 20:14:25 · 306 阅读 · 0 评论 -
7-11 家庭房产(25 分) 【并查集】
7-11 家庭房产(25 分) 【并查集】给定每个人的家庭成员和其自己名下的房产,请你统计出每个家庭的人口数、人均房产面积及房产套数。输入格式:输入第一行给出一个正整数N(≤1000),随后N行,每行按下列格式给出一个人的房产:编号 父 母 k 孩子1 ... 孩子k 房产套数 总面积其中编号是每个人独有的一个4位数的编号;父和母分别是该编号对应的这个人的父母的编号(如果已经过世,则显示-1);k(0≤k≤5)是该人的子女的个数;孩子i是其子女的编号。原创 2018-03-17 23:08:59 · 4232 阅读 · 5 评论