BFS广搜题目(转载)
有时间要去做做这些题目,所以从他人空间copy过来了,谢谢那位大虾啦。
pku 1175 Starry Night
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1175
解法:BFS,要注意的是如何判断图形是一样的,我的做法就是计算每两个点的距离之和。
看:http://hi.baidu.com/doxi_free/blog/item/2e3b6ea8fff309fa1f17a238.html
pku 1020 Anniversary Cake
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1020
解法:dfs 简单题目。
pku 1077 Eight
题目地址:http://162.105.81.212/JudgeOnline/problem?id=1077
解法:广搜,双向光搜,A*,IDA* 其中 A* 时间最好,双向的广搜也ok ,IDA*时间500+
看:http://hi.baidu.com/doxi_free/blog/item/cd991bd00c111a309b5027a3.html
pku 2286 The Rotation Game
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=2286
解法:IDA* ,广度优先应该也是可以的。
看:http://hi.baidu.com/doxi_free/blog/item/f21ddb25bc62b9358744f9ed.html
pku 1480 Optimal Programs
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1480
解法:DFS ,我也不知道,有些像是IDA* ,用BFS MLE 。
看:http://hi.baidu.com/doxi_free/blog/item/1e3ac6f9c7fce209d8f9fd53.html
pku 1419 Graph Coloring
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1419
解法:DFS ,用临街链表存储图形
http://hi.baidu.com/doxi_free/blog/item/085dbadc0bfdab3c5882dd25.html
pku 1324 Holedox Moving
题目地址: http://acm.pku.edu.cn/JudgeOnline/problem?id=1324
解法:BFS,要用位处理尾巴,但是zfy有更好的方法。
看:http://hi.baidu.com/doxi_free/blog/item/2f7e17f22abc7856352acca5.html
pku 1475 Pushing Boxes
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1475
解法:BFS ,在中间用了两个BFS 第一个是找到总的路径,第二个是输出路径;
pku 1691 Painting A Board
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1691
解法:dfs 简单
看:http://hi.baidu.com/doxi_free/blog/item/69611728d62e00f898250a06.html
poj 1725 BALL
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1725
解法:dfs 简单 不需要剪枝和任何的优化
看:http://hi.baidu.com/doxi_free/blog/item/cf30bf590cc1bfd99d82042b.html
poj 1574 The Triangle Game
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1574
解法:dfs 简单 ,与 1725一样需要编号,或许要有一个上界剪枝
看:http://hi.baidu.com/doxi_free/blog/item/a41378fa30c2bb116d22eba5.html
POJ 1069 -The Bermuda Triangle
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1069
解法:dfs
看:http://hi.baidu.com/doxi_free/blog/item/13fc940020242805728da55f.html
POJ 1084 - Square Destroyer
http://acm.pku.edu.cn/JudgeOnline/problem?id=1084
解法: A* 难想
POJ 1167 - The Buses
http://acm.pku.edu.cn/JudgeOnline/problem?id=1167
解法:DFS 需要一些剪枝才可以过的。
pku 1137 The New Villa
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1137
解法: 简单的bfs ,用位表示状态。
看:http://hi.baidu.com/doxi_free/blog/item/2aa0b1831cecd3b86d81195f.html
POJ 1190 - 生日蛋糕http://acm.pku.edu.cn/JudgeOnline/problem?id=1190
解法: DFS 黑书上有解法,很好的一个题目,剪枝很重要。
POJ 1945 - Power Hungry Cows
http://acm.pku.edu.cn/JudgeOnline/problem?id=1945
POJ 1950 Dessert
http://acm.pku.edu.cn/JudgeOnline/problem?id=1950
直接的 dfs 不剪枝 170 ms 那位提示提示剪枝
POJ 2044 - Weather Forecast
http://acm.pku.edu.cn/JudgeOnline/problem?id=2044
解法: BFS ,注意四个角落的就可以满足所有的地方达到要求。
POJ 2308 - Dearboy's Puzzle
http://acm.pku.edu.cn/JudgeOnline/problem?id=2308
解法:dfs+ bfs
看:http://hi.baidu.com/zfy0701/blog/item/c62f41af65aa1fca7cd92afc.html
POJ 2449 Remmarguts' Date
http://acm.pku.edu.cn/JudgeOnline/problem?id=2449
解法:dijkstra + A*
看:http://hi.baidu.com/doxi_free/blog/item/905df0554e675d5ed10906cb.html
POJ 2688 - Cleaning Robot
http://acm.pku.edu.cn/JudgeOnline/problem?id=2688
解法:bfs建立图形,dfs 找到最短的。
看:http://hi.baidu.com/doxi_free/modify/blog/2a62aa002a824ad0277fb5f4
POJ 2908 - Quantum
http://acm.pku.edu.cn/JudgeOnline/problem?id=2908
解法: 优先队列 bfs
看:http://hi.baidu.com/doxi_free/blog/item/82ab806fd9be46dd80cb4a64.html
POJ 3074 - Sudoku
http://acm.pku.edu.cn/JudgeOnline/problem?id=3074
解法: dfs 有一些的难度
看:http://hi.baidu.com/doxi_free/blog/item/44ba7cdb8e8937dcb6fd48ac.html
POJ 3635 full tank?
http://acm.pku.edu.cn/JudgeOnline/problem?id=3635
解法:priority_queue + bfs;
看:http://hi.baidu.com/hnu_reason/blog/item/086e3dccfc8cb21600e9286b.html
ZOJ 3059 Die Board Game
解法: bfs ,一个很好的题目,
看:http://hi.baidu.com/doxi_free/blog/item/e9b116c6729fe0dbd000604d.html
POJ 1872 A Dicey Problem
http://acm.pku.edu.cn/JudgeOnline/problem?id=1872
解法: bfs 搜索的顺序 上下左右 然后就是用三位或是二位来表示状态
看http://hi.baidu.com/doxi_free/blog/item/fc4621d6048b8ed5a044df54.html
WHOJ 1407 2-Dimensional Rubik's Cube bfs
http://acm.whu.edu.cn/oak/problem/problem.jsp?problem_id=1407
一个很好的bfs的题目,不过难度不大 。
看:http://hi.baidu.com/doxi_free/blog/item/6f5a46616822ae4cebf8f8fd.html
Hdu 2209翻纸牌游戏
地址: http://acm.hdu.edu.cn/showproblem.php?pid=2209
看:http://hi.baidu.com/doxi_free/blog/item/b841950ffce468ef36d122f4.html 数组的设计
地址:http://162.105.81.212/JudgeOnline/problem?id=2157
看:http://hi.baidu.com/doxi_free/blog/item/4eb456ca271da817be09e687.html
http://acm.hdu.edu.cn/showproblem.php?pid=1429
HDU 1885 Key Task (BFS)
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1885
简单的bfs 状态最好是用位表示;
看:http://hi.baidu.com/doxi_free/blog/item/14cfe61219659d2bdd5401dd.html
xmu 1128.坦克大战 ( bfs)
地址:http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1128
看:http://hi.baidu.com/doxi_free/blog/item/0ea38c45a6adff8ab3b7dc45.html
pku 1198 Solitaire && zoj 1505 Solitaire
题目地址:http://162.105.81.212/JudgeOnline/problem?id=1198
解法 : BFS , 双向的 BFS , ID也应该可以的...
看:http://hi.baidu.com/doxi_free/blog/item/91847c3c53a558e73d6d97df.html
hud 1198Farm Irrigation && zoj 2142 Farm Irrigation
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2412
解法 : dfs 如何设计 ......
看:http://hi.baidu.com/doxi_free/blog/item/0e55f9061188e4c47b89479e.html
poj 1697 The Erythea Campaign( BFS)
解法:有限队列的bfs .
看: http://hi.baidu.com/doxi_free/blog/item/657dbf44243bf43686947358.html
BFS广搜题目(转载)的更多相关文章
- hdu 1026:Ignatius and the Princess I(优先队列 + bfs广搜。ps:广搜AC,深搜超时,求助攻!)
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (J ...
- POJ3984 BFS广搜--入门题
迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20816 Accepted: 12193 Descriptio ...
- hdu 1242:Rescue(BFS广搜 + 优先队列)
Rescue Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submis ...
- hdu 1195:Open the Lock(暴力BFS广搜)
Open the Lock Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- hdu 1180:诡异的楼梯(BFS广搜)
诡异的楼梯 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Subm ...
- hdu 2717:Catch That Cow(bfs广搜,经典题,一维数组搜索)
Catch That Cow Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
- hdu 2612:Find a way(经典BFS广搜题)
Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- Catch That Cow(BFS广搜)
Description Farmer John has been informed of the location of a fugitive cow and wants to catch her i ...
- 解救小哈——bfs广搜
问题描述: 小哈去玩迷宫,结果迷路了,小哼去救小哈.迷宫由n行m列的单元格组成(n和m都小于等于50),每个单元格要么是空地,要么是障碍物. 问题:帮小哼找到一条从迷宫的起点通往小哈所在位置的最短路径 ...
随机推荐
- python基础---->python的使用(一)
这里面记录一些python的一些基础知识,数据类型和变量.幸而下雨,雨在街上泼,却泼不进屋内.人靠在一块玻璃窗旁,便会觉得幸福.这个家还是像个家的. python的一些基础使用 一.python中的数 ...
- namespace main
c++程序运行的入口是::main 如果把main放到某个命名空间中,则系统就无法找到入口. 所以就有了为了测试功能的tools和test,其中没有命名空间.
- git-常用命令一览表
一.git bash 操作文件 常用命令表 git常用 文件操作 命令 功能分类 命令 说明 备注 目录切换 cd 文件目录 改变/切换 目录, change directory 如 cd e:\ff ...
- C# 反射的深入了解
Assembly.Load("")的使用说明如下; 并不是命名空间.常用的是程序集名称,也就是dll的名称 关于反射Assembly.Load("程序集" ...
- LeetCode 32 Longest Valid Parentheses(最长合法的括号组合)
题目链接: https://leetcode.com/problems/longest-valid-parentheses/?tab=Description Problem :已知字符串s,求出其 ...
- 4327: JSOI2012 玄武密码[SAM]
4327: JSOI2012 玄武密码 Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 263 Solved: 112[Submit][Status] ...
- 【BZOJ4445】[Scoi2015]小凸想跑步 半平面交
[BZOJ4445][Scoi2015]小凸想跑步 Description 小凸晚上喜欢到操场跑步,今天他跑完两圈之后,他玩起了这样一个游戏. 操场是个凸n边形,N个顶点按照逆时针从0-n-l编号.现 ...
- node path的几个路径问题
__dirname: 总是返回被执行的 js 所在文件夹的绝对路径 __filename: 总是返回被执行的 js 的绝对路径 process.cwd(): 总是返回运行 node 命令时所在的文件夹 ...
- Coding 代码管理快速入门(转)
当项目创建好了之后,我们该如何上传代码到 coding 上呢? Coding 网站使用“ Git 仓库”(类似 github )来管理代码. 其操作原理在于:利用 git 服务,将本地的项目目录下的文 ...
- 思科SVI接口和路由接口区别
Cisco多层交换中提到了一个SVI接口,路由接口.在多层交换机上可以将端口配置成不同类型的接口. 其中SVI接口 类似于 interface Vlan10ip address 192.168.20 ...