题目意思:说有一个人在(1,1) 他的目标点在(n,m) 每次是4方向的移动; 限制条件:有的各自之间有墙 或者门,强不可通过,有对应的要钥匙可以开启这个类型的所有门; 问题:求最少步骤数(和); 类似于poj 2935; 解:很明显的搜索 只要建图弄得好就非常好写:...
分类:
其他好文 时间:
2014-11-03 12:58:04
阅读次数:
206
题意:
一幅“随机图”定义为有如下性质的图:
有一个入口和一个出口
有向图
对于入口 出度比入度大1
对于出口 入度比出度大1
对于其他点 入度等于出度
现给出一幅有向图 每条边有2个决策——留下、扔掉 分别花费a和b 问 如果用最少的费用改造出“随机图”
思路:
网络流不错的题目 如果做过“混合图欧拉回路”(后文把这个问题成为p)那个zoj的题的话 这道题会有...
分类:
其他好文 时间:
2014-11-02 19:43:25
阅读次数:
237
来源: http://poj.org/problem?id=3984
迷宫问题
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 8154
Accepted: 4804
Description
定义一个二维数组:
int maze[5][5]...
分类:
其他好文 时间:
2014-11-01 17:49:51
阅读次数:
328
Ollivanders: Makers of Fine Wands since 382 BC.
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 964 Accepted Submission(s): 539
Prob...
分类:
其他好文 时间:
2014-10-31 15:45:37
阅读次数:
157
The three-by-three array in Figure 1 is a maze. A standard six-sided die is needed to traverse the maze (the layout of a standard six--sided die is shown in Figure 2). Each maze has an initial positio...
分类:
其他好文 时间:
2014-10-30 17:15:04
阅读次数:
278
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 asked to go through a maze to do a important task.
The ma...
分类:
其他好文 时间:
2014-10-27 00:36:52
阅读次数:
268
The number of steps
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the ...
分类:
其他好文 时间:
2014-10-22 20:22:52
阅读次数:
235
题解:点击打开链接
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const double eps = 1e-9;
const int N = 10010;
vector G[N];
int n;
double k[N], e[N], dp[N];
do...
分类:
其他好文 时间:
2014-10-21 15:28:49
阅读次数:
141
Maze
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)
Total Submission(s): 1713 Accepted Submission(s): 659
Special Judge
Problem Description
When wake...
分类:
其他好文 时间:
2014-10-19 17:07:21
阅读次数:
247