HBC51276送水,过关题目,语言题Muddy Fields题解

淫家是湿人 算法基础篇 62 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
Rain has pummeled the cows' field, a rectangular grid of R rows and C columns . While good for the grass, the rain makes some patches of bare earth quite muddy. The cows, being meticulous grazers, don't want to get their hooves dirty while they eat. To prevent those muddy hooves, Farmer John will place a number of wooden boards over the muddy parts of the cows' field. Each of the boards is 1 unit wide, and can be any length long. Each board must be aligned parallel to one of the sides of the field. Farmer John wishes to minimize the number of boards needed to cover the muddy spots, some of which might require more than one board to cover. The boards may not cover any grass and deprive the cows of grazing area but they can overlap each other. Compute the minimum number of boards FJ requires to cover all the mud in the field.

Rain has pummeled the cows' field, a rectangular grid of R rows and C columns (1≤R≤50,1≤C≤50)(1 leq R leq 50, 1 leq C leq 50)(1≤R≤50,1≤C≤50). While good for the grass, the rain makes some patches of bare earth quite muddy. The cows, being meticulous grazers, don't want to get their hooves dirty while they eat. To prevent those muddy hooves, Farmer John will place a number of wooden boards over the muddy parts of the cows' field. Each of the boards is 1 unit wide, and can be any length long. Each board must be aligned parallel to one of the sides of the field. Farmer John wishes to minimize the number of boards needed to cover the muddy spots, some of which might require more than one board to cover. The boards may not cover any grass and deprive the cows of grazing area but they can overlap each other. Compute the minimum number of boards FJ requires to cover all the mud in the field.

HBC51276送水,过关题目,语言题Muddy Fields题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC51276送水 过关题目 语言题Muddy Fields题解