ACM 广搜
文章平均质量分 92
青山绿水之辈
奋斗青春年华
展开
-
hdu1253胜利大逃亡 (BFS)
Problem DescriptionIgnatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标原创 2013-08-01 21:37:34 · 996 阅读 · 0 评论 -
HDU2102A计划(BFS)
A计划Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10179 Accepted Submission(s): 2452Problem Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之原创 2014-12-11 14:02:52 · 848 阅读 · 0 评论 -
HDU2128Tempter of the Bone II(bfs+状态压缩)
Tempter of the Bone IITime Limit: 10000/5000 MS (Java/Others) Memory Limit: 98304/32768 K (Java/Others)Total Submission(s): 1529 Accepted Submission(s): 407Problem DescriptionThe dog原创 2014-11-29 13:42:52 · 1120 阅读 · 0 评论 -
HDU2821Pusher(BFS+枚举)
PusherTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/65536 K (Java/Others)Total Submission(s): 903 Accepted Submission(s): 327Special JudgeProblem DescriptionPusherBoy is原创 2014-11-29 14:01:33 · 1008 阅读 · 0 评论 -
1885Key Task(BFS+状态压缩)(胜利大逃亡续)一个意思
Key TaskTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1229 Accepted Submission(s): 493Problem DescriptionThe Czech Technical Un原创 2014-11-26 21:49:06 · 1219 阅读 · 0 评论 -
C. Robot(BFS)
C. RobotTime Limit: 3000msCase Time Limit: 3000msMemory Limit: 262144KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 36000Font Size: + -原创 2014-10-07 17:33:23 · 1154 阅读 · 0 评论 -
HDU3681Prison Break(状态压缩+BFS)
Prison BreakTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3165 Accepted Submission(s): 804Problem DescriptionRompire is a robot原创 2014-09-02 15:44:25 · 1248 阅读 · 0 评论 -
hdu1254推箱子 (BFS+BFS+状态压缩)
推箱子Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5089 Accepted Submission(s): 1421Problem Description推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N原创 2014-08-06 15:41:14 · 1103 阅读 · 0 评论 -
康托展开
康托展开 康托展开的公式是 X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! 其中,ai为当前未出现的元素中是排在第几个(从0开始)。 这个公式可能看着让人头大,最好举个例子来说明一下。例如,有一个数组 s = ["A", "B", "C", "D"],它的一个排列 s1 = ["D", "B", "A", "C"],现在要转载 2013-08-11 21:02:24 · 4165 阅读 · 3 评论 -
HDU1195Open the Lock(BFS)
Open the LockDescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or m原创 2014-12-11 19:47:11 · 918 阅读 · 0 评论 -
HDU3309Roll The Cube(BFS)
Roll The CubeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 484 Accepted Submission(s): 172Problem DescriptionThis is a simple g原创 2015-01-18 23:25:47 · 966 阅读 · 0 评论 -
HDU 3313 Key Vertex(BFS+BFS) 求S点到T点路径的关键点
Key VertexTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1349 Accepted Submission(s): 307Problem DescriptionYou need walking fr原创 2015-07-30 11:02:38 · 842 阅读 · 0 评论 -
HDU 5336 XYZ and Drops(BFS 水滴爆破)2015 Multi-University Training Contest 4
XYZ and DropsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 603 Accepted Submission(s): 163Problem DescriptionXYZ is playing an原创 2015-07-31 10:38:00 · 1082 阅读 · 4 评论 -
HDU 5335 Walk Out(BFS+BFS) 经典 2015 Multi-University Training Contest 4
Walk OutTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 506 Accepted Submission(s): 84Problem DescriptionIn an n∗m maze, the ri原创 2015-07-30 21:27:13 · 722 阅读 · 0 评论 -
HUNNU 11568 Interstellar Travel(DP+优先队列)
Interstellar TravelTime Limit: 1000ms, Special Time Limit:2500ms,Memory Limit:65536KBTotal submit users: 2, Accepted users:1Problem 11568 : No special judgementProblem desc原创 2015-08-08 18:22:37 · 894 阅读 · 0 评论 -
hdu Swipe Bo(bfs+状态压缩)错了多次的题
Swipe BoTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1549 Accepted Submission(s): 315Problem Description“Swipe Bo” is a pu原创 2015-07-14 00:50:23 · 949 阅读 · 0 评论 -
BNU 49102进化之地(Evoland) BFS
进化之地(Evoland)Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss NextFont Size: + -T原创 2015-05-09 20:19:01 · 970 阅读 · 0 评论 -
CSU1569: Wet Tiles(BFS控制时间相同)
1569: Wet TilesTime Limit: 60 Sec Memory Limit: 512 MBSubmit: 73 Solved: 34[Submit][Status][Web Board]DescriptionAlice owns a construction company in the town of Norainia, famous f原创 2015-04-06 18:55:27 · 738 阅读 · 0 评论 -
HDU3533Escape(BFS)错了十多次
EscapeTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 341 Accepted Submission(s): 94Problem DescriptionThe students of the原创 2014-12-14 00:22:35 · 1727 阅读 · 0 评论 -
csu 1460: Kastenlauf
1460: KastenlaufTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 90 Solved: 28[Submit][Status][Web Board]DescriptionInputOutputSample Input220 01000 01000 10002原创 2014-05-25 22:40:32 · 1292 阅读 · 0 评论 -
csu 1459: Chess (橡棋)
1459: ChessTime Limit: 1 Sec Memory Limit: 128 MB Special JudgeSubmit: 58 Solved: 31[Submit][Status][Web Board]DescriptionInputOutputSample Input3E 2 E 3F 1 E 8原创 2014-05-25 22:33:08 · 1086 阅读 · 0 评论 -
hdu1428漫步校园( 最短路+BFS(优先队列)+记忆化搜索(DFS))
Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于东南端的(n,n)。因有多条路线可以选择,LL希望每次的散步原创 2013-08-08 00:51:43 · 2072 阅读 · 0 评论 -
hdu3790最短路径问题(BFS+优先队列)
Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t;起点s,终点。n和m为0时输入结束。原创 2013-08-07 14:49:50 · 1224 阅读 · 0 评论 -
hdu1226 超级密码 (BFS,里面用了大数取余原理)
Problem DescriptionIgnatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0注意:由于宝藏的历史久远,当时的系统最多只能保存500位密码.因此如果得到的密码长度大于500也不能用来开启房门,这原创 2013-08-05 20:30:36 · 1077 阅读 · 0 评论 -
hdu1372 Knight Moves (BFS)
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-03 01:00:10 · 1152 阅读 · 0 评论 -
hdu1240 Asteroids! (BFS)
Problem DescriptionYou're in space.You want to get home.There are asteroids.You don't want to hit them.InputInput to this problem will consist of a (non-empty) series of up to 100 da原创 2013-08-03 00:55:53 · 2314 阅读 · 0 评论 -
hdu1072 Nightmare (BFS)
Problem DescriptionIgnatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb e原创 2013-08-03 00:48:10 · 1291 阅读 · 0 评论 -
1242Rescue (优先队列BFS)
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-08-02 20:22:22 · 1049 阅读 · 0 评论 -
hdu1026 Ignatius and the Princess I (优先队列 BFS)
Problem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth.原创 2013-08-02 20:18:53 · 1340 阅读 · 0 评论 -
hdu1104Remainder (BFS)
Problem DescriptionCoco is a clever boy, who is good at mathematics. However, he is puzzled by a difficult mathematics problem. The problem is: Given three integers N, K and M, N may adds (‘+’) M, s原创 2013-08-08 20:13:02 · 1341 阅读 · 0 评论 -
hdu1728逃离迷宫 (利用最短路径思想+优先队列(BFS))
Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,原创 2013-08-09 21:27:15 · 1842 阅读 · 0 评论 -
hdu2209翻纸牌游戏(bfs+状态压缩)
Problem Description有一种纸牌游戏,很有意思,给你N张纸牌,一字排开,纸牌有正反两面,开始的纸牌可能是一种乱的状态(有些朝正,有些朝反),现在你需要整理这些纸牌。但是麻烦的是,每当你翻一张纸牌(由正翻到反,或者有反翻到正)时,他左右两张纸牌(最左边和最右边的纸牌,只会影响附近一张)也必须跟着翻动,现在给你一个乱的状态,问你能否把他们整理好,使得每张纸牌都正面朝上,如果可以,最原创 2014-05-22 18:44:56 · 953 阅读 · 0 评论 -
hdu1429胜利大逃亡(续) (状态压缩+BFS)
Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王原创 2014-05-05 23:13:37 · 944 阅读 · 0 评论 -
蓝桥杯, 历届试题 九宫重排 (八数码)
问题描述 如下面第一个图的九宫格中,放着 1~8 的数字卡片,还有一个格子空着。与空格子相邻的格子中的卡片可以移动到空格中。经过若干次移动,可以形成第二个图所示的局面。 我们把第一个图的局面记为:12345678. 把第二个图的局面记为:123.46758 显然是按从上到下,从左到右的顺序记录数字,空格记为句点。 本题目的任务是已知九宫的初态和终态,求最少经过原创 2014-02-27 22:24:44 · 3000 阅读 · 0 评论 -
fzu 2150 Fire Game(BFS)
Problem DescriptionFat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just em原创 2013-12-22 17:32:38 · 3922 阅读 · 0 评论 -
把数码的境界
八数码的八境界八数码的八境界 研究经典问题,空说不好,我们拿出一个实际的题目来演绎。八数码问题在北大在线测评系统中有一个对应的题,题目描述如下:EightTime Limit: 1000MS Memory Limit: 65536K Special JudgeDescription原创 2013-06-09 18:11:53 · 975 阅读 · 0 评论 -
hdu1043Eight (经典的八数码)(康托展开+BFS)
建议先学会用康托展开:Problem DescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a num原创 2013-08-13 21:20:32 · 3311 阅读 · 0 评论 -
hdu4527小明系列故事——玩转十滴水 (BFS+DFS)
Problem Description 小明最近喜欢上了一个名为十滴水的游戏。 游戏是在一个6*6的方格内进行的,每个格子上有一滴水或者没有水滴。水滴分为四个等级1~4。初始时你有十滴水,通过把水加入格子内的水滴,会让水滴升1级。你也可以把水放到空格子内,这样会在这个格子里面产生一个1级的水滴。当水滴等级大于4时则会爆裂为四个小水滴,并向四个方向飞溅。每个飞溅的小水滴碰到其原创 2013-08-12 20:56:06 · 1735 阅读 · 0 评论 -
hdu1430魔板(BFS+康托展开)
做这题先看:http://blog.csdn.net/u010372095/article/details/9904497Problem Description在魔方风靡全球之后不久,Rubik先生发明了它的简化版——魔板。魔板由8个同样大小的方块组成,每个方块颜色均不相同,可用数字1-8分别表示。任一时刻魔板的状态可用方块的颜色序列表示:从魔板的左上角开始,按顺时针方向依次写下各方块原创 2013-08-11 22:06:48 · 4185 阅读 · 5 评论 -
BNUOJ 1038 Flowers(BFS)
FlowersTime Limit: 1000msMemory Limit: 65535KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss Next春天到了,师大的园丁们又开始忙碌起来了.京师广场上原创 2015-07-19 22:55:31 · 814 阅读 · 0 评论