当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6518:Clumsy Keke

题目描述
Keke is currently studying engineering drawing courses, and the teacher has taught her how to find its volume through the three views of the part. But her brain doesn't work well that she can't find the volume of complex parts. So she needs your help.

To simplify the problem, the part is made up of cubes with side length $1$, and the vertices of these cubes are all on the grid. Give you three 0/1 matrices, each representing each of the three views. $0$ means that there is no projection of cubes at this position of the view; $1$ means that there is a projection of cubes at this position of the view.

Now Keke wants you to help her find the volume of the part determined by the three views.
输入解释
There are mutiple test cases, the number of which is no more than 10. For each test case:

The first line of input contains three integers $ m_x, m_y, m_z (1\leq m_x, m_y, m_z\leq99)$ , which represent the coordinate range of all possible cubes (i.e. all possible cubes are in the cuboid area whose body diagonal is from $(1,1,1)$ to $(m_x, m_y, m_z)$).

Following input a 0/1 matrix with $m_x$ lines and $m_y$ columns representing the front view, and the $y$-th column of the $x$-th row represents the projection of all the cubes in the front view such as $(x, y, ?)$.

Following input a 0/1 matrix with $m_y$ lines and $m_z$ columns representing the side view, and the $z$-th column of the $y$-th row represents the projections of all the cubes in the side view such as $(?, y, z)$.

Following input a 0/1 matrix with $m_z$ lines and $m_x$ columns representing the top view, and the $x$-th column of the $z$-th row represents the projection of all the cubes of the top view such as $(x, ?, z)$.

The '$?$' in the above coordinates represents any integer. Numbers in the same line are separated by spaces. For more detailed input information, please see the sample.
输出解释
For each test case:

The first line of output should contain an integer, representing the volume of the part determined by the three views. If the determined part is not unique, find the largest of all possible parts.

Keke's teacher promises that there is at least one part that satisfies the input.
输入样例
5 6 4
1 1 1 1 1 1
0 0 0 1 0 1
0 0 0 1 0 1
0 0 0 0 0 1
0 0 0 0 0 1
0 1 1 0
1 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
1 1 1 1
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 1 1 1 1
输出样例
17
提示
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6518

最后修改于 2020-10-25T23:32:02+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)