http://poj.org/problem?id=2421 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24132 Accepted: 10368 http://poj.org/problem?id=2421 Descrip ...
分类:
其他好文 时间:
2017-05-06 23:04:40
阅读次数:
281
Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the ...
分类:
其他好文 时间:
2017-05-06 16:38:27
阅读次数:
154
Jungle RoadsThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages s ...
分类:
其他好文 时间:
2017-05-01 12:48:13
阅读次数:
219
#include using namespace std; struct Vertex{ int start, end; int weight; }; Vertex arr[200010]; int par[200010]; int n, m; long long cost = 0; int fin... ...
分类:
其他好文 时间:
2017-04-29 01:14:48
阅读次数:
289
1626: [Usaco2007 Dec]Building Roads 修建道路 Description Farmer John最近得到了一些新的农场,他想新修一些道路使得他的所有农场可以经过原有的或是新修的道路互达(也就是说,从任一个农场都可以经过一些首尾相连道路到达剩下的所有农场)。有些农场之间 ...
分类:
其他好文 时间:
2017-04-28 15:49:29
阅读次数:
212
Constructing Roads In JGShining's Kingdom Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16262 ...
分类:
其他好文 时间:
2017-04-23 16:57:07
阅读次数:
191
Description Hackerland is a happy democratic country with m×n cities, arranged in a rectangular m by n grid and connected by m roads in the east-west ...
分类:
其他好文 时间:
2017-04-22 14:33:42
阅读次数:
298
【题目链接】 http://www.lydsy.com/JudgeOnline/problem.php?id=1116 【题目大意】 Byteotia城市有n个towns,m条双向roads.每条road连接两个不同的towns, 没有重复的road.你要把其中一些road变成单向边使得:每个tow ...
分类:
其他好文 时间:
2017-04-16 20:38:27
阅读次数:
162
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1626 赤裸裸的最次生成树,已有的边赋为0就好了,我用了prim(因为不熟) 不过有个神坑点,算坐标中乘法会超出int范围,所以在里面也要转为double(当然不排除你一开始用的就是long ...
分类:
其他好文 时间:
2017-04-03 01:03:42
阅读次数:
219
A.免费道路roads 题意:给定n个点m条边的图,边有黑白颜色,求是否有一个生成树满足恰好有K条黑边,并输出方案。 题解:先加白边,求出必须加的黑边,然后加黑边到K条,剩下的用白边填充。 顺便说说,边权只有01的图,生成树的权值和可以取到任意的介于[MST,MBT]的任意值,其中MST表示最小生成 ...