#include<iostream> #include<cstring> #include<algorithm> using namespace std; ; int p[N]; struct edge{ int a; int b; int w; }e[N*N]; int map[N][N],flag[N][N],num,n; bool cmp(edge a,edge b) { return a.w<b.w; } int find(int x) { if(p[x]…
链接: http://poj.org/problem?id=2421 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 21130 Accepted: 8924 Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1102 Constructing Roads Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27178 Accepted Submission(s): 10340 Problem Description There are N vil…
Constructing Roads Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18256 Accepted Submission(s): 6970 Problem Description There are N villages, which are numbered from 1 to N, and you should…
Constructing Roads Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2421 Appoint description: System Crawler (2015-05-27) Description There are N villages, which are numbered from 1 to N, and y…
Constructing Roads 题目链接: http://acm.hust.edu.cn/vjudge/contest/124434#problem/D Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two villa…
Constructing Roads Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road betw…