摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=1241题目大意:简单的dfs~ 搜索地图,每找到一个油田,就搜索八个方向,将连着的油田标记为同一个。算法:dfsAC code:View Code 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #define MAXN (100 + 10) 5 char map[MAXN][MAXN]; 6 int oil; 7 int m, n; 8 9 int dx[8] = {-1,-1,-
阅读全文