![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础 && 优先队列 && 并查集
文章平均质量分 86
zzuspy
本人初学者~~
展开
-
UVALive - 3135 - Argus (优先队列!!)
UVALive - 3135ArgusTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionA data stream is a real-time, continuous原创 2015-02-01 00:14:31 · 1592 阅读 · 2 评论 -
POJ - 1703 - Find them, Catch them (并查集)
题目传送:Find them, Catch them思路:用一个关系数组记录当前结点与其父亲的关系,0表示同类,1表示不同类AC代码:#include #include #include #include #include #include #include #include #include #include #include #include原创 2015-05-12 00:04:22 · 886 阅读 · 0 评论 -
数据结构 - 树(基础)
1、无根树转有根树#include #include #include #include #define LL long long#define INF 0x7fffffff#include using namespace std;const int maxn = 1000005;int p[maxn];int n;int root;vector G[maxn];原创 2015-04-14 22:49:37 · 703 阅读 · 0 评论 -
UVA - 11991 - Easy Problem from Rujia Liu? (STL)
UVA - 11991Easy Problem from Rujia Liu?Time Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionProblem EEasy Pr原创 2015-01-31 22:37:54 · 907 阅读 · 0 评论 -
UVA - 11987 - Almost Union-Find (又是并查集~)
UVA - 11987Almost Union-FindTime Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionProblem AAlmost Union-Find原创 2015-02-12 19:54:39 · 856 阅读 · 0 评论 -
BNU - 4216 - 修路 (并查集判断连通分量)
修路Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss NextType: None原创 2015-02-12 09:33:54 · 1030 阅读 · 0 评论 -
POJ-2524-Ubiquitous Religions (基本并查集!)
Ubiquitous ReligionsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 25152 Accepted: 12406DescriptionThere are so many different religions in the world原创 2014-11-21 12:16:41 · 875 阅读 · 0 评论 -
UVA - 10596 - Morning Walk (欧拉回路!并查集判断回路)
UVA - 10596Morning WalkTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %lluSubmit StatusDescription Problem HMorning Walk原创 2014-12-17 20:45:27 · 848 阅读 · 0 评论 -
POJ-1611-The Suspects (简单并查集!)
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 23337 Accepted: 11345DescriptionSevere acute respiratory syndrome (SARS), an atypical pneu原创 2014-11-21 09:10:26 · 2876 阅读 · 2 评论 -
FZU - 2155 - 盟国 (带删除的并查集~~)
Problem 2155 盟国Accept: 140 Submit: 464Time Limit: 5000 mSec Memory Limit : 32768 KB Problem Description世界上存在着N个国家,简单起见,编号从0~N-1,假如a国和b国是盟国,b国和c国是盟国,那么a国和c国也是盟国。另外每个国家都有权宣布退盟(注意,退原创 2015-02-05 22:37:43 · 807 阅读 · 0 评论 -
hihoCoder - 1062 - 最近公共祖先·一 (树的最近公共祖先问题!)
#1062 : 最近公共祖先·一时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho最近发现了一个神奇的网站!虽然还不够像58同城那样神奇,但这个网站仍然让小Ho乐在其中,但这是为什么呢?“为什么呢?”小Hi如是问道,在他的观察中小Ho已经沉迷这个网站一周之久了,甚至连他心爱的树玩具都弃置一边。“嘿嘿,小H原创 2015-02-05 16:27:30 · 1174 阅读 · 0 评论 -
hihoCoder - 1066 - 无间道之并查集 (并查集 + map)
#1066 : 无间道之并查集时间限制:20000ms单点时限:1000ms内存限制:256MB描述这天天气晴朗、阳光明媚、鸟语花香,空气中弥漫着春天的气息……额,说远了,总之,小Hi和小Ho决定趁着这朗朗春光出去玩。但是刚刚离开居住的宾馆不久,抄近道不小心走入了一条偏僻小道的小Hi和小Ho就发现自己的前方走来了几个彪形大汉,定睛一看原创 2015-02-03 17:38:57 · 881 阅读 · 0 评论 -
UVALive - 3644 - X-Plosives (并查集!!)
X-PlosivesA secret service developed a new kind of explosive that attain its volatile property only when a specific association of products occurs. Each product is a mix of two different simple comp原创 2015-02-02 11:44:28 · 777 阅读 · 0 评论 -
UVALive - 3027 - Corporative Network (并查集!!)
UVALive - 3027Corporative NetworkTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionA very big corporation is de原创 2015-02-02 11:47:44 · 943 阅读 · 0 评论 -
UVA - 11995 - I Can Guess the Data Structure! (基础数据结构练习!)
UVA - 11995I Can Guess the Data Structure!Time Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionProblem II Ca原创 2015-01-31 22:04:38 · 1237 阅读 · 0 评论 -
并查集简单题
The Suspects题目传送:POJ-1611-The SuspectsAC代码:#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#include <cstdio>#include <cctype>#include <string>#inclu原创 2015-07-29 23:45:17 · 1070 阅读 · 0 评论