码迷,mamicode.com
首页 >  
搜索关键字:borg maze    ( 639个结果
Fire Net HDU 1045
简单深搜,可以完全暴力,不会超时的。#include#include#includeusing namespace std;#define MAX(a,b) (a>b?a:b) char maze[10][10];int n, maxn;void DFS(int step,int count);in...
分类:Web程序   时间:2014-06-04 20:43:04    阅读次数:270
图论 --- BFS + MST
Borg MazeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7844Accepted: 2623DescriptionThe Borg is an immensely powerful race of enhanced huma...
分类:其他好文   时间:2014-05-26 19:42:29    阅读次数:306
HDU 1693 Eat the Trees
插头DP,多条回路求回路数。 可以当作模版来记。注重理解轮廓线。 #include #include #include #include using namespace std; const int HASH=10007; const int STATE=5000; //状态数 const int MAXD=15; int code[MAXD],maze[MAXD][MAXD];...
分类:其他好文   时间:2014-05-15 11:23:33    阅读次数:344
FZU 2150 Fire Game
点击打开链接 Problem 2150 Fire Game Accept: 237    Submit: 808 Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description Fat brother and Maze are playing a kind of special (hent...
分类:其他好文   时间:2014-05-09 14:08:37    阅读次数:502
HDU 1484 Basic wall maze (dfs + 记忆化)
题意:给定一张地图,并且给定起点和终点,求起点到终点的最短距离,地图上有墙,与以往的题目不同的是,以往的题目障碍物都是在格子上,但是本题的障碍物墙是在格子与格子的边界线上,所以在输入的时候就要进行预处理下,将墙的位置转化为相邻格子的东西南北方向墙的状态,所以使用了一个3为数组来记录地图的信息map[x][y][0]-map[x][y][3] 分别表示坐标为x,y的格子的四个方向墙的情况,0为没墙,1为有墙,然后一个dfs找到最短路,以及每个点的前驱节点,最后打印路径。代码中的注释很详细。题目本身很简单,就是...
分类:其他好文   时间:2014-05-09 02:19:55    阅读次数:454
搜索(BFS)
Problem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire esc...
分类:其他好文   时间:2014-05-07 13:28:07    阅读次数:312
[2013山东ACM省赛] The number of steps (概率DP,数学期望)
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 seco...
分类:其他好文   时间:2014-05-07 06:15:59    阅读次数:427
java写的迷宫代码
迷宫代码:截图如下:package com.zxl.maze;/* * 抽象类表示选择不同的算法*/public abstract class AbstractMap{ /* * 得到数据*/ public abstract boolean[][] getData(int m,i...
分类:编程语言   时间:2014-05-02 11:25:12    阅读次数:282
Timus 1642. 1D Maze迷宫
1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two directions — forward and backward. Even a 1D world has proble...
分类:其他好文   时间:2014-04-29 13:44:22    阅读次数:284
639条   上一页 1 ... 62 63 64
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!