1587 Box
Ivan works at a factory that produces heavy machinery. He has a simple job — he knocks up wooden
boxes of different sizes to pack machinery for delivery to the customers. Each box is a rectangular
parallelepiped. Ivan uses six rectangular wooden pallets to make a box. Each pallet is used for one side
of the box.
Joe delivers pallets for Ivan. Joe is not very smart and often makes mistakes — he brings Ivan
pallets that do not fit together to make a box. But Joe does not trust Ivan. It always takes a lot of
time to explain Joe that he has made a mistake.
Fortunately, Joe adores everything related to computers and sincerely believes that computers never
make mistakes

该问题要求编写一个程序,接收六个矩形面的尺寸,判断它们是否能构成一个长方体。输入包含多组测试用例,每个用例对应六个面的宽度和高度。程序需要检查是否存在三对相同的面,并确保任意两个不同的面间至少有一条公共边。满足这两个条件则输出'POSSIBLE',否则输出'IMPOSSIBLE'。

1342

被折叠的 条评论
为什么被折叠?



