主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=4296 Buildings Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1822 Accepted Submission(s): 722 Problem Description Have you ever heard the st…
题意: 给定N个物体,每个物体有两个参数w,s. w代表它自身的重量: s代表它的强度.现在要把这些物体叠在一起,会产生一个PDV值. PDV解释:(Σwj)-si, where (Σwj) stands for sum of weight of all floors above.即为在i物体上方所有物体的重量和 - i的强度. 现在希望最大的PDV值最小.................... YY: 假设两个物体i,j,把谁放上面比较好? 假设把i放上面,则pdv1 = Wi - Sj:…
Buildings 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5301 Description Your current task is to make a ground plan for a residential building located in HZXJHS. So you must determine a way to split the floor building with walls to make apartments…
Buildings Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 387 Accepted Submission(s): 81 Problem Description Your current task is to make a ground plan for a residential building located in HZXJ…
Buildings Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 759 Accepted Submission(s): 210 Problem Description Your current task is to make a ground plan for a residential building located…
Buildings Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 185 Accepted Submission(s): 25 Problem Description Your current task is to make a ground plan for a residential building located i…
证明转自: here 题意:有 n 个地板,每个地板 i 有两个权值 Wi, Si,且 PDV(i) = (ΣWj) - Si ( j 表示在 i 上面的地板).问如何调整顺序,使得[max(PDV)]最小. 思路:假设i,j相邻,并且i上面的重量为sum,若i在上面,则有pi=sum-si,pj=sum+wi-sj;若j在上面,则有pi'=sum+wj-si,pj'=sum-sj; 显然有pi<pi',pj>pj',于是令pj<pi',就有sum+wi-sj<sum+wj-s…