hdoj 1010 Tempter of the Bone(深搜剪枝)
来源:互联网 发布:脑部良性肿瘤 知乎 编辑:程序博客网 时间:2024/05/19 04:51
题目大意:地图由"S""X""D""."组成,"X":wall ,".":block, 问是否能从S出发在第T秒钟刚好到达D。
思路:深搜,注意剪枝。
剪枝一:block数应该大于等于T,且大于需要走的最少步数。T应该大于等于最少步数。
剪枝二:奇偶剪枝。
即把地图看成
01010101
10101010
01010101
10101001
即从1走到1 或从0走到0 需要偶数步。从0走到1 或从1走到0需要奇数步。
所以把位置相加同 步数进行异或即可判断了。
一开始只有剪枝一超时了,接着网上查了下,发现奇偶校验。但是自己写了下,效率还不是很高。187ms~~懒得弄了~~
- hdoj 1010 Tempter of the Bone(深搜剪枝)
- HDOJ--1010--Tempter of the Bone【DFS+剪枝】
- hdoj 1010 Tempter of the Bone (DFS + 剪枝)
- hdoj 1010 Tempter of the Bone 【DFS】+【奇偶剪枝】
- HDOJ 1010 Tempter of the Bone DFS+剪枝
- HDOJ 1010 Tempter of the Bone(搜索,奇偶剪枝)
- hdoj 1010 Tempter of the Bone 【dfs+奇偶剪枝】
- HDOJ 1010 Tempter of the Bone(深搜+回溯+剪枝)
- hdoj-1010-Tempter of the Bone【深搜+剪枝】
- HDOJ 1010 Tempter of the Bone (DFS && 奇偶剪枝)
- HDOJ 1010 Tempter of the Bone(DFS奇偶剪枝)
- hdoj--1010--Tempter of the Bone(搜索+奇偶剪枝)
- HDOJ 1010 Tempter of the Bone(剪枝+DFS)
- hdoj 1010 Tempter of the Bone (dfs 奇偶剪枝)
- HDOj 1010 Tempter of the Bone(DFS+奇偶性剪枝)
- HDOJ Tempter of the Bone JAVA 1010 DFS+剪枝
- HDU 1010 Tempter of the Bone 深搜剪枝
- HDU 1010 Tempter of the Bone 深搜剪枝
- Chrome插件开发学习笔记(一)
- JPA教程
- 打war包
- 硬盘安装ubuntu 10.04与初探grub4dos的东东
- 面试及总结3
- hdoj 1010 Tempter of the Bone(深搜剪枝)
- 纯css画一个圆
- s型传感器设计
- div框架.html
- POJ 3468 A Simple Problem with Integers(线段树)
- firebug的console
- 堆和栈的区别
- 解决Windows域管理的几个经典问题
- directsho基类一