Parallelepiped walk

TimeLimit:1000MS  MemoryLimit:10000K
64-bit integer IO format:%lld
未提交 | 登录后收藏
Problem Description
Two points A(x1, y1, z1) and B(x2, y2, z2) are placed on the surface of parallelepiped P = {(x, y, z): 0 <= x <= L, 0 <= y <= W, 0 <= z <= H} with L*W*H dimensions (see figure). These two points can be linked with various curves lying on the surface of P. You are to find out the square of the shortest curve length.

Parallelepiped dimensions L, W, H and coordinates of the points are integers, 0 <= L,W,H <= 1000.

Input
Input contains (in indicated order): L, W, H, x1, y1, z1, x2, y2, z2. The numbers are separated with spaces and end-of-line characters.
Output
Output should contain the square of the shortest curve length between points A and B on the surface of P.
SampleInput
5 5 2
3 1 2
3 5 0
SampleOutput
36
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数2
总提交量3
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: