编程介的小学生 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
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容