CF638D Three-dimensional Turtle Super Computer
题目描述
有一个 $n\times m \times k$ 的立方体,分成 $1\times 1 \times 1$ 的不同的小方格。
小方格的状态由 $0$ 或 $1$ 表示,$1$ 表示该点为一个有效点,$0$ 表示该点为一个非有效点。
定义每一个点周围的 $6$ 个与该点有两维坐标相等且不同维度坐标绝对差为 $1$ 的点直接相连。
任意两个不同的有效点 $x_1$ 与 $x_2$ 如果存在**有且仅有**一个与两点直接相连且不同的点 $x_3$ 使得两点间接相连,则称 $x_3$ 具有关键性。
输入格式
无
输出格式
无
说明/提示
In the first sample the whole first layer of CPUs is malfunctional. In the second layer when CPU $ (2,1,2) $ turns off, it disrupts the control by CPU $ (2,1,3) $ over CPU $ (2,1,1) $ , and when CPU $ (2,2,2) $ is turned off, it disrupts the control over CPU $ (2,2,3) $ by CPU $ (2,2,1) $ .
In the second sample all processors except for the corner ones are critical.
In the third sample there is not a single processor controlling another processor, so the answer is $ 0 $ .