1、SAP邻接矩阵形式/*SAP算法(矩阵形式)结点编号从0开始*/#include#include#includeusing namespace std;const int MAXN=1100;int maze[MAXN][MAXN];int gap[MAXN],dis[MAXN],pre[MAX...
分类:
其他好文 时间:
2015-11-20 21:26:19
阅读次数:
169
Font AwesomeThe iconic font and CSS toolkithttps://fonticons.com/Web icons made easy.From the makers of Font Awesome, Fonticons is a subscription serv...
分类:
其他好文 时间:
2015-11-20 19:11:20
阅读次数:
129
Somewhere in the great stone maze of Winterfell, a wolf howled. The sound hung over the castle like a flag of mourning. Tyrion Lannister looked up fro...
分类:
其他好文 时间:
2015-11-19 20:52:52
阅读次数:
237
Maze.cpp
#define_CRT_SECURE_NO_WARNINGS1
#include<iostream>
#include<stack>
usingnamespacestd;
#defineN10//定义数组大小
structPos{//定义结构体保存路径的坐标
size_t_row;//行
size_t_col;//列
};
stack<Pos>minstack;//定义最短路径栈
voidInitMaz..
分类:
编程语言 时间:
2015-11-03 00:50:07
阅读次数:
223
DescriptionAcm, a treasure-explorer, is exploring again. This time he is in a special maze, in which there are some doors (at most 5 doors, represente...
分类:
其他好文 时间:
2015-10-31 01:35:59
阅读次数:
354
Maze
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Celica is a brave person and believer of a God in the bright side. He always fights against the monsters that endanger humans. One day, he is...
分类:
其他好文 时间:
2015-10-27 17:44:26
阅读次数:
173
UVA___10535The shooter is in a great problem. He is trapped in a “2D” maze with a laser gun and can use it once. The gun is very powerful and the lase...
分类:
其他好文 时间:
2015-10-25 17:41:23
阅读次数:
214
题目大意:你在一个迷宫里,你面前有n个门,你选择门的概率是一样的,每扇门有一个数字k, 加入这个数字是负数,那么这个门会花费你abs(k)分钟后把你带回原点, 假如这个数字是正数,他可以把你带出迷宫,并且花费时间是k.问把你带出迷宫的预计期望时间是多少?如果无解输出 “inf”,输出结果要求是最简分...
分类:
其他好文 时间:
2015-10-25 12:06:20
阅读次数:
135
题意:一只狗(柴犬,看到一块骨头,迷失在了maze里,S是起点,D是终点,问你能不能在时间T时从起点到达终点.这题有个小trick: 奇偶剪枝+普通剪枝解释一下:普通剪枝:从S到D要走的步数是k=abs(x1-x2)+abs(y1-y2);那么如果k>=T,永远不可能到达;奇偶剪枝:首先,分析一下两...
分类:
其他好文 时间:
2015-10-23 21:21:47
阅读次数:
255
http://poj.org/problem?id=3026如果一个一个普通搜处理不好的话会超时 可以连到一块搜我觉得这个方法特别好#include#include#include#include#include#include#include#define N 105#define INF 0x3...
分类:
其他好文 时间:
2015-10-11 12:53:44
阅读次数:
177