How far away ? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 11739 Accepted Submission(s): 4325 Problem Description There are n houses in the village and some bidirectional roads connectin…
How far away ? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10412 Accepted Submission(s): 3777 Problem Description There are n houses in the village and some bidirectional roads connecting…
bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=2586 #include<bits/stdc++.h> using namespace std; #define ll long long const int MAXN=40010; const int MAXQ=40010; int n; //并查集部分 int F[MAXN];//初始为-1 int find(int x) { if(F[x]==-1)return x; retur…
hdu2586 How far away ? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4183 Accepted Submission(s): 1598 Problem Description There are n houses in the village and some bidirectional roads co…