摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1241BFS 横着,竖着或斜着相连都是一组 一共有几组?本来很基础的一道搜索 可是有一个地方错误 找了一晚上 while(beg<end) 错写为了 while(beg<=end) 这道题我用的BFS 还可以DFS 并查集也可以做敲了俩代码 改了一晚上 贴一下吧(一)BFS#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<queue>us 阅读全文
posted @ 2011-11-23 21:47 快乐. 阅读(241) 评论(0) 推荐(0) 编辑