poj 1011 Sticks
摘要:SticksTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 126238Accepted: 29477DescriptionGeorge took sticks of the same length and cut them rand...
阅读全文
posted @
2015-05-05 08:32
细雨微光
阅读(278)
推荐(0) 编辑
nyoj 284 坦克大战 (优先队列)
摘要:题目链接:http://acm.nyist.net/JudgeOnline/status.php?pid=284特殊数据:5 5BBEEYEEERBSSERBSSERBSSETB7非优先队列: 1 2 #include 3 #include 4 #include 5 #include 6 #in...
阅读全文
posted @
2015-04-30 12:40
细雨微光
阅读(404)
推荐(0) 编辑
Thrall’s Dream 第四届山东省省赛 (直接暴力DFS)
摘要:题目链接:题目AC代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N = 2010; 8 int m,n; 9 bool vis[N][N],vis1[N];1...
阅读全文
posted @
2015-04-29 09:47
细雨微光
阅读(337)
推荐(0) 编辑
poj 1475 Pushing Boxes 推箱子(双bfs)
摘要:题目链接:http://poj.org/problem?id=1475一组测试数据:7 3###.T..S.#B#.........结果://解题思路:先判断盒子的四周是不是有空位,如果有,则判断人是否能到达盒子的那一边,能的话,把盒子推到空位处,然后继续AC代码: 1 //解题思路:先判断盒子的...
阅读全文
posted @
2015-04-24 12:46
细雨微光
阅读(2000)
推荐(1) 编辑
nyoj 1129 Salvation
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=1129题目分析:感觉题目说的不是多么的清晰,看了别人的分析觉得,也就是说在一个方向不能拐四次弯;大于四次就要return了;方向可以自己定义,方便使用就好AC代码: 1 #include 2...
阅读全文
posted @
2015-04-14 12:33
细雨微光
阅读(262)
推荐(0) 编辑
hdu 4771 Stealing Harry Potter's Precious (2013亚洲区杭州现场赛)(搜索 bfs + dfs) 带权值的路径
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4771题目意思:'@' 表示的是起点,'#' 表示的是障碍物不能通过,'.' 表示的是路能通过的; 目的:让你从 '@' 点出发,然后每个点只能走一次,求出最小的距离;解题思路:先用 bfs 求解出任意两...
阅读全文
posted @
2014-10-10 17:19
细雨微光
阅读(311)
推荐(0) 编辑
poj Sudoku(数独) DFS
摘要:SudokuTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 13665Accepted: 6767Special JudgeDescriptionSudoku is a very simple task. A square table...
阅读全文
posted @
2014-08-01 16:30
细雨微光
阅读(932)
推荐(0) 编辑
poj 3009 Curling 2.0(dfs)
摘要:Curling 2.0Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11353Accepted: 4804DescriptionOn Planet MM-21, after their Olympic games this year...
阅读全文
posted @
2014-07-31 19:26
细雨微光
阅读(191)
推荐(0) 编辑
poj 3083 Children of the Candy Corn
摘要:Children of the Candy CornTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9528Accepted: 4126DescriptionThe cornfield maze is a popular Hallow...
阅读全文
posted @
2014-07-30 20:23
细雨微光
阅读(1047)
推荐(0) 编辑
UVA Problem B: Fire!
摘要: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 es...
阅读全文
posted @
2014-04-25 17:49
细雨微光
阅读(283)
推荐(0) 编辑
poj 1636 Prison rearrangement
摘要:Prison rearrangementTime Limit: 3000MSMemory Limit: 10000KTotal Submissions: 2158Accepted: 971DescriptionIn order to lower the risk of riots and escap...
阅读全文
posted @
2014-04-24 11:31
细雨微光
阅读(968)
推荐(0) 编辑
hdoj 1026 Ignatius and the Princess I 最小步数,并且保存路径
摘要:Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11167Accepted Submissio...
阅读全文
posted @
2014-04-15 13:45
细雨微光
阅读(315)
推荐(0) 编辑
hdoj 1728 逃离迷宫
摘要:逃离迷宫Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12621Accepted Submission(s): 3019Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫
阅读全文
posted @
2014-02-13 20:31
细雨微光
阅读(367)
推荐(0) 编辑
hdoj 2717 Catch That Cow
摘要:Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking
阅读全文
posted @
2013-12-03 20:35
细雨微光
阅读(468)
推荐(0) 编辑
nyoj592 spiral grid
摘要:spiral grid时间限制:2000 ms | 内存限制:65535 KB难度:4描述Xiaod has recently discovered the grid named "spiral grid".Construct the grid like the following figure. (The grid is actually infinite. The figure is only a small part of it.)Considering traveling in it, you are free to any cell containing a co
阅读全文
posted @
2013-11-01 19:07
细雨微光
阅读(276)
推荐(0) 编辑
AC Again hdoj 1582 搜索
摘要:AC AgainTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 306Accepted Submission(s): 84Description“AC”这个单词大概是我们 ACMers 最希望听到的回答了。不过如果把它写下来,你还能认识吗?现在给你一幅由点阵构成的图,它代表 'A' 或 'C' 的一个字母。你的任务就是把它们识别出来。注意:1.笔划可能有粗有细,但是我们保证字符在外形上是肉眼可辨别的。2.我们保证
阅读全文
posted @
2013-09-12 21:50
细雨微光
阅读(342)
推荐(0) 编辑
ny10 skilng
摘要:skiing时间限制:3000 ms | 内存限制:65535 KB难度:5描述 Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个 区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-17-16-1...
阅读全文
posted @
2013-08-02 16:59
细雨微光
阅读(331)
推荐(0) 编辑
hdoj1010 Temperor of the bone
摘要:Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 53106Accepted Submission(s): 14281Problem 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,
阅读全文
posted @
2013-07-31 12:51
细雨微光
阅读(275)
推荐(0) 编辑
hdoj1175 连连看
摘要:连连看Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13953Accepted Submission(s): 3624Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意
阅读全文
posted @
2013-07-31 12:32
细雨微光
阅读(356)
推荐(0) 编辑
ny523 亡命逃串 hdoj 1253胜利大逃亡
摘要:亡命逃窜时间限制:1000 ms | 内存限制:65535 KB难度:4描述 从前有个叫hck的骑士,为了救我们美丽的公主,潜入魔王的老巢,够英雄吧。不过英雄不是这么好当的。这个可怜的娃被魔王抓住了,倍受折磨,生死一线。有一天魔王出去约会了,这可是一个千载难逢的逃命机会。你现在的任务就是判断一下这个...
阅读全文
posted @
2013-07-30 09:41
细雨微光
阅读(350)
推荐(0) 编辑