![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
***递归***
zm_11
这个作者很懒,什么都没留下…
展开
-
Hdu 1241 Oil Deposits
分析:这题与杭电上1312题Red and Black 一样,都用到递归。 #include #include #define N 110 int t; int m,n; char a[N][N]; void dfs(int x,int y) { if(a[x][y]=='*') return ; if(xm||yn) return ; a[x][y]='*';原创 2015-08-03 21:11:43 · 337 阅读 · 0 评论 -
Hdu Oj 1312Red and Black
#include #include char a[22][22]; int count=0; int m,n; void dfs(int x,int y) { if(xn||ym) return ; if(a[x][y]=='#') return ; a[x][y]='#'; count++; dfs(x,y+1); dfs(x,y-1); d原创 2015-08-03 18:02:09 · 374 阅读 · 0 评论