HBC24739回文数,贪心,模拟,思维Lake Counting题解

水水月牙 算法基础篇 57 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1

Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains either water ('W') or dry land ('.'). Farmer John would like to figure out how many ponds have formed in his field. A pond is a connected set of squares with water in them, where a square is considered adjacent to all eight of its neighbors. Given a diagram of Farmer John's field, determine how many ponds he has.

HBC24739回文数,贪心,模拟,思维Lake Counting题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC24739回文数 贪心 模拟 思维Lake Counting题解