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),每个单元格要么是空地,要么是障碍物. 问题:帮小哼找到一条从迷宫的起点通往小哈所在位置的最短路径 ...
随机推荐
- kubernetes 测试 Mariadb gtid 主从复制.
k8s 为 1个master 3个node 下载镜像 : mariadb 镜像版本是10.2.13 (此时10.3还没发布正式版) docker pull mariadb push到私有仓库 dock ...
- 【WEB前端系列之CSS】CSS3动画之Transform
前言 Transform字面上是变形,改变的意思,在CSS3中transform主要包括如下几种 旋转rotate 扭曲skew 缩放scale 移动translate 矩形变形matrix tran ...
- 使用Maven命令安装jar包到仓库中
项目中可能会碰到很多jar包,使用maven update不能更新,或者jar包是拷贝过来,不能编译的情况.此时就需要手动使用命令行安装. 例如Demo项目中提示缺少四个jar包,但是在repo中已经 ...
- jconsole连接远程Tomcat应用
一.环境信息 远程tomcat:linux 64位 centos 7 上tomcat 8 本机:windows7 二.步骤 linux上,在tomcat安装目录的bin下,新建setenv.sh,内容 ...
- mysql客户端工具
MySQL 数据库不仅提供了数据库的服务器端应用程序,同时还提供了大量的客户端工具程序,如 mysql,mysqladmin,mysqldump 等等,都是大家所熟悉的.虽然有些人对这些工具的功能都已 ...
- locate命令的使用
使用locate命令,遇到了这样的情况:当前目录下有一个文件,而使用这个命令时却查找不到这个文件,上网查了一下,找到了原因,就在下面. 1. find find是最常见和最强大的查找命令,你可以用它找 ...
- layerui如何隐藏按钮?
https://www.layui.com/doc/modules/layer.html#btn 建议把 btn: ['取消'],btnAlign: 'c',yes: function (index) ...
- React 事件处理函数
触摸事件:onTouchCancel\onTouchEnd\onTouchMove\onTouchStart (只会在移动设备上接受) 键盘事件:onKeyDown\onKeyPress\onKeyU ...
- MatLab Mark Points 给点标序号
在MatLab中,我们有时要给画出的点按一定顺序标上序号,下面这个简单的例子实现这个功能: x=rand(,); y=rand(,); plot(x,y,'r*'); text(x+:));
- jQuery生成一个DIV容器,ID是"rating".
我们需要一些服务器端代码,这个例子中用到了一个PHP文件,读取rating参数然后返回rating总数和平均数.看一下rate.php代码.虽然这些例子也可以不使用AJAX来实现,但显示我们不会那么做 ...