帮忙翻译一道英文acm题目

来源:百度知道 编辑:UC知道 时间:2024/06/28 07:34:35
While standing in a perfect N x M (1 <= N,M <= 50) rectangle, the herd of Farmer John's cows has been reading psychology books together. One book had a test to rate "happiness" so each calculated their "happiness rating", an integer range from -100..100 inclusive.

Another book suggested that a sub-rectangle of cows has an aggregate happiness rating that is the product of all the happiness ratings for the individual cows of the sub-rectangle. This is interesting in that two unhappy cows pretty much cancel each other's unhappiness while wallowing in each other's self-pity.

Find the happiest sub-rectangle of the herd of cows. A sub-rectangle is a p x q rectangle of contiguous cows culled from the larger herd.

一个N*M的矩阵,每个元素代表该放个牛的“快乐值”,数值为整数在-100至100之间,包含-100和100。
一个子矩阵的“总快乐值”定义为子矩阵内所有牛“快乐值”的乘积。
注意到这意味着子矩阵内如果有两头非常不快乐的牛,那么这个子矩阵的“总快乐值”可以是很大的正数。

题目要求是,让你找出有“总快乐值”最大的子矩阵

另外,这里子矩阵要求是由相邻的牛组成的矩阵。