A. Lake Counting

    Type: Default 1000ms 128MiB

Lake Counting

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

题意:有一块N×M的土地,雨后积起了水,有水标记为‘W’,干燥为‘.’。八连通的积水被认为是连接在一起的。请求出院子里共有多少水洼?

输入

第一行为N,M(1≤N,M≤110)。

下面为N*M的土地示意图。

输出

一行,共有的水洼数。

样例

10 12
W........WW.
.WWW.....WWW
....WW...WW.
.........WW.
.........W..
..W......W..
.W.W.....WW.
W.W.W.....W.
.W.W......W.
..W.......W.
3

来源

一本通在线评测

2.22课后作业

Not Claimed
Status
Done
Problem
4
Open Since
2025-2-23 0:00
Deadline
2025-3-16 23:59
Extension
24 hour(s)