Gold Transportation Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on PKU. Original ID: 322864-bit integer IO format: %lld      Java class name: Main   Recently, a number of gold mines have been discovered in Zorroming State. To…
参考链接:http://www.cnblogs.com/jiaohuang/archive/2010/11/13/1876418.html 题意:地图上某些点有金子,有些点有房子,还有一些带权路径,问把所有金子运到房子里所要经过最小的最大相邻路是多少. 也就是如果光用比“最小的最大相邻路”那条路更小的路是无法运完所有金子的,那么可以先对路径排序,然后一条一条取, 看看是否满足条件:即是否所有并查集的根节点的权值f[i]为非负. 思路:首先想到的是,要能运完所有的金子,那么必须任意一个连通器中的储…
题目链接 给出n个城市, 每个城市有一个仓库, 仓库有容量限制, 同时每个城市也有一些货物, 货物必须放到仓库中. 城市之间有路相连, 每条路有长度. 因为有些城市的货物量大于仓库的容量, 所以要运到别的城市,求所有货物都放到仓库中时, 走过的路中, 最长的那条路最短的情况, 输出这条路的长度. 很容易想到二分, 如果城市之间路的长度小于二分值x, 那么两个城市之间连边, 权值为inf. 源点和所有城市连边, 权值为一开始的货物量, 每个城市和这个城市的仓库连边, 权值inf, 每个仓库和汇点连…
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant steel crane to the place…
Gold Transportation Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 3079 Accepted: 1101 Description Recently, a number of gold mines have been discovered in Zorroming State. To protect this treasure, we must transport this gold to the stor…
poj 1797 Heavy Transportation Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has…
POJ 1797 Heavy Transportation / SCU 1819 Heavy Transportation (图论,最短路径) Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there reall…
POJ.1797 Heavy Transportation (Dijkstra变形) 题意分析 给出n个点,m条边的城市网络,其中 x y d 代表由x到y(或由y到x)的公路所能承受的最大重量为d,求从1到n的所有通路中,所能经过的的最大重量的车为多少. 2. 代码总览 #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #include <stack&…
Object Clustering   Description We have N (N ≤ 10000) objects, and wish to classify them into several groups by judgement of their resemblance. To simply the model, each object has 2 indexes a and b (a, b ≤ 500). The resemblance of object i and objec…
[POJ 2400] Supervisor, Supervisee(KM求最小权匹配) Supervisor, Supervisee Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2538   Accepted: 719 Description Suppose some supervisors each get to hire a new person for their department. There are N…