Box(gym 101630 B)

这篇博客讨论了如何检查是否能从给定尺寸的矩形纸板上剪裁出一个特定尺寸的长方体盒子。输入包括长方体的三个边长和纸板的宽高,输出是判断能否制作的结论。博主提供了解题思路,涉及对不同长宽比的长方体的分类和暴力搜索方法。
摘要由CSDN通过智能技术生成

原文地址B题

Bella is working in a factory that produces boxes. All boxes are in a shape of rectangular parallelepipeds.
A net of the corresponding parallelepiped is cut out of a flat rectangular piece of cardboard of size w × h.
This net is a polygon with sides parallel to the sides of the rectangle of the cardboard. The net is bent
along several lines and is connected along the edges of the resulting parallelepiped to form a box. The
net is bent only along the edges of the resulting box.

Bella is a software developer and her task is to check whether it is possible to make a box of size a × b × c
out of a cardboard of size w × h. Bella did write a program and boxes are being produced. Can you do
the same?
Input
The first line contains three integers a, b, and c — the dimensions of the box.
The second line contains two integers w and h — the width and the he

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>