![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 77
清溪浅水
这个作者很懒,什么都没留下…
展开
-
Red and Black
Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjace原创 2013-07-29 17:00:01 · 607 阅读 · 1 评论 -
hdu——1501——Zipper
Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitrari原创 2014-02-19 14:09:16 · 512 阅读 · 0 评论 -
fzu——Problem 2124 吃豆人(bfs)
Problem Description吃豆人是一款非常经典的游戏,游戏中玩家控制吃豆人在地图上吃光所有豆子,并且避免被怪物抓住。这道题没有怪物,将游戏的画面分成n*m的格子,每格地形可能为空地或者障碍物,吃豆人可以在空地上移动,吃豆人每移动一格需要1s时间,并且只能朝上下左右四个方向移动,特别的是吃豆人还能吐出舌头,舌头每移动一格需要0.1s时间,舌头只可以走直线。不必考虑吃豆人转身所原创 2013-10-29 13:52:25 · 1155 阅读 · 0 评论 -
hdu ——1242——Rescue
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approach Angel. W原创 2013-09-03 14:49:34 · 609 阅读 · 1 评论 -
hdu——1078——FatMouse and Cheese:记忆化搜索
Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At eac原创 2013-08-17 20:04:26 · 758 阅读 · 0 评论 -
迷宫搜索
#include#include#includeusing namespace std;int sx,sy,ex,ey,n,m;int num,t;int la,fir;char s[111][111];int d[4][2]= {1,0,0,-1,-1,0,0,1};struct maze{ int x; int y; int num;}N[101原创 2013-07-28 16:12:52 · 612 阅读 · 0 评论 -
Oil Deposits
#include using namespace std;int n,m;char s[100][100];int dir[8][2]={1,1, 1,-1, -1,1, -1,-1, 0,1, 0,-1, 1,0, -1,0};int i,j;int fn(int &a,int &b){ int x,y; for(int i=0;i<8;i++) { x=原创 2013-07-29 11:37:51 · 557 阅读 · 0 评论 -
深搜——The doggie
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He re转载 2013-07-29 15:50:59 · 1225 阅读 · 0 评论 -
hdu——Knight Moves
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n原创 2013-08-11 14:42:08 · 662 阅读 · 0 评论 -
逃离迷宫
Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,原创 2013-08-03 20:51:55 · 724 阅读 · 0 评论 -
滑雪--记忆化搜索
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813原创 2013-08-01 14:10:00 · 547 阅读 · 0 评论 -
poj——1190——生日蛋糕
Description7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 Ri+1且Hi > Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。 令Q = Sπ 请编程对给出的N和M,找出蛋糕的制作方案(适当的Ri和Hi的值),使S最小。原创 2014-02-19 16:17:28 · 1245 阅读 · 0 评论