![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 81
walkaway11
这个作者很懒,什么都没留下…
展开
-
pku 3278 Catch That Cow---BFS
poj 3278(bfs)题目很简单,bfs直接可以解决掉,注意截枝:有些位置前面已经出现了,后面就不用重复了。设了一个tag[]帮助解决这个问题。#include#include#include#include #define Len 100005using namespace std;struct Node{ int x; int step;};bool tag[Len];int原创 2009-02-18 13:28:00 · 540 阅读 · 0 评论 -
poj 2267 From Dusk till Dawn or: Vladimir the Vampire
<br /><br />poj 2267 From Dusk till Dawn or: Vladimirthe Vampire<br />有个吸血鬼要从城市A到城市B,但是吸血鬼有3个问题需要克服:他只能在傍晚18:00到凌晨6:00之间旅行,其他时间只能待在车站。二:他必须带一个盒子,盒子里面装的血。三:他每天中午12点需要喝盒子里面的1升血。<br />问题:你帮吸血鬼找到一条路径,它需要带最少的血。<br />输入:n:道路的条数<br />每条路包括:起始城市,终点城市,起始时间,所需要的时间原创 2010-10-09 21:53:00 · 1187 阅读 · 0 评论