Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensi…
Jungle Roads Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19536 Accepted: 8970 Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some…
网址:https://vjudge.net/contest/66965#overview 第一题: poj1251 裸最小生成树 #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int maxn=100500; struct node { int x; int y; int w; }a[maxn]; int n,k; char s,v; int cnt…
https://vjudge.net/problem/POJ-1251 The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large roa…
以此图为例: package com.datastruct; import java.util.Scanner; public class TestKruskal { private static class Edge{ public Edge(int begin,int end,int weight){ this.begin = begin; this.end = end; this.weight = weight; } int begin; int end; int weight; publ…