荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: kaman (天外飞仙), 信区: ACMICPC
标  题: Parallelepiped
发信站: 荔园晨风BBS站 (Sun Mar 28 11:50:45 2004), 站内信件

Parallelepiped
Time Limit: 1.0 second
Memory Limit: 1 000 КБ

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
integer 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

--
Long long ago,there is a hero stand at the edge of the land.......

     ▁▁
   ▕天外▏
   ▕飞仙▏
     ▔▔

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.111.157]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店