#include<iostream>
#include<cstdio>
#include<string>
#define helloworl
using namespace std;
char st[150][150];
int n,m;
int main()
{
#ifdef helloworld
freopen("in.in","r",stdin);
#endif // helloworld
while(scanf("%d%d",&n,&m)==2)
{
double ans=0.0;
int cnt=0;
for(int i=0; i<n; i++)
scanf("%s",st[i]);
for(int i=0; i<n; i++)
{
for(int j=0; j<m; j++)
{
if(st[i][j]=='/'||st[i][j]=='\\')
{
cnt++;
ans+=0.5;
//cout<<cnt<<" "<<i<<" "<<j<<" "<<ans<<endl;
if(cnt%2==0) cnt=0;
}
else if(cnt%2==1) ans+=1;
}
}
printf("%.0lf\n",ans);
}
return 0;
}
UVA 1641(p337)----ASCII Area
最新推荐文章于 2018-08-28 18:31:41 发布