QOJ.ac

QOJ

Time Limit: 3.0 s Memory Limit: 512 MB Total points: 100

#11786. 盒子

Statistics

Bella 在一家生产盒子的工厂工作。所有的盒子都是长方体形状。相应长方体的展开图是从一张大小为 $w \times h$ 的平整矩形纸板上切割下来的。这个展开图是一个多边形,其边与纸板矩形的边平行。展开图沿着几条线折叠,并沿着所得长方体的棱连接起来形成一个盒子。展开图仅沿着所得盒子的棱进行折叠。

第一个样例

第三个样例

Bella 是一名软件开发人员,她的任务是检查是否可以用大小为 $w \times h$ 的纸板制作出一个大小为 $a \times b \times c$ 的盒子。Bella 已经编写了一个程序,并且盒子正在生产中。你能做到同样的事情吗?

输入格式

第一行包含三个整数 $a$、$b$ 和 $c$,表示盒子的尺寸。 第二行包含两个整数 $w$ 和 $h$,表示纸板的宽度和高度。 所有整数均为正整数且不超过 $10^8$。

输出格式

如果可以从大小为 $w \times h$ 的纸板中切割出大小为 $a \times b \times c$ 的盒子,则输出 “Yes”,否则输出 “No”。

样例

输入 1

1 2 3
6 5

输出 1

Yes

输入 2

1 2 3
5 5

输出 2

No

输入 3

1 1 1
10 2

输出 3

Yes

说明

忽略旋转和镜像,立方体共有 11 种不同的展开图。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.