2017年5月28日

51Nod 1515(并查集、set、离散化)

摘要: 题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1515 思路:数字范围为1e8,所以要先离散化,然后在每个连通块的祖先节点用一个set维护,两个联通块合并的时候对set作恰当处理。 阅读全文

posted @ 2017-05-28 22:18 polarday 阅读(315) 评论(0) 推荐(0) 编辑

导航