锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品久久久久久无码国产,久久综合综合久久综合,日韩精品久久久久久免费http://www.shnenglu.com/nxm1990/articles/159959.htmlis-programmeris-programmerFri, 11 Nov 2011 06:41:00 GMThttp://www.shnenglu.com/nxm1990/articles/159959.htmlhttp://www.shnenglu.com/nxm1990/comments/159959.htmlhttp://www.shnenglu.com/nxm1990/articles/159959.html#Feedback0http://www.shnenglu.com/nxm1990/comments/commentRss/159959.htmlhttp://www.shnenglu.com/nxm1990/services/trackbacks/159959.html涓昏璇ラ琚垜鎯沖鏉備簡錛屼竴寮濮嬩互涓烘槸涓嶅悓褰㈢姸鐨勪釜鏁幫紝鍒頒笉鍚屼釜鏁扮殑涓暟錛屾渶鍚庛傘傘傚師鏉ユ槸闂湁澶氬皯鍧楋紒
鍏釜if錛岃屼笉鏄痠f-else if!
#include<iostream>
#include
<cstdio>
#include
<cstring>
using namespace std;
char map[105][105];
bool used[105][105];
bool dep[200];
int m,n;
bool check(int a,int b){
  
return  a > 0 && a <= m && b > 0 && b <= n && !used[a][b] && map[a][b];
}

void init(){
  memset(map,
0,sizeof(map));
  memset(used,
0,sizeof(used));
  memset(dep,
0,sizeof(dep));
}
int dfs(int a,int b){
  
int res=1;
  
if(check(a+1,b)){
    used[a
+1][b] = true;
    res 
+= dfs(a+1,b);
  }
  
if(check(a-1,b)){
    used[a
-1][b] = true;
    res 
+= dfs(a-1,b);
  }
  
if(check(a,b-1)){
    used[a][b
-1= true;
    res 
+= dfs(a,b-1);
  }
  
if(check(a,b+1)){
    used[a][b
+1= true;
    res 
+= dfs(a,b+1);
  }
  
if(check(a-1,b-1)){
    used[a
-1][b-1= true;
    res 
+= dfs(a-1,b-1);
  }
  
if(check(a+1,b-1)){
    used[a
+1][b-1= true;
    res 
+= dfs(a+1,b-1);
  }
  
if(check(a-1,b+1)){
    used[a
-1][b+1= true;
    res 
+= dfs(a-1,b+1);
  }
  
if(check(a+1,b+1)){
    used[a
+1][b+1= true;
    res 
+= dfs(a+1,b+1);
  }
  
return res;
}

int main(){
  
while(scanf("%d%d",&m,&n)!=EOF && m != 0){
    
char al;
    
char line[200];
    
int c=0;
    init();
    
for(int i = 1; i <= m ;i++){
      scanf(
"%s",line);
      
for(int j = 1; j <= n; j++){
    
if(line[j-1== '@')map[i][j] = true;
      }
    }
    
for(int i = 1; i <= m ;i++)
      
for(int j = 1; j <= n; j++){
    
if(check(i,j)){
      
//cout << i <<' '<<j <<endl;
      used[i][j] = true;
      
int t=dfs(i,j);
      dep[t] 
= true;
      c
++;
    }

      }

    
/*for(int i = 1; i <= 199; i++){
      if(dep[i]) c++;
      }
*/
    printf(
"%d\n",c);
  }
}
    


is-programmer 2011-11-11 14:41 鍙戣〃璇勮
]]>
99久久免费国产特黄| 国产精品伊人久久伊人电影| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区| 91精品国产91热久久久久福利 | 热综合一本伊人久久精品| 午夜精品久久久久成人| 久久婷婷成人综合色综合| 久久精品国产第一区二区| 2021最新久久久视精品爱| 久久久青草久久久青草| 国内精品久久久久影院老司| 四虎国产精品免费久久5151| 精品一二三区久久aaa片| 九九久久精品无码专区| 久久久久女人精品毛片| 欧美成人免费观看久久| 国产精自产拍久久久久久蜜| 无码久久精品国产亚洲Av影片| 久久精品国产精品亚洲艾草网美妙| 亚洲中文字幕无码一久久区| 久久综合久久性久99毛片| 久久香蕉一级毛片| 97久久天天综合色天天综合色hd | 狠狠色婷婷综合天天久久丁香 | 亚洲AV乱码久久精品蜜桃| 久久精品国产只有精品66| 精品久久久噜噜噜久久久| 国产精品久久久香蕉| 久久久久国产精品麻豆AR影院| 国产精品久久久久AV福利动漫| 久久婷婷五月综合成人D啪| 亚洲欧美另类日本久久国产真实乱对白| 久久精品一区二区国产| 国产成人精品免费久久久久| 久久青青草原亚洲av无码app| 久久天天躁狠狠躁夜夜不卡| 波多野结衣久久| 日韩人妻无码一区二区三区久久| 精品久久久一二三区| 伊人久久综合无码成人网| 伊人久久无码中文字幕|