当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3855:Chocolate Machine

题目描述
There is a Vending machine sales which sell magic chocolate in Renren office. The chocolate is shaped like a n*m rectangle, and
each 1*1 unit is assigned with a delicious degree. A consumer can chose a Staircase-shaped chocolate (whose bottom and right edge must be a straight line) to buy, if there isn't
any units' delicious degree is less than K. And the price of this block is equal to the sum of delicious degree it contains.
Chould you help the manager to figer out how much can he earn at most?

This is a sample of a Staircase-shaped chocolate. Noting that a rectangle is also a Special case of Staircase-shaped
chocolate.
输入解释
The first line contains a positive integer: the number of test cases, at most 100.
After that per test case:
One line with three integers n, m and K (1 ≤ n, m ≤ 3 000, K ≤ 1000000): the dimensions of chocolate.
Next n lines, each with m positive integers(less than 1000000). The jth colume of the ith line represents the delicious
degree of i*j unit.
输入样例
1
2 3 2
2 3 4
2 2 1
输出样例
9
提示
We can sold:
2 3
2 2
or
2 3 4
来自杭电HDUOJ的附加信息
Recommend chenyongfu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3855

最后修改于 2020-10-25T23:07:37+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 125536/65536K(Java/Others)