***递归***
zm_11
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Hdu 1241 Oil Deposits
分析:这题与杭电上1312题Red and Black 一样,都用到递归。#include#include#define N 110int 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 · 377 阅读 · 0 评论 -
Hdu Oj 1312Red and Black
#include#includechar 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 · 416 阅读 · 0 评论
分享