![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
专题五 并查集
Focus5679
学生一枚
展开
-
A - Wireless Network POJ - 2236
A - Wireless NetworkPOJ - 2236 An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftersho...原创 2018-08-09 16:20:21 · 237 阅读 · 0 评论 -
牛客练习赛43 C Tachibana Kanade Loves Review 并查集 输入输出优化 桶排序 时间剪枝
题目描述立华奏是一个刚刚开始学习 OI 的萌新。最近,实力强大的QingyuQingyu当选了 IODS 9102 的出题人。众所周知, IODS 是一场极其毒瘤的比赛。为了在这次比赛中取得好的成绩,立华奏决定学习可能考到的每一个知识点。在QingyuQingyu的博客中,立华奏得知这场比赛总共会考察选手 n 个知识点。此前,立华奏已经依靠自学学习了其中 k 个知识点。接下来,立...原创 2019-04-07 13:48:39 · 214 阅读 · 0 评论 -
T - Marked Ancestor Aizu - 2170
T - Marked AncestorAizu - 2170 Problem F:You are given a tree T that consists of N nodes. Each node is numbered from 1 to N, and node 1 is always the root node of T. Consider the following two o...原创 2018-08-10 15:14:28 · 179 阅读 · 0 评论 -
S - Find them, Catch them POJ - 1703
S - Find them, Catch themPOJ - 1703 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, th...原创 2018-08-10 15:14:37 · 100 阅读 · 0 评论 -
Q - D-City HDU - 4496
Q - D-CityHDU - 4496 Luxer is a really bad guy. He destroys everything he met.One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line connects exactly two D-points. Luxer w...原创 2018-08-09 16:30:07 · 124 阅读 · 0 评论 -
P - Regroup HDU - 2860
P - RegroupHDU - 2860 When ALPC42 got to a panzer brigade, He was asked to build software to help them regroup the battalions or companies.As the tradition of army, soldiers are rated according h...原创 2018-08-09 16:29:06 · 253 阅读 · 0 评论 -
N - Is It A Tree? POJ - 1308
N - Is It A Tree?POJ - 1308 A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying t...原创 2018-08-09 16:28:08 · 128 阅读 · 0 评论 -
K - Rochambeau POJ - 2912
K - RochambeauPOJ - 2912 N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some ...原创 2018-08-09 16:27:08 · 225 阅读 · 0 评论 -
J - A Bug's Life POJ - 2492
J - A Bug's LifePOJ - 2492 BackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact ...原创 2018-08-09 16:26:02 · 141 阅读 · 0 评论 -
I - Navigation Nightmare POJ - 1984
I - Navigation NightmarePOJ - 1984 Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horiz...原创 2018-08-09 16:25:01 · 119 阅读 · 0 评论 -
G - Supermarket POJ - 1456
G - SupermarketPOJ - 1456 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 ...原创 2018-08-09 16:23:42 · 164 阅读 · 0 评论 -
E - 食物链 POJ - 1182
E - 食物链POJ - 1182 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上...原创 2018-08-09 16:22:32 · 206 阅读 · 0 评论 -
B - The Suspects POJ - 1611
B - The SuspectsPOJ - 1611 Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to ot...原创 2018-08-09 16:21:18 · 177 阅读 · 0 评论 -
J - Welcome Party ZOJ - 4109 并查集 bfs
J - Welcome PartyZOJ - 4109此处是题面...思路:并查集分块,然后把每一块编号最小的那个人存在优先队列里,每次把此刻能进入门的人压进优先队列,按取出次序就是答案。注意:并查集par数组一定用par[i] = i初始化,否则不是爆栈就是T,别问我怎么知道的,md调了半天...AC代码//include <bits/stdc++.h&...原创 2019-05-02 15:16:01 · 116 阅读 · 0 评论