hdu 1069 &uva 437

题意:给出多种a*b*c的箱子,每种箱子有多个每个箱子底面如果长和宽均小于另一个箱子的低面,那么这个箱子那么可以放在那个箱子上面

请输出箱子能够排列的最大的高度

分析:一种箱子最多有6种有效状态,那么把每个箱子拆分为6个箱子,(a,b,c)分别表示长宽高

那么比较一个箱子是否能放在另一个箱子提供了方便,如果一个箱子底面积小于另一个,那么必然不能放在下面,按照箱子底面积排序

dp[i]表示选第i个箱子的最大高度,dp[i]=max(dp[i],dp[j]+h[i])j<i

时间: 2024-08-26 06:27:02

hdu 1069 &uva 437的相关文章

[2016-03-30][HDU][1069][Monkey and Banana]

时间:2016-03-27 15:19:40 星期日 题目编号:[2016-03-30][HDU][1069][Monkey and Banana] 题目大意:给定n种积木无限个,问这些积木最大能叠多高,上面的积木长宽必须严格小于下面的积木 分析: dp[i]表示第i个积木在顶部时候的最大高度,那么dp[i] = max(dp[i],dp[j] + h[i]);?ji能放在j上面?ji能放在j上面 初始条件就是长宽最大的高度是它自己, #include <algorithm> #include

HDU 1069 Monkey and Banana(二维偏序LIS的应用)

---恢复内容开始--- Monkey and Banana Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13003    Accepted Submission(s): 6843 Problem Description A group of researchers are designing an experiment to te

HDU 1069&amp;&amp;HDU 1087 (DP 最长序列之和)

H - Super Jumping! Jumping! Jumping! Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1087 Appoint description:  System Crawler  (2015-11-18) Description Nowadays, a kind of chess game called “Su

HDU 1069 Monkey and Banana(DP 长方体堆放问题)

Monkey and Banana Problem Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever

UVA 437 十九 The Tower of Babylon

The Tower of Babylon Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Practice UVA 437 Appoint description:  System Crawler  (2015-08-29) Description Perhaps you have heard of the legend of the Tower of Babylon. No

C - Monkey and Banana HDU 1069( 动态规划+叠放长方体)

C - Monkey and Banana Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1069 Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof

uva 437 The Tower of Babylon(动态规划 嵌套矩形问题最长路)

有思路就去做,要相信自己 多处理更复杂的情况,你就不觉得现在复杂了 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; struct soli { ll a,b,c; }s[40]; int n; ll d[40][3]; int vis[40][3]; ll answer[40][3]; ll dp(int s1,int s2

HDU 1069 dp最长递增子序列

B - Monkey and Banana Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1069 Appoint description: Description A group of researchers are designing an experiment to test the IQ of a monkey. They wi

HDU 1069 Monkey and Banana (动规)

Monkey and Banana Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7248    Accepted Submission(s): 3730 Problem Description A group of researchers are designing an experiment to test the IQ of a