poj1017】的更多相关文章

题目链接: https://vjudge.net/problem/POJ-1017 题目大意: 公司共有底面面积为1*1.2*2.3*3.4*4.5*5.6*6,高度同为H的六种产品,现在需要用最少的箱子打包,箱子的底面面积为6*6,高度为H. 思路: 简单的暴力贪心算法,对不同的产品有不同的策略,按照从大到小的顺序打包产品,策略如下:  6*6:1个产品放在1个箱子里 5*5:1个产品要占用1个箱子,用1*1的箱子可以填充(11个填满1箱)  4*4:1个产品要占用1个箱子,剩余空间用2*2和…
http://poj.org/problem?id=1017 (题目链接) 题意 一个工厂制造的产品形状都是长方体盒子,它们的高度都是 h,长和宽都相等,一共有六个型号,分别为1*1, 2*2, 3*3, 4*4, 5*5, 6*6.这些产品通常使用一个 6*6*h 的长方体箱子包装然后邮寄给客户.因为邮费很贵,所以工厂要想方设法的减小每个订单运送时的箱子数量BoxNum. Solution 一开始我写了个100+行的程序,还没写完就弃疗了,感觉情况太多了...然后看了看题解,别人60行就搞完了…
Packets Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 47750 Accepted: 16182 Description A factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always de…
http://poj.org/problem?id=1017 工厂生产高度都为h,长和宽分别是1×1 2×2 3×3 4×4 5×5 6×6的6种规格的方形物品,交给顾客的时候需要包装,包装盒长宽高都为6×6,高度为h,为了减少成本,问至少需要多少包装盒才能把全部物品装进去.每一行有6个数,分别表示1×1  2×2 3×3 4×4 5×5 6×6的物品有多少个. 从大到小处理,先放6×6的放一个就需要一个盒子,在放5×5的,每一个也需要一个盒子,但是还可以放11个1×1的物品,放4×4的物品的时…
一个工厂制造的产品形状都是长方体,它们的高度都是h,长和宽都相等,一共有六个型号,他们的长宽分别为1*1, 2*2, 3*3, 4*4, 5*5, 6*6.这些产品通常使用一个 6*6*h 的长方体包裹包装然后邮寄给客户.因为邮费很贵,所以工厂要想方设法的减小每个订单运送时的包裹数量.他们很需要有一个好的程序帮他们解决这个问题从而节省费用.现在这个程序由你来设计.  #include<stdio.h>     , b2=, sum=a6;             sum += a5;     …
Packets Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 48911   Accepted: 16570 Description A factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are alway…
一.题目 Description A factory produces products packed in square packets of the same height h and of the sizes 11, 22, 33, 44, 55, 66. These products are always delivered to customers in the square parcels of the same height h as the products have and o…
题目链接:http://poj.org/problem?id=1017 解题报告: #include<stdio.h> int main() { int n,a,b,c,d,e,f,x,y; ]={,,,}; while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f),a+b+c+d+e+f) { n=d+e+f+(c+)/; y=*d+u[c%]; if(b>y) n+=(b-y+)/;…
题意: 有6种面积的格子,给出这些格子的数量,然后有6*6的格子去容纳这6种面基,问最少需要几个6*6格子,使得所有类型的小格子被容纳. 思路: 按照面积的从大到小放. 一开始还是太天真,还要用各种1去补,wa了一发- 具体都在代码那里注释了 贴一发瞎写的挫code---. #include <iostream> #include <cstdio> #include<vector> #include <cstring> #include <algori…
http://poj.org/problem?id=1017 艰难啊 弄了很久咧 拍了几十万组,以后拍要多组数据 Solution 从大wangxiaofang 从大往小放,有空余的从大往小填 注意细节 Notice b<0的情况,还有就是当前填充完了,还剩一点给下一个(小一点的)填 Code // This file is made by YJinpeng,created by XuYike's black technology automatically. // Copyright (C)…