题目链接:http://poj.org/problem?id=3026题意:可以理解为给你一个地图上面有S和A的表示一个一个的点,#表示墙,所以需要我们用bfs来计算各点之间的距离;b[i][j] = p;代表map[i][j]的位置的点的编号为p;D[i][j] 代表编号为i和j的距离;#incl... Read More
posted @ 2015-07-28 21:02 西瓜不懂柠檬的酸 Views(602) Comments(0) Diggs(0)
http://poj.org/problem?id=1751题意:有n个点,已知各点坐标,距离为权值,求最小生成树的边但是这个最小生成树的m条边是已经确定的了,所以可以让已知边的权值为0;在Prim算法中改一下就行#include#include#include#include#include#in... Read More
posted @ 2015-07-28 10:30 西瓜不懂柠檬的酸 Views(249) Comments(0) Diggs(0)
题目链接:http://poj.org/problem?id=1789题意:They defined the distance of truck types as the number of positions with different letters in truck type codes这句... Read More
posted @ 2015-07-28 08:18 西瓜不懂柠檬的酸 Views(142) Comments(0) Diggs(0)
levels of contents