并查集
ujn20161222
persistence
展开
-
2018_2_10_Find them, Catch them_并查集
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 49372 Accepted: 15184DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to roo...原创 2018-02-10 21:50:44 · 188 阅读 · 0 评论 -
2018_2_12_Building Bridges_world_final_并查集二维_缩点
注意边界https://vjudge.net/problem/UVA-1018#include<iostream>#include<cstdio>#include<cstring>#include<vector>#include<algorithm>#include<fstream> using namespace...原创 2018-02-12 22:23:00 · 204 阅读 · 0 评论 -
2018_2_12_并查集二维
#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N=105;char map[N][N];struct AA{ int x,y; AA(int xx=-1,int yy=-1):x(xx),y(yy){} inline bool...原创 2018-02-12 20:41:16 · 203 阅读 · 0 评论 -
2018_2_12_Network Connections_并查集
https://vjudge.net/problem/UVA-793#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N=5e5+10;int set[N];int set_find(int x){ if(set[x]==-1)retu...原创 2018-02-12 17:25:20 · 175 阅读 · 0 评论 -
2018_2_12_Ubiquitous Religions_并查集
Ubiquitous ReligionsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 38587 Accepted: 18391DescriptionThere are so many different religions in the world today that it is difficult to keep trac...原创 2018-02-12 14:03:27 · 129 阅读 · 0 评论 -
2018_2_12_War _并查集
https://vjudge.net/problem/UVA-10158#include<cstring> #include <iostream> #include<algorithm> #include<string> #include<sstream> #include<vector>#inclu...原创 2018-02-12 13:02:21 · 136 阅读 · 0 评论 -
2018_2_12_Wireless Network_并查集
Wireless NetworkTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 33197 Accepted: 13801DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set ...原创 2018-02-12 11:32:05 · 113 阅读 · 0 评论 -
2018_2_12Friends _并查集
https://vjudge.net/problem/UVA-10608#include<cstring> #include <iostream> #include<algorithm> #include<string> #include<sstream> #include<vector>using ...原创 2018-02-12 10:56:15 · 136 阅读 · 0 评论 -
2018_2_10_Cube Stacking_并查集进阶
#include<iostream>#include<cstdio>#include<algorithm>#include<string>#include<cstring>#include<vector>#include<map>#include<list> const原创 2018-02-10 22:46:36 · 186 阅读 · 0 评论 -
2018_2_14_This Sentence is False_并查集_关系
作为根的,flag是0,别的根据这一点确定The court of King Xeon 2.4 is plagued with intrigue and conspiracy. A document recently discovered by the King's Secret Service is thought to be part of some mischievous sc...原创 2018-02-14 13:35:11 · 407 阅读 · 0 评论