POJ 1562 Oil Deposits
摘要:
简单DFS,搜索八个方向。# include <stdio.h>const int dir[][2] = {{-1,0}, {0,-1}, {0,1}, {1,0}, {1,1}, {1,-1}, {-1,1}, {-1,-1}};int n, m;char f[105][105];char read_data(void){ int i, j; scanf("%d", &m); scanf("%d", &n); if (m == 0) return 0; for (i = 1; i <= m; ++i) { scanf( 阅读全文
posted @ 2012-06-04 12:06 getgoing 阅读(201) 评论(0) 推荐(0) 编辑