并查集
文章平均质量分 90
Apoised
我将一直前行,即使那时身边空无一人。
展开
-
hdu 1232 畅通工程【并查集】
hdu 1232 经典并查集 此题为典型的并查集应用,使用并查集合并操作将全部城镇分为N个集合,每个集合中的城镇相互连通,所以至少还需N-1条道路便可以将N个集合连通。 #include int father[1010]; void union_set(int n) { for (int i=1;i<=n;i++) father[i]=i; } int fi原创 2016-03-23 08:44:00 · 317 阅读 · 0 评论 -
hdu 1856 (More is better)
More is better (并查集) More is better Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 327680/102400 K (Java/Others) Total Submission(s): 24408 Accepted Submission(s): 8763 Problem原创 2016-08-01 21:41:13 · 230 阅读 · 0 评论 -
hdu 1272 (小希的迷宫)
小希的迷宫 (并查集) 小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 43649 Accepted Submission(s): 13468 Problem原创 2016-08-01 21:26:28 · 172 阅读 · 0 评论 -
hdu 2120 (Ice_cream's world I)
Ice_cream's world I (并查集) Ice_cream's world I Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1280 Accepted Submission(s): 765 Pro原创 2016-08-01 21:14:26 · 187 阅读 · 0 评论 -
hdu 5631 (Rikka with Graph)
Rikka with Graph (并查集) Rikka with Graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1049 Accepted Submission(s): 508 Problem D原创 2016-08-01 21:05:40 · 205 阅读 · 0 评论 -
hdu 5326(Work)
Work (并查集) It’s an interesting experience to move from ICPC to work, end my college life and start a brand new journey in company. As is known to all, every stuff in a company has a title, everyo原创 2016-08-01 20:53:58 · 268 阅读 · 0 评论 -
hdu 4707(Pet)
Pet (并查集) Pet Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2508 Accepted Submission(s): 1233 Problem Description One day, Lin原创 2016-08-01 20:39:40 · 236 阅读 · 0 评论 -
hdu 1325(Is It A Tree?)
Is It A Tree? (并查集) Is It A Tree? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21685 Accepted Submission(s): 4886 Problem Descr原创 2016-08-01 20:28:44 · 327 阅读 · 0 评论 -
poj 2524[并查集]
poj2524 模板题,没意义,注意输出格式。 #include int father[50050]; int rank[50050]; void union_set(int n) { for (int i=1;i<=n;i++) { father[i]=i; rank[i]=0; } } int find(int x) { if (x!=father[x])原创 2016-03-25 23:38:41 · 209 阅读 · 0 评论 -
poj 1611(The Suspects)
The Suspects (并查集) The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 33382 Accepted: 16196 Description Severe acute respiratory syndrome原创 2016-08-01 21:46:21 · 208 阅读 · 0 评论