题解转自http://blog.csdn.net/lyy289065406/article/details/6762370 文中部分思路或定义模糊,重写的红色部分为修改过的。大致题意: 某个企业想把一个热带天堂岛变成旅游胜地,岛上有N个旅游景点,保证任意2个旅游景点之间有路径连通的(可间接连通).....
分类:
其他好文 时间:
2015-07-03 20:33:18
阅读次数:
153
Making the Grade
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 4732 Accepted: 2244
DescriptionA straight dirt road connects two fields on FJ’s farm, but it changes elevation mo...
分类:
其他好文 时间:
2015-07-03 10:38:35
阅读次数:
104
参考某个博客,代码不全,地址找不到了见谅,加了些自己弄的算法。备忘#-*- coding: utf-8 -*-import os, reimport timedef filefilter(compiles ='strs',road='str'):'''compiles为正则匹配字,road绝对路径'...
分类:
编程语言 时间:
2015-06-30 18:00:24
阅读次数:
132
Since I choose this road, I will not regret it. --Mereyct端午过后的第二天,闲着没事,更新一下博客。写这个博客的原因是,看到了群里有人问调用构造函数时能成功,调用析构函数却失败了。他在群里问大家问题,...
分类:
编程语言 时间:
2015-06-21 14:22:08
阅读次数:
143
一道简单的最短路。。。
我去题目样例看了好久,原来12345那些目标地是说的哪一个road啊,坑……注意一下这里的权值不是边的是点的,初始化cost的时候不小心写错了,用优化的dij应该会更快一些……真是心好累。
代码:
#include
#include
#include
#include
#include
#include
#define INF 0X3f3f3f3f
#define m...
分类:
其他好文 时间:
2015-06-20 17:08:35
阅读次数:
116
常用地址英语:室/房Room,村(乡)Village,号No.,宿舍Dormitory,楼/层F,住宅区/小区ResidentialQuarter,甲/乙/丙/丁A/B/C/D,巷/弄Lane,单元Unit,号楼/幢Building,厂Factory,酒楼/酒店Hotel,路Road,花园Garde...
分类:
其他好文 时间:
2015-06-14 19:58:52
阅读次数:
132
用了Kruskal算法来生成最小生成树当然也可以用Prim算法来做#include using namespace std;typedef struct{ int start; int end; int length;}road;int* father;road* map;int ...
分类:
其他好文 时间:
2015-06-12 19:15:09
阅读次数:
108
There are N seaside villages on X island, numbered from 1 to N. N roads
are built to connect all of them, which are also numbered from 1 to N, and the road with number i connects
the village i and...
分类:
其他好文 时间:
2015-06-11 09:38:52
阅读次数:
80
Description:The best friends Mr. Li and Mr. Liu are touring in beautiful country M.M has n cities and m two-way roads in total. Each road connects two...
分类:
编程语言 时间:
2015-06-10 20:43:41
阅读次数:
185
问题:A straight dirt road connects two fields on FJ's farm, but it changes elevation more than FJ would like. His cows do not mind climbing up or down a...
分类:
其他好文 时间:
2015-06-10 11:46:29
阅读次数:
112