图论_并查集
Chook_lxk
你前程有在,但须澄心猛省,不可自甘堕落。
展开
-
HDU- -1213 How Many Tables(水+并查集)
点击打开题目链接How Many TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29032Accepted Submission(s): 14405Problem Descripti原创 2017-04-12 07:38:09 · 543 阅读 · 0 评论 -
UVA - 1329 Corporative Network(加权并查集)
点击打开题目链接题目大意:有N个节点,初始时没有根节点,每次进行I或者E操作。E u : 算出u到根节点的距离I u v : 将v作为u的根节点,之间距离为 abs(u-v)%1000;思路:因为加权的并查集接触的不多。所有拿到题之后并查集的思想只存在大脑1s,就开是dfs找路径。因为终止条件看做了数字0,提交一直WA,没有超时,以为方法正确(TAT),直接WA到比赛结束。原创 2017-08-18 15:19:22 · 472 阅读 · 0 评论 -
HDU - 3461 Code Lock(并查集+快速幂)
点击打开题目链接Code LockTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 2043Accepted Submission(s): 788Problem DescriptionA原创 2017-04-20 23:58:17 · 658 阅读 · 0 评论 -
POJ - 1182 食物链(并查集)
点击打开题目链接本弱猪想借这个题梳理一下并查集的用法。并查集是用来判断两个元素是否为同一集合的数据结构。也就是说,并查集只能合并,无法分割。并查集通过树形结构实现(不是二叉树奥),通过判断每个元素的根节点是否相同来判断两个元素是否为相同集合。回到这个题上,题目中有x,y,z三类,是“判断是否属于同一类的问题”,显然考察并查集的相关知识,只不过这个题目除了判断是否同类,还增加了捕食关原创 2017-04-02 21:27:08 · 521 阅读 · 0 评论 -
HDU - 1878 欧拉回路(并查集)
点击打开题目链接欧拉回路Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14578Accepted Submission(s): 5522Problem Description欧拉回路是指原创 2017-04-19 08:32:13 · 732 阅读 · 0 评论 -
图论500题
=============================以下是最小生成树+并查集======================================【HDU】1213 How Many Tables 基础并查集★1272 小希的迷宫 基础并查集★1325&&poj1308 Is It A Tree? 基础并查集★1856 More is better转载 2017-04-14 20:00:01 · 797 阅读 · 0 评论 -
HDU - 1232 畅通工程(水+并查集)
点击打开题目链接畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 52320Accepted Submission(s): 27904Problem Description某省调查城原创 2017-04-13 22:57:36 · 644 阅读 · 0 评论 -
HDU - 1856 More is better(水+并查集)
点击打开题目链接More is betterTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 327680/102400 K (Java/Others)Total Submission(s): 26832Accepted Submission(s): 9611Problem Descripti原创 2017-04-13 16:36:56 · 6459 阅读 · 4 评论 -
POJ - 1703 Find them, Catch them (并查集)
点击打开题目链接The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to id原创 2017-04-04 20:32:46 · 378 阅读 · 0 评论 -
HDU - 1272 小希的迷宫(并查集判断无向环)
点击打开题目链接小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 48938Accepted Submission(s): 15185Problem Descrip原创 2017-04-13 09:01:33 · 450 阅读 · 0 评论 -
HDU - 1811 Rank of Tetris(并查集+拓扑排序)
点击打开题目链接Rank of TetrisTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10316Accepted Submission(s): 2949Problem Description原创 2017-08-22 20:34:49 · 306 阅读 · 0 评论