急求翻译英语!!

**********************************************************************Problem12:Feedi... **********************************************************************

Problem 12: Feeding Time [Damon Doucet, 2010]

It's Bessie's feeding time, and Farmer John is trying to decide
where to put her. FJ has a farm that comprises W x H (1 <= W <=
750; 1 <= H <= 750) squares and is partitioned into one or more
separate pastures by rocks both large and small. Every pasture
contains some grass and some rocks.

Bessie is a hungry little cow and just loves to eat, eat, eat her
grass. She can move from any square to any other square that is
horizontally, vertically, or diagonally adjacent. Bessie can't cross
the rocks because they hurt her feet, and, of course, she can't
leave the farm. Bessie wants to know the maximum number of squares
of grass that she can eat.

FJ has a map of his farm, where a '.' represents a square of grass,
and a '*' represents a rock. Consider this 10x8 map and a detailed
breakdown of the extent of each of its three pastures:

...*....** | 111*....** ...*2222** ...*....**
..**....** | 11**....** ..**2222** ..**....**
...*....** | 111*....** ...*2222** ...*....**
...**.*.** | 111**.*.** ...**2*2** ...**.*.**
***.**.*** | ***1**.*** ***.**2*** ***.**.***
...**.*.** | 111**.*.** ...**2*2** ...**.*.**
...*.***** | 111*.***** ...*2***** ...*.*****
...***..** | 111***..** ...***..** ...***33**

Pasture 1 has 21 squares; pasture 2 has 18 squares; pasture 3 has
2 squares. Thus Bessie should choose pasture 1 with 21 squares to
maximize the grass she can eat.

PROBLEM NAME: feedtime

INPUT FORMAT:

* Line 1: Two space-separated integers: W and H

* Lines 2..H+1: Line i+1 describes field row i with W characters (and
no spaces), each either '.' or '*'

SAMPLE INPUT (file feedtime.in):

10 8
...*....**
..**....**
...*....**
...**.*.**
***.**.***
...**.*.**
...*.*****
...***..**

OUTPUT FORMAT:

* Line 1: A single integer that represents the maximum number of
squares of grass that Bessie can eat.

SAMPLE OUTPUT (file feedtime.out):

21
展开
 我来答
zhangkai8299
2010-07-29
知道答主
回答量:21
采纳率:0%
帮助的人:0
展开全部
问题 12: 送时间 [Damon Doucet,2010年]
贝西的喂养时间和农民约翰正试图决定把她放在哪儿。校有一个农场,它包括宽 x 高 (1<= w=""></=><=
></=
>750.1<= h=""></=><= 750) squares and is partitioned into one or more
750)="" squares="" and="" is="" partitioned="" into="" one="" or="" more=""></= 750) squares and is partitioned into one or more
>大、 小岩分隔的牧场。每个牧场包含一些草和一些岩石。
贝西是饿了的小母牛,只是爱吃,吃,吃她草。她可以移到任何其他方的任何广场水平、 垂直方向,或沿对角线方向相邻。贝茜不能交叉岩石因为他们伤害了她的脚,当然,她不能离开农场。贝西想要知道方块的最大数量她能吃的草。
校有他的农场的地图哪里一个 ' ' 表示一个正方形的草,和一个 '*' 表示一个岩石。这 10 x 8 张地图和详细的考虑每个及其三个牧场的程度的分项数字:
...*....** | 111*....** ...*2222** ...*....**..**....** | 11**....** ..** 2222年 ****....**...*....** | 111*....** ...*2222** ...*....**...**.*.** | 111**.*.** ...**2*2** ...**.*.*****.**.*** | ***1**.*** ***.**2*** ***.**.***...**.*.** | 111**.*.** ...**2*2** ...**.*.**...*.***** | 111*.***** ...*2***** ...*.*****...***..** | 111***..** ...***..** ...***33**
牧场 1 有 21 平方 ; 牧场 2 18 平方 ; 牧场 3 已2 平方。因此贝应选择,其中 21 方块 1 牧场最大限度地她能吃的草。
问题产品名称: feedtime
输入格式:
* 第 1 行: 两个空格分隔整数: W 和 H
* 线 2..H + 1: 我 + 1 描述了字段的线行我用宽字符 (和没有空格) 每个或者 ' ' * '
INPUT 示例 (feedtime.in 文件):
10 8...*....**..**....**...*....**...**.*.*****.**.***...**.*.**...*.*****...***..**
输出格式:
* 第 1 行: 为一个整数,它表示的最大数量贝西可以吃的草的平方。
示例输出 (feedtime.out 文件):
21
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式