DFS入门精讲:油田(Oil Deposits UVA572)
传送门:https://vjudge.net/problem/UVA-572具体原题看链接。大意:输入一个m行n列字符矩阵,统计字符@组成多少个八连块(如果两个字符@所在格子横竖对角线方向相邻就是八连块)。简单的DFS遍历,适合入门,我把代码能打的注释尽量都打了#include#includeconst int maxn=100+5;char pic[maxn][maxn
原创
2017-05-23 20:02:09 ·
980 阅读 ·
1 评论