摘要: 这题就是比较水的一道搜索题了,BFS跟DFS都能做,直接看代码吧!AC code:View Code 1 #include <iostream> 2 #define MAX 50 3 using namespace std; 4 int w, h; 5 char map[MAX][MAX]; 6 int dir[][2] = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}}; 7 int count; 8 bool inmap(int x,int y) 9 {10 return x >= 0 && x < h && y 阅读全文
posted @ 2012-03-23 00:23 背着超人飞 阅读(138) 评论(0) 推荐(0)