/* * poj1154.cpp * * Created on: 2010-8-9 * Author: friendy */ //有点水 #include
#include
#include
using namespace std; //一个对递归不太明白的我,今天竟然写出了2A的程序。 char str[50][50]; int used[27]; int cnt,mmax; int m,n; void dfs(int x,int y){ if(!used[str[x][y]-'A']){ used[str[x][y]-'A']=1; cnt++; if(x-1>=0)dfs(x-1,y); if(y-1>=0)dfs(x,y-1); if(x+1
poj1154
最新推荐文章于 2019-07-29 16:53:10 发布