编程介的小学生 2017-10-03 02:35 采纳率: 20.5%
浏览 759
已采纳

Parallelepiped

Description

Two opposite vertices of the parallelepiped A with the edges parallel to the datume lines, have coordinates (0, 0, 0) and (u, v, w) correspondingly (0< u< 1000, 0< v< 1000, 0< w< 1000).

Each of the n points of the set S is defined by its coordinates (x(i), y(i), z(i)), 1 <= i <= n <= 50. No pair of points of the set S lies on the straight line parallel to some side of the parallelepiped A.

You are to find a parallelepiped G of the maximal volume such that all its sides are parallel to the edges of A, G completely lies in A (G and A may have common boundary points) and no point of S lies in G (but may lie on its side).
Input

The first line consists of the numbers u, v, w separated with a space. The second line contains an integer n. The third, ..., (n+2)-nd line – the numbers x(i), y(i), z(i)separated with a space.

The number n is written without a decimal point. All other numbers are written with not more than two digits after a decimal point (if a number is integer a decimal point may be omitted). All the input numbers are non-negative not greater than 1000.
Output

One number – the volume of G with two digits after a decimal point. If the true volume has more than two digitrs after a decimal point you should round off the result to two digits after a decimal opint according to the common mathematical rules.
Sample Input

1.0 1.0 1.0
1
0.5 0.5 0.5
Sample Output

0.50

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-10-18 00:39
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题