hdu1312 Red and Black(最基础的搜索题)
摘要:
这个题就是找和'@'相连通的'.'的个数再加1。深搜和广搜都可以,只不过貌似广搜更省时间。我的是用广搜写的:View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<queue> 4 using namespace std; 5 char map[21][21]; 6 int h,w,sum; 7 struct node 8 { 9 int x;10 int y;11 };12 struct node start;13 void make_map()14 {15 阅读全文
posted @ 2012-11-10 16:19 点A点C 阅读(182) 评论(0) 推荐(0) 编辑