//UVA1641ASCIIArea
#include<cstdio>
#include<cstring>
char s[100 + 10];
int main() {
int h, w;
freopen("UVA1641out.txt", "w", stdout);
while(scanf("%d%d", &h, &w) == 2) {
int in = 0, c = 0, ans = 0;
while(h--) {
scanf("%s", s);
for(int i = 0; s[i]; i++) {
if(s[i] == '/' || s[i] == '\\') {
c++; in = !in;
}
else if(in) ans++;
}
}
printf("%d\n", ans + c / 2);
}
return 0;
}
/*
4 4
/\/\
\../
.\.\
..\/
*/
UVA1641ASCIIArea
最新推荐文章于 2018-08-28 18:31:41 发布