ACM: uva_10755
来源:互联网 发布:电脑网络连接显示未知 编辑:程序博客网 时间:2024/06/10 12:59
Garbage Heap
Farmer John has a heap of garbage formed in a rectangularparallelepiped.
It consists of
The farmer thinks that he has too much harmful garbage, so hewants to decrease the heap size, leaving a rectangular nonemptyparallelepiped of smaller size cut of the original heap to maximizethe sum of the values of the garbage pieces in it. You have to findthe optimal parallelepiped value. (Actually, if any smallerparallelepiped has value less than the original one, the farmerwill leave the original parallelepiped).
Input
The first line of the input contains the numberof the test cases, which is at most 15. The descriptions of thetest cases follow. The first line of a test case descriptioncontains three integers
The test cases are separated by blank lines.
Output
For each test case in the input, output a single integerdenoting the maximal value of the new garbage heap. Print a blankline between test cases.
Examples
1
2 2 2
-1 2 0 -3 -2 -1 1 5
Output
6
题意: 在一个长方体中, 每个单位正方体1*1*1的体积是1, 现在要你找出体积最大子长方体.
解题思路:
代码:
#include <iostream>
#include <cstring>
using namespace std;
#define MAX 30
const long long INF = (1LL<<60);
int a, b, c;
long long s[MAX][MAX][MAX];
inline long long min(long long a, long long b)
{
}
inline long long max(long long a, long long b)
{
}
void situation(int i, int &s1, int&s2, int &s3)
{
}
int getSign(int s1, int s2, int s3)
{
}
long long getSum(int x1, int x2, int y1, int y2, int z1, intz2)
{
}
int main()
{
//
}
- ACM: uva_10755
- hdoj acm 1008
- hdoj acm 1029
- ACM JOJ 1007
- ACM JOJ 1023
- ACM next_permutation函数
- ACM: poj 1664
- ACM: poj 1050
- ACM: zoj 2714
- ACM: uva 11464
- ACM: uva 3902
- ACM: poj 1964
- ACM: poj 3141
- ACM: poj 1903
- ACM: uva 10382
- ACM: uva 11134
- ACM: 数学题 uva_11137
- acm 1005 Number Sequence
- 基于CXF Servlet方式发布Restful的Web服务(入门篇)
- ACM: uva 3902
- ACM: poj 1964
- Android五种储存方式—sqlite数据库存储
- ACM: poj 3141
- ACM: uva_10755
- ACM: poj 1903
- ACM: 动态规划题 uva 11825
- ACM: 动态规划题 bnu 13149
- ACM: 动态规划题 LA 3983
- ACM: 动态规划题 LA 4794
- ACM: uva 10382
- ACM: LA 4254 记住…
- Jersey 2.22.2 官方文档第18章学习笔记