随笔分类 -  02.搜索 - (1)BFS

摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int dx[4]={+1,0,-1,0}; 6 int dy[4]={0,+1,0,-1}; 7 struct type{ 8 int x,y,t; 9 }meteor[50000+5],now,next; 10 int n,map[305][305],... 阅读全文
posted @ 2017-03-21 22:26 Dilthey 阅读(296) 评论(0) 推荐(0)
摘要:“.”能走,“#”不能走,“@”为起点,求所有能走到的地方。 BFS: DFS: 阅读全文
posted @ 2017-03-20 22:13 Dilthey 阅读(139) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1372 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2017-03-20 20:39 Dilthey 阅读(154) 评论(0) 推荐(0)